summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorAppu Goundan <appu@google.com>2014-04-04 13:02:13 -0400
committerAppu Goundan <appu@google.com>2014-04-04 13:02:13 -0400
commit3db76b0e12b49681bcfb24ff99f7806a7620f683 (patch)
tree501778d10843d5628fc7970571396dc920949655 /src/com
parentaeddbcbf526d1e6cb8346604a8770653dfa6ef7b (diff)
downloadcloud-3db76b0e12b49681bcfb24ff99f7806a7620f683.tar.gz
Remove old Maven based templates/code
Change-Id: I94c319a600ae54fba9ed2e2d48731ba69f72fbd8
Diffstat (limited to 'src/com')
-rw-r--r--src/com/google/gct/intellij/endpoints/action/GenerateClientLibrariesAction.java106
-rw-r--r--src/com/google/gct/intellij/endpoints/action/GenerateCloudBackendAction.java164
-rw-r--r--src/com/google/gct/intellij/endpoints/action/GenerateEndpointAction.java111
-rw-r--r--src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.form89
-rw-r--r--src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.java157
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/AppEngineEndpointGenerator.java88
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/AppEngineMavenGenerator.java107
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/sample/AndroidGradleGcmLibGenerator.java337
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/sample/AppEngineMavenGcmGenerator.java273
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/sample/CloudBackendGenerator.java243
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/DeviceInfo.java.template70
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/DeviceInfoEndpoint.java.template173
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/JpaSwarmService.java.template171
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/ManagerFactoryClass.java.template16
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/MessageData.java.template61
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/MessageEndpoint.java.template192
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/TemplateHelper.java358
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/appengine-web.xml.template6
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.css9
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.js6
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/build.gradle.template5
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings-white.pngbin8777 -> 0 bytes
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings.pngbin12799 -> 0 bytes
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/index.html310
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/jquery-1.9.0.min.js4
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/persistence.xml.template15
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/pom.xml.template139
-rw-r--r--src/com/google/gct/intellij/endpoints/generator/template/web.xml.template7
-rw-r--r--src/com/google/gct/intellij/endpoints/project/AppEngineMavenProject.java467
-rw-r--r--src/com/google/gct/intellij/endpoints/util/GradleUtils.java138
-rw-r--r--src/com/google/gct/intellij/endpoints/util/ResourceUtils.java62
-rw-r--r--src/com/google/gct/intellij/endpoints/util/VfsUtils.java57
32 files changed, 0 insertions, 3941 deletions
diff --git a/src/com/google/gct/intellij/endpoints/action/GenerateClientLibrariesAction.java b/src/com/google/gct/intellij/endpoints/action/GenerateClientLibrariesAction.java
deleted file mode 100644
index b416625..0000000
--- a/src/com/google/gct/intellij/endpoints/action/GenerateClientLibrariesAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.gct.intellij.endpoints.action;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-import com.google.gct.intellij.endpoints.util.VfsUtils;
-
-import com.intellij.openapi.actionSystem.AnAction;
-import com.intellij.openapi.actionSystem.AnActionEvent;
-import com.intellij.openapi.actionSystem.LangDataKeys;
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.Messages;
-import com.intellij.openapi.util.ThrowableComputable;
-import com.intellij.openapi.vfs.VfsUtil;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-/**
- * Action to generate client libraries for an AppEngine endpoints project and copy them to an associated android project
- */
-public class GenerateClientLibrariesAction extends AnAction {
-
- private static final String ERROR_MESSAGE_TITLE = "Failed to Generate Client Libraries";
- private static final Logger LOG = Logger.getInstance(GenerateClientLibrariesAction.class);
-
- @Override
- public void actionPerformed(AnActionEvent e) {
- final Project project = e.getProject();
- final Module appEngineModule = e.getData(LangDataKeys.MODULE);
-
- if(project == null || appEngineModule == null) {
- Messages.showErrorDialog(project, "Please select an App Engine module", ERROR_MESSAGE_TITLE);
- return;
- }
-
- AppEngineMavenProject appEngineMavenProject = AppEngineMavenProject.get(appEngineModule);
- if(appEngineMavenProject == null) {
- Messages.showErrorDialog(project, "Please select a valid Maven enabled App Engine project", ERROR_MESSAGE_TITLE);
- return;
- }
-
- Module androidLibModule =
- ModuleManager.getInstance(project).findModuleByName(project.getName() + GctConstants.ANDROID_GCM_LIB_MODULE_SUFFIX);
- if(androidLibModule == null) {
- Messages.showWarningDialog(project, "Could not find associated Android library module (" +
- project.getName() + GctConstants.ANDROID_GCM_LIB_MODULE_SUFFIX +
- "), skipping copying of client libraries into Android", "Warning");
- }
-
- doAction(appEngineMavenProject, androidLibModule);
- }
-
- void doAction(@NotNull final AppEngineMavenProject appEngineMavenProject, @Nullable final Module androidLibModule) {
-
- appEngineMavenProject.runGenClientLibraries(new AppEngineMavenProject.MavenBuildCallback() {
- @Override
- public void onBuildCompleted(int resultCode, String text) {
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- @Override
- public void run() {
- try {
- appEngineMavenProject.expandAllClientLibs();
- ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<Void, FileNotFoundException>() {
- @Override
- public Void compute() throws FileNotFoundException {
- appEngineMavenProject.refreshExpandedSourceDir(false, null);
- if(androidLibModule != null) {
- appEngineMavenProject.copyExpandedSources(VfsUtil.virtualToIoFile(VfsUtils.findModuleRoot(androidLibModule)));
- }
- return null;
- }
- });
- }
- catch (IOException e) {
- LOG.error("Failed to expand Client Libraries from downloaded zips", e);
- }
- }
- });
- }
- });
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/action/GenerateCloudBackendAction.java b/src/com/google/gct/intellij/endpoints/action/GenerateCloudBackendAction.java
deleted file mode 100644
index 4239f82..0000000
--- a/src/com/google/gct/intellij/endpoints/action/GenerateCloudBackendAction.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.gct.intellij.endpoints.action;
-
-import com.android.tools.idea.model.ManifestInfo;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.generator.sample.CloudBackendGenerator;
-import com.google.gct.intellij.endpoints.action.ui.GenerateBackendDialog;
-
-import com.intellij.openapi.actionSystem.AnAction;
-import com.intellij.openapi.actionSystem.AnActionEvent;
-import com.intellij.openapi.actionSystem.LangDataKeys;
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.Messages;
-import com.intellij.openapi.util.text.StringUtil;
-import com.intellij.openapi.vfs.LocalFileSystem;
-
-import org.jetbrains.android.facet.AndroidFacet;
-import org.jetbrains.android.sdk.AndroidSdkUtils;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.idea.maven.project.MavenProjectsManager;
-import org.jetbrains.idea.maven.utils.MavenUtil;
-
-import java.io.File;
-
-/**
- * Action to generate an App Engine cloud backend with an associated Android library module
- */
-public class GenerateCloudBackendAction extends AnAction {
-
- private static final String MESSAGE_TITLE = "Generate Cloud Backend";
-
- @Override
- public void actionPerformed(AnActionEvent e) {
- final Module androidModule = e.getData(LangDataKeys.MODULE);
- final Project project = e.getProject();
-
- if(project == null || androidModule == null) {
- Messages.showErrorDialog(project, "Please select an android module to create a backend for",
- MESSAGE_TITLE);
- return;
- }
-
- if (AndroidFacet.getInstance(androidModule) == null) {
- Messages.showErrorDialog(project, "Selected Module : " + androidModule.getName() + " is not an Android Module. If you selected the " +
- "root project, try selecting the Android Module instead.",
- MESSAGE_TITLE);
- return;
- }
-
- if(!passesExternalChecks(project)) {
- return;
- }
-
- // Make sure that the dir does not exist
- final String appEngineModuleName = androidModule.getName() + GctConstants.APP_ENGINE_MODULE_SUFFIX;
- final String appEngineLfsModuleFileDir = project.getBasePath() + File.separatorChar + appEngineModuleName;
- if (LocalFileSystem.getInstance().findFileByPath(appEngineLfsModuleFileDir) != null) {
- Messages.showErrorDialog(project, "Unable to generate an App Engine Backend named '" + appEngineModuleName + "'.\n" +
- "The directory '" + appEngineLfsModuleFileDir + "' already exists.",
- MESSAGE_TITLE);
- return;
- }
-
- // Look for the root package
- final ManifestInfo manifestInfo = ManifestInfo.get(androidModule);
- if (manifestInfo == null) {
- Messages.showErrorDialog(project, "Unable to generate an App Engine Backend named '" + appEngineModuleName + "'.\n" +
- "Cannot find the AndroidManifest.xml for the '" + androidModule.getName() + "' module.",
- MESSAGE_TITLE);
- return;
- }
-
- final String rootPackage = manifestInfo.getPackage();
- if (rootPackage == null || rootPackage.isEmpty()) {
- Messages.showErrorDialog(project, "Unable to generate an App Engine Backend named '" + appEngineModuleName + "'.\n" +
- "Cannot find a package attribute in the <manifest> tag of AndroidManifest.xml.",
- MESSAGE_TITLE);
- return;
- }
-
- final String androidEndpointsLibModuleName = androidModule.getName() + GctConstants.ANDROID_GCM_LIB_MODULE_SUFFIX;
- final File androidLibModuleRoot = new File(project.getBasePath(), androidEndpointsLibModuleName);
- if (androidLibModuleRoot.exists()) {
- Messages.showErrorDialog(project, "Unable to generate an Android Library named named '" + androidEndpointsLibModuleName + "'.\n" +
- "The directory '" + androidLibModuleRoot.getPath() + "' already exists.",
- MESSAGE_TITLE);
- return;
- }
-
- final GenerateBackendDialog dialog = new GenerateBackendDialog(project);
- dialog.show();
- if(dialog.isOK()) {
- doAction(project, androidModule, dialog);
- }
- }
-
- void doAction(final Project project, Module androidModule, GenerateBackendDialog dialog) {
- new CloudBackendGenerator(project, androidModule, dialog).generate(new CloudBackendGenerator.Callback() {
- @Override
- public void backendCreated(@NotNull Module androidLibModule, @NotNull Module appEngineModule) {
- // We don't need to do anything here, the process is complete.
- }
-
- @Override
- public void onFailure(final String errorMessage) {
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- @Override
- public void run() {
- Messages.showErrorDialog(project, "An error occurred during backend generation : " + errorMessage,
- MESSAGE_TITLE);
- }
- });
- }
- });
- }
-
- protected boolean passesExternalChecks(Project project) {
- File mavenHome = MavenUtil.resolveMavenHomeDirectory(null);
- if(mavenHome == null) {
- Messages.showErrorDialog(project, "Could not find a valid installation of maven. " +
- "Perhaps you have not installed Maven or have not setup your Maven paths", MESSAGE_TITLE);
- return false;
- }
-
- String mavenVersion = MavenUtil.getMavenVersion(mavenHome.getAbsolutePath());
- if(StringUtil.compareVersionNumbers("3", mavenVersion) > 0) {
- Messages.showErrorDialog(project, "Cloud Endpoints requires Maven version 3 or higher", MESSAGE_TITLE);
- return false;
- }
-
- if(MavenProjectsManager.getInstance(project).getGeneralSettings().isWorkOffline()) {
- Messages.showErrorDialog(project, "Could not connect to MavenCentral because Maven is in 'offline' mode. Switch maven to 'online' " +
- "mode and try again", MESSAGE_TITLE);
- return false;
- }
-
- if(!new File(AndroidSdkUtils.tryToChooseAndroidSdk().getLocation() + GctConstants.ANDROID_SDK_GCM_PATH).exists()) {
- Messages.showErrorDialog(project, "Could not find gcm.jar. Please install the Android " +
- "SDK Extra : 'Google Cloud Messaging for Android Library' using the Android SDK Manager.",
- MESSAGE_TITLE);
- return false;
- }
- return true;
- }
-}
-
diff --git a/src/com/google/gct/intellij/endpoints/action/GenerateEndpointAction.java b/src/com/google/gct/intellij/endpoints/action/GenerateEndpointAction.java
deleted file mode 100644
index 099b9cd..0000000
--- a/src/com/google/gct/intellij/endpoints/action/GenerateEndpointAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.gct.intellij.endpoints.action;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.generator.AppEngineEndpointGenerator;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-import com.google.gct.intellij.endpoints.util.PsiUtils;
-
-import com.intellij.openapi.actionSystem.AnAction;
-import com.intellij.openapi.actionSystem.AnActionEvent;
-import com.intellij.openapi.actionSystem.LangDataKeys;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.Messages;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiField;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiJavaFile;
-
-import org.jetbrains.annotations.Nullable;
-
-import java.io.IOException;
-
-/**
- * Action to generate an Endpoint class from an Entity class
- */
-public class GenerateEndpointAction extends AnAction {
-
- private static final String ERROR_MESSAGE_TITLE = "Failed to Generate Endpoint Class";
- private static final Logger LOG = Logger.getInstance(GenerateEndpointAction.class);
-
- @Override
- public void actionPerformed(AnActionEvent e) {
- // TODO: check if app engine module in here as well
- PsiJavaFile psiJavaFile = getPsiJavaFileFromContext(e);
- final Project project = e.getProject();
- final Module module = e.getData(LangDataKeys.MODULE);
-
- if (psiJavaFile == null || module == null) {
- Messages.showErrorDialog(project, "Please select a Java file to create an Endpoint for", ERROR_MESSAGE_TITLE);
- return;
- }
-
- final AppEngineMavenProject appEngineMavenProject = AppEngineMavenProject.get(module);
- if (appEngineMavenProject == null) {
- Messages.showErrorDialog(project, "Please select a valid Maven enabled App Engine module", ERROR_MESSAGE_TITLE);
- return;
- }
-
- PsiClass entityClass = PsiUtils.getPublicAnnotatedClass(psiJavaFile, GctConstants.APP_ENGINE_ANNOTATION_ENTITY);
- if (entityClass == null) {
- Messages.showErrorDialog(project, "No JPA @Entity Class found in " + psiJavaFile.getName(), ERROR_MESSAGE_TITLE);
- return;
- }
-
- PsiField idField = PsiUtils.getAnnotatedFieldFromClass(entityClass, GctConstants.APP_ENGINE_ANNOTATION_ID);
-
- if (idField == null) {
- Messages.showErrorDialog(project, "No JPA @Id found in " + psiJavaFile.getName(), ERROR_MESSAGE_TITLE);
- return;
- }
-
- // TODO: this check is a little strange, but maybe necessary for information sake?
- if (idField.getType().getCanonicalText().equals(GctConstants.APP_ENGINE_TYPE_KEY)) {
- int retVal = Messages.showOkCancelDialog(project, "Endpoints with @Id of type " + GctConstants.APP_ENGINE_TYPE_KEY + " are not fully " +
- "compatible with the generation template and may require some user modification to work",
- "Warning", "Continue", "Cancel", Messages.getWarningIcon());
- if(retVal != 0) {
- return;
- }
- }
- doAction(project, appEngineMavenProject, entityClass, idField);
- }
-
- void doAction(final Project project, final AppEngineMavenProject appEngineMavenProject, PsiClass entityClass, PsiField idField) {
- AppEngineEndpointGenerator generator = new AppEngineEndpointGenerator(appEngineMavenProject);
- try {
- generator.generateEndpoint(entityClass, idField);
- } catch(IOException e) {
- Messages.showErrorDialog(project, "Failed to generated an Endpoint class because : " + e.getMessage(), ERROR_MESSAGE_TITLE);
- LOG.error(e);
- }
- }
-
- @Nullable
- private static PsiJavaFile getPsiJavaFileFromContext(AnActionEvent e) {
- PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
- if (psiFile == null || !(psiFile instanceof PsiJavaFile)) {
- return null;
- }
- else {
- return (PsiJavaFile) psiFile;
- }
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.form b/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.form
deleted file mode 100644
index dd9f500..0000000
--- a/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.form
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.google.gct.intellij.endpoints.action.ui.GenerateBackendDialog">
- <grid id="cbd77" binding="myGenerateBackendPanel" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
- <margin top="0" left="0" bottom="0" right="0"/>
- <constraints>
- <xy x="226" y="143" width="566" height="413"/>
- </constraints>
- <properties/>
- <border type="none"/>
- <children>
- <component id="5b1a5" class="javax.swing.JTextField" binding="myApiKeyField">
- <constraints>
- <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties>
- <text value=""/>
- <toolTipText value="Api Key for App Engine module to allow push messaging (You can leave this empty and enter it into MessageEnpoint.java manually)"/>
- </properties>
- </component>
- <component id="11fb" class="javax.swing.JLabel">
- <constraints>
- <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Api Key"/>
- </properties>
- </component>
- <component id="e9f6b" class="javax.swing.JTextField" binding="myProjectNumField">
- <constraints>
- <grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties>
- <text value=""/>
- <toolTipText value="Project Number to enable the android project to receive push notifications (you can leave this empty and enter it into GCMIntentService.java manually)"/>
- </properties>
- </component>
- <component id="79757" class="javax.swing.JLabel">
- <constraints>
- <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="Project Number"/>
- </properties>
- </component>
- <component id="dfe6d" class="javax.swing.JLabel">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text value="App ID"/>
- </properties>
- </component>
- <component id="d4fd1" class="javax.swing.JTextField" binding="myAppIdField">
- <constraints>
- <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="-1"/>
- </grid>
- </constraints>
- <properties>
- <editable value="true"/>
- <text value=""/>
- <toolTipText value="Your App Engine application id (you can leave this empty and enter it into appengine-web.xml manually)"/>
- </properties>
- </component>
- <hspacer id="631b9">
- <constraints>
- <grid row="0" column="0" row-span="1" col-span="2" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false">
- <minimum-size width="562" height="-1"/>
- </grid>
- </constraints>
- </hspacer>
- <component id="8352d" class="javax.swing.JEditorPane" binding="myDescriptionTextPane">
- <constraints>
- <grid row="1" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
- <preferred-size width="150" height="50"/>
- </grid>
- </constraints>
- <properties>
- <contentType value="text/html"/>
- <editable value="false"/>
- </properties>
- </component>
- </children>
- </grid>
-</form>
diff --git a/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.java b/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.java
deleted file mode 100644
index 4e9f38e..0000000
--- a/src/com/google/gct/intellij/endpoints/action/ui/GenerateBackendDialog.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.action.ui;
-
-import com.intellij.ide.BrowserUtil;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
-import com.intellij.openapi.ui.Messages;
-import com.intellij.openapi.ui.ValidationInfo;
-
-import org.jetbrains.annotations.Nullable;
-
-import javax.swing.*;
-import javax.swing.event.HyperlinkEvent;
-import javax.swing.event.HyperlinkListener;
-
-/**
- * A dialog when the user wants to generate an AppEngine endpoints backend informing them that an Android library module and AppEngine
- * module are going to be created. Also allows the user to enter in optional configuration information
- */
-public class GenerateBackendDialog extends DialogWrapper {
-
- private Project myProject;
- private String myAppEngineSdkPath = null;
- protected String myApiKey = "";
- protected String myAppId = "";
- protected String myProjectNum = "";
-
- private JPanel myGenerateBackendPanel;
- private JTextField myApiKeyField;
- private JTextField myAppIdField;
- private JTextField myProjectNumField;
- private JEditorPane myDescriptionTextPane;
-
- public GenerateBackendDialog(Project project) {
- super(project, true);
- this.myProject = project;
- init();
- initValidation();
- setTitle("Generate App Engine Backend");
- setOKButtonText("Generate");
- setupDescriptionPanel();
- }
-
- public String getAppEngineSdkPath() {
- return myAppEngineSdkPath;
- }
-
- public String getApiKey() {
- return myApiKey;
- }
-
- public String getAppId() {
- return myAppId;
- }
-
- public String getProjectNumber() {
- return myProjectNum;
- }
-
- @Override
- protected ValidationInfo doValidate() {
- if (!myProjectNumField.getText().trim().matches("[0-9]*")) {
- return new ValidationInfo("Project Number must be numeric");
- }
- return null;
- }
-
- @Override
- protected void doOKAction() {
- // TODO : this might be redundant
- ValidationInfo validationInfo = doValidate();
- if (validationInfo != null) {
- Messages.showErrorDialog(myProjectNumField, "Cannot Generate Backend : ", validationInfo.message);
- return;
- }
-
- myAppId = myAppIdField.getText().trim();
- myProjectNum = myProjectNumField.getText().trim();
- myApiKey = myApiKeyField.getText().trim();
-
- super.doOKAction();
- }
-
- @Nullable
- @Override
- protected JComponent createCenterPanel() {
- return myGenerateBackendPanel;
-
- }
-
- private void setupDescriptionPanel() {
- myDescriptionTextPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
- myDescriptionTextPane.setFont(UIManager.getFont("Label.font"));
- myDescriptionTextPane.setOpaque(false);
- myDescriptionTextPane.setEditorKit(JEditorPane.createEditorKitForContentType("text/html"));
- myDescriptionTextPane.setText("<html>" +
- "<body>" +
- "When you generate an App Engine backend, sample code will be generated in " +
- "both your Android project and your new App Engine project." +
- "<br><br>" +
- "You will be able to register devices with your backend and send notifications to " +
- "them from a sample web application. The Android application has " +
- "functionality that allows it to register and receive messages via Google " +
- "Cloud Messaging." +
- "<br><br>" +
- "The App Engine backend provides an Endpoints API " +
- "to register Android clients and a Web UI to broadcast messages to clients." +
- "<br><br>" +
- "These configuration parameters below are required for a working example. If " +
- "entered now they will be injected into the project. If left blank, they " +
- "can be manually entered into code after the project is generated." +
- "<br><br>" +
- "The Project ID is chosen when creating a Cloud Project. " +
- "You can create a new Cloud Project at the <a href='https://cloud.google.com/console'>Cloud Console</a>. " +
- "Alternatively, you can enter an existing App Engine application ID in place of the Project ID." +
- "<br><br>" +
- "Your Project ID is listed in the upper-left hand corner of the Cloud Console. Click on the words " +
- "'Project ID' to toggle the Project Number. To obtain your API key, click on the 'APIs' section, " +
- "ensure that the 'Google Cloud Messaging' API is enabled, and then click on 'Register App' to obtain " +
- "a Server key." +
- "<br><br>" +
- "More information about Google Cloud Messaging can " +
- "be found <a href='http://developer.android.com/google/gcm/index.html'>here</a> " +
- "and <a href='http://developer.android.com/google/gcm/gs.html'>here</a>" +
- "</body>" +
- "</html> ");
-
- myDescriptionTextPane.addHyperlinkListener(new HyperlinkListener() {
- @Override
- public void hyperlinkUpdate(HyperlinkEvent e) {
- if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
- BrowserUtil.launchBrowser(e.getURL().toString());
- }
- }
- });
-
- // TODO : Panel acts weird if we don't use setsize + repaint, it draws components over each other
- // perhaps there is a better way to do this.
- myDescriptionTextPane.setSize(-1, -1);
- myDescriptionTextPane.repaint();
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/AppEngineEndpointGenerator.java b/src/com/google/gct/intellij/endpoints/generator/AppEngineEndpointGenerator.java
deleted file mode 100644
index c6182b8..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/AppEngineEndpointGenerator.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.generator;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-import com.google.gct.intellij.endpoints.generator.template.TemplateHelper;
-import com.google.gct.intellij.endpoints.util.PsiUtils;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.*;
-
-import org.jetbrains.annotations.NotNull;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-/** Generator for creating Endpoint classes from Entity classes */
-public class AppEngineEndpointGenerator {
-
- private final AppEngineMavenProject myAppEngineMavenProject;
- private final Project myProject;
- private final Module myAppEngineModule;
-
- private static final Logger LOG = Logger.getInstance(AppEngineEndpointGenerator.class);
-
- /** Constructor */
- public AppEngineEndpointGenerator(@NotNull AppEngineMavenProject appEngineMavenProject) {
- myAppEngineMavenProject = appEngineMavenProject;
- myProject = myAppEngineMavenProject.getProject();
- myAppEngineModule = myAppEngineMavenProject.getModule();
- }
-
- /**
- * NOTE : Cannot hold a readAction if invoking this method
- * Generates an endpoint class from an entity class, and builds
- * @param entityClass
- * the JPA class we are creating an endpoint for
- * @param idField
- * the specific field from the class that is the JPA @Id
- * @return
- * The api name of the generated endpoint, useful when you want to generate the client libraries after
- */
- public String generateEndpoint(PsiClass entityClass, PsiField idField) throws IOException {
-
- TemplateHelper templateHelper = new TemplateHelper(entityClass, idField);
- final PsiFile serviceClassFile = templateHelper.loadJpaSwarmServiceClass();
- final PsiFile entityManagerFactoryFile = templateHelper.loadJpaEntityManagerFactoryClass();
- final PsiFile persistenceXmlFile = templateHelper.loadPersistenceXml();
- final PsiDirectory entityDir = entityClass.getContainingFile().getContainingDirectory();
-
- VirtualFile metaInf = myAppEngineMavenProject.getRootDirectory().findFileByRelativePath(GctConstants.APP_ENGINE_META_INF_PATH);
- if(metaInf == null) {
- throw new FileNotFoundException("App Engine META-INF directory missing, was expected at : " +
- GctConstants.APP_ENGINE_META_INF_PATH);
- }
- final PsiDirectory metaInfDir = PsiManager.getInstance(myProject).findDirectory(metaInf);
-
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
-
- @Override
- public void run() {
- PsiUtils.addOrReplaceFile(entityDir, serviceClassFile);
- PsiUtils.addIfMissingFile(entityDir, entityManagerFactoryFile);
- PsiUtils.addIfMissingFile(metaInfDir, persistenceXmlFile);
- }
- });
-
- return TemplateHelper.getApiNameFromEntityName(serviceClassFile.getName());
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/AppEngineMavenGenerator.java b/src/com/google/gct/intellij/endpoints/generator/AppEngineMavenGenerator.java
deleted file mode 100644
index 711d99d..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/AppEngineMavenGenerator.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.google.gct.intellij.endpoints.generator;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.generator.template.TemplateHelper;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ui.configuration.DefaultModulesProvider;
-import com.intellij.openapi.util.ThrowableComputable;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.PsiDirectory;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiManager;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.idea.maven.project.MavenProjectsManager;
-import org.jetbrains.idea.maven.wizards.MavenProjectBuilder;
-
-import java.io.IOException;
-
-/**
- * This is class is general purpose AppEngine maven project creator, should be modified for specific use cases
- */
-public abstract class AppEngineMavenGenerator {
-
- protected final Project myProject;
- protected final String myModuleName;
- protected final String myRootPackage;
- protected Module myModule;
- protected VirtualFile myModuleRootDir;
-
- private static final Logger LOG = Logger.getInstance(AppEngineMavenGenerator.class);
-
- public AppEngineMavenGenerator(Project project, String moduleName, String rootPackage) {
- myProject = project;
- myModuleName = moduleName;
- myRootPackage = rootPackage;
- }
-
- /** the callback may be ignored by the implementation */
- public abstract void generate(@Nullable Callback callback);
-
- /** Create the required directory stucture for the AppEngine project */
- protected VirtualFile createAppEngineDirStructure() throws IOException {
-
- return ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<VirtualFile, IOException>() {
-
- @Override
- public VirtualFile compute() throws IOException {
- // Create the root directory
- VirtualFile appEngineModuleRootDir = myProject.getBaseDir().createChildDirectory(null, myModuleName);
-
- // Create the maven src dirs
- VirtualFile sourceRoot = appEngineModuleRootDir.createChildDirectory(null, GctConstants.APP_ENGINE_SRC_DIR)
- .createChildDirectory(null, GctConstants.APP_ENGINE_MAIN_DIR);
- sourceRoot.createChildDirectory(null, GctConstants.APP_ENGINE_WEBAPP_DIR);
- sourceRoot.createChildDirectory(null, GctConstants.APP_ENGINE_JAVA_DIR);
-
- // create the res dirs
- VirtualFile resourcesRoot = sourceRoot.createChildDirectory(null, GctConstants.APP_ENGINE_RES_DIR);
- resourcesRoot.createChildDirectory(null, GctConstants.APP_ENGINE_META_INF_DIR);
-
- // maybe we don't need to return here?
- myModuleRootDir = appEngineModuleRootDir;
- return appEngineModuleRootDir;
- }
- });
- }
-
- protected PsiFile addMavenFunctionality() throws IOException, ConfigurationException {
-
- final PsiFile pomFile = ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<PsiFile, IOException>() {
- @Override
- public PsiFile compute() throws IOException {
- PsiManager psiManager = PsiManager.getInstance(myProject);
- PsiDirectory moduleDirectory = psiManager.findDirectory(myModuleRootDir);
- PsiFile pomFile = TemplateHelper.generatePomXml(myProject, myRootPackage, myModuleRootDir.getName());
- moduleDirectory.add(pomFile);
- return pomFile;
- }
- });
-
- final MavenProjectBuilder projectBuilder = new MavenProjectBuilder();
- projectBuilder.setRootDirectory(myProject, myModuleRootDir.getPath());
- projectBuilder.commit(myProject, null, new DefaultModulesProvider(myProject));
- myProject.save();
- return pomFile;
- }
-
- protected void waitForMavenImport() {
- MavenProjectsManager.getInstance(myProject).waitForResolvingCompletion();
- //TODO : this is causing the UI to hang, leave out for now
- //MavenProjectsManager.getInstance(myProject).waitForPluginsResolvingCompletion();
- }
-
-
- /** callback after App Engine project is created */
- public static interface Callback {
- /** There are no guarantees on what thread this will return */
- void moduleCreated(Module appEngineModule);
- /** There are no guarantees on what thread this will return */
- void onFailure(String errorMessage);
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/sample/AndroidGradleGcmLibGenerator.java b/src/com/google/gct/intellij/endpoints/generator/sample/AndroidGradleGcmLibGenerator.java
deleted file mode 100644
index 74ac4c9..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/sample/AndroidGradleGcmLibGenerator.java
+++ /dev/null
@@ -1,337 +0,0 @@
-package com.google.gct.intellij.endpoints.generator.sample;
-
-import com.android.SdkConstants;
-import com.android.sdklib.BuildToolInfo;
-import com.android.tools.idea.gradle.project.GradleProjectImporter;
-import com.android.tools.idea.gradle.util.GradleUtil;
-import com.android.tools.idea.templates.Template;
-import com.android.tools.idea.templates.TemplateMetadata;
-import com.android.tools.idea.wizard.NewModuleWizardState;
-import com.android.tools.idea.wizard.NewProjectWizardState;
-import com.android.tools.idea.wizard.TemplateWizard;
-
-import com.google.common.io.Files;
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.io.FileUtil;
-import com.intellij.util.PathUtil;
-
-import org.jetbrains.android.sdk.AndroidPlatform;
-import org.jetbrains.android.sdk.AndroidSdkUtils;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-/**
- * Generator for the sample that deals with the Android Library module
- */
-public class AndroidGradleGcmLibGenerator {
-
- protected final Project myProject;
- protected final Module myAndroidModule;
- protected final Module myAppEngineModule;
- protected final String myProjectNumber;
- protected final String myRootPackage;
- protected final String myLibModuleName;
- protected final File myLibModuleRoot;
- protected AppEngineMavenProject myAppEngineMavenProject;
-
- private static final String SDK_TEMPLATES = "sdktemplates";
- private static final String GCM_ACTIVITY = "GcmActivity";
- private static final String MESSAGE_ENDPOINT_API_NAME = "messageEndpoint";
- private static final String DEVICE_INFO_ENDPOINTS_API_NAME = "deviceinfoendpoint";
- private static final String TEMPLATE_DEVICE_INFO_ENDPOINT = "deviceInfoEndpointImport";
- private static final String TEMPLATE_DEVICE_INFO = "deviceInfoImport";
- private static final String TEMPLATE_MESSAGE_ENDPOINT = "messageEndpointImport";
- private static final String TEMPLATE_MESSAGE_DATA = "messageDataImport";
- private static final String TEMPLATE_COLLECTION_RESPONSE_MESSAGE_DATA = "collectionResponseMessageDataImport";
- private static final String TEMPLATE_PROJECT_NUMBER = "gcmProjectNumber";
- private static final String DEFAULT_IMPORT_PATH = "com.unknown";
-
- private static final Logger LOG = Logger.getInstance(AndroidGradleGcmLibGenerator.class);
-
- /**
- *
- * @param project
- * The IDEA/Studio project
- * @param androidModule
- * An android module that will use this gcm library module
- * @param appEngineModule
- * The connected App Engine module from which this will get client libs from
- * @param rootPackage
- * The root java package that will be used here
- * @param projectNumber
- * A cloud console project number (for GCM), can be empty, but not null
- */
- public AndroidGradleGcmLibGenerator(@NotNull Project project, @NotNull Module androidModule, @NotNull Module appEngineModule,
- @NotNull String rootPackage, @NotNull String projectNumber) {
- myProject = project;
- myAndroidModule = androidModule;
- myAppEngineModule = appEngineModule;
- myProjectNumber = projectNumber;
- myRootPackage = rootPackage;
- myLibModuleName = myAndroidModule.getName() + GctConstants.ANDROID_GCM_LIB_MODULE_SUFFIX;
- myLibModuleRoot = new File(myProject.getBasePath(), myLibModuleName);
- }
-
- /** Generate an Android Library module for the Cloud Backend Sample*/
- public void generate(@Nullable final Callback callback) {
-
- if (myLibModuleRoot.exists()) {
- logAndCallbackFailure("Android library module " + myLibModuleName + " already exists", null, callback);
- return;
- }
- else {
- myLibModuleRoot.mkdirs();
- }
-
- myAppEngineMavenProject = AppEngineMavenProject.get(myAppEngineModule);
- if (myAppEngineMavenProject == null) {
- logAndCallbackFailure("Could not find maven project in App Engine module", null, callback);
- return;
- }
-
- File templateDir;
- if ((templateDir = findTemplate()) == null) {
- // this should not be reached
- logAndCallbackFailure("Failed to find template, your plugin installation may be corrupt", null, callback);
- return;
- }
-
- final Template t = Template.createFromPath(templateDir);
-
- try {
- final Map<String, Object> templateReplacementMap = buildReplacementMap(t);
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
- @Override
- public void run() {
- t.render(myLibModuleRoot, myLibModuleRoot, templateReplacementMap);
- }
- });
- } catch (IOException e) {
- logAndCallbackFailure("Unable to find source files for sample client libraries under "
- + GctConstants.APP_ENGINE_GENERATED_LIB_DIR, null, callback);
- return;
- }
-
- try {
- copyGcmJar();
- } catch (IOException e) {
- logAndCallbackFailure("Unable to find source files for sample client libraries under "
- + GctConstants.APP_ENGINE_GENERATED_LIB_DIR, e, callback);
- return;
- }
-
- myAppEngineMavenProject.copyExpandedSources(myLibModuleRoot);
-
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
- @Override
- public void run() {
- try {
- GradleProjectImporter.getInstance().reImportProject(myProject, new GradleProjectImporter.Callback() {
- @Override
- public void projectImported(@NotNull Project project) {
- // I don't see how this can fail, but perhaps after the project is imported, the module could not exists?
- Module androidLibModule = ModuleManager.getInstance(project).findModuleByName(myLibModuleName);
- if(androidLibModule == null) {
- logAndCallbackFailure("Could not find Android Gcm Lib module after import, perhaps a sync is required", null, callback);
- return;
- }
- if (callback != null) {
- callback.moduleCreated(androidLibModule);
- }
- }
-
- @Override
- public void importFailed(@NotNull Project project, @NotNull String errorMessage) {
- logAndCallbackFailure("Import of Android Gcm library failed : " + errorMessage, null, callback);
- }
- });
- }
- catch (ConfigurationException e) {
- logAndCallbackFailure("Configuration exception when re-importing Android Gcm Module project", e, callback);
- }
- }
- });
- }
-
- @Nullable
- private static File findTemplate() {
- File jarPath = new File(PathUtil.getJarPathForClass(AndroidGradleGcmLibGenerator.class));
- if (jarPath.isFile()) {
- jarPath = jarPath.getParentFile();
- }
-
- File localTemplateDir = new File(jarPath, SDK_TEMPLATES);
- File blankLibraryTemplateDir = new File(localTemplateDir, GCM_ACTIVITY);
-
- if(blankLibraryTemplateDir.exists()) {
- return blankLibraryTemplateDir;
- }
- return null;
- }
-
- // TODO: this should be converted to import/check for play services at some point
- private void copyGcmJar() throws IOException {
- // grab gcm.jar from Android SDK extras
- File gcmJar = new File(AndroidSdkUtils.tryToChooseAndroidSdk().getLocation() + GctConstants.ANDROID_SDK_GCM_PATH);
- File androidLibModuleLibsFolder = new File(myLibModuleRoot, SdkConstants.LIBS_FOLDER);
- if(!androidLibModuleLibsFolder.exists()) {
- androidLibModuleLibsFolder.mkdirs();
- }
- File targetGcmJar = new File(androidLibModuleLibsFolder, "gcm.jar");
-
- Files.copy(gcmJar, targetGcmJar);
- }
-
- @NotNull
- private Map<String, Object> buildReplacementMap(@NotNull Template loadedTemplate) throws IOException {
-
- Map<String, Object> nameToObjMap = new HashMap<String, Object>();
-
- Map<String, String> clientLibBasedReplacements = buildReplacementsBasedOnGeneratedEndpointLibs();
-
- nameToObjMap.putAll(clientLibBasedReplacements);
-
- nameToObjMap.put(NewModuleWizardState.ATTR_PROJECT_LOCATION, myProject.getBasePath());
-
- // All of these hardcoded values can be implied from the master Android module
- //nameToObjMap.put(TemplateMetadata.ATTR_IS_NEW_PROJECT, false);
- nameToObjMap.put(TemplateMetadata.ATTR_IS_GRADLE, "true");
- nameToObjMap.put(TemplateMetadata.ATTR_GRADLE_PLUGIN_VERSION, GradleUtil.GRADLE_PLUGIN_LATEST_VERSION);
- nameToObjMap.put(TemplateMetadata.ATTR_CREATE_ICONS, false);
- nameToObjMap.put(TemplateMetadata.ATTR_IS_LIBRARY_MODULE, true);
- nameToObjMap.put(NewModuleWizardState.ATTR_CREATE_ACTIVITY, false);
-
- // get the latest build tool, like the NewModuleWizard
- BuildToolInfo buildTool = AndroidSdkUtils.tryToChooseAndroidSdk().getLatestBuildTool();
- if (buildTool != null) {
- // If buildTool is null, the template will use buildApi instead, which might be good enough.
- nameToObjMap.put(TemplateMetadata.ATTR_BUILD_TOOLS_VERSION, buildTool.getRevision().toString());
- }
-
- // Set the buildApi to the parent Android Module Build Api
- AndroidPlatform platform = AndroidPlatform.getInstance(myAndroidModule);
- nameToObjMap.put(TemplateMetadata.ATTR_BUILD_API, platform.getTarget().getVersion().getApiLevel());
-
- nameToObjMap.put(TemplateMetadata.ATTR_PACKAGE_NAME, myRootPackage);
-
- // Convert these values to ints
- convertToInt(nameToObjMap, loadedTemplate, TemplateMetadata.ATTR_MIN_API);
- convertToInt(nameToObjMap, loadedTemplate, TemplateMetadata.ATTR_MIN_API_LEVEL);
- convertToInt(nameToObjMap, loadedTemplate, TemplateMetadata.ATTR_TARGET_API);
-
- File mainFlavorSourceRoot = new File(myLibModuleRoot, TemplateWizard.MAIN_FLAVOR_SOURCE_PATH);
- File javaSourceRoot = new File(mainFlavorSourceRoot, TemplateWizard.JAVA_SOURCE_PATH);
- File javaSourcePackageRoot = new File(javaSourceRoot, myRootPackage.replace('.', '/'));
- File resourceSourceRoot = new File(mainFlavorSourceRoot, TemplateWizard.RESOURCE_SOURCE_PATH);
-
- nameToObjMap.put(NewProjectWizardState.ATTR_MODULE_NAME, myLibModuleRoot.getName());
- //nameToObjMap.put(TemplateMetadata.ATTR_PROJECT_OUT, moduleRoot.getPath());
- nameToObjMap.put(TemplateMetadata.ATTR_MANIFEST_OUT, mainFlavorSourceRoot.getPath());
- nameToObjMap.put(TemplateMetadata.ATTR_SRC_OUT, javaSourcePackageRoot.getPath());
- nameToObjMap.put(TemplateMetadata.ATTR_RES_OUT, resourceSourceRoot.getPath());
- nameToObjMap.put(TemplateMetadata.ATTR_TOP_OUT, myProject.getBasePath());
-
-
- String mavenUrl = System.getProperty("android.mavenRepoUrl");
- if (mavenUrl != null) {
- nameToObjMap.put(TemplateMetadata.ATTR_MAVEN_URL, mavenUrl);
- }
-
-
- return nameToObjMap;
- }
-
- @NotNull
- private Map<String, String> buildReplacementsBasedOnGeneratedEndpointLibs() throws IOException {
- Map<String, String> paramMap = new HashMap<String, String>();
-
- File deviceinfoEndpointSrcFolder = myAppEngineMavenProject.expandClientLibrary(DEVICE_INFO_ENDPOINTS_API_NAME);
-
- File messageEndpointsSrcFolder = myAppEngineMavenProject.expandClientLibrary(MESSAGE_ENDPOINT_API_NAME);
-
- paramMap.put(TEMPLATE_PROJECT_NUMBER, myProjectNumber);
-
- paramMap.put(TEMPLATE_DEVICE_INFO, getImportPathForClass(deviceinfoEndpointSrcFolder, "DeviceInfo.java"));
- paramMap.put(TEMPLATE_DEVICE_INFO_ENDPOINT, getImportPathForClass(deviceinfoEndpointSrcFolder, "Deviceinfoendpoint.java"));
-
- paramMap.put(TEMPLATE_MESSAGE_DATA, getImportPathForClass(messageEndpointsSrcFolder, "MessageData.java"));
- paramMap.put(TEMPLATE_MESSAGE_ENDPOINT, getImportPathForClass(messageEndpointsSrcFolder, "MessageEndpoint.java"));
- paramMap.put(TEMPLATE_COLLECTION_RESPONSE_MESSAGE_DATA,
- getImportPathForClass(messageEndpointsSrcFolder, "CollectionResponseMessageData.java"));
-
- return paramMap;
- }
-
- @NotNull
- private static String getImportPathForClass(@NotNull File srcRootDir, @NotNull String classFileName) {
- Pattern p = Pattern.compile(classFileName);
-
- List<File> matchingClassFiles = FileUtil.findFilesByMask(p, srcRootDir);
-
- if (matchingClassFiles.size() == 0) {
- return DEFAULT_IMPORT_PATH;
- }
- String importPath = FileUtil.getRelativePath(srcRootDir, matchingClassFiles.get(0)).replace(File.separatorChar, '.');
-
- if (importPath == null) {
- return DEFAULT_IMPORT_PATH;
- }
-
- int indexOfJavaSuffix = importPath.lastIndexOf(".java");
- if (indexOfJavaSuffix < 0) {
- return DEFAULT_IMPORT_PATH;
- }
-
- return importPath.substring(0, indexOfJavaSuffix);
- }
-
- private static void convertToInt(Map<String, Object> nameToObjMap, Template loadedTemplate, String attrName) {
- String strVal = loadedTemplate.getMetadata().getParameter(attrName).initial;
- if (strVal == null) {
- return;
- }
-
- try {
- int intVal = Integer.parseInt(strVal);
- nameToObjMap.put(attrName, intVal);
- }
- catch (NumberFormatException nfe) {
- LOG.error("Template generation error", nfe);
- }
- }
-
- private static void logAndCallbackFailure(@NotNull String message, @Nullable Throwable t, @Nullable Callback callback) {
- if(t == null) {
- LOG.error(message);
- }
- else {
- LOG.error(message, t);
- }
- if (callback != null) {
- callback.onFailure(message);
- }
- }
-
- /** Callback because this generator module makes some asynchronous calls */
- public static interface Callback {
- /** There are no guarantees on what thread this will return */
- void moduleCreated(Module androidLibModule);
- /** There are no guarantees on what thread this will return */
- void onFailure(String errorMessage);
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/sample/AppEngineMavenGcmGenerator.java b/src/com/google/gct/intellij/endpoints/generator/sample/AppEngineMavenGcmGenerator.java
deleted file mode 100644
index 9d56274..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/sample/AppEngineMavenGcmGenerator.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.generator.sample;
-
-import com.google.common.io.Files;
-import com.google.common.io.Resources;
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.generator.AppEngineMavenGenerator;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-import com.google.gct.intellij.endpoints.generator.template.TemplateHelper;
-import com.google.gct.intellij.endpoints.util.PsiUtils;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.options.ConfigurationException;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.ThrowableComputable;
-import com.intellij.openapi.vfs.LocalFileSystem;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.*;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.idea.maven.project.MavenProjectsManager;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Arrays;
-
-/**
- * Instance of AppEngineMavenGenerator that creates an AppEngine sample specifically and only for
- * the GCM sample project (CloudBackendGenerator)
- */
-public class AppEngineMavenGcmGenerator extends AppEngineMavenGenerator {
-
- protected final String myAppId;
- protected final String myApiKey;
-
- public static final String[] SAMPLE_ENTITY_NAMES = {"DeviceInfo", "MessageData"};
- public static final String[] SAMPLE_ENDPOINTS_NAMES = {"DeviceInfoEndpoint", "MessageEndpoint"};
- public static final String[] SAMPLE_API_NAMES = {"deviceinfoendpoint", "messageEndpoint"};
-
- private static final Logger LOG = Logger.getInstance(AppEngineMavenGcmGenerator.class);
-
- /**
- *
- * @param project
- * The IDEA/Studio project
- * @param moduleName
- * The name of the AppEngine module
- * @param rootPackage
- * The root java package that will be the base package of this module
- * @param apiKey
- * A cloud console API key (for endpoints)
- * @param appId
- * A app engine appID (for general app engine functionality)
- */
- public AppEngineMavenGcmGenerator(@NotNull Project project, @NotNull String moduleName, @NotNull String rootPackage,
- @NotNull String apiKey, @NotNull String appId) {
- super(project, moduleName, rootPackage);
- myApiKey = apiKey;
- myAppId = appId;
- }
-
- /** Generate a Maven App Engine module as a backend for the Cloud Backend Sample */
- @Override
- public void generate(@Nullable final Callback callback) {
- try {
- createAppEngineDirStructure();
- } catch (IOException e) {
- logAndCallbackFailure("IOException when trying to create App Engine module directory structure", e, callback);
- return;
- }
-
- try {
- addAppEngineSampleCode(myRootPackage, myAppId, myApiKey);
- }
- catch (IOException e) {
- logAndCallbackFailure("IOException when trying to add App Engine sample code", e, callback);
- return;
- }
-
- try {
- addMavenFunctionality();
- }
- catch (IOException e) {
- logAndCallbackFailure("IOException when trying to add Maven functionality to App Engine module", e, callback);
- return;
- }
- catch (ConfigurationException e) {
- logAndCallbackFailure("Configuration exception when trying import App Engine Maven project", e, callback);
- return;
- }
-
- try {
- addGradleRequirements();
- }
- catch (IOException e) {
- logAndCallbackFailure("Failed to add build.gradle file", e, callback);
- return;
- }
-
- // We need to invoke later to ensure the maven module is imported fully and searchable
- // TODO : we are waiting earlier for the maven Import, it is worth taking a look at the necessity of this invokeLater
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- @Override
- public void run() {
- // Needed to call this here instead of immediately after addMavenFunctionality to prevent
- // the UI from hanging
- waitForMavenImport();
- myModule = ModuleManager.getInstance(myProject).findModuleByName(myModuleName);
-
-
- final AppEngineMavenProject mavenProject = AppEngineMavenProject.get(myModule);
- if(mavenProject != null) {
- mavenProject.runGenClientLibraries(new AppEngineMavenProject.MavenBuildCallback() {
- @Override
- public void onBuildCompleted(int resultCode, String text) {
- if(resultCode == 0) {
- try {
- for (String apiName : SAMPLE_API_NAMES) {
- mavenProject.expandClientLibrary(apiName);
- }
- }
- catch (IOException e) {
- logAndCallbackFailure("IOException when expanding client library source folders", e, callback);
- return;
- }
- if(callback != null) {
- callback.moduleCreated(myModule);
- return;
- }
- }
- if (callback != null) {
- logAndCallbackFailure("Maven build failed : (result code " + resultCode + ") " + text, null, callback);
- return;
- }
- }
- });
- }
- else {
- if (callback != null) {
- logAndCallbackFailure("App Engine module failed to import maven functionality", null, callback);
- return;
- }
- }
- }
- });
- // careful not add any code here, the code above makes some assumptions about code flow that means no non-conditional code is
- // executed
- }
-
- /** Pull in appEngineSampleCode from somewhere, right now it's the in-plugin templating, but maybe this whole things changes */
- protected void addAppEngineSampleCode(final String rootPackage, final String appId, final String apiKey) throws IOException {
-
- ApplicationManager.getApplication().runWriteAction(new ThrowableComputable<Void, IOException>() {
- @Override
- public Void compute() throws IOException {
- LocalFileSystem fs = LocalFileSystem.getInstance();
- PsiManager psiManager = PsiManager.getInstance(myProject);
- PsiDirectory moduleRootDir = psiManager.findDirectory(myModuleRootDir);
- PsiDirectory javaSrcDirectory = psiManager.findDirectory(myModuleRootDir.findFileByRelativePath("src/main/java"));
- PsiDirectory resourcesDirectory = psiManager.findDirectory(myModuleRootDir.findFileByRelativePath("src/main/resources"));
- PsiDirectory webappDirectory = psiManager.findDirectory(myModuleRootDir.findFileByRelativePath("src/main/webapp"));
-
- // Create package directory
- PsiDirectory curPackageDir = javaSrcDirectory;
- for (String packageComponent : rootPackage.split("\\.")) {
- curPackageDir = curPackageDir.createSubdirectory(packageComponent);
- }
-
- // Add entity manager
- curPackageDir.add(TemplateHelper.loadJpaEntityManagerFactoryClass(myProject, rootPackage));
-
- TemplateHelper.EndpointPackageInfo endpointPackageInfo = TemplateHelper.getEndpointPackageInfo(rootPackage);
-
- // Add entities
- for (String entityName : SAMPLE_ENTITY_NAMES) {
- curPackageDir
- .add(TemplateHelper.generateJavaTemplateContentWithOwnerDomain(myProject, entityName, rootPackage, endpointPackageInfo));
- }
-
- // Add endpoints
- for (String endpointName : SAMPLE_ENDPOINTS_NAMES) {
- PsiElement addedEndpoint = curPackageDir.add(TemplateHelper
- .generateJavaSampleTemplateWithOwnerDomainAndApiKey(myProject, endpointName,
- rootPackage,
- endpointPackageInfo, apiKey));
- PsiDocumentManager docManager = PsiDocumentManager.getInstance(myProject);
- docManager.doPostponedOperationsAndUnblockDocument(docManager.getDocument((PsiFile) addedEndpoint));
- }
-
- // Add/replace persistence.xml
- final PsiDirectory metaInfDir = resourcesDirectory.findSubdirectory(GctConstants.APP_ENGINE_META_INF_DIR);
- PsiUtils.addOrReplaceFile(metaInfDir, TemplateHelper.loadPersistenceXml(myProject));
-
- // Add static content
-
- // css
- PsiDirectory cssDir = webappDirectory.createSubdirectory(GctConstants.APP_ENGINE_CSS_DIR);
- cssDir.add(TemplateHelper.generateStaticContent(myProject, "bootstrap.min.css"));
-
- // js
- PsiDirectory jsDir = webappDirectory.createSubdirectory(GctConstants.APP_ENGINE_JS_DIR);
- jsDir.add(TemplateHelper.generateStaticContent(myProject, "bootstrap.min.js"));
- jsDir.add(TemplateHelper.generateStaticContent(myProject, "jquery-1.9.0.min.js"));
-
- // images (to support twitter bootstrap)
- VirtualFile moduleImgDir = webappDirectory.getVirtualFile().createChildDirectory(null, GctConstants.APP_ENGINE_IMG_DIR);
- File img = new File(moduleImgDir.getPath() + "/glyphicons-halflings.png");
- Files.write(Resources.toByteArray(TemplateHelper.class.getResource("glyphicons-halflings.png")), img);
-
- img = new File(moduleImgDir.getPath() + "/glyphicons-halflings-white.png");
- Files.write(Resources.toByteArray(TemplateHelper.class.getResource("glyphicons-halflings-white.png")), img);
- moduleImgDir.refresh(false, true);
-
- // xml
- PsiDirectory webInfDirectory = webappDirectory.createSubdirectory(GctConstants.APP_ENGINE_WEB_INF_DIR);
- webInfDirectory.add(TemplateHelper.loadWebXml(myProject));
- webInfDirectory.add(TemplateHelper.generateAppEngineWebXml(myProject, appId));
-
- // html
- webappDirectory.add(TemplateHelper.generateStaticContent(myProject, "index.html"));
- return null; // to Void
- }
- });
- }
-
- /** Add a build.gradle so the IDE doesn't complain like a nut, this may not be necessary
- * must be run on the event dispatch thread */
- private void addGradleRequirements() throws IOException {
- PsiManager psiManager = PsiManager.getInstance(myProject);
- final PsiDirectory moduleDirectory = psiManager.findDirectory(myModuleRootDir);
- if(moduleDirectory == null) {
- // not sure this is a reachable error because the maven project get root directory has got to exist
- throw new FileNotFoundException("Could not find App Engine maven project root directory");
- }
- final PsiFile gradlebuildFile = TemplateHelper.loadGradleBuildFile(myProject);
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
- @Override
- public void run() {
- moduleDirectory.add(gradlebuildFile);
- }
- });
- }
-
- private static void logAndCallbackFailure(String message, @Nullable Throwable t, @Nullable Callback callback) {
- if(t == null) {
- LOG.error(message);
- }
- else {
- LOG.error(message, t);
- }
- if (callback != null) {
- callback.onFailure(message);
- }
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/sample/CloudBackendGenerator.java b/src/com/google/gct/intellij/endpoints/generator/sample/CloudBackendGenerator.java
deleted file mode 100644
index 15f6aec..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/sample/CloudBackendGenerator.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.generator.sample;
-
-import com.android.tools.idea.model.ManifestInfo;
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.generator.AppEngineMavenGenerator;
-import com.google.gct.intellij.endpoints.project.AppEngineMavenProject;
-import com.google.gct.intellij.endpoints.action.ui.GenerateBackendDialog;
-import com.google.gct.intellij.endpoints.util.VfsUtils;
-import com.google.gct.intellij.endpoints.util.GradleUtils;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.PsiManager;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-/**
- * Create a backend for an android project (AppEngine backend + Android library module as client)
- */
-public class CloudBackendGenerator {
-
- private final Project myProject;
- private final Module myAndroidModule;
- private final GenerateBackendDialog myGenerateBackendDialog;
- private AppEngineMavenProject myAppEngineMavenProject;
-
- /** set in AppEngineMavenGeneratorCallback */
- private Module myAppEngineModule;
-
- /** set in AndroidGradleGcmLibGeneratorCallback */
- private Module myAndroidGcmLibModule;
-
- private static final Logger LOG = Logger.getInstance(CloudBackendGenerator.class);
-
- /**
- * @param project
- * The IDEA/Studio project
- * @param androidModule
- * A main android module
- * @param generateBackendDialog
- * The dialog used to extract api key, project num and app Id
- */
- public CloudBackendGenerator(@NotNull Project project, @NotNull Module androidModule,
- @NotNull GenerateBackendDialog generateBackendDialog) {
- myProject = project;
- myAndroidModule = androidModule;
- myGenerateBackendDialog = generateBackendDialog;
- }
-
- /**
- * Will generate a full cloud backend with an App Engine part (backend) and an Android library module (frontend) and add
- * in the required gradle hooks to build
- *
- * This is expected to be initiated on an event dispatch thread and will sequentially create the sample using a
- * series of callback
- * {@link AppEngineMavenGeneratorCallback}
- * {@link MavenBuilderCallback}
- * {@link RefreshCallback}
- * {@link AndroidGradleGcmLibGeneratorCallback}
- *
- * @param callback
- * Callback when the generation is finished/failed
- */
- public void generate(@Nullable final Callback callback) {
- new AppEngineMavenGcmGenerator(myProject, getAppEngineModuleName(), getRootPackage(), myGenerateBackendDialog.getApiKey(),
- myGenerateBackendDialog.getAppId()).generate(new AppEngineMavenGeneratorCallback(callback));
- }
-
-
- private String getAppEngineModuleName() {
- return myAndroidModule.getName() + GctConstants.APP_ENGINE_MODULE_SUFFIX;
- }
-
- @Nullable
- private String getRootPackage() {
- ManifestInfo manifestInfo = ManifestInfo.get(myAndroidModule);
- String rootPackage = manifestInfo.getPackage();
- return (rootPackage.trim().isEmpty()) ? null : rootPackage;
- }
-
- private class AppEngineMavenGeneratorCallback implements AppEngineMavenGenerator.Callback {
- private final Callback myRootCallback;
- public AppEngineMavenGeneratorCallback(@Nullable Callback callback) {
- myRootCallback = callback;
- }
- @Override
- public void moduleCreated(final Module appEngineModule) {
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- @Override
- public void run() {
- myAppEngineModule = appEngineModule;
- myAppEngineMavenProject = AppEngineMavenProject.get(appEngineModule);
- if (myAppEngineMavenProject != null) {
- myAppEngineMavenProject.runGenClientLibraries(new MavenBuilderCallback(myRootCallback));
- }
- }
- });
- }
- @Override
- public void onFailure(String errorMessage) {
- logAndCallbackFailure("Failed when creating the App Engine Maven module because : " + errorMessage, null, myRootCallback);
- }
- }
-
- private class MavenBuilderCallback implements AppEngineMavenProject.MavenBuildCallback {
- private final Callback myRootCallback;
- public MavenBuilderCallback(@Nullable Callback callback) {
- myRootCallback = callback;
- }
- @Override
- public void onBuildCompleted(int resultCode, String text) {
- if (resultCode == 0) {
- try {
- myAppEngineMavenProject.refreshExpandedSourceDir(true, new RefreshCallback(myRootCallback));
- } catch (FileNotFoundException e) {
- logAndCallbackFailure("Failed to refresh " + GctConstants.APP_ENGINE_GENERATED_LIB_DIR + " directory", e, myRootCallback);
- return;
- }
- }
- else {
- logAndCallbackFailure("Maven build failed with code '" + resultCode + "' and message : " + text, null, myRootCallback);
- return;
- }
- }
- }
-
- private class RefreshCallback implements Runnable {
- private final Callback myRootCallback;
- public RefreshCallback(@Nullable Callback callback) {
- myRootCallback = callback;
- }
- @Override
- public void run() {
- new AndroidGradleGcmLibGenerator(myProject, myAndroidModule, myAppEngineModule, getRootPackage(),
- myGenerateBackendDialog.getProjectNumber())
- .generate(new AndroidGradleGcmLibGeneratorCallback(myRootCallback));
- }
- }
-
- private class AndroidGradleGcmLibGeneratorCallback implements AndroidGradleGcmLibGenerator.Callback {
- private final Callback myRootCallback;
- public AndroidGradleGcmLibGeneratorCallback(@Nullable Callback callback) {
- myRootCallback = callback;
- }
-
- @Override
- public void moduleCreated(Module androidLibModule) {
- try {
- myAndroidGcmLibModule = androidLibModule;
- addGradleHooks();
- } catch(IOException e) {
- // this is a non-catastrophic failure, perhaps we shouldn't fail here?
- logAndCallbackFailure("Failed to add Gcm module dependency to Android module, you may be able to do this yourself",
- e, myRootCallback);
- return;
- }
- if(myRootCallback != null) {
- myRootCallback.backendCreated(androidLibModule, myAppEngineModule);
- }
- }
-
- @Override
- public void onFailure(String errorMessage) {
- logAndCallbackFailure("Failed during generation of Android library module : ", null, myRootCallback);
- }
- }
-
- private void addGradleHooks() throws IOException {
-
- VirtualFile buildGradleVFile = VfsUtils.findFileUnderContentRoots(myAndroidModule, "build.gradle");
- if(buildGradleVFile == null) {
- throw new FileNotFoundException("Could not find build.gradle file");
- }
- final GroovyFile buildGradlePsiFile = (GroovyFile) PsiManager.getInstance(myProject).findFile(buildGradleVFile);
- if(buildGradlePsiFile == null) {
- throw new FileNotFoundException("Could not find build.gradle file");
- }
-
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
- @Override
- public void run() {
- // update the main android module's build.gradle with mavenCentral() because something is off with dependency management
- // and add in the newly created android library module as a dependency
- GradleUtils.addRepository(myProject, buildGradlePsiFile, GradleUtils.REPO_MAVEN_CENTRAL);
- GradleUtils.addDependency(myProject, buildGradlePsiFile, String
- .format(GradleUtils.DEPENDENCY_COMPILE, myAndroidGcmLibModule.getName()));
- }
- });
- }
-
- private static void logAndCallbackFailure(@NotNull String message, @Nullable Throwable t, @Nullable Callback callback) {
- if(t == null) {
- LOG.error(message);
- }
- else {
- LOG.error(message, t);
- }
- if (callback != null) {
- callback.onFailure(message);
- }
- }
-
- /** callback to when the project is done creating */
- public interface Callback {
- /**
- * No guarantees on the type of thread this will return on
- * @param androidLibModule
- * The newly created Android Library module
- * @param appEngineModule
- * The newly created App Engine module
- */
- void backendCreated(@NotNull Module androidLibModule, @NotNull Module appEngineModule);
-
- /**
- * Called on generation failure
- * No guarantees on the type of thread this will return on
- */
- void onFailure(String errorMessage);
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfo.java.template b/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfo.java.template
deleted file mode 100644
index ebf3e53..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfo.java.template
+++ /dev/null
@@ -1,70 +0,0 @@
-package @PackageName@;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * An entity for Android device information.
- *
- * Its associated endpoint, DeviceInfoEndpoint.java, was directly generated from
- * this class - the Google Plugin for Eclipse allows you to generate endpoints
- * directly from entities!
- *
- * DeviceInfoEndpoint.java will be used for registering devices with this App
- * Engine application. Registered devices will receive messages broadcast by
- * this application over Google Cloud Messaging (GCM). If you'd like to take a
- * look at the broadcasting code, check out MessageEndpoint.java.
- *
- * For more information, see
- * http://developers.google.com/eclipse/docs/cloud_endpoints.
- *
- * NOTE: This DeviceInfoEndpoint.java does not use any form of authorization or
- * authentication! If this app is deployed, anyone can access this endpoint! If
- * you'd like to add authentication, take a look at the documentation.
- */
-@Entity
-// DeviceInfoEndpoint has NO AUTHENTICATION - it is an OPEN ENDPOINT!
-public class DeviceInfo {
-
- /*
- * The Google Cloud Messaging registration token for the device. This token
- * indicates that the device is able to receive messages sent via GCM.
- */
- @Id
- private String deviceRegistrationID;
-
- /*
- * Some identifying information about the device, such as its manufacturer
- * and product name.
- */
- private String deviceInformation;
-
- /*
- * Timestamp indicating when this device registered with the application.
- */
- private long timestamp;
-
- public String getDeviceRegistrationID() {
- return deviceRegistrationID;
- }
-
- public String getDeviceInformation() {
- return this.deviceInformation;
- }
-
- public void setDeviceRegistrationID(String deviceRegistrationID) {
- this.deviceRegistrationID = deviceRegistrationID;
- }
-
- public void setDeviceInformation(String deviceInformation) {
- this.deviceInformation = deviceInformation;
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(long timestamp) {
- this.timestamp = timestamp;
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfoEndpoint.java.template b/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfoEndpoint.java.template
deleted file mode 100644
index 8b6e686..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/DeviceInfoEndpoint.java.template
+++ /dev/null
@@ -1,173 +0,0 @@
-package @PackageName@;
-
-import @PackageName@.EMF;
-
-import com.google.api.server.spi.config.Api;
-import com.google.api.server.spi.config.ApiMethod;
-import com.google.api.server.spi.config.ApiNamespace;
-import com.google.api.server.spi.response.CollectionResponse;
-import com.google.appengine.api.datastore.Cursor;
-import com.google.appengine.datanucleus.query.JPACursorHelper;
-
-import java.util.List;
-
-import javax.annotation.Nullable;
-import javax.inject.Named;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityNotFoundException;
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-@Api(name = "deviceinfoendpoint", namespace = @ApiNamespace(ownerDomain = "@EndpointOwnerDomain@", ownerName = "@EndpointOwnerDomain@", packagePath="@EndpointPackagePath@"))
-public class DeviceInfoEndpoint {
-
- /**
- * This method lists all the entities inserted in datastore.
- * It uses HTTP GET method and paging support.
- *
- * @return A CollectionResponse class containing the list of all entities
- * persisted and a cursor to the next page.
- */
- @SuppressWarnings({ "unchecked", "unused" })
- @ApiMethod(name = "listDeviceInfo")
- public CollectionResponse<DeviceInfo> listDeviceInfo(
- @Nullable @Named("cursor") String cursorString,
- @Nullable @Named("limit") Integer limit) {
-
- EntityManager mgr = null;
- Cursor cursor = null;
- List<DeviceInfo> execute = null;
-
- try {
- mgr = getEntityManager();
- Query query = mgr
- .createQuery("select from DeviceInfo as DeviceInfo");
- if (cursorString != null && cursorString != "") {
- cursor = Cursor.fromWebSafeString(cursorString);
- query.setHint(JPACursorHelper.CURSOR_HINT, cursor);
- }
-
- if (limit != null) {
- query.setFirstResult(0);
- query.setMaxResults(limit);
- }
-
- execute = (List<DeviceInfo>) query.getResultList();
- cursor = JPACursorHelper.getCursor(execute);
- if (cursor != null)
- cursorString = cursor.toWebSafeString();
-
- // Tight loop for fetching all entities from datastore and accomodate
- // for lazy fetch.
- for (DeviceInfo obj : execute)
- ;
- } finally {
- mgr.close();
- }
-
- return CollectionResponse.<DeviceInfo> builder().setItems(execute)
- .setNextPageToken(cursorString).build();
- }
-
- /**
- * This method gets the entity having primary key id. It uses HTTP GET method.
- *
- * @param id the primary key of the java bean.
- * @return The entity with primary key id.
- */
- @ApiMethod(name = "getDeviceInfo")
- public DeviceInfo getDeviceInfo(@Named("id") String id) {
- EntityManager mgr = getEntityManager();
- DeviceInfo deviceinfo = null;
- try {
- deviceinfo = mgr.find(DeviceInfo.class, id);
- } finally {
- mgr.close();
- }
- return deviceinfo;
- }
-
- /**
- * This inserts a new entity into App Engine datastore. If the entity already
- * exists in the datastore, an exception is thrown.
- * It uses HTTP POST method.
- *
- * @param deviceinfo the entity to be inserted.
- * @return The inserted entity.
- */
- @ApiMethod(name = "insertDeviceInfo")
- public DeviceInfo insertDeviceInfo(DeviceInfo deviceinfo) {
- EntityManager mgr = getEntityManager();
- try {
- if (containsDeviceInfo(deviceinfo)) {
- throw new EntityExistsException("Object already exists");
- }
- mgr.persist(deviceinfo);
- } finally {
- mgr.close();
- }
- return deviceinfo;
- }
-
- /**
- * This method is used for updating an existing entity. If the entity does not
- * exist in the datastore, an exception is thrown.
- * It uses HTTP PUT method.
- *
- * @param deviceinfo the entity to be updated.
- * @return The updated entity.
- */
- @ApiMethod(name = "updateDeviceInfo")
- public DeviceInfo updateDeviceInfo(DeviceInfo deviceinfo) {
- EntityManager mgr = getEntityManager();
- try {
- if (!containsDeviceInfo(deviceinfo)) {
- throw new EntityNotFoundException("Object does not exist");
- }
- mgr.persist(deviceinfo);
- } finally {
- mgr.close();
- }
- return deviceinfo;
- }
-
- /**
- * This method removes the entity with primary key id.
- * It uses HTTP DELETE method.
- *
- * @param id the primary key of the entity to be deleted.
- * @return The deleted entity.
- */
- @ApiMethod(name = "removeDeviceInfo")
- public DeviceInfo removeDeviceInfo(@Named("id") String id) {
- EntityManager mgr = getEntityManager();
- DeviceInfo deviceinfo = null;
- try {
- deviceinfo = mgr.find(DeviceInfo.class, id);
- mgr.remove(deviceinfo);
- } finally {
- mgr.close();
- }
- return deviceinfo;
- }
-
- private boolean containsDeviceInfo(DeviceInfo deviceinfo) {
- EntityManager mgr = getEntityManager();
- boolean contains = true;
- try {
- DeviceInfo item = mgr.find(DeviceInfo.class,
- deviceinfo.getDeviceRegistrationID());
- if (item == null) {
- contains = false;
- }
- } finally {
- mgr.close();
- }
- return contains;
- }
-
- private static EntityManager getEntityManager() {
- return EMF.get().createEntityManager();
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/JpaSwarmService.java.template b/src/com/google/gct/intellij/endpoints/generator/template/JpaSwarmService.java.template
deleted file mode 100644
index c2df672..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/JpaSwarmService.java.template
+++ /dev/null
@@ -1,171 +0,0 @@
-package @PackageName@;
-
-import com.google.api.server.spi.config.Api;
-import com.google.api.server.spi.config.ApiMethod;
-import com.google.api.server.spi.config.ApiNamespace;
-import com.google.api.server.spi.response.CollectionResponse;
-import com.google.appengine.api.datastore.Cursor;
-import com.google.appengine.datanucleus.query.JPACursorHelper;
-
-import java.util.List;
-
-import javax.annotation.Nullable;
-import javax.inject.Named;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityNotFoundException;
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-@Api(name = "@ApiName@", namespace = @ApiNamespace(ownerDomain = "@EndpointOwnerDomain@", ownerName = "@EndpointOwnerDomain@", packagePath="@EndpointPackagePath@"))
-public class @ServiceName@ {
-
- /**
- * This method lists all the entities inserted in datastore.
- * It uses HTTP GET method and paging support.
- *
- * @return A CollectionResponse class containing the list of all entities
- * persisted and a cursor to the next page.
- */
- @SuppressWarnings({"unchecked", "unused"})
- @ApiMethod(name = "list@EntityName@")
- public CollectionResponse<@EntityName@> list@EntityName@(
- @Nullable @Named("cursor") String cursorString,
- @Nullable @Named("limit") Integer limit) {
-
- EntityManager mgr = null;
- List<@EntityName@> execute = null;
-
- try{
- mgr = getEntityManager();
- Query query = mgr.createQuery("select from @EntityName@ as @EntityName@");
- Cursor cursor;
- if (cursorString != null && cursorString.trim().length() > 0) {
- cursor = Cursor.fromWebSafeString(cursorString);
- query.setHint(JPACursorHelper.CURSOR_HINT, cursor);
- }
-
- if (limit != null) {
- query.setFirstResult(0);
- query.setMaxResults(limit);
- }
-
- execute = (List<@EntityName@>) query.getResultList();
- cursor = JPACursorHelper.getCursor(execute);
- if (cursor != null) cursorString = cursor.toWebSafeString();
-
- // Tight loop for fetching all entities from datastore and accomodate
- // for lazy fetch.
- for (@EntityName@ obj : execute);
- } finally {
- if (mgr != null) {
- mgr.close();
- }
- }
-
- return CollectionResponse.<@EntityName@>builder()
- .setItems(execute)
- .setNextPageToken(cursorString)
- .build();
- }
-
- /**
- * This method gets the entity having primary key id. It uses HTTP GET method.
- *
- * @param id the primary key of the java bean.
- * @return The entity with primary key id.
- */
- @ApiMethod(name = "get@EntityName@")
- public @EntityName@ get@EntityName@(@Named("id") @IdType@ id) {
- EntityManager mgr = getEntityManager();
- @EntityName@ @EntityNameLowerCase@ = null;
- try {
- @EntityNameLowerCase@ = mgr.find(@EntityName@.class, id);
- } finally {
- mgr.close();
- }
- return @EntityNameLowerCase@;
- }
-
- /**
- * This inserts a new entity into App Engine datastore. If the entity already
- * exists in the datastore, an exception is thrown.
- * It uses HTTP POST method.
- *
- * @param @EntityNameLowerCase@ the entity to be inserted.
- * @return The inserted entity.
- */
- @ApiMethod(name = "insert@EntityName@")
- public @EntityName@ insert@EntityName@(@EntityName@ @EntityNameLowerCase@) {
- EntityManager mgr = getEntityManager();
- try {
- if(contains@EntityName@(@EntityNameLowerCase@)) {
- throw new EntityExistsException("Object already exists");
- }
- mgr.persist(@EntityNameLowerCase@);
- } finally {
- mgr.close();
- }
- return @EntityNameLowerCase@;
- }
-
- /**
- * This method is used for updating an existing entity. If the entity does not
- * exist in the datastore, an exception is thrown.
- * It uses HTTP PUT method.
- *
- * @param @EntityNameLowerCase@ the entity to be updated.
- * @return The updated entity.
- */
- @ApiMethod(name = "update@EntityName@")
- public @EntityName@ update@EntityName@(@EntityName@ @EntityNameLowerCase@) {
- EntityManager mgr = getEntityManager();
- try {
- if(!contains@EntityName@(@EntityNameLowerCase@)) {
- throw new EntityNotFoundException("Object does not exist");
- }
- mgr.persist(@EntityNameLowerCase@);
- } finally {
- mgr.close();
- }
- return @EntityNameLowerCase@;
- }
-
- /**
- * This method removes the entity with primary key id.
- * It uses HTTP DELETE method.
- *
- * @param id the primary key of the entity to be deleted.
- * @return The deleted entity.
- */
- @ApiMethod(name = "remove@EntityName@")
- public @EntityName@ remove@EntityName@(@Named("id") @IdType@ id) {
- EntityManager mgr = getEntityManager();
- @EntityName@ @EntityNameLowerCase@ = null;
- try {
- @EntityNameLowerCase@ = mgr.find(@EntityName@.class, id);
- mgr.remove(@EntityNameLowerCase@);
- } finally {
- mgr.close();
- }
- return @EntityNameLowerCase@;
- }
-
- private boolean contains@EntityName@(@EntityName@ @EntityNameLowerCase@) {
- EntityManager mgr = getEntityManager();
- boolean contains = true;
- try {
- @EntityName@ item = mgr.find(@EntityName@.class, @EntityNameLowerCase@.@GetId@());
- if(item == null) {
- contains = false;
- }
- } finally {
- mgr.close();
- }
- return contains;
- }
-
- private static EntityManager getEntityManager() {
- return EMF.get().createEntityManager();
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/ManagerFactoryClass.java.template b/src/com/google/gct/intellij/endpoints/generator/template/ManagerFactoryClass.java.template
deleted file mode 100644
index 92dfeb5..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/ManagerFactoryClass.java.template
+++ /dev/null
@@ -1,16 +0,0 @@
-package @PackageName@;
-
-import @PersistencePackageName1@;
-import @PersistencePackageName2@;
-
-public final class @SwarmFactoryType@ {
- private static final @SwarmType@ManagerFactory INSTANCE =
- @FactoryCreate@("transactions-optional");
-
- private @SwarmFactoryType@() {
- }
-
- public static @SwarmType@ManagerFactory get() {
- return INSTANCE;
- }
-} \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/MessageData.java.template b/src/com/google/gct/intellij/endpoints/generator/template/MessageData.java.template
deleted file mode 100644
index b56c618..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/MessageData.java.template
+++ /dev/null
@@ -1,61 +0,0 @@
-package @PackageName@;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-import com.google.appengine.api.datastore.Key;
-
-/**
- * An entity for messsages sent from the web console to the registered devices
- *
- * Its associated endpoint, MessageEndpoint.java, was NOT automatically generated
- * from this class. While it is easy to generate endpoints automatically, you can
- * write an endpoint manually without generating it. You still need to generate
- * the associated client library from the endpoint when changes are made.
- *
- * For more information on endpoints, see
- * http://developers.google.com/eclipse/docs/cloud_endpoints.
- */
-
-@Entity
-public class MessageData {
-
- /*
- * Autogenerated primary key
- */
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Key key;
-
- /*
- * The text of the message sent
- */
- private String message;
-
- /*
- * Timestamp indicating when this device registered with the application.
- */
- private long timestamp;
-
- public Key getKey() {
- return key;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(long timestamp) {
- this.timestamp = timestamp;
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/MessageEndpoint.java.template b/src/com/google/gct/intellij/endpoints/generator/template/MessageEndpoint.java.template
deleted file mode 100644
index 1c18eab..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/MessageEndpoint.java.template
+++ /dev/null
@@ -1,192 +0,0 @@
-package @PackageName@;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.annotation.Nullable;
-import javax.inject.Named;
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import com.google.android.gcm.server.Constants;
-import com.google.android.gcm.server.Message;
-import com.google.android.gcm.server.Result;
-import com.google.android.gcm.server.Sender;
-import com.google.api.server.spi.config.Api;
-import com.google.api.server.spi.config.ApiMethod;
-import com.google.api.server.spi.config.ApiNamespace;
-import com.google.api.server.spi.response.CollectionResponse;
-import com.google.appengine.api.datastore.Cursor;
-import com.google.appengine.datanucleus.query.JPACursorHelper;
-
-
-/**
- * A simple Cloud Endpoint that receives notifications from a web client
- * (<server url>/index.html), and broadcasts them to all of the devices that
- * were registered with this application (via DeviceInfoEndpoint).
- *
- * In order for this sample to work, you have to populate the API_KEY field with
- * your key for server apps. You can obtain this key from the API console
- * (https://code.google.com/apis/console). You'll first have to create a project
- * and enable the Google Cloud Messaging Service for it, as described in the
- * javadoc for GCMIntentService.java (in your Android project).
- *
- * After creating the project in the API console, browse to the "API Access"
- * section, and select the option to "Create a New Server Key". The generated
- * key is what you'll enter into the API_KEY field.
- *
- * See the documentation at
- * http://developers.google.com/eclipse/docs/cloud_endpoints for more
- * information.
- *
- * NOTE: This endpoint does not use any form of authorization or authentication!
- * If this app is deployed, anyone can access this endpoint! If you'd like to
- * add authentication, take a look at the documentation.
- */
-@Api(name = "messageEndpoint", namespace = @ApiNamespace(ownerDomain = "@EndpointOwnerDomain@", ownerName = "@EndpointOwnerDomain@", packagePath="@EndpointPackagePath@"))
-// NO AUTHENTICATION; OPEN ENDPOINT!
-public class MessageEndpoint {
-
- /*
- * TODO: Fill this in with the server key that you've obtained from the API
- * Console (https://code.google.com/apis/console). This is required for using
- * Google Cloud Messaging from your AppEngine application even if you are
- * using a App Engine's local development server.
- */
- private static final String API_KEY = "@ApiKey@";
-
- private static final DeviceInfoEndpoint endpoint = new DeviceInfoEndpoint();
-
- /**
- * This function returns a list of messages starting with the newest message
- * first and in descending order from there
- *
- * @param cursorString
- * for paging, empty for the first request, subsequent requests can
- * use the returned information from an earlier request to fill this
- * parameter
- * @param limit
- * number of results returned for this query
- * @return
- * A collection of MessageData items
- */
- @SuppressWarnings({ "unchecked", "unused" })
- @ApiMethod(name = "listMessages")
- public CollectionResponse<MessageData> listMessages(
- @Nullable @Named("cursor") String cursorString,
- @Nullable @Named("limit") Integer limit) {
-
- EntityManager mgr = null;
- Cursor cursor = null;
- List<MessageData> execute = null;
-
- try {
- mgr = getEntityManager();
- // query for messages, newest message first
- Query query = mgr
- .createQuery("select from MessageData as MessageData order by timestamp desc");
- if (cursorString != null && cursorString != "") {
- cursor = Cursor.fromWebSafeString(cursorString);
- query.setHint(JPACursorHelper.CURSOR_HINT, cursor);
- }
-
- if (limit != null) {
- query.setFirstResult(0);
- query.setMaxResults(limit);
- }
-
- execute = (List<MessageData>) query.getResultList();
- cursor = JPACursorHelper.getCursor(execute);
- if (cursor != null)
- cursorString = cursor.toWebSafeString();
-
- // Tight loop for fetching all entities from datastore and accomodate
- // for lazy fetch.
- for (MessageData obj : execute) {
- ;
- }
- } finally {
- mgr.close();
- }
-
- return CollectionResponse.<MessageData> builder().setItems(execute)
- .setNextPageToken(cursorString).build();
- }
-
- /**
- * This accepts a message and persists it in the AppEngine datastore, it
- * will also broadcast the message to upto 10 registered android devices
- * via Google Cloud Messaging
- *
- * @param message
- * the entity to be inserted.
- * @return
- * @throws IOException
- */
- @ApiMethod(name = "sendMessage")
- public void sendMessage(@Named("message") String message)
- throws IOException {
- Sender sender = new Sender(API_KEY);
- // create a MessageData entity with a timestamp of when it was
- // received, and persist it
- MessageData messageObj = new MessageData();
- messageObj.setMessage(message);
- messageObj.setTimestamp(System.currentTimeMillis());
- EntityManager mgr = getEntityManager();
- try {
- mgr.persist(messageObj);
- } finally {
- mgr.close();
- }
- // ping a max of 10 registered devices
- CollectionResponse<DeviceInfo> response = endpoint.listDeviceInfo(null,
- 10);
- for (DeviceInfo deviceInfo : response.getItems()) {
- doSendViaGcm(message, sender, deviceInfo);
- }
- }
-
- /**
- * Sends the message using the Sender object to the registered device.
- *
- * @param message
- * the message to be sent in the GCM ping to the device.
- * @param sender
- * the Sender object to be used for ping,
- * @param deviceInfo
- * the registration id of the device.
- * @return Result the result of the ping.
- */
- private static Result doSendViaGcm(String message, Sender sender,
- DeviceInfo deviceInfo) throws IOException {
- // Trim message if needed.
- if (message.length() > 1000) {
- message = message.substring(0, 1000) + "[...]";
- }
-
- // This message object is a Google Cloud Messaging object, it is NOT
- // related to the MessageData class
- Message msg = new Message.Builder().addData("message", message).build();
- Result result = sender.send(msg, deviceInfo.getDeviceRegistrationID(),
- 5);
- if (result.getMessageId() != null) {
- String canonicalRegId = result.getCanonicalRegistrationId();
- if (canonicalRegId != null) {
- endpoint.removeDeviceInfo(deviceInfo.getDeviceRegistrationID());
- deviceInfo.setDeviceRegistrationID(canonicalRegId);
- endpoint.insertDeviceInfo(deviceInfo);
- }
- } else {
- String error = result.getErrorCodeName();
- if (error.equals(Constants.ERROR_NOT_REGISTERED)) {
- endpoint.removeDeviceInfo(deviceInfo.getDeviceRegistrationID());
- }
- }
-
- return result;
- }
-
- private static EntityManager getEntityManager() {
- return EMF.get().createEntityManager();
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/TemplateHelper.java b/src/com/google/gct/intellij/endpoints/generator/template/TemplateHelper.java
deleted file mode 100644
index e8cf866..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/TemplateHelper.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.gct.intellij.endpoints.generator.template;
-
-import com.google.common.base.Charsets;
-import com.google.common.io.Resources;
-import com.google.gct.intellij.endpoints.util.PsiUtils;
-
-import com.intellij.ide.highlighter.JavaFileType;
-import com.intellij.ide.highlighter.XmlFileType;
-import com.intellij.openapi.fileTypes.PlainTextFileType;
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiField;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiJavaFile;
-import com.intellij.psi.util.PropertyUtil;
-
-import java.beans.Introspector;
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * Functionality to help load in templates for AppEngine endpoints module
- */
-public class TemplateHelper {
-
- /**
- * Helper class to track of ownerDomain and packagePath information for a
- * given Cloud Endpoint.
- */
- public static class EndpointPackageInfo {
-
- private final String ownerDomain;
- private final String packagePath;
-
- public EndpointPackageInfo(String ownerDomain, String packagePath) {
- this.ownerDomain = ownerDomain;
- this.packagePath = packagePath;
- }
-
- public String getOwnerDomain() {
- return ownerDomain;
- }
-
- public String getPackagePath() {
- return packagePath;
- }
-
- /**
- * Returns ownerDomain.packagePath, unless ownerDomain is empty. In that
- * case, just ownerDomain is returned.
- */
- @Override
- public String toString() {
- return (packagePath.length() == 0 ? ownerDomain : ownerDomain + "." + packagePath);
- }
- }
-
- /**
- * Given a root package, generates the Cloud Endpoint ownerDomain and
- * packagePath information.
- *
- * If rootPackage is com.foo.bar, then the ownerDomain will be "foo.com", and
- * the packagePath will be "bar".
- *
- * As another example, if the rootPackage is "com.foo.bar.baz", the
- * ownerDomain is still "foo.com", and the packgePath is "bar.baz".
- *
- * In the case where the rootPackage has only two components, packagePath is
- * the empty string.
- *
- * If rootPackage has less than two components, then
- * <code>DEFAULT_PACKAGE_INFO</code> will be returned.
- *
- * @param rootPackage the root package. Cannot be null.
- */
- public static EndpointPackageInfo getEndpointPackageInfo(String rootPackage) {
-
- assert (rootPackage != null);
-
- String[] packageComponents = rootPackage.split("\\.");
-
- String ownerDomain = "";
- String packagePath = "";
-
- if (packageComponents.length < 2) {
- return DEFAULT_PACKAGE_INFO;
- } else {
- ownerDomain = packageComponents[1] + "." + packageComponents[0];
- for (int i = 2; i < packageComponents.length; i++) {
- packagePath += packageComponents[i];
- if (i != packageComponents.length - 1) {
- packagePath += ".";
- }
- }
- }
-
- return new EndpointPackageInfo(ownerDomain, packagePath);
- }
-
- public static final EndpointPackageInfo DEFAULT_PACKAGE_INFO = new EndpointPackageInfo("mycompany.com", "services");
-
- private static final String FILE_TEMPLATE_MANAGER_FACTORY_CLASS = "ManagerFactoryClass.java.template";
- private static final String FILE_TEMPLATE_JPA_SWARM_SERVICE = "JpaSwarmService.java.template";
- private static final String FILE_TEMPLATE_PERSISTENCE_XML = "persistence.xml.template";
- private static final String FILE_TEMPLATE_WEB_XML = "web.xml.template";
- private static final String FILE_TEMPLATE_APPENGINE_WEB_XML = "appengine-web.xml.template";
- private static final String FILE_TEMPLATE_POM_XML = "pom.xml.template";
- private static final String FILE_TEMPLATE_BUILD_GRADLE = "build.gradle.template";
-
- private static final String TEMPLATE_MAVEN_ARTIFACT_NAME = "@MavenArtifactName@";
- private static final String TEMPLATE_APP_ID = "@AppId@";
- private static final String TEMPLATE_API_KEY = "@ApiKey@";
- private static final String TEMPLATE_API_NAME = "@ApiName@";
- private static final String TEMPLATE_ENDPOINT_OWNER_DOMAIN = "@EndpointOwnerDomain@";
- private static final String TEMPLATE_ENDPOINT_PACKAGE_PATH = "@EndpointPackagePath@";
- private static final String TEMPLATE_ENTITY_NAME = "@EntityName@";
- private static final String TEMPLATE_ENTITY_NAME_LOWER_CASE = "@EntityNameLowerCase@";
- private static final String TEMPLATE_ID_TYPE = "@IdType@";
- private static final String TEMPLATE_ID_GETTER = "@GetId@";
- private static final String TEMPLATE_PACKAGE = "@PackageName@";
- private static final String TEMPLATE_PERSISTENCE_PACKAGE_1 = "@PersistencePackageName1@";
- private static final String TEMPLATE_PERSISTENCE_PACKAGE_2 = "@PersistencePackageName2@";
- private static final String TEMPLATE_SERVICE_NAME = "@ServiceName@";
- private static final String TEMPLATE_SWARM_TYPE = "@SwarmType@";
- private static final String TEMPLATE_SWARM_FACTORY_TYPE = "@SwarmFactoryType@";
- private static final String TEMPLATE_FACTORY_CREATE = "@FactoryCreate@";
-
- private static final String SERVICE_CLASS_SUFFIX = "Endpoint";
-
- /**
- * Given the name of an entity, return the name of the API that GPE will
- * generate if generating a Cloud Endpoint for the entity.
- */
- public static String getApiNameFromEntityName(String entityName) {
- return getServiceNameFromEntityName(entityName).toLowerCase();
- }
-
- /**
- * Given the name of an entity, return the name of the Endpoint class that GPE
- * will generate for it.
- */
- public static String getServiceNameFromEntityName(String entityName) {
- return entityName + SERVICE_CLASS_SUFFIX;
- }
-
-
- private final String entityClass;
- private final String entityServiceClass;
- private final String idType;
- private final String idGetter;
- private final String javaPackage;
- private final Project project;
-
- // TODO: maybe this can just be all static functions
- public TemplateHelper(PsiClass javaClass, PsiField idField) {
- this.javaPackage = ((PsiJavaFile)javaClass.getContainingFile()).getPackageName();
- this.project = javaClass.getProject();
- this.entityClass = javaClass.getName();
- this.idGetter =
- PropertyUtil.suggestGetterName(idField.getName(), idField.getType()); //<-- should probably do a check to make sure this exists
- this.idType = idField.getType().getPresentableText();
- this.entityServiceClass = getServiceNameFromEntityName(entityClass);
- }
-
- /**
- * NOTE : requires runWriteAction
- * Load in entity manager factory as java file
- * @throws IOException
- */
- public static PsiFile loadJpaEntityManagerFactoryClass(Project project, String javaPackage) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_MANAGER_FACTORY_CLASS);
-
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, javaPackage);
- templateString = templateString.replaceAll(TEMPLATE_PERSISTENCE_PACKAGE_1, "javax.persistence.EntityManagerFactory");
- templateString = templateString.replaceAll(TEMPLATE_PERSISTENCE_PACKAGE_2, "javax.persistence.Persistence");
- templateString = templateString.replaceAll(TEMPLATE_SWARM_TYPE, "Entity");
- templateString = templateString.replaceAll(TEMPLATE_SWARM_FACTORY_TYPE, "EMF");
- templateString = templateString.replaceAll(TEMPLATE_FACTORY_CREATE, "Persistence.createEntityManagerFactory");
-
- return PsiUtils.createFormattedFile(project, "EMF.java", JavaFileType.INSTANCE, templateString);
- }
-
- /**
- * NOTE : requires runWriteAction
- * Non-static version of {@link #loadJpaEntityManagerFactoryClass(com.intellij.openapi.project.Project, String)}
- * @throws IOException
- */
- public PsiFile loadJpaEntityManagerFactoryClass() throws IOException {
- return loadJpaEntityManagerFactoryClass(project, javaPackage);
- }
-
- /**
- * NOTE : requires runWriteAction
- * Load in Endpoints template as java file
- * @throws IOException
- */
- public PsiFile loadJpaSwarmServiceClass() throws IOException {
-
- EndpointPackageInfo endpointPackageInfo = getEndpointPackageInfo(javaPackage);
-
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_JPA_SWARM_SERVICE);
-
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, javaPackage);
- templateString = templateString.replaceAll(TEMPLATE_SERVICE_NAME, entityServiceClass);
- templateString = templateString.replaceAll(TEMPLATE_API_NAME, getApiNameFromEntityName(entityClass));
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_OWNER_DOMAIN, endpointPackageInfo.getOwnerDomain());
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_PACKAGE_PATH, endpointPackageInfo.getPackagePath());
- templateString = templateString.replaceAll(TEMPLATE_ENTITY_NAME, entityClass);
- templateString = templateString.replaceAll(TEMPLATE_ENTITY_NAME_LOWER_CASE, Introspector.decapitalize(entityClass));
- templateString = templateString.replaceAll(TEMPLATE_ID_TYPE, idType);
- templateString = templateString.replaceAll(TEMPLATE_ID_GETTER, idGetter);
-
- return PsiUtils.createFormattedFile(project, entityServiceClass + ".java", JavaFileType.INSTANCE, templateString);
- }
-
-
- /**
- * NOTE : requires runWriteAction
- * Load in the persistence.xml template
- * @throws IOException
- */
- public static PsiFile loadPersistenceXml(Project project) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_PERSISTENCE_XML);
-
- return PsiUtils.createFormattedFile(project, "persistence.xml", XmlFileType.INSTANCE, templateString);
- }
-
- /**
- * NOTE : requires runWriteAction
- * load in the gradle build file from templates
- * @throws IOException
- */
- public static PsiFile loadGradleBuildFile(Project project) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_BUILD_GRADLE);
- return PsiUtils.createFormattedFile(project, "build.gradle", PlainTextFileType.INSTANCE, templateString);
-
- }
-
- /**
- * NOTE : requires runWriteAction
- * Load in the maven pom.xml file
- * @throws IOException
- */
- public static PsiFile generatePomXml(Project project, String packageName, String artifactName) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_POM_XML);
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, packageName);
- templateString = templateString.replaceAll(TEMPLATE_MAVEN_ARTIFACT_NAME, artifactName);
-
- return PsiUtils.createFormattedFile(project, "pom.xml", XmlFileType.INSTANCE, templateString);
- }
-
- /**
- * NOTE : requires runWriteAction
- * load in the AppEngine web.xml from templates
- * @throws IOException
- */
- public static PsiFile loadWebXml(Project project) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_WEB_XML);
-
- return PsiUtils.createFormattedFile(project, "web.xml", XmlFileType.INSTANCE, templateString);
- }
-
-
- /**
- * NOTE : requires runWriteAction
- * load in the AppEngine appengine-web.xml from templates
- * @throws IOException
- */
- public static PsiFile generateAppEngineWebXml(Project project, String appId) throws IOException {
- String templateString = getTemplateResourceAsString(FILE_TEMPLATE_APPENGINE_WEB_XML);
- templateString = templateString.replaceAll(TEMPLATE_APP_ID, appId == null ? "" : appId.trim());
- return PsiUtils.createFormattedFile(project, "appengine-web.xml", XmlFileType.INSTANCE, templateString);
- }
-
- /**
- * NOTE : requires runWriteAction
- * Non-Static version of {@link #loadPersistenceXml(com.intellij.openapi.project.Project)}
- * @throws IOException
- */
- public PsiFile loadPersistenceXml() throws IOException {
- return loadPersistenceXml(project);
- }
-
- /**
- * NOTE : requires runWriteAction
- * Load in generic java template
- * @throws IOException
- */
- public static PsiFile generateJavaTemplateContent(Project p, String className, String packageName) throws IOException {
- String templateString = getTemplateResourceAsString(className + ".java.template");
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, packageName);
- return PsiUtils.createFormattedFile(p, className + ".java", JavaFileType.INSTANCE, templateString);
- }
-
- /**
- * Load in generic java template with owner domain information
- * @throws IOException
- */
- public static PsiFile generateJavaTemplateContentWithOwnerDomain(Project p,
- String className,
- String packageName,
- EndpointPackageInfo endpointPackageInfo) throws IOException {
- String templateString = getTemplateResourceAsString(className + ".java.template");
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, packageName);
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_OWNER_DOMAIN, endpointPackageInfo.getOwnerDomain());
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_PACKAGE_PATH, endpointPackageInfo.getPackagePath());
- return PsiUtils.createFormattedFile(p, className + ".java", JavaFileType.INSTANCE, templateString);
- }
-
- /**
- * Load in generic java template with owner domain information and API Key (cloud console)
- * TODO: Maybe make this more generic, take a map?
- * @throws IOException
- */
- public static PsiFile generateJavaSampleTemplateWithOwnerDomainAndApiKey(Project p, String className, String packageName, EndpointPackageInfo endpointPackageInfo, String apiKey) throws IOException {
- String templateString = getTemplateResourceAsString(className + ".java.template");
- templateString = templateString.replaceAll(TEMPLATE_PACKAGE, packageName);
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_OWNER_DOMAIN, endpointPackageInfo.getOwnerDomain());
- templateString = templateString.replaceAll(TEMPLATE_ENDPOINT_PACKAGE_PATH, endpointPackageInfo.getPackagePath());
- if (apiKey != null) {
- templateString = templateString.replaceAll(TEMPLATE_API_KEY, apiKey);
- }
- return PsiUtils.createFormattedFile(p, className + ".java", JavaFileType.INSTANCE, templateString);
- }
-
- /**
- * NOTE : requires runWriteAction
- * load in generic plain text (html, css, js, ...) file
- * @throws IOException
- */
- public static PsiFile generateStaticContent(Project p, String fileName) throws IOException {
- String templateString = getTemplateResourceAsString(fileName);
- return PsiUtils.createFormattedFile(p, fileName, PlainTextFileType.INSTANCE, templateString);
- }
-
- // requires runWriteAction
- private static String getTemplateResourceAsString(String resourceName) throws IOException {
- URL resourceURL = TemplateHelper.class.getResource(resourceName);
- return Resources.toString(resourceURL, Charsets.UTF_8);
- }
-
-}
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/appengine-web.xml.template b/src/com/google/gct/intellij/endpoints/generator/template/appengine-web.xml.template
deleted file mode 100644
index 31b66d0..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/appengine-web.xml.template
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
- <application>@AppId@</application>
- <version>1</version>
- <threadsafe>true</threadsafe>
-</appengine-web-app>
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.css b/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.css
deleted file mode 100644
index 140f731..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*!
- * Bootstrap v2.2.2
- *
- * Copyright 2012 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 @twitter by @mdo and @fat.
- */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}}.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}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{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{color:#808080}.text-warning{color:#c09853}a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:hover{color:#356635}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;padding-right:5px;padding-left:5px}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:16px;font-weight:300;line-height:25px}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{margin-bottom:5px;font-size:0;white-space:nowrap}.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{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{-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{-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 tfoot:last-child tr:last-child>td: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 tfoot:last-child tr:last-child>td: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:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>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{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{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{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{color:#999}.dropdown-menu .disabled>a:hover{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}.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{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 #bbb;*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:#a2a2a2;-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: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{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{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.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: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: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: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: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: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: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{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{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-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.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{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{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{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{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{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{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{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{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{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{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{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{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{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{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{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{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{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{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover{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{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: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{border-top-color:#555;border-bottom-color:#555}.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{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{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{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: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>.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{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{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>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;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 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;width:236px;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-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{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.badge:hover{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{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{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.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/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.js b/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.js
deleted file mode 100644
index 6eeb15c..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/bootstrap.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
-* Bootstrap.js by @fat & @mdo
-* Copyright 2012 Twitter, Inc.
-* http://www.apache.org/licenses/LICENSE-2.0.txt
-*/
-!function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";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+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$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")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$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=!1,setTimeout(function(){that.$element.trigger("slid")},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle(),this}}};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data("carousel"),options=$.extend({},$.fn.carousel.defaults,"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.cycle()})},$.fn.carousel.defaults={interval:5e3,pause:"hover"},$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this},$(document).on("click.carousel.data-api","[data-slide]",function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),options=$.extend({},$target.data(),$this.data());$target.carousel(options),e.preventDefault()})}(window.jQuery),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),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){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),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;this.transitioning||(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();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(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"]()}};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options="object"==typeof option&&option;data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)})}(window.jQuery),!function($){"use strict";function clearMenus(){$(toggle).each(function(){getParent($(this)).removeClass("open")})}function getParent($this){var $parent,selector=$this.attr("data-target");return selector||(selector=$this.attr("href"),selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),$parent.length||($parent=$this.parent()),$parent}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(){var $parent,isActive,$this=$(this);if(!$this.is(".disabled, :disabled"))return $parent=getParent($this),isActive=$parent.hasClass("open"),clearMenus(),isActive||$parent.toggleClass("open"),$this.focus(),!1},keydown:function(e){var $this,$items,$parent,isActive,index;if(/(38|40|27)/.test(e.keyCode)&&($this=$(this),e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled"))){if($parent=getParent($this),isActive=$parent.hasClass("open"),!isActive||isActive&&27==e.keyCode)return $this.click();$items=$("[role=menu] li:not(.divider):visible a",$parent),$items.length&&(index=$items.index($items.filter(":focus")),38==e.keyCode&&index>0&&index--,40==e.keyCode&&$items.length-1>index&&index++,~index||(index=0),$items.eq(index).focus())}}};var old=$.fn.dropdown;$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");data||$this.data("dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on("click.dropdown.data-api touchstart.dropdown.data-api",clearMenus).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",toggle+", [role=menu]",Dropdown.prototype.keydown)}(window.jQuery),!function($){"use strict";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?"hide":"show"]()},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1),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(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):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(){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var 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("static"==this.options.backdrop?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one($.support.transition.end,$.proxy(this.removeBackdrop,this)):this.removeBackdrop()):callback&&callback()}};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(),"object"==typeof option&&option);data||$this.data("modal",data=new Modal(this,options)),"string"==typeof option?data[option]():options.show&&data.show()})},$.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(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]+$)/,"")),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),!function($){"use strict";var Tooltip=function(element,options){this.init("tooltip",element,options)};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut;this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(eventIn="hover"==this.options.trigger?"mouseenter":"focus",eventOut="hover"==this.options.trigger?"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){return options=$.extend({},$.fn[this.type].defaults,options,this.$element.data()),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return self.options.delay&&self.options.delay.show?(clearTimeout(this.timeout),self.hoverState="in",this.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show),void 0):self.show()},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),self.options.delay&&self.options.delay.hide?(self.hoverState="out",this.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide),void 0):self.hide()},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp;if(this.hasContent()&&this.enabled){switch($tip=this.tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,inside=/in/.test(placement),$tip.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),pos=this.getPosition(inside),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,inside?placement.split(" ")[1]: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}}$tip.offset(tp).addClass(placement).addClass("in")}},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(){function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout),$tip.detach()})}var $tip=this.tip();return $tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?removeWithAnimation():$tip.detach(),this},fixTitle:function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},inside?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},tip:function(){return this.$tip=this.$tip||$(this.options.template)},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(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);self[self.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options="object"==typeof option&&option;data||$this.data("tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.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",title:"",delay:0,html:!1},$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(window.jQuery),!function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};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;return content=$e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},tip:function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options="object"==typeof option&&option;data||$this.data("popover",data=new Popover(this,options)),"string"==typeof option&&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><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'}),$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(window.jQuery),!function($){"use strict";function ScrollSpy(element,options){var href,process=$.proxy(this.process,this),$element=$(element).is("body")?$(window):$(element);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]+$)/,"")||"")+" .nav li > a",this.$body=$("body"),this.refresh(),this.process()}ScrollSpy.prototype={constructor:ScrollSpy,refresh:function(){var $targets,self=this;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+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 i,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;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]||offsets[i+1]>=scrollTop)&&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"),active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate")}};var old=$.fn.scrollspy;$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data("scrollspy"),options="object"==typeof option&&option;data||$this.data("scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})},$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.defaults={offset:10},$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on("load",function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this);$spy.scrollspy($spy.data())})})}(window.jQuery),!function($){"use strict";var Tab=function(element){this.element=$(element)};Tab.prototype={constructor:Tab,show:function(){var previous,$target,e,$this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$this.parent("li").hasClass("active")||(previous=$ul.find(".active:last a")[0],e=$.Event("show",{relatedTarget:previous}),$this.trigger(e),e.isDefaultPrevented()||($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){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),element.addClass("active"),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu")&&element.closest("li.dropdown").addClass("active"),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&$active.hasClass("fade");transition?$active.one($.support.transition.end,next):next(),$active.removeClass("in")}};var old=$.fn.tab;$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data("tab");data||$this.data("tab",data=new Tab(this)),"string"==typeof option&&data[option]()})},$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this},$(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),$(this).tab("show")})}(window.jQuery),!function($){"use strict";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=!1,this.listen()};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(val)).change(),this.hide()},updater:function(item){return item},show:function(){var pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:pos.top+pos.height,left:pos.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var items;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,items?this.process(items):this)},process:function(items){var that=this;return items=$.grep(items,function(item){return that.matcher(item)}),items=this.sorter(items),items.length?this.render(items.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(item){return~item.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){for(var item,beginswith=[],caseSensitive=[],caseInsensitive=[];item=items.shift();)item.toLowerCase().indexOf(this.query.toLowerCase())?~item.indexOf(this.query)?caseSensitive.push(item):caseInsensitive.push(item):beginswith.push(item);return beginswith.concat(caseSensitive,caseInsensitive)},highlighter:function(item){var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return item.replace(RegExp("("+query+")","ig"),function($1,match){return"<strong>"+match+"</strong>"})},render:function(items){var that=this;return items=$(items).map(function(i,item){return i=$(that.options.item).attr("data-value",item),i.find("a").html(that.highlighter(item)),i[0]}),items.first().addClass("active"),this.$menu.html(items),this},next:function(){var active=this.$menu.find(".active").removeClass("active"),next=active.next();next.length||(next=$(this.$menu.find("li")[0])),next.addClass("active")},prev:function(){var active=this.$menu.find(".active").removeClass("active"),prev=active.prev();prev.length||(prev=this.$menu.find("li").last()),prev.addClass("active")},listen:function(){this.$element.on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("keyup",$.proxy(this.keyup,this)),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))},eventSupported:function(eventName){var isSupported=eventName in this.$element;return isSupported||(this.$element.setAttribute(eventName,"return;"),isSupported="function"==typeof this.$element[eventName]),isSupported},move:function(e){if(this.shown){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(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(e){this.suppressKeyPressRepeat||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()},blur:function(){var that=this;setTimeout(function(){that.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),$(e.currentTarget).addClass("active")}};var old=$.fn.typeahead;$.fn.typeahead=function(option){return this.each(function(){var $this=$(this),data=$this.data("typeahead"),options="object"==typeof option&&option;data||$this.data("typeahead",data=new Typeahead(this,options)),"string"==typeof option&&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,$.fn.typeahead.noConflict=function(){return $.fn.typeahead=old,this},$(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var $this=$(this);$this.data("typeahead")||(e.preventDefault(),$this.typeahead($this.data()))})}(window.jQuery),!function($){"use strict";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")){var affix,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";"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top()),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom()),affix=null!=this.unpin&&scrollTop+this.unpin<=position.top?!1:null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":null!=offsetTop&&offsetTop>=scrollTop?"top":!1,this.affixed!==affix&&(this.affixed=affix,this.unpin="bottom"==affix?position.top-scrollTop:null,this.$element.removeClass(reset).addClass("affix"+(affix?"-"+affix:"")))}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data("affix"),options="object"==typeof option&&option;data||$this.data("affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.defaults={offset:0},$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(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/src/com/google/gct/intellij/endpoints/generator/template/build.gradle.template b/src/com/google/gct/intellij/endpoints/generator/template/build.gradle.template
deleted file mode 100644
index 2266397..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/build.gradle.template
+++ /dev/null
@@ -1,5 +0,0 @@
-task assemble << {
-}
-
-task clean << {
-} \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings-white.png b/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings-white.png
deleted file mode 100644
index 3bf6484..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings-white.png
+++ /dev/null
Binary files differ
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings.png b/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings.png
deleted file mode 100644
index a996999..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/glyphicons-halflings.png
+++ /dev/null
Binary files differ
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/index.html b/src/com/google/gct/intellij/endpoints/generator/template/index.html
deleted file mode 100644
index da85578..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/index.html
+++ /dev/null
@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-
-<html lang="en">
-<head>
-<title>Cloud Endpoints Starter Template</title>
-<!-- Bootstrap -->
-<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
-<!-- Styles, taken from Bootstrap Sign-in Form Example.-->
-<style type="text/css">
-body {
- padding-top: 40px;
- padding-bottom: 40px;
- background-color: #f5f5f5;
-}
-
-.regDevicesSection {
- margin-top: 30px;
-}
-
-.devicenameCol {
- max-width: 150px;
-}
-
-.deviceIdCol {
- max-width: 500px;
- word-wrap: break-word;
-}
-
-.form-sendmessage {
- max-width: 300px;
- padding: 29px 29px 29px;
- margin: 50px auto 20px;
- background-color: #fff;
- border: 1px solid #e5e5e5;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
-}
-
-.form-sendmessage input[type="text"] {
- font-size: 16px;
- height: auto;
- margin-bottom: 15px;
- padding: 7px 9px;
-}
-
-.alertStyle {
- max-width: 300px;
- margin: 5px auto 20px;
-}
-</style>
-
-<script type="text/javascript">
-
-API_URL = 'https://' + window.location.host + '/_ah/api';
-
-if (window.location.hostname == 'localhost'
- || window.location.hostname == '127.0.0.1'
- || ((window.location.port != "") && (window.location.port > 999))) {
- // We're probably running against the DevAppServer
- API_URL = 'http://' + window.location.host + '/_ah/api';
-}
-
- function showSuccess() {
- $("#alertArea").hide();
- $("#successArea").show();
- $("#successArea").fadeOut(1000);
- }
-
- function showError(errorHtml) {
- $("#alertArea").removeClass('alert-error alert-info alert-success').addClass('alert-error');
- $("#alertContentArea").html(errorHtml);
- $("#alertArea").show();
- }
-
- function showInfo(infoHtml) {
- $("#alertArea").removeClass('alert-error alert-info alert-success').addClass('alert-info');
- $("#alertContentArea").html(infoHtml);
- $("#alertArea").show();
- }
-
- // This method loads the deviceinfoendpoint and messageEndpoint libraries
- function loadGapi() {
- gapi.client.load('deviceinfoendpoint', 'v1', function() {
- updateRegisteredDeviceTable();
- });
-
- gapi.client.load('messageEndpoint', 'v1', function() {});
- }
-
- // Specialized function for checking error responses; it's needed to work around bugs in the
- // current version of the DevAppServer
- function checkErrorResponse(result, rawResult) {
- // Generally, !result should never occur. It's a bug with the DevAppServer. It will be fixed
- // in a forthcoming version of App Engine.
- if (!result) {
- try {
- // This is some special exception-handling code to deal with the DevAppServer not
- // handling empty (void responses) from an endpoint method in App Engine 1.7.5.
- result = JSON.parse(rawResult);
- } catch (err) {
- // This is a spurious error. Return true.
- if (rawResult.indexOf("Error 400 Failed to parse JSON request: Unexpected character") != -1) {
- return {isError: false};
- } else {
- if (rawResult == "") {
- // Empty result; perhaps we're disconnected?
- return {isError: true, errorMessage: "No response from server! Is it up and running?" };
-
- } else {
- // Unknown error; this shouldn't really happen
- var safeErrorHtml = $('<div/>').text(rawResult).html();
- return {isError: true, errorMessage: safeErrorHtml};
- }
- }
- }
- }
-
- if (result.error) {
- // This is really what should happen; if there's an error, a result.error object will
- // exist
- var safeErrorHtml = $('<div/>').text(result.error.message).html();
- return {isError: true, errorMessage: safeErrorHtml};
- } else if (result[0] && result[0].error) {
- // This is yet another hack; the DevAppServer incorrectly returns an array of error
- // responses in the case where the endpoint method throws an app-level exception.
- // Again, this will be fixed in a forthcoming version of App Engine.
- var safeErrorHtml = $('<div/>').text(result[0].error.message).html();
- return {isError: true, errorMessage: safeErrorHtml};
- }
-
- return {isError: false};
- }
-
- function generateRegDeviceTable(deviceInfoItems) {
- items = deviceInfoItems.items;
-
- if (!items || items.length == 0) {
- var htmlString = "<thead>"
- + "<tr>"
- + "<th>There are no registered devices</th>"
- + "</tr>" + "</thead>"
- + "<tbody></tbody>";
- $("#regDevicesTable").html(htmlString);
- } else {
- var htmlString = "<thead>" + "<tr>"
- + "<th style='min-width:150px'>Device Name</th>"
- + "<th>Registration Id</th>"
- + "<th>Timestamp</th>"
- + "</tr>" + "</thead>"
- + "<tbody>";
-
- for (var i = 0; i < items.length; i++) {
- item = items[i];
- htmlString += "<tr>";
- if (item.deviceInformation) {
- htmlString += "<td class='devicenameCol'>" + item.deviceInformation
- + "</td>";
- } else {
- htmlString += "<td class='devicenameCol'>" + "(unknown)"
- + "</td>";
- }
-
- if (item.deviceRegistrationID) {
- htmlString += "<td class='deviceIdCol'>" + item.deviceRegistrationID + "</td>";
- } else {
- htmlString += "<td class='deviceIdCol'>" + "(unknown)"
- + "</td>";
- }
-
-
- if (item.timestamp) {
- var timestampNumberic = new Number(item.timestamp);
- var date = new Date(timestampNumberic);
-
-
- htmlString += "<td>" + date.toString() + "</td>";
- } else {
- htmlString += "<td>" + "(unknown)"
- + "</td>";
- }
-
- htmlString += "</tr>";
- }
-
- htmlString += "</tbody>";
- $("#regDevicesTable").html(htmlString);
- }
- }
-
- function updateRegisteredDeviceTable() {
- // listDeviceInfo does not accept a null argument, so we pass in an empty map. Will be fixed in a future
- // version of the DevAppServer
- gapi.client.deviceinfoendpoint
- .listDeviceInfo({})
- .execute(
- function(deviceInfoItems, deviceInfoItemsRaw) {
- errorResult = checkErrorResponse(deviceInfoItems, deviceInfoItemsRaw);
- if (errorResult.isError) {
- showError("There was a problem contacting the server when attempting to list the registered devices. "
- + "Please refresh the page and try again in a short while. Here's the error information:<br/> "
- + errorResult.errorMessage);
- } else {
- generateRegDeviceTable(deviceInfoItems);
- }
- });
- }
-
- function handleMessageResponse(data, dataRaw) {
- errorResult = checkErrorResponse(data, dataRaw);
- if (!errorResult.isError) {
- showSuccess();
- } else {
- showError("There was a problem when attempting to send the message using the server at "
- + API_URL + ". " + " Is your API Key in MessageEndpoint.java "
- + "(in your App Engine project) set correctly? Here's the error information:<br/>"
- + errorResult.errorMessage);
- }
- }
-
- function sendMessage() {
- var message = $("#inputMessage").val();
-
- if (message == "") {
- showInfo("Message must not be empty!");
- } else {
- gapi.client.messageEndpoint
- .sendMessage({"message": message})
- .execute(handleMessageResponse);
- }
- }
-</script>
-</head>
-
-<body>
- <div class="container">
- <h1>Cloud Endpoints Starter Template</h1>
- <p style="">This sample lists all of your registered Android
- devices by accessing the Cloud Endpoint exposed by your App Engine
- App.</p>
- <p>Use the form below to send a message (via Cloud Endpoints) to
- your App Engine Server, which will then send a message (via Cloud
- Messaging) to all of your registered devices.</p>
- <p>
- Check out the <a
- href="http://developers.google.com/eclipse/docs/cloud_endpoints"
- target="_blank">docs</a> for more information.
- </p>
-
- <div class="regDevicesSection">
- <h3>Registered Devices</h3>
- <table class="table table-striped" id="regDevicesTable">
- <thead>
- <tr>
- <th>Searching for registered devices...</th>
- </tr>
- </thead>
- </table>
- </div>
-
- <div class="form-sendmessage">
- <input class="input-block-level" type="text" id="inputMessage"
- placeholder="Message">
- <button id="sendButton" class="btn btn-large btn-primary btn-block">Send</button>
- </div>
-
- <div id="alertArea" class="alert alertStyle">
- <button type="button" class="close">&times;</button>
- <div id="alertContentArea"></div>
- </div>
-
- <div id="successArea" class="alert alertStyle alert-success fade in">
- Message Sent!</div>
- </div>
- <div class='container navbar navbar-fixed-bottom'>
- <p class='text-error'>
- <small>NOTE: This page is not protected by authentication! If
- you decide to deploy this application, anyone will be able to access
- it! Information on configuring auth can be found <a
- href="https://developers.google.com/appengine/articles/auth"
- target="_blank">here.</a>
- </small>
- </p>
- </div>
-
- <!-- JavaScript -->
- <script src="https://apis.google.com/js/client.js?onload=loadGapi">
- {
- "client": {},
- "googleapis.config": {
- root: API_URL
- }
- }
- </script>
- <script src="js/jquery-1.9.0.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
-
- <script type="text/javascript">
- $("#sendButton").click(sendMessage);
- $("#alertArea").hide();
- $("#successArea").hide();
- $('.alert .close').on('click', function() {
- $(this).parent().hide();
- })
- </script>
-</body>
-</html> \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/jquery-1.9.0.min.js b/src/com/google/gct/intellij/endpoints/generator/template/jquery-1.9.0.min.js
deleted file mode 100644
index 50d1b22..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/jquery-1.9.0.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t))st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==st.type(t))r(e,t);else for(i in t)j(e+"["+i+"]",t[i],n,r)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)a=l[0];else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n)for(r in a)if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++)if(r=nr[o].call(l,e,c,l.opts))return r;return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e)if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h)st.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=wn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n))for(i in n)st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(e=arguments[u]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i));return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r)st.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U)if(U=st.Deferred(),"complete"===V.readyState)setTimeout(st.ready);else if(V.addEventListener)V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1);else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++)if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;)l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return!l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length)return{};o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.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%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++)i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]));st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=st.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?st.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get"in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set"in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},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(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t
-},set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;)u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;)if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)st.event.remove(e,d+t[l],n,r,!0);st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();)n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault();if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++)a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a);i.length&&s.push({elem:l,handlers:i})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando])return e;var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;)n=o[t],e[n]=r[n];return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e)this.on(s,n,r,e[s],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.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(e,t){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!M&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&W.getByClassName&&t.getElementsByClassName)return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter)!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N)return s===!0}else if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(l=g(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(y[c]=f);o(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}else v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])c=[d(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++)if(d(f,s,u)){l.push(f);break}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++)d(v,h,s,u);if(i){if(m>0)for(;y--;)v[y]||h[y]||(h[y]=G.call(l));h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--)if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,K.call(r,0)),n;break}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="<a name='"+P+"'></a><div name='"+P+"'></div>",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++)1===n.nodeType&&r.push(n);return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t)return A=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y);if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t)))try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=k(t);return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++)if(st.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)st.find(e,this[t],n);return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(st.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")
-},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/<tbody/i,Qt=/<|&#?\w+;/,Kt=/<(?:script|style|link)/i,Zt=/^(?:checkbox|radio)$/i,en=/checked\s*(?:[^=]|=\s*.checked.)/i,tn=/^$|\/(?:java|ecma)script/i,nn=/^true\/(.*)/,rn=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,on={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:st.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y))return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++)u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++)u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")));i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a)r[a]&&v(o,r[a]);if(t)if(n)for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++)y(o,r[a]);else y(e,s);return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1></$2>")+u[2],c=u[0];c--;)s=s.lastChild;if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody)for(o="table"!==a||Gt.test(o)?"<table>"!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;)st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];)if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n))for(c=0;o=s[c++];)tn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++)if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events)for(a in r.events)f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle);l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++)a[n[s]]=st.css(e,n[s],!1,i);return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get"in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wn[r]+t]=o[r]||o[r-2]||o[0];return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){o(this.name,this.value)});else for(r in e)j(r,e[r],n,o);return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn)return Rn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("<div>").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,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"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=_n.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x)return w;c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x))throw N;r(-1,N)}}else r(-1,"No Transport");return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn)Vn[e](t,!0)};st.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials"in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,st.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&tr.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);
-//@ sourceMappingURL=jquery.min.map \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/persistence.xml.template b/src/com/google/gct/intellij/endpoints/generator/template/persistence.xml.template
deleted file mode 100644
index d6176b7..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/persistence.xml.template
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
-
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.api.jpa.PersistenceProviderImpl</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-</persistence> \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/pom.xml.template b/src/com/google/gct/intellij/endpoints/generator/template/pom.xml.template
deleted file mode 100644
index e2ecabb..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/pom.xml.template
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <packaging>war</packaging>
- <version>1.0</version>
-
- <groupId>@PackageName@</groupId>
- <artifactId>@MavenArtifactName@</artifactId>
-
- <properties>
- <appengine.target.version>1.8.0</appengine.target.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <!-- Compile/runtime dependencies -->
- <dependency>
- <groupId>com.google.appengine</groupId>
- <artifactId>appengine-api-1.0-sdk</artifactId>
- <version>${appengine.target.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.appengine</groupId>
- <artifactId>appengine-endpoints</artifactId>
- <version>${appengine.target.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_2.0_spec</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>net.sf.jsr107cache</groupId>
- <artifactId>jsr107cache</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-core</artifactId>
- <version>3.1.3</version>
- </dependency>
- <dependency>
- <groupId>com.google.appengine.orm</groupId>
- <artifactId>datanucleus-appengine</artifactId>
- <version>2.1.2</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-api-jpa</artifactId>
- <version>3.1.3</version>
- </dependency>
-
- <dependency>
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>com.ganyo</groupId>
- <artifactId>gcm-server</artifactId>
- <version>1.0.2</version>
- </dependency>
-
- <!-- Test Dependencies -->
- <dependency>
- <groupId>com.google.appengine</groupId>
- <artifactId>appengine-testing</artifactId>
- <version>${appengine.target.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.appengine</groupId>
- <artifactId>appengine-api-stubs</artifactId>
- <version>${appengine.target.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <!-- for hot reload of the web application-->
- <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <version>2.5.1</version>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <webXml>${project.build.directory}/generated-sources/appengine-endpoints/WEB-INF/web.xml</webXml>
- <webResources>
- <resource>
- <!-- this is relative to the pom.xml directory -->
- <directory>${project.build.directory}/generated-sources/appengine-endpoints</directory>
- <!-- the list has a default value of ** -->
- <includes>
- <include>WEB-INF/*.discovery</include>
- <include>WEB-INF/*.api</include>
- </includes>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>com.google.appengine</groupId>
- <artifactId>appengine-maven-plugin</artifactId>
- <version>1.8.0</version>
- <configuration>
- <enableJarClasses>false</enableJarClasses>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>endpoints_get_discovery_doc</goal>
- <!--goal>endpoints_get_client_lib</goal-->
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project> \ No newline at end of file
diff --git a/src/com/google/gct/intellij/endpoints/generator/template/web.xml.template b/src/com/google/gct/intellij/endpoints/generator/template/web.xml.template
deleted file mode 100644
index 9ff4c07..0000000
--- a/src/com/google/gct/intellij/endpoints/generator/template/web.xml.template
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
-</web-app>
diff --git a/src/com/google/gct/intellij/endpoints/project/AppEngineMavenProject.java b/src/com/google/gct/intellij/endpoints/project/AppEngineMavenProject.java
deleted file mode 100644
index bdc1add..0000000
--- a/src/com/google/gct/intellij/endpoints/project/AppEngineMavenProject.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.project;
-
-import com.google.gct.intellij.endpoints.GctConstants;
-import com.google.gct.intellij.endpoints.util.VfsUtils;
-import com.google.gct.intellij.endpoints.util.ResourceUtils;
-
-import com.intellij.codeInsight.AnnotationUtil;
-import com.intellij.execution.process.ProcessAdapter;
-import com.intellij.execution.process.ProcessEvent;
-import com.intellij.execution.process.ProcessHandler;
-import com.intellij.execution.runners.ProgramRunner;
-import com.intellij.execution.ui.RunContentDescriptor;
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.module.impl.scopes.ModuleWithDependenciesScope;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.io.FileUtil;
-import com.intellij.openapi.vfs.LocalFileSystem;
-import com.intellij.openapi.vfs.VfsUtil;
-import com.intellij.openapi.vfs.VfsUtilCore;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.JavaPsiFacade;
-import com.intellij.psi.PsiAnnotation;
-import com.intellij.psi.PsiAnnotationMemberValue;
-import com.intellij.psi.PsiClass;
-import com.intellij.psi.PsiDirectory;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiFile;
-import com.intellij.psi.PsiJavaFile;
-import com.intellij.psi.PsiLiteral;
-import com.intellij.psi.PsiManager;
-import com.intellij.psi.search.searches.AnnotatedElementsSearch;
-import com.intellij.util.Query;
-import com.intellij.util.io.ZipUtil;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.idea.maven.execution.MavenRunConfigurationType;
-import org.jetbrains.idea.maven.execution.MavenRunnerParameters;
-import org.jetbrains.idea.maven.project.MavenProject;
-import org.jetbrains.idea.maven.project.MavenProjectsManager;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * This is a wrapper for App Engine functionality on a MavenProject, perhaps we should just extend MavenProject
- */
-public class AppEngineMavenProject {
- private final MavenProject myMavenProject;
- private final Project myProject;
- private final Module myModule;
-
- public static final String GOAL_COMPILE = "compile";
- public static final String GOAL_APP_ENGINE_GEN_CLIENT_LIBRARIES = "appengine:endpoints_get_client_lib";
- public static final String GOAL_APP_ENGINE_GET_DISCOVERY_DOC = "appengine:endpoints_get_discovery_doc";
-
- public static final String PLUGIN_GROUP_APP_ENGINE = "com.google.appengine";
- public static final String PLUGIN_ARTIFACT_APP_ENGINE = "appengine-maven-plugin";
-
- private static final Logger LOG = Logger.getInstance(AppEngineMavenProject.class);
-
- /* Consider using get() or checking isAppEngineMavenProject before using constructor */
- public AppEngineMavenProject(@NotNull Project project, @NotNull Module appEngineModule, @NotNull MavenProject mavenProject) {
- myProject = project;
- myModule = appEngineModule;
- myMavenProject = mavenProject;
- }
-
- /**
- * Create an instance of AppEngineMavenProject for a given module
- * @param appEngineModule
- * A valid appEngineModule
- * @return
- * An instance of AppEngineMavenProject or <code>null</code> if none can be found
- */
- @Nullable
- public static AppEngineMavenProject get(@NotNull Module appEngineModule) {
- MavenProject mavenProject = MavenProjectsManager.getInstance(appEngineModule.getProject()).findProject(appEngineModule);
- if (isAppEngineMavenProject(mavenProject)) {
- return new AppEngineMavenProject(appEngineModule.getProject(), appEngineModule, mavenProject);
- }
- return null;
- }
-
- /** Checks if a maven project can be wrapped with the AppEngineMaven wrapper and be useful */
- public static boolean isAppEngineMavenProject(MavenProject mavenProject) {
- if (mavenProject == null) {
- return false;
- }
- if (mavenProject.findPlugin(PLUGIN_GROUP_APP_ENGINE, PLUGIN_ARTIFACT_APP_ENGINE) == null) {
- return false;
- }
- return true;
- }
-
- @NotNull
- public MavenProject getMavenProject() {
- return myMavenProject;
- }
-
- @NotNull
- public Project getProject() {
- return myProject;
- }
-
- @NotNull
- public Module getModule() {
- return myModule;
- }
-
- /** runs a compile goal on a project */
- public void runCompile(@Nullable final MavenBuildCallback callback) {
- runMavenBuilder(Arrays.asList(GOAL_COMPILE), callback);
- }
-
- /** runs a compile goal AND gen discovery doc goal, always makes a network call */
- public void runGetDiscoveryDoc(@Nullable final MavenBuildCallback callback) {
- runMavenBuilder(Arrays.asList(GOAL_COMPILE, GOAL_APP_ENGINE_GET_DISCOVERY_DOC), callback);
- }
-
- /** runs a compile goal AND gen discovery doc goal AND a gen client libraries, always makes a network call */
- public void runGenClientLibraries(@Nullable final MavenBuildCallback callback) {
- runMavenBuilder(Arrays.asList(GOAL_COMPILE, GOAL_APP_ENGINE_GET_DISCOVERY_DOC, GOAL_APP_ENGINE_GEN_CLIENT_LIBRARIES), callback);
- }
-
- /**
- * Expand out a generated client library into the App Engine module,
- * This needs to be run on the dispatch thread
- */
- @NotNull
- public File expandClientLibrary(@NotNull String apiName) throws IOException {
-
- File targetGenSourcesDir = new File(myMavenProject.getBuildDirectory(), GctConstants.API_CLIENT_GENERATED_SOURCES);
- if (!targetGenSourcesDir.exists()) {
- throw new FileNotFoundException("No sources were generated");
- }
-
- // There are sometimes case differences between the API name and the zip file
- Pattern pattern = Pattern.compile(apiName + "-.*\\.zip", Pattern.CASE_INSENSITIVE);
- List<File> apiFiles = FileUtil.findFilesByMask(pattern, targetGenSourcesDir);
-
- // Should only be 1
- if (apiFiles.isEmpty()) {
- throw new FileNotFoundException("No sources found for api : " + apiName);
- }
-
- File apiZipFile = apiFiles.get(0);
-
- File genDir = null;
-
- genDir = new File(VfsUtil.virtualToIoFile(myMavenProject.getDirectoryFile()), GctConstants.APP_ENGINE_GENERATED_LIB_DIR);
- ResourceUtils.createResource(genDir);
-
- // We expand the generated sources in "google_generated" in the main project, others can pick it up from there
- ZipFile zip = null;
- try {
- zip = new ZipFile(apiZipFile);
- Enumeration<? extends ZipEntry> entries = zip.entries();
- String baseDir = null;
- String srcJarPath = null;
- if (entries.hasMoreElements()) {
- baseDir = entries.nextElement().getName();
- // get the name of the top-evel directory at the root of the zip (ex: deviceinfoendpoint)
- char lastChar = baseDir.charAt(baseDir.length() - 1);
- if(lastChar == '/' || lastChar == File.separatorChar) {
- baseDir = baseDir.substring(0, baseDir.length() - 1);
- }
- }
-
- while (entries.hasMoreElements()) {
- ZipEntry curEntry = entries.nextElement();
- if (curEntry.isDirectory()) {
- continue;
- }
-
- String[] curEntrySegments = curEntry.getName().split("/");
- if (curEntrySegments.length != 2) {
- continue;
- }
-
- if (curEntrySegments[1].contains(baseDir) && curEntrySegments[1].endsWith(GctConstants.API_CLIENT_SOURCES_JAR_SUFFIX)) {
- // We then look for a an entry directly underneath the baseDir that has the suffix -sources.jar, such as:
- // com.foo-deviceinfoendpoint-v1-datestamp-java-1.1x.rc-sources.jar
- // This is the jar file that contains the sources for the client stubs, we can't include the sources directly because we
- // need to compile them. So we need to expand, copy, and compile this in the Android-endpoints module.
- srcJarPath = curEntry.getName();
- break;
- }
- }
-
- if (baseDir != null) {
- File baseDirFile = new File(genDir, baseDir);
- ResourceUtils.deleteResource(baseDirFile);
- }
-
- ZipUtil.extract(apiZipFile, genDir, null);
-
- File baseDirFileRef = new File(genDir, baseDir);
- File libExpandedSourceDirFileRef = new File(baseDirFileRef, GctConstants.API_CLIENT_EXPANDED_SOURCE_SUBFOLDER_NAME);
- libExpandedSourceDirFileRef.mkdir();
- ZipUtil.extract(new File(genDir, srcJarPath), libExpandedSourceDirFileRef, null);
- return libExpandedSourceDirFileRef;
- }
- finally {
- if(zip != null) {
- zip.close();
- }
- }
- }
-
- /**
- * Expand out all client library sources into the App Engine module. Should probably run a compile and generate client libraries before
- * calling this to ensure something gets copied
- *
- */
- @NotNull
- public List<File> expandAllClientLibs() throws IOException {
- Map<PsiJavaFile, String> apiMap = findAllEndpointServiceClasses();
- List<File> expandedDirReferences = new ArrayList<File>(apiMap.size());
- for(String apiName : apiMap.values()) {
- expandedDirReferences.add(expandClientLibrary(apiName));
- }
- return expandedDirReferences;
- }
-
- /**
- * NOTE : Requires a readAction if not coming from the dispatch thread
- * Find all the classes that are endpoint files (annotated with @Api from javax.persistence)
- * @return a map of endpoint files and corresponding api names
- */
- public Map<PsiJavaFile, String> findAllEndpointServiceClasses() throws FileNotFoundException {
-
- Map<PsiJavaFile, String> endpointFileToApiName = new HashMap<PsiJavaFile, String>();
-
- PsiClass apiAnnotationClass = JavaPsiFacade.getInstance(myProject).
- findClass(GctConstants.APP_ENGINE_ANNOTATION_API, new ModuleWithDependenciesScope(myModule,
- ModuleWithDependenciesScope.COMPILE |
- ModuleWithDependenciesScope.LIBRARIES));
- if (apiAnnotationClass == null) {
- LOG.info("Unable to load annotation class: " + GctConstants.APP_ENGINE_ANNOTATION_API);
- throw new FileNotFoundException("Could not find the JPA api annotation class, perhaps your dependencies are broken");
- }
-
- Query<PsiClass> psiClassQuery = AnnotatedElementsSearch
- .searchPsiClasses(apiAnnotationClass, new ModuleWithDependenciesScope(myModule, ModuleWithDependenciesScope.CONTENT));
- Collection<PsiClass> endpointServiceClasses = psiClassQuery.findAll();
-
- for (PsiClass serviceClass : endpointServiceClasses) {
- // TODO: here is some code to ignore inner classes, not sure if this is allowed or not for entities
- //if (clazz.getContainingClass() == null) {
- // continue;
- //}
- PsiAnnotation apiAnnotation = AnnotationUtil.findAnnotation(serviceClass, true, GctConstants.APP_ENGINE_ANNOTATION_API);
- PsiAnnotationMemberValue nameValue = apiAnnotation.findAttributeValue("name");
-
- String apiName = null;
- if (nameValue != null && nameValue instanceof PsiLiteral) {
- PsiLiteral literal = (PsiLiteral)nameValue;
- if (literal.getValue() instanceof String) {
- apiName = (String)literal.getValue();
- }
- }
-
- endpointFileToApiName.put((PsiJavaFile)serviceClass.getContainingFile(), apiName);
- }
-
- return endpointFileToApiName;
- }
-
- /** Get a reference to the generated sources dir in the App Engine module */
- @Nullable
- public VirtualFile getExpandedSourceDir() {
- return VfsUtils.findFileUnderContentRoots(myModule, GctConstants.APP_ENGINE_GENERATED_LIB_DIR);
- }
-
- /** Get a IO file reference to the generated sources dir in the App Engine module */
- public File getExpandedSourceDirFile() throws FileNotFoundException {
- VirtualFile dir = getExpandedSourceDir();
- if(dir == null) {
- throw new FileNotFoundException("Could not find generated sources directory : "
- + GctConstants.APP_ENGINE_GENERATED_LIB_DIR
- + " in " + getRootDirectory());
- }
- return VfsUtilCore.virtualToIoFile(dir);
- }
-
- /** Refresh the expanded source dir, useful after calling {@link #expandAllClientLibs()}
- *
- * @param async
- * calling this synchronously requires a read action
- * @param onFinished
- * get notified when calling asynchronously
- * @throws FileNotFoundException
- * if the generated source directory is missing
- */
- public void refreshExpandedSourceDir(Boolean async, Runnable onFinished) throws FileNotFoundException {
- LocalFileSystem.getInstance().refreshIoFiles(Collections.singletonList(getExpandedSourceDirFile()), async, true, onFinished);
- }
-
- /** Get the maven project root directory */
- public VirtualFile getRootDirectory() {
- return myMavenProject.getDirectoryFile();
- }
-
- /** Runs a write action and needs to be on dispatch thread (use with invokeLater if not) */
- public void copyExpandedSources(final File destinationRootDir) {
-
- VirtualFile genLibVFile = VfsUtils.findFileUnderContentRoots(myModule, GctConstants.APP_ENGINE_GENERATED_LIB_DIR);
-
- PsiDirectory appEngineGenLibDir = PsiManager.getInstance(myProject).findDirectory(genLibVFile);
-
- assert (appEngineGenLibDir != null && appEngineGenLibDir.getVirtualFile().exists());
-
- final Map<String, PsiDirectory> apiNameToSourceRoot = new HashMap<String, PsiDirectory>();
- final PsiDirectory[] libsDirHolder = new PsiDirectory[]{null};
- final PsiFile[] proguardFileHolder = new PsiFile[]{null};
-
- for (PsiElement curElem : appEngineGenLibDir.getChildren()) {
- if (!(curElem instanceof PsiDirectory)) {
- continue;
- }
-
- PsiDirectory apiDir = (PsiDirectory)curElem;
- String apiName = apiDir.getName();
-
- PsiDirectory expandedSourceDir = apiDir.findSubdirectory(GctConstants.API_CLIENT_EXPANDED_SOURCE_SUBFOLDER_NAME);
-
- if (expandedSourceDir == null) {
- continue;
- }
-
- apiNameToSourceRoot.put(apiName, expandedSourceDir);
-
- // While we're here, look for a folder with the dependent libs
- if (libsDirHolder[0] == null) {
- PsiDirectory subDir = apiDir.findSubdirectory(GctConstants.API_CLIENT_LIBS_SUBFOLDER_NAME);
- if (subDir != null) {
- libsDirHolder[0] = subDir;
- }
- }
- else {
- // We already have a directory that points to the list of dependent libs; the contents
- // of any other libs directory for Cloud Endpoints should be identical
- }
-
- // While we're also here, look for the proguard file for the client library
- if (proguardFileHolder[0] == null) {
- proguardFileHolder[0] = apiDir.findFile(GctConstants.API_CLIENT_PROGUARD_FILENAME);
- }
- else {
- // We already have the proguard file; it does not differ for each endpoint, as it's for the Google API Client Library,
- // and this library does not vary from endpoint API to endpoint API.
- }
- }
-
- if (apiNameToSourceRoot.isEmpty()) {
- // nothing to do
- return;
- }
-
- if (proguardFileHolder[0] == null) {
- // Something's wrong here..
- return;
- }
-
- // Collect the dependencies
- if (libsDirHolder[0] == null) {
- // no available dependencies
- // TODO: make sure we account for this when changing how we deal with java client lib dependencies
- return;
- }
-
- // Now that we have all of the necessary information, we can go ahead and mutate the Android module
- // First, copy all of the generated source over to the android project, along with the dependencies
- // and add the appropriate source roots
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
- @Override
- public void run() {
-
- File endpointSrcDir = new File(destinationRootDir, GctConstants.ANDROID_ENDPOINT_SRC_PATH);
- if (!endpointSrcDir.exists()) {
- endpointSrcDir.mkdirs();
- }
-
- // Remove any existing source
- for (File child : endpointSrcDir.listFiles()) {
- FileUtil.delete(child);
- }
-
- // Copy the new source over
- for (Map.Entry<String, PsiDirectory> entry : apiNameToSourceRoot.entrySet()) {
- try {
- FileUtil.copyDirContent(VfsUtil.virtualToIoFile(entry.getValue().getVirtualFile()), endpointSrcDir);
- }
- catch (IOException e) {
- LOG.error(e);
- }
- }
- }
- });
- }
-
- /** run the maven builder on a list of goals */
- public void runMavenBuilder(List<String> goalsToRun, @Nullable final MavenBuildCallback callback) {
-
- assert (myMavenProject != null);
-
- final MavenRunnerParameters params = new MavenRunnerParameters(true, myMavenProject.getDirectory(), goalsToRun,
- MavenProjectsManager.getInstance(myProject).getExplicitProfiles());
-
- MavenRunConfigurationType.runConfiguration(myProject, params, new ProgramRunner.Callback() {
- @Override
- public void processStarted(RunContentDescriptor descriptor) {
- ProcessHandler processHandler = descriptor.getProcessHandler();
- if (processHandler != null) {
- processHandler.addProcessListener(new ProcessAdapter() {
- @Override
- public void processTerminated(ProcessEvent event) {
- if (callback != null) {
- callback.onBuildCompleted(event.getExitCode(), event.getText());
- }
- }
- });
- }
- }
- });
- }
-
-
-
- /**
- * A callback when a mavenbuild is complete. This callback will not return on the Dispatch thread, if you need code to run on
- * dispatch thread then use ApplicationManager.getApplication().invokeLater...
- */
- public static interface MavenBuildCallback {
- void onBuildCompleted(int resultCode, String text);
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/util/GradleUtils.java b/src/com/google/gct/intellij/endpoints/util/GradleUtils.java
deleted file mode 100644
index 1fc8d0d..0000000
--- a/src/com/google/gct/intellij/endpoints/util/GradleUtils.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.util;
-
-import com.intellij.openapi.project.Project;
-import com.intellij.psi.PsiElement;
-import com.intellij.psi.codeStyle.CodeStyleManager;
-import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
-import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElementFactory;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlock;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrApplicationStatement;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrCommandArgumentList;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression;
-import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrMethodCallExpression;
-
-/**
- * Utilities for editing gradle files (like settings.gradle and build.gradle)
- * this should be retired soon in favor of the GradleBuildFile/GradleSettingsFile functionality
- */
-public class GradleUtils {
-
- public static final String REPO_MAVEN_CENTRAL = "mavenCentral()";
- public static final String DEPENDENCY_COMPILE = "compile project(':%s')";
- public static final String ARGUMENT_INCLUDE = "':%s'";
-
- public static final String METHOD_REPOSITORIES = "repositories";
- public static final String METHOD_DEPENDENCIES = "dependencies";
- public static final String STATEMENT_INCLUDE = "include";
-
- private GradleUtils() {}
-
- /* convenience method for adding gradle repositories */
- public static void addRepository(Project project, GroovyFile gradleFile, String repository) {
- addExpressionToMethodClosure(project, gradleFile, METHOD_REPOSITORIES, repository);
- }
-
- /* convenience method for adding gradle dependencies */
- public static void addDependency(Project project, GroovyFile gradleFile, String dependency) {
- addExpressionToMethodClosure(project, gradleFile, METHOD_DEPENDENCIES, dependency);
- }
-
- /**
- * Adds an expression to a top level method's closure
- * TODO: This seems to work for broken gradle files, NEED to find a way to check if the gradle file is traversable
- *
- * @param project
- * @param gradleFile
- * @param methodName
- * The top level method to add to
- * @param expression
- * The expression to add in
- */
- public static void addExpressionToMethodClosure(Project project, GroovyFile gradleFile, String methodName, String expression) {
- for (PsiElement statement : gradleFile.getStatements()) {
- if (statement instanceof GrMethodCallExpression) {
-
- // the first child is always a grReferenceExpression for method calls
- if (statement.getFirstChild() instanceof GrReferenceExpression && statement.getFirstChild().getText().equals(methodName)) {
- GrClosableBlock[] closureArguments = ((GrMethodCallExpression)statement).getClosureArguments();
- if (closureArguments.length > 0) {
- // really, there should only be one closure argument, should we error if more? for now just adding to the first
- for (PsiElement repoStatement : closureArguments[0].getStatements()) {
- if (repoStatement.getText().equals(expression)) {
- // if we found the expression, then do nothing
- return;
- }
- }
- // we didn't find it, so add it in
- closureArguments[0].addBefore(GroovyPsiElementFactory.getInstance(project).createExpressionFromText(expression),
- closureArguments[0].getLastChild());
- CodeStyleManager.getInstance(project).reformat(closureArguments[0]);
- return;
- }
- // if we find no closure for this "method" we can just add in the expression in another block or create a block (bottom)
- }
- }
- }
- // we didn't find method or something was malformed so add it
- gradleFile.add(CodeStyleManager.getInstance(project).reformat(
- GroovyPsiElementFactory.getInstance(project).createExpressionFromText(methodName + "{\n" + expression + "}\n")));
- }
-
- /* convenience method for adding gradle includes of modules */
- public static void includeModule(Project project, GroovyFile gradleFile, String module) {
- addArgumentToApplicationStatement(project, gradleFile, STATEMENT_INCLUDE, String.format(ARGUMENT_INCLUDE, module));
- }
-
- /**
- * Adds an argument to a top level application statement
- * TODO: This seems to work for broken gradle files, NEED to find a way to check if the gradle file is traversable
- *
- * @param project
- * @param gradleFile
- * @param applicationStatement
- * @param argument
- */
- public static void addArgumentToApplicationStatement(Project project,
- GroovyFile gradleFile,
- String applicationStatement,
- String argument) {
- for (PsiElement statement : gradleFile.getStatements()) {
- if (statement instanceof GrApplicationStatement) {
-
- // the first child is always a GrReferenceExpression for application statments
- if (statement.getFirstChild() instanceof GrReferenceExpression &&
- statement.getFirstChild().getText().equals(applicationStatement)) {
-
- GrCommandArgumentList args = ((GrApplicationStatement)statement).getArgumentList();
- for (PsiElement arg : args.getChildren()) {
- if (arg.getText().equals(argument)) {
- // if we found the arg, then do nothing
- return;
- }
- }
- // we didn't find it so add it in
- args.addAfter(GroovyPsiElementFactory.getInstance(project).createExpressionFromText(argument), args.getLastChild());
- return;
- }
- }
- }
- // we didn't find statement or something was malformed so add it
- gradleFile.add(CodeStyleManager.getInstance(project)
- .reformat(GroovyPsiElementFactory.getInstance(project).createExpressionFromText(applicationStatement + argument)));
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/util/ResourceUtils.java b/src/com/google/gct/intellij/endpoints/util/ResourceUtils.java
deleted file mode 100644
index d14e1ac..0000000
--- a/src/com/google/gct/intellij/endpoints/util/ResourceUtils.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.gct.intellij.endpoints.util;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Utilities for working with resources and files
- */
-public class ResourceUtils {
-
- private ResourceUtils() {
- }
-
- /** create an empty file if it doesn't exist already */
- public static void createResource(File f) throws IOException {
- if (f.exists()) {
- return;
- }
- createResource(f.getParentFile());
- if (f.getName().contains(".")) {
- f.createNewFile();
- }
- else {
- f.mkdir();
- }
- }
-
- /** Delete a file or directory recursively
- * CAREFUL : Doesn't handle symlinks at all */
- public static void deleteResource(File f) throws IOException {
- if (!f.exists()) {
- return;
- }
-
- if (f.isFile()) {
- f.delete();
- return;
- }
-
- // We're dealing with a directory
- for (File child : f.listFiles()) {
- deleteResource(child);
- }
-
- f.delete();
- }
-}
diff --git a/src/com/google/gct/intellij/endpoints/util/VfsUtils.java b/src/com/google/gct/intellij/endpoints/util/VfsUtils.java
deleted file mode 100644
index 654265e..0000000
--- a/src/com/google/gct/intellij/endpoints/util/VfsUtils.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.gct.intellij.endpoints.util;
-
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.roots.ModuleRootManager;
-import com.intellij.openapi.vfs.VirtualFile;
-
-/**
- * Utilities for working with virtual file system
- */
-public class VfsUtils {
-
- // don't instantiate
- private VfsUtils() {
- }
-
- /**
- * Note : requires readAction if not on the dispatch thread
- * Find a file under all the defined content roots for a module
- * @return
- * file or null if file can't be found
- */
- public static VirtualFile findFileUnderContentRoots(Module module, String relativePath) {
- for (VirtualFile contentRoot : ModuleRootManager.getInstance(module).getContentRoots()) {
- VirtualFile potentialMatch = contentRoot.findFileByRelativePath(relativePath);
- if (potentialMatch != null) {
- return potentialMatch;
- }
- }
- return null;
- }
-
- /**
- * Note : requires readAction if not on the dispatch thread
- * Find a module root
- * @return
- * file or null if root can't be found
- */
- public static VirtualFile findModuleRoot(Module module) {
- return findFileUnderContentRoots(module, "");
- }
-}