/**
 * @license RequireJS i18n 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/
/**
 * @license RequireJS text 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - _initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2012, 2013 IBM Corporation and others. All rights reserved.
 *          This program and the accompanying materials are made available under
 *          the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2010, 2012 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2011, 2012 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2012 IBM Corporation and others. All rights reserved.
 *          This program and the accompanying materials are made available under
 *          the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2010, 2012 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2010, 2013 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2012, 2013 IBM Corporation and others. All rights reserved.
 *          This program and the accompanying materials are made available under
 *          the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2012 IBM Corporation and others. All rights reserved.
 *          This program and the accompanying materials are made available under
 *          the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license Copyright (c) 2011, 2013 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010-2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010,2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011,2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 Andy Clement (vmware) - bug 344614
 RequireJS text 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - _initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2012, 2013 IBM Corporation and others. All rights reserved.
 This program and the accompanying materials are made available under
 the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2010, 2012 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2011, 2012 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2012 IBM Corporation and others. All rights reserved.
 This program and the accompanying materials are made available under
 the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2010, 2012 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2010, 2013 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2012, 2013 IBM Corporation and others. All rights reserved.
 This program and the accompanying materials are made available under
 the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2012 IBM Corporation and others. All rights reserved.
 This program and the accompanying materials are made available under
 the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation
 Copyright (c) 2011, 2013 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 RequireJS i18n 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
*/
(function(){function g(e,d,c,b,a,j){d[e]&&(c.push(e),(d[e]===!0||d[e]===1)&&b.push(a+e+"/"+j))}function i(e,d,c,b,a){d=b+d+"/"+a;require._fileExists(e.toUrl(d))&&c.push(d)}var h=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,f={};define("i18n",{version:"1.0.0",load:function(e,d,c,b){var b=b||{},a=h.exec(e),j=a[1],m=a[4],p=a[5],l=m.split("-"),q=[],r={},n,k,o="";a[5]?(j=a[1],e=j+p):(p=a[4],m=b.locale||(b.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
l=m.split("-"));if(b.isBuild){q.push(e);i(d,"root",q,j,p);for(n=0;k=l[n];n++)o+=(o?"-":"")+k,i(d,o,q,j,p);d(q,function(){c()})}else d([e],function(a){var b=[];g("root",a,b,q,j,p);for(n=0;k=l[n];n++)o+=(o?"-":"")+k,g(o,a,b,q,j,p);d(q,function(){var m,e;for(m=b.length-1;m>-1&&(k=b[m]);m--){e=a[k];if(e===!0||e===1)e=d(j+k+"/"+p);var o=r,g=void 0;for(g in e)!(g in f)&&!(g in o)&&(o[g]=e[g])}c(r)})})}})})();
define("orion/i18n",[],function(){return{load:function(g,i,h,f){var f=f||{},e=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,d=e.exec(g);if(d)if(i.defined(g))h(i(g));else if(f.isBuild||f.isTest)h({});else{var c=d[1],b=d[3]?d[2]:"",a=d[3]||d[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var p=j.serviceRegistry,j=p.getServiceReferences("orion.i18n.message");if(b)j.some(function(a){return g===a.getProperty("name")?(p.getService(a).getMessageBundle().then(function(a){h(a)},function(){h({})}),
!0):!1})||h({});else{var l={},q;j.forEach(function(j){var m=j.getProperty("name");if((d=e.exec(m))&&c===d[1]&&a===(d[3]||d[2]))if(b=d[3]?d[2]:""){if((j=f.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.indexOf(b)===0)l[b]=!0,i.specified(m)||define(m,["orion/i18n!"+m],function(a){return a})}else q=j});i.specified(g)?h(l):q?p.getService(q).getMessageBundle().then(function(a){Object.keys(l).forEach(function(b){typeof a[b]==="undefined"&&(a[b]=l[b])});define(g,
[],a);h(a)},function(){define(g,[],l);h(l)}):(define(g,[],l),h(l))}})})}else h(null)}}});
define("git/nls/root/gitmessages",{Compare:"Compare","View the side-by-side compare":"View the side-by-side compare","Working Directory Version":"Working Directory Version","Working Directory":"Working Directory","View the working directory version of the file":"View the working directory version of the file","Loading...":"Loading...",Repositories:"Repositories","0 on 1 - Git":"${0} on ${1} - Git",Git:"Git","Show in eclipse.org":"Show in eclipse.org","Show this repository at eclipse.org":"Show this repository at eclipse.org",
"Show in GitHub":"Show in GitHub","Show this repository in GitHub":"Show this repository in GitHub","Commit Details":"Commit Details","No Commits":"No Commits","commit: 0":"commit: ${0}","parent: 0":"parent: ${0}","authored by 0 (1) on 2":"authored by ${0} (${1}) on ${2}","committed by 0 (1)":"committed by ${0} (${1})","Tags:":"Tags:","No Tags":"No Tags",Diffs:"Changes",More:"More","Loading git log...":"Loading git log...",local:"local",remote:"remote","Git Log for ${0} branch ${1} on ":"Git Log for ${0} branch ${1} on ",
"Git Log for ${0} branch ${1}":"Git Log for ${0} branch ${1}","Log for branch ${0} - Git":"Log for branch ${0} - Git","Log for ${0} on ${1} - Git":"Log for ${0} on ${1} - Git","View All":"View All","Error ${0}: ":"Error ${0}: ","Loading ":"Loading ",Message:"Message",Author:"Author",Date:"Date",Actions:"Actions",Branches:"Branches",Tags:"Tags",Stage:"Stage","Unstaged removal":"Unstaged removal",Unstage:"Unstage","Staged removal":"Staged removal","Unstaged change":"Unstaged change","Staged change":"Staged change",
"Unstaged add":"Unstaged add","Staged add":"Staged add","Resolve Conflict":"Resolve Conflict",Conflicting:"Conflicting","Commit message":"Commit message","Record changes in the active branch":"Record changes in the active branch",Commit:"Commit","Amend last commit":"Amend last commit"," Amend":" Amend","Rebase in progress. Choose action:":"Rebase in progress. Choose action:","Committer name:":"Committer name:","email:":"email:","Author name: ":"Author name: ","Select a file on the left to compare...":"Select a file on the left to compare...",
Unstaged:"Unstaged",Staged:"Staged","Recent commits on":"Recent commits on","Git Status":"Git Status","Go to Git Status":"Go to Git Status","Recent commits on ${0}":"Recent commits on ${0}","Status for ${0} - Git":"Status for ${0} - Git","Status (${0})":"Status (${0})","Getting git incoming changes...":"Getting git incoming changes...","Loading recent commits...":"Loading recent commits...","Show the side-by-side compare":"Show the side-by-side compare","Change Committer or Author":"Change Committer or Author",
"Use Default Committer and Author":"Use Default Committer and Author",Checkout:"Checkout","Checkout the file, discarding the unstaged change":"Checkout the file, discarding the unstaged change","Your changes to the file will be lost. Are you sure you want to checkout?":"Your changes to the file will be lost. Are you sure you want to checkout?","Checking out...":"Checking out...","Stage the change":"Stage the change","Stage the selected changes":"Stage the selected changes","Staging...":"Staging...",
"Checkout all the selected files, discarding all changes":"Checkout all the selected files, discarding all changes","Your changes to all the selected files will be lost. Are you sure you want to checkout?":"Your changes to all the selected files will be lost. Are you sure you want to checkout?","Save Patch":"Save Patch","Save workspace changes as a patch":"Save workspace changes as a patch","Unstage the change":"Unstage the change","Unstaging...":"Unstaging...",Reset:"Reset","Reset the branch, discarding all staged and unstaged changes":"Reset the branch, discarding all staged and unstaged changes",
"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.":"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.","Are you sure you want to continue?":"Are you sure you want to continue?","Resetting local changes...":"Resetting local changes...","Continue rebase...":"Continue rebase...","Skipping patch...":"Skipping patch...","Aborting rebase...":"Aborting rebase...","Complete log":"Complete log",
"local VS index":"local VS index","index VS HEAD":"index VS HEAD","Compare(${0} : ${1})":"Compare(${0} : ${1})","Loading status...":"Loading status...","Committing...":"Committing...","The committer name is required.":"The committer name is required.","The committer mail is required.":"The committer mail is required.","The author name is required.":"The author name is required.","The author mail is required.":"The author mail is required.",". Repository still contains conflicts.":". Repository still contains conflicts.",
". Repository contains unmerged paths. Resolve conflicts first.":". Repository contains unmerged paths. Resolve conflicts first.","Rendering ${0}":"Rendering ${0}",Configuration:"Configuration"," - Git":" - Git","Repositories - Git":"Repositories - Git",Repository:"Repository","Repository Not Found":"Repository Not Found","No Repositories":"No Repositories","Loading repository":"Loading repository","Loading repositories":"Loading repositories","(no remote)":"(no remote)","location: ":"location: ",
"${0} file(s) to stage and ${1} file(s) to commit.":"${0} file(s) to stage and ${1} file(s) to commit.","Nothing to commit.":"Nothing to commit.","Nothing to push.":"Nothing to push."," commit(s) to push.":" commit(s) to push.","You have no changes to commit.":"You have no changes to commit.","You have changes to commit in your workspace!":"You have changes to commit in your workspace!","Rebase in progress!":"Rebase in progress!","View all local and remote tracking branches":"View all local and remote tracking branches",
"tracks no branch, ":"tracks no branch, ","tracks ${0}, ":"tracks ${0}, ","last modified ${0} by ${1}":"last modified ${0} by ${1}","No Remote Branches":"No Remote Branches","Rendering branches":"Rendering branches",Commits:"Commits","Getting current branch":"Getting current branch","See Full Log":"See Full Log","See the full log":"See the full log",'Getting commits for "${0}" branch':'Getting commits for "${0}" branch',"Rendering commits":"Rendering commits","Getting outgoing commits":"Getting outgoing commits",
"The branch is up to date.":"The branch is up to date.","You have no outgoing or incoming commits.":"You have no outgoing or incoming commits.",") by ":") by "," (SHA ":" (SHA ","Getting tags":"Getting tags","View all tags":"View all tags"," on ":" on "," by ":" by ",Remotes:"Remotes","Rendering remotes":"Rendering remotes","No Remotes":"No Remotes","Getting confituration":"Getting confituration","View all configuration entries":"View all configuration entries","Unstaged addition":"Unstaged addition",
"Staged addition":"Staged addition"," (Rebase in Progress)":" (Rebase in Progress)",Status:"Status","Status for ${0} - Git ":"Status for ${0} - Git ","No Unstaged Changes":"No Unstaged Changes","No Staged Changes":"No Staged Changes",'Commits for "${0}" branch':'Commits for "${0}" branch',"Add Remote":"Add Remote","Remote Name:":"Remote Name:","Remote URI:":"Remote URI:","Apply Patch":"Apply Patch","Git Repository":"Git Repository","Go to the git repository":"Go to the git repository","Clone Git Repository":"Clone Git Repository",
"Repository URL:":"Repository URL:","Existing directory:":"Existing directory:","New folder:":"New folder:","Choose a Folder":"Choose a Folder","Commit Changes":"Commit Changes","Message:":"Message:","Amend:":"Amend:","Committer Name:":"Committer Name:","Committer Email:":"Committer Email:","Author Name:":"Author Name:","Author Email:":"Author Email:","The commit message is required.":"The commit message is required.","Git Credentials":"Git Credentials","Username:":"Username:","Ssh password:":"Ssh password:",
"Private key:":"Private key:","Passphrase (optional):":"Passphrase (optional):","commit:":"commit: ","parent:":"parent: ","branches: ":"branches: ","tags: ":"tags: "," authored by ${0} {${1}) on ${2}":" authored by ${0} {${1}) on ${2}",Content:"Content","Go to ${0} section":"Go to ${0} section","Find Commit":"Find Commit","Type the commit name (sha1):":"Type the commit name (sha1):",Search:"Search","Searching...":"Searching...","Looking for the commit":"Looking for the commit"," authored by ${0} (${1})) on ${2}":" authored by ${0} (${1})) on ${2}",
"New Branch:":"New Branch:",OK:"OK"," [New branch]":" [New branch]","Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.":"Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.","Link Repository":"Link Repository","Folder name:":"Folder name:","Repository was linked to ":"Repository was linked to ","Checkout the current tag, creating a local branch based on its contents.":"Checkout the current tag, creating a local branch based on its contents.",
"Checking out tag ${0}":"Checking out tag ${0}","Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.":"Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.","Checking out branch...":"Checking out branch...","Checking out branch ${0}...":"Checking out branch ${0}...",
"Branch checked out.":"Branch checked out.","New Branch":"New Branch","Add a new local branch to the repository":"Add a new local branch to the repository","Branch name":"Branch name",Delete:"Delete","Delete the local branch from the repository":"Delete the local branch from the repository","Are you sure you want to delete branch ${0}?":"Are you sure you want to delete branch ${0}?","Delete the remote tracking branch from the repository":"Delete the remote tracking branch from the repository","Are you sure?":"Are you sure?",
"You're going to delete remote branch ${0} and push the change.":"You're going to delete remote branch ${0} and push the change.","Removing remote branch: ":"Removing remote branch: ","Delete Remote Branch":"Delete Remote Branch","New Remote":"New Remote","Git Remote":"Git Remote","Go to Git Remote":"Go to Git Remote","Add a new remote to the repository":"Add a new remote to the repository","Delete the remote from the repository":"Delete the remote from the repository","Are you sure you want to delete remote ${0}?":"Are you sure you want to delete remote ${0}?",
Pull:"Pull","Pull from the repository":"Pull from the repository","Pulling: ":"Pulling: ","Pull Git Repository":"Pull Git Repository","Git Log":"Git Log","Go to Git Log":"Go to Git Log","Open the log for the branch":"Open the log for the branch","Open the log for the repository":"Open the log for the repository","Open the status for the repository":"Open the status for the repository","Show in Navigator":"Show in Navigator","Show the repository folder in the file navigator":"Show the repository folder in the file navigator",
"Compare With Each Other":"Compare With Each Other","Compare With Working Tree":"Compare With Working Tree",Open:"Open",Fetch:"Fetch","Fetch from the remote":"Fetch from the remote","SSH Password:":"SSH Password:","SSH User Name:":"SSH User Name:","Fetching remote: ":"Fetching remote: ","Force Fetch":"Force Fetch","Fetch from the remote branch into your remote tracking branch overriding its current content":"Fetch from the remote branch into your remote tracking branch overriding its current content",
"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.":"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.",Merge:"Merge","Merge the content from the branch to your active branch":"Merge the content from the branch to your active branch",". Go to ${0}.":". Go to ${0}.","Git Status page":"Git Status page",Rebase:"Rebase","Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ":"Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ",
"Rebase on top of ":"Rebase on top of ",". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing":". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing",". Repository state is invalid (i.e. already during rebasing)":". Repository state is invalid (i.e. already during rebasing)",". Repository contains unmerged paths":". Repository contains unmerged paths",". Repository contains pending changes. Please commit or stash them":". Repository contains pending changes. Please commit or stash them",
"Rebase your commits by removing them from the active branch, ":"Rebase your commits by removing them from the active branch, ","starting the active branch again based on the latest state of '":"starting the active branch again based on the latest state of '","and applying each commit again to the updated active branch.":"and applying each commit again to the updated active branch.","Push All":"Push All","Push commits and tags from your local branch into the remote branch":"Push commits and tags from your local branch into the remote branch",
"Pushing remote: ":"Pushing remote: ","Choose Branch":"Choose Branch","Force Push All":"Force Push All","Push commits and tags from your local branch into the remote branch overriding its current content":"Push commits and tags from your local branch into the remote branch overriding its current content","You're going to override content of the remote branch. This can cause the remote repository to lose commits.":"You're going to override content of the remote branch. This can cause the remote repository to lose commits.",
"< Previous Page":"< Previous Page","Show previous page of git log":"Show previous page of git log","Show previous page of git tags":"Show previous page of git tags","Next Page >":"Next Page >","Show next page of git log":"Show next page of git log","Show next page of git tags":"Show next page of git tags","Push from your local branch into the selected remote branch":"Push from your local branch into the selected remote branch","Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.":"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",
"The content of your active branch will be replaced with ":"The content of your active branch will be replaced with ","All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?":"All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?","Resetting index...":"Resetting index...","Name:":"Name:",Tag:"Tag","Create a tag for the commit":"Create a tag for the commit","Tag name":"Tag name","Delete the tag from the repository":"Delete the tag from the repository",
"Are you sure you want to delete tag ${0}?":"Are you sure you want to delete tag ${0}?","Cherry-Pick":"Cherry-Pick","Apply the change introduced by the commit to your active branch":"Apply the change introduced by the commit to your active branch","Nothing changed.":"Nothing changed.",". Some conflicts occurred":". Some conflicts occurred","Fetch from the remote branch into your remote tracking branch":"Fetch from the remote branch into your remote tracking branch","Fetch Git Repository":"Fetch Git Repository",
Push:"Push","Push from your local branch into the remote branch":"Push from your local branch into the remote branch","Push Git Repository":"Push Git Repository","Key:":"Key:","Value:":"Value:","New Configuration Entry":"New Configuration Entry",Edit:"Edit","Edit the configuration entry":"Edit the configuration entry","Delete the configuration entry":"Delete the configuration entry","Are you sure you want to delete ${0}?":"Are you sure you want to delete ${0}?","Clone Repository":"Clone Repository",
"Clone an existing Git repository to a folder":"Clone an existing Git repository to a folder","Cloning repository: ":"Cloning repository: ","Init Repository":"Init Repository","Create a new Git repository in a new folder":"Create a new Git repository in a new folder","Initializing repository: ":"Initializing repository: ","Init Git Repository":"Init Git Repository","Delete the repository":"Delete the repository","Are you sure you want do delete ${0} repositories?":"Are you sure you want do delete ${0} repositories?",
"Apply a patch on the selected repository":"Apply a patch on the selected repository","Show content":"Show content","Commit name:":"Commit name:","Open Commit":"Open Commit","Open the commit with the given name":"Open the commit with the given name","No commits found":"No commits found","Staging changes":"Staging changes","Commit message:":"Commit message:","Committing changes":"Committing changes","Resetting local changes":"Resetting local changes","Checkout files, discarding all changes":"Checkout files, discarding all changes",
"Show Patch":"Show Patch","Show workspace changes as a patch":"Show workspace changes as a patch",Continue:"Continue","Contibue Rebase":"Contibue Rebase","Skip Patch":"Skip Patch",Abort:"Abort","Abort Rebase":"Abort Rebase","Your changes to the selected files will be discarded and cannot be recovered.":"Your changes to the selected files will be discarded and cannot be recovered.","Active Branch Log":"Git Log (Active Branch)","Show the log for the active local branch":"Show the log for the active local branch",
"Remote Branch Log":"Git Log (Remote Branch)","Show the log for the corresponding remote tracking branch":"Show the log for the corresponding remote tracking branch","See Full Status":"See Full Status","See the status":"See the status","Choose target location":"Choose target location","Default target location":"Default target location","Change...":"Change...","Merge Squash":"Merge Squash","Squash the content of the branch to the index":"Squash the content of the branch to the index","Local Branch Name:":"Local Branch Name:",
"Filter items":"Filter items","Filter remote branches":"Filter remote branches","Paste link in email or IM":"Paste link in email or IM","Show Commit in GitHub":"Show Commit in GitHub","Show Repository in GitHub":"Show Repository in GitHub","Show this commit in GitHub":"Show this commit in GitHub","Show Commit in eclipse.org":"Show Commit in eclipse.org","Show this commit in eclipse.org":"Show this commit in eclipse.org","Show Repository in eclipse.org":"Show Repository in eclipse.org","Show this repository in eclipse.org":"Show this repository in eclipse.org",
"Ask for review":"Ask for review","Ask for review tooltip":"Send email with request for commit review","Reviewer name":"Reviewer name","Contribution Review Request":"Contribution Review Request","Send the link to the reviewer":"Send the link to the reviewer","Private key file (optional):":"Private key file (optional):","Don't prompt me again:":"Don't prompt me again:","Your private key will be saved in the browser for further use":"Your private key will be saved in the browser for further use","Loading Contribution Review Request...":"Loading Contribution Review Request...",
"The commit can be found in the following repositories":"The commit can be found in the following repositories","Try to update your repositories":"Try to update your repositories","Create new repository":"Create new repository","Attach the remote to one of your existing repositories":"Attach the remote to one of your existing repositories","You are reviewing contribution ${0} from ${1}":"You are reviewing contribution ${0} from ${1}","Unfortunately the commit can not be found in your workspace. To see it try one of the following: ":"Unfortunately the commit can not be found in your workspace. To see it try one of the following: ",
"To review the commit you can also:":"To review the commit you can also:","Contribution Review Request for ${0} on ${1}":"Contribution Review Request for ${0} on ${1}","Failing paths: ${0}":"Failing paths: ${0}","Problem while performing the action":"Problem while performing the action","Clone Git Repository":"Clone Git Repository","Go to the Orion repositories page to provide a git repository URL. Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL. Once the repository is created, it will appear in the Navigator."});
define("git/nls/gitmessages",["orion/i18n!git/nls/gitmessages","git/nls/root/gitmessages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
(function(g,i){typeof define==="function"&&define.amd?define("orion/Deferred",[],i):typeof exports==="object"?module.exports=i():(g.orion=g.orion||{},g.orion.Deferred=i())})(this,function(){function g(){for(var j;j=c.shift()||b.shift();)j();a=!1}function i(j,m){(m?b:c).push(j);a||(a=!0,m?setTimeout(g,0):g())}function h(a){return function(){a.apply(null,arguments)}}function f(){}function e(){var a=Error("Cancel");a.name="Cancel";return a}function d(){function a(){for(var j;j=g.shift();){var d=j.deferred,
e=c==="resolved"?"resolve":"reject";if(typeof j[e]==="function")try{var o=j[e](b);o&&typeof o.then==="function"?(d.cancel=o.cancel||f,o.then(h(d.resolve),h(d.reject),d.progress)):d.resolve(o)}catch(u){d.reject(u)}else d[e](b)}}var b,c,g=[],q=this;this.reject=function(d){c||(c="rejected",b=d,g.length&&i(a));return q.promise};this.resolve=function(d){c||(c="resolved",b=d,g.length&&i(a));return q.promise};this.progress=function(a){c||g.forEach(function(b){b.progress&&b.progress(a)});return q.promise};
this.cancel=function(){c||q.reject(e())};this.then=function(b,m,e){var b={resolve:b,reject:m,progress:e,deferred:new d},f=b.deferred,h=this.cancel.bind(this),q=function(){i(function(){(f.cancel===q?h:f.cancel)()},!0)};f.cancel=q;m=f.promise;m.cancel=function(){f.cancel()};g.push(b);c&&i(a,!0);return m};this.promise={then:this.then,cancel:this.cancel}}var c=[],b=[],a=!1;d.all=function(a,b){function c(a,b){h||(g[a]=b,--f===0&&k.resolve(g))}function e(a,j){if(!h){if(b)try{c(a,b(j));return}catch(d){j=
d}k.reject(j)}}var f=a.length,g=[],h=!1,k=new d;k.then(null,function(){h=!0;a.forEach(function(a){a.cancel&&a.cancel()})});f===0?k.resolve(g):a.forEach(function(a,b){a.then(c.bind(null,b),e.bind(null,b))});return k.promise};d.when=function(a,b,c,e){var f;if(!(a&&typeof a.then==="function"))f=new d,f.resolve(a),a=f.promise;return a.then(b,c,e)};return d});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var h=this._namedListeners[g.type];h&&h.forEach(function(f){try{typeof f==="function"?f(g):f.handleEvent(g)}catch(e){typeof console!=="undefined"&&console.log(e)}});return!g.defaultPrevented},addEventListener:function(g,h){if(typeof h==="function"||h.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(h)},
removeEventListener:function(g,h){var f=this._namedListeners[g];if(f)for(var e=0;e<f.length;e++)if(f[e]===h){f.length===1?delete this._namedListeners[g]:f.splice(e,1);break}}};g.prototype.constructor=g;g.attach=function(i){var h=new g;i.dispatchEvent=h.dispatchEvent.bind(h);i.addEventListener=h.addEventListener.bind(h);i.removeEventListener=h.removeEventListener.bind(h)};return g});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,i){function h(b,a,j){this._properties=j||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function f(b,a,j){this._serviceId=b;this._serviceReference=a;this._internalRegistry=j}function e(b,a){function j(j){return function(){var c;try{if(!a())throw Error("Service was unregistered");var m=b[j].apply(b,Array.prototype.slice.call(arguments));if(m&&typeof m.then==="function")return m;
else c=new g,c.resolve(m)}catch(d){c=new g,c.reject(d)}return c.promise}}for(var c in b)typeof b[c]==="function"&&(this[c]=j(c))}function d(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var j=b._entries[a];if(!j)throw Error("already unregistered");var c=j.reference;b._serviceEventTarget.dispatchEvent(new d("unregistering",
c));b._entries[a]=null;c.getProperty("objectClass").forEach(function(a){for(var j=b._namedReferences[a],d=0;d<j.length;d++)if(j[d]===c){j.length===1?delete b._namedReferences[a]:j.splice(d,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new d("modified",a.reference))}}}h.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&b.push(a);return b},getProperty:function(b){return this._properties[b]}};
h.prototype.constructor=h;f.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("already unregistered");return this._serviceReference},setProperties:function(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
f.prototype.constructor=f;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,j){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var c=this._entries.length,g=new h(c,b,j),l=this._namedReferences;b.forEach(function(a){l[a]=l[a]||[];l[a].push(g)});b=new e(a,this._internalRegistry.isRegistered.bind(null,c));this._entries.push({reference:g,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new d("registered",g));return new f(c,g,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,
a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(g){function i(g,f,e,d){var c=typeof e.response!=="undefined"?e.response:e.responseText,b;try{b=e.status}catch(a){b=0}g={args:f,response:c,responseText:typeof c==="string"?c:null,status:b,url:g,xhr:e};if(typeof d!=="undefined")g.error=d;return g}return function(h,f,e){var e=e||{},d=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new g,b=e.headers||{},a=e.log||!1,j;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof e.data!=="undefined"&&(h==="POST"||h==="PUT"))j=e.data;if(typeof e.responseType==="string")d.responseType=e.responseType;d.onprogress=function(a){a.xhr=d;c.progress(a)};d.onreadystatechange=function(){if(d.readyState===4){var b=i(f,e,d),j=d.status;200<=j&&j<400?c.resolve(b):(a&&typeof console!=="undefined"&&console.log(Error(d.statusText)),c.reject(b))}};try{d.open(h,f,!0);if(typeof e.timeout==="number")if(typeof d.timeout==="number")d.timeout=e.timeout,d.addEventListener("timeout",function(){c.reject(i(f,
e,d,"Timeout exceeded"))});else{var m=setTimeout(function(){c.reject(i(f,e,d,"Timeout exceeded"))},e.timeout);c.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(b).forEach(function(a){d.setRequestHeader(a,b[a])});d.send(j)}catch(p){c.reject(i(f,e,d,p))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,i,h){function f(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function e(a,b){return{get:function(c,d){if(b===0)return null;var e=localStorage.getItem(a+c);if(e===null)return null;e=JSON.parse(e);return d||b===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(c,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+1E3*b;
if(Object.keys(d).length===0)localStorage.removeItem(a+c);else{var e=JSON.stringify(d);localStorage.setItem(a+c,e);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function d(a){this._currentPromises={};this._cache=new e("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function c(a){this._location=
a;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function b(){this._cache=new e("/orion/preferences/local",-1)}function a(a,m){this._userProvider=new d(a);this._localProvider=new b;m=m||"defaults.pref";m.indexOf("://")===-1&&(m=g.toUrl(m));this._defaultsProvider=new c(m);this._serviceRegistration=a.registerService("orion.core.preference",this)}f.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[b].put(this._name,c))}this._dirty=[];return i.all(a)},_scheduleFlush:function(a){this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._cached=null,this._scheduleFlush(c),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]=
{},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],d=0;d<this._providers.length;++d)c.push(this._providers[d].get(this._name,a).then(function(a){return function(j){b._stores[a]=j}}(d)));return i.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};d.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new i,d=null;
b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromises[a]=c;var e=this;this._service.get(a).then(function(b){e._cache.set(a,b);delete e._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},e._cache.set(a,b),delete e._currentPromises[a],c.resolve(b)):(delete e._currentPromises[a],c.resolve(e._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var c=new i,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromise=c;var e=this;h("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);e._cache.set(a,b[a]||{});e._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(e._cache.set(a,{}),e._currentPromise=null,c.resolve({})):(e._currentPromise=null,b=e._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new i;a.resolve();return a}};b.prototype={get:function(a){var b=new i,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new i;this._cache.set(a,b);c.resolve();return c}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(b,c){if(!c||typeof c!=="number"||c>7||c<1)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|
a.USER_SCOPE;var d=[];a.USER_SCOPE&c&&this._userProvider.available()&&d.push(this._userProvider);a.LOCAL_SCOPE&c&&d.push(this._localProvider);a.DEFAULT_SCOPE&c&&d.push(this._defaultsProvider);var e=new f(b,d);return e.sync().then(function(){return e})},getSetting:function(a,b,c){for(var d,e=0;e<a.length;e++)if(a[e].label===b)for(var f=0;f<a[e].data.length;f++)if(a[e].data[f].label===c){d=a[e].data[f].value;break}return d}};return{PreferencesService:a}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(g,i){function h(a,b){var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;c.sort();d.sort();for(var e=0,f=c.length;e<f;e++){var g=c[e];if(g!==d[e])return!1;var h=a[g],g=b[g];if(h!==g&&JSON.stringify(h)!==JSON.stringify(g))return!1}return!0}function f(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function e(a){var b=null;return{key:function(c){return(b=b||
Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,d){a[c]=d;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function d(a,b){return{type:a,plugin:b}}function c(a,b,c){function e(a,b,j){if(!B)return(new g).reject(Error("plugin not connected"));var d=y++,f=new g;f.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:d,cancel:a.message||"Cancel"},
B)});J[String(d)]=f;c.postMessage({id:d,serviceId:a,method:b,params:j},B);return f.promise}function f(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return v==="active"?e(a.serviceId,c,b):o.start({"transient":!0}).then(function(){return e(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new i;b.dispatchEvent=c.dispatchEvent.bind(c);var j=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||
j(a);c.addEventListener(a,b)};var d=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&d(a)}}return b}function q(b){var c=JSON.parse(JSON.stringify(b.properties));c.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);c.objectClass=b;return c}function r(a){var b=f(a),j=q(a),j=c.registerService(a.names||a.type,b,j);A[a.serviceId]={registration:j,proxy:b}}function n(){c.persist(a,{created:u,headers:t,services:s,autostart:w,lastModified:D})}
function k(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var j=a.params[0];C({headers:j.headers,services:j.services}).then(function(){x.resolve(o)})}else if("dispatchEvent"===a.method){var d=A[a.serviceId].proxy;d.dispatchEvent.apply(d,a.params)}else if("progress"===a.method)b=J[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)x&&x.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=J[String(a.id)],delete J[String(a.id)],
a.error){var e=c.handleServiceError(o,a.error);b.reject(e)}else b.resolve(a.result)}catch(f){console.log("Plugin._responseHandler "+f)}}var o=this,b=b||{},u=b.created||(new Date).getTime(),t=b.headers||{},s=b.services||[],w=b.autostart,D=b.lastModified||0,v="installed",F,x,B,A={},y=0,J={},C;this._persist=n;this._resolve=function(){v="resolved";c.dispatchEvent(new d("resolved",o))};this._getAutostart=function(){return w};this._getCreated=function(){return u};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(t))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return D};this.getServiceReferences=function(){var a=[];Object.keys(A).forEach(function(b){a.push(A[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));
if(F)return F.promise.then(this.start.bind(this,b));if(v==="active")return(new g).resolve();if(!b||!b["transient"]){var j=b&&b.lazy?"lazy":"started";j!==w&&(w=j,n())}j=c.getState();if(j!=="starting"&&j!=="active")return b["transient"]?(new g).reject(Error("start transient error")):(new g).resolve();if(v==="installed")try{this._resolve()}catch(e){return(new g).reject(e)}v==="resolved"&&s.forEach(function(a){r(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",c.dispatchEvent(new d("lazy activation",
o))),(new g).resolve();var f=new g;F=f;v="starting";c.dispatchEvent(new d("starting",o));x=new g;B=c.connect(a,k);x.then(function(){x=null;v="active";c.dispatchEvent(new d("started",o));F=null;f.resolve()},function(){x=null;v="stopping";c.dispatchEvent(new d("stopping",o));Object.keys(A).forEach(function(a){A[a].registration.unregister();delete A[a]});c.disconnect(B);B=null;v="resolved";F=null;c.dispatchEvent(new d("stopped",o));f.reject(Error("plugin activation error"))});return f.promise};this.stop=
function(a){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(F)return F.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==w)w="stopped",n();if(v!=="active"&&v!=="starting")return(new g).resolve();F=a=new g;v="stopping";c.dispatchEvent(new d("stopping",o));Object.keys(A).forEach(function(a){A[a].registration.unregister();delete A[a]});B&&(c.disconnect(B),B=null);v="resolved";F=null;c.dispatchEvent(new d("stopped",o));a.resolve();return a.promise};
C=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!b)return D===0&&(D=(new Date).getTime(),n()),c.loadManifest(a).then(C);var j=t,e=s,f=w;t=b.headers||{};s=b.services||{};w=b.autostart||w;b.lastModified?D=b.lastModified:(D=(new Date).getTime(),n());if(h(t,j)&&h(s,e)&&w===f)return(new g).resolve();if(v==="active"||v==="starting"){var p=[];Object.keys(s).forEach(function(a){var b=s[a];p.push(a);var c=A[a];if(c){if(h(b.methods,Object.keys(c.proxy))){var a=q(b),
j=c.registration.getReference(),d={};j.getPropertyKeys().forEach(function(a){d[a]=j.getProperty(a)});h(a,d)||c.registration.setProperties(a);return}c.registration.unregister();delete A[a]}r(b)});Object.keys(A).forEach(function(a){p.indexOf(a)===-1&&(A[a].registration.unregister(),delete A[a])})}v==="active"&&(c.disconnect(B),x=new g,B=c.connect(a,k),x.then(function(){x=null},function(){x=null;v="stopping";c.dispatchEvent(new d("stopping"),o);Object.keys(A).forEach(function(a){A[a].registration.unregister();
delete A[a]});c.disconnect(B);B=null;v="resolved";c.dispatchEvent(new d("stopped",o))}));return(new g).resolve()};this.update=function(a){return C(a).then(function(){c.dispatchEvent(new d("updated",o))})};this.uninstall=function(){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));c.removePlugin(this);v="uninstalled";c.dispatchEvent(new d("uninstalled",
o));return(new g).resolve()}}var b=/^http[s]?/i;return{Plugin:c,PluginRegistry:function(a,j){function m(a){var b=a.source;r.some(function(c){if(b===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},p=j.storage||localStorage;p.getItem||(p=e(p));var h="installed",q=[],r=[],n=new i,k={},o={registerService:a.registerService.bind(a),connect:function(a,b,c){function d(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var e={handler:b,url:a},m=setTimeout(d.bind(null,"Load timeout for: "+a),c||15E3),f=document.createElement("iframe");f.name=a+"_"+(new Date).getTime();if(!j.visible)f.style.display="none",f.style.visibility="hidden";f.src=a;f.onload=function(){clearTimeout(m);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};f.sandbox="allow-scripts allow-same-origin";document.body.appendChild(f);e.target=f.contentWindow;e.close=function(){f&&
(document.body.removeChild(f),f=null)};r.push(e);return e},disconnect:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<q.length;b++)if(a===q[b]){q.splice(b,1);break}p.removeItem("plugin."+a.getLocation())},persist:function(a,b){p.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{n.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new g,c=o.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],o.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(o.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return h},handleServiceError:function(a,c){if(c&&c.status===401){var j=a.getHeaders(),d=a.getName()||a.getLocation(),e=document.createElement("span");e.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(j.login)e.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=j.login,b.test(d.href)?(e.appendChild(d),e.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+j.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(e)}}if(c.__isError){var m=c,c=Error(m.message);Object.keys(m).forEach(function(a){c[a]=m[a]});delete c.__isError}return c}};this.getLocation=
function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=o.getState;this.init=function(){if(!(h==="starting"||h==="active"||h==="stopping")){addEventListener("message",m,!1);for(var a=[],b=0,d=p.length;b<d;b++)a.push(p.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(p.getItem(a));a.created&&q.push(new c(b,a,o))}});
q.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=f(a);if(!this.getPlugin(a)){var b=j.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||j.defaultAutostart||"lazy";q.push(new c(a,b,o))}}.bind(this));h="starting"}};this.start=function(){h!=="starting"&&this.init();if(h!=="starting")return(new g).reject("Cannot start framework. Framework is already "+h+".");var a=[],b=(new Date).getTime();q.forEach(function(c){var j=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===j)return c.start({"transient":!0});if("lazy"===j)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===j?a.push(c.start({"transient":!0})):"lazy"===j?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){h="active"})};this.stop=function(){if(h!=="starting"&&h!=="active")return(new g).reject("Cannot stop registry. Registry is already "+
h+".");h="stopping";var a=[];q.forEach(function(b){a.push(b.stop({"transient":!0}))});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",m);h="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=f(a),j=this.getPlugin(a);if(j)return(new g).resolve(j);if(k[a])return k[a];if(b)return j=new c(a,b,o),q.push(j),
j._persist(),o.dispatchEvent(new d("installed",j)),(new g).resolve(j);var e=o.loadManifest(a).then(function(b){j=new c(a,b,o);q.push(j);j._persist();delete k[a];o.dispatchEvent(new d("installed",j));return j},function(b){delete k[a];throw b;});return k[a]=e};this.getPlugins=function(){return q.slice()};this.getPlugin=function(a){var b=null,a=f(a);q.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=n.addEventListener.bind(n);this.removeEventListener=n.removeEventListener.bind(n);
this.resolvePlugins=function(){var a=!0;q.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function g(f,e){function d(c){var j=c.getProperty("service.id"),d=this.addingService(c);d&&(b[j]=c,a[j]=d)}function c(c){var j=c.getProperty("service.id"),d=a[j];delete b[j];delete a[j];this.removedService(c,d)}this.serviceRegistry=f;var b={},a={},j=i,m,g;this.close=function(){if(j!==h)throw"Already closed";j=i;f.removeEventListener("registered",m);f.removeEventListener("unregistering",g);g=m=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return b.length?Object.keys(b).map(function(a){return b[a]}):null};this.open=function(){if(j!==i)throw"Already open";j=h;var a=this;m=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(e)!==-1&&(d.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};g=function(b){b.serviceReference.getProperty("objectClass").indexOf(e)!==
-1&&c.call(a,b.serviceReference)};f.addEventListener("registered",m);f.addEventListener("unregistering",g);f.getServiceReferences(e).forEach(function(b){d.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,h=1;g.prototype={addingService:function(f){return this.serviceRegistry.getService(f)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return g});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(g,i){var h,f,e,d,c,b="pid";h=function(a,c,d){function e(a,b,j){b.forEach(function(d,e){try{var f=a[e].getProperty("__plugin__"),g=f&&c.getPlugin(f);(!f||g&&g.getState()==="active")&&b[e].updated(j)}catch(p){typeof console!=="undefined"&&console.log(p)}})}i.call(this,a,"orion.cm.managedservice");var f={},h={},n=function(c){var e=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var m=c.getProperty(b),c=a.getService(c);m&&c&&(m=(m=d._find(m))&&m.getProperties(),e.push(c.updated(m)))}});return g.all(e)};this.addingService=function(c){var d=c.getProperty(b),e=a.getService(c);if(!d||!e)return null;f[d]||(f[d]=[]);h[d]||(h[d]=[]);f[d].push(c);h[d].push(e);return e};this.onServiceAdded=function(a,c){var j=a.getProperty(b),j=d._find(j);e([a],[c],j&&j.getProperties())};this.onOpen=function(){c.addEventListener("started",n)};this.onClose=function(){c.removeEventListener("started",
n)};this.notifyUpdated=function(a){var b=a.getPid();e(f[b]||[],h[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();e(f[a]||[],h[a]||[],null)};this.removedService=function(a,c){var j=a.getProperty(b),d=f[j],e=h[j];d.length>1?d.splice(d.indexOf(a),1):delete f[j];e.length>1?e.splice(e.indexOf(c),1):delete h[j]}};f=function(){function a(b,c,j){this.store=new e(this,j);this.configAdmin=new d(this,this.store);this.tracker=new h(b,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();d=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var a="/cm/configurations";
e=function(){function j(j,d){this.factory=j;this.prefsService=d;this.configs=Object.create(null);this.pref=null;var e=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){e.pref=a;a.keys().forEach(function(j){if(!e.configs[j]){var d=a.get(j);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[b]=j,e.configs[j]=new c(e.factory,e,d))}})})}j.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new c(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return j}();c=function(){function a(b){for(var c={},j=Object.keys(b),d=0;d<j.length;d++){var e=j[d],f=b[e];c[e]=f instanceof Array?f.slice():f}return c}function c(d,e,f){this.factory=
d;this.store=e;if(f!==null&&typeof f==="object")this.pid=f[b],d=a(f),delete d[b],this.properties=d;else if(typeof f==="string")this.pid=f,this.properties=null;else throw Error("Invalid pid/properties "+f);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(c){this._checkRemoved();var d=null;if(this.properties&&(d=a(this.properties),!c))d[b]=this.pid;return d},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(c){this._checkRemoved();c=a(c);delete c[b];this.properties=c;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return c}();return{ConfigurationAdminFactory:f}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,i,h,f,e,d){var c;return{startup:function(){if(c)return c;c=new i;var b=window.serviceRegistry=new h.ServiceRegistry,a=new f.PreferencesService(b);return a.getPreferences("/plugins").then(function(j){var f={plugins:{}};j.keys().forEach(function(a){var b=g.toUrl(a);f.plugins[b]=j[a]});var h=window.pluginRegistry=new e.PluginRegistry(b,f);return h.start().then(function(){if(b.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=g.toUrl(a);h.getPlugin(a)||b.push(h.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(b,function(a){console.log(a)})})}).then(function(){return(new d.ConfigurationAdminFactory(b,h,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var c=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){window.location=a})}),j=localStorage.getItem("lastLogin");if(!j||j<(new Date).getTime()-9E5)return c}}).then(function(){var j={serviceRegistry:b,preferences:a,pluginRegistry:h};c.resolve(j);return j})})}}});
define("orion/webui/littlelib",["require"],function(){function g(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b,a){var c=b.compareDocumentPosition(a);return b===a||Boolean(c&16)}function h(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=h(b.childNodes[a]);if(c)return c}return null}function f(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=f(b.childNodes[a]);if(c)return c}return null}function e(b,
a){if(b.nodeType===3){var c=d.exec(b.nodeValue);c&&c.length>1&&b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)e(b.childNodes[c],a)}var d=/\$\{([^\}]+)\}/,c=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:g,$$array:function(b,a){return Array.prototype.slice.call(g(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:i,bounds:function(b){b=b.getBoundingClientRect();
return{left:b.left+document.body.scrollLeft,top:b.top+document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:h,lastTabbable:f,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:e,addAutoDismiss:function(b,a){c.length===0&&document.addEventListener("click",function(a){for(var b=[],d=0;d<c.length;d++){for(var e=c[d].excludeNodes,f=c[d].dismiss,g=!1,h=!0,k=0;k<
e.length;k++)if((g=document.compareDocumentPosition(document,e[k])!==1)&&i(e[k],a.target)){h=!1;break}h&&(f(),g=document.compareDocumentPosition(document,e[k])!==1);g&&b.push(c[d])}c=b},!0);c.push({excludeNodes:b,dismiss:a})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
" is already a favorite.":" is already a favorite.","Add to the favorites list":"Add to the favorites list","Make Favorite":"Make Favorite","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was "," has been added to the favorites list.":" has been added to the favorites list.",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Report a Bug",
"Privacy Policy":"Privacy Policy","Terms of Use":"Terms of Use","Copyright Agent":"Copyright Agent","Orion Logo":"Orion Logo","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"Orion build I20130222-1257. See the FAQ for terms of service","Add this page to the favorites list":"Add this page to the favorites list","LOG: ":"LOG: ",Switch:"Switch","Switch the type of outliner used":"Switch the type of outliner used",
Outliner:"Outliner","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?","Orion Home":"Orion Home","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",Operations:"Operations","Operations running":"Operations running",
"Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?","You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.",
Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Open in new tab":"Open in new tab","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",
"Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Outliner":"Toggle Outliner","Sample HTML5 Site":"Sample HTML5 Site","Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin",
"Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion."});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(g,i){function h(f){this._init(f)}h.prototype={_init:function(f){this._node=i.node(f.node);if(!this._node)throw"no dom node for tooltip found";this._position=f.position||["right","above","below","left"];this._text=f.text;this._hideDelay=f.hideDelay===void 0?200:f.hideDelay;this._tailSize=f.tailSize||10;this._trigger=f.trigger||"mouseover";this._afterShowing=f.afterShowing;this._afterHiding=f.afterHiding;var e=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===e._node&&(e.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=f.showDelay===void 0?1E3:f.showDelay;f=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(e._node,c.target)&&(e.show(),i.stop(c))},!1);for(var d=0;d<f.length;d++)this._node.addEventListener(f[d],function(c){i.contains(e._node,c.target)&&e.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var f=this;i.addAutoDismiss([this._tip,this._node],function(){f.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),
this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(f._timeout)window.clearTimeout(f._timeout),f._timeout=null;f._tip.addEventListener("mouseout",function(e){i.contains(f._tip,e.target)&&(f.hide(),i.stop(e))},!1)},!1)}return this._tip},_positionTip:function(f,e){this._makeTipNode();if(this._tailBorder)this._tip.removeChild(this._tailBorder),this._tailBorder=null,this._tip.removeChild(this._tail),this._tail=null;f==="left"?this._tipInner.classList.add("left"):
this._tipInner.classList.remove("left");var d=i.bounds(this._node),c=i.bounds(this._tipInner),b;switch(f){case "above":b=d.top-c.height-this._tailSize-1;d=d.left-this._tailSize;break;case "below":b=d.top+d.height+this._tailSize+1;d=d.left-this._tailSize;break;case "left":b=d.top-this._tailSize/2;d=d.left-c.width-this._tailSize-1;break;default:b=d.top-this._tailSize/2,d=d.left+d.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(b+c.height>a.height)if(e)b=a.height-c.height-1;else return!1;
if(d+c.width>a.width)if(e)d=a.width-c.width-1;else return!1;if(d<0)if(e)d=4;else return!1;if(b<0)if(e)b=4;else return!1;this._tailBorder=document.createElement("span");this._tailBorder.classList.add("tooltipTailBorderFrom"+f);this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+f);f==="above"||f==="left"?(this._tip.appendChild(this._tailBorder),this._tip.appendChild(this._tail)):(this._tip.insertBefore(this._tailBorder,this._tipInner),this._tip.insertBefore(this._tail,
this._tipInner));this._tip.style.top=b+"px";this._tip.style.left=d+"px";this._tip.style.width=c.width+"px";this._tip.style.height=c.height+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var f=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var e=!1,d=0;!e&&d<f._position.length;)e=f._positionTip(f._position[d]),
d++;e||f._positionTip(f._position[0],!0);f._tip.classList.add("tooltipShowing");f._afterShowing&&f._afterShowing()},this._showDelay)}},hide:function(f){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(f===void 0)f=this._hideDelay;var e=this;this._timeout=window.setTimeout(function(){e._tip.classList.remove("tooltipShowing");e._afterHiding&&e._afterHiding()},f)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tailBorder=this._tail=this._tipInner=this._tip=null}};h.prototype.constructor=h;return{Tooltip:h}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","Populating favorites...":"Populating favorites...",Favorite:"Favorite","Searching...":"Searching...",name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",
test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:","Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination",
"Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'."});define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,i,h,f){function e(){}e.prototype={_initialize:function(d,c,b,a,j){this._tooltip=new f.Tooltip({node:d,hideDelay:j||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";d=document.createRange();d.selectNode(this.$parent);d=d.createContextualFragment(this.TEMPLATE);
this.messages&&h.processTextNodes(d,g);this.$parent.appendChild(d);var e=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===h.KEY.ESCAPE&&e.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
h.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};e.prototype.constructor=e;return{PopupDialog:e}});
define("orion/PageUtil",[],function(){var g=/^http[s]?/i;return{matchResourceParameters:function(g){var g=g||window.location.toString(),h={resource:""},f=g.indexOf("#");if(f!==-1&&(g=g.substring(f+1),g.length!==0)){g=g.split(",");Object.defineProperty(h,"resourceRaw",{value:g[0]});h.resource=decodeURIComponent(g[0]);for(f=1;f<g.length;f++){var e=/([^=]*)(=?)(.*)/.exec(g[f]),d=decodeURIComponent(e[1]||""),e=decodeURIComponent(e[3]||"");d!==""&&d!=="resource"&&(h[d]=e)}}return h},validateURLScheme:function(i,
h){var f=i;if(i.indexOf("://")===-1){var e=document.createElement("a");e.href=i;f=e.href}e=!1;return(e=h?h.some(function(d){return RegExp("^"+d+":","i").test(f)}):g.test(f))?i:(console.log("Illegal URL Scheme: '"+i+"'"),"")}}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,i){function h(f){var e=window.navigator.platform.indexOf("Mac")!==-1;return e&&f.metaKey||!e&&f.ctrlKey}return{getUserKeyString:function(f){var e="",d=navigator.platform.indexOf("Mac")!==-1;f.mod1&&(e+=d?"Cmd+":"Ctrl+");f.mod2&&(e+="Shift+");f.mod3&&(e+="Alt+");f.mod4&&d&&(e+="Ctrl+");if(f.alphaKey)return e+f.alphaKey;for(var c in i.KEY)if(typeof(i.KEY[c]==="number")&&i.KEY[c]===f.keyCode)return e+c;var b;switch(f.keyCode){case 59:b=
f.mod2?":":";";break;case 61:b=f.mod2?"+":"=";break;case 188:b=f.mod2?"<":",";break;case 190:b=f.mod2?">":".";break;case 191:b=f.mod2?"?":"/";break;case 192:b=f.mod2?"~":"`";break;case 219:b=f.mod2?"{":"[";break;case 220:b=f.mod2?"|":"\\";break;case 221:b=f.mod2?"}":"]";break;case 222:b=f.mod2?'"':"'"}return b?e+b:f.keyCode>=112&&f.keyCode<=123?e+"F"+(f.keyCode-111):e+String.fromCharCode(f.keyCode)},getUserText:function(f,e,d,c,b,a,j,m,g){var h=!1,j=function(j){return function(m){if(!h){var k=i.node(f),
o=k.value;if(k)if(j&&m.keyCode===i.KEY.ESCAPE){if(d)e.style.display="inline";k.parentNode.removeChild(k);h=!0;a&&a()}else if(!(j&&m.keyCode!==i.KEY.ENTER)){if(o.length===0||!g&&o===c){if(d)e.style.display="inline"}else b(o);h=!0;k.parentNode&&k.parentNode.removeChild(k);a&&a()}}}},q=document.createElement("input");q.id=f;q.value=c||"";e.parentNode.insertBefore(q,e.nextSibling);q.classList.add("userEditBoxPrompt");if(d)e.style.display="none";q.addEventListener("keydown",j(!0),!1);q.addEventListener("blur",
j(!1),!1);window.setTimeout(function(){q.focus();if(c){var a=i.node(f),b=m?c.indexOf(m):-1;if(b>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",b),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,b);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=b}else a.select()}},0)},openInNewWindow:h,followLink:function(f,e){e&&h(e)?window.open(f):window.location=f},createButton:function(f,e){var d=document.createElement("span");
d.role="button";d.tabIndex=0;d.appendChild(document.createTextNode(f));d.className="commandButton commandMargins";d.addEventListener("click",function(c){e();i.stop(c)},!1);d.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)e(),i.stop(c)},!1);return d}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(g,i){function h(f){this._init(f)}h.prototype={_init:function(f){this._dropdownNode=i.node(f.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=f.populate;var e=this;this._triggerNode.addEventListener("click",function(d){e.toggle()&&i.stop(d)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(d){if(d.keyCode===i.KEY.ENTER||d.keyCode===i.KEY.SPACE)e.toggle(),i.stop(d)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")?this.close():this.open()},open:function(){this._populate&&(this.empty(),this._populate(this._dropdownNode));var f=this.getItems();if(f.length>0){if(!this._hookedAutoDismiss)i.addAutoDismiss([this._triggerNode,
this._dropdownNode],this.close.bind(this)),this._hookedAutoDismiss=!0;this._positionDropdown();this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");f[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var f=i.bounds(this._dropdownNode),e=i.bounds(this._boundingNode(this._triggerNode));if(f.left+f.width>e.left+e.width)this._dropdownNode.style.right=0},_boundingNode:function(f){return f.style.right!==""||
f.style.position==="absolute"||!f.parentNode||!f.parentNode.style?f:this._boundingNode(f.parentNode)},close:function(f){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");f&&this._triggerNode.focus();return!0},getItems:function(){var f=[],e=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(d){d.parentNode.parentNode===e._dropdownNode&&f.push(d)});return f},empty:function(){var f=this;
i.$$array("li",this._dropdownNode).forEach(function(e){e.parentNode===f._dropdownNode&&e.parentNode.removeChild(e)})},_dropdownKeyDown:function(f){if(f.keyCode===i.KEY.UP||f.keyCode===i.KEY.DOWN||f.keyCode===i.KEY.RIGHT||f.keyCode===i.KEY.ENTER||f.keyCode===i.KEY.LEFT){var e=this.getItems(),d=document.activeElement;if(e.length&&e.length>0&&d){var c=e.indexOf(d);c>=0&&(f.keyCode===i.KEY.UP&&c>0?(c--,e[c].focus()):f.keyCode===i.KEY.DOWN&&c<e.length-1?(c++,e[c].focus()):f.keyCode===i.KEY.ENTER||f.keyCode===
i.KEY.RIGHT?d.classList.contains("dropdownTrigger")&&d.dropdown&&d.dropdown.open():f.keyCode===i.KEY.LEFT&&d.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(f))}}else f.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(f))}};h.prototype.constructor=h;return{Dropdown:h}});
define("orion/explorers/navigationUtils",[],function(){function g(g,f){if(!i&&g)g.push({domNode:f}),f.tabIndex=-1,f.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(h,f,e){h&&(h=h.getGridNavHolder(f,!0))&&g(h,e)},generateNavGrid:g,removeNavGrid:function(g,f){if(g)for(var e=0;e<g.length;e++)if(g[e].domNode===f){g.splice(e,1);break}}}});
define("orion/commands","i18n!orion/nls/messages,require,orion/uiUtils,orion/PageUtil,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,orion/explorers/navigationUtils".split(","),function(g,i,h,f,e,d,c,b){function a(a,b,c,j,d){this.commandService=a;this.handler=b;this.items=c;this.userData=j;this.command=d;if(d.parameters)this.parameters=d.parameters.makeCopy();this.id=d.id}function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function m(a,b,c){b.classList.add("commandImage");var j;a.imageClass?(j=document.createElement("span"),b.appendChild(j),j.classList.add(a.spriteClass),j.classList.add(a.imageClass)):(j=new Image,j.alt=a.name,j.name=c,j.id=c,j.src=a.image,b.appendChild(j));return j}function p(a){this._init(a)}function l(a,b,c,j,d,f,m){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=c!==void 0&&c!==null?c:!1;this.mod3=
j!==void 0&&j!==null?j:!1;this.mod4=d!==void 0&&d!==null?d:!1;this.domScope=e.node(f);this.scopeName=m||(f?f.id:null)}function q(a,b){this.token=a;this.parameterName=b}function r(a,b,c,j,d){this.name=a;this.type=b;this.label=c;this.value=j;this.lines=d||1}function n(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}var k=window.navigator.platform.indexOf("Mac")!==
-1;a.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(b){var c=new a(this.commandService,this.handler,this.items,this.userData,this.command);c.domNode=this.domNode;c.domParent=this.domParent;if(b)c.parameters=b.makeCopy();else if(this.parameters)c.parameters=this.parameters.makeCopy();return c}};a.prototype.constructor=a;j.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",
this);this._defaultSelectionService=a.selection;var b=this;window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(k){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;
else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;var c=a.target.nodeName.toLowerCase();if(c==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(c===
"textarea")return}b._processKey(a)},!1)},_processKey:function(a){function b(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var c in this._activeBindings)if(this._activeBindings[c]&&this._activeBindings[c].keyBinding&&this._activeBindings[c].command&&this._activeBindings[c].keyBinding.match(a)){var j=this._activeBindings[c],d=j.invocation;if(d)if(j=j.command,j.hrefCallback){b(a);a=j.hrefCallback.call(d.handler||window,d);a.then?a.then(function(a){window.open(a)}):window.open(a);
break}else if(j.callback){b(a);var e=this;window.setTimeout(function(){e._invoke(d)},0);break}}},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var j=this._urlBindings[b],d=j.command,e=j.invocation;if(e&&e.parameters&&d.callback){e.parameters.setValue(c.parameterName,c.parameterValue);var f=this;window.setTimeout(function(){f._invoke(e)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,j,d){c?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(c):1)&&b.callback&&this._invoke(new a(this,j,c,null,b),d):(c=this._urlBindings[b])&&c.command&&c.command.callback&&this._invoke(c.invocation,d)},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),
this._parameterCollector.open(a,b,c))},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,b){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var j=!1;a.parameters.updateParameters(a);j=this._parameterCollector.collectParameters(a);
if(!j){var d=new c.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),j=d.contentContainer();j.classList.add("parameterPopup");var e=window.document.activeElement,f=this._parameterCollector.getFillFunction(a,function(){e&&e.focus();d.destroy()})(j);d.show();window.setTimeout(function(){f.focus();f.select()},0);j=!0}j||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},
collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){var b={},c,j,d,e;for(e in this._activeBindings)if((j=this._activeBindings[e])&&j.keyBinding&&j.command)j.keyBinding.scopeName?(b[j.keyBinding.scopeName]||(b[j.keyBinding.scopeName]=[]),b[j.keyBinding.scopeName].push(j)):(c=h.getUserKeyString(j.keyBinding),d=document.createElement("span"),d.role="listitem",d.appendChild(document.createTextNode(c+" = "+j.command.name)),d.appendChild(document.createElement("br")),
a.appendChild(d));for(var f in b)if(b[f].length&&b[f].length>0){c=document.createElement("h2");a.appendChild(c);c.appendChild(document.createTextNode(f));for(e=0;e<b[f].length;e++)j=b[f][e],c=h.getUserKeyString(j.keyBinding),d=document.createElement("span"),d.role="listitem",d.appendChild(document.createTextNode(c+" = "+j.command.name)),d.appendChild(document.createElement("br")),a.appendChild(d)}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,j,d,e){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(j)a[b].title=j;if(c)a[b].position=c;a[b].emptyGroupMessage=e}else a[b]={title:j,position:c,emptyGroupMessage:e,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),j=0;j<c.length;j++)if(c[j].length>1)a[c[j]]||(a[c[j]]={position:0,children:{}}),a=a[c[j]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,j,d,e,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];j&&(a=this._createEntryForPath(a,j));a[b]={position:c};e&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:e,bindingOnly:d});f&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:f,bindingOnly:d});a.sortedContributions=
null},_checkForTrailingSeparator:function(a,b,c){var j;if(b==="tool"||b==="button")if((j=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&j.classList.contains("commandSeparator"))return c?(a.removeChild(j),!1):!0;if(b==="menu"&&(a=e.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(j=a[a.length-1],c)j.parentNode.parentNode.removeChild(j.parentNode);else return!0;return!1},renderCommands:function(a,b,c,j,d,f,m){if(typeof a!=="string")throw"a scope id for rendering must be specified";
b=e.node(b);if(!b)throw"no parent";var g=this._contributionsByScopeId[a];if(!c&&g){var c=g.localSelectionService||this._defaultSelectionService,h=this;c&&c.getSelections(function(c){h.renderCommands(a,b,c,j,d,f)})}else g&&(this._render(this._contributionsByScopeId[a],b,c,j,d||"button",f,m),this._checkForTrailingSeparator(b,d,!0))},destroy:function(a){a=e.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();
this.destroy(b);a.removeChild(b)}},_render:function(j,d,e,f,m,g,h){var p=j.sortedContributions;if(!p){var p=[],l=!1,k;for(k in j)if(!j.hasOwnProperty||j.hasOwnProperty(k)){var i=j[k];if(i&&typeof i.position==="number")i.id=k,p.push(i),l=!0}if(l)p.sort(function(a,b){return a.position-b.position}),j.sortedContributions=p}for(j=0;j<p.length;j++){var q;if(p[j].children&&Object.getOwnPropertyNames(p[j].children).length>0){var i=p[j],l=p[j].children,n=this,r;if(m==="tool"||m==="button")if(i.title){r=this._createDropdownMenu(d,
i.title);h&&b.generateNavGrid(h,r.menuButton);var N=l,M=i;window.setTimeout(function(){n._render(N,r.menu,e,f,"menu",g,h);n._checkForTrailingSeparator(r.menu,"menu",!0);if(r.menu.childNodes.length===0)if(M.emptyGroupMessage){if(!r.menuButton.emptyGroupTooltip)r.menuButton.emptyGroupTooltip=new c.Tooltip({node:r.menuButton,text:M.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else h&&b.removeNavGrid(h,r.menuButton),r.menu.parentNode&&r.menu.parentNode.removeChild(r.menu),
r.destroyButton&&r.destroyButton.parentNode&&r.destroyButton.parentNode.removeChild(r.destroyButton);else r.menuButton.style.visibility="visible"},0)}else{var z;d.childNodes.length>0&&!this._checkForTrailingSeparator(d,m)&&(z=this.generateSeparatorImage(d));n._render(l,d,e,f,m,g,h);d.childNodes.length>0&&d.childNodes[d.childNodes.length-1]!==z&&(z=this.generateSeparatorImage(d))}else i.title?(k=document.createElement("li"),d.appendChild(k),i=this._createDropdownMenu(k,i.title,!0),n._render(l,i.menu,
e,f,"menu",g,h),i.menu.childNodes.length===0&&d.removeChild(k)):(d.childNodes.length>0&&this._generateMenuSeparator(d),n._render(l,d,e,f,m,g,h),this._generateMenuSeparator(d))}else{k=(l=this._commandList[p[j].id])?!0:!1;var E=null,E=null;if(l){q=new a(this,f,e,g,l);q.domParent=d;i=k&&(l.visibleWhen?l.visibleWhen(e):!0);if(this._activeBindings[l.id]&&this._activeBindings[l.id].keyBinding)E=this._activeBindings[l.id],E.invocation=i?q:null,E.bindingOnly&&(k=!1);if(this._urlBindings[l.id]&&this._urlBindings[l.id].urlBinding)E=
this._urlBindings[l.id],E.invocation=i?q:null,E.bindingOnly&&(k=!1);k=k&&i}if(k)if(l.choiceCallback){m==="tool"||m==="button"?(k=d,i=!1,d.nodeName.toLowerCase()==="ul"&&(k=document.createElement("li"),d.appendChild(k))):(k=d,i=!0);var O=this;this._createDropdownMenu(k,l.name,i,function(a){this.populateChoicesMenu(a,e,f,g,O)}.bind(l))}else m==="tool"?(k="tool"+l.id+j,l._addTool(d,k,q,h)):m==="button"?(k="button"+l.id+j,l._addButton(d,k,q,h)):m==="menu"&&l._addMenuItem(d,q,h)}}},_createDropdownMenu:function(a,
b,c,j){var a=e.node(a),f,m=document.createElement("span");m.classList.add("dropdownTrigger");c?(m.classList.add("dropdownMenuItem"),f="dropdownSubMenu",c="dropdownArrowRight",m.tabIndex=0,m.role="menuitem"):(m.classList.add("commandButton"),c="dropdownArrowDown",m.tabIndex=0,m.role="button");b=document.createTextNode(b);m.appendChild(b);b=document.createElement("span");b.classList.add(c);m.appendChild(b);c=a;a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):(m.classList.add("commandMargins"),
a=m);c.appendChild(m);f&&c.classList.add(f);f=document.createElement("ul");c.appendChild(f);f.classList.add("dropdownMenu");m.dropdown=new d.Dropdown({dropdown:f,populate:j});f.dropdown=m.dropdown;return{menuButton:m,menu:f,dropdown:m.dropdown,destroyButton:a}},_generateCheckedMenuItem:function(a,b,c,j){var d=document.createElement("li");a.appendChild(d);a=document.createElement("label");a.classList.add("dropdownMenuItem");var e=document.createElement("input");e.type="checkbox";e.role="menuitem";
e.checked=c;e.classList.add("checkedMenuItem");a.appendChild(e);b=document.createTextNode(b);a.appendChild(b);d.appendChild(a);e.addEventListener("change",j,!1)},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()==="ul"?
document.createElement("li"):document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};j.prototype.constructor=j;p.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||i.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||
"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},_addTool:function(a,j,d,e){d.handler=d.handler||this;var f;if(this.hrefCallback){if(f=this._makeLink(a,d,"commandLink"),!f)return}else f=document.createElement("span"),f.tabIndex=e?-1:0,f.role="button",this.hasImage()?(m(this,f,j),this.name&&f.setAttribute("aria-label",this.name)):(j=window.document.createTextNode(this.name),f.appendChild(j),f.classList.add("commandMissingImageButton"),f.classList.add("commandButton")),this._hookCallback(f,
d);d.domNode=f;d.domParent=a;if(this.tooltip)f.commandTooltip=new c.Tooltip({node:f,text:this.tooltip,position:["above","below","right","left"]});a.nodeName.toLowerCase()==="ul"?(j=document.createElement("li"),a.appendChild(j),a=j):f.classList.add("commandMargins");a.appendChild(f);b.generateNavGrid(e,d.domNode)},_addButton:function(a,j,d,e){d.handler=d.handler||this;var f;if(this.hrefCallback)f=this._makeLink(a,d,"commandLink");else if(!this.name&&this.hasImage()){if(f=document.createElement("span"),
f.tabIndex=0,f.role="button",m(this,f,j),this.tooltip&&f.setAttribute("aria-label",this.tooltip),this._hookCallback(f,d),this.tooltip)f.commandTooltip=new c.Tooltip({node:f,text:this.tooltip,position:["above","below","right","left"]})}else f=this._makeButton(a,d,"commandButton"),this._hookCallback(f,d);d.domParent=a;a.nodeName.toLowerCase()==="ul"?(j=document.createElement("li"),a.appendChild(j),a=j):f.classList.add("commandMargins");a.appendChild(f);b.generateNavGrid(e,d.domNode)},_addMenuItem:function(a,
c,j){c.domParent=a;var d,e=a.dropdown;this.hrefCallback?d=this._makeLink(a,c,"dropdownMenuItem",["right","left","above","below"]):(d=this._makeButton(a,c,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(d,c,function(){e.close(!0)}));d.role="menuitem";b.generateNavGrid(j,c.domNode);a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):d.classList.add("commandMargins");a.appendChild(d)},_makeButton:function(a,b,j,d){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var e=document.createTextNode(this.name);a.appendChild(e);j&&a.classList.add(j);if(this.tooltip)a.commandTooltip=new c.Tooltip({node:a,text:this.tooltip,position:d||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,j,d){var e=document.createElement("a");e.id=this.name;j&&e.classList.add(j);e.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){e.href=
a}):e.href=a?a:"#";if(this.tooltip)e.commandTooltip=new c.Tooltip({node:e,text:this.tooltip,position:d||["above","below","right","left"]});return b.domNode=e},_hookCallback:function(a,b,c,j){a.addEventListener("click",function(a){c&&c();b.commandService._invoke(b);j&&j();e.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER||a.keyCode===e.KEY.SPACE)c&&c(),b.commandService._invoke(b),j&&j(),e.stop(a)},!1)},populateChoicesMenu:function(a,b,c,j,d){c=this.getChoices(b,c,j);
for(j=0;j<c.length;j++){var f=c[j];if(f.name){var m=document.createElement("li");a.appendChild(m);var g=document.createElement("span");g.tabIndex=0;g.role="menuitem";g.classList.add("dropdownMenuItem");var h=document.createTextNode(f.name);g.appendChild(h);m.appendChild(g);g.choice=f;g.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);g.addEventListener("keydown",function(a){(a.keyCode===e.KEY.ENTER||a.keyCode===e.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,b)},!1)}else d._generateMenuSeparator(a)}},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==i.toUrl("images/none.png")}};p.prototype.constructor=p;l.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(k?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(k&&this.mod4!==a.ctrlKey)return!1;if(!this.domScope)return!0;for(a=a.target;a;){if(a===window.document)break;if(a===this.domScope)return!0;a=a.parentNode}}return!1},equals:function(a){return!a?!1:this.keyCode!==a.keyCode?!1:this.mod1!==a.mod1?!1:this.mod2!==a.mod2?!1:this.mod3!==a.mod3?!1:this.mod4!==a.mod4?!1:this.domScope!==a.domScope?!1:!0}};l.prototype.constructor=l;q.prototype={match:function(a){a=f.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};q.prototype.constructor=q;r.prototype={optionsRequested:function(){return this.optionsRequested}};r.prototype.constructor=r;n.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){this.parameterTable={};for(var b=0;b<a.length;b++)this.parameterTable[a[b].name]=a[b]}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==
null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new r(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new n(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};n.prototype.constructor=n;return{CommandService:j,CommandKeyBinding:l,Command:p,CommandInvocation:a,URLBinding:q,ParametersDescription:n,CommandParameter:r}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,i,h,f){var e={};(function(){var d=!1;e.updateNavTools=function(c,b,a,j,e){var f=c.getService("orion.page.command"),l=h.node(a);if(l)f.destroy(l);else throw g["could not find toolbar "]+a;f.renderCommands(a,l,e,b,"button");if(j&&(a=h.node(j)))f.destroy(a),f.renderCommands(j,a,null,b,"button");d||(d=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",
function(a){var d=h.node(j);if(d){var e=c.getService("orion.page.command");e.destroy(d);e.renderCommands(j,d,a.selections,b,"button")}}))};e.createOperationsCommands=function(c,b,a){function j(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var d=new f.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},
visibleWhen:function(){return!0}});c.addCommand(d);d=new f.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){for(var c=Array.isArray(c.items)?c.items:[c.items],j=0;j<c.length;j++){var d=c[j];a.removeOperation.bind(a)(d.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!j(a);for(var b in a)if(j(a[b]))return!1;
return!0}});c.addCommand(d);d=new f.Command({name:g.Cancel,tooltip:g["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return j(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!j(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;
return!0}});c.addCommand(d)}})();return e});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,i,h,f,e){function d(c){this._options=c}d.prototype=new f.PopupDialog;d.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink">All Operations</a></td></tr></table><span id="operationsExist"><span class="secondaryColumn" id="myOperationsListEmpty">No operations running on this page.</span><table id="myOperationsList" style="display: none;"></table></span><span class="secondaryColumn" id="operationsDontExist">No operations running.</span>';d.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.serviceRegistry.getService("orion.page.command");e.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};d.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};d.prototype.setOperations=function(c,b){this._myOperations||
this._init(this._options);this._myOperations=[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};d.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==a.Message)a.DetailedMessage=c.DetailedMessage;return a};d.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};d.prototype._renderOperationsTable=function(c,b,a){h.empty(c);for(var j=0;j<b.length;j++){var d=b[j],e=document.createElement("tr"),f=document.createElement("td");f.style.paddingLeft="5px;";f.style.paddingRight="5px;";f.textContent=d.Name;e.appendChild(f);var i=document.createElement("div");f.appendChild(i);f=document.createElement("span");i.appendChild(f);f.classList.add("imageSprite");var r=document.createElement("span");r.classList.add("primaryColumn");
i.appendChild(r);r.appendChild(document.createTextNode(d.Name));switch(d.type){case "Warning":f.classList.add("core-sprite-warning");f.setAttribute("aria-label",g["Operation resulted in a warning."]);break;case "error":f.classList.add("core-sprite-error");f.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":f.classList.add("core-sprite-start");f.setAttribute("aria-label",g["Operation is running."]);break;case "abort":f.classList.add("core-sprite-stop");
f.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":f.classList.add("core-sprite-ok"),f.setAttribute("aria-label","Operation ok.")}if(d.error)f=d.error.Message||d.error,d.error.DetailedMessage&&d.error.DetailedMessage!==""&&(f+=": "+d.error.DetailedMessage),i.appendChild(document.createElement("br")),r=document.createElement("span"),r.classList.add("secondaryColumn"),r.style.marginLeft="18px;",i.appendChild(r),r.textContent=f;f=document.createElement("span");
i.appendChild(f);this._commandService.renderCommands("operationsDialogItems",i,{operation:d,deferred:a[j]},this,"tool");c.appendChild(e)}this._setOperationsVisibility()};d.prototype._setOperationsVisibility=function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>
0?"":"none"};d.prototype.constructor=d;return{OperationsDialog:d}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,i,h,f,e){function d(b,a){if(!this._progressPane){this._progressPane=f.node(b);this._operationsDialog=new e.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===f.KEY.ENTER)&&c._operationsDialog.show()})}}function c(b,a,c){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=c}d.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c={},d;for(d in b)b[d].progressMonitor||
(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var f=c[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];this._progressPane.setAttribute("aria-valuetext",
g["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=g["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};d.prototype.constructon=d;c.prototype=
{init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new d(b,this._serviceRegistry)},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(d._operations[e]){var g=
d._operations[e];if(a)g.Name=a;if(c)g.progressMonitor=c;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},
_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[b].progressMonitor)&&a.done(),delete this._operations[b],delete this._operationDeferrds[b]}this._progressMonitorTool.generateOperationsInfo(operations,
this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var c=this;b.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=
c;a.Location&&serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/dialogs",[],function(){function g(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}g.prototype={confirm:function(g,h){h(window.confirm(g))},openFiles:function(){}};g.prototype.constructor=g;return{DialogService:g}});
define("orion/selection",["orion/EventTarget"],function(g){function i(h,f){f||(f="orion.page.selection");this._serviceRegistry=h;g.attach(this);this._serviceRegistration=h.registerService(f,this);this._selections=null}i.prototype={getSelection:function(g){g(this._getSingleSelection())},getSelections:function(g){g(this._selections||[])},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(g){var f=this._selections;this._selections=
Array.isArray(g)?g.length>0?g:null:g?[g]:null;f!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,i){function h(e){if(e=localStorage.getItem("orion/messageBundle/"+e))if(e=JSON.parse(e),e._expires&&e._expires>(new Date).getTime())return delete e._expires,e;return null}var f={};return{getMessageBundle:function(e){function d(){g(["i18n!"+e],function(a){if(a){var b=e;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(f[e])return f[e];var c=new i;f[e]=
c;var b=h(e);if(b)return c.resolve(b),c;try{g([e],d)}catch(a){g(["orion/i18n!"+e],d)}return c},formatMessage:function(e){var d=arguments;return e.replace(/\$\{([^\}]+)\}/g,function(c,b){return d[(b<<0)+1]})}}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Make Favorite":"Make Favorite","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:",
"Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Import local file...":"Import local file...",
"Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ${0}":"Exporting from ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location","Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer",
"Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New","Click on an item to make a selection, then use this menu to see what actions are available.":"Click on an item to make a selection, then use this menu to see what actions are available.",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content",Favorites:"Favorites",
"Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?"});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,i,h){function f(c,b,a){if(!c[b])throw b+g[" is not supported in this file system"];return c[b].apply(c,a)}function e(c,b,a,d){if(!c.readBlob)throw g["source file service does not support binary read"];if(!a.writeBlob)throw g["target file service does not support binary write"];if(b[b.length-1]!=="/")return f(c,"readBlob",[b]).then(function(b){return f(a,"writeBlob",[d,b])});var m=d.substring(0,
d.length-1),h=decodeURIComponent(m.substring(m.lastIndexOf("/")+1)),m=m.substring(0,m.lastIndexOf("/")+1);return f(a,"createFolder",[m,h]).then(function(){},function(){}).then(function(){return f(c,"fetchChildren",[b]).then(function(b){for(var f=[],g=0;g<b.length;++g){var m=b[g].Location,h=m;b[g].Directory&&(h=m.substring(0,m.length-1));h=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=d+encodeURIComponent(h);b[g].Directory&&(h+="/");f[g]=e(c,m,a,h)}return i.all(f)})})}function d(c,b){function a(a){var b=
new i;b.reject(g["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],f=0;f<d.length;++f)b(d[f])&&e.push(d[f]);for(var l=[],q=[],r=[],n=[],k={fetchChildren:function(){var a=new i;a.resolve(n);return a},createWorkspace:function(){var a=new i;a.reject(g["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(g["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:n,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<e.length;++d)n[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},f=e[d].getProperty("pattern")||".*",f[0]!=="^"&&(f="^"+f),l[d]=RegExp(f),q[d]=c.getService(e[d]),r[d]=e[d].getProperty("Name"),
e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&h.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){n[a].Name=b[e[a].getProperty("NameKey")];r[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return q[0]?0:-1;for(var b=0;b<l.length;++b)if(l[b].test(a))return b;throw g["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?k:q[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?k.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?k.Location:n[a].Location}}d.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return f(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return f(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return f(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return f(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,d){return f(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return f(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return f(this._getService(c),"createFile",arguments)},deleteFile:function(c){return f(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var d=this._getService(c),g=this._getService(b);if(d===g)return f(d,"moveFile",arguments);var h=c[c.length-1]==="/",l=b;l[l.length-1]!=="/"&&(l+="/");if(a)l+=encodeURIComponent(a);else{var i=c;h&&(i=i.substring(0,i.length-1));l+=i.substring(i.lastIndexOf("/")+1)}h&&l[l.length-1]!=="/"&&(l+="/");return e(d,c,g,l).then(function(){return f(d,"deleteFile",[c])})},copyFile:function(c,b,a){var d=this._getService(c),g=this._getService(b);if(d===g)return f(d,"copyFile",arguments);
var h=c[c.length-1]==="/",l=b;l[l.length-1]!=="/"&&(l+="/");if(a)l+=encodeURIComponent(a);else{var i=c;h&&(i=i.substring(0,i.length-1));l+=i.substring(i.lastIndexOf("/")+1)}h&&l[l.length-1]!=="/"&&(l+="/");return e(d,c,g,l)},read:function(c,b){return f(this._getService(c),"read",arguments)},write:function(c,b,a){return f(this._getService(c),"write",arguments)},remoteImport:function(c,b){return f(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return f(this._getService(c),
"remoteExport",arguments)},search:function(c){return f(this._getService(c.resource),"search",arguments)}};d.prototype.constructor=d;return{FileClient:d}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,i){function h(c,b,a){return c[b].apply(c,a)}function f(c){this._location=c}function e(){var c=new i;c.reject(g["No Matching OperationService for location:"]+this._location);return c}function d(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var d=c.getService(b[a]);this._services[a]=d;d=b[a].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[a]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new f(a)}}f.prototype={getOperation:e,getOperations:e,removeCompletedOperations:e,removeOperation:e,cancelOperation:e};f.prototype.constructor=f;d.prototype={getOperations:function(){var c=
new i;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return h(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new i;c[a]=e.promise;h(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return i.all(c)},removeOperation:function(c){var b=this;return h(this._getService(c),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};d.prototype.constructor=d;return{OperationsClient:d}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",
Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Save Search":"Save Search","Save search query":"Save search query",
"Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes","Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Search Again":"Search Again","Search again":"Search again","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result",
"Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results","Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results",
"Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename",Searches:"Searches","You can save frequently used by searches by choosing ${0} in the search toolbar.":"You can save frequently used by searches by choosing ${0} in the search toolbar."});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/editor/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/URITemplate",[],function(){function g(a){this._text=a}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function h(a,b,c){for(var d=[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&
d.push(i(a[e],b));return d.join(c)}function f(a,b,c,d){for(var e=Object.keys(a),f=[],g=0;g<e.length;g++)typeof a[e[g]]!=="undefined"&&f.push(i(e[g],b)+c+i(a[e[g]],b));return f.join(d)}function e(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=c[a[0]])?a=a.substring(1):this._operator=c.NUL;for(var d=[],e=a.split(","),f=0;f<e.length;f++){var g=e[f].match(b);if(g===null)throw Error("Bad VarSpec: "+a);d.push({name:g[1],explode:!!g[2],prefix:g[3]?parseInt(g[3],
10):-1})}this._varSpecList=d}function d(a){for(var b=[],c=0,d=a.indexOf("{",c);d!==-1;){b.push(new g(a.substring(c,d)));c=a.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new e(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new g(a.substring(c)));this._templateComponents=b}var c={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},"/":{first:"/",sep:"/",named:!1,ifemp:"",
allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},b=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;g.prototype={expand:function(){return encodeURI(this._text)}};e.prototype={expand:function(a){for(var b=[],c=
0;c<this._varSpecList.length;c++){var d=this._varSpecList[c],e=d.name,g=a[e],r=typeof g;if(r!=="undefined"&&g!==null){var n=b.length===0?this._operator.first:this._operator.sep;if(r==="string")this._operator.named&&(n+=i(e,"U+R"),n+=g.length===0?this._operator.ifemp:"="),d.prefix!==-1&&d.prefix<g.length&&(g=g.substring(0,d.prefix)),n+=i(g,this._operator.allow);else if(Array.isArray(g))d.explode?n+=h(g,this._operator.allow,this._operator.sep):(this._operator.named&&(n+=i(e,"U+R"),n+=g.length===0?this._operator.ifemp:
"="),n+=h(g,this._operator.allow,","));else if(r==="object")d.explode?n+=f(g,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(n+=i(e,"U+R"),n+=Object.keys(g).length===0?this._operator.ifemp:"="),n+=f(g,this._operator.allow,",",","));else throw Error("bad param type: "+e+" : "+r);b.push(n)}}return b.join("")}};d.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return d});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(g,i,h,f,e,d){function c(a,b,c){var d="";c&&(d="^");if(d=h.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b=b||{};b.searchUtils=b.searchUtils||{};b.searchUtils.ALL_FILE_TYPE="*.*";b.searchUtils.doSearch=function(a,c,d,e){if(a){var f=!0;d==="*"&&(d="");d===
""&&(f=e&&e.type!==b.searchUtils.ALL_FILE_TYPE);if(f){d!==""&&b.searchUtils.addRecentSearch(c,d,e?e.regEx:!1);var a=a.createSearchParams(d,!1,!1,e),h=b.searchUtils.generateSearchHref(a);b.searchUtils.getOpenSearchPref(c,function(a){a?window.open(h):window.location=h})}}else window.alert(g["Can't search: no search service is available"])};b.searchUtils.generateSearchHelper=function(a,d){var e=a.keyword,f=e,g={};a.fileType&&a.fileType!==b.searchUtils.ALL_FILE_TYPE&&e===""&&(f="*."+a.fileType);if(a.regEx)g.searchStr=
e,c(g,a,d);else{var h=e.indexOf("*")>-1,i=e.indexOf("?")>-1;h&&(e=e.split("*").join(".*"));i&&(e=e.split("?").join("."));!h&&!i&&!a.nameSearch?(g.searchStr=a.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?e:e.toLowerCase(),c(g,a,d),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:f}};b.searchUtils.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows);if(a.start!==
void 0)a.start=parseInt(a.start);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};b.searchUtils.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};b.searchUtils.generateSearchHref=function(a){var c=i.toUrl("search/search.html"),a=b.searchUtils.copySearchParams(a,
!0),e=a.resource;a.resource=void 0;return(new d(c+"#{,resource,params*}")).expand({resource:e,params:a})};b.searchUtils.generateFindURLBinding=function(a,b,c,e){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof c==="number"?c:void 0};return","+(new d("{,params*}")).expand({params:a})};b.searchUtils.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive===
"string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine)};b.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.searchUtils.replaceStringLiteral=function(a,c,d){c=h.parse("/"+c+"/gim");return b.searchUtils.replaceRegEx(a,c,d)};b.searchUtils.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var e=!1,f=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{f.push({startIndex:d,length:a.searchStrLength});
e=!0;if(c)break;d+=a.searchStrLength}return e?f:null};b.searchUtils.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,c).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};b.searchUtils.searchOnelineRegEx=function(a,c,d){for(var e=0,f=!1,g=[];;)if(e=b.searchUtils.findRegExp(c,a.regExp.pattern,a.regExp.flags,e)){g.push(e);f=!0;if(d)break;e=e.startIndex+e.length}else break;return f?g:null};
b.searchUtils.generateNewContents=function(a,c,d,e,f,g){if(e&&c){if(!a)d.contents=[];for(var h=0;h<c.length;h++){for(var i=c[h],k=!1,o=!1,u=[],t,s=0,w=0;w<e.children.length;w++)if(e.children[w].lineNumber-1===h){s=w;for(k=0;k<e.children[w].matches.length;k++)e.children[w+k].checked!==!1&&u.push(k);o=u.length>0;t=e.children[w].matches;k=!0;break}if(k){if(o){u=b.searchUtils.replaceCheckedMatches(i,f,t,u,g);i=u.replacedStr;for(k=0;k<e.children[s].matches.length;k++)e.children[s+k].newMatches=u.newMatches}else for(k=
0;k<e.children[s].matches.length;k++)e.children[s+k].newMatches=e.children[s+k].matches;a?d.contents[h]=i:d.contents.push(i)}else a||d.contents.push(i)}}};b.searchUtils.generateMatchContext=function(a,b,c){var d=[],e=a*2+1,f;b.length<=e?(f=0,a=b.length-1):(f=c-a,f<0?(f=0,a=f+e-1):(a=c+a,a>b.length-1&&(a=b.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:b[e],current:e===c});return d};b.searchUtils.splitFile=function(a){for(var b=0,c=0,d=0,e=0,f=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&
c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){f.push(a.substring(e));break}var g=1;b!==-1&&c!==-1?b+1===c?(g=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;f.push(a.substring(e,d-g));e=d}return f};b.searchUtils.searchWithinFile=function(a,c,d,e,f,g){d=b.searchUtils.splitFile(d);if(f)c.contents=d;if(c){c.children=[];for(var h=e=0;h<d.length;h++){var i=d[h];if(i&&i.length>0){var k=g?i:i.toLowerCase();if(k=a.wildCard?b.searchUtils.searchOnelineRegEx(a,k):b.searchUtils.searchOnelineLiteral(a,k)){var o=h+1;
if(f)for(var u=0;u<k.length;u++){var t=u+1,t={parent:c,checked:c.checked,type:"detail",matches:k,lineNumber:o,matchNumber:t,name:i,location:c.location+"-"+o+"-"+t};c.children.push(t)}else t={parent:c,context:b.searchUtils.generateMatchContext(2,d,h),checked:c.checked,type:"detail",matches:k,lineNumber:o,name:i,location:c.location+"-"+o},c.children.push(t);e+=k.length}}}c.totalMatches=e}};b.searchUtils.replaceCheckedMatches=function(a,b,c,d,e){for(var f=0,g="",h=[],i=0;i<c.length;i++){f!==c[i].startIndex&&
(g+=a.substring(f,c[i].startIndex));if(c[i].length)e=c[i].length;for(var f=!1,o=0;o<d.length;o++)if(d[o]===i){f=!0;break}f?(h.push({startIndex:g.length,length:b.length}),g+=b):(h.push({startIndex:g.length,length:e}),g+=a.substring(c[i].startIndex,c[i].startIndex+e));f=c[i].startIndex+e}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}};b.searchUtils.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};b.searchUtils.path2FolderName=
function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b.searchUtils._storeRecentSearch=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b)})};b.searchUtils.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(f in e)if(e[f].name===c)return;
e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:c,regEx:d});b.searchUtils._storeRecentSearch(a,e)})};b.searchUtils.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};b.searchUtils.getMixedSearches=function(a,c,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f,g=a.get("recentSearch");typeof g===
"string"&&(g=JSON.parse(g));if(c)for(f in a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a)if(d){var h=b.searchUtils.parseQueryStr(a[f].query);g.some(function(a){return h.searchStrTitle===a.name})||g.push({name:h.searchStrTitle,label:a[f].name})}else g.push({name:null,label:a[f].name,value:a[f].query});g&&e&&e(g)})};b.searchUtils.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?!0:!1:!1)})};b.searchUtils.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return b.searchUtils});
define("orion/contentTypes",[],function(){function g(d,c){function b(a,b,c,d){var c=b.filename.indexOf(c)>=0,e=b.extension.indexOf(d)>=0;if(c||e)if(!a||c&&a.extension.indexOf(d)>=0)return b;return a}for(var a=d&&d.split(".").pop(),e=null,f=0;f<c.length;f++){var g=c[f];b(e,g,d,a)===g&&(e=g)}return e}function i(d){this.serviceRegistry=d;this.map=function(c){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var c=c.getServiceReferences(f).concat(c.getServiceReferences(e)),
a={},d=0;d<c.length;d++)for(var g=b(c[d].getProperty("contentTypes")),h=0;h<g.length;h++){var i=g[h];a[i.id]||(a[i.id]={id:i.id,name:i.name,image:i.image,"extends":i["extends"],extension:b(i.extension),filename:b(i.filename)})}return a}(d);d.registerService(h,this)}var h="orion.core.contenttypes",f="orion.core.contenttype",e="orion.file.contenttype";i.prototype={getContentTypes:function(){var d=this.getContentTypesMap(),c=[],b;for(b in d)d.hasOwnProperty(b)&&c.push(d[b]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(d){return g(d.Name,this.getContentTypes())},getFilenameContentType:function(d){return g(d,this.getContentTypes())},getContentType:function(d){return this.map[d]||null},isExtensionOf:function(d,c){d=typeof d==="string"?this.getContentType(d):d;c=typeof c==="string"?this.getContentType(c):c;if(!d||!c)return!1;if(d.id===c.id)return!0;else for(var b=d,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},
isSomeExtensionOf:function(d,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(d,c[b]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:g}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?"});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,i,h,f,e,d){function c(b,a,c,d){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=d&&d.searchOnName;this._buildSkeletonOnly=d&&d.buildSkeletonOnly;this._fetchChildrenCallBack=d&&d.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:f.generateSearchHelper(c);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location}c.prototype.search=function(b){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=b;var c=this;this.registry.getService("orion.page.dialog").confirm(g["The search term on this location will not use indexed files."]+"\n"+g["It will take longer time. Do you want to proceed?"],function(b){b&&a.getContentTypes().then(function(a){c.contentTypesCache=
a;c._visitRecursively(c._childrenLocation).then(function(){c._sort(c.fileLocations);c._onSearchComplete({response:{numFound:c.fileLocations.length,docs:c.fileLocations}})})})})};c.prototype.searchName=function(b,a){if(b)this.searchHelper=f.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var c=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var d=0;d<this.fileSkeleton.length;d++){var e=this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?
f.searchOnelineRegEx(this.searchHelper.inFileQuery,e,!0):f.searchOnelineLiteral(this.searchHelper.inFileQuery,e,!0))if(c.push(this.fileSkeleton[d]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,docs:c}})}};c.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=
!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};c.prototype._searchCompleted=function(){console.log("Search Completed.")};c.prototype._searchFiles=function(){var b=[],a;if(this.fileLocations.length>0){a=this;for(var c=0;c<a.fileLocations.length;c++)b.push(a._sniffSearch(a.fileLocations[c]))}return d.all(b)};c.prototype._sort=function(b){b.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?
this.searchHelper.params.fileType===f.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var f=c.registry.getService("orion.page.progress");return(f?f.progress(c.fileClient.fetchChildren(b),"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var f=0;f<b.length;f++)if(b[f].Directory!==void 0&&b[f].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[f]));
else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[f]));else{var g=e.getFilenameContentType(b[f].Name,c.contentTypesCache);g&&(g["extends"]==="text/plain"||g.id==="text/plain")&&c._onFileType(g)&&a.push(c._sniffSearch(b[f]))}else b[f].Location&&a.push(c._visitRecursively(b[f].ChildrenLocation));return d.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?f.searchOnelineRegEx(this.searchHelper.inFileQuery,
b,!0):f.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};c.prototype._reportSingleHit=function(b){b.LastModified=b.LocalTimeStamp;this.fileLocations.push(b);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};c.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:h.formatMessage(g["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(b.Location),"Reading file "+b.Location).then(function(c){a._hitOnceWithinFile(c)&&a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:h.formatMessage(g["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};c.prototype._buildSingleSkeleton=function(b){this._totalCounter++;
this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new d;b.resolve(this._totalCounter);return b};c.prototype.constructor=c;return{SearchCrawler:c}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler".split(","),function(g,i,h,f,e,d){function c(b){this.registry=b.serviceRegistry;this._commandService=b.commandService;(this._fileService=b.fileService)||console.error("No file service on search client")}c.prototype={search:function(b,a,c){var f=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var d=a.response.docs[c];b.push({name:d.Name,path:d.Location,
folderName:e.path2FolderName(d.Path?d.Path:d.Location,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b};if(this._crawler&&b.nameSearch)this._crawler.searchName(b,function(a){c(f(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(b),"Searching "+b.keyword).then(function(a){var d=b.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(f(a),d)},function(a){c(null,null,a)})}catch(g){typeof g==="string"&&g.indexOf("search")>
-1&&this._crawler?this._crawler.searchName(b,function(a){c(f(a),null)}):typeof g==="string"&&g.indexOf("search")>-1&&!b.nameSearch?(new d.SearchCrawler(this.registry,this._fileService,b,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(f(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(g)}},getFileService:function(){return this._fileService},setCrawler:function(b){this._crawler=b},handleError:function(b,a){console.error(b);h.empty(a);a.appendChild(document.createTextNode(b));
return b},setLocationByMetaData:function(b,a){var c="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(b.Location);a&&b&&b.Parents&&b.Parents.length>0?d=a.index==="last"?b.Parents[b.Parents.length-1]:b.Parents[0]:b&&b.Directory&&b.Location&&b.Parents&&(d=b);if(d)this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation;else if(b)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(b.Location),this._childrenLocation=b.ChildrenLocation;
d=h.node("search");c||(c="");if(d&&d.placeholder){d.value="";var e=f.formatMessage(g["Search ${0}"],c);d.placeholder=e.length>30?e.substring(0,27)+"...":f.formatMessage(g["Search ${0}"],c)}if(d&&d.title)d.title=g["Type a keyword or wild card to search in "]+c},setLocationbyURL:function(b){this._searchLocation=b},setRootLocationbyURL:function(b){this._searchRootLocation=b},setChildrenLocationbyURL:function(b){this._childrenLocation=b},getSearchLocation:function(){return this._searchLocation?this._searchLocation:
this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(b,a,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return a?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:b}:{resource:c,sort:"Path asc",
rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.type:void 0,keyword:b}},defaultRenderer:{makeRenderFunction:function(b,a,c,d,e){function l(a){return!b?!0:(a=b.getFilenameContentType(a))&&(a["extends"]==="text/plain"||a.id==="text/plain")?!0:!1}return function(b,r,n){if(n)h.empty(a),b=document.createElement("div"),b.appendChild(document.createTextNode(g["Search failed."])),a.appendChild(b),typeof d==="function"&&d(a);else{var n=function(){function a(b,c){var d=
c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),k=!1;h.empty(a);if(b&&b.length>0){var o=document.createElement("table");o.setAttribute("role","presentation");for(var u=0;u<b.length;u++){var t=b[u],s;if(!k&&(k=!0,c))s=
o.insertRow(0).insertCell(0),s.textContent=c;s=o.insertRow(-1).insertCell(0);s.colspan=2;e&&e(s);var w=document.createElement("a");w.appendChild(document.createTextNode(t.name));t.LineNumber&&w.appendChild(document.createTextNode(" (Line "+t.LineNumber+")"));var D=t.location;t.isExternalResource?D=t.path:(D=t.directory?i.toUrl("navigate/table.html")+"#"+t.path:l(t.name)?i.toUrl("edit/edit.html")+"#"+t.path:t.path,D==="#"&&(D=""));w.setAttribute("href",D);w.setAttribute("aria-describedby",(t.folderName?
t.folderName:t.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));w.style.verticalAlign="middle";s.appendChild(w);n(s,t)}a.appendChild(o);typeof d==="function"&&d(a)}!k&&r&&(b=f.formatMessage(g["No matches found for ${0}"],r),h.empty(a),a.appendChild(document.createTextNode(b)),typeof d==="function"&&d(a))}}}}};c.prototype.constructor=c;return{Searcher:c}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,i,h){function f(e,d){this._activeContainer=null;this._getElementsFunction=e;this._toolbarLayoutFunction=d}f.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&h.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&h.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(e,d,c){typeof e==="string"&&(e=h.node(e));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===e)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(e))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;e=h.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(e.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;e=document.createElement("span");e.id="closebox";e.role="button";e.tabIndex=0;e.classList.add("imageSprite");e.classList.add("core-sprite-close");e.classList.add("dismiss");e.title=g.Close;d.appendChild(e);var a=this;e.addEventListener("click",function(){a.close()},!1);e.addEventListener("keydown",function(b){(b.keyCode===h.KEY.ENTER||b.keyCode===h.KEY.SPACE)&&a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(b)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select()},0);this._activeElements.commandNode&&this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(e,d){h.$$array("input",d).forEach(function(c){c.type==="checkbox"?e.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&e.parameters.setValue(c.parameterName,c.value.trim())});h.$$array("textArea",d).forEach(function(c){e.parameters.setValue(c.parameterName,
c.value.trim())});e.command.callback&&e.command.callback.call(e.handler,e)},collectParameters:function(e){return e.parameters?(e.domNode&&e.domNode.classList.add("commandMarker"),this.open(e.domNode||e.domParent,this.getFillFunction(e))):!1},getFillFunction:function(e,d){var c=this;return function(b,a){var f=null,m=function(){d&&d();c.close()},i=function(a){a.keyCode===h.KEY.ENTER&&c._collectAndCall(e,b);if(a.keyCode===h.KEY.ESCAPE||a.keyCode===h.KEY.ENTER)m(),h.stop(a)};e.parameters.forEach(function(a){var c=
null;if(a.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+"parameterCollector"),c.textContent=a.label,b.appendChild(c);var d=a.name+"parameterCollector",e=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=d,e.appendChild(c),i=function(a){a.keyCode===h.KEY.ESCAPE&&(m(),h.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",
c.id=d,e.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,e.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.classList.add("parameterInput"+c.type);c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;f||(f=c);c.addEventListener("keydown",i,!1)});var l=a;if(!l)l=document.createElement("span"),l.className="layoutRight parametersDismiss",b.appendChild(l);var q=function(a){a._collectAndCall(e,
b);m()},r=function(a,b){var c=document.createElement("span");c.role="button";c.tabIndex=0;b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismiss");return c};if(e.parameters.hasOptionalParameters()){e.parameters.optionsRequested=!1;var n=r(g.More,l);n.addEventListener("click",function(){e.parameters.optionsRequested=!0;q(c)},!1);n.addEventListener("keydown",function(a){if(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)e.parameters.optionsRequested=!0,q(c)},!1)}n=r(g.Submit,
l);n.addEventListener("click",function(){q(c)},!1);n.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&q(c)},!1);l=r(null,l);l.id="closebox";l.classList.add("imageSprite");l.classList.add("core-sprite-close");l.title=g.Close;l.addEventListener("click",function(){m()},!1);l.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&m()},!1);return f}}};f.prototype.constructor=f;return{CommandParameterCollector:f}});
(function(){function g(a){return a?a.slice(1).split("&"):[]}function i(a){return a.length===0?"":"?"+a.join("&")}function h(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function f(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function e(a,b){var c="",d=[],e=0;return{next:function(){if(c!==a.search)c=a.search,d=g(c);if(e<d.length){var f=h(d[e++]);switch(b){case "keys":return f[0];case "values":return f[1];
case "keys+values":return[f[0],f[1]];default:throw new TypeError;}}throw p;}}}function d(a){if(typeof a!=="string")throw new TypeError;}function c(a){var b=a.protocol;return!b||b===":"||b==="http:"&&!a.hostname?!1:!0}function b(a){Object.defineProperty(this,"_anchor",{value:a})}function a(a,d){a=a||"";if(typeof a!=="string")throw new TypeError("url");d=d?d.href||d:"";if(typeof d!=="string")throw new TypeError("base");Object.defineProperty(this,"_input",{value:a,writable:!0});var e=document.implementation.createHTMLDocument("");
if(d){var f=e.createElement("a");f.href=d;if(f.protocol.length<2||!f.host)throw Error("InvalidStateError");var j=e.createElement("base");j.href=f.href;e.head.appendChild(j)}var g=e.createElement("a");g.href=a;e.body.appendChild(g);Object.defineProperty(this,"_urlAnchor",{value:g});var h=new b(g);Object.defineProperty(this,"query",{get:function(){return c(g)?h:null},enumerable:!0})}try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(j){}var m=
/([^:]*):?(.*)/,p=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(b.prototype,{get:{value:function(a){d(a);var b;g(this._anchor.search).some(function(c){c=h(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){d(a);d(b);var c=g(this._anchor.search);c.some(function(d,e){var g=h(d);if(g[0]===a)return g[1]=b,c[e]=f(g),!0})||c.push(f([a,b]));this._anchor.search=i(c)},enumerable:!0},has:{value:function(a){d(a);return g(this._anchor.search).some(function(b){if(h(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){d(a);var b=g(this._anchor.search),c=b.filter(function(b){return h(b)[0]!==a});return c.length!==b.length?(this._anchor.search=i(c),!0):!1},enumerable:!0},clear:{value:function(){this._anchor.search=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var c=e(this._anchor,"keys+values");try{for(;;){var d=c.next();a.call(b,d[1],d[0],this)}}catch(f){if(f!==p)throw f;}},enumerable:!0},keys:{value:function(){return e(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return e(this._anchor,"values")},enumerable:!0},items:{value:function(){return e(this._anchor,"keys+values")}},size:{get:function(){return g(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){d(a);var b=[];g(this._anchor.search).forEach(function(c){c=h(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){d(a);d(b);var c=g(this._anchor.search);c.push(f([a,b]));this._anchor.search=i(c)},enumerable:!0}});
Object.defineProperties(a.prototype,{href:{get:function(){return c(this._urlAnchor)?this._urlAnchor.href:this._input},set:function(a){d(a);this._input=a;this._urlAnchor.href=a},enumerable:!0},origin:{get:function(){return c(this._urlAnchor)?this._urlAnchor.protocol+"//"+this._urlAnchor.host:""},enumerable:!0},protocol:{get:function(){return c(this._urlAnchor)?this._urlAnchor.protocol:":"},set:function(a){d(a);this._urlAnchor.protocol=a},enumerable:!0},_userinfo:{get:function(){return!c(this._urlAnchor)?
"":RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host).exec(this._urlAnchor.href)[2]||""},set:function(a){d(a);this._urlAnchor.href=this._urlAnchor.href.replace(RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host),this._urlAnchor.protocol+"//"+(a?a+"@":"")+this._urlAnchor.host)}},username:{get:function(){if(!c(this._urlAnchor))return"";var a=m.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){d(a);var b=m.exec(this._userinfo),
a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")},enumerable:!0},password:{get:function(){if(!c(this._urlAnchor))return"";var a=m.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){d(a);var b=[m.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")},enumerable:!0},host:{get:function(){return c(this._urlAnchor)?this._urlAnchor.host:""},set:function(a){d(a);this._urlAnchor.host=a},enumerable:!0},hostname:{get:function(){return c(this._urlAnchor)?
this._urlAnchor.hostname:""},set:function(a){d(a);this._urlAnchor.hostname=a},enumerable:!0},port:{get:function(){return c(this._urlAnchor)?this._urlAnchor.port:""},set:function(a){d(a);this._urlAnchor.port=a},enumerable:!0},pathname:{get:function(){return c(this._urlAnchor)?this._urlAnchor.pathname:""},set:function(a){d(a);this._urlAnchor.pathname=a},enumerable:!0},search:{get:function(){return c(this._urlAnchor)?this._urlAnchor.search:""},set:function(a){d(a);this._urlAnchor.search=a},enumerable:!0},
hash:{get:function(){return c(this._urlAnchor)?this._urlAnchor.hash:""},set:function(a){d(a);this._urlAnchor.hash=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(a,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(a,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=a})();define("orion/URL-shim",function(){});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(g,i,h,f,e,d,c){var b={},a=(new URL(g.toUrl("."),window.location)).href.slice(0,-1);b._cloneItemWithoutChildren=function m(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=m(a[c]));return b};b._createOpenWithCommands=function(a){function b(a,c){for(var d=
a.getServiceReferences("orion.navigate.openWith"),e=[],f=0;f<d.length;f++){var g=d[f];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?e=e.concat(g):g!==null&&typeof g!=="undefined"&&e.push(g))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],f=e.getProperty("id");c.push({id:f,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||
e.getProperty("uriTemplate")})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],f=0;f<c.length;f++){var g=c[f],h=d&&d.editor===g.id,i=b(a,g);i.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:i,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return e};
b._makeValidator=function(b,c,f,g){function h(a,b,c,d){var e=c.match,f;if(b.indexOf("|")>=0)return f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),h(a,f,c,d)?!0:h(a,b,c,d);else if(b.indexOf(":")>=0)return f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?h(a[f],b,c,d):!1;else{a:{f=!1;var g;if(a[b]){if(e)if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))f=e[0],g=c.variableMatchPosition==="before"?a[b].substring(0,
e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+f.length):c.variableMatchPosition==="only"?f:a[b],f=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===e&&(g=a[b],f=!0);else g=a[b],f=!0;if(f&&c.variableName&&(d[c.variableName]=g,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=f}else c=!1}return c}}return{info:b,validationFunction:function(a){typeof g==="function"&&(a=g.call(this,a));if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||this.info.uriTemplate)&&a.length!==1)return!1;if(a.length<1)return!1}else a=[a];for(var c=0;c<a.length;c++){var d;a:{var i=a[c],p=f;if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var s=this.info.validationProperties[d];if(s.source){if(!h(i,s.source,s,this)){d=!1;break a}}else{window.console.log("Invalid validationProperties in "+
b.id+".  No source property specified.");d=!1;break a}}if(this.info.contentType&&p){s=!1;if(i=e.getFilenameContentType(i.Name,p))for(d=0;d<this.info.contentType.length;d++)if(i.id===this.info.contentType[d]){s=!0;break}d=s}else d=!0}if(!d)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(b){if(this.info.uriTemplate){var c={},e;for(e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);if(this.info.validationProperties)for(e=0;e<this.info.validationProperties.length;e++){var f=
this.info.validationProperties[e];f.source&&f.variableName&&(this.itemCached===b&&this[f.variableName]||h(b,f.source,f,this),b[f.variableName]?window.console.log("Variable name "+f.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):c[f.variableName]=this[f.variableName])}c.OrionHome=a;b=new d(this.info.uriTemplate);return window.decodeURIComponent(b.expand(c))}return null}}};b._createCommandOptions=function(a,d,e,f,g,h){function k(c,i){var k=
b._makeValidator(a,e,f,h);c.visibleWhen=k.validationFunction.bind(k);if(g)if(k.generatesURI.bind(k)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return k.getURI.bind(k)(a)};else{var o=a;c.callback=function(a){var f;if(o.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,f=b._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){f=[];for(var g=0;g<a.items.length;g++)f.push(b._cloneItemWithoutChildren(a.items[g]))}else f=b._cloneItemWithoutChildren(a.items);
if(e)var h=e.getService("orion.page.progress");d.run?h?h.progress(d.run(f),"Running command: "+c.name):d.run(f):e&&(h?h.progress(e.getService(d).run(f),"Running command: "+c.name):e.getService(d).run(f))}}i.resolve(c)}var o=new i;a.nls?c.getMessageBundle(a.nls).then(function(b){k({name:a.nameKey?b[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?b[a.tooltipKey]:a.tooltip,isEditor:a.isEditor},o)}):k({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},
o);return o};b.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return b});
define("orion/editor/util",[],function(){var g=navigator.userAgent,i=parseFloat(g.split("MSIE")[1])||void 0,h=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,f=g.indexOf("Opera")!==-1,e=parseFloat(g.split("Chrome/")[1])||void 0,d=g.indexOf("Safari")!==-1&&!e,c=parseFloat(g.split("WebKit/")[1])||void 0,b=g.indexOf("Android")!==-1,a=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,j=a||g,m=navigator.platform.indexOf("Mac")!==-1,p=navigator.platform.indexOf("Win")!==-1,l=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:h,isOpera:f,isChrome:e,isSafari:d,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:g,isIOS:j,isMac:m,isWindows:p,isLinux:l,platformDelimiter:p?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(g){function i(g,f,e,d,c){this.keyCode=typeof g==="string"?g.toUpperCase().charCodeAt(0):g;this.mod1=f!==void 0&&f!==null?f:!1;this.mod2=e!==void 0&&e!==null?e:!1;this.mod3=d!==void 0&&d!==null?d:!1;this.mod4=c!==void 0&&c!==null?c:!1}i.prototype={match:function(h){return this.keyCode===h.keyCode?this.mod1!==(g.isMac?h.metaKey:h.ctrlKey)?!1:this.mod2!==h.shiftKey?!1:this.mod3!==h.altKey?!1:g.isMac&&this.mod4!==h.ctrlKey?!1:!0:!1},equals:function(g){return!g?
!1:this.keyCode!==g.keyCode?!1:this.mod1!==g.mod1?!1:this.mod2!==g.mod2?!1:this.mod3!==g.mod3?!1:this.mod4!==g.mod4?!1:!0}};return{KeyBinding:i}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,i){function h(f){this._init(f)}h.prototype={_init:function(f){var e=i.node(f.container);if(!e)throw"no parent container";this._container=e;e.classList.remove("currentLocation");this._id=f.id||"eclipse.breadcrumbs";this._resource=f.resource||null;this._rootSegmentName=f.rootSegmentName;this._workspaceRootSegmentName=f.workspaceRootSegmentName;this._makeHref=f.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var f;
this._resource&&this._resource.Parents?(f=document.createElement("a"),this._makeHref?this._makeHref(f,""):f.href=g.toUrl("navigate/table.html")+"#"):f=document.createElement("span");i.empty(f);f.appendChild(document.createTextNode(this._workspaceRootSegmentName));return f}return null},render:function(){var f=this._container,e=i.node(this._id);e?i.empty(e):(e=document.createElement("span"),e.id=this._id,f.appendChild(e));var d;if(d=this.getNavigatorWorkspaceRootSegment())if(d.classList.add("breadcrumb"),
e.appendChild(d),this._resource&&this._resource.Parents)d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),e.appendChild(d);else{d.href="";d.classList.remove("breadcrumb");d.classList.add("currentLocation");return}f=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var c=this._resource.Parents,b=c.length;--b>=0;)d=document.createElement("a"),d.classList.add("breadcrumb"),f?(d.appendChild(document.createTextNode(f)),
f=null):d.appendChild(document.createTextNode(c[b].Name)),this.path+=c[b].Name,this._makeHref?this._makeHref(d,c[b].Location):d.href=g.toUrl("navigate/table.html")+"#"+c[b].ChildrenLocation,e.appendChild(d),d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),e.appendChild(d);d=document.createElement("span");f?(d.appendChild(document.createTextNode(f)),f=null):d.appendChild(document.createTextNode(this._resource.Name));
d.classList.add("currentLocation");this.path+=this._resource.Name;e.appendChild(d)}e.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(f||document.title)),d.classList.add("breadcrumb"),d.classList.add("currentLocation"),e.appendChild(d))}};h.prototype.constructor=h;return{BreadCrumbs:h}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(g,i){function h(f){this._init(f)}h.prototype={_init:function(f){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(f.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(f.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(f.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=f.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(f.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add("splitThumbLayout");this._initializeFromStoredSettings();this._closed?(this._closed=!1,this._thumbDown()):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display="block";this.$node.addEventListener("mousedown",
this._mouseDown.bind(this),!1);window.addEventListener("mouseup",this._mouseUp.bind(this),!1);window.addEventListener("resize",this._resize.bind(this),!1)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(f){this._resizeListeners.push(f)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var f;if(this._vertical){if(f=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=
parseInt(f,10)}else if(f=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(f,10)},_adjustToSplitPosition:function(f){var e=i.bounds(this.$node),d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(f||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);f=this._splitTop;this.$node.parentNode.style.position==="relative"&&(f=this._splitTop-d.top);this.$sideNode.style.height=f+"px";this.$sideNode.style.bottom=
f-1+"px";this.$sideNode.style.display="block";this.$node.style.top=f+"px"}else{this._splitWidth=e.width;if(f||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);f=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(f=this._splitLeft-d.left);this.$sideNode.style.width=f+"px";this.$sideNode.style.right=f-1+"px";this.$sideNode.style.display="block";this.$node.style.left=f+"px"}this._resize()},_resize:function(f){var f=f||0,e=i.bounds(this.$node.parentNode),
d=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=e.height-(d.top-e.top+d.height)+"px":this.$mainNode.style.width=e.width-(d.left-e.left+d.width)+"px";var c=this;window.setTimeout(function(){c._notifyResizeListeners(c.$mainNode)},f);window.setTimeout(function(){c._notifyResizeListeners(c.$sideNode)},f)},_notifyResizeListeners:function(f){for(var e=0;e<this._resizeListeners.length;e++)this._resizeListeners[e](f)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),
this._vertical?(this.$sideNode.style.height=this._splitTop+"px",this.$node.style.top=this._splitTop+"px"):(this.$sideNode.style.width=this._splitLeft+"px",this.$node.style.left=this._splitLeft+"px")):(this._closed=!0,this._addAnimation(),this._vertical?(this.$sideNode.style.top=0,this.$node.style.top="1px"):(this.$sideNode.style.width=0,this.$node.style.left="1px"));this._resize(this._animationDelay);this._removeAnimation();localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},
_removeAnimation:function(){var f=this;window.setTimeout(function(){f.$sideNode.classList.remove("sidePanelLayoutAnimation");f.$mainNode.classList.remove("mainPanelLayoutAnimation");f.$node.classList.remove("splitLayoutAnimation");f._thumb.classList.remove("splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add("sidePanelLayoutAnimation");this.$mainNode.classList.add("mainPanelLayoutAnimation");this.$node.classList.add("splitLayoutAnimation");this._thumb&&
this._thumb.classList.add("splitLayoutAnimation")},_mouseDown:function(f){if(f.target===this._thumb)return i.stop(f),this._thumbDown(f);if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),window.addEventListener("mousemove",this._tracking),i.stop(f)},_mouseMove:function(f){if(this._tracking){var e;this._vertical?(e=this._splitTop=f.clientY,this.$node.parentNode.style.position===
"relative"&&(e=i.bounds(this.$node.parentNode),e=this._splitTop-e.top),this.$node.style.top=e+"px"):(e=this._splitLeft=f.clientX,this.$node.parentNode.style.position==="relative"&&(e=i.bounds(this.$node.parentNode),e=this._splitLeft-e.left),this.$node.style.left=e+"px");this._adjustToSplitPosition(!0);i.stop(f)}},_mouseUp:function(f){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),
this.$sideNode.classList.remove("panelTracking"),i.stop(f)}};h.prototype.constructor=h;return{Splitter:h}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(g){if(!g)return g;var i=window.location.protocol+"//"+window.location.host;return g.indexOf(i)===0?g.substring(i.length):g},isAtRoot:function(g){return this.makeRelative(g).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(g,i,h){function f(e){this._favorites=[];h.attach(this);this._init(e);this._initializeFavorites()}f.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(e){for(var e=Array.isArray(e)?
e:[e],d=0;d<e.length;d++){var c=e[d],b=c.ChildrenLocation?c.ChildrenLocation:c.Location,b=i.makeRelative(b);this.addFavorite(c.Name,b,c.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(e){this.addFavorite(e,e,!1,!0)},addFavorite:function(e,d,c){this._favorites.push({name:e,path:d,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(e){for(var d in this._favorites)if(this._favorites[d].path===
e){this._favorites.splice(d,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(e,d){var c=!1,b;for(b in this._favorites)if(this._favorites[b].path===e){var a=this._favorites[b];if(a.name!==d)a.name=d,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(e){for(var d in this._favorites)if(this._favorites[d].path===e)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(e){var d;
if(!e)return this._favorites;var c="";for(d=0;d<e.length;d++){var b=e.charAt(d);c+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}c+=".*";e=RegExp(c);c=[];for(d in this._favorites)this._favorites[d].name.search(e)===0&&c.push(this._favorites[d]);return c},_initializeFavorites:function(){var e=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var c,d=d.get("navigate");typeof d==="string"&&(d=JSON.parse(d));if(d)for(c in d)d[c].isFavorite=
!0,e._favorites.push(d[c]);e._favorites.sort(e._sorter);e._notifyListeners()})},_storeFavorites:function(){var e=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){d.put("navigate",e)})},_sorter:function(e,d){var c=e.name.toLowerCase(),b=d.name.toLowerCase();return c>b?1:c<b?-1:0},getFavorites:function(){return{navigator:this._favorites}}};f.prototype.constructor=f;return{FavoritesService:f}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var h="",f=[],e=new g.ThemeClass("orionPage");
e.style.backgroundColor="#fdfdfd";e.style.width="100%";e.style.height="100%";f.push(e);e=new g.ThemeClass("topRowBanner");e.style.margin="0";e.style.border="0";e.style.backgroundColor=this.navbar;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";e.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";e.style.height="28px";f.push(e);e=new g.ThemeClass("a");e.style.textDecoration="none";
e.style.color=this.content;f.push(e);e=new g.ThemeClass("navlink");e.style.display="inline-block";e.style.padding="2px";e.style.color=this.content;f.push(e);e=new g.ThemeClass("primaryNav");e.style.color=this.navtext;e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.paddingTop="6px";e.style.verticalAlign="baseline";f.push(e);e=new g.ThemeClass("primaryNav a");e.style.fontSize="8pt";e.style.color=this.navtext;e.style.marginRight="6px";e.style.marginLeft="6px";e.style.verticalAlign="baseline";
e.style.textDecoration="none";f.push(e);e=new g.ThemeClass("primaryNav a:hover");e.style.color="#bfbfbf";e.style.cursor="hand";e.style.color="white";e.style.fontWeight="normal";f.push(e);for(var d in f)h+=f[d].toString();return h};i.prototype.writeLocationStyle=function(){var h="",f=[],e=new g.ThemeClass("titleArea");e.style.margin="0";e.style.paddingTop="5px";e.style.border="0";e.style.background=this.location;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";e.style.borderBottom="1px solid "+this.location;e.style.minHeight="20px";f.push(e);e=new g.ThemeClass("breadcrumb");e.style.fontSize="8pt";e.style.textDecoration="none";e.style.color=this.content;e.style.paddingTop="2px";f.push(e);e=new g.ThemeClass("a.breadcrumb:hover");e.style.textDecoration="none";e.style.borderBottom="1px dotted";e.style.color="#F58B0F";e.style.cursor="pointer";f.push(e);e=new g.ThemeClass("breadcrumbSeparator");e.style.fontSize="8pt";
e.style.textDecoration="none";e.style.color=this.navbar;e.style.fontWeight="bold";f.push(e);e=new g.ThemeClass("currentLocation");e.style.fontWeight="bold";e.style.fontSize="8pt";e.style.color=this.navbar;e.style.textDecoration="none";e.style.textWrap="normal";e.style.lineHeight="10pt";f.push(e);e=new g.ThemeClass("a.currentLocation:hover");e.style.fontWeight="bold";e.style.fontSize="10pt";e.style.color="#666666";e.style.textDecoration="none";e.style.borderBottom="0";f.push(e);e=new g.ThemeClass("navlinkonpage");
e.style.color=this.content;f.push(e);for(var d in f)h+=f[d].toString();return h};i.prototype.writeButtonStyle=function(){var h="",f=[],e=new g.ThemeClass("commandButton");e.style.color="#222";e.style.border="1px solid #dedede";e.style.backgroundColor=this.button;e.style.textAlign="center";e.style.verticalAlign="baseline";e.style.cursor="pointer";e.style.display="inline-block";e.style.padding="6px";e.style.paddingTop="4px";e.style.borderRadius="1px";e.style.lineHeight="12px";e.style.fontSize="8pt";
e.style.userSelect="none";f.push(e);e=new g.ThemeClass("commandButton:over");e.style.backgroundColor="#e6e6e6";e.style.border="1px solid #808080";f.push(e);e=new g.ThemeClass("commandMenu");e.style.color="#222";e.style.display="inline-block";e.style.verticalAlign="baseline";e.style.margin="0";e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.border="1px solid #dedede";e.style.backgroundColor="#efefef";e.style.cursor="pointer";e.style.borderRadius="1px";f.push(e);e=new g.ThemeClass("commandMenuItem");
e.style.border="0";e.style.padding="0";e.style.margin="0";f.push(e);for(var d in f)h+=f[d].toString();return h};i.prototype.writeMainStyle=function(){var h="",f=[],e=new g.ThemeClass("searchbox");e.style.backgroundImage="url(../images/core_sprites.png)";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="4px -297px";e.style.width="12px";e.style.height="12px";e.style.backgroundColor=this.search;e.style.border="1px solid "+this.search;e.style.fontSize="11px";e.style.width="15em";e.style.height=
"16px";e.style.borderRadius="10px";e.style.color="#999";e.style.padding="0";e.style.paddingLeft="20px";e.style.marginLeft="5px";e.style.marginTop="6px !important";e.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";f.push(e);e=new g.ThemeClass("searchbox:focus");e.style.color="white";e.style.outline="none";f.push(e);e=new g.ThemeClass("checkedRow");e.style.cssText="background-color:"+this.selection+" !important;";f.push(e);e=new g.ThemeClass("navbar-item-selected");
e.style.background=this.selection;e.style.color=this.content;f.push(e);e=new g.ThemeClass("auxpane");e.style.border="0";e.style.background=this.sidepanel;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";e.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";e.style.overflowX="auto";e.style.minWidth="200px";e.style.paddingTop="16px";f.push(e);e=new g.ThemeClass("mainpane");
e.style.background=this.mainpanel;e.style.border=0;f.push(e);e=new g.ThemeClass("mainToolbar");e.style.background=this.toolpanel;e.style.height="31px";e.style.borderBottom="1px solid #ebebeb";f.push(e);for(var d in f)h+=f[d].toString();return h};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,
this.button=g.button.value,this.location=g.location.value,this.selection=g.selection.value,this.sidepanel=g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=
g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:i}});
define("orion/inputCompletion/inputCompletion",[],function(){function g(g,h,f){this._inputField=g;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=h;(g=f?f.group:null)||(g=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=g+"__completion__";this._proposeFromStart=f?f.proposeFromStart:!1;this._extendedProvider=f?f.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._dataList=[];this._initUI();var e=this;this._completionUIContainer.addEventListener("mousedown",function(){e._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){e._mouseDown=!1});this._inputField.addEventListener("blur",function(){e._mouseDown?window.setTimeout(function(){e._inputField.focus()},200):e._dismiss()});this._inputField.addEventListener("keydown",function(d){e.onKeyDown(d)});this._inputField.addEventListener("input",function(){e._proposeOn(e._inputField.value)});
this._inputField.addEventListener("focus",function(){if(e._dismissed&&e._binderFunc)e._dismissing?e._dismissing=!1:e._binderFunc&&e._binderFunc(function(d){e._bind(d);e._proposeOn(e._inputField.value)})})}g.prototype.onKeyDown=function(g){if(this._dismissed)return!0;var h=g.charCode||g.keyCode;if(h===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return g.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
g.ctrlKey),g.stopPropagation(),!1}else if((h===40||h===38)&&this._proposalList&&this._proposalList.length>0)return g.preventDefault(),this._walk(h===40),g.stopPropagation(),!1;else if(h===27)return g.preventDefault(),this._dismiss(),!1;return!0};g.prototype._bind=function(g){this._dataList=g};g.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};g.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};g.prototype._initUI=function(){this._completionUIContainer=
document.getElementById(this._getUIContainerID());if(!this._completionUIContainer)this._completionUIContainer=document.createElement("div"),this._completionUIContainer.id=this._getUIContainerID(),this._completionUIContainer.style.display="none",this._completionUIContainer.className="inputCompletionContainer",this._completionUIContainer.setAttribute("role","list"),this._completionUIContainer.setAttribute("aria-atomic","true"),this._completionUIContainer.setAttribute("aria-live","assertive"),document.body.appendChild(this._completionUIContainer);
this._completionUIContainer.textContent="";this._completionUL=document.getElementById(this._getUIProposalListId());if(!this._completionUL)this._completionUL=document.createElement("ul"),this._completionUL.id=this._getUIProposalListId(),this._completionUL.className="inputCompletionUL";this._completionUL.textContent="";this._completionUIContainer.appendChild(this._completionUL)};g.prototype._createProposalLink=function(g,h,f,e){var d=document.createElement("a");d.href=require.toUrl(h);d.appendChild(this._createBoldText(g,
f,e));return d};g.prototype._createBoldText=function(g,h,f){if(h<0)return document.createTextNode(g);var e=document.createElement("span"),d;0!==h&&(d=document.createTextNode(g.substring(0,h)),e.appendChild(d));var c=document.createElement("b");e.appendChild(c);d=document.createTextNode(g.substring(h,h+f));c.appendChild(d);h+f<g.length-1&&(d=document.createTextNode(g.substring(h+f)),e.appendChild(d));return e};g.prototype._proposeOnCategory=function(g,h){if(h.length!==0){var f=this;if(g){var e=document.createElement("li");
e.className="inputCompletionLICategory";var d=document.createTextNode(g);e.appendChild(d);this._completionUL.appendChild(e)}for(d=0;d<h.length;d++){e=document.createElement("li");e.onmouseover=function(b){f._selectProposal(b.currentTarget)};e.onclick=function(b){f._dismiss(b.currentTarget.completionItem.value)};e.className="inputCompletionLINormal";e.completionItem=h[d].item;if(typeof h[d].item.value==="string"){var c=this._createBoldText(h[d].item.value,h[d].boldIndex,h[d].boldLength);e.appendChild(c)}else h[d].item.value.name&&
h[d].item.value.type==="link"&&e.appendChild(this._createProposalLink(h[d].item.value.name,h[d].item.value.value,h[d].boldIndex,h[d].boldLength));this._completionUL.appendChild(e);this._proposalList.push({item:h[d].item,domNode:e})}}};g.prototype._domNode2Index=function(g){for(var h=0;h<this._proposalList.length;h++)if(this._proposalList[h].domNode===g)return h;return-1};g.prototype._highlight=function(g,h){var f=g,e=!1;isNaN(f)||(e=!0,f=this._proposalList&&g>=0&&g<this._proposalList.length?this._proposalList[g].domNode:
null);if(f)f.className=h?"inputCompletionLISelected":"inputCompletionLINormal",h&&e&&(f.offsetTop<this._completionUIContainer.scrollTop?f.scrollIntoView(!0):f.offsetTop+f.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&f.scrollIntoView(!1))};g.prototype._selectProposal=function(g){var h=g;isNaN(h)&&(h=this._domNode2Index(g));if(h!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=h,this._highlight(this._proposalIndex,!0)};
g.prototype._dismiss=function(g,h){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof g==="string")this._inputField.value=g,this._dismissing=!0,this._inputField.focus();else if(g&&g.name&&g.type==="link")h?window.open(g.value):window.location.href=g.value;var f=this;window.setTimeout(function(){f._completionUIContainer.style.display="none"},200)}};g.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var g=0,h=0,f=this._inputField;f;)g+=
f.offsetLeft,h+=f.offsetTop,f=f.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=h+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=g+"px";this._completionUIContainer.style.width=this._inputField.offsetWidth+"px";this._dismissed=this._mouseDown=!1}else this._dismissed=!0,this._proposalList=null,this._proposalIndex=-1,this._completionUIContainer.style.display="none"};g.prototype._walk=function(g){g=this._proposalIndex+(g?
1:-1);g<-1?g=this._proposalList.length-1:g>=this._proposalList.length&&(g=-1);this._selectProposal(g)};g.prototype._proposeOnList=function(g,h,f){for(var e="",d=[],c=h?h.length:0,b=0;b<g.length;b++)if(g[b].type==="category")this._proposeOnCategory(e,d),e=g[b].label,d=[];else{var a=!0,j=-1;if(h&&f){var m;typeof g[b].value==="string"?m=g[b].value.toLowerCase():g[b].value.name&&(m=g[b].value.name.toLowerCase());j=m.indexOf(h);j<0?a=!1:this._proposeFromStart&&(a=j===0)}a&&d.push({item:g[b],boldIndex:j,
boldLength:c})}this._proposeOnCategory(e,d)};g.prototype._proposeOn=function(g){this._completionUL.textContent="";var h=g?g.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,h,!0);if(this._extendedProvider&&h){var f=this;this._extendedProvider(g,function(e){if(e)for(var d=0;d<e.length;d++)f._proposeOnList(e[d].proposals,e[d].filterForMe?h:g,e[d].filterForMe);f._show()},[])}else this._show()};g.prototype.constructor=g;return{InputCompletion:g}});
define("orion/globalSearch/nls/root/messages",{"Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type:":"File type:","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Case sensitive":"Case sensitive","Regular expression":"Regular expression"});
define("orion/globalSearch/nls/messages",["orion/i18n!orion/globalSearch/nls/messages","orion/globalSearch/nls/root/messages"],function(g,i){var h={root:i};Object.keys(g).forEach(function(f){typeof h[f]==="undefined"&&(h[f]=g[f])});return h});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(g,i,h,f,e){function d(b,a,d,e){this._inputField=b;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);(b=e?e.group:null)||(b=this._inputField.id?this._inputField.id:"default__dropDown__group");this._idPrefix=b+"__dropDown__";this.containerId=this._idPrefix+"UIContainer";this._dismissed=!0;
var f=this;this._optRenderer=new c(a,d,function(){f.dismiss();f._inputField.focus()});this._initUI()}function c(b,a,c){this._searcher=b;this._serviceRegistry=a;this._cancelCallBack=c}d.prototype._initUI=function(){this._optUIContainer=document.getElementById(this.containerId);if(!this._optUIContainer)this._optUIContainer=document.createElement("div"),this._optUIContainer.id=this.containerId,this._optUIContainer.style.display="none",this._optUIContainer.className="advSearchOptContainer",document.body.appendChild(this._optUIContainer),
this._optRenderer.render(this._optUIContainer)};d.prototype.dismiss=function(){this._dismissed=!0;this._optUIContainer.style.display="none"};d.prototype.show=function(b){for(var a=0,c=0,d=this._inputField;d;)a+=d.offsetLeft,c+=d.offsetTop,d=d.offsetParent;this._optUIContainer.style.display="block";this._optUIContainer.style.top=c+this._inputField.offsetHeight+2+"px";this._optUIContainer.style.left=a+"px";this._optUIContainer.style.width=this._inputField.offsetWidth+"px";this._optRenderer._searchBox.value=
b;this._optRenderer._searchBox.focus();this._dismissed=this._mouseDown=!1};d.prototype.toggle=function(){this._dismissed?this.show(this._inputField.value):this.dismiss()};d.prototype.constructor=d;c.prototype.getOptions=function(){return{searchStr:this._searchBox.value,caseSensitive:this._caseSensitiveCB.checked,regEx:this._regExCB.checked,type:this._fileTypes.options[this._fileTypes.selectedIndex].value}};c.prototype.render=function(b,a){this._parentDiv=b;if(typeof this._parentDiv==="string")this._parentDiv=
document.getElementById(this._parentDiv);var c=this._serviceRegistry.getService("orion.core.contenttypes");if(c){var d=this;c.getContentTypes().then(function(b){d.contentTypesCache=b;d._render(a)})}else c=new f.ContentTypeService(this._serviceRegistry),this.contentTypesCache=c.getContentTypes(),this._render(a)};c.prototype._render=function(b){b?this._renderHTML(b):this._renderRaw()};c.prototype._submitSearch=function(){var b=this.getOptions();h.doSearch(this._searcher,this._serviceRegistry,b.searchStr,
b)};c.prototype._initControls=function(){this._searchBox=document.getElementById("advSearchInput");this._fileTypes=document.getElementById("advSearchTypes");this._caseSensitiveCB=document.getElementById("advSearchCaseSensitive");this._regExCB=document.getElementById("advSearchRegEx");this._submitButton=document.getElementById("advSearchSubmit");for(var b=[{label:g["All types"],value:h.ALL_FILE_TYPE}],a=0;a<this.contentTypesCache.length;a++)if(this.contentTypesCache[a]["extends"]==="text/plain"||this.contentTypesCache[a].id===
"text/plain")for(var c=0;c<this.contentTypesCache[a].extension.length;c++)b.push({label:this.contentTypesCache[a].extension[c],value:this.contentTypesCache[a].extension[c]});for(a=0;a<b.length;a++){var c=document.createElement("option"),d=document.createTextNode(b[a].label);c.appendChild(d);this._fileTypes.appendChild(c);c.value=b[a].value}var f=this;this._searchBox.addEventListener("keydown",function(a){a=a.charCode||a.keyCode;a===13&&f._submitSearch();a===27&&f._cancelCallBack&&f._cancelCallBack()});
this._fileTypes.addEventListener("change",function(){var a=f._fileTypes.options[f._fileTypes.selectedIndex].value;f._searchBox.placeholder=a===h.ALL_FILE_TYPE?g["Type a search term"]:e.formatMessage(g["All ${0} files"],a)});this._submitButton.onclick=function(){f._submitSearch()}};c.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(g["Files that contain:"]));document.getElementById("advSearchInput").placeholder=g["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(g["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(g["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(g["Regular expression"]));document.getElementById("advSearchSubmit").value=g.Search};c.prototype._renderHTML=function(b){var a=this,c=new XMLHttpRequest;c.open("GET",i.toUrl(b),!0);c.onreadystatechange=function(){if(this.readyState===
4&&this.status===200)a._parentDiv.innerHTML=this.responseText,a._initHTMLLabels(),a._initControls()};c.send()};c.prototype._htmlTemplate='<ul class="advSearchOptUL"><li class="advSearchOptLILabel"><label>'+g["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+g["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+g["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
g["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+g["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+g.Search+'"></input></li></ul>';c.prototype._renderRaw=function(){this._parentDiv.innerHTML=this._htmlTemplate;this._initControls()};c.prototype.constructor=c;return{advSearchOptContainer:d,
advSearchOptRenderer:c}});
define("orion/PageLinks",["require","orion/Deferred","orion/PageUtil","orion/URITemplate","orion/URL-shim"],function(g,i,h,f){function e(d,c){for(var b=d.getServiceReferences(c||"orion.page.link"),a=h.matchResourceParameters(window.location.href),e={OrionHome:(new URL(g.toUrl("."),window.location)).href.slice(0,-1),Location:a.resource},a=[],m=0;m<b.length;m++){for(var p={},l=b[m].getPropertyKeys(),q=0;q<l.length;q++)p[l[q]]=b[m].getProperty(l[q]);if(p.uriTemplate&&p.nls&&(p.name||p.nameKey)){var r=
new i;g(["i18n!"+p.nls],function(a){var b=new f(p.uriTemplate),b=window.decodeURIComponent(b.expand(e)),b=h.validateURLScheme(b);p.href=b;p.textContent=p.nameKey?a[p.nameKey]:p.name;r.resolve(p)});a.push(r)}else if(p.uriTemplate&&p.name)l=new f(p.uriTemplate),l=window.decodeURIComponent(l.expand(e)),l=h.validateURLScheme(l),p.href=l,p.textContent=p.name,a.push((new i).resolve(p))}return i.all(a)}return{createPageLinks:function(d,c){return e(d,c).then(function(b){return b.map(function(a){var b=a.href,
a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:e}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(g,i,h,f){function e(d){this._init(d)}e.prototype={_init:function(d){this._dropdownNode=h.node(d.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=d.dropdown;this._serviceRegistry=d.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices={}},isSingleService:function(){return this.length(this.unauthenticatedServices)+
this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(d){var c=0,b;for(b in d)d.hasOwnProperty(b)&&c++;return c},_makeMenuItem:function(d,c){var b=document.createElement("span");b.role="menuitem";b.tabIndex=0;var a=document.createTextNode(d);b.appendChild(a);b.classList.add("dropdownMenuItem");b.addEventListener("click",c,!1);b.addEventListener("keydown",function(a){(a.keyCode===
h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&c()},!1);return b},_renderAuthenticatedService:function(d){var c=this,b=this.authenticatedServices[d].authService;if(b&&b.logout){var a=document.createElement("li"),e=this._makeMenuItem(g["Sign Out"],function(){b.logout().then(function(){c.addUserItem(d,b,c.authenticatedServices[d].label);localStorage.removeItem(d);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var e=localStorage.key(a);e&&e.indexOf("/orion/preferences/user")===
0&&localStorage.removeItem(e)}b.getAuthForm(window.location.href).then(function(a){window.location=a})})});a.appendChild(e);this._dropdownNode.appendChild(a)}},renderServices:function(){function d(a){b[a]||(b[a]=c.createDocumentFragment());return b[a]}var c=document,b=[];f.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown.empty();a.forEach(function(a){var b=d(typeof a.category==="number"?a.category:1),e=c.createElement("li"),f=c.createElement("a");f.role=
"menuitem";f.classList.add("dropdownMenuItem");f.href=a.href;f.textContent=a.textContent;e.appendChild(f);b.appendChild(e)});if(this.keyAssistFunction){var a=document.createElement("li"),e=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction);e.classList.add("key-assist-menuitem");a.appendChild(e);d(0).appendChild(a)}var f=this;b.sort(function(a,b){return a-b}).forEach(function(a,c){if(c<b.length-1){var d=document.createElement("li");d.classList.add("dropdownSeparator");var e=document.createElement("span");
e.classList.add("dropdownSeparator");d.appendChild(e);a.appendChild(d)}f._dropdownNode.appendChild(a)});if(this.isSingleService())for(var h in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(h)&&this._renderAuthenticatedService(h,0)}.bind(this))},setKeyAssist:function(d){this.keyAssistFunction=d;this.renderServices()},addUserItem:function(d,c,b,a){a?(this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d],this.authenticatedServices[d]={authService:c,label:b,data:a}):
(this.authenticatedServices[d]&&delete this.authenticatedServices[d],this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:c,label:b,pending:this.unauthenticatedServices[d].pending}:{authService:c,label:b});this.renderServices()}};e.prototype.constructor=e;return{UserMenu:e}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(g,i,h,f){function e(){}e.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><span tabindex="0" role="button" aria-label="Close" class="dialogDismiss layoutRight core-sprite-close imageSprite" id="closeDialog"></span></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',_initialize:function(){var d=
document.body;this.$frameParent=d;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(d);c=c.createContextualFragment(this.CONTAINERTEMPLATE);d.appendChild(c);this.$frame=d.lastChild;this.title&&h.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=h.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=h.$(".dialogContent",this.$frame);c=document.createRange();c.selectNode(this.$parent);
d=c.createContextualFragment(this.TEMPLATE);this.messages&&h.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=h.$(".dialogButtons",this.$frame);this._makeButtons();this.$close.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&b.hide()},!1);this.$frame.addEventListener("keydown",function(a){a.keyCode===h.KEY.ESCAPE?b.hide():a.keyCode===h.KEY.ENTER&&typeof b._defaultCallback==="function"&&b._defaultCallback()},!1);this._bindElements(this.$parent);
typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);this.modal&&this._makeModal()},_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var d=this;this.buttons.forEach(function(c){var b=f.createButton(c.text,c.callback);if(c.id)b.id=c.id,d["$"+b.id]=b;if(c.isDefault)d._defaultCallback=c.callback,d._defaultButton=b;d.$buttonContainer.appendChild(b)})}},_makeModal:function(){var d=this;this.$frame.addEventListener("blur",function(a){d.$lastFocusedElement=a.target},
!0);this._modalListener=function(a){var b=!h.contains(d.$frame,a.target);if(b)for(var c=0;c<d.$$modalExclusions.length;c++)if(h.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),h.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<c.length;a++){for(var e=
0;e<this.$$modalExclusions.length;e++)if(h.contains(this.$$modalExclusions[e],c[a])){b=!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(e=c[a],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=h.lastTabbable(this.$buttonContainer)||h.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===h.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();h.stop(a)}},!1)},
_addChildDialog:function(d){this.$$modalExclusions.push(d.$frame||d.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding===
"function"&&this._afterHiding();var d=this;this.keepAlive||window.setTimeout(function(){d.destroy()},0)},show:function(d){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=h.bounds(this.$frame),b=h.bounds(document.documentElement),a;d?(a=h.bounds(d),d=a.top+a.height+4,a=a.left+4,d+c.height>b.height&&(d=Math.max(0,b.height-c.height-4)),a+c.width>b.width&&(a=Math.max(0,b.width-c.width-4))):(a=Math.max(0,(b.width-c.width)/2),d=Math.max(0,(b.height-c.height)/2));this.$lastFocusedElement=
document.activeElement;this.$frame.style.top=d+"px";this.$frame.style.left=a+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return h.firstTabbable(this.$parent)||this._defaultButton||h.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(d){d.classList.remove("modalBackdrop")});
this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};e.prototype.constructor=e;return{Dialog:e}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/webui/dialog".split(","),function(g,i,h,f,e,d){function c(b){this._init(b)}c.prototype=new d.Dialog;c.prototype.TEMPLATE='<div role="search"><div><label for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+
f.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';c.prototype._init=function(b){this.title=b.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=b.searcher;this._progress=b.progress;this._onHide=b.onHide;
this._contentTypeService=new h.ContentTypeService(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=b.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(g["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(g["Missing required argument: searchRenderer"]);this._favService=b.favoriteService;if(!this._favService)throw Error(g["Missing required argument: favService"]);this._initialize()};c.prototype._bindToDom=function(b){var a=this;a.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(){a._time=+new Date;a._timeoutId&&clearTimeout(a._timeoutId);a._timeoutId=setTimeout(a.checkSearch.bind(a),0)},
!1);this.$fileName.addEventListener("keydown",function(b){if(b.keyCode===e.KEY.ENTER){var c=e.$("a",a.$results);c&&(e.stop(b),window.open(c.href),a.hide())}},!1);b.addEventListener("keydown",function(b){var c,d,f,g,h;if(b.keyCode===e.KEY.DOWN||b.keyCode===e.KEY.UP)d=e.$$array("a",a.$results),c=e.$$array("a",a.$favresults),f=document.activeElement,h=d.indexOf(f),g=c.indexOf(f),b.keyCode===e.KEY.DOWN?g>=0?(g<c.length-1?c[g+1]:d.length>0?d[0]:c[0]).focus():h>=0?(h<d.length-1?d[h+1]:c.length>0?c[0]:d[0]).focus():
(d.length>0||c.length>0)&&(-1<c.length-1?c[0]:d[0]).focus():g>=0?(f=a.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=a.$fileName,(h>0?d[h-1]:c.length>0?c[c.length-1]:f).focus()):d.length>0?d[d.length-1].focus():c.length>0&&c[c.length-1].focus(),e.stop(b)});b.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(a._forceUseCrawler||!a._fileService.getService(a._searcher.getSearchLocation()).search){var b=a._searchOnRoot?a._searcher.getSearchRootLocation():
a._searcher.getChildrenLocation(),b=new i.SearchCrawler(a._searcher.registry,a._fileService,"",{searchOnName:!0,location:b});a._searcher.setCrawler(b);b.buildSkeleton(function(){a.$crawlingProgress.style.display="inline";a.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){a.$crawlingProgress.style.display="none";a.$progress.removeChild(a.$progress.lastChild)})}},0)};c.prototype.populateFavorites=function(){var b=document.createElement("div");b.appendChild(document.createTextNode(g["Populating favorites&#x2026;"]));
e.empty(this.$favresults);this.$favresults.appendChild(b);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());this._favService.addEventListener("favoritesChanged",this.showFavorites())};c.prototype.showFavorites=function(){var b=this;return function(a){if(a.navigator)a=a.navigator;b._searchRenderer.makeRenderFunction(b._contentTypeService,b.$favresults,!1,b.decorateResult.bind(b),
b.showFavoritesImage)(a);if(a&&a.length>0)a=document.createElement("div"),a.style.borderBottom="1px dashed #BBBBBB",a.style.padding="5px",b.$favresults.appendChild(a)}};c.prototype.showFavoritesImage=function(b){var a=new Image;a.classList.add("modelDecorationSprite");a.classList.add("core-sprite-makeFavorite");a.src=f.toUrl("images/none.png");a.title=g.Favorite;b.appendChild(a);a.style.verticalAlign="middle"};c.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var b=(new Date).getTime();
b-this._time>this._searchDelay?(this._time=b,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};c.prototype.doSearch=function(){var b=this.$fileName.value,a=this.showFavorites();this._progress?this._progress.progress(this._favService.queryFavorites(b),"Getting favorites for: "+b).then(function(b){a(b)}):this._favService.queryFavorites(b).then(function(b){a(b)});if(b){var c=document.createElement("div");c.appendChild(document.createTextNode(g["Searching..."]));e.empty(this.$favresults);
this.$results.appendChild(c);var d=this;setTimeout(function(){var a=d._searcher.createSearchParams(b,!0,d._searchOnRoot),c=d._searchRenderer.makeRenderFunction(d._contentTypeService,d.$results,!1,d.decorateResult.bind(d));d._searcher.search(a,!1,c)},0)}};c.prototype.decorateResult=function(b){for(var a=this,b=e.$$array("a",b),c=0;c<b.length;c++){var d=b[c];d.addEventListener("mouseup",function(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&a.hide()},!1);d.addEventListener("keyup",function(b){b.keyCode===
e.KEY.ENTER&&a.hide()},!1)}};c.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};c.prototype._afterHiding=function(){this._onHide&&this._onHide()};c.prototype.constructor=c;return{OpenResourceDialog:c}});
(function(){var g=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!=="undefined"&&location.href,e=f&&location.protocol&&location.protocol.replace(/\:/,""),d=f&&location.hostname,c=f&&(location.port||void 0),b=[];define("text",[],function(){var a,j,m;typeof window!=="undefined"&&window.navigator&&window.document?j=function(b,c){var d=a.createXhr();d.open("GET",b,!0);d.onreadystatechange=
function(){d.readyState===4&&c(d.responseText)};d.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(m=require.nodeRequire("fs"),j=function(a,b){var c=m.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)}):typeof Packages!=="undefined"&&(j=function(a,b){var c=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),e,f,g="";try{e=new java.lang.StringBuffer;
(f=c.readLine())&&f.length()&&f.charAt(0)===65279&&(f=f.substring(1));for(e.append(f);(f=c.readLine())!==null;)e.append(d),e.append(f);g=String(e.toString())}finally{c.close()}b(g)});return a={version:"1.0.7",strip:function(a){if(a){var a=a.replace(i,""),b=a.match(h);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var a,b,
c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(b=0;b<3;b++){c=g[b];try{a=new ActiveXObject(c)}catch(d){}if(a){g=[c];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:j,parseName:function(a){var b=!1,c=a.indexOf("."),d=a.substring(0,c),a=a.substring(c+1,a.length),c=a.indexOf("!");c!==-1&&(b=a.substring(c+1,a.length),b=b==="strip",a=a.substring(0,c));return{moduleName:d,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(b,
c,d,e){var f=a.xdRegExp.exec(b),g;if(!f)return!0;b=f[2];f=f[3];f=f.split(":");g=f[1];f=f[0];return(!b||b===c)&&(!f||f===d)&&(!g&&!f||g===e)},finishLoad:function(c,d,e,f,g){e=d?a.strip(e):e;g.isBuild&&(b[c]=e);f(e)},load:function(b,g,j,h){if(h.isBuild&&!h.inlineText)j();else{var m=a.parseName(b),i=m.moduleName+"."+m.ext,o=g.toUrl(i),u=h&&h.text&&h.text.useXhr||a.useXhr;!f||u(o,e,d,c)?a.get(o,function(c){a.finishLoad(b,m.strip,c,j,h)}):g([i],function(b){a.finishLoad(m.moduleName+"."+m.ext,m.strip,b,
j,h)})}},write:function(c,d,e){if(d in b){var f=a.jsEscape(b[d]);e.asModule(c+"!"+d,"define(function () { return '"+f+"';});\n")}},writeFile:function(b,c,d,e,f){var c=a.parseName(c),g=c.moduleName+"."+c.ext,j=d.toUrl(c.moduleName+"."+c.ext)+".js";a.load(g,d,function(){var c=function(a){return e(j,a)};c.asModule=function(a,b){return e.asModule(a,j,b)};a.write(b,g,c,f)},f)}}})})();define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner" class="headerLayout">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="primaryNav layoutBlock topRowBanner">\n\t\t<a id="home" class="layoutLeft logo"></a>\n\t\t<nav id="primaryNav" class="layoutLeft" role="navigation"></nav>\n\t\t<div class="layoutRight">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;">\n\t\t\t\t<span tabindex="0" role="button" id="relatedTrigger" class="dropdownTrigger hidden">${Related}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="relatedDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;"></div>\n\t\t\t<div id="userMenu" class="spacingLeft layoutLeft">\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">${Options}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<\!-- Task + resource (title) area --\>\n\t<div id="titleArea" class="layoutBlock titleArea">\n\t\t<div class="clear" style="padding-bottom:5px;display:inline;"><span id="location" class="currentLocation"></span><span id="dirty" class="currentLocation"></span></div>\n\t\t<div class="layoutRight pageNav">\n\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t</div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a>\n\t\t<a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=2.0" target="_blank">${Report a Bug}</a>|\n\t\t<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a>|\n\t\t<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a>|\n\t\t<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<div class="layoutRight" style="padding-left:7px;padding-right:7px;margin-top:3px;" id="settingsTab" style="visibility:hidden;">\n\t<div class="layoutRight core-sprite-settings" id="settingsAction" role="settings" aria-live="off" style="visibility:hidden;"></div>\n</div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>\n<div id="notificationArea" class="layoutLeft layoutBlock slideContainer">\n\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t<div class="layoutRight"><span tabindex="0" role="button" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div>\n</div>\n\t\t\n\t'});
define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(g,i,h){return{slideoutHTMLFragment:function(f){var e=document.createElement("div");e.innerHTML=h;var d=i.$("#slideContainer",e);d.id=f+d.id;d=i.$("#pageCommandParameters",e);d.id=f+d.id;d=i.$("#pageCommandDismiss",e);d.id=f+d.id;return e.innerHTML}}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/editor/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/container/ThemeSheetWriter,orion/searchUtils,orion/inputCompletion/inputCompletion,orion/globalSearch/advSearchOptContainer,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html".split(","),function(g,
i,h,f,e,d,c,b,a,j,m,p,l,q,r,n,k,o,u,t,s,w,D,v,F,x,B,A){function y(a,b){if(a.getLabel)return a.getLabel();else{var c=new w;c.resolve(b.properties.name);return c}}function J(a){j.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function C(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){var c;a.Name?c=document.createTextNode(a.Name):a.login&&
(c=document.createTextNode(a.login));c&&(b.childNodes.length>0?b.childNodes[0].nodeType===3?b.replaceChild(c,b.childNodes[0]):b.insertBefore(c,b.childNodes[0]):b.appendChild(c))})}function N(a,b){var c=a.getServiceReferences("orion.core.auth");I=[];if(j.node("userMenu")){var d=j.node("userDropdown"),e=new p.Dropdown({dropdown:d}),f=new D.UserMenu({dropdownNode:d,dropdown:e,serviceRegistry:a}),d=j.node("userTrigger");new l.Tooltip({node:d,text:g.Options,position:["below","left"]});C(a,d);f.setKeyAssist(b);
for(d=0;d<c.length;d++){var e=c[d],h=a.getService(e);y(h,e).then(function(a){h.getKey().then(function(b){I.push(b);h.getUser().then(function(c){f.addUserItem(b,h,a,c)},function(c,d){f.addUserItem(b,h,a,d)});window.addEventListener("storage",function(){K[b]!==localStorage.getItem(b)&&(K[b]=localStorage.getItem(b),h.getUser().then(function(c){f.addUserItem(b,h,a,c)},function(){f.addUserItem(b,h,a)}))},!1)})})}}}function M(a){var b=document.createElement("span");b.id="advancedSearchDropDown";j.node("searchOptions").appendChild(b);
b.tabIndex=0;b.classList.add("advancedSearchDecorationSprite");b.classList.add("core-sprite-openarrow");b.title=g["Advanced search"];b.onclick=function(){a.toggle()};b.addEventListener("keydown",function(b){(b.charCode||b.keyCode)===13&&a.toggle()});b.classList.add("bannerMenuSearchOptions")}function z(a,b){var c=j.node("relatedDropdown");H||(H=new p.Dropdown({dropdown:c}));a._addMenuItem(c,b)}function E(a,b,c,e,g){var h,m=a.getServiceReferences("orion.page.link.related");m.length<=0||j.node("relatedLinks")&&
w.when(function(){if(h)return h;var b=a.getService("orion.core.contenttypes");b||(b=new r.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var i;j.node("relatedLinks")&&H&&(H.close(),H.empty());for(var k=[],s=0;s<m.length;s++){var x={},o,p=m[s].getPropertyKeys();for(o=0;o<p.length;o++)x[p[o]]=m[s].getProperty(p[o]);if(x.id){var A=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var c=new f.CommandInvocation(e,
b,b,null,a);z(a,c)}else typeof g==="function"&&(i||(i=g()),w.when(i,function(c){c&&b===R&&(!a.visibleWhen||a.visibleWhen(c))&&z(a,new f.CommandInvocation(e,c,c,null,a))}))},n=null;o=null;if(c.indexOf(x.id)<0)if((x.nls&&x.nameKey||x.name)&&x.uriTemplate)o=d._createCommandOptions(x,m[s],a,h,!0),k.push(o),o.then(function(a){a=new f.Command(a);A(a)});else{if(!n&&(n=e.findCommand(x.id))){A(n);continue}if(!n){var l=a.getServiceReferences("orion.navigate.command");for(o=0;o<l.length;o++)if(l[o].getProperty("id")===
x.id){for(var x={},p=l[o].getPropertyKeys(),B=0;B<p.length;B++)x[p[B]]=l[o].getProperty(p[B]);o=d._createCommandOptions(x,l[o],a,h,!0);k.push(o);o.then(function(a){n=new f.Command(a);A(n)});break}}}}}w.all(k,function(a){return a}).then(function(){var a=j.node("relatedTrigger");if(H&&a)a.style.visibility=H.getItems().length===0?"hidden":"visible"})})}function O(a){var b=j.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function T(a){a.getPreferences("/themes",2).then(function(a){var b=
a.get("selected");if(b&&(b=JSON.parse(b),a=a.get("styles"))){var a=JSON.parse(a),c;for(c in a)if(a[c].name===b.selected){c=a[c];c=(new o.ThemeSheetWriter).getSheet(c);b=document.createElement("STYLE");b.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function P(a){var b={},c=null;typeof a==="string"&&(a=j.node(a));a||(a=j.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){c=
d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=j.$(".slideParameters",c),b.parameterArea=j.$(".parameters",c),b.dismissArea=j.$(".parametersDismiss",c),b.notifications=j.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=j.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=j.bounds(c),b.toolbarTargetY=a.height+1;return b}function Q(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&
(c=j.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=j.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var n=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),K={},I=[],H,R,S=[],G,L=null;return{addSettings:function(a){var b=document.getElementById("settingsTab"),c=document.getElementById("settingsAction"),
d=!1,e;b.style.visibility="";c.style.visibility="";c.onclick=function(){if(!d){d=!0;b.style.backgroundColor="#555";b.style.zIndex="99";b.style.borderTopRightRadius="3px";b.style.borderTopLeftRadius="3px";c.className="core-sprite-settings-white";b.id="settingsNode";c.id="settingsButton";var f=document.getElementById("innerPanels"),g=f.getBoundingClientRect(),h=b.getBoundingClientRect();e?e.style.visibility="visible":(e=document.createElement("div"),e.className="settingsPanel",e.style.width="150px",
e.style.height="150px",e.style.backgroundColor="#555",e.style.zIndex="99",e.style.top=h.top-g.top+24-4+"px",e.id="settingsPanel",e.style.borderTopLeftRadius="3px",e.style.borderBottomRightRadius="3px",e.style.borderBottomLeftRadius="3px",f.appendChild(e),j.addAutoDismiss([c,b,e],function(){c.className="core-sprite-settings";b.style.backgroundColor="white";e.style.visibility="hidden";d=!1}));j.empty(e);a.appendTo(e)}}},generateBanner:function(a,d,k,o,p,n,y,C){function D(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=j.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}T(o);o=j.node(a);if(!o)throw g["could not find banner parent, id was "]+a;a=document.createRange();a.selectNode(o);a=a.createContextualFragment(x);j.processTextNodes(a,g);o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a);a=j.node("home");a.href=i.toUrl("navigate/table.html");a.setAttribute("aria-label",
g["Orion Home"]);j.node("progressPane").src=i.toUrl("images/none.png");if(a=j.node("pageToolbar"))a.classList.add("toolbarLayout"),a.innerHTML=A+h.slideoutHTMLFragment("mainToolbar");(a=j.node("closeNotifications"))&&a.setAttribute("aria-label",g["Close notification"]);if(a=j.node("footer"))a.innerHTML=B,j.processTextNodes(a,g);k.setParameterCollector(new e.CommandParameterCollector(P,Q));var z=document.createElement("div");z.id="keyAssist";z.style.display="none";z.classList.add("keyAssistFloat");
z.role="list";z.setAttribute("aria-atomic","true");z.setAttribute("aria-live","assertive");document.body.appendChild(z);document.addEventListener("keydown",function(a){if(a.charOrCode===j.KEY.ESCAPE)z.style.display="none"},!1);j.addAutoDismiss([z],function(){z.style.display="none"});var r=j.node("primaryNav");r&&v.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){r.appendChild(a)})});var E=j.node("search");if(!E)throw"failed to generate HTML for banner";E.setAttribute("placeholder",
g.Search);new l.Tooltip({node:E,text:g["Type a keyword or wild card to search in root"],position:["below","left"]});var K=new s.advSearchOptContainer(E,p,d,{group:"advancedSearch"});new t.InputCompletion(E,function(a){u.getMixedSearches(d,!0,!1,function(b){var c,d=[],e=!1,f=!1;for(c in b)b[c].label&&b[c].value?(e||(d.push({type:"category",label:g["Saved searches"]}),e=!0),d.push({type:"proposal",value:{name:b[c].label,value:i.toUrl("search/search.html")+"#"+b[c].value,type:"link"}})):(f||(d.push({type:"category",
label:g["Recent searches"]}),f=!0),d.push({type:"proposal",label:b[c].name,value:b[c].name}));a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var c=d.getServiceReferences("orion.search.proposal");if(!c||c.length===0)b(null);else{var e=[];c.forEach(function(b){var c=b.getProperty("filterForMe");e.push(d.getService(b).run(a).then(function(a){for(var b={filterForMe:c,proposals:[]},d=0;d<a.length;d++){b.proposals.push({type:"category",label:a[d].category});for(var e=0;e<a[d].datalist.length;e++)b.proposals.push({type:"proposal",
label:a[d].datalist[e],value:a[d].datalist[e]})}return b}))});w.all(e).then(function(a){b(a)})}}});E.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&u.doSearch(p,d,E.value)});M(K);j.addAutoDismiss([j.node(K.containerId),j.node("advancedSearchDropDown")],function(){K.dismiss()});if(a=j.$(".split")){var o=j.$(".sidePanelLayout"),I=j.$(".mainPanelLayout");if(o&&I)L={side:o,main:I},L.splitter=new m.Splitter({node:a,sidePanel:o,mainPanel:I,toggle:!0}),a=new f.Command({name:g["Toggle side panel"],
tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){L.splitter.toggleSidePanel()}}),k.addCommand(a),k.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new f.CommandKeyBinding("o",!0)),y&&(L.splitter.addResizeListener(function(a){y&&a===I&&y.getTextView().resize()}),y.getTextView().setKeyBinding(new b.KeyBinding("o",!0),"toggleOutliner"),y.getTextView().setAction("toggleOutliner",function(){L.splitter.toggleSidePanel();return!0},{name:g["Toggle Outliner"]}))}a=
new f.Command({name:g["Make Favorite"],tooltip:g["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=d.getService("orion.core.favorite"),c=d.getService("orion.page.progress"),e=function(a){return function(e){e?d.getService("orion.page.message").setMessage(a.Name+
g[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},f=0;f<a.length;f++){var j=a[f];c.progress(b.hasFavorite(j.ChildrenLocation||j.Location),"Checking favorite "+j.Name).then(e(j))}}});k.addCommand(a);var H=function(a,b,c){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new q.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new F.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:d,onHide:function(){c&&c.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},a=new f.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){H(p,d,y)}});y&&(y.getTextView().setKeyBinding(new b.KeyBinding("f",!0,!0,!1),a.id),y.getTextView().setAction(a.id,function(){H(p,d,y);return!0},a));k.addCommand(a);k.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new f.CommandKeyBinding("f",!0,!0));a=new f.Command({name:g["Global search"],tooltip:g["Global search"],id:"eclipse.globalSearch",callback:function(){var a=j.node("search");a&&a.focus()}});y&&(y.getTextView().setKeyBinding(new b.KeyBinding("h",!0,!1,!0),a.id),y.getTextView().setAction(a.id,function(){var a=y.getSelection(),b=null;a.end>a.start&&(b=y.getModel().getText(a.start,a.end));if(a=j.node("search")){if(b)a.value=b;a.focus()}return!0},a));k.addCommand(a);k.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new f.CommandKeyBinding("h",!0,!1,!0));a=new f.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=j.node("banner"),b=j.node("footer"),c=j.$(".content-fixedHeight");a.style.display==="none"?(a.style.display="block",b.style.display="block",c.classList.remove("content-fixedHeight-maximized")):(a.style.display="none",b.style.display="none",c.classList.add("content-fixedHeight-maximized"));
y&&y.getTextView().resize();return!0}});k.addCommand(a);k.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new f.CommandKeyBinding("m",!0,!0));y&&(y.getTextView().setKeyBinding(new f.CommandKeyBinding("m",!0,!0),a.id),y.getTextView().setAction(a.id,a.callback,a));C&&C.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});C=new f.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});k.addCommand(C);k.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new f.CommandKeyBinding(112,!0,!0));C=new f.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});k.addCommand(C);k.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new f.CommandKeyBinding("o",!0,!0));C=new f.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(z.style.display==="none"){var a;j.empty(z);if(y){a=document.createElement("h2");a.appendChild(document.createTextNode(g.Editor));z.appendChild(a);a=y.getTextView().getActions(!1);for(var b=0;b<a.length;b++){var d=a[b],e=d,f=y.getTextView(),h=f.getActionDescription(d);if(h&&h.name)e=h.name;d=f.getKeyBindings(d);
for(f=0;f<d.length;f++){var h=c.getUserKeyString(d[f]),m=document.createElement("span");m.role="listitem";m.appendChild(document.createTextNode(h+" = "+e));m.appendChild(document.createElement("br"));z.appendChild(m)}}}a=document.createElement("h2");a.appendChild(document.createTextNode(g.Global));z.appendChild(a);k.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});k.addCommand(C);k.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new f.CommandKeyBinding(191,
!1,!0));y&&(a=window.navigator.platform.indexOf("Mac")!==-1,y.getTextView().setKeyBinding(new f.CommandKeyBinding(191,!1,!0,!a,a),C.id),y.getTextView().setAction(C.id,C.callback,C));O(k);N(d,C.callback);J(d);window.addEventListener("hashchange",function(){k.processURL(window.location.href)},!1);window.setTimeout(function(){D(d)},0)},getToolbarElements:P,getMainSplitter:function(){return L},layoutToolbarElements:Q,setPageTarget:function(b){var c,d,e=b.breadcrumbRootName;b.target?(b.searchService&&
b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=e?e+" ":"",d+=b.fileService.fileServiceName(b.target.Location),e=null),c=b.name||b.target.Name,R=b.target,E(b.serviceRegistry,b.target,S,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(G=b.title)||(G=c?c+" - "+b.task:b.task);window.document.title=G;j.empty(j.node("location"));new a.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,rootSegmentName:e,
workspaceRootSegmentName:d,makeHref:b.makeBreadcrumbLink})},setDirtyIndicator:function(a){if(G)G.charAt(0)==="*"&&!a&&(G=G.substring(1)),a&&G.charAt(0)!=="*"&&(G="*"+G),window.document.title=G;var b=j.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){S=a},notifyAuthenticationSite:n}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(g,i,h){function f(d,c,b,a,e){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=e;this.domId=b;this.progressDomId=a||b;this._hookedClose=!1}function e(d,c,b,a){this.statusService=d;this.progressId=c;if(b){this.deferred=b;this.begin(a);var e=this;b.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}}
f.prototype={_init:function(){var d=i.node("closeNotifications"),c=this;d&&!this._hookedClose&&(d.addEventListener("click",function(){c.setProgressMessage("")},!1),d.addEventListener("keydown",function(b){(b.keyCode===i.KEY.ENTER||b.keyCode===i.KEY.SPACE)&&c.setProgressMessage("")},!1))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=h.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(d,c,b){this._init();this.currentMessage=
d;var a=i.node(this.domId);if(typeof b==="boolean"){var e=this,f=a.getAttribute("aria-live");a.setAttribute("aria-live",b?"polite":"off");window.setTimeout(function(){d===e.currentMessage&&(i.empty(a),a.appendChild(document.createTextNode(d)),window.setTimeout(function(){a.setAttribute("aria-live",f)},100))},100)}else i.empty(a),a.appendChild(document.createTextNode(d));typeof c==="number"&&(e=this,window.setTimeout(function(){d===e.currentMessage&&(i.empty(a),a.appendChild(document.createTextNode("")))},
c))},setErrorMessage:function(d){this.currentMessage=d;this._init();var c=d.responseText||d.message||d;try{c=JSON.parse(c)}catch(b){}var d=c.Message||c,a="red";if(c.Severity)switch(c.Severity){case "Warning":a="#FFCC00";break;case "Error":a="red";break;case "Info":case "Ok":a="green"}c=document.createElement("span");c.style.color=a;c.appendChild(document.createTextNode(d));d=i.node(this.domId);i.empty(d);d.appendChild(c)},setProgressMessage:function(d){this._init();this.currentMessage=d;var c=document.createElement("span");
c.classList.add("imageSprite");c.classList.add("core-sprite-progress");var b=i.node(this.progressDomId);i.empty(b);b.appendChild(c);b.appendChild(document.createTextNode(d));c=i.node(this.notificationContainerDomId);c.classList.add("progressNormal");if(d&&d.length>0)c.classList.add("slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else c.classList.remove("slideContainerActive");h.layoutToolbarElements(this._getNotifierElements())},
setProgressResult:function(d){this.currentMessage=d;var c=d.responseText||d;try{c=JSON.parse(c)}catch(b){}this._init();var a=c.Message||c,e="core-sprite-info",f="progressInfo",g=document.createElement("span");g.classList.add("imageSprite");d=[];if(c.Severity)switch(c.Severity){case "Warning":e="core-sprite-warning";f="progressWarning";d.push("progressInfo");d.push("progressError");d.push("progressNormal");break;case "Error":e="core-sprite-error";f="progressError";d.push("progressWarning");d.push("progressInfo");
d.push("progressNormal");break;default:d.push("progressWarning"),d.push("progressError"),d.push("progressNormal")}g.classList.add(e);var l=i.node(this.progressDomId),e=i.node(this.notificationContainerDomId);i.empty(l);l.appendChild(g);c.HTML?(c=document.createElement("span"),c.innerHTML=a,l.appendChild(c)):l.appendChild(document.createTextNode("   "+a));if(f&&this.progressDomId!==this.domId){e.classList.add(f);for(a=0;a<d.length;a++)e.classList.remove(d[a])}e.classList.add("slideContainerActive");
h.layoutToolbarElements(this._getNotifierElements())},showWhile:function(d,c){var b=this;if(c){b.setProgressMessage(c);var a=function(){c===b.currentMessage&&b.setProgressMessage("")};d.then(a,a)}return d},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(d,c){return new e(this,++this._lastProgressId,d,c)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var d="",c=!0,b;for(b in this._progressMonitors)this._progressMonitors[b].status&&(c||(d+=", "),
d+=this._progressMonitors[b].status,c=!1);this.setProgressMessage(d)}else this.setProgressMessage("")},_beginProgressMonitor:function(d){this._progressMonitors[d.progressId]=d;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(d){this._progressMonitors[d.progressId]=d;this._renderOngoingMonitors()},_doneProgressMonitor:function(d){delete this._progressMonitors[d.progressId];this._progressMonitors.length--;d.status?this.setProgressResult(d.status):this._renderOngoingMonitors()}};
f.prototype.constructor=f;e.prototype.begin=function(d){this.status=d;this.statusService._beginProgressMonitor(this)};e.prototype.done=function(d){this.status=d;this.statusService._doneProgressMonitor(this)};e.prototype.worked=function(d){this.status=d;this.statusService._workedProgressMonitor(this)};e.prototype.constructor=e;return{StatusReportingService:f,ProgressMonitor:e}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commands","orion/commonHTMLFragments"],function(g,i,h,f){function e(c,b){var a=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");var d=b.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");c.appendChild(this.domNode);for(var e=0;e<d.length;e++)this.domNode.classList.add(d[e]);this.domNode.id=b.id;if(b.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitle"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=0,this.domNode.addEventListener("click",
function(b){(b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(b){b.keyCode===g.KEY.ENTER&&(b.target===a.domNode||b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1);if(b.iconClass){var h=document.createElement("span");h.classList.add("sectionIcon");this.domNode.appendChild(h);(Array.isArray(b.iconClass)?b.iconClass:[b.iconClass]).forEach(function(a){h.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=b.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=b.title;if(typeof b.getItemCount==="function")d=document.createElement("div"),d.classList.add("layoutLeft"),d.classList.add("sectionItemCount"),this.domNode.appendChild(d),d.textContent=b.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
b.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);d=document.createElement("div");d.id=b.id+"FilterSearchBox";this.domNode.appendChild(d);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");
this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("div");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("div");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);b.slideout&&(d=f.slideoutHTMLFragment(b.id),e=document.createRange(),e.selectNode(this.domNode),d=e.createContextualFragment(d),this.domNode.appendChild(d));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);c.appendChild(this._contentParent);b.content&&this.setContent(b.content);
this.hidden=b.hidden;if(typeof b.onExpandCollapse==="function")this._onExpandCollapse=b.onExpandCollapse;this._preferenceService=b.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var i=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(i.id);if(a!==void 0)i.hidden=!a;if(!i.hidden)i._contentParent.style.display="block";i._updateExpandedState(!i.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function d(c){this._section=c;this._id=++c._lastMonitor}e.prototype={setTitle:function(c){this.titleNode.textContent=c},setContent:function(c){typeof c==="string"?this._contentParent.innerHTML=c:(this._contentParent.innerHTML="",this._contentParent.appendChild(c))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new d(this)},_setMonitorMessage:function(c,b){this._progressNode.style.visibility=
"visible";this._loading[c]=b;var a="",d;for(d in this._loading)a!==""&&(a+="\n"),a+=this._loading[d];this._progressNode.title=a},_monitorDone:function(c){delete this._loading[c];var c="",b;for(b in this._loading)c!==""&&(c+="\n"),c+=this._loading[b];this._progressNode.title=c;if(c==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(c,b){var a=this.twistie,d=this.id;a&&(a.classList.add(c?this._expandImageClass:this._collapseImageClass),a.classList.remove(c?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(d,c)});this._onExpandCollapse&&this._onExpandCollapse(c,this)}};e.prototype.constructor=e;d.prototype={begin:function(c){this.status=c;this._section._setMonitorMessage(this.id,c)},worked:function(c){this.status=
c;this._section._setMonitorMessage(this.id,c)},done:function(c){this.status=c;this._section._monitorDone(this.id)}};d.prototype.constructor=d;return{Section:e}});
define("orion/dynamicContent",["orion/webui/littlelib","orion/webui/tooltip"],function(g,i){function h(b,a){if(b===void 0)throw Error("Missing reqired argument: id");if(a===void 0)throw Error("Missing reqired argument: anchor");this._id=b;this._anchor=a;this._prefix="progressSpinner:"}function f(b,a){if(b===void 0)throw Error("Missing reqired argument: id");if(a===void 0)throw Error("Missing reqired argument: anchor");this._id=b;this._anchor=a;this._prefix="progressDots:"}function e(b,a){if(!b)throw Error("Missing reqired argument: objects");
if(!a)throw Error("Missing reqired argument: populate");this._objects=b;this._populate=a}function d(){}function c(b){if(!b)throw Error("Missing required argument: model");this._model=b;this.use(new d)}h.prototype={start:function(){var b=document.createElement("img");b.id=this._prefix+this._id;b.src="/images/none.png";b.className="progressPane_running";this._anchor.appendChild(b)},stop:function(){var b=g.node(this._prefix+this._id);b.parentNode.removeChild(b)},error:function(b){var a=g.node(this._prefix+
this._id);a.src="/images/problem.gif";a.className="";new i.Tooltip({node:a,text:b})}};h.prototype.constructor=h;f.prototype={start:function(){var b=document.createElement("img");b.id=this._prefix+this._id;b.style.textDecoration="blink";b.appendChild(document.createTextNode(" ..."));this._anchor.appendChild(b)},stop:function(){var b=g.node(this._prefix+this._id);b.parentNode.removeChild(b)},error:function(b){var a=g.node(this._prefix+this._id);a.parentNode.removeChild(a);var c=document.createElement("img");
c.src="/images/problem.gif";this._anchor.appendChild(c);new i.Tooltip({node:a,text:b})}};f.prototype.constructor=f;e.prototype={getObjects:function(){return this._objects},getDetails:function(b){return this._populate(b)}};e.prototype.constructor=e;d.prototype={progressIndicator:f,setupProperties:{progressIndicators:[]},errorHandler:function(b,a){this.explorer.progressIndicators[b].error(a)}};d.prototype.constructor=d;c.prototype={render:function(){var b=this;this._initialRender&&this._initialRender();
for(var a=function(a){return function(){b._renderAfterItemPopulation(a);b.progressIndicators[a].stop()}},c=function(a){return function(c){if(b._errorHandler)b._errorHandler(a,c);else throw Error(c);}},d=0;d<this._model.getObjects().length;d++)this._renderBeforeItemPopulation(d),this.progressIndicators[d].start(),this._model.getDetails(d).then(a(d),c(d));this._cleanupRender&&this._cleanupRender()},use:function(b){for(var a in b)if(a==="populateItem")this._populateItem=b.populateItem.bind(b),b.explorer=
this;else if(a==="renderBeforeItemPopulation")this._renderBeforeItemPopulation=b.renderBeforeItemPopulation.bind(b),b.explorer=this;else if(a==="renderAfterItemPopulation")this._renderAfterItemPopulation=b.renderAfterItemPopulation.bind(b),b.explorer=this;else if(a==="errorHandler")this._errorHandler=b.errorHandler.bind(b),b.explorer=this;else if(a==="initialRender")this._initialRender=b.initialRender.bind(b),b.explorer=this;else if(a==="cleanupRender")this._cleanupRender=b.cleanupRender.bind(b),
b.explorer=this;else if(a==="progressIndicator")this.progressIndicator=b.progressIndicator,b.explorer=this;else if(a==="setupProperties"){for(var c in b.setupProperties)this[c]=b.setupProperties[c];b.explorer=this}}};c.prototype.constructor=c;return{DynamicContentModel:e,DynamicContentExplorer:c,DynamicContentRenderer:d,ProgressSpinner:h,ProgressDots:f}});
define("orion/git/widgets/CommitTooltipDialog",["i18n!git/nls/gitmessages","require","orion/webui/littlelib","orion/i18nUtil","orion/webui/popupdialog"],function(g,i,h,f,e){function d(c){this._init(c)}d.prototype=new e.PopupDialog;d.prototype.TEMPLATE='<div id="parentPane" style="padding:10px; width:520px"></div>';d.prototype._init=function(c){this.commit=c.commit;this._initialize(c.triggerNode,null,null,"mouseover",1E3)};d.prototype._bindToDom=function(){this._displayCommit(this.commit)};d.prototype._displayCommit=
function(c){var b=this.$parentPane,a=c.Message.split(/(\r?\n|$)/)[0],d=document.createElement("a");d.className="navlinkonpage";d.href="/git/git-commit.html#"+c.Location+"?page=1&pageSize=1";d.textContent=a;b.appendChild(d);d=document.createElement("div");d.style.paddingTop="15px";b.appendChild(d);d=document.createElement("div");b.appendChild(d);a=document.createElement("div");b.appendChild(a);if(c.AuthorImage){b=document.createElement("div");b.style["float"]="left";var e=new Image;e.src=c.AuthorImage;
e.name=c.AuthorName;e.className="git-author-icon";b.appendChild(e);d.appendChild(b)}b=document.createElement("span");b.textContent=f.formatMessage(g[" authored by ${0} {${1}) on ${2}"],c.AuthorName,c.AuthorEmail,(new Date(c.Time)).toLocaleString());a.appendChild(b);d=document.createElement("div");a.appendChild(d);b=document.createElement("span");b.textContent=f.formatMessage(g["committed by 0 (1)"],c.CommitterName,c.CommitterEmail);a.appendChild(b);d=document.createElement("div");d.style.paddingTop=
"15px";a.appendChild(d);b=document.createElement("span");b.textContent=g["commit:"]+c.Name;a.appendChild(b);if(c.Parents&&c.Parents.length>0)d=document.createElement("div"),a.appendChild(d),b=document.createElement("span"),b.textContent=g["parent:"],d=document.createElement("a"),d.className="navlinkonpage",d.href="/git/git-commit.html#"+c.Parents[0].Location+"?page=1&pageSize=1",d.textContent=c.Parents[0].Name,b.appendChild(d),a.appendChild(b);b=c.Tags&&c.Tags.length>0;if(c.Branches&&c.Branches.length>
0){d=document.createElement("div");d.style.paddingTop="15px";a.appendChild(d);d=document.createElement("section");a.appendChild(d);e=document.createElement("span");e.textContent=g["branches: "];d.appendChild(e);e=document.createElement("div");d.appendChild(e);for(d=0;d<c.Branches.length;++d){var h=document.createElement("span");h.style.paddingLeft="10px";h.textContent=c.Branches[d].FullName;e.appendChild(h)}}if(b){d=document.createElement("div");d.style.paddingTop="15px";a.appendChild(d);b=document.createElement("section");
a.appendChild(b);a=document.createElement("span");a.textContent=g["tags: "];b.appendChild(a);a=document.createElement("div");b.appendChild(a);for(d=0;d<c.Tags.length;++d)b=document.createElement("span"),b.style.paddingLeft="10px",b.textContent=c.Tags[d].Name,a.appendChild(b)}};d.prototype.constructor=d;return{CommitTooltipDialog:d}});
define("orion/git/util",["i18n!git/nls/gitmessages"],function(){function g(e){for(var d=0;d<f.length;d++)if(e.type===f[d])return!0;return!1}function i(e){for(var d=0;d<h.length;d++)if(e.type===h[d])return!0;return!1}var h=["Missing","Modified","Untracked","Conflicting"],f=["Added","Changed","Removed"];return{statusUILocation:"git/git-status2.html",isStaged:g,isUnstaged:i,isChange:function(e){return g(e)||i(e)},hasStagedChanges:function(e){for(var d=0;d<f.length;d++)if(e[f[d]].length>0)return!0;return!1},
hasUnstagedChanges:function(e){for(var d=0;d<h.length;d++)if(e[h[d]].length>0)return!0;return!1}}});
define("orion/compare/compareUtils",["orion/URITemplate"],function(g){var i=i||{};i.compareUtils=i.compareUtils||{};i.compareUtils.lookUpMapper=function(g,f,e){for(var d=0,c=0;c<g.length;c++){var b=g[c][f];b===0&&(b=1);if(e>=d&&e<d+b)return{mapperIndex:c,startFrom:d};if(c===g.length-1)break;d+=g[c][f]}return{mapperIndex:g.length-1,startFrom:d}};i.compareUtils.lookUpLineIndex=function(g,f,e){if(e===0)return 0;for(var d=0,c=0;c<e;c++)d+=g[c][f];return d};i.compareUtils.updateMapper=function(g,f,e,d,
c){if(d!==c&&(d>0||c>0)){var b=i.compareUtils.lookUpMapper(g,f,e);if(!(b.mapperIndex<0)){if(d>0)for(var a=e-b.startFrom,e=b.mapperIndex;e<g.length;e++){a=g[e][f]-a;if(d<=a){g[e][f]-=d;break}g[e][f]-=a;d-=a;a=0}c>0&&(g[b.mapperIndex][f]+=c)}}};i.compareUtils.overlapMapper=function(g,f,e,d,c){g=e+g[f]-1;g<e&&(g=e);c<d&&(c=d);return g<d||c<e?!1:!0};i.compareUtils.findFirstDiff=function(g,f,e,d){for(var c=0,b=void 0,a=0;a<g.length;a++){if(c>d)break;if(i.compareUtils.overlapMapper(g[a],f,c,e,d)&&(b={mapperIndex:a,
startFrom:c},g[a][2]!==0))break;c+=g[a][f]}return b};i.compareUtils.matchMapper=function(g,f,e,d){if(g.length===0)return e;var c=e+Math.round((d-e)/3),b=i.compareUtils.findFirstDiff(g,f,e,d),a=g[b.mapperIndex][f]===0?b.startFrom:b.startFrom+g[b.mapperIndex][f]-1,j=i.compareUtils.lookUpLineIndex(g,1-f,b.mapperIndex),m=b.startFrom-e;return g[b.mapperIndex][2]===0?j-m:c>=b.startFrom&&c<=a?j-Math.round((d-e)/3):c<b.startFrom?j-m:(g[b.mapperIndex][1-f]===0?j:j+g[b.mapperIndex][1-f]-1)-(a-e)};i.compareUtils.getMapperLineCount=
function(g){for(var f=0,e=0;e<g.length;e++)f+=Math.max(g[e][0],g[e][1]);return f};i.compareUtils.getAnnotationIndex=function(g,f){for(var e=0;e<g.length;e++)if(g[e][0]===f)return e;return-1};i.compareUtils.getAnnotationMapperIndex=function(g,f){return g[f][1]};i.compareUtils.getAnnotationIndexByMapper=function(g,f){for(var e=0;e<g.length;e++)if(g[e][1]===f)return{current:e,prev:e-1,next:e+1};return{current:-1,prev:-1,next:-1}};i.compareUtils.isMapperConflict=function(g,f){return f<0?!1:!g[f][3]?!1:
g[f][3]===1};i.compareUtils.mergeDiffBlocks=function(g,f,e,d,c,b){for(var a=0;a<f.length;a++){var j=f[a][0],i=e[f[a][1]];if(i[0]>0){for(var p="",l=0;l<i[0];l++)p=p+d[i[2]-1+l].substring(c)+b;i=g.getLineCount();j>=i&&(j=i-1);j=g.getLineStart(j);g.setText(p,j,j)}}};i.compareUtils.generateCompareHref=function(h,f){var e=require.toUrl("compare/compare.html");if(!f.conflict)f.conflict=void 0;if(!f.readonly)f.readonly=void 0;return(new g(e+"#{,resource,params*}")).expand({resource:h,params:f})};i.compareUtils.generateCompareTreeHref=
function(h,f){var e=require.toUrl("compare-tree/compare-tree.html");return(new g(e+"#{,resource,params*}")).expand({resource:h,params:f})};return i.compareUtils});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(g){function i(g){this._prefix="/git/credentials";this._preferenceService=g.getService("orion.core.preference")}i.prototype={put:function(h,f){var e={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(f!==void 0){if(f.gitSshUsername!==void 0&&f.gitSshUsername!==null)e.gitSshUsername=f.gitSshUsername;if(f.gitSshPassword!==void 0&&f.gitSshPassword!==null)e.gitSshPassword=f.gitSshPassword;if(f.gitPrivateKey!==void 0&&
f.gitPrivateKey!==null)e.gitPrivateKey=f.gitPrivateKey;if(f.gitPassphrase!==void 0&&f.gitPassphrase!==null)e.gitPassphrase=f.gitPassphrase}var d=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(c){var b=c.get("settings");b===void 0?d.reject():b.enabled?(c.put(h,e),d.resolve()):d.reject()});return d},get:function(h){var f={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},e=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){var c=
d.get("settings");c===void 0?e.reject():c.enabled?(d=d.get(h),d!==void 0?e.resolve(d):e.resolve(f)):e.reject()});return e},isEnabled:function(){var h=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(f){f=f.get("settings");f===void 0?h.resolve(!1):h.resolve(f.enabled)});return h},enable:function(){var h=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(f){f.put("settings",{enabled:!0});h.resolve()});return h},disable:function(){var h=new g;this._preferenceService.getPreferences(this._prefix,
2).then(function(f){f.put("settings",{enabled:!1});h.resolve()});return h},remove:function(h){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e.remove(h);f.resolve()});return f},getRepositories:function(){var h=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(f){for(var e=[],f=f.keys(),d=0;d<f.length;++d)f[d]!=="settings"&&e.push(f[d]);h.resolve(e)});return h}};return i.prototype.constructor=i});
define("orion/git/widgets/ConfirmPushDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(g,i){function h(f){this._init(f)}h.prototype=new i.Dialog;h.prototype.TEMPLATE='<div id="header"></div>';h.prototype._init=function(f){var e=this;this.title="Git Push";this.modal=!0;this.messages=g;this.location=f.location;this.dialog2=f.dialog;this.func=f.func;this.buttons=[];this.buttons.push({callback:function(){e.destroy();e.dialog2.show()},text:"More"});this.buttons.push({callback:function(){e.destroy();
e.func()},text:"OK"});this._initialize()};h.prototype._bindToDom=function(){var f=this.$header;f.appendChild(document.createTextNode("You are going to push to the following remote: "+this.location));f.appendChild(document.createElement("br"));f.appendChild(document.createTextNode(" Click More to push to another remote or OK to push to default."))};h.prototype.constructor=h;return{ConfirmPushDialog:h}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,i){function h(f){this._init(f)}h.prototype={_init:function(f){var e=f.parent,d=this,e=i.node(e);if(!e)throw g["no parent"];if(!f.model)throw g["no tree model"];if(!f.renderer)throw g["no renderer"];this._parent=e;this._treeModel=f.model;this._renderer=f.renderer;this._showRoot=f.showRoot===void 0?!1:f.showRoot;this._indent=f.indent===void 0?16:f.indent;this._onCollapse=f.onCollapse;this._labelColumnIndex=
f.labelColumnIndex===void 0?0:f.labelColumnIndex;this._id=f.id===void 0?"treetable":f.id;this._tableStyle=f.tableStyle;this._tableElement=f.tableElement||"table";this._tableBodyElement=f.tableBodyElement||"tbody";this._tableRowElement=f.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){d._showRoot?(c._depth=0,d._generate([c],0)):d._treeModel.getChildren(c,function(b){d._generate(b,0)})})},_generate:function(f,e){i.empty(this._parent);var d=document.createElement(this._tableElement);
d.id=this._id;this._tableStyle&&d.classList.add(this._tableStyle);this._renderer.initTable(d,this);this._bodyElement=document.createElement(this._tableBodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(f,e);d.appendChild(this._bodyElement);this._parent.appendChild(d);this._rowsChanged()},_generateChildren:function(f,e,d){for(var c=0;c<f.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(f[c]);b._depth=e;b._item=f[c];this._renderer.render(f[c],
b);b.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*e+"px";d?(this._bodyElement.insertBefore(b,d.nextSibling),d&&(d=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(f,e,d){var c=this._treeModel.getId(f),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(e,0),this._rowsChanged();else{var a=i.node(c);a?(a._item=f,a&&(d||
a._expanded)?(a._expanded=!0,this._removeChildRows(c),this._renderer.updateExpandVisuals(a,!0),e?(this._generateChildren(e,a._depth+1,a),this._rowsChanged()):(b=this,e=this._treeModel.getChildren(a._item,function(c){b._generateChildren(c,a._depth+1,a);b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(g["could not find table row "]+c)}},getItem:function(f){var e=i.node(f);return e&&e._item?e._item:f},toggle:function(f){var e=i.node(f);e&&(e._expanded?(this.collapse(f),this._renderer.updateExpandVisuals(e,
!1)):(this.expand(f),this._renderer.updateExpandVisuals(e,!0)))},isExpanded:function(f){return(f=i.node(f))?f._expanded:!1},expand:function(f,e,d){var f=typeof f==="string"?f:this._treeModel.getId(f),c=i.node(f);if(c&&!c._expanded){c._expanded=!0;var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){b._generateChildren(a,c._depth+1,c);b._rowsChanged();e&&e.apply(b,d)})}},_removeChildRows:function(f){for(var e=f===this._id,d=!1,c=-1,b=[],a=i.$$array(".treeTableRow",
this._parent),g=0;g<a.length;g++){var h=a[g];if(d)break;if(e)h._depth>c?b.push(h):d=!0;else if(h.id===f)e=!0,c=h._depth}for(f=0;f<b.length;f++)e=b[f],e.parentNode.removeChild(e)},collapse:function(f){var f=typeof f==="string"?f:this._treeModel.getId(f),e=i.node(f);if(e){if(!e._expanded)return;e._expanded=!1;this._renderer.updateExpandVisuals(e,!1);this._removeChildRows(f);this._rowsChanged()}this._onCollapse&&this._onCollapse(e._item)}};h.prototype.constructor=h;return{TableTree:h}});
define("orion/treeModelIterator",[],function(){var g={};g.TreeModelIterator=function(){function g(h,f){this.firstLevelChildren=h;this.reset();this._init(f)}g.prototype={_init:function(g){if(g)this.isExpanded=g.isExpanded,this.isExpandable=g.isExpandable,this.forceExpandFunc=g.forceExpandFunc},topLevel:function(g){return g.parent?g.parent===this.root:!0},_expanded:function(g){if(!g)return!0;var f=g.children&&g.children.length>0;this.isExpanded&&f&&(f=this.isExpanded(g));return f},_expandable:function(g){return!g?
!0:this.isExpandable?this.isExpandable(g):!1},_diveIn:function(g){return this._expanded(g)?(this.setCursor(g.children[0]),this.cursor()):null},_drillToLast:function(g){return this._expanded(g)?this._drillToLast(g.children[g.children.length-1]):g},_forward:function(g){if(!this._cursor)return null;var f=this._diveIn(this._cursor);if(!f){if(g&&this._expandable(this._cursor)&&this.forceExpandFunc){var e=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&e.setCursor(d)})}(f=this._findSibling(this._cursor,
!0))&&this.setCursor(f)}return f},_backward:function(g){if(!this._cursor)return null;var f=this._findSibling(this._cursor,!1);f&&f!==this._cursor.parent&&(f=this._drillToLast(f));if(g&&f&&this._expandable(f)&&this.forceExpandFunc&&f!==this._cursor.parent){var e=this;return this.forceExpandFunc(f,"last",function(d){d&&e.setCursor(d)})}f&&this.setCursor(f);return f},_findSibling:function(g,f){for(var e=this.topLevel(g),d=e?this.firstLevelChildren:g.parent.children,c=0;c<d.length;c++)if(d[c]===g)return c===
0&&!f?e?null:g.parent:c===d.length-1&&f?e?null:this._findSibling(g.parent,f):f?d[c+1]:d[c-1];return null},_inParentChain:function(g,f){for(var e=g.parent;e;){if(e===f)return!0;e=e.parent}return!1},_getTopLevelParent:function(g){if(this.topLevel(g))return g;for(g=g.parent;g;){if(this.topLevel(g))return g;g=g.parent}return null},_onCollapse:function(g){return this._expanded(g.parent)?g:this._onCollapse(g.parent)},_scan:function(g,f,e){this.setCursor(f);var d=[];for(d.push(f);;){if(this.iterate(g))d.push(this.cursor());
else break;if(e===this.cursor())return d}return null},setCursor:function(g){this._prevCursor=this._cursor;this._cursor=g},setTree:function(g){this.firstLevelChildren=g;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(g,f){var e=this.cursor(),d=this._scan(!0,g,f);d||(d=this._scan(!1,g,f));this.setCursor(e);return d},iterate:function(g,f){return g?this._forward(f):this._backward(f)},iterateOnTop:function(g,f){var e=this._findSibling(this._getTopLevelParent(this.cursor()),
g);e?this.setCursor(e):f&&this.firstLevelChildren.length>0&&this.setCursor(g?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(g){if(!this._cursor)return null;return this._inParentChain(this._cursor,g)?(this.setCursor(g),this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent},cursorMoved:function(){return this._cursor!==
this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return g}();return g});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(g,i,h){var g={},f=navigator.userAgent.indexOf("iPad")!==-1,e=window.navigator.platform.indexOf("Mac")!==-1;g.ExplorerNavHandler=function(){function d(c,b,a){this.explorer=c;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;var d=this._getEventListeningDiv();d.tabIndex=0;d.classList.add("selectionModelContainer");
var e=this;this._modelIterator=new h.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return e.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();c=function(a){if(a.target===d){if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,e._modelIterator.cursor()))return!0;
if(a.keyCode===i.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return e.onEnter(a)}};d.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,!1)};d.addEventListener("blur",
c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};d.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=d}d.prototype={_init:function(c){this._linearGridMove=!1;if(c)this._selectionPolicy=c.selectionPolicy,this.preventDefaultFunc=c.preventDefaultFunc,this.postDefaultFunc=c.postDefaultFunc},_ctrlKeyOn:function(c){return e?c.metaKey:c.ctrlKey},removeListeners:function(){if(this._listeners)for(var c=
0;c<this._listeners.length;c++)this._parentDiv.removeEventListener(this._listeners[c].type,this._listeners[c].listener,!1)},focus:function(){var c=this._getEventListeningDiv();c&&c.focus()},_getEventListeningDiv:function(c){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(c):i.node(this.explorer._parentId)},isExpandable:function(c){return!c?!1:i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)))?
!0:!1},isExpanded:function(c){return!c?!1:this.explorer.myTree.isExpanded(this.model.getId(c))},refreshSelection:function(c){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){b._clearSelection();for(var d=0;d<a.length;d++)b._selections.push(a[d]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,c)})},refreshModel:function(c,b,a,d){this._currentColumn=0;this.topIterationNodes=[];this.model=b;this._navDict=c;if(this.model.getTopIterationNodes)this.topIterationNodes=
this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(c){for(var b=0;b<this._selections.length;b++)if(c===this._selections[b])return b;return-1},_clearSelection:function(c){if(c)for(c=0;c<this._selections.length;c++)this._checkRow(this._selections[c],!0);
this._selections=[]},setSelection:function(c,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(c,!0);else if(this._isRowSelectable(c)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c;else{var a=this._inSelection(c);a>=0?(this._checkRow(c,!0),this._selections.splice(a,1)):(this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c)}this.explorer.selection&&
(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(c,b){c||(c=this.currentModel());var a=this._getGridChildren(c);if(a&&a.length>1||b===0&&a){b!==0&&this.toggleCursor(c,!1);var d=this._currentColumn,e=!0;d+=b;d<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?c=this.currentModel():e=!1),d=e?a.length-1:this._currentColumn):d>=a.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?c=this.currentModel():
e=!1),d=e?0:this._currentColumn);this._currentColumn=d;b!==0&&this.toggleCursor(c,!0);return!0}return!1},_getGridChildren:function(c){return this._navDict?this._navDict.getGridNavHolder(c):null},getCurrentGrid:function(c){c||(c=this.currentModel());return(c=this._getGridChildren(c))&&c.length>0?c[this._currentColumn]:null},toggleCursor:function(c,b){var a=this.getRowDiv(c),d=this.getCurrentGrid(c);d?(a&&(b?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),d.domNode&&
(b?d.domNode.classList.add("treeIterationCursor"):d.domNode.classList.remove("treeIterationCursor"))):a&&(b?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(c,b,a,d){var a=a===void 0?!1:a,e,g;if(c||b){if(g===this._modelIterator.cursor())return;e=this._modelIterator.cursor();g=c;this._modelIterator.setCursor(g)}else e=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();
if(e!==g||b)if(this.toggleCursor(e,!1),!b||g)if(this.moveColumn(null,0),this.toggleCursor(g,!0),(c=this.getRowDiv())&&!d&&!this._visible(c)&&c.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,g)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var c=[],b=0;b<this._selections.length;b++)c.push(this.model.getId(this._selections[b]));return c},getRowDiv:function(c){c=c?c:this._modelIterator.cursor();if(!c)return null;var c=this.model.getId(c),
b=this._navDict.getValue(c);return b&&b.rowDomNode?b.rowDomNode:i.node(c)},iterate:function(c,b,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(c,b)&&(this.cursorOn(null,!1,c),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(c,b){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(c);if(a){var d=i.node(this.explorer.renderer.getCheckBoxId(a.id)),e=b?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(a,d,e,!0)}}else this._select(c,b)},
_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(c){return(c=i.node(c))?i.bounds(c).height:0},_visible:function(c){if(c.offsetWidth===0||c.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var a=
this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var b=a.top>b?a.top:b,a=a.bottom<d?a.bottom:d,c=c.getClientRects(),d=0,e=c.length;d<e;d++){var g=c[d];if(g.top>=b&&g.top<=a&&g.bottom>=b&&g.bottom<=a)return!0}return!1},_select:function(c){c||(c=this._modelIterator.cursor());var b=this.getRowDiv(c);b&&(this._inSelection(c)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(c,b){var a=this._getGridChildren(c);if(a)for(var d=
0;d<a.length;d++)if(b.target===a[d].domNode)return!0;return!1},onClick:function(c,b){var a=i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(b.target!==a&&!this._onModelGrid(c,b))if(this.cursorOn(c,!0,!1,!0),f)this.setSelection(c,!0);else if(this._ctrlKeyOn(b))this.setSelection(c,!0);else if(b.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,c)){this._clearSelection(!0);for(var d=0;d<a.length;d++)this.setSelection(a[d],!0)}}else this.setSelection(c,
!1)},onCollapse:function(c){this._modelIterator.collapse(c)&&this.cursorOn()},onUpArrow:function(c){this.iterate(!1,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},onDownArrow:function(c){this.iterate(!0,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},_shouldMoveColumn:function(c){var b=this.currentModel(),a=this._getGridChildren(b);return a&&a.length>1?this.isExpandable(b)?
this._ctrlKeyOn(c):!0:!1},onLeftArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,-1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),c.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),this.setSelection(b.parent,!1))},onRightArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,
1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),c.preventDefault(),!1},_isRowSelectable:function(c){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(c):!0},onSpace:function(c){this.setSelection(this.currentModel(),!0);c.preventDefault()},onEnter:function(c){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();
else typeof b.widget.focus==="function"&&b.widget.focus();else{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(c),!1,!1,!1,0,null);b.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(c)?window.open(b.href):window.location.href=b.href}};return d}();g.ExplorerNavDict=function(){function d(c){this._dict=
{};this._model=c}d.prototype={addRow:function(c,b){this._dict[this._model.getId(c)]={model:c,rowDomNode:b}},getValue:function(c){return this._dict[c]},getGridNavHolder:function(c,b){if(!c)return null;var a=this._model.getId(c);if(this._dict[a]){if(!this._dict[a].gridChildren&&b)this._dict[a].gridChildren=[];return this._dict[a].gridChildren}return null},initGridNavHolder:function(c){if(!c)return null;c=this._model.getId(c);if(this._dict[c])this._dict[c].gridChildren=null}};return d}();return g});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(g,i,h,f,e,d){var c={};c.Explorer=function(){function b(a,b,c){this.registry=a;this.renderer=c;this.selection=b;this.myTree=null}b.prototype={changedItem:function(a,b){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},
makeNewItemPlaceHolder:function(a,b,c){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var d=document.createElement("td");d.id=b+"placeHolderCol";c.appendChild(d);a.appendChild(c);c=h.node(b+"placeHolderRow");a=h.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return h.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===
void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,c){this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var d=a+"innerTree",g=h.node(d);g&&h.empty(g);if(b)b.rootId=d;this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=c?c.selectionPolicy:"",this._navDict=new e.ExplorerNavDict(this.model);this.myTree=new f.TableTree({id:d,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),
renderer:this.renderer,showRoot:c?!!c.showRoot:!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];
if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=new e.ExplorerNavHandler(this,this._navDict,{setFocus:a&&a.setFocus,
selectionPolicy:a?a.selectionPolicy:null});var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return b}();c.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var e=
new d.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),f=new d.Command({tooltip:g["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(e);b.addCommand(f)};c.ExplorerModel=function(){function b(a,
b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?
a.charCodeAt(c):a[c];return b}};return b}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";
this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=
a.actionScopeId}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;h.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",g=this.explorer.registry.getService("orion.page.command"),f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId?g.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?
this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no action scope was specified.  No commands rendered.");return f},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;
if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):
b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){a=window.sessionStorage[a+
"selection"];typeof a==="string"&&(a=a.length>0?JSON.parse(a):null);var b;if(a&&this.explorer.getNavDict()){var c=[];for(b=0;b<a.length;b++){var d=this.explorer.getNavDict().getValue(a[b]);if(d&&d.rowDomNode&&d.model&&(c.push(d.model),this._highlightSelection&&d.rowDomNode.classList.add("checkedRow"),d=h.node(this.getCheckBoxId(d.rowDomNode.id))))d.checked=!0,d.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(c),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},
_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=!1,c=window.sessionStorage[a+"expanded"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(h.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&
a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,b){var c=h.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);
e.classList.add(this._collapseImageClass);if(c){var g=document.createElement("span");b.appendChild(g);g.classList.add(d||"imageSprite");g.classList.add(c)}var f=this;e.onclick=function(){f.tableTree.toggle(a.id);if(f.tableTree.isExpanded(a.id))f._expanded.push(a.id);else for(var b in f._expanded)if(f._expanded[b]===a.id){f._expanded.splice(b,1);break}(b=f._getUIStatePreferencePath())&&window.sessionStorage&&f._storeExpansions(b)};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,
b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){for(var a=this.explorer.registry,b=h.$$array(".treeTableRow"),c=0;c<b.length;c++){var d=b[c],e=h.node(d.id+"actionswrapper"),g=a.getService("orion.page.command");g.destroy(e);this.actionScopeId&&g.renderCommands(this.actionScopeId,e,d._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();
a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),
c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);a.appendChild(b)};b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),c===
0?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle()):e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();c.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=
function(a){a(this.root)};b.prototype.destroy=function(){};b.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
define("orion/git/widgets/RemotePrompterDialog",["i18n!git/nls/gitmessages","orion/webui/dialog","orion/explorers/explorer","orion/selection"],function(g,i,h,f){function e(b,a){this.explorer=a;this._init(b)}function d(b){this._init(b)}var c=function(){function b(a,b,c,d){this.gitClient=a;this.rootPath=b;this.fetchItems=c;this.root=d?d:null}b.prototype=new h.ExplorerModel;b.prototype.getRoot=function(a){var b=this;this.root?a(this.root):this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})};
b.prototype.getIdentity=function(a){a.Location?(a=a.Location,a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")):a="ROOT";return a};b.prototype.getChildren=function(a,b){a.children=[];if(a.Children){for(var c=0;c<a.Children.length;c++)a.Children[c].parent=a,a.children[c]=a.Children[c];b(a.Children)}else a.BranchLocation&&a.RemoteLocation?(a.children=[{GroupNode:"true",Location:a.BranchLocation,Name:"Branches",parent:a},{GroupNode:"true",Location:a.RemoteLocation,BranchLocation:a.BranchLocation,Name:"Remotes",
parent:a},{GroupNode:"true",Location:a.TagLocation,Name:"Tags",parent:a}],b(a.children)):a.GroupNode?this.gitClient.getGitBranch(a.Location).then(function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)}):a.Type==="Remote"&&this.gitClient.getGitBranch(a.Location).then(function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)})};return b}();e.prototype=new h.SelectionRenderer;e.prototype.constructor=
e;e.prototype.getLabelColumnIndex=function(){return 0};e.prototype.getCellElement=function(b,a,c){var d=document.createElement("td");c.appendChild(d);b=document.createElement("span");b.id=c.id+"navSpan";d.appendChild(b);b.className="mainNavColumn singleNavColumn";(a.children||a.Children||a.GroupNode||a.Type==="Remote"||a.BranchLocation&&a.RemoteLocation)&&this.getExpandImage(c,b);c=a.Name;a.Type==="RemoteTrackingBranch"&&!a.Id&&(c=a.Name+g[" [New branch]"]);b.appendChild(document.createTextNode(c))};
d.prototype=new i.Dialog;d.prototype.TEMPLATE='<div><div id="treeContentPane" style="width:25em; min-height: 25em; max-height: 30em; height: auto; overflow-y: auto; padding: 8px"></div><div id="newBranchPane" style="padding: 8px"><label for="newBranch">${New Branch:}</label><input id="newBranch" value="" disabled=true/></div></div>';d.prototype._init=function(b){var a=this;this.title=b.title||g["Choose a Folder"];this.modal=!0;this.messages=g;this.func=b.func;this.treeRoot=b.treeRoot;this.gitClient=
b.gitClient;this.hideNewBranch=b.hideNewBranch;this.serviceRegistry=b.serviceRegistry;this.buttons=[];this.buttons.push({callback:function(){a.$remoteOk.classList.contains(this.DISABLED)||(a.destroy(),a._execute.bind(a)())},text:"OK",isDefault:!0,id:"remoteOk"})};d.prototype._bindToDom=function(){var b=this;this.$newBranch.addEventListener("input",function(){b._validate()});if(this.hideNewBranch)this.$newBranchPane.style.display="none"};d.prototype._beforeShowing=function(){this._initialize();this._loadRemoteChildren()};
d.prototype._afterShowing=function(){this.$treeContentPane.focus();this._validate()};d.prototype._loadRemoteChildren=function(){this._createTree(new c(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))};d.prototype._createTree=function(b){var a=this,c=this.serviceRegistry.getService("orion.remotePrompter.selection");c||(c=new f.Selection(this.serviceRegistry,"orion.remotePrompter.selection"));var d=new e({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"});this.explorer=
new h.Explorer(this.serviceRegistry,c,d);d.explorer=this.explorer;this.explorer.createTree("treeContentPane",b);c.addEventListener("selectionChanged",function(b){a.$newBranch.disabled=b.selection&&b.selection.Type==="Remote"?!1:!0;a._validate(b.selection)})};d.prototype._validate=function(b){var a=function(a){a&&a.Type==="RemoteTrackingBranch"?this.$remoteOk.classList.remove(this.DISABLED):a&&a.Type==="Remote"&&this.$newBranch.value!==""?this.$remoteOk.classList.remove(this.DISABLED):this.$remoteOk.classList.add(this.DISABLED)};
b?a.bind(this)(b):this.serviceRegistry.getService("orion.remotePrompter.selection").getSelection(a.bind(this))};d.prototype._execute=function(){var b=this;this.serviceRegistry.getService("orion.remotePrompter.selection").getSelection(function(a){if(b.func)if(a.Type==="RemoteTrackingBranch")b.func(a,a.parent);else{var c=a.CloneLocation.substring(a.CloneLocation.indexOf(a.CloneLocation.split("/")[3])),d={};d.parent=a;d.FullName="refs/remotes/"+a.Name+"/"+b.$newBranch.value;d.Name=a.Name+"/"+b.$newBranch.value;
d.Type="RemoteTrackingBranch";d.Location="/gitapi/remote/"+a.Name+"/"+encodeURIComponent(b.$newBranch.value)+"/"+c;b.func(null,a,d)}})};d.prototype.constructor=d;return{RemotePrompterDialog:d}});
define("orion/git/widgets/ReviewRequestDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(g,i){function h(g){this._init(g)}h.prototype=new i.Dialog;h.prototype.TEMPLATE='<div><div id="treeContentPane" style="padding: 8px"><label for="reviewReqUrl">${Paste link in email or IM}</label><br><input id="reviewReqUrl" style="width: 50em" value=""/></div><div id="newBranchPane" style="padding: 8px"><label for="reviewerName">${Send the link to the reviewer}</label><br><input id="reviewerName" style="width: 30em"  value=""/></div></div>';h.prototype._init=
function(f){var e=this;this.title=f.title||g["Contribution Review Request"];this.modal=!0;this.messages=g;this.url=f.url;this.func=f.func;this.buttons=[];this.buttons.push({callback:function(){e.destroy();e.func(e.$reviewerName.value)},text:"Submit"});this._initialize()};h.prototype._bindToDom=function(){this.$reviewReqUrl.value=this.url};h.prototype.constructor=h;return{ReviewRequestDialog:h}});
define("orion/explorers/explorer-table","i18n!orion/navigate/nls/messages,require,orion/Deferred,orion/webui/littlelib,orion/i18nUtil,orion/fileUtils,orion/explorers/explorer".split(","),function(g,i,h,f,e,d,c){function b(a,b,c,d,e,g){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!g}function a(a){this.registry=a.serviceRegistry;this.treeRoot=a.treeRoot;this.selection=a.selection;this.fileClient=a.fileClient;this.excludeFiles=a.excludeFiles;
this.excludeFolders=a.excludeFolders;this.parentId=a.parentId;this.renderer=a.rendererFactory(this);this.dragAndDrop=a.dragAndDrop;this.myTree=this.model=null;this._hookedDrag=this.checkbox=!1;var b=this.renderer;this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){b.setTarget(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self")}},{pid:"nav.config"})}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.prototype.processParent=
function(a,b){if(this.excludeFiles||this.excludeFolders){var c=[],d;for(d in b)if(!(b[d].Directory?this.excludeFolders:this.excludeFiles))c.push(b[d]),b[d].parent=a;b=c}else for(c in b)b[c].parent=a;a.children=b;a.children.sort(function(a,b){var c=a.Directory;if(c!==b.Directory)return c?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0});return b};b.prototype.getChildren=function(a,b){var c=this;a.children?b(a.children):a.Directory!==void 0&&a.Directory===
!1?b([]):a.Location?this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+a.Name).then(function(d){b(c.processParent(a,d))}):b([])};b.prototype.constructor=b;a.prototype=new c.Explorer;a.prototype._makeDropTarget=function(a,b,c){function d(a,b,c,f,h,j){b=b||"";if(a.isFile)c.Location.indexOf("/workspace")===0?f.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:g["You cannot copy files directly into the workspace.  Create a folder first."]}):
a.file(function(a){h(c,a,f,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(e.formatMessage(g["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var i=a.createReader(),m=function(c){i.readEntries(function(e){for(var g=0;g<e.length;g++)d(e[g],b+a.name+"/",c,f,h,j)})},n=f.registry.getService("orion.page.progress");c.Location.indexOf("/workspace")===0?n.progress(j.createProject(c.ChildrenLocation,a.name),"Initializing project "+a.name).then(function(a){f.loadResourceList(f.treeRoot.Path,!0);n.progress(j.read(a.ContentLocation,
!0),"Loading project info "+a.name).then(function(a){m(a)})}):n.progress(j.createFolder(c.Location,a.name),"Creating folder "+a.name).then(function(a){f.changedItem(c,!0);m(a)})}}if(this.dragAndDrop){var h=this,i=this.dragAndDrop,n=function(a){b.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(c)this._oldDragLeave&&b.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=n;b.addEventListener("dragleave",n,!1);n=function(a){if(a.dataTransfer.effectAllowed===
"all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";b.classList.add("dragOver");f.stop(a)};if(c)this._oldDragEnter&&b.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=n;b.addEventListener("dragenter",n,!1);n=function(a){if(a.dataTransfer.effectAllowed==="all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";f.stop(a)};
if(c&&!this._oldDragOver)b.addEventListener("dragover",n,!1),this._oldDragOver=n;n=function(c){b.classList.remove("dragOver");if(c.dataTransfer.items&&c.dataTransfer.items.length>0)for(var o=0;o<c.dataTransfer.items.length;o++){var n=null;typeof c.dataTransfer.items[o].getAsEntry==="function"?n=c.dataTransfer.items[o].getAsEntry():typeof c.dataTransfer.items[o].webkitGetAsEntry==="function"&&(n=c.dataTransfer.items[o].webkitGetAsEntry());n&&d(n,null,a,h,i,h.fileClient)}else if(c.dataTransfer.files&&
c.dataTransfer.files.length>0)for(o=0;o<c.dataTransfer.files.length;o++)n=c.dataTransfer.files[o],!n.length&&(!n.type||n.type==="")?h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:e.formatMessage(g["Did not drop ${0}.  Folder drop is not supported in this browser."],n.name)}):a.Location.indexOf("/workspace")===0?h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:g["You cannot copy files directly into the workspace.  Create a folder first."]}):
i(a,n,h,n.name.indexOf(".zip")===n.name.length-4&&window.confirm(e.formatMessage(g["Unzip ${0}?"],n.name)));f.stop(c)};if(c)this._oldDrop&&b.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=n;b.addEventListener("drop",n,!1)}};a.prototype.changedItem=function(a,b){var c=this;this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+a.Name).then(function(d){d=c.model.processParent(a,d);c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,
d,b)})};a.prototype.isExpanded=function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};a.prototype.getNameNode=function(a){if(a=this.model.getId(a))return f.node(a+"NameLink")};a.prototype.scopeUp=function(){if(this.treeRoot&&this.treeRoot.Parents)if(this.treeRoot.Parents.length===0)window.location.href="#";else if(this.treeRoot.Parents[0].ChildrenLocation)window.location.href="#"+this.treeRoot.Parents[0].ChildrenLocation};a.prototype.loadResourceList=function(a,b,c){a=d.makeRelative(a);
if(b||a!==this._lastPath){this._lastPath=a;var e=this;(b||a!==this.treeRoot.Path)&&this.load(this.fileClient.loadWorkspace(a),"Loading "+a,function(){e.treeRoot.Path=a;typeof c==="function"&&c()})}};a.prototype.load=function(a,c,d){var e=f.node(this.parentId),i=f.node("progress");if(!i)i=document.createElement("div"),i.id="progress",f.empty(e),e.appendChild(i);f.empty(i);var r=setTimeout(function(){f.empty(i);i.appendChild(document.createTextNode(c))},500),n=this;h.when(a,function(a){n.treeRoot={};
clearTimeout(r);for(var c in a)n.treeRoot[c]=a[c];n.model=new b(n.registry,n.treeRoot,n.fileClient,n.parentId,n.excludeFiles,n.excludeFolders);n.model.processParent(n.treeRoot,a.Children);if(n.dragAndDrop)n._hookedDrag?n._makeDropTarget(n.treeRoot,e,!0):(a=(a=e&&("draggable"in e||"ondragstart"in e&&"ondrop"in e))&&!(!window.File||!window.FileList||!window.FileReader),n._hookedDrag=!0,a?n._makeDropTarget(n.treeRoot,e,!0):(n.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser.")));
n.createTree(n.parentId,n.model,{setFocus:!0,selectionPolicy:n.renderer.selectionPolicy,onCollapse:function(a){if(n.getNavHandler())n.getNavHandler().onCollapse(a)}});if(typeof d==="function")try{d()}catch(g){n.registry&&n.registry.getService("orion.page.message").setErrorMessage(g)}if(typeof n.onchange==="function")n.onchange(n.treeRoot)},function(a){clearTimeout(r);if(a.status&&a.status!==401){try{a=JSON.parse(a.responseText)}catch(b){}f.empty(i);i.appendChild(document.createTextNode(g["Sorry, an error occurred: "]+
a.Message))}else n.registry.getService("orion.page.message").setProgressResult(a)})};a.prototype.onchange=function(){};a.prototype.constructor=a;return{FileExplorer:a,FileModel:b}});
define("orion/webui/dialogs/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,orion/webui/littlelib,orion/webui/dialog,orion/fileUtils,orion/selection,orion/explorers/navigationUtils,orion/explorers/explorer,orion/explorers/explorer-table".split(","),function(g,i,h,f,e,d,c,b){function a(a,b){this.explorer=b;this._init(a)}function j(a){this._init(a)}a.prototype=new c.SelectionRenderer;a.prototype.constructor=a;a.prototype.getLabelColumnIndex=function(){return 0};a.prototype.getCellElement=
function(a,b,c){a=document.createElement("td");c.appendChild(a);var d=document.createElement("span");d.id=c.id+"navSpan";a.appendChild(d);d.className="mainNavColumn singleNavColumn";this.getExpandImage(c,d);d.appendChild(document.createTextNode(b.Name))};j.prototype=new h.Dialog;j.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
j.prototype._init=function(a){this.title=a.title||g["Choose a Folder"];this.modal=!0;this.buttons=[{text:g.OK,isDefault:!0,callback:this.done.bind(this)}];this.customFocus=!0;this._fileClient=a.fileClient;this._serviceRegistry=a.serviceRegistry;this._message=a.message||"";this._func=a.func;this._initialize()};j.prototype._bindToDom=function(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
j.prototype.loadFolderList=function(c){c=f.makeRelative(c);this.selection=new e.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new b.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this._serviceRegistry,fileClient:this._fileClient,parentId:"directoryTree",excludeFiles:!0,rendererFactory:function(b){return new a({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"},b)}});this.explorer.loadResourceList(c,!0,null)};j.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};j.prototype.constructor=j;return{DirectoryPrompterDialog:j}});
define("orion/git/widgets/CloneGitRepositoryDialog",["i18n!git/nls/gitmessages","orion/webui/dialogs/DirectoryPrompterDialog","orion/webui/dialog"],function(g,i,h){function f(e){this._init(e)}f.prototype=new h.Dialog;f.prototype.TEMPLATE='<span id="basicPane"><div style="padding: 8px"><label for="gitUrl">${Repository URL:}</label><input id="gitUrl" style="width: 50em" value=""/></div><div style="padding: 8px; text-align: right;"><a id="advancedLink" href="javascript:">${Choose target location}</a><a id="advancedLinkHide" href="javascript:" style="display: none">${Default target location}</a></div></span><span id="advancedPane" style="display: none;"><div style="padding: 8px"><input id="isNewProject" type="radio" name="isNewProject" checked value="new"/><label for="gitName" style="padding: 0 8px">${New folder:}</label><input id="gitName" value=""></div><div style="padding: 8px"><input id="isExistingProject" type="radio" name="isNewProject" value="existing"/><label for="gitPath" style="padding: 0 8px">${Existing directory:}</label><input id="gitPath" type="hidden" value=""><span id="shownGitPath" style="padding-right: 24px"></span><a id="changeGitPath" href="javascript:">${Change...}</a></div></span>';f.prototype._init=
function(e){var d=this;this.title=e.title?e.title:g["Clone Git Repository"];this.modal=!0;this.messages=g;this.advancedShown=!1;this.alwaysShowAdvanced=e.alwaysShowAdvanced;this.advancedOnly=e.advancedOnly;this.url=e.url;this.serviceRegistry=e.serviceRegistry;this.fileClient=e.fileClient;this.func=e.func;this.buttons=[];this.buttons.push({callback:function(){d.destroy();d._execute()},text:"OK"});this._initialize()};f.prototype._bindToDom=function(){var e=this;if(this.url)this.$gitUrl.value=this.url;
if(this.advancedOnly)this.$basicPane.style.display="none",this.$advancedPane.style.display="",setTimeout(function(){e.$gitName.focus()},400);this.$changeGitPath.addEventListener("click",function(){e._openDirectoryPickerDialog()});this.$isExistingProject.addEventListener("click",function(){e._checkNewExisting()});this.$isNewProject.addEventListener("click",function(){e._checkNewExisting()});this.$gitName.addEventListener("focus",function(){e._showNewProject()});this.$advancedLink.addEventListener("click",
function(){e._showAdvanced()});this.$advancedLinkHide.addEventListener("click",function(){e._hideAdvanced()});this.alwaysShowAdvanced&&this._showAdvanced()};f.prototype._execute=function(){this.func&&this.func(this.advancedOnly?void 0:this.$gitUrl.value,this.advancedShown&&this.$isNewProject.checked?void 0:this.$gitPath.value,this.advancedShown&&!this.$isNewProject.checked?void 0:this.$gitName.value)};f.prototype._showAdvanced=function(){this.advancedShown=!0;this.$advancedPane.style.display="";this.$advancedLink.style.display=
"none";this.$advancedLinkHide.style.display=""};f.prototype._hideAdvanced=function(){this.advancedShown=!1;this.$advancedPane.style.display="none";this.$advancedLink.style.display="";this.$advancedLinkHide.style.display="none"};f.prototype._checkNewExisting=function(){this.$isExistingProject.checked?this._openDirectoryPickerDialog():this.$gitName.focus()};f.prototype._showNewProject=function(){this.$isNewProject.checked=!0};f.prototype._openDirectoryPickerDialog=function(){function e(b){var a=document.createElement("a");
a.href=require.toUrl("navigate/table.html")+"#"+b.ChildrenLocation;a.textContent=b.Name;return a}var d=this;this.$isExistingProject.checked=!0;var c=new i.DirectoryPrompterDialog({title:g["Choose a Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(b){if(b&&b.Location){for(d.$gitPath.value=b.Location;d.$shownGitPath.hasChildNodes();)d.$shownGitPath.removeChild(d.$shownGitPath.lastChild);for(d.$shownGitPath.appendChild(e(b));b.parent&&b.parent.Location!=="/";)d.$shownGitPath.insertBefore(document.createTextNode("/"),
d.$shownGitPath.firstChild),d.$shownGitPath.insertBefore(e(b.parent),d.$shownGitPath.firstChild),b=b.parent}}});this._addChildDialog(c);c.show()};f.prototype.constructor=f;return{CloneGitRepositoryDialog:f}});
define("orion/git/widgets/GitCredentialsDialog",["i18n!git/nls/gitmessages","orion/git/gitPreferenceStorage","orion/webui/dialog"],function(g,i,h){function f(e){this._init(e)}f.prototype=new h.Dialog;f.prototype.TEMPLATE='<div id="gitCredentialsLabel" style="padding: 8px">${Repository URL:}<strong id="url"></strong></div><div id="gitSshUsernameRow" style="padding: 8px"><label id="gitSshUsernameLabel" for="gitSshUsername">${Username:}</label><input id="gitSshUsername" value=""></div><div id="gitSshPasswordRow" style="padding: 8px"><input id="isSshPassword" type="radio" name="isSshPassword" checked value="password"/><label id="gitSshPasswordLabel" for="gitSshPassword" style="padding: 0 8px">${Ssh password:}</label><input type="password" id="gitSshPassword" value="" style="width: 30em"></div><div style="padding: 8px"><div id="gitPrivateKeyRow"><input id="isPrivateKey" type="radio" name="isSshPassword" value="privateKey" style="vertical-align: top"/><label id="gitPrivateKeyLabel" for="gitPrivateKey" style="padding: 0 8px; vertical-align: top">${Private key:}</label><textarea id="gitPrivateKey" value=""></textarea></div><div id="gitPrivateKeyFileRow" style="padding-left: 8em"><label id="gitPrivateKeyFileLabel" for="gitPrivateKeyFile">${Private key file (optional):}</label><br><input id="gitPrivateKeyFile" multiple="false" type="file" size="53" label="Browse..."></div><div id="gitPassphraseRow" style="padding-left: 8em"><label id="gitPassphraseLabel" for="gitPassphrase">${Passphrase (optional):}</label><br><input type="password" id="gitPassphrase" value="" style="width: 30em"></div></div><div id="gitSaveCredentialsRow" style="padding: 8px"><img id="gitSaveCredentialsInfo" src="/images/info.gif""><input id="gitSaveCredentials" type="checkbox" name="gitSaveCredentials"><label id="gitSaveCredentialsLabel" for="gitSaveCredentials">${Don\'t prompt me again:}</label></div>';f.prototype._init=
function(e){var d=this;this.title=e.title||g["Git Credentials"];this.modal=!0;this.messages=g;this.options=e;if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase)this.options.username=!0,this.options.password=!0,this.options.privatekey=!0,this.options.passphrase=!0;if(e.serviceRegistry)this._sshService=e.serviceRegistry.getService("orion.net.ssh"),this._progressService=e.serviceRegistry.getService("orion.page.progress");this.buttons=[];this.buttons.push({callback:function(){d.destroy();
d._execute()},text:"OK",isDefault:!0});this._initialize()};f.prototype._bindToDom=function(){var e=this;if(!this.options.username)this.$gitSshUsernameRow.style.display="none";if(!this.options.password)this.$gitSshPasswordRow.style.display="none";if(!this.options.privatekey)this.$gitPrivateKeyRow.style.display="none",this.$gitPrivateKeyFileRow.style.display="none";if(!this.options.passphrase)this.$gitPassphraseRow.style.display="none";if(this.options.errordata&&this.options.errordata.Url)this.$gitCredentialsLabel.style.display=
"block",this.$url.textContent=this.options.errordata.Url;if(this.options.errordata&&this.options.errordata.User&&this.options.errordata.User!=="")this.$gitSshUsername.value=this.options.errordata.User,this.$gitSshUsernameRow.style.display="none",setTimeout(function(){e.$gitSshPassword.focus()},400);(new i(this.options.serviceRegistry)).isEnabled().then(function(d){if(!d)e.$gitSaveCredentials.style.display="none",e.$gitSaveCredentialsLabel.style.display="none",e.$gitSaveCredentialsInfo.style.display=
"none"});this.$gitSshPassword.addEventListener("focus",function(){e.$isSshPassword.checked=!0});this.$gitPrivateKey.addEventListener("focus",function(){e.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("focus",function(){e.$isPrivateKey.checked=!0});this.$gitPassphrase.addEventListener("focus",function(){e.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("change",function(d){e.privateKeyFile=d.target.files[0]})};f.prototype._execute=function(){var e=this,d=this.$gitPrivateKey.value,
c=this.$url.textContent,b=function(a){if(e._sshService)e._sshService.getKnownHosts().then(function(b){if(e.options.func){var c=typeof e.options.failedOperation==="undefined"?e.options.errordata.failedOperation:e.options.failedOperation;c!=="undefined"&&e._progressService.removeOperation(c);e.options.func({gitSshUsername:e.$gitSshUsername.value,gitSshPassword:e.$isSshPassword.checked?e.$gitSshPassword.value:"",gitPrivateKey:e.$isPrivateKey.checked?a:"",gitPassphrase:e.$isPrivateKey.checked?e.$gitPassphrase.value:
"",knownHosts:b})}});else if(e.options.func){var b=typeof e.options.failedOperation==="undefined"?e.options.errordata.failedOperation:e.options.failedOperation;b!=="undefined"&&e._progressService.removeOperation(b);e.options.func({gitSshUsername:e.$gitSshUsername.value,gitSshPassword:e.$gitSshPassword.value,gitPrivateKey:a,gitPassphrase:e.$gitPassphrase.value,knownHosts:e.$gitSshKnownHosts.value})}};if(this.privateKeyFile){var a=new FileReader;a.onload=function(){return function(a){d=a.target.result;
a=new i(e.options.serviceRegistry);e.$gitSaveCredentials.checked?a.put(c,{gitPrivateKey:d,gitPassphrase:e.$gitPassphrase.value}).then(function(){b(d)}):b(d)}}(this.privateKeyFile);a.readAsText(this.privateKeyFile)}else d.length>0?(a=new i(e.options.serviceRegistry),e.$gitSaveCredentials.checked?a.put(c,{gitPrivateKey:d,gitPassphrase:e.$gitPassphrase.value}).then(function(){b(d)}):b(d)):(a=new i(e.options.serviceRegistry),e.$gitSaveCredentials.checked?a.put(c,{gitSshUsername:e.$gitSshUsername.value,
gitSshPassword:e.$gitSshPassword.value}).then(function(){b(d)}):b(d))};f.prototype.constructor=f;return{GitCredentialsDialog:f}});
define("orion/git/widgets/OpenCommitDialog",["i18n!git/nls/gitmessages","orion/i18nUtil","orion/Deferred","orion/webui/dialog","orion/webui/littlelib"],function(g,i,h,f,e){function d(c){this._init(c)}d.prototype=new f.Dialog;d.prototype.TEMPLATE='<div><label for="resourceName">${Type the commit name (sha1):}</label></div><div><input type="text" id="resourceName"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>';d.prototype._init=function(c){var b=this;this.title=
c.title||g["Find Commit"];this.modal=!0;this.messages=g;this.SEARCH_DELAY=500;this.timeoutId=null;this.time=0;this.serviceRegistry=c.serviceRegistry;if(!this.serviceRegistry)throw Error("Missing required argument: serviceRegistry");this.repositories=c.repositories;if(!this.repositories)throw Error("Missing required argument: repositories");this.commitName=c.commitName;this.buttons=[];this.buttons.push({callback:function(){b.destroy();b._execute()},text:"OK"});this._initialize()};d.prototype._bindToDom=
function(){var c=this;this.$resourceName.addEventListener("input",function(){c.time=+new Date;c.timeoutId&&clearTimeout(c.timeoutId);c.timeoutId=setTimeout(c._checkSearch.bind(c),0)},!1);this.$resourceName.addEventListener("keydown",function(b){if(b.keyCode===e.KEY.ENTER){var a=e.$("a",c.$results);a&&(e.stop(b),window.open(a.href),c.hide())}},!1);this.$resourceName.value=this.commitName};d.prototype._checkSearch=function(){clearTimeout(this.timeoutId);var c=(new Date).getTime();c-this.time>this.SEARCH_DELAY?
(this.time=c,this._doSearch()):this.timeoutId=setTimeout(this._checkSearch.bind(this),50)};d.prototype._findCommitLocation=function(c,b,a){var d=this;a||(a=new h);c.length>0?this.serviceRegistry.getService("orion.page.progress").progress(d.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+b+c[0].ContentLocation+"?page=1&pageSize=1"),"Getting commit details "+b).then(function(b){a.resolve(b.Children[0])},function(){d._findCommitLocation(c.slice(1),b,a)}):a.reject();return a};
d.prototype._doSearch=function(){var c=this,b=this.$resourceName&&this.$resourceName.value;if(b){var a=document.createElement("div");a.appendChild(document.createTextNode(g["Searching..."]));e.empty(this.$results);this.$results.appendChild(a);this.serviceRegistry.getService("orion.page.message").setProgressMessage(g["Looking for the commit"]);this._findCommitLocation(this.repositories,b).then(function(a){e.empty(c.$results);c._displayCommit(a,c.$results);c.serviceRegistry.getService("orion.page.message").setProgressMessage("")},
function(){var a=document.createElement("div");a.appendChild(document.createTextNode("No commits found"));e.empty(c.$results);c.$results.appendChild(a);c.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}};d.prototype._displayCommit=function(c,b){var a=this,d=document.createElement("div");d.style.padding="10px";d.style.maxWidth="480px";e.empty(b);b.appendChild(d);var f=c.Message.split(/(\r?\n|$)/)[0],h=document.createElement("a");h.className="navlinkonpage";h.href="/git/git-commit.html#"+
c.Location+"?page=1&pageSize=1";h.textContent=f;d.appendChild(h);h.addEventListener("mouseup",function(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&a.hide()},!1);h.addEventListener("keyup",function(b){b.keyCode===e.KEY.ENTER&&a.hide()},!1);h=document.createElement("div");h.style.paddingTop="15px";d.appendChild(h);h=document.createElement("div");d.appendChild(h);f=document.createElement("div");d.appendChild(f);if(c.AuthorImage){d=document.createElement("div");d.style["float"]="left";var l=new Image;l.src=
c.AuthorImage;l.name=c.AuthorName;l.className="git-author-icon";d.appendChild(l);h.appendChild(d)}d=document.createElement("span");d.textContent=i.formatMessage(g[" authored by ${0} {${1}) on ${2}"],c.AuthorName,c.AuthorEmail,(new Date(c.Time)).toLocaleString());f.appendChild(d);h=document.createElement("div");f.appendChild(h);d=document.createElement("span");d.textContent=i.formatMessage(g["committed by 0 (1)"],c.CommitterName,c.CommitterEmail);f.appendChild(d);h=document.createElement("div");h.style.paddingTop=
"15px";f.appendChild(h);d=document.createElement("span");d.textContent=g["commit:"]+c.Name;f.appendChild(d);if(c.Parents&&c.Parents.length>0)h=document.createElement("div"),f.appendChild(h),b=document.createElement("span"),b.textContent=g["parent:"],d=document.createElement("a"),d.className="navlinkonpage",d.href="/git/git-commit.html#"+c.Parents[0].Location+"?page=1&pageSize=1",d.textContent=c.Parents[0].Name,b.appendChild(d),d.addEventListener("mouseup",function(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&
a.hide()},!1),d.addEventListener("keyup",function(b){b.keyCode===e.KEY.ENTER&&a.hide()},!1),f.appendChild(b)};d.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};d.prototype.constructor=d;return{OpenCommitDialog:d}});
define("orion/git/widgets/CommitDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(g,i){function h(g){this._init(g)}h.prototype=new i.Dialog;h.prototype.TEMPLATE='<div style="display: none; padding-top: 10px; padding-bottom: 10px;" id="commitInfoBar"><strong id="commitInfo"></strong></div><div style="padding:4px"><label id="commitMessageLabel" for="commitMessage">${Message:}</label><input id="commitMessage" style="width: 30em" value=""></div><div style="padding:4px"><label id="amendLabel" for="amend">${Amend:}</label><input id="amend" type="checkbox"></div><div style="padding:4px"><label id="committerNameLabel" for="committerName">${Committer Name:}</label><input id="committerName" style="width: 30em" value=""></div><div style="padding:4px"><label id="committerEmailLabel" for="committerEmail">${Committer Email:}</label><input id="committerEmail" style="width: 30em" value=""></div><div style="padding:4px"><label id="authorNameLabel" for="authorName">${Author Name:}</label><input id="authorName" style="width: 30em" value=""></div><div style="padding:4px"><label id="authorEmailLabel" for="authorEmail">${Author Email:}</label><input id="authorEmail" style="width: 30em" value=""></div>';h.prototype._init=
function(f){var e=this;this.title=g["Commit Changes"];this.modal=!0;this.messages=g;this.options=f;this.buttons=[];this.buttons.push({callback:function(){e._execute()},text:"OK",id:"commitChangesButton"});this._initialize()};h.prototype._bindToDom=function(){var g=this;if(this.options.body.Message)this.$commitMessage.value=this.options.body.Message;this.$commitMessage.addEventListener("keyup",function(){g._validate()});if(this.options.body.Amend)this.$amend.checked=!0;if(this.options.body.CommitterName)this.$committerName.value=
this.options.body.CommitterName;this.$committerName.addEventListener("keyup",function(){g._validate()});if(this.options.body.CommitterEmail)this.$committerEmail.value=this.options.body.CommitterEmail;this.$committerEmail.addEventListener("keyup",function(){g._validate()});if(this.options.body.AuthorName)this.$authorName.value=this.options.body.AuthorName;this.$authorName.addEventListener("keyup",function(){g._validate()});if(this.options.body.AuthorEmail)this.$authorEmail.value=this.options.body.AuthorEmail;
this.$authorEmail.addEventListener("keyup",function(){g._validate()});this._validate()};h.prototype._validate=function(){this.$commitMessage.value?this.$committerName.value?this.$committerEmail.value?this.$authorName.value?this.$authorEmail.value?(this.$commitInfoBar.style.display="none",this.$commitChangesButton.classList.remove(this.DISABLED)):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=g["The author mail is required."]):
(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=g["The author name is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=g["The committer mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=g["The committer name is required."]):(this.$commitInfoBar.style.display=
"block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=g["The commit message is required."])};h.prototype._execute=function(){if(!this.$commitChangesButton.classList.contains(this.DISABLED)){if(this.options.func){var g={};g.Message=this.$commitMessage.value;g.Amend=this.$amend.checked?!0:!1;g.CommitterName=this.$committerName.value;g.CommitterEmail=this.$committerEmail.value;g.AuthorName=this.$authorName.value;g.AuthorEmail=this.$authorEmail.value;this.options.func(g)}this.hide()}};
h.prototype.constructor=h;return{CommitDialog:h}});
define("orion/git/widgets/ApplyPatchDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(g,i){function h(g){this._init(g)}h.prototype=new i.Dialog;h.prototype.TEMPLATE='<div style="padding:4px"><input type="radio" name="radio" value="urlRadio" id="urlRadio" checked/>URL:<input type="text" name="url" id="url"/></div><div style="padding:4px"><input type="radio" name="radio" value="fileRadio" id="fileRadio"/>File:<input type="file" name="selectedFile" id="selectedFile" class="uploadChooser" /></div>';h.prototype._init=
function(f){var e=this;this.title=g["Apply Patch"];this.modal=!0;this.messages=g;this.options=f;this.buttons=[];this.buttons.push({callback:function(){e._applyPatch()},text:"OK"});this._initialize()};h.prototype._bindToDom=function(){};h.prototype._applyPatch=function(){var g=new FormData;g.append("uploadedfile",this.$selectedFile.files[0]);g.append("url",this.$url.value);g.append("radio",this.$fileRadio.checked?"fileRadio":"urlRadio");this.req=new XMLHttpRequest;this.req.open("post",this.options.diffLocation);
this.req.onreadystatechange=this.handleReadyState.bind(this);this.req.send(g)};h.prototype.handleReadyState=function(){this.req.readyState===4&&this.hide()};h.prototype.constructor=h;return{ApplyPatchDialog:h}});
define("orion/git/gitCommands","i18n!git/nls/gitmessages,require,orion/Deferred,orion/i18nUtil,orion/webui/littlelib,orion/commands,orion/git/util,orion/compare/compareUtils,orion/git/gitPreferenceStorage,orion/git/widgets/ConfirmPushDialog,orion/git/widgets/RemotePrompterDialog,orion/git/widgets/ReviewRequestDialog,orion/git/widgets/CloneGitRepositoryDialog,orion/git/widgets/GitCredentialsDialog,orion/git/widgets/OpenCommitDialog,orion/git/widgets/CommitDialog,orion/git/widgets/ApplyPatchDialog,orion/URL-shim".split(","),function(g,
i,h,f,e,d,c,b,a,j,m,p,l,q,r,n,k){var o={};(function(){function u(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Message:g["Problem while performing the action"]}}b.HttpCode=a.status;return b}var t=!1;o.updateNavTools=function(a,b,c,d,g,f){var h=e.node(c),j=a.getService("orion.page.command");if(h)j.destroy(h);else throw"could not find toolbar "+c;j.renderCommands(c,h,g,b,"button");if(f&&(c=e.node(f)))j.destroy(c),j.renderCommands(f,c,g,b,"button");if(d&&(g=e.node(d)))j.destroy(d),j.renderCommands(d,
g,null,b,"button");t||(t=!0,a.getService("orion.page.selection").addEventListener("selectionChanged",function(a){var c=e.node(d);c&&(j.destroy(c),j.renderCommands(d,c,a.selections,b,"button"))}))};o.handleKnownHostsError=function(a,b,c,d){if(confirm(f.formatMessage(g["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],b.KeyType,b.Host,b.HostFingerprint))){var e=a.getService("orion.net.ssh");e.addKnownHosts(b.Host+" "+b.KeyType+" "+b.HostKey).then(function(){e.getKnownHosts().then(function(b){c.knownHosts=
b;typeof c.failedOperation!=="undefined"&&a.getService("orion.page.progress").removeOperation(c.failedOperation);d(c)})})}};o.handleSshAuthenticationError=function(b,c,d,e,g){var c=c?c.Url:void 0,f=function(){(new q.GitCredentialsDialog({title:g,serviceRegistry:b,func:e,errordata:d.errordata,failedOperation:d.failedOperation})).show()};d.gitSshUsername&&d.gitSshUsername!==""||d.gitSshPassword&&d.gitSshPassword!==""||d.gitPrivateKey&&d.gitPrivateKey!==""?f():(new a(b)).get(c).then(function(a){a.gitPrivateKey!==
""||a.gitSshUsername!==""||a.gitSshPassword!==""?(typeof d.failedOperation!=="undefined"&&b.getService("orion.page.progress").removeOperation(d.failedOperation),e({knownHosts:d.knownHosts,gitSshUsername:a.gitSshUsername,gitSshPassword:a.gitSshPassword,gitPrivateKey:a.gitPrivateKey,gitPassphrase:a.gitPassphrase})):f()},f)};o.getDefaultSshOptions=function(a,b){var c=new h,d=a.getService("orion.net.ssh"),e=b&&!b.optionsRequested?b.valueFor("sshuser"):"",g=b&&!b.optionsRequested?b.valueFor("sshpassword"):
"";d.getKnownHosts().then(function(a){c.resolve({knownHosts:a,gitSshUsername:e,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})});return c};o.handleProgressServiceResponse=function(a,b,c,d,e,g){a&&a.status!==void 0&&(a=u(a));if(!a||a.HttpCode===void 0)d&&d(a);else switch(a.HttpCode){case 401:if(a.JsonData)b.errordata=a.JsonData;if(a.failedOperation)b.failedOperation=a.failedOperation;o.handleSshAuthenticationError(c,a.JsonData,b,e,g);break;case 400:if(a.JsonData&&a.JsonData.HostKey){if(a.failedOperation)b.failedOperation=
a.failedOperation;o.handleKnownHostsError(c,a.JsonData,b,e);break}default:b=[],b.Severity="Error",b.HTML=!1,b.Message=a.DetailedMessage?a.DetailedMessage:a.Message,c.getService("orion.page.message").setProgressResult(b),d&&d(a)}};o.gatherSshCredentials=function(b,c,d){var e=new h,j;if(c.items.RemoteLocation!==void 0)j=c.items.RemoteLocation[0].GitUrl;else if(c.items.GitUrl!==void 0)j=c.items.GitUrl;else if(c.items.errorData!==void 0)j=c.items.errorData.Url;else if(c.items.toRef!==void 0)j=c.items.toRef.RemoteLocation[0].GitUrl;
var i=function(a){b.getService("orion.net.ssh").getKnownHosts().then(function(b){c.sshObject=a;e.resolve({knownHosts:b,gitSshUsername:a.gitSshUsername,gitSshPassword:a.gitSshPassword,gitPrivateKey:a.gitPrivateKey,gitPassphrase:a.gitPassphrase})})},k=c.errorData;if(k&&k.HostKey)return confirm(f.formatMessage(g["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],k.KeyType,k.Host,k.HostFingerprint))&&b.getService("orion.net.ssh").addKnownHosts(k.Host+" "+k.KeyType+
" "+k.HostKey).then(function(){c.sshObject&&(c.sshObject.gitSshUsername!==""||c.sshObject.gitSshPassword!==""||c.sshObject.gitPrivateKey!=="")?i({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}):(new a(b)).get(j).then(function(a){i(a)},function(){i({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})}),e;var o=function(){if(!c.parameters&&!c.optionsRequested)i({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""});else if(c.parameters&&
!c.optionsRequested){var e=c.parameters?c.parameters.valueFor("sshuser"):"",g=c.parameters?c.parameters.valueFor("sshpassword"):"",f=c.parameters&&c.parameters.valueFor("saveCredentials")?c.parameters.valueFor("saveCredentials"):!1,h=new a(b);f?h.put(j,{gitSshUsername:e,gitSshPassword:g}).then(function(){i({gitSshUsername:e,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})}):i({gitSshUsername:e,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})}else(new q.GitCredentialsDialog({title:d,serviceRegistry:b,
func:i,errordata:k})).show()};c.sshObject&&(c.sshObject.gitSshUsername!==""||c.sshObject.gitSshPassword!==""||c.sshObject.gitPrivateKey!=="")?o():(new a(b)).get(j).then(function(a){a.gitPrivateKey!==""||a.gitSshUsername!==""||a.gitSshPassword!==""?i(a):o()},o);return e};o.handleGitServiceResponse=function(a,b,c,d){a&&a.status!==void 0&&(a=u(a));if(!a||!a.HttpCode)c&&c(a);else switch(a.HttpCode){case 401:d(a);break;case 400:if(a.JsonData&&a.JsonData.HostKey){d(a);break}default:d=[],d.Severity="Error",
d.HTML=!1,d.Message=a.DetailedMessage?a.DetailedMessage:a.Message,b.getService("orion.page.message").setProgressResult(d),c&&c(a)}};o.createFileCommands=function(e,k,n){function u(a){var b={Severity:"Error",HTML:!1};try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message?c.Message:g["Problem while performing the action"]}catch(d){b.Message=g["Problem while performing the action"]}e.getService("orion.page.message").setProgressResult(b)}var l=new d.ParametersDescription([new d.CommandParameter("name",
"text",g["Local Branch Name:"])]),l=new d.Command({name:g.Checkout,tooltip:g["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",parameters:l,callback:function(a){var b=a.items,c=function(a,b,c){e.getService("orion.page.progress").showWhile(e.getService("orion.git.provider").checkoutTag(a,b,c),f.formatMessage(g["Checking out tag ${0}"],c)).then(function(){n.changedItem()},u)},d=b.Repository!==
null?b.Repository.Location:b.CloneLocation;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&c(d,b.Name,a.parameters.valueFor("name"))},visibleWhen:function(a){return a.Type==="Tag"}});k.addCommand(l);l=new d.Command({name:g.Checkout,tooltip:g["Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",
id:"eclipse.checkoutBranch",callback:function(a){var b=a.items,c=e.getService("orion.git.provider"),d=e.getService("orion.page.message"),h=e.getService("orion.page.progress");d.setProgressMessage(b.Name?f.formatMessage(g["Checking out branch ${0}..."],b.Name):g["Checking out branch..."]);b.Type==="Branch"?h.progress(c.checkoutBranch(b.CloneLocation,b.Name),"Checking out branch "+b.Name).then(function(){d.setProgressResult(g["Branch checked out."]);n.changedItem(b.parent)},function(a){u(a)}):h.progress(c.addBranch(b.Repository!==
null?b.Repository.BranchLocation:b.parent.parent.BranchLocation,null,b.Name),"Adding branch "+b.Name).then(function(a){h.progress(c.checkoutBranch(a.CloneLocation,a.Name),"Checking out branch "+b.Name).then(function(){d.setProgressResult(g["Branch checked out."]);n.changedItem(b.Repository?b.Repository.BranchLocation:b.parent.parent.parent)},function(a){u(a)})},function(a){u(a)})},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});k.addCommand(l);l=new d.ParametersDescription([new d.CommandParameter("name",
"text","Name:")]);l=new d.Command({name:g["New Branch"],tooltip:g["Add a new local branch to the repository"],imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:l,callback:function(a){var b=a.items,c=e.getService("orion.page.progress"),d=function(a,d){c.progress(e.getService("orion.git.provider").addBranch(a,d),"Adding branch "+d).then(function(){n.changedItem(b)},u)},g;g=b.Type==="Clone"?b.BranchLocation:b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&d(g,a.parameters.valueFor("name"))},
visibleWhen:function(a){return a.GroupNode&&a.Name==="Branches"||a.Type==="Clone"&&n.parentId==="artifacts"}});k.addCommand(l);l=new d.Command({name:g.Delete,tooltip:g["Delete the local branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(a){var b=a.items,a=e.getService("orion.page.progress");confirm(f.formatMessage(g["Are you sure you want to delete branch ${0}?"],b.Name))&&a.progress(e.getService("orion.git.provider").removeBranch(b.Location),
"Removing branch "+b.Name).then(function(){n.changedItem?n.changedItem(b.parent):n.displayBranches&&n.displayBranches(b.ParentLocation,null)},u)},visibleWhen:function(a){return a.Type==="Branch"&&!a.Current}});k.addCommand(l);l=new d.Command({name:g.Delete,tooltip:g["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(a){var b=a.items,c=e.getService("orion.page.progress");confirm(f.formatMessage(g["You're going to delete remote branch ${0} and push the change."],
b.Name)+"\n\n"+g["Are you sure?"])&&o.getDefaultSshOptions(e).then(function(a){var d=arguments.callee,f=e.getService("orion.git.provider"),h=e.getService("orion.page.message"),f=c.progress(f.doPush(b.Location,"",!1,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Removing remote branch: "]+b.Name);h.createProgressMonitor(f,g["Removing remote branch: "]+b.Name);f.then(function(c){o.handleProgressServiceResponse(c,a,e,function(a){a.Result.Severity=="Ok"&&n.changedItem(b.parent)},
d,g["Delete Remote Branch"])},function(c){o.handleProgressServiceResponse(c,a,e,function(){},d,g["Removing remote branch: "]+b.Name)})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});k.addCommand(l);l=new d.ParametersDescription([new d.CommandParameter("name","text","Name:"),new d.CommandParameter("url","url","Url:")]);l=new d.Command({name:g["New Remote"],tooltip:g["Add a new remote to the repository"],imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:l,callback:function(a){var b=
a.items,c=e.getService("orion.page.progress"),d=function(a,d,g){c.progress(e.getService("orion.git.provider").addRemote(a,d,g),"Adding remote "+a).then(function(){n.changedItem(b)},u)},g;g=b.Type==="Clone"?b.RemoteLocation:b.Location;a.parameters.valueFor("name")&&a.parameters.valueFor("url")&&d(g,a.parameters.valueFor("name"),a.parameters.valueFor("url"))},visibleWhen:function(a){return a.GroupNode&&a.Name==="Remotes"||a.Type==="Clone"&&n.parentId==="artifacts"}});k.addCommand(l);l=new d.Command({name:g.Delete,
tooltip:g["Delete the remote from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(a){var b=a.items;confirm(f.formatMessage(g["Are you sure you want to delete remote ${0}?"],b.Name))&&e.getService("orion.page.progress").progress(e.getService("orion.git.provider").removeRemote(b.Location),"Removing remote "+b.Name).then(function(){n.changedItem(b.parent)},u)},visibleWhen:function(a){return a.Type==="Remote"}});k.addCommand(l);l=new d.Command({name:g.Pull,
tooltip:g["Pull from the repository"],imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(a){var b=a.items,c=b.Location,d=b.Name;o.getDefaultSshOptions(e).then(function(a){var f=arguments.callee,h=e.getService("orion.git.provider"),j=e.getService("orion.page.message"),h=e.getService("orion.page.progress").progress(h.doPull(c,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Pulling: "]+d);j.createProgressMonitor(h,
g["Pulling: "]+d);var i;h.then(function(c){o.handleProgressServiceResponse(c,a,e,function(){b.Type==="Clone"&&n.changedItem(b)},f,"Pull Git Repository")},function(c){if(i)c.failedOperation=i;o.handleProgressServiceResponse(c,a,e,function(){n.changedItem(b)},f,g["Pull Git Repository"])},function(a){i=a.Location})})},visibleWhen:function(a){return a.Type==="Clone"}});k.addCommand(l);l=new d.Command({name:g["Git Log"],tooltip:g["Open the log for the branch"],id:"eclipse.openGitLog",imageClass:"git-sprite-log",
spriteClass:"gitCommandSprite",hrefCallback:function(a){a=a.items;return i.toUrl("git/git-log.html")+"#"+a.CommitLocation+"?page=1"},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});k.addCommand(l);l=new d.Command({name:g["Git Log"],tooltip:g["Open the log for the repository"],id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){return i.toUrl("git/git-log.html")+"#"+a.items.CommitLocation+"?page=1"},visibleWhen:function(a){return!a.CommitLocation||
!a.StatusLocation?!1:!0}});k.addCommand(l);l=new d.Command({name:g["Git Status"],tooltip:g["Open the status for the repository"],id:"eclipse.openGitStatus",imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(a){return i.toUrl(c.statusUILocation)+"#"+a.items.StatusLocation},visibleWhen:function(a){return!a.StatusLocation?!1:!0}});k.addCommand(l);l=new d.Command({name:g["Show in Navigator"],tooltip:g["Show the repository folder in the file navigator"],id:"eclipse.openCloneContent",
hrefCallback:function(a){return i.toUrl("navigate/table.html")+"#"+a.items.ContentLocation+"?depth=1"},visibleWhen:function(a){return!a.ContentLocation?!1:!0}});k.addCommand(l);l=new d.Command({name:g["Compare With Each Other"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(a){a=a.items;return e.getService("orion.page.progress").progress(e.getService("orion.git.provider").getDiff(a[1].DiffLocation,a[0].Name),"Generating Diff for "+
a[0].Name+" and "+a[1].Name).then(function(a){return b.generateCompareHref(a,{readonly:!0})})},visibleWhen:function(a){return n.isDirectory?!1:Array.isArray(a)&&a.length===2&&a[0].Type==="Commit"&&a[1].Type==="Commit"?!0:!1}});k.addCommand(l);l=new d.Command({name:g["Compare With Working Tree"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(a){return b.generateCompareHref(a.items.DiffLocation,{})},visibleWhen:function(a){return a.Type===
"Commit"&&a.ContentLocation!==null&&!n.isDirectory}});k.addCommand(l);l=new d.Command({name:g.Open,id:"eclipse.openGitCommit",hrefCallback:function(a){return i.toUrl("edit/edit.html")+"#"+a.items.ContentLocation},visibleWhen:function(a){return a.Type==="Commit"&&a.ContentLocation!=null&&!n.isDirectory}});k.addCommand(l);l=new d.Command({name:g.Fetch,tooltip:g["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(b){var c=
b.items,f=c.Location,h=c.Name,j=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,k.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,k.collectParameters(c)):(new a(e)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",
g["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser",
"text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=b.failedOperation;k.collectParameters(c)})},i=function(){b.parameters&&b.parameters.optionsRequested?(b.parameters=null,b.optionsRequested=!0,k.collectParameters(b)):(b.errorData&&b.errorData.failedOperation&&e.getService("orion.page.progress").removeOperation(b.errorData.failedOperation),o.gatherSshCredentials(e,b).then(function(a){var d=
e.getService("orion.git.provider"),i=e.getService("orion.page.message"),a=e.getService("orion.page.progress").progress(d.doFetch(f,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Fetching remote: "]+h);i.createProgressMonitor(a,g["Fetching remote: "]+h);a.then(function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem(c)},function(a){j(a,b)})},function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem(c)},function(a){j(a,b)})})}))};if(b.items.GitUrl)i();
else{var m=e.getService("orion.git.provider"),l=e.getService("orion.page.progress");l.progress(m.getGitRemote(f),"Getting remote details "+h).then(function(a){l.progress(m.getGitClone(a.CloneLocation),"Getting git repository information "+a.Name).then(function(a){b.items.GitUrl=a.Children[0].GitUrl;i()},u)},u)}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(l);l=new d.Command({name:g["Force Fetch"],
imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",tooltip:g["Fetch from the remote branch into your remote tracking branch overriding its current content"],id:"eclipse.orion.git.fetchForce",callback:function(b){if(confirm(g["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+"\n\n"+g["Are you sure?"])){var c=b.items,f=c.Location,h=c.Name,j=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=
b.failedOperation,k.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,k.collectParameters(c)):(new a(e)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword",
"password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=
b.failedOperation;k.collectParameters(c)})},i=function(){b.parameters&&b.parameters.optionsRequested?(b.parameters=null,b.optionsRequested=!0,k.collectParameters(b)):(b.errorData&&b.errorData.failedOperation&&e.getService("orion.page.progress").removeOperation(b.errorData.failedOperation),o.gatherSshCredentials(e,b).then(function(a){var d=e.getService("orion.git.provider"),i=e.getService("orion.page.progress"),k=e.getService("orion.page.message"),a=i.progress(d.doFetch(f,!0,a.gitSshUsername,a.gitSshPassword,
a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Fetching remote: "]+h);k.createProgressMonitor(a,g["Fetching remote: "]+h);a.then(function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem(c)},function(a){j(a,b)})},function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem(c)},function(a){j(a,b)})})}))};if(b.items.GitUrl)i();else{var m=e.getService("orion.git.provider");m.getGitRemote(f).then(function(a){m.getGitClone(a.CloneLocation).then(function(a){b.items.GitUrl=a.Children[0].GitUrl;
i()})})}}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(l);l=new d.Command({name:g.Merge,tooltip:g["Merge the content from the branch to your active branch"],imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(a){var b=a.items,a=e.getService("orion.git.provider"),d=e.getService("orion.page.progress"),h=e.getService("orion.page.message");
d.progress(a.doMerge(b.HeadLocation,b.Name,!1),"Merging "+b.Name).then(function(a){var d={};if(a.Result==="FAST_FORWARD"||a.Result==="ALREADY_UP_TO_DATE")d.Severity="Ok",d.HTML=!1,d.Message=a.Result;else if(a.Result){var e=b.HeadLocation.replace("commit/HEAD","status");d.Severity="Warning";d.HTML=!0;d.Message="<span>"+a.Result;if(a.FailingPaths){var j="",k=!0,o;for(o in a.FailingPaths)k||(j+=", "),k=!1,j+=o;k||(d.Message+=". "+f.formatMessage(g["Failing paths: ${0}"],j))}d.Message+=f.formatMessage(g[". Go to ${0}."],
'<a href="'+i.toUrl(c.statusUILocation)+"#"+e+'">'+g["Git Status page"]+"</a>")+"</span>"}else if(a.error)e=b.HeadLocation.replace("commit/HEAD","status"),d.Severity="Error",a.error.responseText&&JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),d.Message=a.DetailedMessage?a.DetailedMessage:a.Message):d.Message=a.error.message,d.HTML=!0,d.Message="<span>"+d.Message+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+e+'">'+g["Git Status page"]+"</a>")+
"</span>";h.setProgressResult(d);n.changedItem(b)},function(a,d){var h=[],j=b.HeadLocation.replace("commit/HEAD","status");h.Severity="Error";h.HTML=!0;h.Message="<span>"+JSON.stringify(d.xhr.responseText).DetailedMessage+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+g["Git Status page"]+"</a>")+".</span>";e.getService("orion.page.message").setProgressResult(h);n.changedItem(b)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&
!a.Current?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(l);l=new d.Command({name:g["Merge Squash"],tooltip:g["Squash the content of the branch to the index"],imageClass:"git-sprite-merge_squash",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.mergeSquash",callback:function(a){var b=a.items,a=e.getService("orion.git.provider"),d=e.getService("orion.page.progress"),h=e.getService("orion.page.message");d.progress(a.doMerge(b.HeadLocation,b.Name,!0),
"Merging "+b.Name).then(function(a){var d=[];if(a.Result==="FAST_FORWARD_SQUASHED"||a.Result==="ALREADY_UP_TO_DATE")d.Severity="Ok",d.HTML=!1,d.Message=a.Result;else if(a.Result){var e=b.HeadLocation.replace("commit/HEAD","status");d.Severity="Warning";d.HTML=!0;d.Message="<span>"+a.Result+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+e+'">'+g["Git Status page"]+"</a>")+"</span>"}else if(a.error)e=b.HeadLocation.replace("commit/HEAD","status"),d.Severity="Error",a.error.responseText&&
JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),d.Message=a.DetailedMessage?a.DetailedMessage:a.Message):d.Message=a.error.message,d.HTML=!0,d.Message="<span>"+d.Message+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+e+'">'+g["Git Status page"]+"</a>")+"</span>";h.setProgressResult(d);n.changedItem(b)},function(a,d){var h=[],j=b.HeadLocation.replace("commit/HEAD","status");h.Severity="Error";h.HTML=!0;h.Message="<span>"+JSON.stringify(d.xhr.responseText).DetailedMessage+
f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+g["Git Status page"]+"</a>")+".</span>";e.getService("orion.page.message").setProgressResult(h);n.changedItem(b)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(l);l=new d.Command({name:g.Rebase,tooltip:g["Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch "]+
"and applying each commit again to the updated active branch.",id:"eclipse.orion.git.rebase",imageClass:"git-sprite-rebase",spriteClass:"gitCommandSprite",callback:function(a){var b=a.items,a=e.getService("orion.page.message"),d=e.getService("orion.page.progress").progress(e.getService("orion.git.provider").doRebase(b.HeadLocation,b.Name,"BEGIN"),b.Name?g["Rebase on top of "]+b.Name:g.Rebase);a.createProgressMonitor(d,b.Name?g["Rebase on top of "]+b.Name:g.Rebase);d.then(function(a){var d=[],h=b.HeadLocation.replace("commit/HEAD",
"status");a.Result==="OK"||a.Result==="FAST_FORWARD"||a.Result==="UP_TO_DATE"?(d.Severity="Ok",d.HTML=!1,d.Message=a.Result):a.Result==="STOPPED"?(d.Severity="Warning",d.HTML=!0,d.Message="<span>"+a.Result+g[". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing"]+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_WRONG_REPOSITORY_STATE"?(d.Severity="Error",d.HTML=!0,
d.Message="<span>"+a.Result+g[". Repository state is invalid (i.e. already during rebasing)"]+f.formatMessage(". Go to ${0}.",'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_UNMERGED_PATHS"?(d.Severity="Error",d.HTML=!0,d.Message="<span>"+a.Result+g[". Repository contains unmerged paths"]+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_PENDING_CHANGES"?
(d.Severity="Error",d.HTML=!0,d.Message="<span>"+a.Result+g[". Repository contains pending changes. Please commit or stash them"]+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">Git Status page</a>')+".</span>"):(d.Severity="Warning",d.HTML=!0,d.Message="<span>"+a.Result+f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>");e.getService("orion.page.message").setProgressResult(d);n.changedItem(b)},
u)},visibleWhen:function(a){this.tooltip=g["Rebase your commits by removing them from the active branch, "]+g["starting the active branch again based on the latest state of '"]+a.Name+"' "+g["and applying each commit again to the updated active branch."];return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});k.addCommand(l);l=new d.Command({name:g["Push All"],tooltip:g["Push commits and tags from your local branch into the remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",
id:"eclipse.orion.git.push",callback:function(b){var c=b.targetBranch,f,i=b.items;if(i.toRef)i=i.toRef;i.CloneLocation.split("/");var l=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,k.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,k.collectParameters(c)):(new a(e)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword",
"password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"])],
{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=b.failedOperation;k.collectParameters(c)})};if(b.parameters&&b.parameters.optionsRequested)b.parameters=null,b.optionsRequested=!0,k.collectParameters(b);else{var u=e.getService("orion.git.provider"),p=e.getService("orion.page.progress");
b.errorData&&b.errorData.failedOperation&&p.removeOperation(b.errorData.failedOperation);var t=function(a,c,d,f,h){var i=e.getService("orion.page.message"),a=p.progress(u.doPush(c,d,!0,h,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Pushing remote: "]+f);i.createProgressMonitor(a,g["Pushing remote: "]+f);a.then(function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem()},function(a){l(a,b)})},function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem()},
function(a){l(a,b)})})};p.progress(u.getGitClone(i.CloneLocation),"Getting git repository details "+i.Name).then(function(a){var d=a.Children[0].RemoteLocation,k=a.Children[0].ConfigLocation,n=function(a){handleProgressServiceResponse(a,{},e)};o.gatherSshCredentials(e,b).then(function(a){var o=new h;if(i.RemoteLocation.length===1&&i.RemoteLocation[0].Children.length===1)o=p.progress(u.getGitRemote(d),"Getting git remote details "+i.Name);else{var l={};l.Children=i.RemoteLocation;o.resolve(l)}o.then(function(d){c?
t(a,c.Location,"HEAD",c.Name,!1):(d=new m.RemotePrompterDialog({title:g["Choose Branch"],serviceRegistry:e,gitClient:u,treeRoot:{Children:d.Children},hideNewBranch:!1,func:function(c,d,e){f=c===null?e:c;var g="branch."+i.Name+".remote";p.progress(u.addCloneConfigurationProperty(k,g,f.parent.Name),"Adding git configuration property "+i.Name).then(function(){b.targetBranch=f;t(a,f.Location,"HEAD",f.Name,!1)},function(c){c.status===409?u.getGitCloneConfig(k).then(function(c){if(c.Children)for(var d=
0;d<c.Children.length;d++)if(c.Children[d].Key===g){p.progress(u.editCloneConfigurationProperty(c.Children[d].Location,f.parent.Name),"Updating configuration property "+f.parent.Name).then(function(){b.targetBranch=f;t(a,f.Location,"HEAD",f.Name,!1)},n);break}},n):n(erry)})}}),i.RemoteLocation.length===1&&i.RemoteLocation[0].Children.length===1&&(d=new j.ConfirmPushDialog({title:g["Choose Branch"],serviceRegistry:e,gitClient:u,dialog:d,location:i.RemoteLocation[0].Children[0].Name,func:function(){b.targetBranch=
i.RemoteLocation[0].Children[0];t(a,i.RemoteLocation[0].Children[0].Location,"HEAD",i.Name,!1)}})),d.show())})})})}},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation:a.Type==="Branch"&&a.Current&&a.RemoteLocation}});k.addCommand(l);l=new d.Command({name:g["Force Push All"],tooltip:g["Push commits and tags from your local branch into the remote branch overriding its current content"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",
id:"eclipse.orion.git.pushForce",callback:function(b){var c=b.confirmedWarnings,f=b.targetBranch;if(!c)if(confirm(g["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+g["Are you sure?"]))c=b.confirmedWarnings=!0;else return;var i,l=b.items;if(l.toRef)l=l.toRef;var u=l.CloneLocation.split("/"),p=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,k.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,
k.collectParameters(c)):(new a(e)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",
g["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;k.collectParameters(c)})};if(b.parameters&&b.parameters.optionsRequested)b.parameters=null,
b.optionsRequested=!0,k.collectParameters(b);else{var t=e.getService("orion.git.provider"),v=e.getService("orion.page.progress"),q=function(a,c,d,f,h){var i=e.getService("orion.page.message"),a=v.progress(t.doPush(c,d,!0,h,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),g["Pushing remote: "]+f);i.createProgressMonitor(a,g["Pushing remote: "]+f);a.then(function(a){o.handleGitServiceResponse(a,e,function(){n.changedItem()},function(a){p(a,b)})},function(a){o.handleGitServiceResponse(a,
e,function(){n.changedItem(l)},function(a){p(a,b)})})};v.progress(t.getGitClone(l.CloneLocation),"Getting git repository details "+l.Name).then(function(a){var c=a.Children[0].RemoteLocation,d=a.Children[0].ConfigLocation;o.gatherSshCredentials(e,b).then(function(a){var k=new h;if(l.RemoteLocation.length===1&&l.RemoteLocation[0].Children.length===1)k=v.progress(t.getGitRemote(c),"Getting remote details "+l.Name);else{var o={};o.Children=l.RemoteLocation;k.resolve(o)}k.then(function(c){f?q(a,f.Location,
"HEAD",f.Name,!0):(c=new m.RemotePrompterDialog({title:g["Choose Branch"],serviceRegistry:e,gitClient:t,treeRoot:{Children:c.Children},hideNewBranch:!1,func:function(c,e,g){i=c===null?g:c;var f="/gitapi/config/branch."+l.Name+".remote/clone/file/"+u[4];v.progress(t.addCloneConfigurationProperty(d,"branch."+l.Name+".remote",i.parent.Name),"Setting git configuration property "+l.Name).then(function(){b.targetBranch=i;q(a,i.Location,"HEAD",i.Name,!0)},function(c){c.status===409&&v.progres(t.editCloneConfigurationProperty(f,
i.parent.Name),"Setting git configuration property "+i.parent.Name).then(function(){b.targetBranch=i;q(a,i.Location,"HEAD",i.Name,!0)})})}}),l.RemoteLocation.length===1&&l.RemoteLocation[0].Children.length===1&&(c=new j.ConfirmPushDialog({title:g["Choose Branch"],serviceRegistry:e,gitClient:t,dialog:c,location:l.RemoteLocation[0].Children[0].Name,func:function(){b.targetBranch=l.RemoteLocation[0].Children[0];q(a,l.RemoteLocation[0].Children[0].Location,"HEAD",l.Location,!0)}})),c.startup(),c.show())})})})}},
visibleWhen:function(a){if(a.toRef)return a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation}});k.addCommand(l);l=new d.Command({name:g["< Previous Page"],tooltip:g["Show previous page of git log"],id:"eclipse.orion.git.previousLogPage",hrefCallback:function(a){return i.toUrl("git/git-log.html")+"#"+a.items.PreviousLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!==null&&a.toRef.Type==="Branch"||a.RepositoryPath!==null?a.PreviousLocation!==
void 0:!1}});k.addCommand(l);l=new d.Command({name:g["Next Page >"],tooltip:g["Show next page of git log"],id:"eclipse.orion.git.nextLogPage",hrefCallback:function(a){return i.toUrl("git/git-log.html")+"#"+a.items.NextLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!==null&&a.toRef.Type==="Branch"||a.RepositoryPath!==null?a.NextLocation!==void 0:!1}});k.addCommand(l);l=new d.Command({name:g["< Previous Page"],tooltip:g["Show previous page of git tags"],id:"eclipse.orion.git.previousTagPage",
hrefCallback:function(a){return i.toUrl("git/git-repository.html")+"#"+a.items.PreviousLocation},visibleWhen:function(a){return a.Type==="Tag"?a.PreviousLocation!==void 0:!1}});k.addCommand(l);l=new d.Command({name:g["Next Page >"],tooltip:g["Show next page of git tags"],id:"eclipse.orion.git.nextTagPage",hrefCallback:function(a){return i.toUrl("git/git-repository.html")+"#"+a.items.NextLocation},visibleWhen:function(a){return a.Type==="Tag"?a.NextLocation!==void 0:!1}});k.addCommand(l);l=new d.Command({name:g.Reset,
tooltip:g["Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes."],id:"eclipse.orion.git.resetIndex",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(a){var b=a.items;if(confirm(g["The content of your active branch will be replaced with "]+b.Name+". "+g["All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?"])){var a=e.getService("orion.git.provider"),c=e.getService("orion.page.message"),
a=e.getService("orion.page.progress").progress(a.resetIndex(b.IndexLocation,b.Name),"Resetting git index for "+b.Name);c.createProgressMonitor(a,g["Resetting index..."]);a.then(function(){n.changedItem(b);c.setProgressResult({Severity:"Info",HTML:!1,Message:"Ok"})},function(a){var b={Severity:"Error",HTML:!1};b.Message=a.message;c.setProgressResult(b)})}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});k.addCommand(l);l=new d.ParametersDescription([new d.CommandParameter("name",
"text",g["Name:"])]);l=new d.Command({name:g.Tag,tooltip:g["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:l,callback:function(a){var b=a.items,c=function(a,c){e.getService("orion.page.progress").progress(e.getService("orion.git.provider").doAddTag(a,c),"Adding tag "+c).then(function(){n.changedItem(b)},u)},d=b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&c(d,a.parameters.valueFor("name"))},
visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(l);l=new d.Command({name:g.Delete,tooltip:g["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(a){var b=a.items;confirm(f.formatMessage(g["Are you sure you want to delete tag ${0}?"],b.Name))&&e.getService("orion.page.progress").progress(e.getService("orion.git.provider").doRemoveTag(b.Location),"Removing tag "+b.Name).then(function(){n.changedItem(b.parent)},u)},visibleWhen:function(a){return a.Type===
"Tag"}});k.addCommand(l);l=new d.ParametersDescription([new d.CommandParameter("reviewer","text",g["Reviewer name"])],{hasOptionalParameters:!0});l=new d.Command({name:g["Ask for review"],tooltip:g["Ask for review tooltip"],imageClass:"core-sprite-tag",id:"eclipse.orion.git.askForReviewCommand",parameters:l,callback:function(a){var b=e.getService("orion.page.progress"),c=function(a){var b=document.createElement("a");b.href=a;b.protocol==="ssh:"&&(b=a.indexOf("@"),b!==-1&&(a="ssh://"+a.substr(b+1)));
return a},d=function(d){var g=a.items,f=g.Location.replace(g.Name,"HEAD"),h=g.AuthorName,j=g.Name,k=g.Message;b.progress(e.getService("orion.git.provider").getGitClone(g.CloneLocation),"Getting repository details "+g.Name).then(function(a){window.location.href.split("#");var o=(new URL(i.toUrl("."),window.location)).href.slice(0,-1),a=c(a.Children[0].GitUrl),o=o+"/git/reviewRequest.html#"+a+"_"+g.Name;b.progress(e.getService("orion.git.provider").sendCommitReviewRequest(j,f,d,o,h,k),"Sending review request for "+
j).then(function(a){var b={Severity:"Ok",HTML:!1};b.Message=a.Result;e.getService("orion.page.message").setProgressResult(b)},u)})};if(a.parameters.valueFor("reviewer")&&!a.parameters.optionsRequested)d(a.parameters.valueFor("reviewer"));else{var f=a.items;b.progress(e.getService("orion.git.provider").getGitClone(f.CloneLocation),"Getting git details "+f.Name).then(function(a){window.location.href.split("#");var b=(new URL(i.toUrl("."),window.location)).href.slice(0,-1),a=c(a.Children[0].GitUrl);
(new p.ReviewRequestDialog({title:g["Contribution Review Request"],url:b+"/git/reviewRequest.html#"+a+"_"+f.Name,func:d})).show()},u)}},visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(l);l=new d.Command({name:g["Cherry-Pick"],tooltip:g["Apply the change introduced by the commit to your active branch"],id:"eclipse.orion.git.cherryPick",imageClass:"git-sprite-cherry_pick",spriteClass:"gitCommandSprite",callback:function(a){var b=a.items,a=e.getService("orion.page.progress"),d=e.getService("orion.git.provider"),
h=b.Location.replace(b.Name,"HEAD");a.progress(d.doCherryPick(h,b.Name),"Cherry picking "+b.Name).then(function(a){var d=[],h=b.Location.replace("commit/"+b.Name,"status");if(a.Result==="OK")d.Severity="Ok",a.HeadUpdated?(d.HTML=!1,d.Message=a.Result):(d.HTML=!0,d.Message="<span>"+g["Nothing changed."]+"</span>");else if(a.Result==="CONFLICTING")d.Severity="Warning",d.HTML=!0,d.Message="<span>"+a.Result+g[". Some conflicts occurred"]+ +f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+
"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>";else if(a.Result==="FAILED"){d.Severity="Error";d.HTML=!0;d.Message="<span>"+a.Result;if(a.FailingPaths){var j="",k=!0,o;for(o in a.FailingPaths)k||(j+=", "),k=!1,j+=o;k||(d.Message+=". "+f.formatMessage(g["Failing paths: ${0}"],j))}d.Message+=f.formatMessage(g[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+g["Git Status page"]+"</a>")+".</span>"}else d.Severity="Warning",d.HTML=!1,d.Message=a.Result;e.getService("orion.page.message").setProgressResult(d)},
u)},visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(l)};o.createGitClonesCommands=function(b,c,e,i,j,n){function m(a){var c={Severity:"Error",HTML:!1};try{var d=JSON.parse(a.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:g["Problem while performing the action"]}catch(e){c.Message=g["Problem while performing the action"]}b.getService("orion.page.message").setProgressResult(c)}i=new d.ParametersDescription([new d.CommandParameter("key","text",g["Key:"]),
new d.CommandParameter("value","text",g["Value:"])]);i=new d.Command({name:g["New Configuration Entry"],tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",parameters:i,callback:function(a){var c=a.items,d=b.getService("orion.git.provider"),g=b.getService("orion.page.progress");a.parameters.valueFor("key")&&a.parameters.valueFor("value")&&g.progress(d.addCloneConfigurationProperty(c.ConfigLocation,a.parameters.valueFor("key"),
a.parameters.valueFor("value")),"Setting configuration propetry: "+a.parameters.valueFor("key")).then(function(){e.changedItem(c)},m)}});c.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("value","text",g["Value:"])]);i=new d.Command({name:g.Edit,tooltip:g["Edit the configuration entry"],imageClass:"core-sprite-edit",id:"eclipse.orion.git.editConfigEntryCommand",parameters:i,callback:function(a){var c=a.items,d=b.getService("orion.git.provider"),g=b.getService("orion.page.progress");
a.parameters.valueFor("value")&&g.progress(d.editCloneConfigurationProperty(c.Location,a.parameters.valueFor("value")),"Editing configuration property "+c.Key).then(function(){e.changedItem(c)},m)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(i);i=new d.Command({name:g.Delete,tooltip:g["Delete the configuration entry"],imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",callback:function(a){var c=a.items,a=b.getService("orion.git.provider"),
d=b.getService("orion.page.progress");confirm(f.formatMessage(g["Are you sure you want to delete ${0}?"],c.Key))&&d.progress(a.deleteCloneConfigurationProperty(c.Location),"Deleting configuration property "+c.Key).then(function(){e.changedItem(c)},m)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("url","url",g["Repository URL:"])],{hasOptionalParameters:!0});i=new d.Command({name:g["Clone Repository"],tooltip:g["Clone an existing Git repository to a folder"],
id:"eclipse.cloneGitRepository",parameters:i,callback:function(a){var c=b.getService("orion.git.provider"),d=b.getService("orion.page.progress"),f=function(a,f,h){o.getDefaultSshOptions(b).then(function(i){var j=arguments.callee,k=d.progress(c.cloneGitRepository(h,a,f,e.defaultPath,i.gitSshUsername,i.gitSshPassword,i.knownHosts,i.gitPrivateKey,i.gitPassphrase),"Cloning repository "+h);b.getService("orion.page.message").createProgressMonitor(k,g["Cloning repository: "]+a);k.then(function(a){o.handleProgressServiceResponse(a,
i,b,function(){e.changedItem&&e.changedItem()},j,g["Clone Git Repository"])},function(a){o.handleProgressServiceResponse(a,i,b,function(){},j,g["Clone Git Repository"])})})};a.parameters.valueFor("url")&&!a.parameters.optionsRequested?f(a.parameters.valueFor("url")):(new l.CloneGitRepositoryDialog({serviceRegistry:b,fileClient:n,url:a.parameters.valueFor("url"),alwaysShowAdvanced:a.parameters.optionsRequested,func:f})).show()},visibleWhen:function(){return!0}});c.addCommand(i);i=new d.Command({name:g["Clone Repository"],
tooltip:g["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepositoryReviewReq",callback:function(a){var c=b.getService("orion.git.provider"),d=b.getService("orion.page.progress");(new l.CloneGitRepositoryDialog({serviceRegistry:b,fileClient:n,url:a.userData,alwaysShowAdvanced:!1,func:function(a,f,h){o.getDefaultSshOptions(b).then(function(i){var j=arguments.callee,k=d.progress(c.cloneGitRepository(h,a,f,e.defaultPath,i.gitSshUsername,i.gitSshPassword,i.knownHosts,i.gitPrivateKey,
i.gitPassphrase),"Cloning git repository "+h);b.getService("orion.page.message").createProgressMonitor(k,g["Cloning repository: "]+a);k.then(function(a){o.handleProgressServiceResponse(a,i,b,function(){e.changedItem&&e.changedItem()},j,g["Clone Git Repository"])},function(a){o.handleProgressServiceResponse(a,i,b,function(){},j,g["Clone Git Repository"])})})}})).show()},visibleWhen:function(){return!0}});c.addCommand(i);i=new d.Command({name:g["Add Remote"],tooltip:g["Add a new remote to the repository"],
id:"eclipse.addRemoteReviewRequestCommand",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",callback:function(f){if(f.parameters&&f.parameters.valueFor("remoteName"))f.remoteName=f.parameters.valueFor("remoteName");var h=function(e,f){e.JsonData.HostKey?(f.parameters=null,f.errorData=e.JsonData,c.collectParameters(f)):f.optionsRequested?(f.errorData=e.JsonData,c.collectParameters(f)):(new a(b)).isEnabled().then(function(a){f.parameters=a?e.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword",
"password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",g["Don't prompt me again:"])],{hasOptionalParameters:!0}):e.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",g["SSH Password:"])],
{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",g["SSH User Name:"]),new d.CommandParameter("sshpassword","password",g["SSH Password:"])],{hasOptionalParameters:!0});f.errorData=e.JsonData;c.collectParameters(f)})};if(f.parameters&&f.parameters.optionsRequested)f.parameters=null,f.optionsRequested=!0,c.collectParameters(f);else{var i=function(a,c,d){var i=b.getService("orion.page.progress");i.progress(b.getService("orion.git.provider").addRemote(a,
c,f.userData),"Adding git remote "+c).then(function(){o.gatherSshCredentials(b,f).then(function(a){b.getService("orion.git.provider").getGitRemote(d.RemoteLocation).then(function(j){for(var k,n=0;n<j.Children.length;n++)j.Children[n].Name===c&&(k=j.Children[n]);var l=b.getService("orion.git.provider"),j=b.getService("orion.page.message"),n=i.progress(l.doFetch(k.Location,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),"Fetching remote "+c);j.createProgressMonitor(n,
g["Fetching remote: "]+k.Location);n.then(function(a){o.handleGitServiceResponse(a,b,function(){i.progress(l.getGitRemote(k.Location),"Getting remote details "+c).then(function(){e.changedItem(d)},m)},function(a){h(a,f)})},function(a){o.handleGitServiceResponse(a,b,function(){e.changedItem(d)},function(a){h(a,f)})})})})},m)};f.remoteName?i(f.items.RemoteLocation,f.remoteName,f.items):(f.parameters=new d.ParametersDescription([new d.CommandParameter("remoteName","text",g["Remote Name:"])],{hasOptionalParameters:!1}),
c.collectParameters(f))}},visibleWhen:function(){return!0}});c.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("folderName","text",g["New folder:"])],{hasOptionalParameters:!0});i=new d.Command({name:g["Init Repository"],tooltip:g["Create a new Git repository in a new folder"],id:"eclipse.initGitRepository",parameters:i,callback:function(a){var c=b.getService("orion.git.provider"),d=b.getService("orion.page.progress"),f=function(a,f,h){o.getDefaultSshOptions(b).then(function(i){var j=
arguments.callee,k=d.progress(c.cloneGitRepository(h,a,f,e.defaultPath),g["Initializing repository: "]+h);b.getService("orion.page.message").createProgressMonitor(k,g["Initializing repository: "]+h);k.then(function(a){o.handleProgressServiceResponse(a,i,b,function(){e.changedItem&&e.changedItem()},j,g["Init Git Repository"])},function(a){o.handleProgressServiceResponse(a,i,b,function(){},j,g["Init Git Repository"])})})};a.parameters.valueFor("folderName")&&!a.parameters.optionsRequested?f(null,null,
a.parameters.valueFor("folderName")):(new l.CloneGitRepositoryDialog({serviceRegistry:b,title:g["Init Git Repository"],fileClient:n,advancedOnly:!0,func:f})).show()},visibleWhen:function(){return!0}});c.addCommand(i);i=new d.Command({name:g.Delete,tooltip:g["Delete the repository"],imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",visibleWhen:function(a){return a.Type==="Clone"},callback:function(a){var c=a.items,a=b.getService("orion.git.provider"),d=b.getService("orion.page.progress");
if(Array.isArray(c)){if(confirm(f.formatMessage(g["Are you sure you want do delete ${0} repositories?"],c.length)))for(var h=0,i=0;i<c.length;i++)d.progress(a.removeGitRepository(c[i].Location),"Removing repository "+c.Name).then(function(){h++;h>=c.length&&e.changedItem&&e.changedItem()},m)}else confirm(f.formatMessage(g["Are you sure you want to delete ${0}?"],c.Name))&&d.progress(a.removeGitRepository(c.Location),"Removing repository "+c.Name).then(function(){e.changedItem&&e.changedItem()},m)}});
c.addCommand(i);i=new d.Command({name:g["Apply Patch"],tooltip:g["Apply a patch on the selected repository"],id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(a){a=a.items;Array.isArray(a)&&(a=a.length>1?{}:a[0]);(new k.ApplyPatchDialog({title:g["Apply Patch"],diffLocation:a.DiffLocation})).show()},visibleWhen:function(a){return a.Type==="Clone"}});c.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("commitName",
"text",g["Commit name:"])],{hasOptionalParameters:!0});i=new d.Command({name:g["Open Commit"],tooltip:g["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:i,callback:function(a){var c=b.getService("orion.page.progress"),d=function(e,f,i){i==null&&(i=new h);e.length>0?c.progress(b.getService("orion.git.provider").doGitLog("/gitapi/commit/"+a.parameters.valueFor("commitName")+e[0].ContentLocation+
"?page=1&pageSize=1",null,null,g["Looking for the commit"]),"Looking for commit "+a.parameters.valueFor("commitName")).then(function(a){i.resolve(a.Children[0].Location)},function(){d(e.slice(1),f,i)}):i.reject();return i},e=function(c){a.parameters.optionsRequested?(new r.OpenCommitDialog({repositories:c,serviceRegistry:b,commitName:a.parameters.valueFor("commitName")})).show():(b.getService("orion.page.message").setProgressMessage(g["Looking for the commit"]),d(c,a.parameters.valueFor("commitName")).then(function(a){a!==
null&&window.open("/git/git-commit.html#"+a+"?page=1&pageSize=1")},function(){var a=[];a.Severity="warning";a.HTML=!1;a.Message=g["No commits found"];b.getService("orion.page.message").setProgressResult(a)}))};if(a.items.Type==="Clone"){var f=[a.items];e(f)}else a.items.CloneLocation?c.progress(b.getService("orion.git.provider").getGitClone(a.items.CloneLocation),"Getting git repository details").then(function(a){e(a.Children)}):(f=a.items,e(f))},visibleWhen:function(a){return a.Type==="Clone"||a.CloneLocation||
a.length>1&&a[0].Type==="Clone"}});c.addCommand(i)};o.createGitStatusCommands=function(a,b,e){function f(b){var c={Severity:"Error",HTML:!1};try{var d=JSON.parse(b.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:g["Problem while performing the action"]}catch(e){c.Message=g["Problem while performing the action"]}a.getService("orion.page.message").setProgressResult(c)}function h(a){Array.isArray(a)||(a=[a]);return a}function i(b,c){var d=a.getService("orion.page.message"),
h=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doRebase(b,"",c),"Rebasing git repository");d.createProgressMonitor(h,c);h.then(function(b){if(b.Result==="OK"||b.Result==="ABORTED"||b.Result==="FAST_FORWARD"||b.Result==="UP_TO_DATE"){var c=[];c.Severity="Ok";c.HTML=!1;c.Message=b.Result;a.getService("orion.page.message").setProgressResult(c);e.changedItem({})}if(b.Result==="STOPPED")c=[],c.Severity="Warning",c.HTML=!1,c.Message=b.Result+g[". Repository still contains conflicts."],
a.getService("orion.page.message").setProgressResult(c),e.changedItem({});else if(b.Result==="FAILED_UNMERGED_PATHS")c=[],c.Severity="Error",c.HTML=!1,c.Message=b.Result+g[". Repository contains unmerged paths. Resolve conflicts first."],a.getService("orion.page.message").setProgressResult(c)},f)}var j=new d.Command({name:g.Stage,tooltip:g["Stage the change"],imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(b){var c=h(b.items),d=a.getService("orion.page.message"),
i=a.getService("orion.page.progress");if(c.length===1)b=i.progress(a.getService("orion.git.provider").stage(c[0].indexURI),g["Staging changes"]),d.createProgressMonitor(b,g["Staging changes"]);else{for(var j=[],k=0;k<c.length;k++)j[k]=c[k].name;b=i.progress(a.getService("orion.git.provider").stageMultipleFiles(b.userData.Clone.IndexLocation,j),g["Staging changes"]);d.createProgressMonitor(b,"Staging changes")}b.then(function(){e.changedItem(c)},f)},visibleWhen:function(a){a=h(a);if(a.length===0)return!1;
for(var b=0;b<a.length;b++)if(!c.isChange(a[b])||c.isStaged(a[b]))return!1;return!0}});b.addCommand(j);j=new d.Command({name:g.Unstage,tooltip:g["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(b){var c=h(b.items),d=a.getService("orion.page.message"),i=a.getService("orion.page.progress");if(c.length===1)b=i.progress(a.getService("orion.git.provider").unstage(c[0].indexURI,c[0].name),"Unstaging changes");else{for(var j=
[],k=0;k<c.length;k++)j[k]=c[k].name;b=i.progress(a.getService("orion.git.provider").unstage(b.userData.Clone.IndexLocation,j),"Unstaging changes")}d.createProgressMonitor(b,g["Staging changes"]);b.then(function(){e.changedItem(c)},f)},visibleWhen:function(a){a=h(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!c.isChange(a[b])||!c.isStaged(a[b]))return!1;return!0}});b.addCommand(j);j=new d.ParametersDescription([new d.CommandParameter("name","text",g["Commit message:"],"",4),new d.CommandParameter("amend",
"boolean",g["Amend:"],!1)],{hasOptionalParameters:!0});j=new d.Command({name:"Commit",tooltip:"Commit",id:"eclipse.orion.git.commitCommand",parameters:j,callback:function(b){var c=b.items.status,d=function(b){var d=a.getService("orion.page.message"),b=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").commitAll(c.Clone.HeadLocation,null,JSON.stringify(b)),g["Committing changes"]);d.createProgressMonitor(b,g["Committing changes"]);b.then(function(){e.changedItem(c)},f)},
h={};h.Message=b.parameters.valueFor("name");h.Amend=b.parameters.valueFor("amend");for(var i=c.Clone.Config,j=0;j<i.length;j++)if(i[j].Key==="user.name")h.CommitterName=i[j].Value,h.AuthorName=i[j].Value;else if(i[j].Key==="user.email")h.CommitterEmail=i[j].Value,h.AuthorEmail=i[j].Value;h.Message&&h.CommitterName&&h.CommitterEmail&&!b.parameters.optionsRequested?d(h):(new n.CommitDialog({body:h,func:d})).show()},visibleWhen:function(){return!0}});b.addCommand(j);j=new d.Command({name:g.Reset,tooltip:g["Reset the branch, discarding all staged and unstaged changes"],
imageClass:"core-sprite-refresh",id:"eclipse.orion.git.resetCommand",callback:function(b){var c=b.items;a.getService("orion.page.dialog").confirm(g["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+"\n"+g["Are you sure you want to continue?"],function(b){if(b){var b=a.getService("orion.page.message"),d=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").unstageAll(c.IndexLocation,"HARD"),g["Resetting local changes"]);
b.createProgressMonitor(d,g["Resetting local changes"]);d.then(function(){e.changedItem(c)},f)}})},visibleWhen:function(a){return c.hasStagedChanges(a)||c.hasUnstagedChanges(a)}});b.addCommand(j);j=new d.Command({name:g.Checkout,tooltip:g["Checkout files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(b){var c=h(b.items);a.getService("orion.page.dialog").confirm(g["Your changes to the selected files will be discarded and cannot be recovered."]+
"\n"+g["Are you sure you want to continue?"],function(d){if(d){for(var d=a.getService("orion.page.message"),h=a.getService("orion.page.progress"),i=[],j=0;j<c.length;j++)i[j]=c[j].name;h=h.progress(a.getService("orion.git.provider").checkoutPath(b.userData.Clone.Location,i),g["Resetting local changes"]);d.createProgressMonitor(h,g["Resetting local changes"]);h.then(function(){e.changedItem(c)},f)}})},visibleWhen:function(a){a=h(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!c.isChange(a[b])||
c.isStaged(a[b]))return!1;return!0}});b.addCommand(j);j=new d.Command({name:g["Show Patch"],tooltip:g["Show workspace changes as a patch"],imageClass:"git-sprite-diff",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){for(var b=h(a.items),a=a.userData.Clone.DiffLocation+"?parts=diff",c=0;c<b.length;c++)a+="&Path=",a+=b[c].name;return a},visibleWhen:function(a){a=h(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(c.isStaged(a[b]))return!1;return!0}});
b.addCommand(j);j=new d.Command({name:g.Continue,tooltip:g["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",callback:function(a){return i(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});b.addCommand(j);j=new d.Command({name:g["Skip Patch"],tooltip:g["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return i(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==
-1}});b.addCommand(j);j=new d.Command({name:g.Abort,tooltip:g["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",callback:function(a){return i(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});b.addCommand(j)}})();return o});
define("orion/git/gitRepositoryExplorer","i18n!git/nls/gitmessages,require,orion/commands,orion/section,orion/i18nUtil,orion/webui/littlelib,orion/PageUtil,orion/dynamicContent,orion/fileUtils,orion/globalCommands,orion/git/gitCommands,orion/Deferred,orion/git/widgets/CommitTooltipDialog".split(","),function(g,i,h,f,e,d,c,b,a,j,m,p,l){h={};h.GitRepositoryExplorer=function(){function h(a,b,c,d,e,f,g){this.parentId=e;this.registry=a;this.linkService=c;this.commandService=b;this.selection=d;this.parentId=
e;this.pageNavId=f;this.actionScopeId=g;this.checkbox=!1}h.prototype.handleError=function(a){var b={Severity:"Error",HTML:!1};try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(d){b.Message=a.message}this.registry.getService("orion.page.message").setProgressResult(b);a.status===404&&(this.initTitleBar(),this.displayRepositories())};h.prototype.setDefaultPath=function(a){this.defaultPath=a};h.prototype.changedItem=function(){this.redisplay(!1)};h.prototype.redisplay=
function(b){b===void 0&&(b=!0);var d=c.matchResourceParameters();if(d.resource)this.displayRepository(d.resource);else{var d=a.makeRelative(this.defaultPath),e=i.toUrl("gitapi/clone._"),e=e.substring(0,e.length-2);this.displayRepositories2(d[0]==="/"?e+d:e+"/"+d,b)}};h.prototype.displayRepositories2=function(a,b){var c=this;this.loadingDeferred=new p;b&&this.loadingDeferred.then(function(){c.commandService.processURL(window.location.href)});this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitClone(a),
"Getting git repository details").then(function(a){if(a.Children.length===0)c.initTitleBar({}),c.displayRepositories([],"full");else if(a.Children[0].Type==="Clone")a=a.Children,c.initTitleBar(a),c.displayRepositories(a,"full",!0)},function(a){c.handleError(a)})};h.prototype.displayRepository=function(a){var b=this;this.loadingDeferred=new p;this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitClone(a),"Getting git repository details").then(function(a){var c=
d.node(b.pageNavId);c&&(d.empty(c),b.commandService.renderCommands(b.pageNavId,c,a,b,"button"));a.Children.length===0?(b.initTitleBar({}),b.displayRepositories([],"full")):a.Children.length==1&&a.Children[0].Type==="Clone"?(a=a.Children,b.initTitleBar(a[0]),b.displayRepositories(a),b.displayStatus(a[0]),b.displayCommits(a[0]),b.displayBranches(a[0]),b.displayTags(a[0]),b.displayRemotes(a[0]),b.displayConfig(a[0])):a.Children[0].Type==="Clone"?(a=a.Children,b.initTitleBar(a),b.displayRepositories(a,
"full",!0)):a.Children[0].Type==="Branch"?(a=a.Children,b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a[0].CloneLocation),"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],"Branches");b.displayRepositories(a,"mini",!0);b.displayBranches(a[0],"full");b.displayRemoteBranches(a[0],"full")},function(){b.handleError(error)})):a.Children[0].Type==="Tag"?(a=a.Children,b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a[0].CloneLocation),
"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],g.Tags);b.displayRepositories(a,"mini",!0);b.displayTags(a[0],"full")},function(){b.handleError(error)})):a.Children[0].Type==="Config"&&b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a.CloneLocation),"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],g.Configuration);b.displayRepositories(a,"mini",!0);b.displayConfig(a[0],
"full")},function(){b.handleError(error)})},function(a){b.handleError(a)})};var m=function(a,b,c,e){var f=d.node(b),a=a.getService("orion.page.command");if(f)a.destroy(f);else throw"could not find toolbar "+b;a.renderCommands(c,f,e,null,"button")};h.prototype.initTitleBar=function(a,b){var c={},d="repoPageActions",e;a&&a.Type==="Clone"&&b?(e=a,c.Name=b,c.Parents=[],c.Parents[0]={},c.Parents[0].Name=e.Name,c.Parents[0].Location=e.Location,c.Parents[0].ChildrenLocation=e.Location,c.Parents[1]={},c.Parents[1].Name=
"Repositories"):a&&a.Type==="Clone"?(e=a,c.Name=e.Name,c.Parents=[],c.Parents[0]={},c.Parents[0].Name="Repositories"):(c.Name="Repositories",d="reposPageActions");m(this.registry,"pageActions",d,e||{});j.setPageTarget({task:"Repositories",target:e,breadcrumbTarget:c,makeBreadcrumbLink:function(a,b){a.href="/git/git-repository.html#"+(b?b:"")},serviceRegistry:this.registry,commandService:this.commandService})};h.prototype.decorateRepository=function(a,b,c){var d=this;c==null&&(c=new p);b||(b="full");
this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.core.file").loadWorkspace(a.ContentLocation+"?parts=meta"),"Loading workspace info").then(function(e){try{a.Content={};var f="root / ";if(e.Parents!==null)for(var g=e.Parents.length;g>0;g--)f+=e.Parents[g-1].Name+" / ";f+=e.Name;a.Content.Path=f;b!=="full"?c.resolve():d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getGitStatus(a.StatusLocation),"Getting status for "+
a.Name).then(function(b){try{a.Status=b,d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getGitBranch(a.BranchLocation),"Getting branches for "+a.Name).then(function(b){try{for(var e=b.Children||[],f,b=0;b<e.length;b++)if(e[b].Current){f=e[b];break}!f||f.RemoteLocation[0]===null?c.resolve():f.RemoteLocation.length===1&&f.RemoteLocation[0].Children.length===1&&f.RemoteLocation[0].Children[0].CommitLocation?d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getLog(f.RemoteLocation[0].Children[0].CommitLocation+
"?page=1&pageSize=20","HEAD"),"Getting incomming commits "+a.Name).then(function(b){a.CommitsToPush=b.Children===void 0?0:b.Children.length;c.resolve()},function(){c.reject()}):d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").doGitLog(f.CommitLocation+"?page=1&pageSize=20"),"Getting outgoing commits "+a.Name).then(function(b){a.CommitsToPush=b.Children===void 0?0:b.Children.length;c.resolve()},function(){c.reject()})}catch(g){c.reject()}},function(){c.reject()})}catch(e){c.reject()}},
function(){c.reject()})}catch(h){c.reject(h)}},function(){c.reject()});return c};h.prototype.displayRepositories=function(a,c,e){var h=this;this.registry.getService("orion.page.message");var i=new b.DynamicContentModel(a,function(b){return h.decorateRepository.bind(h)(a[b])}),i=new b.DynamicContentExplorer(i);i.use({initialRender:function(){var b=d.node("table");d.empty(b);if(!a||a.length===0)(new f.Section(b,{id:"repositorySection",title:"Repository",iconClass:["gitImageSprite","git-sprite-repository"]})).setTitle(c===
"full"?g["No Repositories"]:g["Repository Not Found"]),h.loadingDeferred.resolve();else{var e=document.createElement("div");e.className="sectionTable";b.appendChild(e);e.innerHTML='<div id="repositoryNode" class="mainPadding"></div>'}},cleanupRender:function(){h.loadingDeferred.resolve()},renderBeforeItemPopulation:function(b){var f=document.createElement("div");f.className="sectionTableItem "+(a.length===1?"":"lightTreeTableRow");d.node("repositoryNode").appendChild(f);var i=document.createElement("div");
i.style.overflow="hidden";f.appendChild(i);f=document.createElement("div");f.className="stretch";i.appendChild(f);var j=document.createElement("span");f.appendChild(j);if(e){var m=document.createElement("a");m.href="/git/git-repository.html#"+a[b].Location;m.appendChild(document.createTextNode(a[b].Name));j.appendChild(m)}else j.appendChild(document.createTextNode(a[b].Name));this.explorer.progressIndicators[b]=new this.explorer.progressIndicator(b,j);j=document.createElement("div");f.appendChild(j);
j=document.createElement("span");j.textContent=a[b].GitUrl!=null?"git url: "+a[b].GitUrl:g["(no remote)"];f.appendChild(j);j=document.createElement("div");f.appendChild(j);j=document.createElement("span");j.id="location"+b;f.appendChild(j);if(c==="full")j=document.createElement("div"),j.style.paddingTop="10px",f.appendChild(j),j=document.createElement("span"),j.id="repositoryState"+b,j.style.paddingLeft="10px",f.appendChild(j),j=document.createElement("span"),j.id="workspaceState"+b,j.style.paddingLeft=
"10px",f.appendChild(j),j=document.createElement("span"),j.id="commitsState"+b,j.style.paddingLeft="10px",f.appendChild(j),f=document.createElement("div"),f.className="sectionTableItemActions",f.id="repositoryActionsArea",i.appendChild(f),h.commandService.renderCommands(h.actionScopeId,f,a[b],h,"tool")},renderAfterItemPopulation:function(b){h.renderRepository(a[b],b,a.length,c,e)}});i.render()};h.prototype.renderRepository=function(a,b,c,f){d.node("location"+b).textContent=g["location: "]+a.Content.Path;
c=a.Status;if(f==="full"){var f=c.Untracked.length+c.Conflicting.length+c.Modified.length,h=c.Changed.length+c.Added.length+c.Removed.length,f=f>0||h>0?e.formatMessage(g["${0} file(s) to stage and ${1} file(s) to commit."],f,h):g["Nothing to commit."];if(c.RepositoryState!=="SAFE")d.node("repositoryState"+b).textContent=g["Rebase in progress!"];d.node("workspaceState"+b).textContent=f;a=a.CommitsToPush;d.node("commitsState"+b).textContent=a>0?a+g[" commit(s) to push."]:g["Nothing to push."]}};h.prototype.displayStatus=
function(a){var b=a.StatusLocation,c=this,e=d.node("table"),e=new f.Section(e,{id:"workingDirectorySection",title:g["Working Directory"],content:'<div id="workingDirectoryNode" class="mainPadding"></div>'});c.commandService.registerCommandContribution(e.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10);c.commandService.renderCommands(e.actionsNode.id,e.actionsNode.id,{ViewAllLink:"/git/git-status2.html#"+a.StatusLocation,ViewAllLabel:g["See Full Status"],ViewAllTooltip:g["See the status"]},
c,"button");var h=e.createProgressMonitor();h.begin("Loading status");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(b),"Loading status").then(function(b){h.done();c.renderStatus(a,b)},function(a){h.done(a)})};h.prototype.renderStatus=function(a,b){var c=document.createElement("div");c.className="sectionTableItem";d.node("workingDirectoryNode").appendChild(c);var f=document.createElement("div");f.style.overflow="hidden";c.appendChild(f);
var c=b.Untracked.length+b.Conflicting.length+b.Modified.length,h=b.Changed.length+b.Added.length+b.Removed.length,i=g["You have no changes to commit."];if(c>0||h>0)i=g["You have changes to commit in your workspace!"];var j=document.createElement("div");j.style.overflow="vbox stretch details-view";f.appendChild(j);if(b.RepositoryState!=="SAFE")f=document.createElement("span"),f.textContent=g["Rebase in progress!"],j.appendChild(f),f=document.createElement("div"),j.appendChild(f);f=document.createElement("span");
f.textContent=i;j.appendChild(f);f=document.createElement("div");j.appendChild(f);i=document.createElement("span");i.textContent=e.formatMessage(g["${0} file(s) to stage and ${1} file(s) to commit."],c,h);j.appendChild(i)};h.prototype.decorateBranches=function(a,b){var c=this;b==null&&(b=new p);a.length>0?this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").doGitLog(a[0].CommitLocation+"?page=1&pageSize=1"),"Getting branch last commit "+a[0].Name).then(function(d){a[0].Commit=
d.Children[0];c.decorateBranches(a.slice(1),b)}):b.resolve();return b};h.prototype.displayBranches=function(a,b){var c=a.BranchLocation,e=this,h=d.node("table"),i=new f.Section(h,{id:"branchSection",title:g.Branches,iconClass:["gitImageSprite","git-sprite-branch"],slideout:!0,content:'<div id="branchNode"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),j=i.createProgressMonitor();j.begin("Getting branches");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(c+
(b==="full"?"?commits=1":"?commits=1&page=1&pageSize=5")),"Getting branches "+a.Name).then(function(f){f=f.Children;j.done();e.commandService.destroy(i.actionsNode.id);b!=="full"&&f.length!==0&&(e.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),e.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,{ViewAllLink:"/git/git-repository.html#"+c+"?page=1",ViewAllLabel:g["View All"],ViewAllTooltip:g["View all local and remote tracking branches"]},
e,"button"));e.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.addBranch",200);e.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,a,e,"button");var h=document.createElement("div");h.className="mainPadding";for(var m=0;m<f.length;m++)f[m].ParentLocation=c,e.renderBranch(f[m],m,h);d.empty(d.node("branchNode"));d.node("branchNode").appendChild(h)},function(a){j.done();e.handleError(a)})};h.prototype.renderBranch=function(a,b,c){b=document.createElement("div");b.className=
"sectionTableItem lightTreeTableRow";c.appendChild(b);c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);if(a.Current)b=document.createElement("span"),b.className="sectionIcon gitImageSprite git-sprite-branch_active",c.appendChild(b);b=document.createElement("div");b.className="stretch";c.appendChild(b);var d=document.createElement("span");d.className=a.Current?"activeBranch":"";d.textContent=a.Name;b.appendChild(d);d=document.createElement("div");b.appendChild(d);var d=a.Commit.Children[0],
f=a.RemoteLocation.length==1&&a.RemoteLocation[0].Children.length==1?e.formatMessage(g["tracks ${0}, "],a.RemoteLocation[0].Children[0].Name):g["tracks no branch, "],h=document.createElement("div");h.textContent=f+e.formatMessage(g["last modified ${0} by ${1}"],(new Date(d.Time)).toLocaleString(),d.AuthorName);b.appendChild(h);b=document.createElement("div");b.className="sectionTableItemActions";b.id="branchActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,
"tool")};h.prototype.displayRemoteBranches=function(a){var b=a.RemoteLocation,c=this,e=d.node("table"),h=new f.Section(e,{id:"remoteBranchSection",title:"Remote Branches",iconClass:["gitImageSprite","git-sprite-branch"],content:'<div id="remoteBranchNode" class="mainPadding"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),i=h.createProgressMonitor();i.begin("Getting remote branches");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b),
"Getting remote branches "+a.Name).then(function(b){b=b.Children;i.done();b.length===0?h.setTitle(g["No Remote Branches"]):(i=h.createProgressMonitor(),i.begin(g["Rendering branches"]),c.displayRemoteBranches2(h,b,a).then(function(){i.done()},function(){i.done()}))},function(a){i.done(a)})};h.prototype.displayRemoteBranches2=function(a,b,c,d,e){var f=this;d==null&&(d=new p);b.length>0?this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b[0].Location),
"Getting remote branches "+b[0].Name).then(function(g){for(var g=g.Children,h=0;h<g.length;h++)g[h].Repository=c,f.renderRemoteBranch(g[h],h);f.displayRemoteBranches2(a,b.slice(1),c,d,e||g.length>0,g)},function(a){d.reject(a)}):(e||a.setTitle(g["No Remote Branches"]),d.resolve());return d};h.prototype.renderRemoteBranch=function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";d.node("remoteBranchNode").appendChild(b);var c=document.createElement("div");c.style.overflow=
"hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var e=document.createElement("span");e.textContent=a.Name;b.appendChild(e);e=document.createElement("div");b.appendChild(e);b=document.createElement("div");b.className="sectionTableItemActions";b.id="branchActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,"tool")};h.prototype.displayCommits=function(a){var b=this,c=d.node("table"),h=new f.Section(c,{id:"commitSection",
title:g.Commits,slideout:!0,content:'<div id="commitNode"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),i=h.createProgressMonitor();i.begin(g["Getting current branch"]);var j=document.createElement("div");j.className="mainPadding";this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(a.BranchLocation),"Getting current branch "+a.Name).then(function(a){for(var a=a.Children,c,d=0;d<a.length;d++)if(a[d].Current){c=
a[d];break}c?(a=c.RemoteLocation.length===1&&c.RemoteLocation[0].Children.length===1,h.setTitle(e.formatMessage(g['Commits for "${0}" branch'],c.Name)),b.commandService.destroy(h.actionsNode.id),b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),b.commandService.renderCommands(h.actionsNode.id,h.actionsNode.id,{ViewAllLink:"/git/git-log.html#"+c.CommitLocation+"?page=1",ViewAllLabel:g["See Full Log"],ViewAllTooltip:g["See the full log"]},
b,"button"),a&&(b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.fetch",100),b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.merge",100),b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.rebase",100),b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.resetIndex",100),b.commandService.renderCommands(h.actionsNode.id,h.actionsNode.id,c.RemoteLocation[0].Children[0],b,"button")),
b.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.orion.git.push",100),b.commandService.renderCommands(h.actionsNode.id,h.actionsNode.id,c,b,"button"),c.RemoteLocation[0]===null?(i.done(),b.renderNoCommit(j)):(i.worked(e.formatMessage(g['Getting commits for "${0}" branch'],c.Name)),a&&c.RemoteLocation[0].Children[0].CommitLocation?b.registry.getService("orion.git.provider").getLog(c.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD").then(function(a){i.worked(g["Rendering commits"]);
for(var d=a.Children.length,e=0;e<a.Children.length;e++)b.renderCommit(a.Children[e],!0,e,j);i.worked(g["Getting outgoing commits"]);b.registry.getService("orion.git.provider").getLog(c.CommitLocation+"?page=1&pageSize=20",c.RemoteLocation[0].Children[0].Id).then(function(a){i.worked("Rendering commits");for(var c=0;c<a.Children.length;c++)b.renderCommit(a.Children[c],!1,c+d,j);d+=a.Children.length;d===0&&b.renderNoCommit(j);i.done()},function(a){i.done(a)})},function(a){i.done(a)}):b.registry.getService("orion.git.provider").doGitLog(c.CommitLocation+
"?page=1&pageSize=20").then(function(a){i.worked(g["Rendering commits"]);for(var c=0;c<a.Children.length;c++)b.renderCommit(a.Children[c],!0,c,j);a.Children.length===0&&b.renderNoCommit(j);i.done()},function(a){i.done(a)}))):i.done()});d.empty(d.node("commitNode"));d.node("commitNode").appendChild(j)};h.prototype.renderNoCommit=function(a){var b=document.createElement("div");b.className="sectionTableItem";a.appendChild(b);a=document.createElement("div");a.style.overflow="hidden";b.appendChild(a);
b=document.createElement("div");b.className="stretch";a.appendChild(b);a=document.createElement("span");a.textContent=g["The branch is up to date."];b.appendChild(a);a=document.createElement("div");b.appendChild(a);a=document.createElement("span");a.textContent=g["You have no outgoing or incoming commits."];b.appendChild(a)};h.prototype.renderCommit=function(a,b,c,d){c=document.createElement("div");c.className="sectionTableItem lightTreeTableRow";d.appendChild(c);d=document.createElement("div");d.style.overflow=
"hidden";c.appendChild(d);b=b?"git-sprite-outgoing_commit":"git-sprite-incoming_commit";c=document.createElement("span");c.className="sectionIcon gitImageSprite "+b;d.appendChild(c);if(a.AuthorImage)b=document.createElement("div"),b.style["float"]="left",c=new Image,c.src=a.AuthorImage,c.name=a.AuthorName,c.className="git-author-icon",b.appendChild(c),d.appendChild(b);b=document.createElement("div");b.className="stretch";d.appendChild(b);c=document.createElement("a");c.className="navlinkonpage";c.href=
"/git/git-commit.html#"+a.Location+"?page=1&pageSize=1";c.textContent=a.Message;b.appendChild(c);new l.CommitTooltipDialog({commit:a,triggerNode:c});c=document.createElement("div");b.appendChild(c);c=document.createElement("span");c.textContent=g[" (SHA "]+a.Name+g[") by "]+a.AuthorName+" on "+(new Date(a.Time)).toLocaleString();b.appendChild(c);b=document.createElement("div");b.className="sectionTableItemActions";b.id="branchActionsArea";d.appendChild(b);this.commandService.renderCommands(this.actionScopeId,
b,a,this,"tool")};h.prototype.decorateTag=function(a,b){b==null&&(b=new p);this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").doGitLog(a.CommitLocation+"?page=1&pageSize=1"),"Getting tag last commit "+a.Name).then(function(c){a.Commit=c.Children[0];b.resolve()},function(){b.reject()});return b};h.prototype.displayTags=function(a,e){var h=this,i=document.createElement("a"),j=c.matchResourceParameters();i.href=j.resource;var i=i.search?i.search:"?page=1&pageSize=20",
j=d.node("table"),m=new f.Section(j,{id:"tagSection",iconClass:["gitImageSprite","git-sprite-tag"],title:"Tags"+(e==="full"?"":" (5 most recent)"),content:'<div id="tagNode"></div>',canHide:!0,hidden:!0,preferenceService:h.registry.getService("orion.core.preference")}),l=m.createProgressMonitor();l.begin(g["Getting tags"]);var p=document.createElement("div");p.className="mainPadding";this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(a.TagLocation+
(e==="full"?i:"?page=1&pageSize=5")),"Getting tags "+a.Name).then(function(c){var f=c.Children,c=new b.DynamicContentModel(f,function(a){return h.decorateTag.bind(h)(f[a])}),c=new b.DynamicContentExplorer(c);c.use({initialRender:function(){l.done();d.empty(d.node("tagNode"));d.node("tagNode").appendChild(p);h.commandService.destroy(m.actionsNode.id);e!=="full"&&f.length!==0&&(h.commandService.registerCommandContribution(m.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),h.commandService.renderCommands(m.actionsNode.id,
m.actionsNode.id,{ViewAllLink:"/git/git-repository.html#"+a.TagLocation+"?page=1&pageSize=20",ViewAllLabel:g["View All"],ViewAllTooltip:g["View all tags"]},h,"button"));f.length===0&&m.setTitle(g["No Tags"])},renderBeforeItemPopulation:function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";p.appendChild(b);var c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var d=
document.createElement("span");d.textContent=f[a].Name;b.appendChild(d);this.explorer.progressIndicators[a]=new this.explorer.progressIndicator(a,d);d=document.createElement("div");d.id="tagDetailsView"+a;b.appendChild(d);b=document.createElement("div");b.className="sectionTableItemActions";b.id="tagActionsArea";c.appendChild(b);h.commandService.renderCommands(h.actionScopeId,b,f[a],h,"tool")},renderAfterItemPopulation:function(a){h.renderTag(f[a],a)}});c.render()},function(a){l.done();h.handleError(a)})};
h.prototype.renderTag=function(a,b){var c=document.createElement("span");c.className="tag-description";d.empty(d.node("tagDetailsView"+b));d.node("tagDetailsView"+b).appendChild(c);var e=a.Commit,f=document.createElement("a");f.className="navlinkonpage";f.href="/git/git-commit.html#"+e.Location+"?page=1&pageSize=1";f.textContent=e.Message;c.appendChild(f);c.appendChild(document.createTextNode(g[" by "]+e.AuthorName+g[" on "]+(new Date(e.Time)).toLocaleString()));new l.CommitTooltipDialog({commit:e,
triggerNode:f})};h.prototype.displayRemotes=function(a){var b=a.RemoteLocation,c=this,e=d.node("table"),h=new f.Section(e,{id:"remoteSection",title:g.Remotes,iconClass:["gitImageSprite","git-sprite-remote"],slideout:!0,content:'<div id="remoteNode" class="mainPadding"></div>',canHide:!0,hidden:!0,preferenceService:this.registry.getService("orion.core.preference")}),i=h.createProgressMonitor();i.begin("Getting remotes");c.commandService.registerCommandContribution(h.actionsNode.id,"eclipse.addRemote",
100);c.commandService.renderCommands(h.actionsNode.id,h.actionsNode.id,a,c,"button");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b),"Getting remotes "+a.Name).then(function(a){a=a.Children;i.worked(g["Rendering remotes"]);if(a.length===0)h.setTitle(g["No Remotes"]);else for(var b=0;b<a.length;b++)c.renderRemote(a[b],b);i.done()},function(a){i.done();c.handleError(a)})};h.prototype.renderRemote=function(a){var b=document.createElement("div");
b.className="sectionTableItem lightTreeTableRow";d.node("remoteNode").appendChild(b);var c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var e=document.createElement("div");e.textContent=a.Name;b.appendChild(e);e=document.createElement("div");e.textContent=a.GitUrl;b.appendChild(e);b=document.createElement("div");b.className="sectionTableItemActions";b.id="remoteActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,
b,a,this,"tool")};h.prototype.displayConfig=function(a,b){var c=a.ConfigLocation,e=this,h=d.node("table"),i=new f.Section(h,{id:"configSection",title:g.Configuration+(b==="full"?"":" (user.*)"),slideout:!0,content:'<div id="configNode" class="mainPadding"></div>',canHide:!0,hidden:!0,preferenceService:this.registry.getService("orion.core.preference")}),j=i.createProgressMonitor();j.begin(g["Getting confituration"]);this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitCloneConfig(c),
"Getting configuration of "+a.Name).then(function(d){j.worked("Rendering configuration");d=d.Children;b!=="full"&&d.length!==0&&(e.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),e.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,{ViewAllLink:"/git/git-repository.html#"+c,ViewAllLabel:g["View All"],ViewAllTooltip:g["View all configuration entries"]},e,"button"));b==="full"&&(e.commandService.registerCommandContribution(i.actionsNode.id,
"eclipse.orion.git.addConfigEntryCommand",1E3),e.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,a,e,"button"));if(d.length===0)i.setTitle("No Configuration");else for(var f=0;f<d.length;f++)(b==="full"||d[f].Key.indexOf("user.")!==-1)&&e.renderConfigEntry(d[f],f);j.done()},function(a){j.done();e.handleError(a)})};h.prototype.renderConfigEntry=function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";d.node("configNode").appendChild(b);var c=
document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var e=document.createElement("span");e.textContent=a.Key;b.appendChild(e);e=document.createElement("span");e.style.paddingLeft="10px";e.textContent=a.Value;b.appendChild(e);b=document.createElement("div");b.className="sectionTableItemActions";b.id="configActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,"tool")};
return h}();return h});
define("orion/operation",["orion/xhr","orion/Deferred"],function(g,i){function h(e,d){g("GET",e,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=c.response?JSON.parse(c.response):null;d.progress(c);!c.type||c.type==="loadstart"||c.type==="progress"?setTimeout(function(){h(e,d)},2E3):(c.type==="error"||c.type==="abort"?d.reject(c.Result):d.resolve(c.Result.JsonData),c.Location||g("DELETE",e,{headers:{"Orion-Version":"1"},timeout:15E3}))},function(c){var b=c;if(c.responseText!==void 0){b=
c.responseText;try{b=JSON.parse(c.responseText)}catch(a){}}b.Message!==void 0?(b.HttpCode=b.HttpCode===void 0?c.status:b.HttpCode,b.Severity=b.Severity===void 0?"Error":b.Severity,d.reject(b)):d.reject({Severity:"Error",Message:b,HttpCode:c.status})})}function f(e,d){d.then(null,function(c){c instanceof Error&&c.name==="Cancel"&&g("PUT",e,{headers:{"Orion-Version":"1"},data:JSON.stringify({abort:!0}),timeout:15E3})})}return{handle:function(e){var d=new i;f(e,d);h(e,d);return d}}});
define("orion/git/gitClient",["require","orion/xhr","orion/Deferred","orion/operation"],function(g,i,h,f){var e=e||{};e.GitService=function(){function d(c){if(c)this._serviceRegistry=c,this._serviceRegistration=c.registerService("orion.git.provider",this),this._sshService=c.getService("orion.net.ssh")}d.prototype={checkGitService:function(){},cloneGitRepository:function(c,b,a,d,e,f,l,q,r){var n=this,k={};if(c)k.Name=c;if(a)k.Path=a;if(b)k.GitUrl=b;k.Location=d;if(e)k.GitSshUsername=e;if(f)k.GitSshPassword=
f;if(l)k.GitSshKnownHost=l;if(q)k.GitSshPrivateKey=q;if(r)k.GitSshPassphrase=r;var c=g.toUrl("gitapi/clone/._"),c=c.substring(0,c.length-2),o=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(k)}).then(function(a){n._getGitServiceResponse(o,a)},function(a){n._handleGitServiceResponseError(o,a)});return o},removeGitRepository:function(c){var b=this,a=new h;i("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},
timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitStatus:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},stage:function(c){var b=this,a=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},
timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},stageMultipleFiles:function(c,b){var a=this,d=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},unstageAll:function(c,b){var a=this,d=new h;i("POST",c,{headers:{"Orion-Version":"1",
"Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Reset:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},unstage:function(c,b){var a=this,d=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},checkoutPath:function(c,
b){var a=this,d=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b,RemoveUntracked:"true"})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},commitAll:function(c,b,a){var d=this,e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:a}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,
a)});return e},getGitClone:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitCloneConfig:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,
c)});return a},getGitBranch:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitRemote:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,
c)});return a},checkoutBranch:function(c,b){var a=this,d=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Branch:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},resetIndex:function(c,b){var a=this,d=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Commit:b,Reset:"HARD"})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},addBranch:function(c,b,a){var d=this,e={};if(b)e.Name=b;if(a)e.Branch=a;var f=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(e)}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},removeBranch:function(c){var b=this,a=new h;i("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},
timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},addRemote:function(c,b,a){var d=this,e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Remote:b,RemoteURI:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},removeRemote:function(c){var b=this,a=new h;i("DELETE",c,
{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},doGitLog:function(c){var b=this,a=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getDiff:function(c,b){var a=this,d=new h;i("POST",
c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({New:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doFetch:function(c,b,a,d,e,f,g){var q=this,r=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Fetch:"true",Force:b,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:e,GitSshPrivateKey:f,GitSshPassphrase:g})}).then(function(a){q._getGitServiceResponse(r,
a)},function(a){q._handleGitServiceResponseError(r,a)});return r},doPull:function(c,b,a,d,e,f,g){var q=this,r=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Pull:"true",Force:b,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:e,GitSshPrivateKey:f,GitSshPassphrase:g})}).then(function(a){q._getGitServiceResponse(r,a)},function(a){q._handleGitServiceResponseError(r,a)});return r},doMerge:function(c,b,a){var d=this,e=new h;
i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Merge:b,Squash:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},doCherryPick:function(c,b){var a=this,d=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({"Cherry-Pick":b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,
b)});return d},doRebase:function(c,b,a){var d=this,e={};e.Rebase=b;if(a)e.Operation=a;var f=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(e)}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},doPush:function(c,b,a,d,e,f,g,q,r){var n=this,k=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({PushSrcRef:b,
PushTags:a,Force:d,GitSshUsername:e,GitSshPassword:f,GitSshKnownHost:g,GitSshPrivateKey:q,GitSshPassphrase:r})}).then(function(a){n._getGitServiceResponse(k,a)},function(a){n._handleGitServiceResponseError(k,a)});return k},getLog:function(c,b){var a=this,d=new h,e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({New:b})}).then(function(a){e.resolve(a.xhr.getResponseHeader("Location"))},function(b){a._handleGitServiceResponseError(d,
b)});e.then(function(b){i("GET",b,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)})});return d},getDefaultRemoteBranch:function(c){var b=this,a=new h,d=new h;i("GET",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(a){b._getGitServiceResponse(d,a)},function(c){b._handleGitServiceResponseError(a,c)});
d.then(function(c){i("GET",c.Children[0].Location,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)})});return a},doAddTag:function(c,b){var a=this,d=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Name:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,
b)});return d},doRemoveTag:function(c){var b=this,a=new h;i("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},checkoutTag:function(c,b,a){var d=this,e=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Tag:b,Branch:a})}).then(function(a){d._getGitServiceResponse(e,
a)},function(a){d._handleGitServiceResponseError(e,a)});return e},addCloneConfigurationProperty:function(c,b,a){var d=this,e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Key:b,Value:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},editCloneConfigurationProperty:function(c,b){var a=this,d=new h;i("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({Value:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},deleteCloneConfigurationProperty:function(c){var b=this,a=new h;i("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},sendCommitReviewRequest:function(c,b,a,d,e,f){var g=
this,q=new h;i("POST",b,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({ReviewReqCommit:c,ReviewReqUrl:d,ReviewReqNotifyLogin:a,ReviewReqAuthorName:e,ReviewMessage:f})}).then(function(a){g._getGitServiceResponse(q,a)},function(a){g._handleGitServiceResponseError(q,a)});return q},_getGitServiceResponse:function(c,b){var a=b.response?JSON.parse(b.response):null;if(b.xhr&&b.xhr.status===202){var d=f.handle(a.Location);d.then(c.resolve,function(b){b.failedOperation=
a.Location;c.reject(b)},c.progress);c.then(null,function(a){d.reject(a)})}else c.resolve(a)},_handleGitServiceResponseError:function(c,b){c.reject(b)}};return d}();return e});
define("orion/ssh/sshTools",[],function(){var g=g||{};g.SshService=function(){function g(h){if(h)this._serviceRegistry=h,this._serviceRegistration=h.registerService("orion.net.ssh",this)}g.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(g,f){f||(f="");var e=localStorage.getItem(f+this._KNOWN_HOSTS);e?e.indexOf(g)<0&&localStorage.setItem(f+this._KNOWN_HOSTS,e+"\n"+g):localStorage.setItem(f+this._KNOWN_HOSTS,g)},clearKnownhosts:function(g){g||(g="");localStorage.removeItem(g+this._KNOWN_HOSTS)},
getKnownHosts:function(g){g||(g="");return localStorage.getItem(g+this._KNOWN_HOSTS)}};return g}();return g});
define("orion/links",[],function(){function g(g){this._init(g)}g.prototype={_init:function(g){this._registry=g.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(g,h,f,e,d){var c=g.search(f);c>0&&(h.appendChild(document.createTextNode(g.substring(0,c))),g=g.substring(c));var f=g.replace(f,""),c=g.substring(0,g.length-f.length),b=c.split(" ",e);if(b.length===e){for(var g=document.createElement("a"),a=0;a<e;a++)d=d.replace("%"+
(a+1),b[a]);g.setAttribute("href",d);g.textContent=c;h.appendChild(g);g=f}return g},addLinks:function(g,h){var f=h||document.createElement("div"),e=this._registry.getServiceReferences("orion.core.linkScanner");if(e.length>0)for(var d=e[0],e=RegExp(d.getProperty("pattern"),"i"),c=d.getProperty("words"),d=d.getProperty("anchor"),b=g.search(e);b>=0;)g=this._replaceLink(g,f,e,c,d),b=g.search(e);g.length>0&&f.appendChild(document.createTextNode(g));return f}};g.prototype.constructor=g;return{TextLinkService:g}});
var eclipse;
define("git/git-repository","i18n!git/nls/gitmessages,require,orion/bootstrap,orion/status,orion/progress,orion/PageUtil,orion/commands,orion/dialogs,orion/selection,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/git/gitRepositoryExplorer,orion/git/gitCommands,orion/git/gitClient,orion/ssh/sshTools,orion/links".split(","),function(g,i,h,f,e,d,c,b,a,j,m,p,l,q,r,n,k,o){h.startup().then(function(h){var t=h.serviceRegistry,h=h.preferences;new b.DialogService(t);new a.Selection(t);
new k.SshService(t);var s=new c.CommandService({serviceRegistry:t}),w=new m.OperationsClient(t),D=new e.ProgressService(t,w);new f.StatusReportingService(t,w,"statusPane","notifications","notificationArea");w=new o.TextLinkService({serviceRegistry:t});new n.GitService(t);var v=new j.FileClient(t),F=new p.Searcher({serviceRegistry:t,commandService:s,fileService:v}),x=new q.GitRepositoryExplorer(t,s,w,null,"artifacts","pageNavigationActions","itemLevelCommands");l.generateBanner("orion-repository",
t,s,h,F,x);r.createFileCommands(t,s,x,"pageActions","selectionTools");r.createGitClonesCommands(t,s,x,"pageActions","selectionTools",v);s.addCommandGroup("pageActions","eclipse.gitGroup",100);s.addCommandGroup("pageActions","eclipse.gitGroup",200);s.registerCommandContribution("reposPageActions","eclipse.cloneGitRepository",100,"eclipse.gitGroup",!1,null,new c.URLBinding("cloneGitRepository","url"));s.registerCommandContribution("reposPageActions","eclipse.initGitRepository",200,"eclipse.gitGroup");
s.registerCommandContribution("repoPageActions","eclipse.orion.git.pull",100,"eclipse.gitGroup");s.registerCommandContribution("repoPageActions","eclipse.orion.git.applyPatch",200,"eclipse.gitGroup");s.registerCommandContribution("repoPageActions","eclipse.git.deleteClone",300,"eclipse.gitGroup");s.registerCommandContribution("reposPageActions","eclipse.orion.git.openCommitCommand",1E3,"eclipse.gitGroup",!0,new c.CommandKeyBinding("h",!0,!0),new c.URLBinding("openGitCommit","commitName"));s.registerCommandContribution("repoPageActions",
"eclipse.orion.git.openCommitCommand",1E3,"eclipse.gitGroup",!0,new c.CommandKeyBinding("h",!0,!0),new c.URLBinding("openGitCommit","commitName"));s.registerCommandContribution("itemLevelCommands","eclipse.openCloneContent",100);s.registerCommandContribution("itemLevelCommands","eclipse.openGitStatus",100);s.registerCommandContribution("itemLevelCommands","eclipse.openGitLog",100);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.pull",200);s.registerCommandContribution("itemLevelCommands",
"eclipse.removeBranch",1E3);s.registerCommandContribution("itemLevelCommands","eclipse.checkoutTag",200);s.registerCommandContribution("itemLevelCommands","eclipse.removeTag",1E3);s.registerCommandContribution("itemLevelCommands","eclipse.checkoutBranch",200);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.applyPatch",300);s.registerCommandContribution("itemLevelCommands","eclipse.git.deleteClone",1E3);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.fetch",
500);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.merge",600);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.mergeSquash",700);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.rebase",700);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.resetIndex",800);s.registerCommandContribution("itemLevelCommands","eclipse.removeRemote",1E3);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.deleteConfigEntryCommand",
1E3);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.editConfigEntryCommand",200);s.registerCommandContribution("pageNavigationActions","eclipse.orion.git.previousTagPage",1);s.registerCommandContribution("pageNavigationActions","eclipse.orion.git.nextTagPage",2);t=new c.Command({name:g["View All"],id:"eclipse.orion.git.repositories.viewAllCommand",hrefCallback:function(a){return i.toUrl(a.items.ViewAllLink)},visibleWhen:function(a){this.name=a.ViewAllLabel;this.tooltip=a.ViewAllTooltip;
return a.ViewAllLabel&&a.ViewAllTooltip&&a.ViewAllLink}});s.addCommand(t);s.processURL(window.location.href);D.progress(v.loadWorkspace(),"Loading default workspace").then(function(a){x.setDefaultPath(a.Location);x.redisplay()});var B="";window.addEventListener("hashchange",function(){s.closeParameterCollector();var a=d.matchResourceParameters().resource;B!==a&&(B=a,D.progress(v.loadWorkspace(),"Loading default workspace").then(function(a){x.setDefaultPath(a.Location);x.redisplay()}))},!1)})});