/**
 * @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) 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) 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) 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, 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) 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) 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 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) 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) 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) 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) 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, 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) 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) 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) 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) 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) 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) 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
 * 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) 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) 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
 ******************************************************************************/
/*

 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) 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) 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) 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). 

 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) 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
 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) 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) 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) 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, 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) 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) 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) 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) 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

 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) 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

 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) 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) 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
 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) 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) 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 e(f,d,c,b,a,j){d[f]&&(c.push(f),(d[f]===!0||d[f]===1)&&b.push(a+f+"/"+j))}function i(f,d,c,b,a){d=b+d+"/"+a;require._fileExists(f.toUrl(d))&&c.push(d)}var h=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,g={};define("i18n",{version:"1.0.0",load:function(f,d,c,b){var b=b||{},a=h.exec(f),j=a[1],k=a[4],o=a[5],l=k.split("-"),p=[],n={},m,q,r="";a[5]?(j=a[1],f=j+o):(o=a[4],k=b.locale||(b.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
l=k.split("-"));if(b.isBuild){p.push(f);i(d,"root",p,j,o);for(m=0;q=l[m];m++)r+=(r?"-":"")+q,i(d,r,p,j,o);d(p,function(){c()})}else d([f],function(a){var b=[];e("root",a,b,p,j,o);for(m=0;q=l[m];m++)r+=(r?"-":"")+q,e(r,a,b,p,j,o);d(p,function(){var k,f;for(k=b.length-1;k>-1&&(q=b[k]);k--){f=a[q];if(f===!0||f===1)f=d(j+q+"/"+o);var l=n,e=void 0;for(e in f)!(e in g)&&!(e in l)&&(l[e]=f[e])}c(n)})})}})})();
define("orion/i18n",[],function(){return{load:function(e,i,h,g){var g=g||{},f=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,d=f.exec(e);if(d)if(i.defined(e))h(i(e));else if(g.isBuild||g.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 o=j.serviceRegistry,j=o.getServiceReferences("orion.i18n.message");if(b)j.some(function(a){return e===a.getProperty("name")?(o.getService(a).getMessageBundle().then(function(a){h(a)},function(){h({})}),
!0):!1})||h({});else{var l={},p;j.forEach(function(j){var k=j.getProperty("name");if((d=f.exec(k))&&c===d[1]&&a===(d[3]||d[2]))if(b=d[3]?d[2]:""){if((j=g.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.indexOf(b)===0)l[b]=!0,i.specified(k)||define(k,["orion/i18n!"+k],function(a){return a})}else p=j});i.specified(e)?h(l):p?o.getService(p).getMessageBundle().then(function(a){Object.keys(l).forEach(function(j){typeof a[j]==="undefined"&&(a[j]=l[j])});define(e,
[],a);h(a)},function(){define(e,[],l);h(l)}):(define(e,[],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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
(function(e,i){typeof define==="function"&&define.amd?define("orion/Deferred",[],i):typeof exports==="object"?module.exports=i():(e.orion=e.orion||{},e.orion.Deferred=i())})(this,function(){function e(){for(var j;j=c.shift()||b.shift();)j();a=!1}function i(j,k){(k?b:c).push(j);a||(a=!0,k?setTimeout(e,0):e())}function h(a){return function(){a.apply(null,arguments)}}function g(){}function f(){var a=Error("Cancel");a.name="Cancel";return a}function d(){function a(){for(var j;j=l.shift();){var d=j.deferred,
f=c==="resolved"?"resolve":"reject";if(typeof j[f]==="function")try{var e=j[f](b);e&&typeof e.then==="function"?(d.cancel=e.cancel||g,e.then(h(d.resolve),h(d.reject),d.progress)):d.resolve(e)}catch(p){d.reject(p)}else d[f](b)}}var b,c,l=[],e=this;this.reject=function(d){c||(c="rejected",b=d,l.length&&i(a));return e.promise};this.resolve=function(d){c||(c="resolved",b=d,l.length&&i(a));return e.promise};this.progress=function(a){c||l.forEach(function(j){j.progress&&j.progress(a)});return e.promise};
this.cancel=function(){c||e.reject(f())};this.then=function(b,k,f){var b={resolve:b,reject:k,progress:f,deferred:new d},g=b.deferred,e=this.cancel.bind(this),h=function(){i(function(){(g.cancel===h?e:g.cancel)()},!0)};g.cancel=h;k=g.promise;k.cancel=function(){g.cancel()};l.push(b);c&&i(a,!0);return k};this.promise={then:this.then,cancel:this.cancel}}var c=[],b=[],a=!1;d.all=function(a,b){function c(a,j){h||(e[a]=j,--g===0&&i.resolve(e))}function f(a,j){if(!h){if(b)try{c(a,b(j));return}catch(d){j=
d}i.reject(j)}}var g=a.length,e=[],h=!1,i=new d;i.then(null,function(){h=!0;a.forEach(function(a){a.cancel&&a.cancel()})});g===0?i.resolve(e):a.forEach(function(a,j){a.then(c.bind(null,j),f.bind(null,j))});return i.promise};d.when=function(a,b,c,f){var g;if(!(a&&typeof a.then==="function"))g=new d,g.resolve(a),a=g.promise;return a.then(b,c,f)};return d});
define("orion/EventTarget",[],function(){function e(){this._namedListeners={}}e.prototype={dispatchEvent:function(e){if(!e.type)throw Error("unspecified type");var h=this._namedListeners[e.type];h&&h.forEach(function(g){try{typeof g==="function"?g(e):g.handleEvent(e)}catch(f){typeof console!=="undefined"&&console.log(f)}});return!e.defaultPrevented},addEventListener:function(e,h){if(typeof h==="function"||h.handleEvent)this._namedListeners[e]=this._namedListeners[e]||[],this._namedListeners[e].push(h)},
removeEventListener:function(e,h){var g=this._namedListeners[e];if(g)for(var f=0;f<g.length;f++)if(g[f]===h){g.length===1?delete this._namedListeners[e]:g.splice(f,1);break}}};e.prototype.constructor=e;e.attach=function(i){var h=new e;i.dispatchEvent=h.dispatchEvent.bind(h);i.addEventListener=h.addEventListener.bind(h);i.removeEventListener=h.removeEventListener.bind(h)};return e});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(e,i){function h(b,a,j){this._properties=j||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function g(b,a,j){this._serviceId=b;this._serviceReference=a;this._internalRegistry=j}function f(b,a){function j(j){return function(){var c;try{if(!a())throw Error("Service was unregistered");var k=b[j].apply(b,Array.prototype.slice.call(arguments));if(k&&typeof k.then==="function")return k;
else c=new e,c.resolve(k)}catch(d){c=new e,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;g.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)}};
g.prototype.constructor=g;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(j){a=this._entries[j.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(j){j&&a.push(j.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,o=new h(c,b,j),e=this._namedReferences;b.forEach(function(a){e[a]=e[a]||[];e[a].push(o)});b=new f(a,this._internalRegistry.isRegistered.bind(null,c));this._entries.push({reference:o,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new d("registered",o));return new g(c,o,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(e){function i(e,g,f,d){var c=typeof f.response!=="undefined"?f.response:f.responseText,b;try{b=f.status}catch(a){b=0}e={args:g,response:c,responseText:typeof c==="string"?c:null,status:b,url:e,xhr:f};if(typeof d!=="undefined")e.error=d;return e}return function(h,g,f){var f=f||{},d=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new e,b=f.headers||{},a=f.log||!1,j;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof f.data!=="undefined"&&(h==="POST"||h==="PUT"))j=f.data;if(typeof f.responseType==="string")d.responseType=f.responseType;d.onprogress=function(a){a.xhr=d;c.progress(a)};d.onreadystatechange=function(){if(d.readyState===4){var j=i(g,f,d),b=d.status;200<=b&&b<400?c.resolve(j):(a&&typeof console!=="undefined"&&console.log(Error(d.statusText)),c.reject(j))}};try{d.open(h,g,!0);if(typeof f.timeout==="number")if(typeof d.timeout==="number")d.timeout=f.timeout,d.addEventListener("timeout",function(){c.reject(i(g,
f,d,"Timeout exceeded"))});else{var k=setTimeout(function(){c.reject(i(g,f,d,"Timeout exceeded"))},f.timeout);c.then(clearTimeout.bind(null,k),clearTimeout.bind(null,k))}Object.keys(b).forEach(function(a){d.setRequestHeader(a,b[a])});d.send(j)}catch(o){c.reject(i(g,f,d,o))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(e,i,h){function g(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function f(a,b){return{get:function(c,d){if(b===0)return null;var f=localStorage.getItem(a+c);if(f===null)return null;f=JSON.parse(f);return d||b===-1||f._expires&&f._expires>(new Date).getTime()?(delete f._expires,f):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 f=JSON.stringify(d);localStorage.setItem(a+c,f);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function d(a){this._currentPromises={};this._cache=new f("/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 f("/orion/preferences/default",3600)}function b(){this._cache=new f("/orion/preferences/local",-1)}function a(a,k){this._userProvider=new d(a);this._localProvider=new b;k=k||"defaults.pref";k.indexOf("://")===-1&&(k=e.toUrl(k));this._defaultsProvider=new c(k);this._serviceRegistration=a.registerService("orion.core.preference",this)}g.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 f=this;this._service.get(a).then(function(b){f._cache.set(a,b);delete f._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},f._cache.set(a,b),delete f._currentPromises[a],c.resolve(b)):(delete f._currentPromises[a],c.resolve(f._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 f=this;h("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);f._cache.set(a,b[a]||{});f._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(f._cache.set(a,{}),f._currentPromise=null,c.resolve({})):(f._currentPromise=null,b=f._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 f=new g(b,d);return f.sync().then(function(){return f})},getSetting:function(a,b,c){for(var d,f=0;f<a.length;f++)if(a[f].label===b)for(var g=0;g<a[f].data.length;g++)if(a[f].data[g].label===c){d=a[f].data[g].value;break}return d}};return{PreferencesService:a}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(e,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 f=0,g=c.length;f<g;f++){var e=c[f];if(e!==d[f])return!1;var h=a[e],e=b[e];if(h!==e&&JSON.stringify(h)!==JSON.stringify(e))return!1}return!0}function g(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function f(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 f(a,b,j){if(!B)return(new e).reject(Error("plugin not connected"));var d=I++,g=new e;g.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:d,cancel:a.message||"Cancel"},
B)});J[String(d)]=g;c.postMessage({id:d,serviceId:a,method:b,params:j},B);return g.promise}function g(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return v==="active"?f(a.serviceId,c,b):r.start({"transient":!0}).then(function(){return f(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 p(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 n(a){var b=g(a),j=p(a),j=c.registerService(a.names||a.type,b,j);y[a.serviceId]={registration:j,proxy:b}}function m(){c.persist(a,{created:x,headers:u,services:t,autostart:s,lastModified:w})}
function q(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var j=a.params[0];G({headers:j.headers,services:j.services}).then(function(){D.resolve(r)})}else if("dispatchEvent"===a.method){var d=y[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)D&&D.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 f=c.handleServiceError(r,a.error);b.reject(f)}else b.resolve(a.result)}catch(g){console.log("Plugin._responseHandler "+g)}}var r=this,b=b||{},x=b.created||(new Date).getTime(),u=b.headers||{},t=b.services||[],s=b.autostart,w=b.lastModified||0,v="installed",A,D,B,y={},I=0,J={},G;this._persist=m;this._resolve=function(){v="resolved";c.dispatchEvent(new d("resolved",r))};this._getAutostart=function(){return s};this._getCreated=function(){return x};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(u))};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 w};this.getServiceReferences=function(){var a=[];Object.keys(y).forEach(function(b){a.push(y[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));
if(A)return A.promise.then(this.start.bind(this,b));if(v==="active")return(new e).resolve();if(!b||!b["transient"]){var j=b&&b.lazy?"lazy":"started";j!==s&&(s=j,m())}j=c.getState();if(j!=="starting"&&j!=="active")return b["transient"]?(new e).reject(Error("start transient error")):(new e).resolve();if(v==="installed")try{this._resolve()}catch(f){return(new e).reject(f)}v==="resolved"&&t.forEach(function(a){n(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",c.dispatchEvent(new d("lazy activation",
r))),(new e).resolve();var g=new e;A=g;v="starting";c.dispatchEvent(new d("starting",r));D=new e;B=c.connect(a,q);D.then(function(){D=null;v="active";c.dispatchEvent(new d("started",r));A=null;g.resolve()},function(){D=null;v="stopping";c.dispatchEvent(new d("stopping",r));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});c.disconnect(B);B=null;v="resolved";A=null;c.dispatchEvent(new d("stopped",r));g.reject(Error("plugin activation error"))});return g.promise};this.stop=
function(a){if(v==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(A)return A.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==s)s="stopped",m();if(v!=="active"&&v!=="starting")return(new e).resolve();A=a=new e;v="stopping";c.dispatchEvent(new d("stopping",r));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});B&&(c.disconnect(B),B=null);v="resolved";A=null;c.dispatchEvent(new d("stopped",r));a.resolve();return a.promise};
G=function(b){if(v==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(!b)return w===0&&(w=(new Date).getTime(),m()),c.loadManifest(a).then(G);var j=u,f=t,g=s;u=b.headers||{};t=b.services||{};s=b.autostart||s;b.lastModified?w=b.lastModified:(w=(new Date).getTime(),m());if(h(u,j)&&h(t,f)&&s===g)return(new e).resolve();if(v==="active"||v==="starting"){var o=[];Object.keys(t).forEach(function(a){var b=t[a];o.push(a);var c=y[a];if(c){if(h(b.methods,Object.keys(c.proxy))){var a=p(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 y[a]}n(b)});Object.keys(y).forEach(function(a){o.indexOf(a)===-1&&(y[a].registration.unregister(),delete y[a])})}v==="active"&&(c.disconnect(B),D=new e,B=c.connect(a,q),D.then(function(){D=null},function(){D=null;v="stopping";c.dispatchEvent(new d("stopping"),r);Object.keys(y).forEach(function(a){y[a].registration.unregister();
delete y[a]});c.disconnect(B);B=null;v="resolved";c.dispatchEvent(new d("stopped",r))}));return(new e).resolve()};this.update=function(a){return G(a).then(function(){c.dispatchEvent(new d("updated",r))})};this.uninstall=function(){if(v==="uninstalled")return(new e).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",
r));return(new e).resolve()}}var b=/^http[s]?/i;return{Plugin:c,PluginRegistry:function(a,j){function k(a){var b=a.source;n.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||{},o=j.storage||localStorage;o.getItem||(o=f(o));var l="installed",h=[],n=[],m=new i,q={},r={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 f={handler:b,url:a},k=setTimeout(d.bind(null,"Load timeout for: "+a),c||15E3),g=document.createElement("iframe");g.name=a+"_"+(new Date).getTime();if(!j.visible)g.style.display="none",g.style.visibility="hidden";g.src=a;g.onload=function(){clearTimeout(k);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};g.sandbox="allow-scripts allow-same-origin";document.body.appendChild(g);f.target=g.contentWindow;f.close=function(){g&&
(document.body.removeChild(g),g=null)};n.push(f);return f},disconnect:function(a){for(var b=0;b<n.length;b++)if(a===n[b]){n.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<h.length;b++)if(a===h[b]){h.splice(b,1);break}o.removeItem("plugin."+a.getLocation())},persist:function(a,b){o.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{m.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new e,c=r.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],r.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(r.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return l},handleServiceError:function(a,c){if(c&&c.status===401){var j=a.getHeaders(),d=a.getName()||a.getLocation(),f=document.createElement("span");f.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(j.login)f.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=j.login,b.test(d.href)?(f.appendChild(d),f.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+j.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(f)}}if(c.__isError){var k=c,c=Error(k.message);Object.keys(k).forEach(function(a){c[a]=k[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=r.getState;this.init=function(){if(!(l==="starting"||l==="active"||l==="stopping")){addEventListener("message",k,!1);for(var a=[],b=0,d=o.length;b<d;b++)a.push(o.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(o.getItem(a));a.created&&h.push(new c(b,a,r))}});
h.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=g(a);if(!this.getPlugin(a)){var b=j.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||j.defaultAutostart||"lazy";h.push(new c(a,b,r))}}.bind(this));l="starting"}};this.start=function(){l!=="starting"&&this.init();if(l!=="starting")return(new e).reject("Cannot start framework. Framework is already "+l+".");var a=[],b=(new Date).getTime();h.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 e.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){l="active"})};this.stop=function(){if(l!=="starting"&&l!=="active")return(new e).reject("Cannot stop registry. Registry is already "+
l+".");l="stopping";var a=[];h.forEach(function(b){a.push(b.stop({"transient":!0}))});return e.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",k);l="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new e).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=g(a),j=this.getPlugin(a);if(j)return(new e).resolve(j);if(q[a])return q[a];if(b)return j=new c(a,b,r),h.push(j),
j._persist(),r.dispatchEvent(new d("installed",j)),(new e).resolve(j);var f=r.loadManifest(a).then(function(b){j=new c(a,b,r);h.push(j);j._persist();delete q[a];r.dispatchEvent(new d("installed",j));return j},function(b){delete q[a];throw b;});return q[a]=f};this.getPlugins=function(){return h.slice()};this.getPlugin=function(a){var b=null,a=g(a);h.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=m.addEventListener.bind(m);this.removeEventListener=m.removeEventListener.bind(m);
this.resolvePlugins=function(){var a=!0;h.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function e(g,f){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=g;var b={},a={},j=i,k,e;this.close=function(){if(j!==h)throw"Already closed";j=i;g.removeEventListener("registered",k);g.removeEventListener("unregistering",e);e=k=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;k=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(f)!==-1&&(d.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};e=function(b){b.serviceReference.getProperty("objectClass").indexOf(f)!==
-1&&c.call(a,b.serviceReference)};g.addEventListener("registered",k);g.addEventListener("unregistering",e);g.getServiceReferences(f).forEach(function(b){d.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,h=1;e.prototype={addingService:function(g){return this.serviceRegistry.getService(g)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return e});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(e,i){var h,g,f,d,c,b="pid";h=function(a,c,d){function f(a,b,j){b.forEach(function(d,f){try{var g=a[f].getProperty("__plugin__"),e=g&&c.getPlugin(g);(!g||e&&e.getState()==="active")&&b[f].updated(j)}catch(o){typeof console!=="undefined"&&console.log(o)}})}i.call(this,a,"orion.cm.managedservice");var g={},h={},m=function(c){var f=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var k=c.getProperty(b),c=a.getService(c);k&&c&&(k=(k=d._find(k))&&k.getProperties(),f.push(c.updated(k)))}});return e.all(f)};this.addingService=function(c){var d=c.getProperty(b),f=a.getService(c);if(!d||!f)return null;g[d]||(g[d]=[]);h[d]||(h[d]=[]);g[d].push(c);h[d].push(f);return f};this.onServiceAdded=function(a,c){var j=a.getProperty(b),j=d._find(j);f([a],[c],j&&j.getProperties())};this.onOpen=function(){c.addEventListener("started",m)};this.onClose=function(){c.removeEventListener("started",
m)};this.notifyUpdated=function(a){var b=a.getPid();f(g[b]||[],h[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();f(g[a]||[],h[a]||[],null)};this.removedService=function(a,c){var j=a.getProperty(b),d=g[j],f=h[j];d.length>1?d.splice(d.indexOf(a),1):delete g[j];f.length>1?f.splice(f.indexOf(c),1):delete h[j]}};g=function(){function a(b,c,j){this.store=new f(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";
f=function(){function j(j,d){this.factory=j;this.prefsService=d;this.configs=Object.create(null);this.pref=null;var f=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){f.pref=a;a.keys().forEach(function(j){if(!f.configs[j]){var d=a.get(j);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[b]=j,f.configs[j]=new c(f.factory,f,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 f=j[d],g=b[f];c[f]=g instanceof Array?g.slice():g}return c}function c(d,f,g){this.factory=
d;this.store=f;if(g!==null&&typeof g==="object")this.pid=g[b],d=a(g),delete d[b],this.properties=d;else if(typeof g==="string")this.pid=g,this.properties=null;else throw Error("Invalid pid/properties "+g);}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:g}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(e,i,h,g,f,d){var c;return{startup:function(){if(c)return c;c=new i;var b=window.serviceRegistry=new h.ServiceRegistry,a=new g.PreferencesService(b);return a.getPreferences("/plugins").then(function(j){var g={plugins:{}};j.keys().forEach(function(a){var b=e.toUrl(a);g.plugins[b]=j[a]});var h=window.pluginRegistry=new f.PluginRegistry(b,g);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=e.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 e(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 g(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=g(b.childNodes[a]);if(c)return c}return null}function f(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++)f(b.childNodes[c],a)}var d=/\$\{([^\}]+)\}/,c=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:e,$$array:function(b,a){return Array.prototype.slice.call(e(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:g,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:f,addAutoDismiss:function(b,a){c.length===0&&document.addEventListener("click",function(a){for(var b=[],d=0;d<c.length;d++){for(var f=c[d].excludeNodes,g=c[d].dismiss,e=!1,h=!0,q=0;q<
f.length;q++)if((e=document.compareDocumentPosition(document,f[q])!==1)&&i(f[q],a.target)){h=!1;break}h&&(g(),e=document.compareDocumentPosition(document,f[q])!==1);e&&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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(e,i){function h(g){this._init(g)}h.prototype={_init:function(g){this._node=i.node(g.node);if(!this._node)throw"no dom node for tooltip found";this._position=g.position||["right","above","below","left"];this._text=g.text;this._hideDelay=g.hideDelay===void 0?200:g.hideDelay;this._tailSize=g.tailSize||10;this._trigger=g.trigger||"mouseover";this._afterShowing=g.afterShowing;this._afterHiding=g.afterHiding;var f=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===f._node&&(f.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=g.showDelay===void 0?1E3:g.showDelay;g=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(f._node,c.target)&&(f.show(),i.stop(c))},!1);for(var d=0;d<g.length;d++)this._node.addEventListener(g[d],function(c){i.contains(f._node,c.target)&&f.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 g=this;i.addAutoDismiss([this._tip,this._node],function(){g.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(g._timeout)window.clearTimeout(g._timeout),g._timeout=null;g._tip.addEventListener("mouseout",function(f){i.contains(g._tip,f.target)&&(g.hide(),i.stop(f))},!1)},!1)}return this._tip},_positionTip:function(g,f){this._makeTipNode();if(this._tailBorder)this._tip.removeChild(this._tailBorder),this._tailBorder=null,this._tip.removeChild(this._tail),this._tail=null;g==="left"?this._tipInner.classList.add("left"):
this._tipInner.classList.remove("left");var d=i.bounds(this._node),c=i.bounds(this._tipInner),b;switch(g){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(f)b=a.height-c.height-1;else return!1;
if(d+c.width>a.width)if(f)d=a.width-c.width-1;else return!1;if(d<0)if(f)d=4;else return!1;if(b<0)if(f)b=4;else return!1;this._tailBorder=document.createElement("span");this._tailBorder.classList.add("tooltipTailBorderFrom"+g);this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+g);g==="above"||g==="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 g=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var f=!1,d=0;!f&&d<g._position.length;)f=g._positionTip(g._position[d]),
d++;f||g._positionTip(g._position[0],!0);g._tip.classList.add("tooltipShowing");g._afterShowing&&g._afterShowing()},this._showDelay)}},hide:function(g){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(g===void 0)g=this._hideDelay;var f=this;this._timeout=window.setTimeout(function(){f._tip.classList.remove("tooltipShowing");f._afterHiding&&f._afterHiding()},g)}},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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(e,i,h,g){function f(){}f.prototype={_initialize:function(d,c,b,a,j){this._tooltip=new g.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,e);this.$parent.appendChild(d);var f=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===h.KEY.ESCAPE&&f.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()}};f.prototype.constructor=f;return{PopupDialog:f}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(e,i){function h(g){var f=window.navigator.platform.indexOf("Mac")!==-1;return f&&g.metaKey||!f&&g.ctrlKey}return{getUserKeyString:function(g){var f="",d=navigator.platform.indexOf("Mac")!==-1;g.mod1&&(f+=d?"Cmd+":"Ctrl+");g.mod2&&(f+="Shift+");g.mod3&&(f+="Alt+");g.mod4&&d&&(f+="Ctrl+");if(g.alphaKey)return f+g.alphaKey;for(var c in i.KEY)if(typeof(i.KEY[c]==="number")&&i.KEY[c]===g.keyCode)return f+c;var b;switch(g.keyCode){case 59:b=
g.mod2?":":";";break;case 61:b=g.mod2?"+":"=";break;case 188:b=g.mod2?"<":",";break;case 190:b=g.mod2?">":".";break;case 191:b=g.mod2?"?":"/";break;case 192:b=g.mod2?"~":"`";break;case 219:b=g.mod2?"{":"[";break;case 220:b=g.mod2?"|":"\\";break;case 221:b=g.mod2?"}":"]";break;case 222:b=g.mod2?'"':"'"}return b?f+b:g.keyCode>=112&&g.keyCode<=123?f+"F"+(g.keyCode-111):f+String.fromCharCode(g.keyCode)},getUserText:function(g,f,d,c,b,a,j,k,e){var h=!1,j=function(j){return function(k){if(!h){var p=i.node(g),
r=p.value;if(p)if(j&&k.keyCode===i.KEY.ESCAPE){if(d)f.style.display="inline";p.parentNode.removeChild(p);h=!0;a&&a()}else if(!(j&&k.keyCode!==i.KEY.ENTER)){if(r.length===0||!e&&r===c){if(d)f.style.display="inline"}else b(r);h=!0;p.parentNode&&p.parentNode.removeChild(p);a&&a()}}}},p=document.createElement("input");p.id=g;p.value=c||"";f.parentNode.insertBefore(p,f.nextSibling);p.classList.add("userEditBoxPrompt");if(d)f.style.display="none";p.addEventListener("keydown",j(!0),!1);p.addEventListener("blur",
j(!1),!1);window.setTimeout(function(){p.focus();if(c){var a=i.node(g),b=k?c.indexOf(k):-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(g,f){f&&h(f)?window.open(g):window.location=g},createButton:function(g,f){var d=document.createElement("span");
d.role="button";d.tabIndex=0;d.appendChild(document.createTextNode(g));d.className="commandButton commandMargins";d.addEventListener("click",function(c){f();i.stop(c)},!1);d.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)f(),i.stop(c)},!1);return d}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(e,i){function h(g){this._init(g)}h.prototype={_init:function(g){this._dropdownNode=i.node(g.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=g.populate;var f=this;this._triggerNode.addEventListener("click",function(d){f.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)f.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 g=this.getItems();if(g.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");g[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var g=i.bounds(this._dropdownNode),f=i.bounds(this._boundingNode(this._triggerNode));if(g.left+g.width>f.left+f.width)this._dropdownNode.style.right=0},_boundingNode:function(g){return g.style.right!==""||
g.style.position==="absolute"||!g.parentNode||!g.parentNode.style?g:this._boundingNode(g.parentNode)},close:function(g){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");g&&this._triggerNode.focus();return!0},getItems:function(){var g=[],f=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(d){d.parentNode.parentNode===f._dropdownNode&&g.push(d)});return g},empty:function(){var g=this;
i.$$array("li",this._dropdownNode).forEach(function(f){f.parentNode===g._dropdownNode&&f.parentNode.removeChild(f)})},_dropdownKeyDown:function(g){if(g.keyCode===i.KEY.UP||g.keyCode===i.KEY.DOWN||g.keyCode===i.KEY.RIGHT||g.keyCode===i.KEY.ENTER||g.keyCode===i.KEY.LEFT){var f=this.getItems(),d=document.activeElement;if(f.length&&f.length>0&&d){var c=f.indexOf(d);c>=0&&(g.keyCode===i.KEY.UP&&c>0?(c--,f[c].focus()):g.keyCode===i.KEY.DOWN&&c<f.length-1?(c++,f[c].focus()):g.keyCode===i.KEY.ENTER||g.keyCode===
i.KEY.RIGHT?d.classList.contains("dropdownTrigger")&&d.dropdown&&d.dropdown.open():g.keyCode===i.KEY.LEFT&&d.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(g))}}else g.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(g))}};h.prototype.constructor=h;return{Dropdown:h}});
define("orion/explorers/navigationUtils",[],function(){function e(e,g){if(!i&&e)e.push({domNode:g}),g.tabIndex=-1,g.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(h,g,f){h&&(h=h.getGridNavHolder(g,!0))&&e(h,f)},generateNavGrid:e,removeNavGrid:function(e,g){if(e)for(var f=0;f<e.length;f++)if(e[f].domNode===g){e.splice(f,1);break}}}});
define("orion/dialogs",[],function(){function e(e){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.dialog",this)}e.prototype={confirm:function(e,h){h(window.confirm(e))},openFiles:function(){}};e.prototype.constructor=e;return{DialogService:e}});
define("orion/selection",["orion/EventTarget"],function(e){function i(h,g){g||(g="orion.page.selection");this._serviceRegistry=h;e.attach(this);this._serviceRegistration=h.registerService(g,this);this._selections=null}i.prototype={getSelection:function(e){e(this._getSingleSelection())},getSelections:function(e){e(this._selections||[])},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(e){var g=this._selections;this._selections=
Array.isArray(e)?e.length>0?e:null:e?[e]:null;g!==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(e,i){function h(f){if(f=localStorage.getItem("orion/messageBundle/"+f))if(f=JSON.parse(f),f._expires&&f._expires>(new Date).getTime())return delete f._expires,f;return null}var g={};return{getMessageBundle:function(f){function d(){e(["i18n!"+f],function(a){if(a){var b=f;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(g[f])return g[f];var c=new i;g[f]=
c;var b=h(f);if(b)return c.resolve(b),c;try{e([f],d)}catch(a){e(["orion/i18n!"+f],d)}return c},formatMessage:function(f){var d=arguments;return f.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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(e,i,h){function g(c,b,a){if(!c[b])throw b+e[" is not supported in this file system"];return c[b].apply(c,a)}function f(c,b,a,j){if(!c.readBlob)throw e["source file service does not support binary read"];if(!a.writeBlob)throw e["target file service does not support binary write"];if(b[b.length-1]!=="/")return g(c,"readBlob",[b]).then(function(b){return g(a,"writeBlob",[j,b])});var d=j.substring(0,
j.length-1),h=decodeURIComponent(d.substring(d.lastIndexOf("/")+1)),d=d.substring(0,d.lastIndexOf("/")+1);return g(a,"createFolder",[d,h]).then(function(){},function(){}).then(function(){return g(c,"fetchChildren",[b]).then(function(b){for(var d=[],g=0;g<b.length;++g){var k=b[g].Location,e=k;b[g].Directory&&(e=k.substring(0,k.length-1));e=decodeURIComponent(e.substring(e.lastIndexOf("/")+1));e=j+encodeURIComponent(e);b[g].Directory&&(e+="/");d[g]=f(c,k,a,e)}return i.all(d)})})}function d(c,b){function a(a){var b=
new i;b.reject(e["No Matching FileService for location:"]+a);return b}var j=c.getServiceReferences("orion.core.file"),d=j;if(b)for(var d=[],f=0;f<j.length;++f)b(j[f])&&d.push(j[f]);for(var g=[],p=[],n=[],m=[],q={fetchChildren:function(){var a=new i;a.resolve(m);return a},createWorkspace:function(){var a=new i;a.reject(e["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(e["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:e["File Servers"],Location:"/",Children:m,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},j=0;j<d.length;++j)m[j]={Directory:!0,Length:0,LocalTimeStamp:0,Location:d[j].getProperty("top"),ChildrenLocation:d[j].getProperty("top"),Name:d[j].getProperty("Name")},f=d[j].getProperty("pattern")||".*",f[0]!=="^"&&(f="^"+f),g[j]=RegExp(f),p[j]=c.getService(d[j]),n[j]=d[j].getProperty("Name"),
d[j].getProperty("NameKey")&&d[j].getProperty("nls")&&h.getMessageBundle(d[j].getProperty("nls")).then(function(a,b){m[a].Name=b[d[a].getProperty("NameKey")];n[a]=b[d[a].getProperty("NameKey")]}.bind(this,j));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return p[0]?0:-1;for(var b=0;b<g.length;++b)if(g[b].test(a))return b;throw e["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?q:p[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?q.Name:n[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?q.Location:m[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 g(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return g(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return g(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return g(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,j){return g(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return g(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return g(this._getService(c),"createFile",arguments)},deleteFile:function(c){return g(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var j=this._getService(c),d=this._getService(b);if(j===d)return g(j,"moveFile",arguments);var e=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var i=c;e&&(i=i.substring(0,i.length-1));h+=i.substring(i.lastIndexOf("/")+1)}e&&h[h.length-1]!=="/"&&(h+="/");return f(j,c,d,h).then(function(){return g(j,"deleteFile",[c])})},copyFile:function(c,b,a){var j=this._getService(c),d=this._getService(b);if(j===d)return g(j,"copyFile",arguments);
var e=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var i=c;e&&(i=i.substring(0,i.length-1));h+=i.substring(i.lastIndexOf("/")+1)}e&&h[h.length-1]!=="/"&&(h+="/");return f(j,c,d,h)},read:function(c,b){return g(this._getService(c),"read",arguments)},write:function(c,b,a){return g(this._getService(c),"write",arguments)},remoteImport:function(c,b){return g(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return g(this._getService(c),
"remoteExport",arguments)},search:function(c){return g(this._getService(c.resource),"search",arguments)}};d.prototype.constructor=d;return{FileClient:d}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(e,i){function h(c,b,a){return c[b].apply(c,a)}function g(c){this._location=c}function f(){var c=new i;c.reject(e["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 j=c.getService(b[a]);this._services[a]=j;j=b[a].getProperty("pattern")||".*";j[0]!=="^"&&(j="^"+j);this._patterns[a]=RegExp(j)}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 g(a)}}g.prototype={getOperation:f,getOperations:f,removeCompletedOperations:f,removeOperation:f,cancelOperation:f};g.prototype.constructor=g;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 j=this._patterns[a],d=new i;c[a]=d.promise;h(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var d=b.keys(),f=0;f<d.length;f++){var g=d[f];j.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(d),function(a){return function(b){a.reject(b)}}(d))}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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/editor/regex",[],function(){return{escape:function(e){return e.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(e){return(e=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(e))?{pattern:e[1],flags:e[2]}:null}}});
define("orion/URITemplate",[],function(){function e(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=[],f=0;f<a.length;f++)typeof a[f]!=="undefined"&&
d.push(i(a[f],b));return d.join(c)}function g(a,b,c,d){for(var f=Object.keys(a),g=[],e=0;e<f.length;e++)typeof a[f[e]]!=="undefined"&&g.push(i(f[e],b)+c+i(a[f[e]],b));return g.join(d)}function f(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 j=[],d=a.split(","),f=0;f<d.length;f++){var g=d[f].match(b);if(g===null)throw Error("Bad VarSpec: "+a);j.push({name:g[1],explode:!!g[2],prefix:g[3]?parseInt(g[3],
10):-1})}this._varSpecList=j}function d(a){for(var b=[],c=0,d=a.indexOf("{",c);d!==-1;){b.push(new e(a.substring(c,d)));c=a.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new f(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new e(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]+))?$/;e.prototype={expand:function(){return encodeURI(this._text)}};f.prototype={expand:function(a){for(var b=[],c=
0;c<this._varSpecList.length;c++){var d=this._varSpecList[c],f=d.name,e=a[f],n=typeof e;if(n!=="undefined"&&e!==null){var m=b.length===0?this._operator.first:this._operator.sep;if(n==="string")this._operator.named&&(m+=i(f,"U+R"),m+=e.length===0?this._operator.ifemp:"="),d.prefix!==-1&&d.prefix<e.length&&(e=e.substring(0,d.prefix)),m+=i(e,this._operator.allow);else if(Array.isArray(e))d.explode?m+=h(e,this._operator.allow,this._operator.sep):(this._operator.named&&(m+=i(f,"U+R"),m+=e.length===0?this._operator.ifemp:
"="),m+=h(e,this._operator.allow,","));else if(n==="object")d.explode?m+=g(e,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(m+=i(f,"U+R"),m+=Object.keys(e).length===0?this._operator.ifemp:"="),m+=g(e,this._operator.allow,",",","));else throw Error("bad param type: "+f+" : "+n);b.push(m)}}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/contentTypes",[],function(){function e(d,c){function b(a,b,c,d){var c=b.filename.indexOf(c)>=0,j=b.extension.indexOf(d)>=0;if(c||j)if(!a||c&&a.extension.indexOf(d)>=0)return b;return a}for(var a=d&&d.split(".").pop(),j=null,f=0;f<c.length;f++){var g=c[f];b(j,g,d,a)===g&&(j=g)}return j}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(g).concat(c.getServiceReferences(f)),
a={},d=0;d<c.length;d++)for(var e=b(c[d].getProperty("contentTypes")),h=0;h<e.length;h++){var l=e[h];a[l.id]||(a[l.id]={id:l.id,name:l.name,image:l.image,"extends":l["extends"],extension:b(l.extension),filename:b(l.filename)})}return a}(d);d.registerService(h,this)}var h="orion.core.contenttypes",g="orion.core.contenttype",f="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 e(d.Name,this.getContentTypes())},getFilenameContentType:function(d){return e(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:e}});
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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(e,i,h){function g(f,d){this._activeContainer=null;this._getElementsFunction=f;this._toolbarLayoutFunction=d}g.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(f,d,c){typeof f==="string"&&(f=h.node(f));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===f)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(f))&&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;f=h.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(f.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;f=document.createElement("span");f.id="closebox";f.role="button";f.tabIndex=0;f.classList.add("imageSprite");f.classList.add("core-sprite-close");f.classList.add("dismiss");f.title=e.Close;d.appendChild(f);var a=this;f.addEventListener("click",function(){a.close()},!1);f.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(f,d){h.$$array("input",d).forEach(function(c){c.type==="checkbox"?f.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&f.parameters.setValue(c.parameterName,c.value.trim())});h.$$array("textArea",d).forEach(function(c){f.parameters.setValue(c.parameterName,
c.value.trim())});f.command.callback&&f.command.callback.call(f.handler,f)},collectParameters:function(f){return f.parameters?(f.domNode&&f.domNode.classList.add("commandMarker"),this.open(f.domNode||f.domParent,this.getFillFunction(f))):!1},getFillFunction:function(f,d){var c=this;return function(b,a){var j=null,g=function(){d&&d();c.close()},o=function(a){a.keyCode===h.KEY.ENTER&&c._collectAndCall(f,b);if(a.keyCode===h.KEY.ESCAPE||a.keyCode===h.KEY.ENTER)g(),h.stop(a)};f.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",f=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,f.appendChild(c),o=function(a){a.keyCode===h.KEY.ESCAPE&&(g(),h.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",
c.id=d,f.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,f.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;j||(j=c);c.addEventListener("keydown",o,!1)});var l=a;if(!l)l=document.createElement("span"),l.className="layoutRight parametersDismiss",b.appendChild(l);var i=function(a){a._collectAndCall(f,
b);g()},n=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(f.parameters.hasOptionalParameters()){f.parameters.optionsRequested=!1;var m=n(e.More,l);m.addEventListener("click",function(){f.parameters.optionsRequested=!0;i(c)},!1);m.addEventListener("keydown",function(a){if(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)f.parameters.optionsRequested=!0,i(c)},!1)}m=n(e.Submit,
l);m.addEventListener("click",function(){i(c)},!1);m.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&i(c)},!1);l=n(null,l);l.id="closebox";l.classList.add("imageSprite");l.classList.add("core-sprite-close");l.title=e.Close;l.addEventListener("click",function(){g()},!1);l.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&g()},!1);return j}}};g.prototype.constructor=g;return{CommandParameterCollector:g}});
(function(){function e(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 g(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function f(a,b){var c="",d=[],j=0;return{next:function(){if(c!==a.search)c=a.search,d=e(c);if(j<d.length){var f=h(d[j++]);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 o;}}}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 j=document.implementation.createHTMLDocument("");
if(d){var f=j.createElement("a");f.href=d;if(f.protocol.length<2||!f.host)throw Error("InvalidStateError");var g=j.createElement("base");g.href=f.href;j.head.appendChild(g)}var e=j.createElement("a");e.href=a;j.body.appendChild(e);Object.defineProperty(this,"_urlAnchor",{value:e});var k=new b(e);Object.defineProperty(this,"query",{get:function(){return c(e)?k: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 k=
/([^:]*):?(.*)/,o=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(b.prototype,{get:{value:function(a){d(a);var b;e(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=e(this._anchor.search);c.some(function(d,j){var f=h(d);if(f[0]===a)return f[1]=b,c[j]=g(f),!0})||c.push(g([a,b]));this._anchor.search=i(c)},enumerable:!0},has:{value:function(a){d(a);return e(this._anchor.search).some(function(b){if(h(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){d(a);var b=e(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=f(this._anchor,"keys+values");try{for(;;){var d=c.next();a.call(b,d[1],d[0],this)}}catch(j){if(j!==o)throw j;}},enumerable:!0},keys:{value:function(){return f(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return f(this._anchor,"values")},enumerable:!0},items:{value:function(){return f(this._anchor,"keys+values")}},size:{get:function(){return e(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){d(a);var b=[];e(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=e(this._anchor.search);c.push(g([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=k.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){d(a);var b=k.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=k.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){d(a);var b=[k.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/editor/util",[],function(){var e=navigator.userAgent,i=parseFloat(e.split("MSIE")[1])||void 0,h=parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||void 0,g=e.indexOf("Opera")!==-1,f=parseFloat(e.split("Chrome/")[1])||void 0,d=e.indexOf("Safari")!==-1&&!f,c=parseFloat(e.split("WebKit/")[1])||void 0,b=e.indexOf("Android")!==-1,a=e.indexOf("iPad")!==-1,e=e.indexOf("iPhone")!==-1,j=a||e,k=navigator.platform.indexOf("Mac")!==-1,o=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:g,isChrome:f,isSafari:d,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:e,isIOS:j,isMac:k,isWindows:o,isLinux:l,platformDelimiter:o?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(e){function i(e,g,f,d,c){this.keyCode=typeof e==="string"?e.toUpperCase().charCodeAt(0):e;this.mod1=g!==void 0&&g!==null?g:!1;this.mod2=f!==void 0&&f!==null?f:!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!==(e.isMac?h.metaKey:h.ctrlKey)?!1:this.mod2!==h.shiftKey?!1:this.mod3!==h.altKey?!1:e.isMac&&this.mod4!==h.ctrlKey?!1:!0:!1},equals:function(e){return!e?
!1:this.keyCode!==e.keyCode?!1:this.mod1!==e.mod1?!1:this.mod2!==e.mod2?!1:this.mod3!==e.mod3?!1:this.mod4!==e.mod4?!1:!0}};return{KeyBinding:i}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(e,i){function h(g){this._init(g)}h.prototype={_init:function(g){var f=i.node(g.container);if(!f)throw"no parent container";this._container=f;f.classList.remove("currentLocation");this._id=g.id||"eclipse.breadcrumbs";this._resource=g.resource||null;this._rootSegmentName=g.rootSegmentName;this._workspaceRootSegmentName=g.workspaceRootSegmentName;this._makeHref=g.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var g;
this._resource&&this._resource.Parents?(g=document.createElement("a"),this._makeHref?this._makeHref(g,""):g.href=e.toUrl("navigate/table.html")+"#"):g=document.createElement("span");i.empty(g);g.appendChild(document.createTextNode(this._workspaceRootSegmentName));return g}return null},render:function(){var g=this._container,f=i.node(this._id);f?i.empty(f):(f=document.createElement("span"),f.id=this._id,g.appendChild(f));var d;if(d=this.getNavigatorWorkspaceRootSegment())if(d.classList.add("breadcrumb"),
f.appendChild(d),this._resource&&this._resource.Parents)d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),f.appendChild(d);else{d.href="";d.classList.remove("breadcrumb");d.classList.add("currentLocation");return}g=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"),g?(d.appendChild(document.createTextNode(g)),
g=null):d.appendChild(document.createTextNode(c[b].Name)),this.path+=c[b].Name,this._makeHref?this._makeHref(d,c[b].Location):d.href=e.toUrl("navigate/table.html")+"#"+c[b].ChildrenLocation,f.appendChild(d),d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),f.appendChild(d);d=document.createElement("span");g?(d.appendChild(document.createTextNode(g)),g=null):d.appendChild(document.createTextNode(this._resource.Name));
d.classList.add("currentLocation");this.path+=this._resource.Name;f.appendChild(d)}f.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(g||document.title)),d.classList.add("breadcrumb"),d.classList.add("currentLocation"),f.appendChild(d))}};h.prototype.constructor=h;return{BreadCrumbs:h}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(e,i){function h(g){this._init(g)}h.prototype={_init:function(g){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(g.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(g.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(g.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=g.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(g.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(g){this._resizeListeners.push(g)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var g;if(this._vertical){if(g=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=
parseInt(g,10)}else if(g=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(g,10)},_adjustToSplitPosition:function(g){var f=i.bounds(this.$node),d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=f.height;if(g||!this._splitTop)this._splitTop=f.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);g=this._splitTop;this.$node.parentNode.style.position==="relative"&&(g=this._splitTop-d.top);this.$sideNode.style.height=g+"px";this.$sideNode.style.bottom=
g-1+"px";this.$sideNode.style.display="block";this.$node.style.top=g+"px"}else{this._splitWidth=f.width;if(g||!this._splitLeft)this._splitLeft=f.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);g=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(g=this._splitLeft-d.left);this.$sideNode.style.width=g+"px";this.$sideNode.style.right=g-1+"px";this.$sideNode.style.display="block";this.$node.style.left=g+"px"}this._resize()},_resize:function(g){var g=g||0,f=i.bounds(this.$node.parentNode),
d=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=f.height-(d.top-f.top+d.height)+"px":this.$mainNode.style.width=f.width-(d.left-f.left+d.width)+"px";var c=this;window.setTimeout(function(){c._notifyResizeListeners(c.$mainNode)},g);window.setTimeout(function(){c._notifyResizeListeners(c.$sideNode)},g)},_notifyResizeListeners:function(g){for(var f=0;f<this._resizeListeners.length;f++)this._resizeListeners[f](g)},_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 g=this;window.setTimeout(function(){g.$sideNode.classList.remove("sidePanelLayoutAnimation");g.$mainNode.classList.remove("mainPanelLayoutAnimation");g.$node.classList.remove("splitLayoutAnimation");g._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(g){if(g.target===this._thumb)return i.stop(g),this._thumbDown(g);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(g)},_mouseMove:function(g){if(this._tracking){var f;this._vertical?(f=this._splitTop=g.clientY,this.$node.parentNode.style.position===
"relative"&&(f=i.bounds(this.$node.parentNode),f=this._splitTop-f.top),this.$node.style.top=f+"px"):(f=this._splitLeft=g.clientX,this.$node.parentNode.style.position==="relative"&&(f=i.bounds(this.$node.parentNode),f=this._splitLeft-f.left),this.$node.style.left=f+"px");this._adjustToSplitPosition(!0);i.stop(g)}},_mouseUp:function(g){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(g)}};h.prototype.constructor=h;return{Splitter:h}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(e){if(!e)return e;var i=window.location.protocol+"//"+window.location.host;return e.indexOf(i)===0?e.substring(i.length):e},isAtRoot:function(e){return this.makeRelative(e).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(e,i,h){function g(f){this._favorites=[];h.attach(this);this._init(f);this._initializeFavorites()}g.prototype={_init:function(f){this._registry=f.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(f){for(var f=Array.isArray(f)?
f:[f],d=0;d<f.length;d++){var c=f[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(f){this.addFavorite(f,f,!1,!0)},addFavorite:function(f,d,c){this._favorites.push({name:f,path:d,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(f){for(var d in this._favorites)if(this._favorites[d].path===
f){this._favorites.splice(d,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(f,d){var c=!1,b;for(b in this._favorites)if(this._favorites[b].path===f){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(f){for(var d in this._favorites)if(this._favorites[d].path===f)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(f){var d;
if(!f)return this._favorites;var c="";for(d=0;d<f.length;d++){var b=f.charAt(d);c+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}c+=".*";f=RegExp(c);c=[];for(d in this._favorites)this._favorites[d].name.search(f)===0&&c.push(this._favorites[d]);return c},_initializeFavorites:function(){var f=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,f._favorites.push(d[c]);f._favorites.sort(f._sorter);f._notifyListeners()})},_storeFavorites:function(){var f=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){d.put("navigate",f)})},_sorter:function(f,d){var c=f.name.toLowerCase(),b=d.name.toLowerCase();return c>b?1:c<b?-1:0},getFavorites:function(){return{navigator:this._favorites}}};g.prototype.constructor=g;return{FavoritesService:g}});
define("orion/widgets/themes/ThemeClass",[],function(){function e(e){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=e;this.classString="."+e+"{ "}e.prototype.className=null;e.prototype.classString=void 0;e.prototype.style=void 0;e.prototype.closeString=" }\n";e.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:e}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(e){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="",g=[],f=new e.ThemeClass("orionPage");
f.style.backgroundColor="#fdfdfd";f.style.width="100%";f.style.height="100%";g.push(f);f=new e.ThemeClass("topRowBanner");f.style.margin="0";f.style.border="0";f.style.backgroundColor=this.navbar;f.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";f.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";f.style.height="28px";g.push(f);f=new e.ThemeClass("a");f.style.textDecoration="none";
f.style.color=this.content;g.push(f);f=new e.ThemeClass("navlink");f.style.display="inline-block";f.style.padding="2px";f.style.color=this.content;g.push(f);f=new e.ThemeClass("primaryNav");f.style.color=this.navtext;f.style.fontSize="8pt";f.style.fontWeight="normal";f.style.paddingTop="6px";f.style.verticalAlign="baseline";g.push(f);f=new e.ThemeClass("primaryNav a");f.style.fontSize="8pt";f.style.color=this.navtext;f.style.marginRight="6px";f.style.marginLeft="6px";f.style.verticalAlign="baseline";
f.style.textDecoration="none";g.push(f);f=new e.ThemeClass("primaryNav a:hover");f.style.color="#bfbfbf";f.style.cursor="hand";f.style.color="white";f.style.fontWeight="normal";g.push(f);for(var d in g)h+=g[d].toString();return h};i.prototype.writeLocationStyle=function(){var h="",g=[],f=new e.ThemeClass("titleArea");f.style.margin="0";f.style.paddingTop="5px";f.style.border="0";f.style.background=this.location;f.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";f.style.borderBottom="1px solid "+this.location;f.style.minHeight="20px";g.push(f);f=new e.ThemeClass("breadcrumb");f.style.fontSize="8pt";f.style.textDecoration="none";f.style.color=this.content;f.style.paddingTop="2px";g.push(f);f=new e.ThemeClass("a.breadcrumb:hover");f.style.textDecoration="none";f.style.borderBottom="1px dotted";f.style.color="#F58B0F";f.style.cursor="pointer";g.push(f);f=new e.ThemeClass("breadcrumbSeparator");f.style.fontSize="8pt";
f.style.textDecoration="none";f.style.color=this.navbar;f.style.fontWeight="bold";g.push(f);f=new e.ThemeClass("currentLocation");f.style.fontWeight="bold";f.style.fontSize="8pt";f.style.color=this.navbar;f.style.textDecoration="none";f.style.textWrap="normal";f.style.lineHeight="10pt";g.push(f);f=new e.ThemeClass("a.currentLocation:hover");f.style.fontWeight="bold";f.style.fontSize="10pt";f.style.color="#666666";f.style.textDecoration="none";f.style.borderBottom="0";g.push(f);f=new e.ThemeClass("navlinkonpage");
f.style.color=this.content;g.push(f);for(var d in g)h+=g[d].toString();return h};i.prototype.writeButtonStyle=function(){var h="",g=[],f=new e.ThemeClass("commandButton");f.style.color="#222";f.style.border="1px solid #dedede";f.style.backgroundColor=this.button;f.style.textAlign="center";f.style.verticalAlign="baseline";f.style.cursor="pointer";f.style.display="inline-block";f.style.padding="6px";f.style.paddingTop="4px";f.style.borderRadius="1px";f.style.lineHeight="12px";f.style.fontSize="8pt";
f.style.userSelect="none";g.push(f);f=new e.ThemeClass("commandButton:over");f.style.backgroundColor="#e6e6e6";f.style.border="1px solid #808080";g.push(f);f=new e.ThemeClass("commandMenu");f.style.color="#222";f.style.display="inline-block";f.style.verticalAlign="baseline";f.style.margin="0";f.style.fontSize="8pt";f.style.fontWeight="normal";f.style.border="1px solid #dedede";f.style.backgroundColor="#efefef";f.style.cursor="pointer";f.style.borderRadius="1px";g.push(f);f=new e.ThemeClass("commandMenuItem");
f.style.border="0";f.style.padding="0";f.style.margin="0";g.push(f);for(var d in g)h+=g[d].toString();return h};i.prototype.writeMainStyle=function(){var h="",g=[],f=new e.ThemeClass("searchbox");f.style.backgroundImage="url(../images/core_sprites.png)";f.style.backgroundRepeat="no-repeat";f.style.backgroundPosition="4px -297px";f.style.width="12px";f.style.height="12px";f.style.backgroundColor=this.search;f.style.border="1px solid "+this.search;f.style.fontSize="11px";f.style.width="15em";f.style.height=
"16px";f.style.borderRadius="10px";f.style.color="#999";f.style.padding="0";f.style.paddingLeft="20px";f.style.marginLeft="5px";f.style.marginTop="6px !important";f.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";g.push(f);f=new e.ThemeClass("searchbox:focus");f.style.color="white";f.style.outline="none";g.push(f);f=new e.ThemeClass("checkedRow");f.style.cssText="background-color:"+this.selection+" !important;";g.push(f);f=new e.ThemeClass("navbar-item-selected");
f.style.background=this.selection;f.style.color=this.content;g.push(f);f=new e.ThemeClass("auxpane");f.style.border="0";f.style.background=this.sidepanel;f.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";f.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";f.style.overflowX="auto";f.style.minWidth="200px";f.style.paddingTop="16px";g.push(f);f=new e.ThemeClass("mainpane");
f.style.background=this.mainpanel;f.style.border=0;g.push(f);f=new e.ThemeClass("mainToolbar");f.style.background=this.toolpanel;f.style.height="31px";f.style.borderBottom="1px solid #ebebeb";g.push(f);for(var d in g)h+=g[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(e){e.navbar.value?(this.navbar=e.navbar.value,
this.button=e.button.value,this.location=e.location.value,this.selection=e.selection.value,this.sidepanel=e.sidepanel.value,this.mainpanel=e.mainpanel.value,this.navtext=e.navtext.value,this.search=e.search.value,this.content=e.content.value,this.toolpanel=e.toolpanel.value):(this.navbar=e.navbar,this.button=e.button,this.location=e.location,this.selection=e.selection,this.sidepanel=e.sidepanel,this.mainpanel=e.mainpanel,this.navtext=e.navtext,this.search=e.search,this.content=e.content,this.toolpanel=
e.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:i}});
define("orion/inputCompletion/inputCompletion",[],function(){function e(e,h,g){this._inputField=e;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=h;(e=g?g.group:null)||(e=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=e+"__completion__";this._proposeFromStart=g?g.proposeFromStart:!1;this._extendedProvider=g?g.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._dataList=[];this._initUI();var f=this;this._completionUIContainer.addEventListener("mousedown",function(){f._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){f._mouseDown=!1});this._inputField.addEventListener("blur",function(){f._mouseDown?window.setTimeout(function(){f._inputField.focus()},200):f._dismiss()});this._inputField.addEventListener("keydown",function(d){f.onKeyDown(d)});this._inputField.addEventListener("input",function(){f._proposeOn(f._inputField.value)});
this._inputField.addEventListener("focus",function(){if(f._dismissed&&f._binderFunc)f._dismissing?f._dismissing=!1:f._binderFunc&&f._binderFunc(function(d){f._bind(d);f._proposeOn(f._inputField.value)})})}e.prototype.onKeyDown=function(e){if(this._dismissed)return!0;var h=e.charCode||e.keyCode;if(h===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return e.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
e.ctrlKey),e.stopPropagation(),!1}else if((h===40||h===38)&&this._proposalList&&this._proposalList.length>0)return e.preventDefault(),this._walk(h===40),e.stopPropagation(),!1;else if(h===27)return e.preventDefault(),this._dismiss(),!1;return!0};e.prototype._bind=function(e){this._dataList=e};e.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};e.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};e.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)};e.prototype._createProposalLink=function(e,h,g,f){var d=document.createElement("a");d.href=require.toUrl(h);d.appendChild(this._createBoldText(e,
g,f));return d};e.prototype._createBoldText=function(e,h,g){if(h<0)return document.createTextNode(e);var f=document.createElement("span"),d;0!==h&&(d=document.createTextNode(e.substring(0,h)),f.appendChild(d));var c=document.createElement("b");f.appendChild(c);d=document.createTextNode(e.substring(h,h+g));c.appendChild(d);h+g<e.length-1&&(d=document.createTextNode(e.substring(h+g)),f.appendChild(d));return f};e.prototype._proposeOnCategory=function(e,h){if(h.length!==0){var g=this;if(e){var f=document.createElement("li");
f.className="inputCompletionLICategory";var d=document.createTextNode(e);f.appendChild(d);this._completionUL.appendChild(f)}for(d=0;d<h.length;d++){f=document.createElement("li");f.onmouseover=function(b){g._selectProposal(b.currentTarget)};f.onclick=function(b){g._dismiss(b.currentTarget.completionItem.value)};f.className="inputCompletionLINormal";f.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);f.appendChild(c)}else h[d].item.value.name&&
h[d].item.value.type==="link"&&f.appendChild(this._createProposalLink(h[d].item.value.name,h[d].item.value.value,h[d].boldIndex,h[d].boldLength));this._completionUL.appendChild(f);this._proposalList.push({item:h[d].item,domNode:f})}}};e.prototype._domNode2Index=function(e){for(var h=0;h<this._proposalList.length;h++)if(this._proposalList[h].domNode===e)return h;return-1};e.prototype._highlight=function(e,h){var g=e,f=!1;isNaN(g)||(f=!0,g=this._proposalList&&e>=0&&e<this._proposalList.length?this._proposalList[e].domNode:
null);if(g)g.className=h?"inputCompletionLISelected":"inputCompletionLINormal",h&&f&&(g.offsetTop<this._completionUIContainer.scrollTop?g.scrollIntoView(!0):g.offsetTop+g.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&g.scrollIntoView(!1))};e.prototype._selectProposal=function(e){var h=e;isNaN(h)&&(h=this._domNode2Index(e));if(h!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=h,this._highlight(this._proposalIndex,!0)};
e.prototype._dismiss=function(e,h){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof e==="string")this._inputField.value=e,this._dismissing=!0,this._inputField.focus();else if(e&&e.name&&e.type==="link")h?window.open(e.value):window.location.href=e.value;var g=this;window.setTimeout(function(){g._completionUIContainer.style.display="none"},200)}};e.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var e=0,h=0,g=this._inputField;g;)e+=
g.offsetLeft,h+=g.offsetTop,g=g.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=h+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=e+"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"};e.prototype._walk=function(e){e=this._proposalIndex+(e?
1:-1);e<-1?e=this._proposalList.length-1:e>=this._proposalList.length&&(e=-1);this._selectProposal(e)};e.prototype._proposeOnList=function(e,h,g){for(var f="",d=[],c=h?h.length:0,b=0;b<e.length;b++)if(e[b].type==="category")this._proposeOnCategory(f,d),f=e[b].label,d=[];else{var a=!0,j=-1;if(h&&g){var k;typeof e[b].value==="string"?k=e[b].value.toLowerCase():e[b].value.name&&(k=e[b].value.name.toLowerCase());j=k.indexOf(h);j<0?a=!1:this._proposeFromStart&&(a=j===0)}a&&d.push({item:e[b],boldIndex:j,
boldLength:c})}this._proposeOnCategory(f,d)};e.prototype._proposeOn=function(e){this._completionUL.textContent="";var h=e?e.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,h,!0);if(this._extendedProvider&&h){var g=this;this._extendedProvider(e,function(f){if(f)for(var d=0;d<f.length;d++)g._proposeOnList(f[d].proposals,f[d].filterForMe?h:e,f[d].filterForMe);g._show()},[])}else this._show()};e.prototype.constructor=e;return{InputCompletion:e}});
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(e,i){var h={root:i};Object.keys(e).forEach(function(g){typeof h[g]==="undefined"&&(h[g]=e[g])});return h});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(e,i,h,g){function f(){}f.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=g.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 j=
0;j<this.$$modalExclusions.length;j++)if(h.contains(this.$$modalExclusions[j],c[a])){b=!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(j=c[a],j.classList.contains("modalBackdrop")||(j.classList.add("modalBackdrop"),this._addedBackdrop.push(j)))}(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}};f.prototype.constructor=f;return{Dialog:f}});
(function(){var e=["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,g=typeof location!=="undefined"&&location.href,f=g&&location.protocol&&location.protocol.replace(/\:/,""),d=g&&location.hostname,c=g&&(location.port||void 0),b=[];define("text",[],function(){var a,j,k;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?(k=require.nodeRequire("fs"),j=function(a,b){var c=k.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")),j,f,e="";try{j=new java.lang.StringBuffer;
(f=c.readLine())&&f.length()&&f.charAt(0)===65279&&(f=f.substring(1));for(j.append(f);(f=c.readLine())!==null;)j.append(d),j.append(f);e=String(j.toString())}finally{c.close()}b(e)});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=e[b];try{a=new ActiveXObject(c)}catch(d){}if(a){e=[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,j){var f=a.xdRegExp.exec(b),e;if(!f)return!0;b=f[2];f=f[3];f=f.split(":");e=f[1];f=f[0];return(!b||b===c)&&(!f||f===d)&&(!e&&!f||e===j)},finishLoad:function(c,d,j,f,e){j=d?a.strip(j):j;e.isBuild&&(b[c]=j);f(j)},load:function(b,j,e,k){if(k.isBuild&&!k.inlineText)e();else{var h=a.parseName(b),i=h.moduleName+"."+h.ext,r=j.toUrl(i),x=k&&k.text&&k.text.useXhr||a.useXhr;!g||x(r,f,d,c)?a.get(r,function(c){a.finishLoad(b,h.strip,c,e,k)}):j([i],function(b){a.finishLoad(h.moduleName+"."+h.ext,h.strip,b,
e,k)})}},write:function(c,d,j){if(d in b){var f=a.jsEscape(b[d]);j.asModule(c+"!"+d,"define(function () { return '"+f+"';});\n")}},writeFile:function(b,c,d,j,f){var c=a.parseName(c),e=c.moduleName+"."+c.ext,g=d.toUrl(c.moduleName+"."+c.ext)+".js";a.load(e,d,function(){var c=function(a){return j(g,a)};c.asModule=function(a,b){return j.asModule(a,g,b)};a.write(b,e,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(e,i,h){return{slideoutHTMLFragment:function(e){var f=document.createElement("div");f.innerHTML=h;var d=i.$("#slideContainer",f);d.id=e+d.id;d=i.$("#pageCommandParameters",f);d.id=e+d.id;d=i.$("#pageCommandDismiss",f);d.id=e+d.id;return f.innerHTML}}});
define("orion/operation",["orion/xhr","orion/Deferred"],function(e,i){function h(f,d){e("GET",f,{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(f,d)},2E3):(c.type==="error"||c.type==="abort"?d.reject(c.Result):d.resolve(c.Result.JsonData),c.Location||e("DELETE",f,{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 g(f,d){d.then(null,function(c){c instanceof Error&&c.name==="Cancel"&&e("PUT",f,{headers:{"Orion-Version":"1"},data:JSON.stringify({abort:!0}),timeout:15E3})})}return{handle:function(f){var d=new i;g(f,d);h(f,d);return d}}});
define("orion/git/gitClient",["require","orion/xhr","orion/Deferred","orion/operation"],function(e,i,h,g){var f=f||{};f.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,f,g,l,p,n){var m=this,q={};if(c)q.Name=c;if(a)q.Path=a;if(b)q.GitUrl=b;q.Location=d;if(f)q.GitSshUsername=f;if(g)q.GitSshPassword=
g;if(l)q.GitSshKnownHost=l;if(p)q.GitSshPrivateKey=p;if(n)q.GitSshPassphrase=n;var c=e.toUrl("gitapi/clone/._"),c=c.substring(0,c.length-2),r=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(q)}).then(function(a){m._getGitServiceResponse(r,a)},function(a){m._handleGitServiceResponseError(r,a)});return r},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,f=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(f,a)},function(a){d._handleGitServiceResponseError(f,
a)});return f},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,f={};if(b)f.Name=b;if(a)f.Branch=a;var e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(f)}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},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,f=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(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},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,f,e,g){var p=this,n=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:f,GitSshPrivateKey:e,GitSshPassphrase:g})}).then(function(a){p._getGitServiceResponse(n,
a)},function(a){p._handleGitServiceResponseError(n,a)});return n},doPull:function(c,b,a,d,f,e,g){var p=this,n=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:f,GitSshPrivateKey:e,GitSshPassphrase:g})}).then(function(a){p._getGitServiceResponse(n,a)},function(a){p._handleGitServiceResponseError(n,a)});return n},doMerge:function(c,b,a){var d=this,f=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(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},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,f={};f.Rebase=b;if(a)f.Operation=a;var e=new h;i("POST",c,{headers:{"Orion-Version":"1","Content-Type":"charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(f)}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},doPush:function(c,b,a,d,f,e,g,p,n){var m=this,q=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:f,GitSshPassword:e,GitSshKnownHost:g,GitSshPrivateKey:p,GitSshPassphrase:n})}).then(function(a){m._getGitServiceResponse(q,a)},function(a){m._handleGitServiceResponseError(q,a)});return q},getLog:function(c,b){var a=this,d=new h,f=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){f.resolve(a.xhr.getResponseHeader("Location"))},function(b){a._handleGitServiceResponseError(d,
b)});f.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,f=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(f,
a)},function(a){d._handleGitServiceResponseError(f,a)});return f},addCloneConfigurationProperty:function(c,b,a){var d=this,f=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(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},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,f,e){var g=
this,p=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:f,ReviewMessage:e})}).then(function(a){g._getGitServiceResponse(p,a)},function(a){g._handleGitServiceResponseError(p,a)});return p},_getGitServiceResponse:function(c,b){var a=b.response?JSON.parse(b.response):null;if(b.xhr&&b.xhr.status===202){var d=g.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 f});
define("orion/ssh/sshTools",[],function(){var e=e||{};e.SshService=function(){function e(h){if(h)this._serviceRegistry=h,this._serviceRegistration=h.registerService("orion.net.ssh",this)}e.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(e,g){g||(g="");var f=localStorage.getItem(g+this._KNOWN_HOSTS);f?f.indexOf(e)<0&&localStorage.setItem(g+this._KNOWN_HOSTS,f+"\n"+e):localStorage.setItem(g+this._KNOWN_HOSTS,e)},clearKnownhosts:function(e){e||(e="");localStorage.removeItem(e+this._KNOWN_HOSTS)},
getKnownHosts:function(e){e||(e="");return localStorage.getItem(e+this._KNOWN_HOSTS)}};return e}();return e});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(e,i){function h(e){this._init(e)}h.prototype={_init:function(g){var f=g.parent,d=this,f=i.node(f);if(!f)throw e["no parent"];if(!g.model)throw e["no tree model"];if(!g.renderer)throw e["no renderer"];this._parent=f;this._treeModel=g.model;this._renderer=g.renderer;this._showRoot=g.showRoot===void 0?!1:g.showRoot;this._indent=g.indent===void 0?16:g.indent;this._onCollapse=g.onCollapse;this._labelColumnIndex=
g.labelColumnIndex===void 0?0:g.labelColumnIndex;this._id=g.id===void 0?"treetable":g.id;this._tableStyle=g.tableStyle;this._tableElement=g.tableElement||"table";this._tableBodyElement=g.tableBodyElement||"tbody";this._tableRowElement=g.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(e,f){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(e,f);d.appendChild(this._bodyElement);this._parent.appendChild(d);this._rowsChanged()},_generateChildren:function(e,f,d){for(var c=0;c<e.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[c]);b._depth=f;b._item=e[c];this._renderer.render(e[c],
b);b.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*f+"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(g,f,d){var c=this._treeModel.getId(g),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(f,0),this._rowsChanged();else{var a=i.node(c);a?(a._item=g,a&&(d||
a._expanded)?(a._expanded=!0,this._removeChildRows(c),this._renderer.updateExpandVisuals(a,!0),f?(this._generateChildren(f,a._depth+1,a),this._rowsChanged()):(b=this,f=this._treeModel.getChildren(a._item,function(c){b._generateChildren(c,a._depth+1,a);b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(e["could not find table row "]+c)}},getItem:function(e){var f=i.node(e);return f&&f._item?f._item:e},toggle:function(e){var f=i.node(e);f&&(f._expanded?(this.collapse(e),this._renderer.updateExpandVisuals(f,
!1)):(this.expand(e),this._renderer.updateExpandVisuals(f,!0)))},isExpanded:function(e){return(e=i.node(e))?e._expanded:!1},expand:function(e,f,d){var e=typeof e==="string"?e:this._treeModel.getId(e),c=i.node(e);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();f&&f.apply(b,d)})}},_removeChildRows:function(e){for(var f=e===this._id,d=!1,c=-1,b=[],a=i.$$array(".treeTableRow",
this._parent),j=0;j<a.length;j++){var k=a[j];if(d)break;if(f)k._depth>c?b.push(k):d=!0;else if(k.id===e)f=!0,c=k._depth}for(e=0;e<b.length;e++)f=b[e],f.parentNode.removeChild(f)},collapse:function(e){var e=typeof e==="string"?e:this._treeModel.getId(e),f=i.node(e);if(f){if(!f._expanded)return;f._expanded=!1;this._renderer.updateExpandVisuals(f,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&this._onCollapse(f._item)}};h.prototype.constructor=h;return{TableTree:h}});
define("orion/treeModelIterator",[],function(){var e={};e.TreeModelIterator=function(){function e(h,g){this.firstLevelChildren=h;this.reset();this._init(g)}e.prototype={_init:function(e){if(e)this.isExpanded=e.isExpanded,this.isExpandable=e.isExpandable,this.forceExpandFunc=e.forceExpandFunc},topLevel:function(e){return e.parent?e.parent===this.root:!0},_expanded:function(e){if(!e)return!0;var g=e.children&&e.children.length>0;this.isExpanded&&g&&(g=this.isExpanded(e));return g},_expandable:function(e){return!e?
!0:this.isExpandable?this.isExpandable(e):!1},_diveIn:function(e){return this._expanded(e)?(this.setCursor(e.children[0]),this.cursor()):null},_drillToLast:function(e){return this._expanded(e)?this._drillToLast(e.children[e.children.length-1]):e},_forward:function(e){if(!this._cursor)return null;var g=this._diveIn(this._cursor);if(!g){if(e&&this._expandable(this._cursor)&&this.forceExpandFunc){var f=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&f.setCursor(d)})}(g=this._findSibling(this._cursor,
!0))&&this.setCursor(g)}return g},_backward:function(e){if(!this._cursor)return null;var g=this._findSibling(this._cursor,!1);g&&g!==this._cursor.parent&&(g=this._drillToLast(g));if(e&&g&&this._expandable(g)&&this.forceExpandFunc&&g!==this._cursor.parent){var f=this;return this.forceExpandFunc(g,"last",function(d){d&&f.setCursor(d)})}g&&this.setCursor(g);return g},_findSibling:function(e,g){for(var f=this.topLevel(e),d=f?this.firstLevelChildren:e.parent.children,c=0;c<d.length;c++)if(d[c]===e)return c===
0&&!g?f?null:e.parent:c===d.length-1&&g?f?null:this._findSibling(e.parent,g):g?d[c+1]:d[c-1];return null},_inParentChain:function(e,g){for(var f=e.parent;f;){if(f===g)return!0;f=f.parent}return!1},_getTopLevelParent:function(e){if(this.topLevel(e))return e;for(e=e.parent;e;){if(this.topLevel(e))return e;e=e.parent}return null},_onCollapse:function(e){return this._expanded(e.parent)?e:this._onCollapse(e.parent)},_scan:function(e,g,f){this.setCursor(g);var d=[];for(d.push(g);;){if(this.iterate(e))d.push(this.cursor());
else break;if(f===this.cursor())return d}return null},setCursor:function(e){this._prevCursor=this._cursor;this._cursor=e},setTree:function(e){this.firstLevelChildren=e;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(e,g){var f=this.cursor(),d=this._scan(!0,e,g);d||(d=this._scan(!1,e,g));this.setCursor(f);return d},iterate:function(e,g){return e?this._forward(g):this._backward(g)},iterateOnTop:function(e,g){var f=this._findSibling(this._getTopLevelParent(this.cursor()),
e);f?this.setCursor(f):g&&this.firstLevelChildren.length>0&&this.setCursor(e?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(e){if(!this._cursor)return null;return this._inParentChain(this._cursor,e)?(this.setCursor(e),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 e}();return e});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(e,i,h){var e={},g=navigator.userAgent.indexOf("iPad")!==-1,f=window.navigator.platform.indexOf("Mac")!==-1;e.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 f=this;this._modelIterator=new h.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),isExpandable:this.explorer.renderer.isExpandable?function(a){return f.explorer.renderer.isExpandable(a)}:function(a){return f.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return f.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();c=function(a){if(a.target===d){if(f.explorer.preventDefaultFunc&&f.explorer.preventDefaultFunc(a,f._modelIterator.cursor()))return!0;
if(a.keyCode===i.KEY.DOWN)return f.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return f.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return f.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return f.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return f.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return f.onEnter(a)}};d.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(f.explorer.onFocus)f.explorer.onFocus(!1);else f.toggleCursor(null,!1)};d.addEventListener("blur",
c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(f.explorer.onFocus)f.explorer.onFocus(!0);else f.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 f?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,f=!0;d+=b;d<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?c=this.currentModel():f=!1),d=f?a.length-1:this._currentColumn):d>=a.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?c=this.currentModel():
f=!1),d=f?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,f,e;if(c||b){if(e===this._modelIterator.cursor())return;f=this._modelIterator.cursor();e=c;this._modelIterator.setCursor(e)}else f=this._modelIterator.prevCursor(),e=this._modelIterator.cursor();
if(f!==e||b)if(this.toggleCursor(f,!1),!b||e)if(this.moveColumn(null,0),this.toggleCursor(e,!0),(c=this.getRowDiv())&&!d&&!this._visible(c)&&c.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,e)},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)),f=b?!d.checked:!0;if(f!==d.checked)this.explorer.renderer.onCheck(a,d,f,!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,f=c.length;d<f;d++){var e=c[d];if(e.top>=b&&e.top<=a&&e.bottom>=b&&e.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),g)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}();e.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 e});
define("orion/git/widgets/CommitTooltipDialog",["i18n!git/nls/gitmessages","require","orion/webui/littlelib","orion/i18nUtil","orion/webui/popupdialog"],function(e,i,h,g,f){function d(c){this._init(c)}d.prototype=new f.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 f=new Image;f.src=c.AuthorImage;
f.name=c.AuthorName;f.className="git-author-icon";b.appendChild(f);d.appendChild(b)}b=document.createElement("span");b.textContent=g.formatMessage(e[" 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=g.formatMessage(e["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=e["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=e["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);f=document.createElement("span");f.textContent=e["branches: "];d.appendChild(f);f=document.createElement("div");d.appendChild(f);for(d=0;d<c.Branches.length;++d){var h=document.createElement("span");h.style.paddingLeft="10px";h.textContent=c.Branches[d].FullName;f.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=e["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 e(f){for(var d=0;d<g.length;d++)if(f.type===g[d])return!0;return!1}function i(f){for(var d=0;d<h.length;d++)if(f.type===h[d])return!0;return!1}var h=["Missing","Modified","Untracked","Conflicting"],g=["Added","Changed","Removed"];return{statusUILocation:"git/git-status2.html",isStaged:e,isUnstaged:i,isChange:function(f){return e(f)||i(f)},hasStagedChanges:function(f){for(var d=0;d<g.length;d++)if(f[g[d]].length>0)return!0;return!1},
hasUnstagedChanges:function(f){for(var d=0;d<h.length;d++)if(f[h[d]].length>0)return!0;return!1}}});
define("orion/compare/compareUtils",["orion/URITemplate"],function(e){var i=i||{};i.compareUtils=i.compareUtils||{};i.compareUtils.lookUpMapper=function(e,g,f){for(var d=0,c=0;c<e.length;c++){var b=e[c][g];b===0&&(b=1);if(f>=d&&f<d+b)return{mapperIndex:c,startFrom:d};if(c===e.length-1)break;d+=e[c][g]}return{mapperIndex:e.length-1,startFrom:d}};i.compareUtils.lookUpLineIndex=function(e,g,f){if(f===0)return 0;for(var d=0,c=0;c<f;c++)d+=e[c][g];return d};i.compareUtils.updateMapper=function(e,g,f,d,
c){if(d!==c&&(d>0||c>0)){var b=i.compareUtils.lookUpMapper(e,g,f);if(!(b.mapperIndex<0)){if(d>0)for(var a=f-b.startFrom,f=b.mapperIndex;f<e.length;f++){a=e[f][g]-a;if(d<=a){e[f][g]-=d;break}e[f][g]-=a;d-=a;a=0}c>0&&(e[b.mapperIndex][g]+=c)}}};i.compareUtils.overlapMapper=function(e,g,f,d,c){e=f+e[g]-1;e<f&&(e=f);c<d&&(c=d);return e<d||c<f?!1:!0};i.compareUtils.findFirstDiff=function(e,g,f,d){for(var c=0,b=void 0,a=0;a<e.length;a++){if(c>d)break;if(i.compareUtils.overlapMapper(e[a],g,c,f,d)&&(b={mapperIndex:a,
startFrom:c},e[a][2]!==0))break;c+=e[a][g]}return b};i.compareUtils.matchMapper=function(e,g,f,d){if(e.length===0)return f;var c=f+Math.round((d-f)/3),b=i.compareUtils.findFirstDiff(e,g,f,d),a=e[b.mapperIndex][g]===0?b.startFrom:b.startFrom+e[b.mapperIndex][g]-1,j=i.compareUtils.lookUpLineIndex(e,1-g,b.mapperIndex),k=b.startFrom-f;return e[b.mapperIndex][2]===0?j-k:c>=b.startFrom&&c<=a?j-Math.round((d-f)/3):c<b.startFrom?j-k:(e[b.mapperIndex][1-g]===0?j:j+e[b.mapperIndex][1-g]-1)-(a-f)};i.compareUtils.getMapperLineCount=
function(e){for(var g=0,f=0;f<e.length;f++)g+=Math.max(e[f][0],e[f][1]);return g};i.compareUtils.getAnnotationIndex=function(e,g){for(var f=0;f<e.length;f++)if(e[f][0]===g)return f;return-1};i.compareUtils.getAnnotationMapperIndex=function(e,g){return e[g][1]};i.compareUtils.getAnnotationIndexByMapper=function(e,g){for(var f=0;f<e.length;f++)if(e[f][1]===g)return{current:f,prev:f-1,next:f+1};return{current:-1,prev:-1,next:-1}};i.compareUtils.isMapperConflict=function(e,g){return g<0?!1:!e[g][3]?!1:
e[g][3]===1};i.compareUtils.mergeDiffBlocks=function(e,g,f,d,c,b){for(var a=0;a<g.length;a++){var j=g[a][0],k=f[g[a][1]];if(k[0]>0){for(var o="",i=0;i<k[0];i++)o=o+d[k[2]-1+i].substring(c)+b;k=e.getLineCount();j>=k&&(j=k-1);j=e.getLineStart(j);e.setText(o,j,j)}}};i.compareUtils.generateCompareHref=function(h,g){var f=require.toUrl("compare/compare.html");if(!g.conflict)g.conflict=void 0;if(!g.readonly)g.readonly=void 0;return(new e(f+"#{,resource,params*}")).expand({resource:h,params:g})};i.compareUtils.generateCompareTreeHref=
function(h,g){var f=require.toUrl("compare-tree/compare-tree.html");return(new e(f+"#{,resource,params*}")).expand({resource:h,params:g})};return i.compareUtils});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(e){function i(e){this._prefix="/git/credentials";this._preferenceService=e.getService("orion.core.preference")}i.prototype={put:function(h,g){var f={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(g!==void 0){if(g.gitSshUsername!==void 0&&g.gitSshUsername!==null)f.gitSshUsername=g.gitSshUsername;if(g.gitSshPassword!==void 0&&g.gitSshPassword!==null)f.gitSshPassword=g.gitSshPassword;if(g.gitPrivateKey!==void 0&&
g.gitPrivateKey!==null)f.gitPrivateKey=g.gitPrivateKey;if(g.gitPassphrase!==void 0&&g.gitPassphrase!==null)f.gitPassphrase=g.gitPassphrase}var d=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(c){var b=c.get("settings");b===void 0?d.reject():b.enabled?(c.put(h,f),d.resolve()):d.reject()});return d},get:function(h){var g={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},f=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(d){var c=
d.get("settings");c===void 0?f.reject():c.enabled?(d=d.get(h),d!==void 0?f.resolve(d):f.resolve(g)):f.reject()});return f},isEnabled:function(){var h=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e=e.get("settings");e===void 0?h.resolve(!1):h.resolve(e.enabled)});return h},enable:function(){var h=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e.put("settings",{enabled:!0});h.resolve()});return h},disable:function(){var h=new e;this._preferenceService.getPreferences(this._prefix,
2).then(function(e){e.put("settings",{enabled:!1});h.resolve()});return h},remove:function(h){var g=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e.remove(h);g.resolve()});return g},getRepositories:function(){var h=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(e){for(var f=[],e=e.keys(),d=0;d<e.length;++d)e[d]!=="settings"&&f.push(e[d]);h.resolve(f)});return h}};return i.prototype.constructor=i});
define("orion/git/widgets/ConfirmPushDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,i){function h(e){this._init(e)}h.prototype=new i.Dialog;h.prototype.TEMPLATE='<div id="header"></div>';h.prototype._init=function(g){var f=this;this.title="Git Push";this.modal=!0;this.messages=e;this.location=g.location;this.dialog2=g.dialog;this.func=g.func;this.buttons=[];this.buttons.push({callback:function(){f.destroy();f.dialog2.show()},text:"More"});this.buttons.push({callback:function(){f.destroy();
f.func()},text:"OK"});this._initialize()};h.prototype._bindToDom=function(){var e=this.$header;e.appendChild(document.createTextNode("You are going to push to the following remote: "+this.location));e.appendChild(document.createElement("br"));e.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/git/widgets/ReviewRequestDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,i){function h(e){this._init(e)}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(g){var f=this;this.title=g.title||e["Contribution Review Request"];this.modal=!0;this.messages=e;this.url=g.url;this.func=g.func;this.buttons=[];this.buttons.push({callback:function(){f.destroy();f.func(f.$reviewerName.value)},text:"Submit"});this._initialize()};h.prototype._bindToDom=function(){this.$reviewReqUrl.value=this.url};h.prototype.constructor=h;return{ReviewRequestDialog:h}});
define("orion/git/widgets/GitCredentialsDialog",["i18n!git/nls/gitmessages","orion/git/gitPreferenceStorage","orion/webui/dialog"],function(e,i,h){function g(e){this._init(e)}g.prototype=new h.Dialog;g.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>';
g.prototype._init=function(f){var d=this;this.title=f.title||e["Git Credentials"];this.modal=!0;this.messages=e;this.options=f;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(f.serviceRegistry)this._sshService=f.serviceRegistry.getService("orion.net.ssh"),this._progressService=f.serviceRegistry.getService("orion.page.progress");this.buttons=
[];this.buttons.push({callback:function(){d.destroy();d._execute()},text:"OK",isDefault:!0});this._initialize()};g.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]})};
g.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))};g.prototype.constructor=g;return{GitCredentialsDialog:g}});
define("orion/git/widgets/OpenCommitDialog",["i18n!git/nls/gitmessages","orion/i18nUtil","orion/Deferred","orion/webui/dialog","orion/webui/littlelib"],function(e,i,h,g,f){function d(c){this._init(c)}d.prototype=new g.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||e["Find Commit"];this.modal=!0;this.messages=e;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===f.KEY.ENTER){var a=f.$("a",c.$results);a&&(f.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(e["Searching..."]));f.empty(this.$results);this.$results.appendChild(a);this.serviceRegistry.getService("orion.page.message").setProgressMessage(e["Looking for the commit"]);this._findCommitLocation(this.repositories,b).then(function(a){f.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"));f.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";f.empty(b);b.appendChild(d);var g=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=g;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===f.KEY.ENTER&&a.hide()},!1);h=document.createElement("div");h.style.paddingTop="15px";d.appendChild(h);h=document.createElement("div");d.appendChild(h);g=document.createElement("div");d.appendChild(g);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(e[" authored by ${0} {${1}) on ${2}"],c.AuthorName,c.AuthorEmail,(new Date(c.Time)).toLocaleString());g.appendChild(d);h=document.createElement("div");g.appendChild(h);d=document.createElement("span");d.textContent=i.formatMessage(e["committed by 0 (1)"],c.CommitterName,c.CommitterEmail);g.appendChild(d);h=document.createElement("div");h.style.paddingTop=
"15px";g.appendChild(h);d=document.createElement("span");d.textContent=e["commit:"]+c.Name;g.appendChild(d);if(c.Parents&&c.Parents.length>0)h=document.createElement("div"),g.appendChild(h),b=document.createElement("span"),b.textContent=e["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===f.KEY.ENTER&&a.hide()},!1),g.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(e,i){function h(e){this._init(e)}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(g){var f=this;this.title=e["Commit Changes"];this.modal=!0;this.messages=e;this.options=g;this.buttons=[];this.buttons.push({callback:function(){f._execute()},text:"OK",id:"commitChangesButton"});this._initialize()};h.prototype._bindToDom=function(){var e=this;if(this.options.body.Message)this.$commitMessage.value=this.options.body.Message;this.$commitMessage.addEventListener("keyup",function(){e._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(){e._validate()});if(this.options.body.CommitterEmail)this.$committerEmail.value=this.options.body.CommitterEmail;this.$committerEmail.addEventListener("keyup",function(){e._validate()});if(this.options.body.AuthorName)this.$authorName.value=this.options.body.AuthorName;this.$authorName.addEventListener("keyup",function(){e._validate()});if(this.options.body.AuthorEmail)this.$authorEmail.value=this.options.body.AuthorEmail;
this.$authorEmail.addEventListener("keyup",function(){e._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=e["The author mail is required."]):
(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The author name is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The committer mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The committer name is required."]):(this.$commitInfoBar.style.display=
"block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The commit message is required."])};h.prototype._execute=function(){if(!this.$commitChangesButton.classList.contains(this.DISABLED)){if(this.options.func){var e={};e.Message=this.$commitMessage.value;e.Amend=this.$amend.checked?!0:!1;e.CommitterName=this.$committerName.value;e.CommitterEmail=this.$committerEmail.value;e.AuthorName=this.$authorName.value;e.AuthorEmail=this.$authorEmail.value;this.options.func(e)}this.hide()}};
h.prototype.constructor=h;return{CommitDialog:h}});
define("orion/git/widgets/ApplyPatchDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,i){function h(e){this._init(e)}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(g){var f=this;this.title=e["Apply Patch"];this.modal=!0;this.messages=e;this.options=g;this.buttons=[];this.buttons.push({callback:function(){f._applyPatch()},text:"OK"});this._initialize()};h.prototype._bindToDom=function(){};h.prototype._applyPatch=function(){var e=new FormData;e.append("uploadedfile",this.$selectedFile.files[0]);e.append("url",this.$url.value);e.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(e)};h.prototype.handleReadyState=function(){this.req.readyState===4&&this.hide()};h.prototype.constructor=h;return{ApplyPatchDialog:h}});
define("orion/links",[],function(){function e(e){this._init(e)}e.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(e,h,g,f,d){var c=e.search(g);c>0&&(h.appendChild(document.createTextNode(e.substring(0,c))),e=e.substring(c));var g=e.replace(g,""),c=e.substring(0,e.length-g.length),b=c.split(" ",f);if(b.length===f){for(var e=document.createElement("a"),a=0;a<f;a++)d=d.replace("%"+
(a+1),b[a]);e.setAttribute("href",d);e.textContent=c;h.appendChild(e);e=g}return e},addLinks:function(e,h){var g=h||document.createElement("div"),f=this._registry.getServiceReferences("orion.core.linkScanner");if(f.length>0)for(var d=f[0],f=RegExp(d.getProperty("pattern"),"i"),c=d.getProperty("words"),d=d.getProperty("anchor"),b=e.search(f);b>=0;)e=this._replaceLink(e,g,f,c,d),b=e.search(f);e.length>0&&g.appendChild(document.createTextNode(e));return g}};e.prototype.constructor=e;return{TextLinkService:e}});
define("orion/PageUtil",[],function(){var e=/^http[s]?/i;return{matchResourceParameters:function(e){var e=e||window.location.toString(),h={resource:""},g=e.indexOf("#");if(g!==-1&&(e=e.substring(g+1),e.length!==0)){e=e.split(",");Object.defineProperty(h,"resourceRaw",{value:e[0]});h.resource=decodeURIComponent(e[0]);for(g=1;g<e.length;g++){var f=/([^=]*)(=?)(.*)/.exec(e[g]),d=decodeURIComponent(f[1]||""),f=decodeURIComponent(f[3]||"");d!==""&&d!=="resource"&&(h[d]=f)}}return h},validateURLScheme:function(i,
h){var g=i;if(i.indexOf("://")===-1){var f=document.createElement("a");f.href=i;g=f.href}f=!1;return(f=h?h.some(function(d){return RegExp("^"+d+":","i").test(g)}):e.test(g))?i:(console.log("Illegal URL Scheme: '"+i+"'"),"")}}});
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(e,i,h,g,f,d,c,b){function a(a,b,c,d,e){this.commandService=a;this.handler=b;this.items=c;this.userData=d;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function k(a,b,c){b.classList.add("commandImage");var d;a.imageClass?(d=document.createElement("span"),b.appendChild(d),d.classList.add(a.spriteClass),d.classList.add(a.imageClass)):(d=new Image,d.alt=a.name,d.name=c,d.id=c,d.src=a.image,b.appendChild(d));return d}function o(a){this._init(a)}function l(a,b,c,d,e,g,j){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=
d!==void 0&&d!==null?d:!1;this.mod4=e!==void 0&&e!==null?e:!1;this.domScope=f.node(g);this.scopeName=j||(g?g.id:null)}function p(a,b){this.token=a;this.parameterName=b}function n(a,b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function m(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 q=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(q){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 d=this._activeBindings[c],e=d.invocation;if(e)if(d=d.command,d.hrefCallback){b(a);a=d.hrefCallback.call(e.handler||window,e);a.then?a.then(function(a){window.open(a)}):window.open(a);
break}else if(d.callback){b(a);var f=this;window.setTimeout(function(){f._invoke(e)},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 d=this._urlBindings[b],e=d.command,f=d.invocation;if(f&&f.parameters&&e.callback){f.parameters.setValue(c.parameterName,c.parameterValue);var g=this;window.setTimeout(function(){g._invoke(f)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,d,e){c?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(c):1)&&b.callback&&this._invoke(new a(this,d,c,null,b),e):(c=this._urlBindings[b])&&c.command&&c.command.callback&&this._invoke(c.invocation,e)},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 d=!1;a.parameters.updateParameters(a);d=this._parameterCollector.collectParameters(a);
if(!d){var e=new c.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),d=e.contentContainer();d.classList.add("parameterPopup");var f=window.document.activeElement,g=this._parameterCollector.getFillFunction(a,function(){f&&f.focus();e.destroy()})(d);e.show();window.setTimeout(function(){g.focus();g.select()},0);d=!0}d||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,d,e,f;for(f in this._activeBindings)if((d=this._activeBindings[f])&&d.keyBinding&&d.command)d.keyBinding.scopeName?(b[d.keyBinding.scopeName]||(b[d.keyBinding.scopeName]=[]),b[d.keyBinding.scopeName].push(d)):(c=h.getUserKeyString(d.keyBinding),e=document.createElement("span"),e.role="listitem",e.appendChild(document.createTextNode(c+" = "+d.command.name)),e.appendChild(document.createElement("br")),
a.appendChild(e));for(var g in b)if(b[g].length&&b[g].length>0){c=document.createElement("h2");a.appendChild(c);c.appendChild(document.createTextNode(g));for(f=0;f<b[g].length;f++)d=b[g][f],c=h.getUserKeyString(d.keyBinding),e=document.createElement("span"),e.role="listitem",e.appendChild(document.createTextNode(c+" = "+d.command.name)),e.appendChild(document.createElement("br")),a.appendChild(e)}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,d,e,f){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;a[b].emptyGroupMessage=f}else a[b]={title:d,position:c,emptyGroupMessage:f,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),d=0;d<c.length;d++)if(c[d].length>1)a[c[d]]||(a[c[d]]={position:0,children:{}}),a=a[c[d]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,d,e,f,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};f&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:f,bindingOnly:e});g&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:g,bindingOnly:e});a.sortedContributions=
null},_checkForTrailingSeparator:function(a,b,c){var d;if(b==="tool"||b==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&d.classList.contains("commandSeparator"))return c?(a.removeChild(d),!1):!0;if(b==="menu"&&(a=f.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],c)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,b,c,d,e,g,j){if(typeof a!=="string")throw"a scope id for rendering must be specified";
b=f.node(b);if(!b)throw"no parent";var k=this._contributionsByScopeId[a];if(!c&&k){var c=k.localSelectionService||this._defaultSelectionService,h=this;c&&c.getSelections(function(c){h.renderCommands(a,b,c,d,e,g)})}else k&&(this._render(this._contributionsByScopeId[a],b,c,d,e||"button",g,j),this._checkForTrailingSeparator(b,e,!0))},destroy:function(a){a=f.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(d,e,f,g,j,k,h){var o=d.sortedContributions;if(!o){var o=[],i=!1,l;for(l in d)if(!d.hasOwnProperty||d.hasOwnProperty(l)){var p=d[l];if(p&&typeof p.position==="number")p.id=l,o.push(p),i=!0}if(i)o.sort(function(a,b){return a.position-b.position}),d.sortedContributions=o}for(d=0;d<o.length;d++){var m;if(o[d].children&&Object.getOwnPropertyNames(o[d].children).length>0){var p=o[d],i=o[d].children,n=this,q;if(j==="tool"||j==="button")if(p.title){q=this._createDropdownMenu(e,
p.title);h&&b.generateNavGrid(h,q.menuButton);var M=i,L=p;window.setTimeout(function(){n._render(M,q.menu,f,g,"menu",k,h);n._checkForTrailingSeparator(q.menu,"menu",!0);if(q.menu.childNodes.length===0)if(L.emptyGroupMessage){if(!q.menuButton.emptyGroupTooltip)q.menuButton.emptyGroupTooltip=new c.Tooltip({node:q.menuButton,text:L.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else h&&b.removeNavGrid(h,q.menuButton),q.menu.parentNode&&q.menu.parentNode.removeChild(q.menu),
q.destroyButton&&q.destroyButton.parentNode&&q.destroyButton.parentNode.removeChild(q.destroyButton);else q.menuButton.style.visibility="visible"},0)}else{var H;e.childNodes.length>0&&!this._checkForTrailingSeparator(e,j)&&(H=this.generateSeparatorImage(e));n._render(i,e,f,g,j,k,h);e.childNodes.length>0&&e.childNodes[e.childNodes.length-1]!==H&&(H=this.generateSeparatorImage(e))}else p.title?(l=document.createElement("li"),e.appendChild(l),p=this._createDropdownMenu(l,p.title,!0),n._render(i,p.menu,
f,g,"menu",k,h),p.menu.childNodes.length===0&&e.removeChild(l)):(e.childNodes.length>0&&this._generateMenuSeparator(e),n._render(i,e,f,g,j,k,h),this._generateMenuSeparator(e))}else{l=(i=this._commandList[o[d].id])?!0:!1;var F=null,F=null;if(i){m=new a(this,g,f,k,i);m.domParent=e;p=l&&(i.visibleWhen?i.visibleWhen(f):!0);if(this._activeBindings[i.id]&&this._activeBindings[i.id].keyBinding)F=this._activeBindings[i.id],F.invocation=p?m:null,F.bindingOnly&&(l=!1);if(this._urlBindings[i.id]&&this._urlBindings[i.id].urlBinding)F=
this._urlBindings[i.id],F.invocation=p?m:null,F.bindingOnly&&(l=!1);l=l&&p}if(l)if(i.choiceCallback){j==="tool"||j==="button"?(l=e,p=!1,e.nodeName.toLowerCase()==="ul"&&(l=document.createElement("li"),e.appendChild(l))):(l=e,p=!0);var N=this;this._createDropdownMenu(l,i.name,p,function(a){this.populateChoicesMenu(a,f,g,k,N)}.bind(i))}else j==="tool"?(l="tool"+i.id+d,i._addTool(e,l,m,h)):j==="button"?(l="button"+i.id+d,i._addButton(e,l,m,h)):j==="menu"&&i._addMenuItem(e,m,h)}}},_createDropdownMenu:function(a,
b,c,e){var a=f.node(a),g,j=document.createElement("span");j.classList.add("dropdownTrigger");c?(j.classList.add("dropdownMenuItem"),g="dropdownSubMenu",c="dropdownArrowRight",j.tabIndex=0,j.role="menuitem"):(j.classList.add("commandButton"),c="dropdownArrowDown",j.tabIndex=0,j.role="button");b=document.createTextNode(b);j.appendChild(b);b=document.createElement("span");b.classList.add(c);j.appendChild(b);c=a;a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):(j.classList.add("commandMargins"),
a=j);c.appendChild(j);g&&c.classList.add(g);g=document.createElement("ul");c.appendChild(g);g.classList.add("dropdownMenu");j.dropdown=new d.Dropdown({dropdown:g,populate:e});g.dropdown=j.dropdown;return{menuButton:j,menu:g,dropdown:j.dropdown,destroyButton:a}},_generateCheckedMenuItem:function(a,b,c,d){var e=document.createElement("li");a.appendChild(e);a=document.createElement("label");a.classList.add("dropdownMenuItem");var f=document.createElement("input");f.type="checkbox";f.role="menuitem";
f.checked=c;f.classList.add("checkedMenuItem");a.appendChild(f);b=document.createTextNode(b);a.appendChild(b);e.appendChild(a);f.addEventListener("change",d,!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;o.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,d,e,f){e.handler=e.handler||this;var g;if(this.hrefCallback){if(g=this._makeLink(a,e,"commandLink"),!g)return}else g=document.createElement("span"),g.tabIndex=f?-1:0,g.role="button",this.hasImage()?(k(this,g,d),this.name&&g.setAttribute("aria-label",this.name)):(d=window.document.createTextNode(this.name),g.appendChild(d),g.classList.add("commandMissingImageButton"),g.classList.add("commandButton")),this._hookCallback(g,
e);e.domNode=g;e.domParent=a;if(this.tooltip)g.commandTooltip=new c.Tooltip({node:g,text:this.tooltip,position:["above","below","right","left"]});a.nodeName.toLowerCase()==="ul"?(d=document.createElement("li"),a.appendChild(d),a=d):g.classList.add("commandMargins");a.appendChild(g);b.generateNavGrid(f,e.domNode)},_addButton:function(a,d,e,f){e.handler=e.handler||this;var g;if(this.hrefCallback)g=this._makeLink(a,e,"commandLink");else if(!this.name&&this.hasImage()){if(g=document.createElement("span"),
g.tabIndex=0,g.role="button",k(this,g,d),this.tooltip&&g.setAttribute("aria-label",this.tooltip),this._hookCallback(g,e),this.tooltip)g.commandTooltip=new c.Tooltip({node:g,text:this.tooltip,position:["above","below","right","left"]})}else g=this._makeButton(a,e,"commandButton"),this._hookCallback(g,e);e.domParent=a;a.nodeName.toLowerCase()==="ul"?(d=document.createElement("li"),a.appendChild(d),a=d):g.classList.add("commandMargins");a.appendChild(g);b.generateNavGrid(f,e.domNode)},_addMenuItem:function(a,
c,d){c.domParent=a;var e,f=a.dropdown;this.hrefCallback?e=this._makeLink(a,c,"dropdownMenuItem",["right","left","above","below"]):(e=this._makeButton(a,c,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(e,c,function(){f.close(!0)}));e.role="menuitem";b.generateNavGrid(d,c.domNode);a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):e.classList.add("commandMargins");a.appendChild(e)},_makeButton:function(a,b,d,e){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var f=document.createTextNode(this.name);a.appendChild(f);d&&a.classList.add(d);if(this.tooltip)a.commandTooltip=new c.Tooltip({node:a,text:this.tooltip,position:e||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,d,e){var f=document.createElement("a");f.id=this.name;d&&f.classList.add(d);f.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){f.href=
a}):f.href=a?a:"#";if(this.tooltip)f.commandTooltip=new c.Tooltip({node:f,text:this.tooltip,position:e||["above","below","right","left"]});return b.domNode=f},_hookCallback:function(a,b,c,d){a.addEventListener("click",function(a){c&&c();b.commandService._invoke(b);d&&d();f.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)c&&c(),b.commandService._invoke(b),d&&d(),f.stop(a)},!1)},populateChoicesMenu:function(a,b,c,d,e){c=this.getChoices(b,c,d);
for(d=0;d<c.length;d++){var g=c[d];if(g.name){var j=document.createElement("li");a.appendChild(j);var k=document.createElement("span");k.tabIndex=0;k.role="menuitem";k.classList.add("dropdownMenuItem");var h=document.createTextNode(g.name);k.appendChild(h);j.appendChild(k);k.choice=g;k.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);k.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,b)},!1)}else e._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")}};o.prototype.constructor=o;l.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(q?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(q&&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;p.prototype={match:function(a){a=g.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};p.prototype.constructor=p;n.prototype={optionsRequested:function(){return this.optionsRequested}};n.prototype.constructor=n;m.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 n(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new m(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};m.prototype.constructor=m;return{CommandService:j,CommandKeyBinding:l,Command:o,CommandInvocation:a,URLBinding:p,ParametersDescription:m,CommandParameter:n}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(e,i,h,g){var f={};(function(){var d=!1;f.updateNavTools=function(c,b,a,f,g){var o=c.getService("orion.page.command"),i=h.node(a);if(i)o.destroy(i);else throw e["could not find toolbar "]+a;o.renderCommands(a,i,g,b,"button");if(f&&(a=h.node(f)))o.destroy(a),o.renderCommands(f,a,null,b,"button");d||(d=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",
function(a){var d=h.node(f);if(d){var e=c.getService("orion.page.command");e.destroy(d);e.renderCommands(f,d,a.selections,b,"button")}}))};f.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new g.Command({name:e["Remove Completed"],tooltip:e["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},
visibleWhen:function(){return!0}});c.addCommand(f);f=new g.Command({name:e.Remove,tooltip:e["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],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;
return!0}});c.addCommand(f);f=new g.Command({name:e.Cancel,tooltip:e["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 d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;
return!0}});c.addCommand(f)}})();return f});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(e,i,h,g,f){function d(c){this._options=c}d.prototype=new g.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");f.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 d=0;d<b.length;d++){var f=b[d],g=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px;";i.style.paddingRight="5px;";i.textContent=f.Name;g.appendChild(i);var p=document.createElement("div");i.appendChild(p);i=document.createElement("span");p.appendChild(i);i.classList.add("imageSprite");var n=document.createElement("span");n.classList.add("primaryColumn");
p.appendChild(n);n.appendChild(document.createTextNode(f.Name));switch(f.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",e["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",e["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",e["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");
i.setAttribute("aria-label",e["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}if(f.error)i=f.error.Message||f.error,f.error.DetailedMessage&&f.error.DetailedMessage!==""&&(i+=": "+f.error.DetailedMessage),p.appendChild(document.createElement("br")),n=document.createElement("span"),n.classList.add("secondaryColumn"),n.style.marginLeft="18px;",p.appendChild(n),n.textContent=i;i=document.createElement("span");
p.appendChild(i);this._commandService.renderCommands("operationsDialogItems",p,{operation:f,deferred:a[d]},this,"tool");c.appendChild(g)}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(e,i,h,g,f){function d(b,a){if(!this._progressPane){this._progressPane=g.node(b);this._operationsDialog=new f.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===g.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=e.Operations,this._progressPane.alt=e.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var f="";for(d in c){var g=c[d];if(g.type&&(g.type==="loadstart"||g.type==="progress")){f="running";break}}switch(f){case "running":this._progressPane.title=e["Operations running"];this._progressPane.alt=e["Operations running"];this._progressPane.setAttribute("aria-valuetext",
e["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=e["Some operations finished with warning"];this._progressPane.alt=e["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",e["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=e["Some operations finished with error"];this._progressPane.alt=e["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",e["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=e.Operations,this._progressPane.alt=e.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/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(e,i,h,g,f,d,c){var b={},a=(new URL(e.toUrl("."),window.location)).href.slice(0,-1);b._cloneItemWithoutChildren=function k(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=k(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,e,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],o=e;if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var t=this.info.validationProperties[d];if(t.source){if(!h(i,t.source,t,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&&o){t=!1;if(i=f.getFilenameContentType(i.Name,o))for(d=0;d<this.info.contentType.length;d++)if(i.id===this.info.contentType[d]){t=!0;break}d=t}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 q(c,i){var t=
b._makeValidator(a,e,f,h);c.visibleWhen=t.validationFunction.bind(t);if(g)if(t.generatesURI.bind(t)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return t.getURI.bind(t)(a)};else{var s=a;c.callback=function(a){var f;if(s.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 r=new i;a.nls?c.getMessageBundle(a.nls).then(function(b){q({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},r)}):q({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},
r);return r};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/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(e,i,h,g,f,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",e=h.node(d);e&&h.empty(e);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 f.ExplorerNavDict(this.model);this.myTree=new g.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 f.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 f=
new d.Command({tooltip:e["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()}}),g=new d.Command({tooltip:e["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(f);b.addCommand(g)};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",f=this.explorer.registry.getService("orion.page.command"),g=document.createElement("td");g.id=b.id+"actionswrapper";d&&g.classList.add(d);this.actionScopeId?f.renderCommands(this.actionScopeId,g,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 g},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 f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=this;e.onclick=function(){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._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"),f=a.getService("orion.page.command");f.destroy(e);this.actionScopeId&&f.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(e,i,h,g){function f(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}();f.prototype=new h.SelectionRenderer;f.prototype.constructor=
f;f.prototype.getLabelColumnIndex=function(){return 0};f.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+e[" [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||e["Choose a Folder"];this.modal=!0;this.messages=e;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 g.Selection(this.serviceRegistry,"orion.remotePrompter.selection"));var d=new f({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/explorers/explorer-table","i18n!orion/navigate/nls/messages,require,orion/Deferred,orion/webui/littlelib,orion/i18nUtil,orion/fileUtils,orion/explorers/explorer".split(","),function(e,i,h,g,f,d,c){function b(a,b,c,d,e,f){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!f}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,g,j,h){b=b||"";if(a.isFile)c.Location.indexOf("/workspace")===0?g.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:e["You cannot copy files directly into the workspace.  Create a folder first."]}):
a.file(function(a){j(c,a,g,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(f.formatMessage(e["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var i=a.createReader(),k=function(c){i.readEntries(function(e){for(var f=0;f<e.length;f++)d(e[f],b+a.name+"/",c,g,j,h)})},o=g.registry.getService("orion.page.progress");c.Location.indexOf("/workspace")===0?o.progress(h.createProject(c.ChildrenLocation,a.name),"Initializing project "+a.name).then(function(a){g.loadResourceList(g.treeRoot.Path,!0);o.progress(h.read(a.ContentLocation,
!0),"Loading project info "+a.name).then(function(a){k(a)})}):o.progress(h.createFolder(c.Location,a.name),"Creating folder "+a.name).then(function(a){g.changedItem(c,!0);k(a)})}}if(this.dragAndDrop){var h=this,i=this.dragAndDrop,m=function(a){b.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(c)this._oldDragLeave&&b.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=m;b.addEventListener("dragleave",m,!1);m=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");g.stop(a)};if(c)this._oldDragEnter&&b.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=m;b.addEventListener("dragenter",m,!1);m=function(a){if(a.dataTransfer.effectAllowed==="all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";g.stop(a)};
if(c&&!this._oldDragOver)b.addEventListener("dragover",m,!1),this._oldDragOver=m;m=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 m=null;typeof c.dataTransfer.items[o].getAsEntry==="function"?m=c.dataTransfer.items[o].getAsEntry():typeof c.dataTransfer.items[o].webkitGetAsEntry==="function"&&(m=c.dataTransfer.items[o].webkitGetAsEntry());m&&d(m,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++)m=c.dataTransfer.files[o],!m.length&&(!m.type||m.type==="")?h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:f.formatMessage(e["Did not drop ${0}.  Folder drop is not supported in this browser."],m.name)}):a.Location.indexOf("/workspace")===0?h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:e["You cannot copy files directly into the workspace.  Create a folder first."]}):
i(a,m,h,m.name.indexOf(".zip")===m.name.length-4&&window.confirm(f.formatMessage(e["Unzip ${0}?"],m.name)));g.stop(c)};if(c)this._oldDrop&&b.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=m;b.addEventListener("drop",m,!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 g.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 f=g.node(this.parentId),i=g.node("progress");if(!i)i=document.createElement("div"),i.id="progress",g.empty(f),f.appendChild(i);g.empty(i);var n=setTimeout(function(){g.empty(i);i.appendChild(document.createTextNode(c))},500),m=this;h.when(a,function(a){m.treeRoot={};
clearTimeout(n);for(var c in a)m.treeRoot[c]=a[c];m.model=new b(m.registry,m.treeRoot,m.fileClient,m.parentId,m.excludeFiles,m.excludeFolders);m.model.processParent(m.treeRoot,a.Children);if(m.dragAndDrop)m._hookedDrag?m._makeDropTarget(m.treeRoot,f,!0):(a=(a=f&&("draggable"in f||"ondragstart"in f&&"ondrop"in f))&&!(!window.File||!window.FileList||!window.FileReader),m._hookedDrag=!0,a?m._makeDropTarget(m.treeRoot,f,!0):(m.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser.")));
m.createTree(m.parentId,m.model,{setFocus:!0,selectionPolicy:m.renderer.selectionPolicy,onCollapse:function(a){if(m.getNavHandler())m.getNavHandler().onCollapse(a)}});if(typeof d==="function")try{d()}catch(e){m.registry&&m.registry.getService("orion.page.message").setErrorMessage(e)}if(typeof m.onchange==="function")m.onchange(m.treeRoot)},function(a){clearTimeout(n);if(a.status&&a.status!==401){try{a=JSON.parse(a.responseText)}catch(b){}g.empty(i);i.appendChild(document.createTextNode(e["Sorry, an error occurred: "]+
a.Message))}else m.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(e,i,h,g,f,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||e["Choose a Folder"];this.modal=!0;this.buttons=[{text:e.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=g.makeRelative(c);this.selection=new f.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(e,i,h){function g(e){this._init(e)}g.prototype=new h.Dialog;g.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>';g.prototype._init=
function(f){var d=this;this.title=f.title?f.title:e["Clone Git Repository"];this.modal=!0;this.messages=e;this.advancedShown=!1;this.alwaysShowAdvanced=f.alwaysShowAdvanced;this.advancedOnly=f.advancedOnly;this.url=f.url;this.serviceRegistry=f.serviceRegistry;this.fileClient=f.fileClient;this.func=f.func;this.buttons=[];this.buttons.push({callback:function(){d.destroy();d._execute()},text:"OK"});this._initialize()};g.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()};g.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)};g.prototype._showAdvanced=function(){this.advancedShown=!0;this.$advancedPane.style.display="";this.$advancedLink.style.display=
"none";this.$advancedLinkHide.style.display=""};g.prototype._hideAdvanced=function(){this.advancedShown=!1;this.$advancedPane.style.display="none";this.$advancedLink.style.display="";this.$advancedLinkHide.style.display="none"};g.prototype._checkNewExisting=function(){this.$isExistingProject.checked?this._openDirectoryPickerDialog():this.$gitName.focus()};g.prototype._showNewProject=function(){this.$isNewProject.checked=!0};g.prototype._openDirectoryPickerDialog=function(){function f(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:e["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(f(b));b.parent&&b.parent.Location!=="/";)d.$shownGitPath.insertBefore(document.createTextNode("/"),
d.$shownGitPath.firstChild),d.$shownGitPath.insertBefore(f(b.parent),d.$shownGitPath.firstChild),b=b.parent}}});this._addChildDialog(c);c.show()};g.prototype.constructor=g;return{CloneGitRepositoryDialog:g}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commands","orion/commonHTMLFragments"],function(e,i,h,g){function f(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 f=0;f<d.length;f++)this.domNode.classList.add(d[f]);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===e.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=g.slideoutHTMLFragment(b.id),f=document.createRange(),f.selectNode(this.domNode),d=f.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}f.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)}};f.prototype.constructor=f;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:f}});
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(e,
i,h,g,f,d,c,b,a,j,k,o,l,p,n,m,q){var r={};(function(){function x(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Message:e["Problem while performing the action"]}}b.HttpCode=a.status;return b}var u=!1;r.updateNavTools=function(a,b,c,d,e,g){var j=f.node(c),h=a.getService("orion.page.command");if(j)h.destroy(j);else throw"could not find toolbar "+c;h.renderCommands(c,j,e,b,"button");if(g&&(c=f.node(g)))h.destroy(c),h.renderCommands(g,c,e,b,"button");if(d&&(e=f.node(d)))h.destroy(d),h.renderCommands(d,
e,null,b,"button");u||(u=!0,a.getService("orion.page.selection").addEventListener("selectionChanged",function(a){var c=f.node(d);c&&(h.destroy(c),h.renderCommands(d,c,a.selections,b,"button"))}))};r.handleKnownHostsError=function(a,b,c,d){if(confirm(g.formatMessage(e["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],b.KeyType,b.Host,b.HostFingerprint))){var f=a.getService("orion.net.ssh");f.addKnownHosts(b.Host+" "+b.KeyType+" "+b.HostKey).then(function(){f.getKnownHosts().then(function(b){c.knownHosts=
b;typeof c.failedOperation!=="undefined"&&a.getService("orion.page.progress").removeOperation(c.failedOperation);d(c)})})}};r.handleSshAuthenticationError=function(b,c,d,e,f){var c=c?c.Url:void 0,g=function(){(new p.GitCredentialsDialog({title:f,serviceRegistry:b,func:e,errordata:d.errordata,failedOperation:d.failedOperation})).show()};d.gitSshUsername&&d.gitSshUsername!==""||d.gitSshPassword&&d.gitSshPassword!==""||d.gitPrivateKey&&d.gitPrivateKey!==""?g():(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})):g()},g)};r.getDefaultSshOptions=function(a,b){var c=new h,d=a.getService("orion.net.ssh"),e=b&&!b.optionsRequested?b.valueFor("sshuser"):"",f=b&&!b.optionsRequested?b.valueFor("sshpassword"):
"";d.getKnownHosts().then(function(a){c.resolve({knownHosts:a,gitSshUsername:e,gitSshPassword:f,gitPrivateKey:"",gitPassphrase:""})});return c};r.handleProgressServiceResponse=function(a,b,c,d,e,f){a&&a.status!==void 0&&(a=x(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;r.handleSshAuthenticationError(c,a.JsonData,b,e,f);break;case 400:if(a.JsonData&&a.JsonData.HostKey){if(a.failedOperation)b.failedOperation=
a.failedOperation;r.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)}};r.gatherSshCredentials=function(b,c,d){var f=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;f.resolve({knownHosts:b,gitSshUsername:a.gitSshUsername,gitSshPassword:a.gitSshPassword,gitPrivateKey:a.gitPrivateKey,gitPassphrase:a.gitPassphrase})})},k=c.errorData;if(k&&k.HostKey)return confirm(g.formatMessage(e["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:""})})}),f;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"):"",f=c.parameters?c.parameters.valueFor("sshpassword"):"",g=c.parameters&&c.parameters.valueFor("saveCredentials")?c.parameters.valueFor("saveCredentials"):!1,h=new a(b);g?h.put(j,{gitSshUsername:e,gitSshPassword:f}).then(function(){i({gitSshUsername:e,gitSshPassword:f,gitPrivateKey:"",gitPassphrase:""})}):i({gitSshUsername:e,gitSshPassword:f,gitPrivateKey:"",gitPassphrase:""})}else(new p.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 f};r.handleGitServiceResponse=function(a,b,c,d){a&&a.status!==void 0&&(a=x(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)}};r.createFileCommands=function(f,l,p){function m(a){var b={Severity:"Error",HTML:!1};try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message?c.Message:e["Problem while performing the action"]}catch(d){b.Message=e["Problem while performing the action"]}f.getService("orion.page.message").setProgressResult(b)}var n=new d.ParametersDescription([new d.CommandParameter("name",
"text",e["Local Branch Name:"])]),n=new d.Command({name:e.Checkout,tooltip:e["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",parameters:n,callback:function(a){var b=a.items,c=function(a,b,c){f.getService("orion.page.progress").showWhile(f.getService("orion.git.provider").checkoutTag(a,b,c),g.formatMessage(e["Checking out tag ${0}"],c)).then(function(){p.changedItem()},m)},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"}});l.addCommand(n);n=new d.Command({name:e.Checkout,tooltip:e["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=f.getService("orion.git.provider"),d=f.getService("orion.page.message"),j=f.getService("orion.page.progress");d.setProgressMessage(b.Name?g.formatMessage(e["Checking out branch ${0}..."],b.Name):e["Checking out branch..."]);b.Type==="Branch"?j.progress(c.checkoutBranch(b.CloneLocation,b.Name),"Checking out branch "+b.Name).then(function(){d.setProgressResult(e["Branch checked out."]);p.changedItem(b.parent)},function(a){m(a)}):j.progress(c.addBranch(b.Repository!==
null?b.Repository.BranchLocation:b.parent.parent.BranchLocation,null,b.Name),"Adding branch "+b.Name).then(function(a){j.progress(c.checkoutBranch(a.CloneLocation,a.Name),"Checking out branch "+b.Name).then(function(){d.setProgressResult(e["Branch checked out."]);p.changedItem(b.Repository?b.Repository.BranchLocation:b.parent.parent.parent)},function(a){m(a)})},function(a){m(a)})},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});l.addCommand(n);n=new d.ParametersDescription([new d.CommandParameter("name",
"text","Name:")]);n=new d.Command({name:e["New Branch"],tooltip:e["Add a new local branch to the repository"],imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:n,callback:function(a){var b=a.items,c=f.getService("orion.page.progress"),d=function(a,d){c.progress(f.getService("orion.git.provider").addBranch(a,d),"Adding branch "+d).then(function(){p.changedItem(b)},m)},e;e=b.Type==="Clone"?b.BranchLocation:b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&d(e,a.parameters.valueFor("name"))},
visibleWhen:function(a){return a.GroupNode&&a.Name==="Branches"||a.Type==="Clone"&&p.parentId==="artifacts"}});l.addCommand(n);n=new d.Command({name:e.Delete,tooltip:e["Delete the local branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(a){var b=a.items,a=f.getService("orion.page.progress");confirm(g.formatMessage(e["Are you sure you want to delete branch ${0}?"],b.Name))&&a.progress(f.getService("orion.git.provider").removeBranch(b.Location),
"Removing branch "+b.Name).then(function(){p.changedItem?p.changedItem(b.parent):p.displayBranches&&p.displayBranches(b.ParentLocation,null)},m)},visibleWhen:function(a){return a.Type==="Branch"&&!a.Current}});l.addCommand(n);n=new d.Command({name:e.Delete,tooltip:e["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(a){var b=a.items,c=f.getService("orion.page.progress");confirm(g.formatMessage(e["You're going to delete remote branch ${0} and push the change."],
b.Name)+"\n\n"+e["Are you sure?"])&&r.getDefaultSshOptions(f).then(function(a){var d=arguments.callee,g=f.getService("orion.git.provider"),j=f.getService("orion.page.message"),g=c.progress(g.doPush(b.Location,"",!1,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Removing remote branch: "]+b.Name);j.createProgressMonitor(g,e["Removing remote branch: "]+b.Name);g.then(function(c){r.handleProgressServiceResponse(c,a,f,function(a){a.Result.Severity=="Ok"&&p.changedItem(b.parent)},
d,e["Delete Remote Branch"])},function(c){r.handleProgressServiceResponse(c,a,f,function(){},d,e["Removing remote branch: "]+b.Name)})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});l.addCommand(n);n=new d.ParametersDescription([new d.CommandParameter("name","text","Name:"),new d.CommandParameter("url","url","Url:")]);n=new d.Command({name:e["New Remote"],tooltip:e["Add a new remote to the repository"],imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:n,callback:function(a){var b=
a.items,c=f.getService("orion.page.progress"),d=function(a,d,e){c.progress(f.getService("orion.git.provider").addRemote(a,d,e),"Adding remote "+a).then(function(){p.changedItem(b)},m)},e;e=b.Type==="Clone"?b.RemoteLocation:b.Location;a.parameters.valueFor("name")&&a.parameters.valueFor("url")&&d(e,a.parameters.valueFor("name"),a.parameters.valueFor("url"))},visibleWhen:function(a){return a.GroupNode&&a.Name==="Remotes"||a.Type==="Clone"&&p.parentId==="artifacts"}});l.addCommand(n);n=new d.Command({name:e.Delete,
tooltip:e["Delete the remote from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(a){var b=a.items;confirm(g.formatMessage(e["Are you sure you want to delete remote ${0}?"],b.Name))&&f.getService("orion.page.progress").progress(f.getService("orion.git.provider").removeRemote(b.Location),"Removing remote "+b.Name).then(function(){p.changedItem(b.parent)},m)},visibleWhen:function(a){return a.Type==="Remote"}});l.addCommand(n);n=new d.Command({name:e.Pull,
tooltip:e["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;r.getDefaultSshOptions(f).then(function(a){var g=arguments.callee,j=f.getService("orion.git.provider"),h=f.getService("orion.page.message"),j=f.getService("orion.page.progress").progress(j.doPull(c,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Pulling: "]+d);h.createProgressMonitor(j,
e["Pulling: "]+d);var i;j.then(function(c){r.handleProgressServiceResponse(c,a,f,function(){b.Type==="Clone"&&p.changedItem(b)},g,"Pull Git Repository")},function(c){if(i)c.failedOperation=i;r.handleProgressServiceResponse(c,a,f,function(){p.changedItem(b)},g,e["Pull Git Repository"])},function(a){i=a.Location})})},visibleWhen:function(a){return a.Type==="Clone"}});l.addCommand(n);n=new d.Command({name:e["Git Log"],tooltip:e["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"}});l.addCommand(n);n=new d.Command({name:e["Git Log"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["Git Status"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["Show in Navigator"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["Compare With Each Other"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(a){a=a.items;return f.getService("orion.page.progress").progress(f.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 p.isDirectory?!1:Array.isArray(a)&&a.length===2&&a[0].Type==="Commit"&&a[1].Type==="Commit"?!0:!1}});l.addCommand(n);n=new d.Command({name:e["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&&!p.isDirectory}});l.addCommand(n);n=new d.Command({name:e.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&&!p.isDirectory}});l.addCommand(n);n=new d.Command({name:e.Fetch,tooltip:e["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(b){var c=
b.items,g=c.Location,j=c.Name,h=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,l.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,l.collectParameters(c)):(new a(f)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",
e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser",
"text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=b.failedOperation;l.collectParameters(c)})},i=function(){b.parameters&&b.parameters.optionsRequested?(b.parameters=null,b.optionsRequested=!0,l.collectParameters(b)):(b.errorData&&b.errorData.failedOperation&&f.getService("orion.page.progress").removeOperation(b.errorData.failedOperation),r.gatherSshCredentials(f,b).then(function(a){var d=
f.getService("orion.git.provider"),i=f.getService("orion.page.message"),a=f.getService("orion.page.progress").progress(d.doFetch(g,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Fetching remote: "]+j);i.createProgressMonitor(a,e["Fetching remote: "]+j);a.then(function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem(c)},function(a){h(a,b)})},function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem(c)},function(a){h(a,b)})})}))};if(b.items.GitUrl)i();
else{var k=f.getService("orion.git.provider"),o=f.getService("orion.page.progress");o.progress(k.getGitRemote(g),"Getting remote details "+j).then(function(a){o.progress(k.getGitClone(a.CloneLocation),"Getting git repository information "+a.Name).then(function(a){b.items.GitUrl=a.Children[0].GitUrl;i()},m)},m)}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});l.addCommand(n);n=new d.Command({name:e["Force Fetch"],
imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",tooltip:e["Fetch from the remote branch into your remote tracking branch overriding its current content"],id:"eclipse.orion.git.fetchForce",callback:function(b){if(confirm(e["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+"\n\n"+e["Are you sure?"])){var c=b.items,g=c.Location,j=c.Name,h=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=
b.failedOperation,l.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,l.collectParameters(c)):(new a(f)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword",
"password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=
b.failedOperation;l.collectParameters(c)})},i=function(){b.parameters&&b.parameters.optionsRequested?(b.parameters=null,b.optionsRequested=!0,l.collectParameters(b)):(b.errorData&&b.errorData.failedOperation&&f.getService("orion.page.progress").removeOperation(b.errorData.failedOperation),r.gatherSshCredentials(f,b).then(function(a){var d=f.getService("orion.git.provider"),i=f.getService("orion.page.progress"),k=f.getService("orion.page.message"),a=i.progress(d.doFetch(g,!0,a.gitSshUsername,a.gitSshPassword,
a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Fetching remote: "]+j);k.createProgressMonitor(a,e["Fetching remote: "]+j);a.then(function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem(c)},function(a){h(a,b)})},function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem(c)},function(a){h(a,b)})})}))};if(b.items.GitUrl)i();else{var k=f.getService("orion.git.provider");k.getGitRemote(g).then(function(a){k.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}});l.addCommand(n);n=new d.Command({name:e.Merge,tooltip:e["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=f.getService("orion.git.provider"),d=f.getService("orion.page.progress"),j=f.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 f=b.HeadLocation.replace("commit/HEAD","status");d.Severity="Warning";d.HTML=!0;d.Message="<span>"+a.Result;if(a.FailingPaths){var h="",k=!0,o;for(o in a.FailingPaths)k||(h+=", "),k=!1,h+=o;k||(d.Message+=". "+g.formatMessage(e["Failing paths: ${0}"],h))}d.Message+=g.formatMessage(e[". Go to ${0}."],
'<a href="'+i.toUrl(c.statusUILocation)+"#"+f+'">'+e["Git Status page"]+"</a>")+"</span>"}else if(a.error)f=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+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+f+'">'+e["Git Status page"]+"</a>")+
"</span>";j.setProgressResult(d);p.changedItem(b)},function(a,d){var j=[],h=b.HeadLocation.replace("commit/HEAD","status");j.Severity="Error";j.HTML=!0;j.Message="<span>"+JSON.stringify(d.xhr.responseText).DetailedMessage+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+e["Git Status page"]+"</a>")+".</span>";f.getService("orion.page.message").setProgressResult(j);p.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}});l.addCommand(n);n=new d.Command({name:e["Merge Squash"],tooltip:e["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=f.getService("orion.git.provider"),d=f.getService("orion.page.progress"),j=f.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 f=b.HeadLocation.replace("commit/HEAD","status");d.Severity="Warning";d.HTML=!0;d.Message="<span>"+a.Result+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+f+'">'+e["Git Status page"]+"</a>")+"</span>"}else if(a.error)f=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+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+f+'">'+e["Git Status page"]+"</a>")+"</span>";j.setProgressResult(d);p.changedItem(b)},function(a,d){var j=[],h=b.HeadLocation.replace("commit/HEAD","status");j.Severity="Error";j.HTML=!0;j.Message="<span>"+JSON.stringify(d.xhr.responseText).DetailedMessage+
g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+h+'">'+e["Git Status page"]+"</a>")+".</span>";f.getService("orion.page.message").setProgressResult(j);p.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}});l.addCommand(n);n=new d.Command({name:e.Rebase,tooltip:e["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=f.getService("orion.page.message"),d=f.getService("orion.page.progress").progress(f.getService("orion.git.provider").doRebase(b.HeadLocation,b.Name,"BEGIN"),b.Name?e["Rebase on top of "]+b.Name:e.Rebase);a.createProgressMonitor(d,b.Name?e["Rebase on top of "]+b.Name:e.Rebase);d.then(function(a){var d=[],j=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+e[". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing"]+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_WRONG_REPOSITORY_STATE"?(d.Severity="Error",d.HTML=!0,
d.Message="<span>"+a.Result+e[". Repository state is invalid (i.e. already during rebasing)"]+g.formatMessage(". Go to ${0}.",'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_UNMERGED_PATHS"?(d.Severity="Error",d.HTML=!0,d.Message="<span>"+a.Result+e[". Repository contains unmerged paths"]+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_PENDING_CHANGES"?
(d.Severity="Error",d.HTML=!0,d.Message="<span>"+a.Result+e[". Repository contains pending changes. Please commit or stash them"]+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">Git Status page</a>')+".</span>"):(d.Severity="Warning",d.HTML=!0,d.Message="<span>"+a.Result+g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+e["Git Status page"]+"</a>")+".</span>");f.getService("orion.page.message").setProgressResult(d);p.changedItem(b)},
m)},visibleWhen:function(a){this.tooltip=e["Rebase your commits by removing them from the active branch, "]+e["starting the active branch again based on the latest state of '"]+a.Name+"' "+e["and applying each commit again to the updated active branch."];return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});l.addCommand(n);n=new d.Command({name:e["Push All"],tooltip:e["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,g,i=b.items;if(i.toRef)i=i.toRef;i.CloneLocation.split("/");var o=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,l.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,c.errorData.failedOperation=b.failedOperation,l.collectParameters(c)):(new a(f)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword",
"password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"])],
{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;c.errorData.failedOperation=b.failedOperation;l.collectParameters(c)})};if(b.parameters&&b.parameters.optionsRequested)b.parameters=null,b.optionsRequested=!0,l.collectParameters(b);else{var n=f.getService("orion.git.provider"),m=f.getService("orion.page.progress");
b.errorData&&b.errorData.failedOperation&&m.removeOperation(b.errorData.failedOperation);var q=function(a,c,d,g,j){var h=f.getService("orion.page.message"),a=m.progress(n.doPush(c,d,!0,j,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Pushing remote: "]+g);h.createProgressMonitor(a,e["Pushing remote: "]+g);a.then(function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem()},function(a){o(a,b)})},function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem()},
function(a){o(a,b)})})};m.progress(n.getGitClone(i.CloneLocation),"Getting git repository details "+i.Name).then(function(a){var d=a.Children[0].RemoteLocation,o=a.Children[0].ConfigLocation,l=function(a){handleProgressServiceResponse(a,{},f)};r.gatherSshCredentials(f,b).then(function(a){var p=new h;if(i.RemoteLocation.length===1&&i.RemoteLocation[0].Children.length===1)p=m.progress(n.getGitRemote(d),"Getting git remote details "+i.Name);else{var r={};r.Children=i.RemoteLocation;p.resolve(r)}p.then(function(d){c?
q(a,c.Location,"HEAD",c.Name,!1):(d=new k.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:f,gitClient:n,treeRoot:{Children:d.Children},hideNewBranch:!1,func:function(c,d,e){g=c===null?e:c;var f="branch."+i.Name+".remote";m.progress(n.addCloneConfigurationProperty(o,f,g.parent.Name),"Adding git configuration property "+i.Name).then(function(){b.targetBranch=g;q(a,g.Location,"HEAD",g.Name,!1)},function(c){c.status===409?n.getGitCloneConfig(o).then(function(c){if(c.Children)for(var d=
0;d<c.Children.length;d++)if(c.Children[d].Key===f){m.progress(n.editCloneConfigurationProperty(c.Children[d].Location,g.parent.Name),"Updating configuration property "+g.parent.Name).then(function(){b.targetBranch=g;q(a,g.Location,"HEAD",g.Name,!1)},l);break}},l):l(erry)})}}),i.RemoteLocation.length===1&&i.RemoteLocation[0].Children.length===1&&(d=new j.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:f,gitClient:n,dialog:d,location:i.RemoteLocation[0].Children[0].Name,func:function(){b.targetBranch=
i.RemoteLocation[0].Children[0];q(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}});l.addCommand(n);n=new d.Command({name:e["Force Push All"],tooltip:e["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,g=b.targetBranch;if(!c)if(confirm(e["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+e["Are you sure?"]))c=b.confirmedWarnings=!0;else return;var i,o=b.items;if(o.toRef)o=o.toRef;var n=o.CloneLocation.split("/"),m=function(b,c){b.JsonData.HostKey?(c.parameters=null,c.errorData=b.JsonData,l.collectParameters(c)):c.optionsRequested?(c.errorData=b.JsonData,
l.collectParameters(c)):(new a(f)).isEnabled().then(function(a){c.parameters=a?b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",
e["Don't prompt me again:"])],{hasOptionalParameters:!0}):b.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0});c.errorData=b.JsonData;l.collectParameters(c)})};if(b.parameters&&b.parameters.optionsRequested)b.parameters=null,
b.optionsRequested=!0,l.collectParameters(b);else{var q=f.getService("orion.git.provider"),v=f.getService("orion.page.progress"),u=function(a,c,d,g,j){var h=f.getService("orion.page.message"),a=v.progress(q.doPush(c,d,!0,j,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Pushing remote: "]+g);h.createProgressMonitor(a,e["Pushing remote: "]+g);a.then(function(a){r.handleGitServiceResponse(a,f,function(){p.changedItem()},function(a){m(a,b)})},function(a){r.handleGitServiceResponse(a,
f,function(){p.changedItem(o)},function(a){m(a,b)})})};v.progress(q.getGitClone(o.CloneLocation),"Getting git repository details "+o.Name).then(function(a){var c=a.Children[0].RemoteLocation,d=a.Children[0].ConfigLocation;r.gatherSshCredentials(f,b).then(function(a){var l=new h;if(o.RemoteLocation.length===1&&o.RemoteLocation[0].Children.length===1)l=v.progress(q.getGitRemote(c),"Getting remote details "+o.Name);else{var p={};p.Children=o.RemoteLocation;l.resolve(p)}l.then(function(c){g?u(a,g.Location,
"HEAD",g.Name,!0):(c=new k.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:f,gitClient:q,treeRoot:{Children:c.Children},hideNewBranch:!1,func:function(c,e,f){i=c===null?f:c;var g="/gitapi/config/branch."+o.Name+".remote/clone/file/"+n[4];v.progress(q.addCloneConfigurationProperty(d,"branch."+o.Name+".remote",i.parent.Name),"Setting git configuration property "+o.Name).then(function(){b.targetBranch=i;u(a,i.Location,"HEAD",i.Name,!0)},function(c){c.status===409&&v.progres(q.editCloneConfigurationProperty(g,
i.parent.Name),"Setting git configuration property "+i.parent.Name).then(function(){b.targetBranch=i;u(a,i.Location,"HEAD",i.Name,!0)})})}}),o.RemoteLocation.length===1&&o.RemoteLocation[0].Children.length===1&&(c=new j.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:f,gitClient:q,dialog:c,location:o.RemoteLocation[0].Children[0].Name,func:function(){b.targetBranch=o.RemoteLocation[0].Children[0];u(a,o.RemoteLocation[0].Children[0].Location,"HEAD",o.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}});l.addCommand(n);n=new d.Command({name:e["< Previous Page"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["Next Page >"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["< Previous Page"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e["Next Page >"],tooltip:e["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}});l.addCommand(n);n=new d.Command({name:e.Reset,
tooltip:e["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(e["The content of your active branch will be replaced with "]+b.Name+". "+e["All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?"])){var a=f.getService("orion.git.provider"),c=f.getService("orion.page.message"),
a=f.getService("orion.page.progress").progress(a.resetIndex(b.IndexLocation,b.Name),"Resetting git index for "+b.Name);c.createProgressMonitor(a,e["Resetting index..."]);a.then(function(){p.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"}});l.addCommand(n);n=new d.ParametersDescription([new d.CommandParameter("name",
"text",e["Name:"])]);n=new d.Command({name:e.Tag,tooltip:e["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:n,callback:function(a){var b=a.items,c=function(a,c){f.getService("orion.page.progress").progress(f.getService("orion.git.provider").doAddTag(a,c),"Adding tag "+c).then(function(){p.changedItem(b)},m)},d=b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&c(d,a.parameters.valueFor("name"))},
visibleWhen:function(a){return a.Type==="Commit"}});l.addCommand(n);n=new d.Command({name:e.Delete,tooltip:e["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(a){var b=a.items;confirm(g.formatMessage(e["Are you sure you want to delete tag ${0}?"],b.Name))&&f.getService("orion.page.progress").progress(f.getService("orion.git.provider").doRemoveTag(b.Location),"Removing tag "+b.Name).then(function(){p.changedItem(b.parent)},m)},visibleWhen:function(a){return a.Type===
"Tag"}});l.addCommand(n);n=new d.ParametersDescription([new d.CommandParameter("reviewer","text",e["Reviewer name"])],{hasOptionalParameters:!0});n=new d.Command({name:e["Ask for review"],tooltip:e["Ask for review tooltip"],imageClass:"core-sprite-tag",id:"eclipse.orion.git.askForReviewCommand",parameters:n,callback:function(a){var b=f.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 e=a.items,g=e.Location.replace(e.Name,"HEAD"),j=e.AuthorName,h=e.Name,k=e.Message;b.progress(f.getService("orion.git.provider").getGitClone(e.CloneLocation),"Getting repository details "+e.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+"_"+e.Name;b.progress(f.getService("orion.git.provider").sendCommitReviewRequest(h,g,d,o,j,k),"Sending review request for "+
h).then(function(a){var b={Severity:"Ok",HTML:!1};b.Message=a.Result;f.getService("orion.page.message").setProgressResult(b)},m)})};if(a.parameters.valueFor("reviewer")&&!a.parameters.optionsRequested)d(a.parameters.valueFor("reviewer"));else{var g=a.items;b.progress(f.getService("orion.git.provider").getGitClone(g.CloneLocation),"Getting git details "+g.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 o.ReviewRequestDialog({title:e["Contribution Review Request"],url:b+"/git/reviewRequest.html#"+a+"_"+g.Name,func:d})).show()},m)}},visibleWhen:function(a){return a.Type==="Commit"}});l.addCommand(n);n=new d.Command({name:e["Cherry-Pick"],tooltip:e["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=f.getService("orion.page.progress"),d=f.getService("orion.git.provider"),
j=b.Location.replace(b.Name,"HEAD");a.progress(d.doCherryPick(j,b.Name),"Cherry picking "+b.Name).then(function(a){var d=[],j=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>"+e["Nothing changed."]+"</span>");else if(a.Result==="CONFLICTING")d.Severity="Warning",d.HTML=!0,d.Message="<span>"+a.Result+e[". Some conflicts occurred"]+ +g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+
"#"+j+'">'+e["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 h="",k=!0,o;for(o in a.FailingPaths)k||(h+=", "),k=!1,h+=o;k||(d.Message+=". "+g.formatMessage(e["Failing paths: ${0}"],h))}d.Message+=g.formatMessage(e[". Go to ${0}."],'<a href="'+i.toUrl(c.statusUILocation)+"#"+j+'">'+e["Git Status page"]+"</a>")+".</span>"}else d.Severity="Warning",d.HTML=!1,d.Message=a.Result;f.getService("orion.page.message").setProgressResult(d)},
m)},visibleWhen:function(a){return a.Type==="Commit"}});l.addCommand(n)};r.createGitClonesCommands=function(b,c,f,j,i,k){function o(a){var c={Severity:"Error",HTML:!1};try{var d=JSON.parse(a.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:e["Problem while performing the action"]}catch(f){c.Message=e["Problem while performing the action"]}b.getService("orion.page.message").setProgressResult(c)}j=new d.ParametersDescription([new d.CommandParameter("key","text",e["Key:"]),
new d.CommandParameter("value","text",e["Value:"])]);j=new d.Command({name:e["New Configuration Entry"],tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",parameters:j,callback:function(a){var c=a.items,d=b.getService("orion.git.provider"),e=b.getService("orion.page.progress");a.parameters.valueFor("key")&&a.parameters.valueFor("value")&&e.progress(d.addCloneConfigurationProperty(c.ConfigLocation,a.parameters.valueFor("key"),
a.parameters.valueFor("value")),"Setting configuration propetry: "+a.parameters.valueFor("key")).then(function(){f.changedItem(c)},o)}});c.addCommand(j);j=new d.ParametersDescription([new d.CommandParameter("value","text",e["Value:"])]);j=new d.Command({name:e.Edit,tooltip:e["Edit the configuration entry"],imageClass:"core-sprite-edit",id:"eclipse.orion.git.editConfigEntryCommand",parameters:j,callback:function(a){var c=a.items,d=b.getService("orion.git.provider"),e=b.getService("orion.page.progress");
a.parameters.valueFor("value")&&e.progress(d.editCloneConfigurationProperty(c.Location,a.parameters.valueFor("value")),"Editing configuration property "+c.Key).then(function(){f.changedItem(c)},o)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(j);j=new d.Command({name:e.Delete,tooltip:e["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(g.formatMessage(e["Are you sure you want to delete ${0}?"],c.Key))&&d.progress(a.deleteCloneConfigurationProperty(c.Location),"Deleting configuration property "+c.Key).then(function(){f.changedItem(c)},o)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(j);j=new d.ParametersDescription([new d.CommandParameter("url","url",e["Repository URL:"])],{hasOptionalParameters:!0});j=new d.Command({name:e["Clone Repository"],tooltip:e["Clone an existing Git repository to a folder"],
id:"eclipse.cloneGitRepository",parameters:j,callback:function(a){var c=b.getService("orion.git.provider"),d=b.getService("orion.page.progress"),g=function(a,g,j){r.getDefaultSshOptions(b).then(function(h){var i=arguments.callee,k=d.progress(c.cloneGitRepository(j,a,g,f.defaultPath,h.gitSshUsername,h.gitSshPassword,h.knownHosts,h.gitPrivateKey,h.gitPassphrase),"Cloning repository "+j);b.getService("orion.page.message").createProgressMonitor(k,e["Cloning repository: "]+a);k.then(function(a){r.handleProgressServiceResponse(a,
h,b,function(){f.changedItem&&f.changedItem()},i,e["Clone Git Repository"])},function(a){r.handleProgressServiceResponse(a,h,b,function(){},i,e["Clone Git Repository"])})})};a.parameters.valueFor("url")&&!a.parameters.optionsRequested?g(a.parameters.valueFor("url")):(new l.CloneGitRepositoryDialog({serviceRegistry:b,fileClient:k,url:a.parameters.valueFor("url"),alwaysShowAdvanced:a.parameters.optionsRequested,func:g})).show()},visibleWhen:function(){return!0}});c.addCommand(j);j=new d.Command({name:e["Clone Repository"],
tooltip:e["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:k,url:a.userData,alwaysShowAdvanced:!1,func:function(a,g,j){r.getDefaultSshOptions(b).then(function(h){var i=arguments.callee,k=d.progress(c.cloneGitRepository(j,a,g,f.defaultPath,h.gitSshUsername,h.gitSshPassword,h.knownHosts,h.gitPrivateKey,
h.gitPassphrase),"Cloning git repository "+j);b.getService("orion.page.message").createProgressMonitor(k,e["Cloning repository: "]+a);k.then(function(a){r.handleProgressServiceResponse(a,h,b,function(){f.changedItem&&f.changedItem()},i,e["Clone Git Repository"])},function(a){r.handleProgressServiceResponse(a,h,b,function(){},i,e["Clone Git Repository"])})})}})).show()},visibleWhen:function(){return!0}});c.addCommand(j);j=new d.Command({name:e["Add Remote"],tooltip:e["Add a new remote to the repository"],
id:"eclipse.addRemoteReviewRequestCommand",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",callback:function(g){if(g.parameters&&g.parameters.valueFor("remoteName"))g.remoteName=g.parameters.valueFor("remoteName");var j=function(f,g){f.JsonData.HostKey?(g.parameters=null,g.errorData=f.JsonData,c.collectParameters(g)):g.optionsRequested?(g.errorData=f.JsonData,c.collectParameters(g)):(new a(b)).isEnabled().then(function(a){g.parameters=a?f.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword",
"password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"]),new d.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):f.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",e["SSH Password:"])],
{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",e["SSH User Name:"]),new d.CommandParameter("sshpassword","password",e["SSH Password:"])],{hasOptionalParameters:!0});g.errorData=f.JsonData;c.collectParameters(g)})};if(g.parameters&&g.parameters.optionsRequested)g.parameters=null,g.optionsRequested=!0,c.collectParameters(g);else{var h=function(a,c,d){var h=b.getService("orion.page.progress");h.progress(b.getService("orion.git.provider").addRemote(a,
c,g.userData),"Adding git remote "+c).then(function(){r.gatherSshCredentials(b,g).then(function(a){b.getService("orion.git.provider").getGitRemote(d.RemoteLocation).then(function(i){for(var k,l=0;l<i.Children.length;l++)i.Children[l].Name===c&&(k=i.Children[l]);var n=b.getService("orion.git.provider"),i=b.getService("orion.page.message"),l=h.progress(n.doFetch(k.Location,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),"Fetching remote "+c);i.createProgressMonitor(l,
e["Fetching remote: "]+k.Location);l.then(function(a){r.handleGitServiceResponse(a,b,function(){h.progress(n.getGitRemote(k.Location),"Getting remote details "+c).then(function(){f.changedItem(d)},o)},function(a){j(a,g)})},function(a){r.handleGitServiceResponse(a,b,function(){f.changedItem(d)},function(a){j(a,g)})})})})},o)};g.remoteName?h(g.items.RemoteLocation,g.remoteName,g.items):(g.parameters=new d.ParametersDescription([new d.CommandParameter("remoteName","text",e["Remote Name:"])],{hasOptionalParameters:!1}),
c.collectParameters(g))}},visibleWhen:function(){return!0}});c.addCommand(j);j=new d.ParametersDescription([new d.CommandParameter("folderName","text",e["New folder:"])],{hasOptionalParameters:!0});j=new d.Command({name:e["Init Repository"],tooltip:e["Create a new Git repository in a new folder"],id:"eclipse.initGitRepository",parameters:j,callback:function(a){var c=b.getService("orion.git.provider"),d=b.getService("orion.page.progress"),g=function(a,g,j){r.getDefaultSshOptions(b).then(function(h){var i=
arguments.callee,k=d.progress(c.cloneGitRepository(j,a,g,f.defaultPath),e["Initializing repository: "]+j);b.getService("orion.page.message").createProgressMonitor(k,e["Initializing repository: "]+j);k.then(function(a){r.handleProgressServiceResponse(a,h,b,function(){f.changedItem&&f.changedItem()},i,e["Init Git Repository"])},function(a){r.handleProgressServiceResponse(a,h,b,function(){},i,e["Init Git Repository"])})})};a.parameters.valueFor("folderName")&&!a.parameters.optionsRequested?g(null,null,
a.parameters.valueFor("folderName")):(new l.CloneGitRepositoryDialog({serviceRegistry:b,title:e["Init Git Repository"],fileClient:k,advancedOnly:!0,func:g})).show()},visibleWhen:function(){return!0}});c.addCommand(j);j=new d.Command({name:e.Delete,tooltip:e["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(g.formatMessage(e["Are you sure you want do delete ${0} repositories?"],c.length)))for(var j=0,h=0;h<c.length;h++)d.progress(a.removeGitRepository(c[h].Location),"Removing repository "+c.Name).then(function(){j++;j>=c.length&&f.changedItem&&f.changedItem()},o)}else confirm(g.formatMessage(e["Are you sure you want to delete ${0}?"],c.Name))&&d.progress(a.removeGitRepository(c.Location),"Removing repository "+c.Name).then(function(){f.changedItem&&f.changedItem()},o)}});
c.addCommand(j);j=new d.Command({name:e["Apply Patch"],tooltip:e["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 q.ApplyPatchDialog({title:e["Apply Patch"],diffLocation:a.DiffLocation})).show()},visibleWhen:function(a){return a.Type==="Clone"}});c.addCommand(j);j=new d.ParametersDescription([new d.CommandParameter("commitName",
"text",e["Commit name:"])],{hasOptionalParameters:!0});j=new d.Command({name:e["Open Commit"],tooltip:e["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:j,callback:function(a){var c=b.getService("orion.page.progress"),d=function(f,g,j){j==null&&(j=new h);f.length>0?c.progress(b.getService("orion.git.provider").doGitLog("/gitapi/commit/"+a.parameters.valueFor("commitName")+f[0].ContentLocation+
"?page=1&pageSize=1",null,null,e["Looking for the commit"]),"Looking for commit "+a.parameters.valueFor("commitName")).then(function(a){j.resolve(a.Children[0].Location)},function(){d(f.slice(1),g,j)}):j.reject();return j},f=function(c){a.parameters.optionsRequested?(new n.OpenCommitDialog({repositories:c,serviceRegistry:b,commitName:a.parameters.valueFor("commitName")})).show():(b.getService("orion.page.message").setProgressMessage(e["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=e["No commits found"];b.getService("orion.page.message").setProgressResult(a)}))};if(a.items.Type==="Clone"){var g=[a.items];f(g)}else a.items.CloneLocation?c.progress(b.getService("orion.git.provider").getGitClone(a.items.CloneLocation),"Getting git repository details").then(function(a){f(a.Children)}):(g=a.items,f(g))},visibleWhen:function(a){return a.Type==="Clone"||a.CloneLocation||
a.length>1&&a[0].Type==="Clone"}});c.addCommand(j)};r.createGitStatusCommands=function(a,b,f){function g(b){var c={Severity:"Error",HTML:!1};try{var d=JSON.parse(b.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:e["Problem while performing the action"]}catch(f){c.Message=e["Problem while performing the action"]}a.getService("orion.page.message").setProgressResult(c)}function j(a){Array.isArray(a)||(a=[a]);return a}function h(b,c){var d=a.getService("orion.page.message"),
j=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doRebase(b,"",c),"Rebasing git repository");d.createProgressMonitor(j,c);j.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);f.changedItem({})}if(b.Result==="STOPPED")c=[],c.Severity="Warning",c.HTML=!1,c.Message=b.Result+e[". Repository still contains conflicts."],
a.getService("orion.page.message").setProgressResult(c),f.changedItem({});else if(b.Result==="FAILED_UNMERGED_PATHS")c=[],c.Severity="Error",c.HTML=!1,c.Message=b.Result+e[". Repository contains unmerged paths. Resolve conflicts first."],a.getService("orion.page.message").setProgressResult(c)},g)}var i=new d.Command({name:e.Stage,tooltip:e["Stage the change"],imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(b){var c=j(b.items),d=a.getService("orion.page.message"),
h=a.getService("orion.page.progress");if(c.length===1)b=h.progress(a.getService("orion.git.provider").stage(c[0].indexURI),e["Staging changes"]),d.createProgressMonitor(b,e["Staging changes"]);else{for(var i=[],k=0;k<c.length;k++)i[k]=c[k].name;b=h.progress(a.getService("orion.git.provider").stageMultipleFiles(b.userData.Clone.IndexLocation,i),e["Staging changes"]);d.createProgressMonitor(b,"Staging changes")}b.then(function(){f.changedItem(c)},g)},visibleWhen:function(a){a=j(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(i);i=new d.Command({name:e.Unstage,tooltip:e["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(b){var c=j(b.items),d=a.getService("orion.page.message"),h=a.getService("orion.page.progress");if(c.length===1)b=h.progress(a.getService("orion.git.provider").unstage(c[0].indexURI,c[0].name),"Unstaging changes");else{for(var i=
[],k=0;k<c.length;k++)i[k]=c[k].name;b=h.progress(a.getService("orion.git.provider").unstage(b.userData.Clone.IndexLocation,i),"Unstaging changes")}d.createProgressMonitor(b,e["Staging changes"]);b.then(function(){f.changedItem(c)},g)},visibleWhen:function(a){a=j(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(i);i=new d.ParametersDescription([new d.CommandParameter("name","text",e["Commit message:"],"",4),new d.CommandParameter("amend",
"boolean",e["Amend:"],!1)],{hasOptionalParameters:!0});i=new d.Command({name:"Commit",tooltip:"Commit",id:"eclipse.orion.git.commitCommand",parameters:i,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)),e["Committing changes"]);d.createProgressMonitor(b,e["Committing changes"]);b.then(function(){f.changedItem(c)},g)},
j={};j.Message=b.parameters.valueFor("name");j.Amend=b.parameters.valueFor("amend");for(var h=c.Clone.Config,i=0;i<h.length;i++)if(h[i].Key==="user.name")j.CommitterName=h[i].Value,j.AuthorName=h[i].Value;else if(h[i].Key==="user.email")j.CommitterEmail=h[i].Value,j.AuthorEmail=h[i].Value;j.Message&&j.CommitterName&&j.CommitterEmail&&!b.parameters.optionsRequested?d(j):(new m.CommitDialog({body:j,func:d})).show()},visibleWhen:function(){return!0}});b.addCommand(i);i=new d.Command({name:e.Reset,tooltip:e["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(e["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+"\n"+e["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"),e["Resetting local changes"]);
b.createProgressMonitor(d,e["Resetting local changes"]);d.then(function(){f.changedItem(c)},g)}})},visibleWhen:function(a){return c.hasStagedChanges(a)||c.hasUnstagedChanges(a)}});b.addCommand(i);i=new d.Command({name:e.Checkout,tooltip:e["Checkout files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(b){var c=j(b.items);a.getService("orion.page.dialog").confirm(e["Your changes to the selected files will be discarded and cannot be recovered."]+
"\n"+e["Are you sure you want to continue?"],function(d){if(d){for(var d=a.getService("orion.page.message"),j=a.getService("orion.page.progress"),h=[],i=0;i<c.length;i++)h[i]=c[i].name;j=j.progress(a.getService("orion.git.provider").checkoutPath(b.userData.Clone.Location,h),e["Resetting local changes"]);d.createProgressMonitor(j,e["Resetting local changes"]);j.then(function(){f.changedItem(c)},g)}})},visibleWhen:function(a){a=j(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(i);i=new d.Command({name:e["Show Patch"],tooltip:e["Show workspace changes as a patch"],imageClass:"git-sprite-diff",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){for(var b=j(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=j(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(i);i=new d.Command({name:e.Continue,tooltip:e["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",callback:function(a){return h(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});b.addCommand(i);i=new d.Command({name:e["Skip Patch"],tooltip:e["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return h(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==
-1}});b.addCommand(i);i=new d.Command({name:e.Abort,tooltip:e["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",callback:function(a){return h(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});b.addCommand(i)}})();return r});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(e,i,h,g,f,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,f){if(a){var g=!0;d==="*"&&(d="");d===
""&&(g=f&&f.type!==b.searchUtils.ALL_FILE_TYPE);if(g){d!==""&&b.searchUtils.addRecentSearch(c,d,f?f.regEx:!1);var a=a.createSearchParams(d,!1,!1,f),h=b.searchUtils.generateSearchHref(a);b.searchUtils.getOpenSearchPref(c,function(a){a?window.open(h):window.location=h})}}else window.alert(e["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],q=!1,r=!1,x=[],u,t=0,s=0;s<e.children.length;s++)if(e.children[s].lineNumber-1===h){t=s;for(q=0;q<e.children[s].matches.length;q++)e.children[s+q].checked!==!1&&x.push(q);r=x.length>0;u=e.children[s].matches;q=!0;break}if(q){if(r){x=b.searchUtils.replaceCheckedMatches(i,f,u,x,g);i=x.replacedStr;for(q=0;q<e.children[t].matches.length;q++)e.children[t+q].newMatches=x.newMatches}else for(q=
0;q<e.children[t].matches.length;q++)e.children[t+q].newMatches=e.children[t+q].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 q=g?i:i.toLowerCase();if(q=a.wildCard?b.searchUtils.searchOnelineRegEx(a,q):b.searchUtils.searchOnelineLiteral(a,q)){var r=h+1;
if(f)for(var x=0;x<q.length;x++){var u=x+1,u={parent:c,checked:c.checked,type:"detail",matches:q,lineNumber:r,matchNumber:u,name:i,location:c.location+"-"+r+"-"+u};c.children.push(u)}else u={parent:c,context:b.searchUtils.generateMatchContext(2,d,h),checked:c.checked,type:"detail",matches:q,lineNumber:r,name:i,location:c.location+"-"+r},c.children.push(u);e+=q.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,r=0;r<d.length;r++)if(d[r]===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/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(e,i,h,g,f,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:g.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(e["The search term on this location will not use indexed files."]+"\n"+e["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=g.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?
g.searchOnelineRegEx(this.searchHelper.inFileQuery,e,!0):g.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===g.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 e=c.registry.getService("orion.page.progress");return(e?e.progress(c.fileClient.fetchChildren(b),"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(b[e].Directory!==void 0&&b[e].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[e]));
else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[e]));else{var g=f.getFilenameContentType(b[e].Name,c.contentTypesCache);g&&(g["extends"]==="text/plain"||g.id==="text/plain")&&c._onFileType(g)&&a.push(c._sniffSearch(b[e]))}else b[e].Location&&a.push(c._visitRecursively(b[e].ChildrenLocation));return d.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?g.searchOnelineRegEx(this.searchHelper.inFileQuery,
b,!0):g.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(e["${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(e["${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(e,i,h,g,f,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 e=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:f.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(e(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(e(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(e(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(e(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 f=g.formatMessage(e["Search ${0}"],c);d.placeholder=f.length>30?f.substring(0,27)+"...":g.formatMessage(e["Search ${0}"],c)}if(d&&d.title)d.title=e["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,f){function l(a){return!b?!0:(a=b.getFilenameContentType(a))&&(a["extends"]==="text/plain"||a.id==="text/plain")?!0:!1}return function(b,n,m){if(m)h.empty(a),b=document.createElement("div"),b.appendChild(document.createTextNode(e["Search failed."])),a.appendChild(b),typeof d==="function"&&d(a);else{var m=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)}}}(),q=!1;h.empty(a);if(b&&b.length>0){var r=document.createElement("table");r.setAttribute("role","presentation");for(var x=0;x<b.length;x++){var u=b[x],t;if(!q&&(q=!0,c))t=
r.insertRow(0).insertCell(0),t.textContent=c;t=r.insertRow(-1).insertCell(0);t.colspan=2;f&&f(t);var s=document.createElement("a");s.appendChild(document.createTextNode(u.name));u.LineNumber&&s.appendChild(document.createTextNode(" (Line "+u.LineNumber+")"));var w=u.location;u.isExternalResource?w=u.path:(w=u.directory?i.toUrl("navigate/table.html")+"#"+u.path:l(u.name)?i.toUrl("edit/edit.html")+"#"+u.path:u.path,w==="#"&&(w=""));s.setAttribute("href",w);s.setAttribute("aria-describedby",(u.folderName?
u.folderName:u.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));s.style.verticalAlign="middle";t.appendChild(s);m(t,u)}a.appendChild(r);typeof d==="function"&&d(a)}!q&&n&&(b=g.formatMessage(e["No matches found for ${0}"],n),h.empty(a),a.appendChild(document.createTextNode(b)),typeof d==="function"&&d(a))}}}}};c.prototype.constructor=c;return{Searcher:c}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/webui/dialog".split(","),function(e,i,h,g,f,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="'+
g.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||e["Find File Named"];this.modal=!0;this.messages=e;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(e["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(e["Missing required argument: searchRenderer"]);this._favService=b.favoriteService;if(!this._favService)throw Error(e["Missing required argument: favService"]);this._initialize()};c.prototype._bindToDom=function(b){var a=this;a.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",e.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===f.KEY.ENTER){var c=f.$("a",a.$results);c&&(f.stop(b),window.open(c.href),a.hide())}},!1);b.addEventListener("keydown",function(b){var c,d,e,g,h;if(b.keyCode===f.KEY.DOWN||b.keyCode===f.KEY.UP)d=f.$$array("a",a.$results),c=f.$$array("a",a.$favresults),e=document.activeElement,h=d.indexOf(e),g=c.indexOf(e),b.keyCode===f.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?(e=a.$fileName,(g>0?c[g-1]:e).focus()):h>=0?(e=a.$fileName,(h>0?d[h-1]:c.length>0?c[c.length-1]:e).focus()):d.length>0?d[d.length-1].focus():c.length>0&&c[c.length-1].focus(),f.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(e["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(e["Populating favorites&#x2026;"]));
f.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=g.toUrl("images/none.png");a.title=e.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(e["Searching..."]));f.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=f.$$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===
f.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}});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(e,i,h,g,f){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 g.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:e["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 g=this;this._searchBox.addEventListener("keydown",function(a){a=a.charCode||a.keyCode;a===13&&g._submitSearch();a===27&&g._cancelCallBack&&g._cancelCallBack()});
this._fileTypes.addEventListener("change",function(){var a=g._fileTypes.options[g._fileTypes.selectedIndex].value;g._searchBox.placeholder=a===h.ALL_FILE_TYPE?e["Type a search term"]:f.formatMessage(e["All ${0} files"],a)});this._submitButton.onclick=function(){g._submitSearch()}};c.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(e["Files that contain:"]));document.getElementById("advSearchInput").placeholder=e["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(e["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(e["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(e["Regular expression"]));document.getElementById("advSearchSubmit").value=e.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>'+e["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+e["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+e["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
e["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+e["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+e.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(e,i,h,g){function f(d,c){for(var b=d.getServiceReferences(c||"orion.page.link"),a=h.matchResourceParameters(window.location.href),f={OrionHome:(new URL(e.toUrl("."),window.location)).href.slice(0,-1),Location:a.resource},a=[],k=0;k<b.length;k++){for(var o={},l=b[k].getPropertyKeys(),p=0;p<l.length;p++)o[l[p]]=b[k].getProperty(l[p]);if(o.uriTemplate&&o.nls&&(o.name||o.nameKey)){var n=
new i;e(["i18n!"+o.nls],function(a){var b=new g(o.uriTemplate),b=window.decodeURIComponent(b.expand(f)),b=h.validateURLScheme(b);o.href=b;o.textContent=o.nameKey?a[o.nameKey]:o.name;n.resolve(o)});a.push(n)}else if(o.uriTemplate&&o.name)l=new g(o.uriTemplate),l=window.decodeURIComponent(l.expand(f)),l=h.validateURLScheme(l),o.href=l,o.textContent=o.name,a.push((new i).resolve(o))}return i.all(a)}return{createPageLinks:function(d,c){return f(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:f}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(e,i,h,g){function f(d){this._init(d)}f.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"),f=this._makeMenuItem(e["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(f);this._dropdownNode.appendChild(a)}},renderServices:function(){function d(a){b[a]||(b[a]=c.createDocumentFragment());return b[a]}var c=document,b=[];g.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"),f=this._makeMenuItem(e["Keyboard Shortcuts"],this.keyAssistFunction);f.classList.add("key-assist-menuitem");a.appendChild(f);d(0).appendChild(a)}var g=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)}g._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()}};f.prototype.constructor=f;return{UserMenu:f}});
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(e,
i,h,g,f,d,c,b,a,j,k,o,l,p,n,m,q,r,x,u,t,s,w,v,A,D,B,y){function I(a,b){if(a.getLabel)return a.getLabel();else{var c=new s;c.resolve(b.properties.name);return c}}function J(a){j.node("progressPane").setAttribute("aria-label",e["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function G(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 M(a,b){var c=a.getServiceReferences("orion.core.auth");R=[];if(j.node("userMenu")){var d=j.node("userDropdown"),f=new o.Dropdown({dropdown:d}),g=new w.UserMenu({dropdownNode:d,dropdown:f,serviceRegistry:a}),d=j.node("userTrigger");new l.Tooltip({node:d,text:e.Options,position:["below","left"]});G(a,d);g.setKeyAssist(b);
for(d=0;d<c.length;d++){var f=c[d],h=a.getService(f);I(h,f).then(function(a){h.getKey().then(function(b){R.push(b);h.getUser().then(function(c){g.addUserItem(b,h,a,c)},function(c,d){g.addUserItem(b,h,a,d)});window.addEventListener("storage",function(){Q[b]!==localStorage.getItem(b)&&(Q[b]=localStorage.getItem(b),h.getUser().then(function(c){g.addUserItem(b,h,a,c)},function(){g.addUserItem(b,h,a)}))},!1)})})}}}function L(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=e["Advanced search"];b.onclick=function(){a.toggle()};b.addEventListener("keydown",function(b){(b.charCode||b.keyCode)===13&&a.toggle()});b.classList.add("bannerMenuSearchOptions")}function H(a,b){var c=j.node("relatedDropdown");C||(C=new o.Dropdown({dropdown:c}));a._addMenuItem(c,b)}function F(a,b,c,e,f){var h,i=a.getServiceReferences("orion.page.link.related");i.length<=0||j.node("relatedLinks")&&
s.when(function(){if(h)return h;var b=a.getService("orion.core.contenttypes");b||(b=new n.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var n;j.node("relatedLinks")&&C&&(C.close(),C.empty());for(var k=[],l=0;l<i.length;l++){var m={},p,o=i[l].getPropertyKeys();for(p=0;p<o.length;p++)m[o[p]]=i[l].getProperty(o[p]);if(m.id){var r=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var c=new g.CommandInvocation(e,
b,b,null,a);H(a,c)}else typeof f==="function"&&(n||(n=f()),s.when(n,function(c){c&&b===S&&(!a.visibleWhen||a.visibleWhen(c))&&H(a,new g.CommandInvocation(e,c,c,null,a))}))},q=null;p=null;if(c.indexOf(m.id)<0)if((m.nls&&m.nameKey||m.name)&&m.uriTemplate)p=d._createCommandOptions(m,i[l],a,h,!0),k.push(p),p.then(function(a){a=new g.Command(a);r(a)});else{if(!q&&(q=e.findCommand(m.id))){r(q);continue}if(!q){var u=a.getServiceReferences("orion.navigate.command");for(p=0;p<u.length;p++)if(u[p].getProperty("id")===
m.id){for(var m={},o=u[p].getPropertyKeys(),t=0;t<o.length;t++)m[o[t]]=u[p].getProperty(o[t]);p=d._createCommandOptions(m,u[p],a,h,!0);k.push(p);p.then(function(a){q=new g.Command(a);r(q)});break}}}}}s.all(k,function(a){return a}).then(function(){var a=j.node("relatedTrigger");if(C&&a)a.style.visibility=C.getItems().length===0?"hidden":"visible"})})}function N(a){var b=j.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function U(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 r.ThemeSheetWriter).getSheet(c);b=document.createElement("STYLE");b.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function O(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 P(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 m=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),Q={},R=[],C,S,T=[],E,K=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,n,m,o,r,q,w){function E(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"})}U(m);m=j.node(a);if(!m)throw e["could not find banner parent, id was "]+a;a=document.createRange();a.selectNode(m);a=a.createContextualFragment(D);j.processTextNodes(a,e);m.firstChild?m.insertBefore(a,m.firstChild):m.appendChild(a);a=j.node("home");a.href=i.toUrl("navigate/table.html");a.setAttribute("aria-label",
e["Orion Home"]);j.node("progressPane").src=i.toUrl("images/none.png");if(a=j.node("pageToolbar"))a.classList.add("toolbarLayout"),a.innerHTML=y+h.slideoutHTMLFragment("mainToolbar");(a=j.node("closeNotifications"))&&a.setAttribute("aria-label",e["Close notification"]);if(a=j.node("footer"))a.innerHTML=B,j.processTextNodes(a,e);n.setParameterCollector(new f.CommandParameterCollector(O,P));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 F=j.node("primaryNav");F&&v.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){F.appendChild(a)})});var C=j.node("search");if(!C)throw"failed to generate HTML for banner";C.setAttribute("placeholder",
e.Search);new l.Tooltip({node:C,text:e["Type a keyword or wild card to search in root"],position:["below","left"]});var H=new t.advSearchOptContainer(C,o,d,{group:"advancedSearch"});new u.InputCompletion(C,function(a){x.getMixedSearches(d,!0,!1,function(b){var c,d=[],f=!1,g=!1;for(c in b)b[c].label&&b[c].value?(f||(d.push({type:"category",label:e["Saved searches"]}),f=!0),d.push({type:"proposal",value:{name:b[c].label,value:i.toUrl("search/search.html")+"#"+b[c].value,type:"link"}})):(g||(d.push({type:"category",
label:e["Recent searches"]}),g=!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}))});s.all(e).then(function(a){b(a)})}}});C.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&x.doSearch(o,d,C.value)});L(H);j.addAutoDismiss([j.node(H.containerId),j.node("advancedSearchDropDown")],function(){H.dismiss()});if(a=j.$(".split")){var m=j.$(".sidePanelLayout"),G=j.$(".mainPanelLayout");if(m&&G)K={side:m,main:G},K.splitter=new k.Splitter({node:a,sidePanel:m,mainPanel:G,toggle:!0}),a=new g.Command({name:e["Toggle side panel"],
tooltip:e["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),n.addCommand(a),n.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new g.CommandKeyBinding("o",!0)),q&&(K.splitter.addResizeListener(function(a){q&&a===G&&q.getTextView().resize()}),q.getTextView().setKeyBinding(new b.KeyBinding("o",!0),"toggleOutliner"),q.getTextView().setAction("toggleOutliner",function(){K.splitter.toggleSidePanel();return!0},{name:e["Toggle Outliner"]}))}a=
new g.Command({name:e["Make Favorite"],tooltip:e["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"),f=function(a){return function(f){f?d.getService("orion.page.message").setMessage(a.Name+
e[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},g=0;g<a.length;g++){var h=a[g];c.progress(b.hasFavorite(h.ChildrenLocation||h.Location),"Checking favorite "+h.Name).then(f(h))}}});n.addCommand(a);var I=function(a,b,c){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new p.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new A.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:d,onHide:function(){c&&c.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},a=new g.Command({name:e["Find File Named..."],tooltip:e["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){I(o,d,q)}});q&&(q.getTextView().setKeyBinding(new b.KeyBinding("f",!0,!0,!1),a.id),q.getTextView().setAction(a.id,function(){I(o,d,q);return!0},a));n.addCommand(a);n.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new g.CommandKeyBinding("f",!0,!0));a=new g.Command({name:e["Global search"],tooltip:e["Global search"],id:"eclipse.globalSearch",callback:function(){var a=j.node("search");a&&a.focus()}});q&&(q.getTextView().setKeyBinding(new b.KeyBinding("h",!0,!1,!0),a.id),q.getTextView().setAction(a.id,function(){var a=q.getSelection(),b=null;a.end>a.start&&(b=q.getModel().getText(a.start,a.end));if(a=j.node("search")){if(b)a.value=b;a.focus()}return!0},a));n.addCommand(a);n.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new g.CommandKeyBinding("h",!0,!1,!0));a=new g.Command({name:e["Toggle banner and footer"],tooltip:e["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"));
q&&q.getTextView().resize();return!0}});n.addCommand(a);n.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new g.CommandKeyBinding("m",!0,!0));q&&(q.getTextView().setKeyBinding(new g.CommandKeyBinding("m",!0,!0),a.id),q.getTextView().setAction(a.id,a.callback,a));w&&w.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});w=new g.Command({name:e["System Configuration Details"],tooltip:e["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});n.addCommand(w);n.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new g.CommandKeyBinding(112,!0,!0));w=new g.Command({name:e["Background Operations"],tooltip:e["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});n.addCommand(w);n.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new g.CommandKeyBinding("o",!0,!0));w=new g.Command({name:e["Show Keys"],tooltip:e["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(q){a=document.createElement("h2");a.appendChild(document.createTextNode(e.Editor));z.appendChild(a);a=q.getTextView().getActions(!1);for(var b=0;b<a.length;b++){var d=a[b],f=d,g=q.getTextView(),h=g.getActionDescription(d);if(h&&h.name)f=h.name;d=g.getKeyBindings(d);
for(g=0;g<d.length;g++){var h=c.getUserKeyString(d[g]),i=document.createElement("span");i.role="listitem";i.appendChild(document.createTextNode(h+" = "+f));i.appendChild(document.createElement("br"));z.appendChild(i)}}}a=document.createElement("h2");a.appendChild(document.createTextNode(e.Global));z.appendChild(a);n.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});n.addCommand(w);n.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new g.CommandKeyBinding(191,
!1,!0));q&&(a=window.navigator.platform.indexOf("Mac")!==-1,q.getTextView().setKeyBinding(new g.CommandKeyBinding(191,!1,!0,!a,a),w.id),q.getTextView().setAction(w.id,w.callback,w));N(n);M(d,w.callback);J(d);window.addEventListener("hashchange",function(){n.processURL(window.location.href)},!1);window.setTimeout(function(){E(d)},0)},getToolbarElements:O,getMainSplitter:function(){return K},layoutToolbarElements:P,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,S=b.target,F(b.serviceRegistry,b.target,T,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(E=b.title)||(E=c?c+" - "+b.task:b.task);window.document.title=E;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(E)E.charAt(0)==="*"&&!a&&(E=E.substring(1)),a&&E.charAt(0)!=="*"&&(E="*"+E),window.document.title=E;var b=j.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){T=a},notifyAuthenticationSite:m}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(e,i,h){function g(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 f(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)()})}}
g.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 f(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()}};
g.prototype.constructor=g;f.prototype.begin=function(d){this.status=d;this.statusService._beginProgressMonitor(this)};f.prototype.done=function(d){this.status=d;this.statusService._doneProgressMonitor(this)};f.prototype.worked=function(d){this.status=d;this.statusService._workedProgressMonitor(this)};f.prototype.constructor=f;return{StatusReportingService:g,ProgressMonitor:f}});
define("orion/git/gitLogExplorer","i18n!git/nls/gitmessages,require,orion/explorers/explorer,orion/PageUtil,orion/webui/littlelib,orion/commands,orion/section,orion/globalCommands,orion/git/gitCommands,orion/explorers/navigationUtils,orion/Deferred,orion/git/widgets/CommitTooltipDialog".split(","),function(e,i,h,g,f,d,c,b,a,j,k,o){d={};d.GitLogExplorer=function(){function c(a,b,d,e,f,g,h,i,j,k,l){this.registry=a;this.fileClient=b;this.commandService=d;this.selection=e;this.checkbox=f!==null?f.checkbox:
!0;this.minimal=f!==null?f.minimal:!1;this.parentId=g;this.pageTitleId=h;this.toolbarId=i;this.selectionToolsId=j;this.pageNavId=k;this.actionScopeId=l||f.actionScopeId;this.incomingCommits=[];this.outgoingCommits=[]}c.prototype.getCloneFileUri=function(){var a,b=g.matchResourceParameters().resource.split("gitapi/commit/");if(b.length===2&&(b=b[1].split("/"),b.length>1)){a="";for(var c=0;c<b.length-1;c++)a+="/"+b[c];a+="/"+b[b.length-1].split("?")[0]}return a};c.prototype.getHeadFileUri=function(){var a,
b=g.matchResourceParameters().resource.split("gitapi/commit/");if(b.length===2&&(b=b[1].split("/"),b.length>1)){a="";for(var c=1;c<b.length-1;c++)a+="/"+b[c];a+="/"+b[b.length-1].split("?")[0]}return a};c.prototype.makeHref=function(a,b,c,d){c&&this.registry.getService("orion.page.progress").progress(a.read(c,!0),"Getting git informatiob about "+c).then(function(a){if(d){var c=this.registry.getService("orion.git.provider");a.Git&&this.registry.getService("orion.page.progress").progress(c.getDefaultRemoteBranch(a.Git.RemoteLocation),
"Getting default branch for "+a.Name).then(function(a){b.href=i.toUrl("git/git-log.html")+"#"+a.Location+"?page=1"})}else if(a.Git)b.href=i.toUrl("git/git-log.html")+"#"+a.Git.CommitLocation+"?page=1"},function(a){console.error("Error loading file metadata: "+a.message)})};c.prototype.initTitleBar=function(c){var d=new k,e=c.toRef&&c.toRef.Type==="RemoteTrackingBranch",f=c.toRef&&c.toRef.Type==="Branch",g;e||f?(f=this.getHeadFileUri(),g=c.toRef.Name):f=this.getCloneFileUri();var h=this;f?this.registry.getService("orion.page.progress").progress(this.fileClient.read(f,
!0),"Getting metadata of "+f).then(function(f){this.isDirectory=f.Directory;var i=g?" ("+g+") ":"";b.setPageTarget({task:"Git Log",title:g?g+" on "+f.Name+" - Git Log":f.Name+" - Git Log",target:c,breadcrumbTarget:f,breadcrumbRootName:f.Parents&&f.Parents.length>0?"Log"+i+f.Parents[f.Parents.length-1].Name:"Log"+i+f.Name,makeBreadcrumbLink:function(a,b){h.makeHref(h.fileClient,a,b,e)},serviceRegistry:h.registry,commandService:h.commandService});a.updateNavTools(h.registry,h,"pageActions","selectionTools",
c);d.resolve()},function(a){d.reject(a)}):d.resolve();return d};c.prototype.redisplay=function(){this.display(g.matchResourceParameters().resourceRaw)};c.prototype.changedItem=function(){this.redisplay()};c.prototype.getOutgoingIncomingChanges=function(b){var c=this,d=new k;this.registry.getService("orion.page.message").showWhile(d,e["Getting git incoming changes..."]);var f=function(b){var e=encodeURIComponent(b.FullName);c.toolbarId&&c.selectionToolsId&&a.updateNavTools(c.registry,c,c.toolbarId,
c.selectionToolsId,b,c.pageNavId);var f=g.matchResourceParameters();c.registry.getService("orion.page.progress").progress(c.registry.getService("orion.git.provider").getLog(b.HeadLocation,e),"Getting log for "+b.Name).then(function(a){c.incomingCommits=a.Children;c.outgoingCommits=[];a=document.createElement("a");a.href=f.resource;c.registry.getService("orion.page.progress").progress(c.registry.getService("orion.git.provider").doGitLog(b.CommitLocation+a.search),"Getting incomming changes for "+b.Name).then(function(a){b.Children=
a.Children;if(a.NextLocation){var c=document.createElement("a");c.href=a.NextLocation;b.NextLocation=b.Location+c.search}if(a.PreviousLocation)c=document.createElement("a"),c.href=a.PreviousLocation,b.PreviousLocation=b.Location+c.search;d.resolve(b)})})};b.Type==="RemoteTrackingBranch"?f(b):b.Type==="Commit"&&b.toRef.Type==="RemoteTrackingBranch"?f(b.toRef):b.toRef?b.toRef.RemoteLocation&&b.toRef.RemoteLocation.length===1&&b.toRef.RemoteLocation[0].Children&&b.toRef.RemoteLocation[0].Children.length===
1?c.registry.getService("orion.page.progress").progress(c.registry.getService("orion.git.provider").getGitRemote(b.toRef.RemoteLocation[0].Children[0].Location),"Getting log for "+b.Name).then(function(a){c.registry.getService("orion.page.progress").progress(c.registry.getService("orion.git.provider").getLog(a.CommitLocation,"HEAD"),"Getting outgoing changes for "+b.Name).then(function(a){c.incomingCommits=[];c.outgoingCommits=a.Children;d.resolve(b)})}):d.resolve(b):d.resolve(b);return d};c.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)};c.prototype.loadResource=function(a){var b=new k;this.registry.getService("orion.page.message").showWhile(b,e["Loading git log..."]);var c=this,d=this.registry.getService("orion.git.provider");this.registry.getService("orion.page.progress").progress(d.doGitLog(a),"Getting git log").then(function(a){c.registry.getService("orion.page.progress").progress(d.getGitClone(a.CloneLocation),
"Getting repository details for "+a.Name).then(function(e){e=e.Children[0];a.Clone=e;a.ContentLocation=e.ContentLocation;c.registry.getService("orion.page.progress").progress(d.getGitBranch(e.BranchLocation),"Getting default branch details for "+a.Name).then(function(c){for(var d=0;d<c.Children.length;d++){var e=c.Children[d];if(e.Current===!0)a.Clone.ActiveBranch=e.CommitLocation,b.resolve(a)}})})});return b};c.prototype.display=function(b){var c=this,d=this.registry.getService("orion.page.message"),
f=new k;d.showWhile(f,e["Loading..."]);c.loadResource(b).then(function(b){f.resolve();c.initTitleBar(b).then(function(){c.getOutgoingIncomingChanges(b).then(function(b){c.toolbarId&&c.selectionToolsId&&a.updateNavTools(c.registry,c,c.toolbarId,c.selectionToolsId,b,c.pageNavId);c.displayLog(b.Children)})})},function(a){f.resolve();c.handleError(a)})};c.prototype.displayLog=function(a){var b=this,c=f.node("table"),d=document.createElement("div");d.className="sectionTable";c.appendChild(d);d.innerHTML=
'<div id="logNode" class="mainPadding"></div>';var g=function(){function b(){}b.prototype={destroy:function(){},getRoot:function(b){b(a)},getChildren:function(a,b){a instanceof Array&&a.length>0?b(a):b([])},getId:function(a){return a.Name}};return b}(),i=function(){function a(b,c){this._init(b);this.options=b;this.explorer=c;this.registry=b.registry}a.prototype=new h.SelectionRenderer;a.prototype.getCellElement=function(a,c,d){switch(a){case 0:var a=document.createElement("td"),f=document.createElement("div");
f.className="sectionTableItem";a.appendChild(f);d=document.createElement("div");d.style.overflow="hidden";f.appendChild(d);for(var f=!1,g=0;g<b.incomingCommits.length;g++){var h=b.incomingCommits[g];c.Name===h.Name&&(f=!0)}for(var i=!1,g=0;g<b.outgoingCommits.length;g++)h=b.outgoingCommits[g],c.Name===h.Name&&(i=!0);!f&&!i?f=document.createElement("span"):(g=i?"git-sprite-outgoing_commit":"git-sprite-incoming_commit",f=document.createElement("span"),f.className="sectionIcon gitImageSprite "+g);d.appendChild(f);
if(c.AuthorImage)f=document.createElement("div"),f.style["float"]="left",g=new Image,g.src=c.AuthorImage,g.name=c.AuthorName,g.className="git-author-icon",f.appendChild(g),d.appendChild(f);f=document.createElement("div");f.className="stretch";d.appendChild(f);d=document.createElement("a");d.className="navlinkonpage";d.href="/git/git-commit.html#"+c.Location+"?page=1&pageSize=1";d.textContent=c.Message;f.appendChild(d);j.addNavGrid(this.explorer.getNavDict(),c,d);new o.CommitTooltipDialog({commit:c,
triggerNode:d});d=document.createElement("div");f.appendChild(d);d=document.createElement("span");d.textContent=e[" (SHA "]+c.Name+e[") by "]+c.AuthorName+" on "+(new Date(c.Time)).toLocaleString();f.appendChild(d);return a;case 1:return this.getActionsColumn(c,d,null,null,!0)}};return a}();new (function(){function a(b,c,d,e){this.registry=b;this.checkbox=!1;this.parentId=d;this.selection=c;this.actionScopeId=e;this.renderer=new i({registry:this.registry,actionScopeId:this.actionScopeId,cachePrefix:"LogNavigator",
checkbox:!1},this);this.createTree(this.parentId,new g)}a.prototype=new h.Explorer;a.prototype.isRowSelectable=function(){return!0};a.prototype.getItemCount=function(){return!1};return a}())(this.registry,this.selection,"logNode",this.actionScopeId)};return c}();return d});
define("git/git-log","i18n!git/nls/gitmessages,require,orion/bootstrap,orion/status,orion/progress,orion/commands,orion/dialogs,orion/selection,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/git/gitClient,orion/ssh/sshTools,orion/git/gitLogExplorer,orion/git/gitCommands,orion/links,orion/PageUtil".split(","),function(e,i,h,g,f,d,c,b,a,j,k,o,l,p,n,m,q,r){h.startup().then(function(h){var i=h.serviceRegistry,h=h.preferences,t=new j.OperationsClient(i);new g.StatusReportingService(i,
t,"statusPane","notifications","notificationArea");new f.ProgressService(i,t);new c.DialogService(i);t=new b.Selection(i);new p.SshService(i);var s=new d.CommandService({serviceRegistry:i,selection:t});new q.TextLinkService({serviceRegistry:i});new l.GitService(i);var w=new a.FileClient(i),v=new k.Searcher({serviceRegistry:i,fileService:w,commandService:s}),A=new n.GitLogExplorer(i,w,s,t,null,"table","pageTitle","pageActions","selectionTools","pageNavigationActions","itemLevelCommands");o.setPageCommandExclusions(["eclipse.git.remote",
"eclipse.git.log"]);o.generateBanner("orion-gitlog",i,s,h,v,A);m.createFileCommands(i,s,A,"pageActions","selectionTools");s.addCommandGroup("itemLevelCommands","eclipse.gitGroup.nav",200,e.More);s.addCommandGroup("pageActions","eclipse.gitGroup.page",100);s.addCommandGroup("selectionTools","eclipse.selectionGroup",500,"More");s.registerCommandContribution("itemLevelCommands","eclipse.openGitCommit",1);s.registerCommandContribution("itemLevelCommands","eclipse.compareWithWorkingTree",2);s.registerCommandContribution("selectionTools",
"eclipse.compareGitCommits",1,"eclipse.selectionGroup");s.registerCommandContribution("pageActions","eclipse.orion.git.fetch",100,"eclipse.gitGroup.page");s.registerCommandContribution("pageActions","eclipse.orion.git.fetchForce",100,"eclipse.gitGroup.page");s.registerCommandContribution("pageActions","eclipse.orion.git.merge",100,"eclipse.gitGroup.page");s.registerCommandContribution("pageActions","eclipse.orion.git.push",100,"eclipse.gitGroup.page");s.registerCommandContribution("pageActions","eclipse.orion.git.pushForce",
100,"eclipse.gitGroup.page");s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.addTag",3);s.registerCommandContribution("itemLevelCommands","eclipse.orion.git.cherryPick",3);s.registerCommandContribution("pageNavigationActions","eclipse.orion.git.previousLogPage",1);s.registerCommandContribution("pageNavigationActions","eclipse.orion.git.nextLogPage",2);i=r.matchResourceParameters();A.display(i.resourceRaw);window.addEventListener("hashchange",function(){var a=r.matchResourceParameters();
A.display(a.resourceRaw)},!1)})});