/**
 * @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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:
 *     Kris De Volder (VMWare) - 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) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:
 *     Kris De Volder (VMWare) - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - _initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 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) 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:
 *     Kris De Volder (VMWare) - 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:
 *     Kris De Volder (VMWare) - 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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). 


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


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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 Kris De Volder (VMWare) - 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) 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) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - _initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


 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) 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) 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:
 Kris De Volder (VMWare) - 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:
 Kris De Volder (VMWare) - 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) 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) 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:
 Kris De Volder (VMWare) - initial API and implementation
*/
(function(){function g(e,c,d,h,b,a){c[e]&&(d.push(e),(c[e]===!0||c[e]===1)&&h.push(b+e+"/"+a))}function i(e,c,d,h,b){c=h+c+"/"+b;require._fileExists(e.toUrl(c))&&d.push(c)}var f=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,d={};define("i18n",{version:"1.0.0",load:function(e,c,k,h){var h=h||{},b=f.exec(e),a=b[1],j=b[4],l=b[5],m=j.split("-"),n=[],p={},o,r,q="";b[5]?(a=b[1],e=a+l):(l=b[4],j=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
m=j.split("-"));if(h.isBuild){n.push(e);i(c,"root",n,a,l);for(o=0;r=m[o];o++)q+=(q?"-":"")+r,i(c,q,n,a,l);c(n,function(){k()})}else c([e],function(b){var j=[];g("root",b,j,n,a,l);for(o=0;r=m[o];o++)q+=(q?"-":"")+r,g(q,b,j,n,a,l);c(n,function(){var m,h;for(m=j.length-1;m>-1&&(r=j[m]);m--){h=b[r];if(h===!0||h===1)h=c(a+r+"/"+l);var e=p,q=void 0;for(q in h)!(q in d)&&!(q in e)&&(e[q]=h[q])}k(p)})})}})})();
define("orion/i18n",[],function(){return{load:function(g,i,f,d){var d=d||{},e=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,c=e.exec(g);if(c)if(i.defined(g))f(i(g));else if(d.isBuild||d.isTest)f({});else{var k=c[1],h=c[3]?c[2]:"",b=c[3]||c[2];i(["orion/bootstrap"],function(a){a.startup().then(function(a){var l=a.serviceRegistry,a=l.getServiceReferences("orion.i18n.message");if(h)a.some(function(a){return g===a.getProperty("name")?(l.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),
!0):!1})||f({});else{var m={},n;a.forEach(function(a){var j=a.getProperty("name");if((c=e.exec(j))&&k===c[1]&&b===(c[3]||c[2]))if(h=c[3]?c[2]:""){if((a=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&a.indexOf(h)===0)m[h]=!0,i.specified(j)||define(j,["orion/i18n!"+j],function(a){return a})}else n=a});i.specified(g)?f(m):n?l.getService(n).getMessageBundle().then(function(a){Object.keys(m).forEach(function(b){typeof a[b]==="undefined"&&(a[b]=m[b])});define(g,
[],a);f(a)},function(){define(g,[],m);f(m)}):(define(g,[],m),f(m))}})})}else f(null)}}});
define("orion/shell/nls/root/messages",{Shell:"Shell","Changed to: ":"Changed to: ","${0} is not a directory":"${0} is not a directory","${0} was not found":"${0} was not found","Changes the current directory":"Changes the current directory","The name of the directory":"The name of the directory","Edits a file":"Edits a file","The name of the file":"The name of the file","Lists the files in the current directory":"Lists the files in the current directory","Prints the current directory location":"Prints the current directory location",
"Clears the shell screen":"Clears the shell screen","'${0}' is not valid":"'${0}' is not valid","Error: ${0}":"Error: ${0}",NoResponseFromServer:"No response from server for ${0}. Check your internet connection and try again.",ServerError:"Server error: ${0} returned ${1} ${2}",Succeeded:"Succeeded",Aborted:"Aborted","The name of the plug-in":"The name of the plug-in","The name of the contributed plug-in":"The name of the contributed plug-in","Lists all registered plug-ins":"Lists all registered plug-ins",
"Reloads a plug-in":"Reloads a plug-in","Disables a contributed plug-in":"Disables a contributed plug-in","Enables a contributed plug-in":"Enables a contributed plug-in","Uninstalls a contributed plug-in from the configuration":"Uninstalls a contributed plug-in from the configuration","Plug-in is already installed":"Plug-in is already installed","Invalid plug-in URL":"Invalid plug-in URL","Installs a plug-in from a URL":"Installs a plug-in from a URL","The plug-in URL":"The plug-in URL","Commands for working with plug-ins":"Commands for working with plug-ins",
"Are you sure you want to uninstall all contributed plug-ins?":"Are you sure you want to uninstall all contributed plug-ins?","Displays a plug-in's services":"Displays a plug-in's services","Commands for working with a service":"Commands for working with a service","Displays all plug-in contributions for a service":"Displays all plug-in contributions for a service","The service identifier":"The service identifier",disabled:"disabled","Open in Shell":"Open in Shell","Open in Shell page":"Open in Shell page",
"'${0}' already exists":"'${0}' already exists","Source file service does not support binary read":"Source file service does not support binary read","Target file service does not support binary write":"Target file service does not support binary write","Cannot create file, it already exists as a directory":"Cannot create file, it already exists as a directory","Cannot create directory, it already exists as a file":"Cannot create directory, it already exists as a file","Wrote ${0}":"Wrote ${0}","Failed to write ${0}":"Failed to write ${0}",
"Cannot write ${0}, it is not a descendent of the output directory":"Cannot write ${0}, it is not a descendent of the output directory","The file or directory to re-direct output to":"The file or directory to re-direct output to"});define("orion/shell/nls/messages",["orion/i18n!orion/shell/nls/messages","orion/shell/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var f=this._namedListeners[g.type];f&&f.forEach(function(d){try{typeof d==="function"?d(g):d.handleEvent(g)}catch(e){typeof console!=="undefined"&&console.log(e)}});return!g.defaultPrevented},addEventListener:function(g,f){if(typeof f==="function"||f.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(f)},
removeEventListener:function(g,f){var d=this._namedListeners[g];if(d)for(var e=0;e<d.length;e++)if(d[e]===f){d.length===1?delete this._namedListeners[g]:d.splice(e,1);break}}};g.prototype.constructor=g;g.attach=function(i){var f=new g;i.dispatchEvent=f.dispatchEvent.bind(f);i.addEventListener=f.addEventListener.bind(f);i.removeEventListener=f.removeEventListener.bind(f)};return g});
define("orion/serviceTracker",[],function(){function g(d,e){function c(a){var j=a.getProperty("service.id"),l=this.addingService(a);l&&(h[j]=a,b[j]=l)}function k(a){var j=a.getProperty("service.id"),l=b[j];delete h[j];delete b[j];this.removedService(a,l)}this.serviceRegistry=d;var h={},b={},a=i,j,l;this.close=function(){if(a!==f)throw"Already closed";a=i;d.removeEventListener("registered",j);d.removeEventListener("unregistering",l);l=j=null;var b=this;this.getServiceReferences().forEach(function(a){k.call(b,
a)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return h.length?Object.keys(h).map(function(a){return h[a]}):null};this.open=function(){if(a!==i)throw"Already open";a=f;var b=this;j=function(a){if(a.serviceReference.getProperty("objectClass").indexOf(e)!==-1&&(c.call(b,a.serviceReference),typeof b.onServiceAdded==="function"))return b.onServiceAdded(a.serviceReference,b.serviceRegistry.getService(a.serviceReference))};l=function(a){a.serviceReference.getProperty("objectClass").indexOf(e)!==
-1&&k.call(b,a.serviceReference)};d.addEventListener("registered",j);d.addEventListener("unregistering",l);d.getServiceReferences(e).forEach(function(a){c.call(b,a)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,f=1;g.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return g});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
" is already a favorite.":" is already a favorite.","Add to the favorites list":"Add to the favorites list","Make Favorite":"Make Favorite","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was "," has been added to the favorites list.":" has been added to the favorites list.",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Report a Bug",
"Privacy Policy":"Privacy Policy","Terms of Use":"Terms of Use","Copyright Agent":"Copyright Agent","Orion Logo":"Orion Logo","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"Orion build I20130222-1257. See the FAQ for terms of service","Add this page to the favorites list":"Add this page to the favorites list","LOG: ":"LOG: ",Switch:"Switch","Switch the type of outliner used":"Switch the type of outliner used",
Outliner:"Outliner","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?","Orion Home":"Orion Home","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",Operations:"Operations","Operations running":"Operations running",
"Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?","You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.",
Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Open in new tab":"Open in new tab","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",
"Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Outliner":"Toggle Outliner","Sample HTML5 Site":"Sample HTML5 Site","Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin",
"Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion."});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/webui/littlelib",["require"],function(){function g(c,b){b||(b=document);return b.querySelectorAll(c)}function i(c,b){var a=c.compareDocumentPosition(b);return c===b||Boolean(a&16)}function f(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var b=0;b<c.childNodes.length;b++){var a=f(c.childNodes[b]);if(a)return a}return null}function d(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var b=c.childNodes.length-1;b>=0;b--){var a=d(c.childNodes[b]);if(a)return a}return null}function e(h,
b){if(h.nodeType===3){var a=c.exec(h.nodeValue);a&&a.length>1&&h.parentNode.replaceChild(document.createTextNode(b[a[1]]||a[1]),h)}if(h.hasChildNodes())for(a=0;a<h.childNodes.length;a++)e(h.childNodes[a],b)}var c=/\$\{([^\}]+)\}/,k=[];return{$:function(c,b){b||(b=document);return b.querySelector(c)},$$:g,$$array:function(c,b){return Array.prototype.slice.call(g(c,b))},node:function(c){var b=c;typeof c==="string"&&(b=document.getElementById(c));return b},contains:i,bounds:function(c){c=c.getBoundingClientRect();
return{left:c.left+document.body.scrollLeft,top:c.top+document.body.scrollTop,width:c.width,height:c.height}},empty:function(c){for(;c.hasChildNodes();)c.removeChild(c.firstChild)},firstTabbable:f,lastTabbable:d,stop:function(c){window.document.all?c.keyCode=0:(c.preventDefault(),c.stopPropagation())},processTextNodes:e,addAutoDismiss:function(c,b){k.length===0&&document.addEventListener("click",function(a){for(var b=[],c=0;c<k.length;c++){for(var e=k[c].excludeNodes,d=k[c].dismiss,h=!1,f=!0,g=0;g<
e.length;g++)if((h=document.compareDocumentPosition(document,e[g])!==1)&&i(e[g],a.target)){f=!1;break}f&&(d(),h=document.compareDocumentPosition(document,e[g])!==1);h&&b.push(k[c])}k=b},!0);k.push({excludeNodes:c,dismiss:b})},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/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,i){function f(d){var e=window.navigator.platform.indexOf("Mac")!==-1;return e&&d.metaKey||!e&&d.ctrlKey}return{getUserKeyString:function(d){var e="",c=navigator.platform.indexOf("Mac")!==-1;d.mod1&&(e+=c?"Cmd+":"Ctrl+");d.mod2&&(e+="Shift+");d.mod3&&(e+="Alt+");d.mod4&&c&&(e+="Ctrl+");if(d.alphaKey)return e+d.alphaKey;for(var k in i.KEY)if(typeof(i.KEY[k]==="number")&&i.KEY[k]===d.keyCode)return e+k;var h;switch(d.keyCode){case 59:h=
d.mod2?":":";";break;case 61:h=d.mod2?"+":"=";break;case 188:h=d.mod2?"<":",";break;case 190:h=d.mod2?">":".";break;case 191:h=d.mod2?"?":"/";break;case 192:h=d.mod2?"~":"`";break;case 219:h=d.mod2?"{":"[";break;case 220:h=d.mod2?"|":"\\";break;case 221:h=d.mod2?"}":"]";break;case 222:h=d.mod2?'"':"'"}return h?e+h:d.keyCode>=112&&d.keyCode<=123?e+"F"+(d.keyCode-111):e+String.fromCharCode(d.keyCode)},getUserText:function(d,e,c,k,h,b,a,j,l){var m=!1,a=function(a){return function(j){if(!m){var f=i.node(d),
q=f.value;if(f)if(a&&j.keyCode===i.KEY.ESCAPE){if(c)e.style.display="inline";f.parentNode.removeChild(f);m=!0;b&&b()}else if(!(a&&j.keyCode!==i.KEY.ENTER)){if(q.length===0||!l&&q===k){if(c)e.style.display="inline"}else h(q);m=!0;f.parentNode&&f.parentNode.removeChild(f);b&&b()}}}},f=document.createElement("input");f.id=d;f.value=k||"";e.parentNode.insertBefore(f,e.nextSibling);f.classList.add("userEditBoxPrompt");if(c)e.style.display="none";f.addEventListener("keydown",a(!0),!1);f.addEventListener("blur",
a(!1),!1);window.setTimeout(function(){f.focus();if(k){var a=i.node(d),b=j?k.indexOf(j):-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:f,followLink:function(d,e){e&&f(e)?window.open(d):window.location=d},createButton:function(d,e){var c=document.createElement("span");
c.role="button";c.tabIndex=0;c.appendChild(document.createTextNode(d));c.className="commandButton commandMargins";c.addEventListener("click",function(c){e();i.stop(c)},!1);c.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)e(),i.stop(c)},!1);return c}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(g,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._dropdownNode=i.node(d.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=d.populate;var e=this;this._triggerNode.addEventListener("click",function(c){e.toggle()&&i.stop(c)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)e.toggle(),i.stop(c)},!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 d=this.getItems();if(d.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");d[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var d=i.bounds(this._dropdownNode),e=i.bounds(this._boundingNode(this._triggerNode));if(d.left+d.width>e.left+e.width)this._dropdownNode.style.right=0},_boundingNode:function(d){return d.style.right!==""||
d.style.position==="absolute"||!d.parentNode||!d.parentNode.style?d:this._boundingNode(d.parentNode)},close:function(d){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");d&&this._triggerNode.focus();return!0},getItems:function(){var d=[],e=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(c){c.parentNode.parentNode===e._dropdownNode&&d.push(c)});return d},empty:function(){var d=this;
i.$$array("li",this._dropdownNode).forEach(function(e){e.parentNode===d._dropdownNode&&e.parentNode.removeChild(e)})},_dropdownKeyDown:function(d){if(d.keyCode===i.KEY.UP||d.keyCode===i.KEY.DOWN||d.keyCode===i.KEY.RIGHT||d.keyCode===i.KEY.ENTER||d.keyCode===i.KEY.LEFT){var e=this.getItems(),c=document.activeElement;if(e.length&&e.length>0&&c){var k=e.indexOf(c);k>=0&&(d.keyCode===i.KEY.UP&&k>0?(k--,e[k].focus()):d.keyCode===i.KEY.DOWN&&k<e.length-1?(k++,e[k].focus()):d.keyCode===i.KEY.ENTER||d.keyCode===
i.KEY.RIGHT?c.classList.contains("dropdownTrigger")&&c.dropdown&&c.dropdown.open():d.keyCode===i.KEY.LEFT&&c.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(d))}}else d.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(d))}};f.prototype.constructor=f;return{Dropdown:f}});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(g,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._node=i.node(d.node);if(!this._node)throw"no dom node for tooltip found";this._position=d.position||["right","above","below","left"];this._text=d.text;this._hideDelay=d.hideDelay===void 0?200:d.hideDelay;this._tailSize=d.tailSize||10;this._trigger=d.trigger||"mouseover";this._afterShowing=d.afterShowing;this._afterHiding=d.afterHiding;var e=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===e._node&&(e.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=d.showDelay===void 0?1E3:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(e._node,c.target)&&(e.show(),i.stop(c))},!1);for(var c=0;c<d.length;c++)this._node.addEventListener(d[c],function(c){i.contains(e._node,c.target)&&e.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var d=this;i.addAutoDismiss([this._tip,this._node],function(){d.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(d._timeout)window.clearTimeout(d._timeout),d._timeout=null;d._tip.addEventListener("mouseout",function(e){i.contains(d._tip,e.target)&&(d.hide(),i.stop(e))},!1)},!1)}return this._tip},_positionTip:function(d,e){this._makeTipNode();if(this._tailBorder)this._tip.removeChild(this._tailBorder),this._tailBorder=null,this._tip.removeChild(this._tail),this._tail=null;d==="left"?this._tipInner.classList.add("left"):
this._tipInner.classList.remove("left");var c=i.bounds(this._node),k=i.bounds(this._tipInner),h;switch(d){case "above":h=c.top-k.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":h=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":h=c.top-this._tailSize/2;c=c.left-k.width-this._tailSize-1;break;default:h=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var b=i.bounds(document.documentElement);if(h+k.height>b.height)if(e)h=b.height-k.height-1;else return!1;
if(c+k.width>b.width)if(e)c=b.width-k.width-1;else return!1;if(c<0)if(e)c=4;else return!1;if(h<0)if(e)h=4;else return!1;this._tailBorder=document.createElement("span");this._tailBorder.classList.add("tooltipTailBorderFrom"+d);this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+d);d==="above"||d==="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=h+"px";this._tip.style.left=c+"px";this._tip.style.width=k.width+"px";this._tip.style.height=k.height+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var d=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var e=!1,c=0;!e&&c<d._position.length;)e=d._positionTip(d._position[c]),
c++;e||d._positionTip(d._position[0],!0);d._tip.classList.add("tooltipShowing");d._afterShowing&&d._afterShowing()},this._showDelay)}},hide:function(d){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(d===void 0)d=this._hideDelay;var e=this;this._timeout=window.setTimeout(function(){e._tip.classList.remove("tooltipShowing");e._afterHiding&&e._afterHiding()},d)}},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}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/explorers/navigationUtils",[],function(){function g(f,d){if(!i&&f)f.push({domNode:d}),d.tabIndex=-1,d.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,d,e){f&&(f=f.getGridNavHolder(d,!0))&&g(f,e)},generateNavGrid:g,removeNavGrid:function(f,d){if(f)for(var e=0;e<f.length;e++)if(f[e].domNode===d){f.splice(e,1);break}}}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Make Favorite":"Make Favorite","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:",
"Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Import local file...":"Import local file...",
"Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ${0}":"Exporting from ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location","Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer",
"Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New","Click on an item to make a selection, then use this menu to see what actions are available.":"Click on an item to make a selection, then use this menu to see what actions are available.",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content",Favorites:"Favorites",
"Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?"});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",
Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Save Search":"Save Search","Save search query":"Save search query",
"Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes","Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Search Again":"Search Again","Search again":"Search again","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result",
"Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results","Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results",
"Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename",Searches:"Searches","You can save frequently used by searches by choosing ${0} in the search toolbar.":"You can save frequently used by searches by choosing ${0} in the search toolbar."});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/editor/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?"});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,i,f){function d(e,c){this._activeContainer=null;this._getElementsFunction=e;this._toolbarLayoutFunction=c}d.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&f.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&f.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(e,c,d){typeof e==="string"&&(e=f.node(e));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===e)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(e))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=d;var h=c(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!h)return!1;this._activeElements.focusNode=h;e=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(e.length===0){c=this._activeElements.dismissArea||
this._activeElements.parameterArea;e=document.createElement("span");e.id="closebox";e.role="button";e.tabIndex=0;e.classList.add("imageSprite");e.classList.add("core-sprite-close");e.classList.add("dismiss");e.title=g.Close;c.appendChild(e);var b=this;e.addEventListener("click",function(){b.close()},!1);e.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&b.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(h)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){h.focus();h.select()},0);this._activeElements.commandNode&&this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(e,c){f.$$array("input",c).forEach(function(c){c.type==="checkbox"?e.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&e.parameters.setValue(c.parameterName,c.value.trim())});f.$$array("textArea",c).forEach(function(c){e.parameters.setValue(c.parameterName,
c.value.trim())});e.command.callback&&e.command.callback.call(e.handler,e)},collectParameters:function(e){return e.parameters?(e.domNode&&e.domNode.classList.add("commandMarker"),this.open(e.domNode||e.domParent,this.getFillFunction(e))):!1},getFillFunction:function(e,c){var d=this;return function(h,b){var a=null,j=function(){c&&c();d.close()},l=function(a){a.keyCode===f.KEY.ENTER&&d._collectAndCall(e,h);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)j(),f.stop(a)};e.parameters.forEach(function(b){var c=
null;if(b.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",b.name+"parameterCollector"),c.textContent=b.label,h.appendChild(c);var e=b.name+"parameterCollector",d=c||h;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)c=document.createElement("textarea"),c.rows=b.lines,c.type="textarea",c.id=e,d.appendChild(c),l=function(a){a.keyCode===f.KEY.ESCAPE&&(j(),f.stop(a))};else if(b.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",
c.id=e,d.appendChild(c),b.value)c.checked=!0}else if(c=document.createElement("input"),c.type=b.type,c.id=e,d.appendChild(c),b.value)c.value=b.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=b.name;a||(a=c);c.addEventListener("keydown",l,!1)});var m=b;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",h.appendChild(m);var n=function(a){a._collectAndCall(e,
h);j()},i=function(a,b){var j=document.createElement("span");j.role="button";j.tabIndex=0;b.appendChild(j);a&&j.appendChild(document.createTextNode(a));j.classList.add("dismiss");return j};if(e.parameters.hasOptionalParameters()){e.parameters.optionsRequested=!1;var o=i(g.More,m);o.addEventListener("click",function(){e.parameters.optionsRequested=!0;n(d)},!1);o.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)e.parameters.optionsRequested=!0,n(d)},!1)}o=i(g.Submit,
m);o.addEventListener("click",function(){n(d)},!1);o.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&n(d)},!1);m=i(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=g.Close;m.addEventListener("click",function(){j()},!1);m.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&j()},!1);return a}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});
(function(){function g(a){return a?a.slice(1).split("&"):[]}function i(a){return a.length===0?"":"?"+a.join("&")}function f(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function d(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function e(a,b){var j="",c=[],e=0;return{next:function(){if(j!==a.search)j=a.search,c=g(j);if(e<c.length){var d=f(c[e++]);switch(b){case "keys":return d[0];case "values":return d[1];
case "keys+values":return[d[0],d[1]];default:throw new TypeError;}}throw l;}}}function c(a){if(typeof a!=="string")throw new TypeError;}function k(a){var b=a.protocol;return!b||b===":"||b==="http:"&&!a.hostname?!1:!0}function h(a){Object.defineProperty(this,"_anchor",{value:a})}function b(a,b){a=a||"";if(typeof a!=="string")throw new TypeError("url");b=b?b.href||b:"";if(typeof b!=="string")throw new TypeError("base");Object.defineProperty(this,"_input",{value:a,writable:!0});var j=document.implementation.createHTMLDocument("");
if(b){var c=j.createElement("a");c.href=b;if(c.protocol.length<2||!c.host)throw Error("InvalidStateError");var l=j.createElement("base");l.href=c.href;j.head.appendChild(l)}var e=j.createElement("a");e.href=a;j.body.appendChild(e);Object.defineProperty(this,"_urlAnchor",{value:e});var d=new h(e);Object.defineProperty(this,"query",{get:function(){return k(e)?d:null},enumerable:!0})}try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(a){}var j=
/([^:]*):?(.*)/,l=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(h.prototype,{get:{value:function(a){c(a);var b;g(this._anchor.search).some(function(j){j=f(j);if(j[0]===a)return b=j[1],!0});return b},enumerable:!0},set:{value:function(a,b){c(a);c(b);var j=g(this._anchor.search);j.some(function(c,l){var e=f(c);if(e[0]===a)return e[1]=b,j[l]=d(e),!0})||j.push(d([a,b]));this._anchor.search=i(j)},enumerable:!0},has:{value:function(a){c(a);return g(this._anchor.search).some(function(b){if(f(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){c(a);var b=g(this._anchor.search),j=b.filter(function(b){return f(b)[0]!==a});return j.length!==b.length?(this._anchor.search=i(j),!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 j=e(this._anchor,"keys+values");try{for(;;){var c=j.next();a.call(b,c[1],c[0],this)}}catch(d){if(d!==l)throw d;}},enumerable:!0},keys:{value:function(){return e(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return e(this._anchor,"values")},enumerable:!0},items:{value:function(){return e(this._anchor,"keys+values")}},size:{get:function(){return g(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){c(a);var b=[];g(this._anchor.search).forEach(function(j){j=f(j);j[0]===a&&b.push(j[1])});return b},enumerable:!0},append:{value:function(a,b){c(a);c(b);var j=g(this._anchor.search);j.push(d([a,b]));this._anchor.search=i(j)},enumerable:!0}});
Object.defineProperties(b.prototype,{href:{get:function(){return k(this._urlAnchor)?this._urlAnchor.href:this._input},set:function(a){c(a);this._input=a;this._urlAnchor.href=a},enumerable:!0},origin:{get:function(){return k(this._urlAnchor)?this._urlAnchor.protocol+"//"+this._urlAnchor.host:""},enumerable:!0},protocol:{get:function(){return k(this._urlAnchor)?this._urlAnchor.protocol:":"},set:function(a){c(a);this._urlAnchor.protocol=a},enumerable:!0},_userinfo:{get:function(){return!k(this._urlAnchor)?
"":RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host).exec(this._urlAnchor.href)[2]||""},set:function(a){c(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(!k(this._urlAnchor))return"";var a=j.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){c(a);var b=j.exec(this._userinfo),
a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")},enumerable:!0},password:{get:function(){if(!k(this._urlAnchor))return"";var a=j.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){c(a);var b=[j.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")},enumerable:!0},host:{get:function(){return k(this._urlAnchor)?this._urlAnchor.host:""},set:function(a){c(a);this._urlAnchor.host=a},enumerable:!0},hostname:{get:function(){return k(this._urlAnchor)?
this._urlAnchor.hostname:""},set:function(a){c(a);this._urlAnchor.hostname=a},enumerable:!0},port:{get:function(){return k(this._urlAnchor)?this._urlAnchor.port:""},set:function(a){c(a);this._urlAnchor.port=a},enumerable:!0},pathname:{get:function(){return k(this._urlAnchor)?this._urlAnchor.pathname:""},set:function(a){c(a);this._urlAnchor.pathname=a},enumerable:!0},search:{get:function(){return k(this._urlAnchor)?this._urlAnchor.search:""},set:function(a){c(a);this._urlAnchor.search=a},enumerable:!0},
hash:{get:function(){return k(this._urlAnchor)?this._urlAnchor.hash:""},set:function(a){c(a);this._urlAnchor.hash=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(b,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(b,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=b})();define("orion/URL-shim",function(){});
define("orion/editor/util",[],function(){var g=navigator.userAgent,i=parseFloat(g.split("MSIE")[1])||void 0,f=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,d=g.indexOf("Opera")!==-1,e=parseFloat(g.split("Chrome/")[1])||void 0,c=g.indexOf("Safari")!==-1&&!e,k=parseFloat(g.split("WebKit/")[1])||void 0,h=g.indexOf("Android")!==-1,b=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,a=b||g,j=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,j){return b[(j<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:f,isOpera:d,isChrome:e,isSafari:c,isWebkit:k,isAndroid:h,isIPad:b,isIPhone:g,isIOS:a,isMac:j,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(g){function i(f,d,e,c,k){this.keyCode=typeof f==="string"?f.toUpperCase().charCodeAt(0):f;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=e!==void 0&&e!==null?e:!1;this.mod3=c!==void 0&&c!==null?c:!1;this.mod4=k!==void 0&&k!==null?k:!1}i.prototype={match:function(f){return this.keyCode===f.keyCode?this.mod1!==(g.isMac?f.metaKey:f.ctrlKey)?!1:this.mod2!==f.shiftKey?!1:this.mod3!==f.altKey?!1:g.isMac&&this.mod4!==f.ctrlKey?!1:!0:!1},equals:function(f){return!f?
!1:this.keyCode!==f.keyCode?!1:this.mod1!==f.mod1?!1:this.mod2!==f.mod2?!1:this.mod3!==f.mod3?!1:this.mod4!==f.mod4?!1:!0}};return{KeyBinding:i}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,i){function f(d){this._init(d)}f.prototype={_init:function(d){var e=i.node(d.container);if(!e)throw"no parent container";this._container=e;e.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._makeHref=d.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;
this._resource&&this._resource.Parents?(d=document.createElement("a"),this._makeHref?this._makeHref(d,""):d.href=g.toUrl("navigate/table.html")+"#"):d=document.createElement("span");i.empty(d);d.appendChild(document.createTextNode(this._workspaceRootSegmentName));return d}return null},render:function(){var d=this._container,e=i.node(this._id);e?i.empty(e):(e=document.createElement("span"),e.id=this._id,d.appendChild(e));var c;if(c=this.getNavigatorWorkspaceRootSegment())if(c.classList.add("breadcrumb"),
e.appendChild(c),this._resource&&this._resource.Parents)c=document.createElement("span"),c.appendChild(document.createTextNode(" / ")),this.path+="/",c.classList.add("breadcrumbSeparator"),e.appendChild(c);else{c.href="";c.classList.remove("breadcrumb");c.classList.add("currentLocation");return}d=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var k=this._resource.Parents,h=k.length;--h>=0;)c=document.createElement("a"),c.classList.add("breadcrumb"),d?(c.appendChild(document.createTextNode(d)),
d=null):c.appendChild(document.createTextNode(k[h].Name)),this.path+=k[h].Name,this._makeHref?this._makeHref(c,k[h].Location):c.href=g.toUrl("navigate/table.html")+"#"+k[h].ChildrenLocation,e.appendChild(c),c=document.createElement("span"),c.appendChild(document.createTextNode(" / ")),this.path+="/",c.classList.add("breadcrumbSeparator"),e.appendChild(c);c=document.createElement("span");d?(c.appendChild(document.createTextNode(d)),d=null):c.appendChild(document.createTextNode(this._resource.Name));
c.classList.add("currentLocation");this.path+=this._resource.Name;e.appendChild(c)}e.childNodes.length===0&&(c=document.createElement("span"),c.appendChild(document.createTextNode(d||document.title)),c.classList.add("breadcrumb"),c.classList.add("currentLocation"),e.appendChild(c))}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(g,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(d.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(d.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(d.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=d.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(d.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(d){this._resizeListeners.push(d)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var d;if(this._vertical){if(d=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=
parseInt(d,10)}else if(d=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(d,10)},_adjustToSplitPosition:function(d){var e=i.bounds(this.$node),c=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(d||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);d=this._splitTop;this.$node.parentNode.style.position==="relative"&&(d=this._splitTop-c.top);this.$sideNode.style.height=d+"px";this.$sideNode.style.bottom=
d-1+"px";this.$sideNode.style.display="block";this.$node.style.top=d+"px"}else{this._splitWidth=e.width;if(d||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);d=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(d=this._splitLeft-c.left);this.$sideNode.style.width=d+"px";this.$sideNode.style.right=d-1+"px";this.$sideNode.style.display="block";this.$node.style.left=d+"px"}this._resize()},_resize:function(d){var d=d||0,e=i.bounds(this.$node.parentNode),
c=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=e.height-(c.top-e.top+c.height)+"px":this.$mainNode.style.width=e.width-(c.left-e.left+c.width)+"px";var k=this;window.setTimeout(function(){k._notifyResizeListeners(k.$mainNode)},d);window.setTimeout(function(){k._notifyResizeListeners(k.$sideNode)},d)},_notifyResizeListeners:function(d){for(var e=0;e<this._resizeListeners.length;e++)this._resizeListeners[e](d)},_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 d=this;window.setTimeout(function(){d.$sideNode.classList.remove("sidePanelLayoutAnimation");d.$mainNode.classList.remove("mainPanelLayoutAnimation");d.$node.classList.remove("splitLayoutAnimation");d._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(d){if(d.target===this._thumb)return i.stop(d),this._thumbDown(d);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(d)},_mouseMove:function(d){if(this._tracking){var e;this._vertical?(e=this._splitTop=d.clientY,this.$node.parentNode.style.position===
"relative"&&(e=i.bounds(this.$node.parentNode),e=this._splitTop-e.top),this.$node.style.top=e+"px"):(e=this._splitLeft=d.clientX,this.$node.parentNode.style.position==="relative"&&(e=i.bounds(this.$node.parentNode),e=this._splitLeft-e.left),this.$node.style.left=e+"px");this._adjustToSplitPosition(!0);i.stop(d)}},_mouseUp:function(d){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(d)}};f.prototype.constructor=f;return{Splitter:f}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(g){if(!g)return g;var i=window.location.protocol+"//"+window.location.host;return g.indexOf(i)===0?g.substring(i.length):g},isAtRoot:function(g){return this.makeRelative(g).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(g,i,f){function d(e){this._favorites=[];f.attach(this);this._init(e);this._initializeFavorites()}d.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(e){for(var e=Array.isArray(e)?
e:[e],c=0;c<e.length;c++){var d=e[c],h=d.ChildrenLocation?d.ChildrenLocation:d.Location,h=i.makeRelative(h);this.addFavorite(d.Name,h,d.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(e){this.addFavorite(e,e,!1,!0)},addFavorite:function(e,c,d){this._favorites.push({name:e,path:c,directory:d,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(e){for(var c in this._favorites)if(this._favorites[c].path===
e){this._favorites.splice(c,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(e,c){var d=!1,h;for(h in this._favorites)if(this._favorites[h].path===e){var b=this._favorites[h];if(b.name!==c)b.name=c,d=!0}d&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(e){for(var c in this._favorites)if(this._favorites[c].path===e)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(e){var c;
if(!e)return this._favorites;var d="";for(c=0;c<e.length;c++){var h=e.charAt(c);d+=h==="*"?".*":h==="?"?".?":this._SPECIAL_CHARS.indexOf(h)>=0?"\\"+h:h}d+=".*";e=RegExp(d);d=[];for(c in this._favorites)this._favorites[c].name.search(e)===0&&d.push(this._favorites[c]);return d},_initializeFavorites:function(){var d=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(c){var k,c=c.get("navigate");typeof c==="string"&&(c=JSON.parse(c));if(c)for(k in c)c[k].isFavorite=
!0,d._favorites.push(c[k]);d._favorites.sort(d._sorter);d._notifyListeners()})},_storeFavorites:function(){var d=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(c){c.put("navigate",d)})},_sorter:function(d,c){var k=d.name.toLowerCase(),h=c.name.toLowerCase();return k>h?1:k<h?-1:0},getFavorites:function(){return{navigator:this._favorites}}};d.prototype.constructor=d;return{FavoritesService:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var f="",d=[],e=new g.ThemeClass("orionPage");
e.style.backgroundColor="#fdfdfd";e.style.width="100%";e.style.height="100%";d.push(e);e=new g.ThemeClass("topRowBanner");e.style.margin="0";e.style.border="0";e.style.backgroundColor=this.navbar;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";e.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";e.style.height="28px";d.push(e);e=new g.ThemeClass("a");e.style.textDecoration="none";
e.style.color=this.content;d.push(e);e=new g.ThemeClass("navlink");e.style.display="inline-block";e.style.padding="2px";e.style.color=this.content;d.push(e);e=new g.ThemeClass("primaryNav");e.style.color=this.navtext;e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.paddingTop="6px";e.style.verticalAlign="baseline";d.push(e);e=new g.ThemeClass("primaryNav a");e.style.fontSize="8pt";e.style.color=this.navtext;e.style.marginRight="6px";e.style.marginLeft="6px";e.style.verticalAlign="baseline";
e.style.textDecoration="none";d.push(e);e=new g.ThemeClass("primaryNav a:hover");e.style.color="#bfbfbf";e.style.cursor="hand";e.style.color="white";e.style.fontWeight="normal";d.push(e);for(var c in d)f+=d[c].toString();return f};i.prototype.writeLocationStyle=function(){var f="",d=[],e=new g.ThemeClass("titleArea");e.style.margin="0";e.style.paddingTop="5px";e.style.border="0";e.style.background=this.location;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";e.style.borderBottom="1px solid "+this.location;e.style.minHeight="20px";d.push(e);e=new g.ThemeClass("breadcrumb");e.style.fontSize="8pt";e.style.textDecoration="none";e.style.color=this.content;e.style.paddingTop="2px";d.push(e);e=new g.ThemeClass("a.breadcrumb:hover");e.style.textDecoration="none";e.style.borderBottom="1px dotted";e.style.color="#F58B0F";e.style.cursor="pointer";d.push(e);e=new g.ThemeClass("breadcrumbSeparator");e.style.fontSize="8pt";
e.style.textDecoration="none";e.style.color=this.navbar;e.style.fontWeight="bold";d.push(e);e=new g.ThemeClass("currentLocation");e.style.fontWeight="bold";e.style.fontSize="8pt";e.style.color=this.navbar;e.style.textDecoration="none";e.style.textWrap="normal";e.style.lineHeight="10pt";d.push(e);e=new g.ThemeClass("a.currentLocation:hover");e.style.fontWeight="bold";e.style.fontSize="10pt";e.style.color="#666666";e.style.textDecoration="none";e.style.borderBottom="0";d.push(e);e=new g.ThemeClass("navlinkonpage");
e.style.color=this.content;d.push(e);for(var c in d)f+=d[c].toString();return f};i.prototype.writeButtonStyle=function(){var f="",d=[],e=new g.ThemeClass("commandButton");e.style.color="#222";e.style.border="1px solid #dedede";e.style.backgroundColor=this.button;e.style.textAlign="center";e.style.verticalAlign="baseline";e.style.cursor="pointer";e.style.display="inline-block";e.style.padding="6px";e.style.paddingTop="4px";e.style.borderRadius="1px";e.style.lineHeight="12px";e.style.fontSize="8pt";
e.style.userSelect="none";d.push(e);e=new g.ThemeClass("commandButton:over");e.style.backgroundColor="#e6e6e6";e.style.border="1px solid #808080";d.push(e);e=new g.ThemeClass("commandMenu");e.style.color="#222";e.style.display="inline-block";e.style.verticalAlign="baseline";e.style.margin="0";e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.border="1px solid #dedede";e.style.backgroundColor="#efefef";e.style.cursor="pointer";e.style.borderRadius="1px";d.push(e);e=new g.ThemeClass("commandMenuItem");
e.style.border="0";e.style.padding="0";e.style.margin="0";d.push(e);for(var c in d)f+=d[c].toString();return f};i.prototype.writeMainStyle=function(){var f="",d=[],e=new g.ThemeClass("searchbox");e.style.backgroundImage="url(../images/core_sprites.png)";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="4px -297px";e.style.width="12px";e.style.height="12px";e.style.backgroundColor=this.search;e.style.border="1px solid "+this.search;e.style.fontSize="11px";e.style.width="15em";e.style.height=
"16px";e.style.borderRadius="10px";e.style.color="#999";e.style.padding="0";e.style.paddingLeft="20px";e.style.marginLeft="5px";e.style.marginTop="6px !important";e.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(e);e=new g.ThemeClass("searchbox:focus");e.style.color="white";e.style.outline="none";d.push(e);e=new g.ThemeClass("checkedRow");e.style.cssText="background-color:"+this.selection+" !important;";d.push(e);e=new g.ThemeClass("navbar-item-selected");
e.style.background=this.selection;e.style.color=this.content;d.push(e);e=new g.ThemeClass("auxpane");e.style.border="0";e.style.background=this.sidepanel;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";e.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";e.style.overflowX="auto";e.style.minWidth="200px";e.style.paddingTop="16px";d.push(e);e=new g.ThemeClass("mainpane");
e.style.background=this.mainpanel;e.style.border=0;d.push(e);e=new g.ThemeClass("mainToolbar");e.style.background=this.toolpanel;e.style.height="31px";e.style.borderBottom="1px solid #ebebeb";d.push(e);for(var c in d)f+=d[c].toString();return f};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,
this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=
f.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:i}});
define("orion/inputCompletion/inputCompletion",[],function(){function g(g,f,d){this._inputField=g;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=f;(g=d?d.group:null)||(g=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=g+"__completion__";this._proposeFromStart=d?d.proposeFromStart:!1;this._extendedProvider=d?d.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._dataList=[];this._initUI();var e=this;this._completionUIContainer.addEventListener("mousedown",function(){e._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){e._mouseDown=!1});this._inputField.addEventListener("blur",function(){e._mouseDown?window.setTimeout(function(){e._inputField.focus()},200):e._dismiss()});this._inputField.addEventListener("keydown",function(c){e.onKeyDown(c)});this._inputField.addEventListener("input",function(){e._proposeOn(e._inputField.value)});
this._inputField.addEventListener("focus",function(){if(e._dismissed&&e._binderFunc)e._dismissing?e._dismissing=!1:e._binderFunc&&e._binderFunc(function(c){e._bind(c);e._proposeOn(e._inputField.value)})})}g.prototype.onKeyDown=function(g){if(this._dismissed)return!0;var f=g.charCode||g.keyCode;if(f===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return g.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
g.ctrlKey),g.stopPropagation(),!1}else if((f===40||f===38)&&this._proposalList&&this._proposalList.length>0)return g.preventDefault(),this._walk(f===40),g.stopPropagation(),!1;else if(f===27)return g.preventDefault(),this._dismiss(),!1;return!0};g.prototype._bind=function(g){this._dataList=g};g.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};g.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};g.prototype._initUI=function(){this._completionUIContainer=
document.getElementById(this._getUIContainerID());if(!this._completionUIContainer)this._completionUIContainer=document.createElement("div"),this._completionUIContainer.id=this._getUIContainerID(),this._completionUIContainer.style.display="none",this._completionUIContainer.className="inputCompletionContainer",this._completionUIContainer.setAttribute("role","list"),this._completionUIContainer.setAttribute("aria-atomic","true"),this._completionUIContainer.setAttribute("aria-live","assertive"),document.body.appendChild(this._completionUIContainer);
this._completionUIContainer.textContent="";this._completionUL=document.getElementById(this._getUIProposalListId());if(!this._completionUL)this._completionUL=document.createElement("ul"),this._completionUL.id=this._getUIProposalListId(),this._completionUL.className="inputCompletionUL";this._completionUL.textContent="";this._completionUIContainer.appendChild(this._completionUL)};g.prototype._createProposalLink=function(g,f,d,e){var c=document.createElement("a");c.href=require.toUrl(f);c.appendChild(this._createBoldText(g,
d,e));return c};g.prototype._createBoldText=function(g,f,d){if(f<0)return document.createTextNode(g);var e=document.createElement("span"),c;0!==f&&(c=document.createTextNode(g.substring(0,f)),e.appendChild(c));var k=document.createElement("b");e.appendChild(k);c=document.createTextNode(g.substring(f,f+d));k.appendChild(c);f+d<g.length-1&&(c=document.createTextNode(g.substring(f+d)),e.appendChild(c));return e};g.prototype._proposeOnCategory=function(g,f){if(f.length!==0){var d=this;if(g){var e=document.createElement("li");
e.className="inputCompletionLICategory";var c=document.createTextNode(g);e.appendChild(c);this._completionUL.appendChild(e)}for(c=0;c<f.length;c++){e=document.createElement("li");e.onmouseover=function(c){d._selectProposal(c.currentTarget)};e.onclick=function(c){d._dismiss(c.currentTarget.completionItem.value)};e.className="inputCompletionLINormal";e.completionItem=f[c].item;if(typeof f[c].item.value==="string"){var k=this._createBoldText(f[c].item.value,f[c].boldIndex,f[c].boldLength);e.appendChild(k)}else f[c].item.value.name&&
f[c].item.value.type==="link"&&e.appendChild(this._createProposalLink(f[c].item.value.name,f[c].item.value.value,f[c].boldIndex,f[c].boldLength));this._completionUL.appendChild(e);this._proposalList.push({item:f[c].item,domNode:e})}}};g.prototype._domNode2Index=function(g){for(var f=0;f<this._proposalList.length;f++)if(this._proposalList[f].domNode===g)return f;return-1};g.prototype._highlight=function(g,f){var d=g,e=!1;isNaN(d)||(e=!0,d=this._proposalList&&g>=0&&g<this._proposalList.length?this._proposalList[g].domNode:
null);if(d)d.className=f?"inputCompletionLISelected":"inputCompletionLINormal",f&&e&&(d.offsetTop<this._completionUIContainer.scrollTop?d.scrollIntoView(!0):d.offsetTop+d.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&d.scrollIntoView(!1))};g.prototype._selectProposal=function(g){var f=g;isNaN(f)&&(f=this._domNode2Index(g));if(f!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=f,this._highlight(this._proposalIndex,!0)};
g.prototype._dismiss=function(g,f){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof g==="string")this._inputField.value=g,this._dismissing=!0,this._inputField.focus();else if(g&&g.name&&g.type==="link")f?window.open(g.value):window.location.href=g.value;var d=this;window.setTimeout(function(){d._completionUIContainer.style.display="none"},200)}};g.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var g=0,f=0,d=this._inputField;d;)g+=
d.offsetLeft,f+=d.offsetTop,d=d.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=f+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=g+"px";this._completionUIContainer.style.width=this._inputField.offsetWidth+"px";this._dismissed=this._mouseDown=!1}else this._dismissed=!0,this._proposalList=null,this._proposalIndex=-1,this._completionUIContainer.style.display="none"};g.prototype._walk=function(g){g=this._proposalIndex+(g?
1:-1);g<-1?g=this._proposalList.length-1:g>=this._proposalList.length&&(g=-1);this._selectProposal(g)};g.prototype._proposeOnList=function(g,f,d){for(var e="",c=[],k=f?f.length:0,h=0;h<g.length;h++)if(g[h].type==="category")this._proposeOnCategory(e,c),e=g[h].label,c=[];else{var b=!0,a=-1;if(f&&d){var j;typeof g[h].value==="string"?j=g[h].value.toLowerCase():g[h].value.name&&(j=g[h].value.name.toLowerCase());a=j.indexOf(f);a<0?b=!1:this._proposeFromStart&&(b=a===0)}b&&c.push({item:g[h],boldIndex:a,
boldLength:k})}this._proposeOnCategory(e,c)};g.prototype._proposeOn=function(g){this._completionUL.textContent="";var f=g?g.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,f,!0);if(this._extendedProvider&&f){var d=this;this._extendedProvider(g,function(e){if(e)for(var c=0;c<e.length;c++)d._proposeOnList(e[c].proposals,e[c].filterForMe?f:g,e[c].filterForMe);d._show()},[])}else this._show()};g.prototype.constructor=g;return{InputCompletion:g}});
define("orion/globalSearch/nls/root/messages",{"Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type:":"File type:","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Case sensitive":"Case sensitive","Regular expression":"Regular expression"});
define("orion/globalSearch/nls/messages",["orion/i18n!orion/globalSearch/nls/messages","orion/globalSearch/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","Populating favorites...":"Populating favorites...",Favorite:"Favorite","Searching...":"Searching...",name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",
test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:","Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination",
"Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'."});define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(g,i,f,d){function e(){}e.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><span tabindex="0" role="button" aria-label="Close" class="dialogDismiss layoutRight core-sprite-close imageSprite" id="closeDialog"></span></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',
_initialize:function(){var c=document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var d=document.createRange();d.selectNode(c);d=d.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(d);this.$frame=c.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var e=this;this.$close.addEventListener("click",function(){e.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);
d=document.createRange();d.selectNode(this.$parent);c=d.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(c,this.messages);this.$parent.appendChild(c);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$close.addEventListener("keydown",function(b){(b.keyCode===f.KEY.ENTER||b.keyCode===f.KEY.SPACE)&&e.hide()},!1);this.$frame.addEventListener("keydown",function(b){b.keyCode===f.KEY.ESCAPE?e.hide():b.keyCode===f.KEY.ENTER&&typeof e._defaultCallback===
"function"&&e._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 c=this;this.buttons.forEach(function(e){var h=d.createButton(e.text,e.callback);if(e.id)h.id=e.id,c["$"+h.id]=h;if(e.isDefault)c._defaultCallback=e.callback,c._defaultButton=h;c.$buttonContainer.appendChild(h)})}},_makeModal:function(){var c=this;this.$frame.addEventListener("blur",
function(a){c.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!f.contains(c.$frame,a.target);if(b)for(var d=0;d<c.$$modalExclusions.length;d++)if(f.contains(c.$$modalExclusions[d],a.target)){b=!1;break}b&&(window.setTimeout(function(){(c.$lastFocusedElement||c.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var d=this.$frameParent.childNodes,e=!1;this._addedBackdrop=
[];for(var b=0;b<d.length;b++){for(var a=0;a<this.$$modalExclusions.length;a++)if(f.contains(this.$$modalExclusions[a],d[b])){e=!0;break}!e&&d[b]!==c.$frame&&d[b].classList&&!d[b].classList.contains("tooltipContainer")&&(a=d[b],a.classList.contains("modalBackdrop")||(a.classList.add("modalBackdrop"),this._addedBackdrop.push(a)))}(d=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&d.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var b=c._getFirstFocusField();
b&&b!==a.target&&b.focus();f.stop(a)}},!1)},_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},_bindElements:function(c){for(var d=0;d<c.childNodes.length;d++){var e=c.childNodes[d];e.id&&(this["$"+e.id]=e);this._bindElements(e)}},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 c=this;this.keepAlive||window.setTimeout(function(){c.destroy()},0)},show:function(c){typeof this._beforeShowing==="function"&&this._beforeShowing();var d=f.bounds(this.$frame),e=f.bounds(document.documentElement),b;c?(b=f.bounds(c),c=b.top+b.height+4,b=b.left+4,c+d.height>e.height&&(c=Math.max(0,e.height-d.height-4)),b+d.width>e.width&&(b=Math.max(0,e.width-d.width-4))):(b=Math.max(0,(e.width-d.width)/2),c=Math.max(0,(e.height-d.height)/
2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=c+"px";this.$frame.style.left=b+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return f.firstTabbable(this.$parent)||this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(c){c.classList.remove("modalBackdrop")});
this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};e.prototype.constructor=e;return{Dialog:e}});
(function(){var g=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,f=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,d=typeof location!=="undefined"&&location.href,e=d&&location.protocol&&location.protocol.replace(/\:/,""),c=d&&location.hostname,k=d&&(location.port||void 0),h=[];define("text",[],function(){var b,a,j;typeof window!=="undefined"&&window.navigator&&window.document?a=function(a,j){var c=b.createXhr();c.open("GET",a,!0);c.onreadystatechange=
function(){c.readyState===4&&j(c.responseText)};c.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(j=require.nodeRequire("fs"),a=function(a,b){var c=j.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)}):typeof Packages!=="undefined"&&(a=function(a,b){var j=new java.io.File(a),c=java.lang.System.getProperty("line.separator"),j=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(j),"utf-8")),d,e,h="";try{d=new java.lang.StringBuffer;
(e=j.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(d.append(e);(e=j.readLine())!==null;)d.append(c),d.append(e);h=String(d.toString())}finally{j.close()}b(h)});return b={version:"1.0.7",strip:function(a){if(a){var a=a.replace(i,""),b=a.match(f);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,
j;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(b=0;b<3;b++){j=g[b];try{a=new ActiveXObject(j)}catch(c){}if(a){g=[j];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:a,parseName:function(a){var b=!1,j=a.indexOf("."),c=a.substring(0,j),a=a.substring(j+1,a.length),j=a.indexOf("!");j!==-1&&(b=a.substring(j+1,a.length),b=b==="strip",a=a.substring(0,j));return{moduleName:c,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
j,c,d){var e=b.xdRegExp.exec(a),h;if(!e)return!0;a=e[2];e=e[3];e=e.split(":");h=e[1];e=e[0];return(!a||a===j)&&(!e||e===c)&&(!h&&!e||h===d)},finishLoad:function(a,j,c,d,e){c=j?b.strip(c):c;e.isBuild&&(h[a]=c);d(c)},load:function(a,j,h,f){if(f.isBuild&&!f.inlineText)h();else{var g=b.parseName(a),i=g.moduleName+"."+g.ext,q=j.toUrl(i),v=f&&f.text&&f.text.useXhr||b.useXhr;!d||v(q,e,c,k)?b.get(q,function(j){b.finishLoad(a,g.strip,j,h,f)}):j([i],function(a){b.finishLoad(g.moduleName+"."+g.ext,g.strip,a,
h,f)})}},write:function(a,j,c){if(j in h){var d=b.jsEscape(h[j]);c.asModule(a+"!"+j,"define(function () { return '"+d+"';});\n")}},writeFile:function(a,j,c,d,e){var j=b.parseName(j),h=j.moduleName+"."+j.ext,f=c.toUrl(j.moduleName+"."+j.ext)+".js";b.load(h,c,function(){var j=function(a){return d(f,a)};j.asModule=function(a,b){return d.asModule(a,f,b)};b.write(a,h,j,e)},e)}}})})();define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner" class="headerLayout">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="primaryNav layoutBlock topRowBanner">\n\t\t<a id="home" class="layoutLeft logo"></a>\n\t\t<nav id="primaryNav" class="layoutLeft" role="navigation"></nav>\n\t\t<div class="layoutRight">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;">\n\t\t\t\t<span tabindex="0" role="button" id="relatedTrigger" class="dropdownTrigger hidden">${Related}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="relatedDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;"></div>\n\t\t\t<div id="userMenu" class="spacingLeft layoutLeft">\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">${Options}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<\!-- Task + resource (title) area --\>\n\t<div id="titleArea" class="layoutBlock titleArea">\n\t\t<div class="clear" style="padding-bottom:5px;display:inline;"><span id="location" class="currentLocation"></span><span id="dirty" class="currentLocation"></span></div>\n\t\t<div class="layoutRight pageNav">\n\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t</div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a>\n\t\t<a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=2.0" target="_blank">${Report a Bug}</a>|\n\t\t<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a>|\n\t\t<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a>|\n\t\t<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<div class="layoutRight" style="padding-left:7px;padding-right:7px;margin-top:3px;" id="settingsTab" style="visibility:hidden;">\n\t<div class="layoutRight core-sprite-settings" id="settingsAction" role="settings" aria-live="off" style="visibility:hidden;"></div>\n</div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>\n<div id="notificationArea" class="layoutLeft layoutBlock slideContainer">\n\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t<div class="layoutRight"><span tabindex="0" role="button" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div>\n</div>\n\t\t\n\t'});
define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(g,i,f){return{slideoutHTMLFragment:function(d){var e=document.createElement("div");e.innerHTML=f;var c=i.$("#slideContainer",e);c.id=d+c.id;c=i.$("#pageCommandParameters",e);c.id=d+c.id;c=i.$("#pageCommandDismiss",e);c.id=d+c.id;return e.innerHTML}}});
define("gcli/legacy",["require","exports","module"],function(){if(!(typeof window==="undefined"||typeof document==="undefined")){if(window.console==null)window.console={};"debug,log,warn,error,trace,group,groupEnd".split(",").forEach(function(g){window.console[g]||(window.console[g]=function(){})});!("classList"in document.documentElement)&&Object.defineProperty&&typeof HTMLElement!=="undefined"&&Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function g(d){return function(e){var c=
i.className.split(/\s+/),f=c.indexOf(e);d(c,f,e);i.className=c.join(" ")}}var i=this,f={add:g(function(d,e,c){~e||d.push(c)}),remove:g(function(d,e){~e&&d.splice(e,1)}),toggle:g(function(d,e,c){~e?d.splice(e,1):d.push(c)}),contains:function(d){return!!~i.className.split(/\s+/).indexOf(d)},item:function(d){return i.className.split(/\s+/)[d]||null}};Object.defineProperty(f,"length",{get:function(){return i.className.split(/\s+/).length}});return f}});if(typeof Range.prototype.createContextualFragment===
"undefined")Range.prototype.createContextualFragment=function(g){var i=this.startContainer,f=i.nodeType==9?i:i.ownerDocument,i=f.createElement("div");i.innerHTML=g;for(g=f.createDocumentFragment();f=i.firstChild;)g.appendChild(f);return g};if(!String.prototype.trimLeft)String.prototype.trimLeft=function(){return String(this).replace(/\s*$/,"")}}});
define("gcli/nls/strings",["require","exports","module"],function(g,i){i.root={canonDescNone:"(No description)",cliEvalJavascript:"Enter JavaScript directly",cliUnusedArg:"Too many arguments",cliOptions:"Available Options",fieldSelectionSelect:"Select a %S\u2026",fieldArrayAdd:"Add",fieldArrayDel:"Delete",fieldMenuMore:"More matches, keep typing",jstypeParseScope:"Scope lost",jstypeParseMissing:"Can't find property '%S'",jstypeBeginSyntax:"Syntax error",jstypeBeginUnterm:"Unterminated string literal",
jstypeParseError:"Error",typesNumberNan:'Can\'t convert "%S" to a number.',typesNumberMax:"%1$S is greater than maximum allowed: %2$S.",typesNumberMin:"%1$S is smaller than minimum allowed: %2$S.",typesSelectionNomatch:"Can't use '%S'.",nodeParseSyntax:"Syntax error in CSS query",nodeParseMultiple:"Too many matches (%S)",nodeParseNone:"No matches",helpDesc:"Get help on the available commands",helpManual:"Provide help either on a specific command (if a search string is provided and an exact match is found) or on the available commands (if a search string is not provided, or if no exact match is found).",
helpSearchDesc:"Search string",helpSearchManual2:"<strong>search string</strong> to use in narrowing down the displayed commands. Regular expressions not supported.",helpManSynopsis:"Synopsis",helpManDescription:"Description",helpManParameters:"Parameters",helpManNone:"None",helpListAll:"Available Commands:",helpListPrefix:"Commands starting with '%1$S':",helpListNone:"No commands starting with '%1$S'",helpManRequired:"required",helpManOptional:"optional",subCommands:"Sub-Commands",subCommandsNone:"None",
prefDesc:"Commands to control settings",prefManual:"Commands to display and alter preferences both for GCLI and the surrounding environment",prefListDesc:"Display available settings",prefListManual:"Display a list of preferences, optionally filtered when using the 'search' parameter",prefListSearchDesc:"Filter the list of settings displayed",prefListSearchManual:"Search for the given string in the list of available preferences",prefShowDesc:"Display setting value",prefShowManual:"Display the value of a given preference",
prefShowSettingDesc:"Setting to display",prefShowSettingManual:"The name of the setting to display",prefSetDesc:"Alter a setting",prefSetManual:"Alter preferences defined by the environment",prefSetSettingDesc:"Setting to alter",prefSetSettingManual:"The name of the setting to alter.",prefSetValueDesc:"New value for setting",prefSetValueManual:"The new value for the specified setting",prefSetCheckHeading:"This might void your warranty!",prefSetCheckBody:"Changing these advanced settings can be harmful to the stability, security, and performance of this application. You should only continue if you are sure of what you are doing.",
prefSetCheckGo:"I'll be careful, I promise!",prefResetDesc:"Reset a setting",prefResetManual:"Reset the value of a setting to the system defaults",prefResetSettingDesc:"Setting to reset",prefResetSettingManual:"The name of the setting to reset to the system default value",prefOutputFilter:"Filter",prefOutputName:"Name",prefOutputValue:"Value",introDesc:"Show the opening message",introManual:"Redisplay the message that is shown to new users until they click the 'Got it!' button",introTextOpening:"The Firefox command line is designed for developers. It focuses on speed of input over JavaScript syntax and a rich display over monospace output.",
introTextCommands:"For a list of commands type",introTextKeys:"or to show/hide command hints press",introTextF1Escape:"F1/Escape",introTextGo:"Got it!",hideIntroDesc:"Show the initial welcome message",eagerHelperDesc:"How eager are the tooltips",allowSetDesc:"Has the user enabled the 'pref set' command?"}});
define("gcli/l10n",["require","exports","module","gcli/nls/strings"],function(g,i){function f(b,a){return b.replace(/\{[^}]*\}/g,function(b){b=b.slice(1,-1);if(a==null)return console.log("Missing swaps while looking up '"+b+"'"),"";var c=a[b];c==null&&(console.log("Can't find '"+b+"' in "+JSON.stringify(a)),c="");return c})}function d(b,a){var j=0,b=b.replace(/%S/g,function(){return a[j++]});return b=b.replace(/%([0-9])\$S/g,function(b,j){return a[j-1]})}function e(){if(!h){var b=navigator.language||
navigator.userLanguage;k.some(function(a){return a.locales.indexOf(b)!==-1?(h=a,!0):!1});h||(console.error("Failed to find plural rule for "+b),h=k[0])}return h}var c={};i.registerStringsSource=function(b){var a=g(b).root;Object.keys(a).forEach(function(j){c[j]?console.error("Key '"+j+"' (loaded from "+b+") already exists. Ignoring."):c[j]=a[j]},this)};g("gcli/nls/strings");i.registerStringsSource("gcli/nls/strings");i.unregisterStringsSource=function(b){b=g(b).root;Object.keys(b).forEach(function(a){delete c[a]},
this)};i.getPreferredLocales=function(){var b=(typeof navigator!=="undefined"?(navigator.language||navigator.userLanguage).toLowerCase():"en-us").split("-"),a=b.map(function(a,c){return b.slice(0,b.length-c).join("-")});a.push("root");return a};i.lookup=function(b){var a=c[b];if(a==null)throw Error("No i18n key: "+b);return a};i.propertyLookup=typeof Proxy!=="undefined"?Proxy.create({get:function(b,a){return i.lookup(a)}}):c;i.lookupSwap=function(b,a){var j=i.lookup(b);return f(j,a)};i.lookupFormat=
function(b,a){var j=i.lookup(b);return d(j,a)};i.lookupPlural=function(b,a,j){var c=e().get(a),b=i.lookup(b)[c],j=j||{};j.ord=a;return f(b,j)};var k=[{locales:"fa,fa-ir,id,ja,ja-jp-mac,ka,ko,ko-kr,th,th-th,tr,tr-tr,zh,zh-tw,zh-cn".split(","),numForms:1,get:function(){return 0}},{locales:"af,af-za,as,ast,bg,br,bs,bs-ba,ca,cy,cy-gb,da,de,de-de,de-ch,en,en-gb,en-us,en-za,el,el-gr,eo,es,es-es,es-ar,es-cl,es-mx,et,et-ee,eu,fi,fi-fi,fy,fy-nl,gl,gl-gl,he,hu,hu-hu,hy,hy-am,it,it-it,kk,ku,lg,mai,ml,ml-in,mn,nb,nb-no,no,no-no,nl,nn,nn-no,no,no-no,nb,nb-no,nso,nso-za,pa,pa-in,pt,pt-pt,rm,rm-ch,si,si-lk,son,son-ml,sq,sq-al,sv,sv-se,vi,vi-vn,zu,zu-za".split(","),
numForms:2,get:function(b){return b!=1?1:0}},{locales:"ak,ak-gh,bn,bn-in,bn-bd,fr,fr-fr,gu,gu-in,kn,kn-in,mr,mr-in,oc,oc-oc,or,or-in,pt-br,ta,ta-in,ta-lk,te,te-in".split(","),numForms:2,get:function(b){return b>1?1:0}},{locales:["lv"],numForms:3,get:function(b){return b%10==1&&b%100!=11?1:b!=0?2:0}},{locales:["gd","gd-gb"],numForms:4,get:function(b){return b==1||b==11?0:b==2||b==12?1:b>0&&b<20?2:3}},{locales:["ro","ro-ro"],numForms:3,get:function(b){return b==1?0:b==0||b%100>0&&b%100<20?1:2}},{locales:["lt"],
numForms:3,get:function(b){return b%10==1&&b%100!=11?0:b%10>=2&&(b%100<10||b%100>=20)?2:1}},{locales:"be,be-by,hr,hr-hr,ru,ru-ru,sr,sr-rs,sr-cs,uk".split(","),numForms:3,get:function(b){return b%10==1&&b%100!=11?0:b%10>=2&&b%10<=4&&(b%100<10||b%100>=20)?1:2}},{locales:["cs","sk"],numForms:3,get:function(b){return b==1?0:b>=2&&b<=4?1:2}},{locales:["pl"],numForms:3,get:function(b){return b==1?0:b%10>=2&&b%10<=4&&(b%100<10||b%100>=20)?1:2}},{locales:["sl"],numForms:4,get:function(b){return b%100==1?
0:b%100==2?1:b%100==3||b%100==4?2:3}},{locales:["ga-ie","ga-ie","ga","en-ie"],numForms:5,get:function(b){return b==1?0:b==2?1:b>=3&&b<=6?2:b>=7&&b<=10?3:4}},{locales:["ar"],numForms:6,get:function(b){return b==0?5:b==1?0:b==2?1:b%100>=3&&b%100<=10?2:b%100>=11&&b%100<=99?3:4}},{locales:["mt"],numForms:4,get:function(b){return b==1?0:b==0||b%100>0&&b%100<=10?1:b%100>10&&b%100<20?2:3}},{locales:["mk","mk-mk"],numForms:3,get:function(b){return b%10==1?0:b%10==2?1:2}},{locales:["is"],numForms:2,get:function(b){return b%
10==1&&b%100!=11?0:1}}],h});
define("gcli/host",["require","exports","module"],function(g,i){function f(d,e){if(!d.__gcliHighlighting){d.__gcliHighlighting=!0;var c=d.style.background;d.style.background=e?"green":"red";setTimeout(function(){d.style.background=c;delete d.__gcliHighlighting},500)}}i.flashNodes=function(d,e){d.style?f(d,e):Array.prototype.forEach.call(d,function(c){f(c,e)})};i.exec=function(d,e){var c=JSON.stringify(e),f=new XMLHttpRequest;f.open("POST","/exec/",!0);f.setRequestHeader("Content-Type","application/json; charset=utf-8");
f.setRequestHeader("Content-Length",c.length);f.onreadystatechange=function(){f.readyState==4&&(f.status>=300||f.status<200?d.reject(f.responseText):d.resolve(f.responseText))};f.send(c)};i.func=function(d,e){var c=JSON.stringify(e),f=new XMLHttpRequest;f.open("POST","/func/",!0);f.setRequestHeader("Content-Type","application/json; charset=utf-8");f.setRequestHeader("Content-Length",c.length);f.onreadystatechange=function(){f.readyState==4&&(f.status>=300||f.status<200?d.reject(JSON.parse(f.responseText)):
d.resolve(JSON.parse(f.responseText)))};f.send(c)}});
define("gcli/ui/domtemplate",["require","exports","module"],function(g,i){function f(d){d==null&&(d={allowEval:!0});this.options=d;this.stack=d.stack&&Array.isArray(d.stack)?d.stack:typeof d.stack==="string"?[d.stack]:[];this.nodes=[]}f.prototype._templateRegion=/\$\{([^}]*)\}/g;f.prototype._splitSpecial=/\uF001|\uF002/;f.prototype._isPropertyScript=/^[_a-zA-Z0-9.]*$/;f.prototype.processNode=function(d,e){typeof d==="string"&&(d=document.getElementById(d));e==null&&(e={});this.stack.push(d.nodeName+
(d.id?"#"+d.id:""));var c=!1;try{if(d.attributes&&d.attributes.length){if(d.hasAttribute("foreach")){this._processForEach(d,e);return}if(d.hasAttribute("if")&&!this._processIf(d,e))return;this.nodes.push(e.__element);e.__element=d;for(var c=!0,f=Array.prototype.slice.call(d.attributes),h=0;h<f.length;h++){var b=f[h].value,a=f[h].name;this.stack.push(a);try{if(a==="save")b=this._stripBraces(b),this._property(b,e,d),d.removeAttribute("save");else if(a.substring(0,2)==="on"){var b=this._stripBraces(b),
j=this._property(b,e);typeof j!=="function"&&this._handleError("Expected "+b+" to resolve to a function, but got "+typeof j);d.removeAttribute(a);var l=d.hasAttribute("capture"+a.substring(2));d.addEventListener(a.substring(2),j,l);l&&d.removeAttribute("capture"+a.substring(2))}else{var m=b.replace(this._templateRegion,function(a){a=this._envEval(a.slice(2,-1),e,b);this.options.blankNullUndefined&&a==null&&(a="");return a}.bind(this));if(a.charAt(0)==="_")d.removeAttribute(a),d.setAttribute(a.substring(1),
m);else if(b!==m)f[h].value=m}}finally{this.stack.pop()}}}for(var g=Array.prototype.slice.call(d.childNodes),f=0;f<g.length;f++)this.processNode(g[f],e);d.nodeType===3&&this._processTextNode(d,e)}finally{if(c)e.__element=this.nodes.pop();this.stack.pop()}};f.prototype._processIf=function(d,e){this.stack.push("if");try{var c=d.getAttribute("if"),f=this._stripBraces(c),h=!0;try{h=!!this._envEval(f,e,c)}catch(b){this._handleError("Error with '"+f+"'",b),h=!1}h||d.parentNode.removeChild(d);d.removeAttribute("if");
return h}finally{this.stack.pop()}};f.prototype._processForEach=function(d,e){this.stack.push("foreach");try{var c=d.getAttribute("foreach"),f=c,h="param";if(f.charAt(0)==="$")f=this._stripBraces(f);else var b=f.split(" in "),h=b[0].trim(),f=this._stripBraces(b[1].trim());d.removeAttribute("foreach");try{this._handleAsync(this._envEval(f,e,c),d,function(a,b){this._processForEachLoop(a,d,b,e,h)}.bind(this)),d.parentNode.removeChild(d)}catch(a){this._handleError("Error with '"+f+"'",a)}}finally{this.stack.pop()}};
f.prototype._processForEachLoop=function(d,e,c,f,h){if(Array.isArray(d))d.forEach(function(a,b){this._processForEachMember(a,e,c,f,h,""+b)},this);else for(var b in d)d.hasOwnProperty(b)&&this._processForEachMember(b,e,c,f,h,b)};f.prototype._processForEachMember=function(d,e,c,f,h,b){this.stack.push(b);try{this._handleAsync(d,c,function(a,b){f[h]=a;if(e.nodeName.toLowerCase()==="loop")for(var c=0;c<e.childNodes.length;c++){var d=e.childNodes[c].cloneNode(!0);b.parentNode.insertBefore(d,b);this.processNode(d,
f)}else d=e.cloneNode(!0),d.removeAttribute("foreach"),b.parentNode.insertBefore(d,b),this.processNode(d,f);delete f[h]}.bind(this))}finally{this.stack.pop()}};f.prototype._processTextNode=function(d,e){var c=d.data,c=c.replace(this._templateRegion,"\uf001$$$1\uf002"),c=c.split(this._splitSpecial);c.length>1&&(c.forEach(function(c){c===null||c===void 0||c===""||(c.charAt(0)==="$"&&(c=this._envEval(c.slice(1),e,d.data)),this._handleAsync(c,d,function(c,b){var a=b.ownerDocument;c==null&&(c=this.options.blankNullUndefined?
"":""+c);typeof c.cloneNode==="function"?(c=this._maybeImportNode(c,a),b.parentNode.insertBefore(c,b)):typeof c.item==="function"&&c.length?Array.prototype.slice.call(c,0).forEach(function(j){j=this._maybeImportNode(j,a);b.parentNode.insertBefore(j,b)}.bind(this)):(c=a.createTextNode(c.toString()),b.parentNode.insertBefore(c,b))}.bind(this)))},this),d.parentNode.removeChild(d))};f.prototype._maybeImportNode=function(d,e){return d.ownerDocument===e?d:e.importNode(d,!0)};f.prototype._handleAsync=function(d,
e,c){if(d!=null&&typeof d.then==="function"){var f=e.ownerDocument.createElement("span");e.parentNode.insertBefore(f,e);d.then(function(d){c(d,f);f.parentNode.removeChild(f)}.bind(this))}else c(d,e)};f.prototype._stripBraces=function(d){return!d.match(this._templateRegion)?(this._handleError("Expected "+d+" to match ${...}"),d):d.slice(2,-1)};f.prototype._property=function(d,e,c){try{typeof d==="string"&&(d=d.split("."));var f=e[d[0]];if(d.length===1)return c!==void 0&&(e[d[0]]=c),typeof f==="function"?
f.bind(e):f;return!f?(this._handleError('"'+d[0]+'" is undefined'),null):this._property(d.slice(1),f,c)}catch(h){return this._handleError("Path error with '"+d+"'",h),"${"+d+"}"}};f.prototype._envEval=function(d,e,c){try{if(this.stack.push(c.replace(/\s+/g," ")),this._isPropertyScript.test(d))return this._property(d,e);else{if(!this.options.allowEval)return this._handleError("allowEval is not set, however '"+d+"' can not be resolved using a simple property path."),"${"+d+"}";with(e)return eval(d)}}catch(f){return this._handleError("Template error evaluating '"+
d+"'",f),"${"+d+"}"}finally{this.stack.pop()}};f.prototype._handleError=function(d,e){this._logError(d+" (In: "+this.stack.join(" > ")+")");e&&this._logError(e)};f.prototype._logError=function(d){console.log(d)};i.Templater=f;i.template=function(d,e,c){c=new f(c||{});c.processNode(d,e);return c}});define("text!gcli/ui/intro.html",[],function(){return'\n<div>\n  <p>${l10n.introTextOpening}</p>\n\n  <p>\n    ${l10n.introTextCommands}\n    <span class="gcli-out-shortcut" onclick="${onclick}"\n        ondblclick="${ondblclick}" data-command="help">help</span>,\n    ${l10n.introTextKeys} <code>${l10n.introTextF1Escape}</code>.\n  </p>\n\n  <button onclick="${onGotIt}" if="${showHideButton}">${l10n.introTextGo}</button>\n</div>'});
define("text!gcli/ui/tooltip.css",[],function(){return"\n.gcli-panel {\n  -moz-transition-property: opacity, height;\n  -moz-transition-duration: 0.5s, 2s;\n  overflow-y: auto;\n  overflow-x: hidden;\n  z-index: 2;\n  position: absolute;\n  max-height: 100%;\n  max-width: 350px;\n  left: 0;\n  bottom: 0;\n  font-family: Segoe UI, Helvetica Neue, Verdana, Arial, sans-serif;\n  margin-bottom: -3px;\n}\n\n.gcli-panel.gcli-panel-hide {\n  opacity: 0;\n  height: 0;\n}\n\n.gcli-panel-connector {\n  height: 10px;\n  margin-top: -1px;\n  margin-left: 20px;\n  width: 20px;\n  background: white;\n  border-left: 1px solid #999;\n  border-right: 1px solid #999;\n}\n\n.gcli-tt-description {\n  padding: 5px 10px 0;\n  font-size: 90%;\n}\n\n.gcli-tt-error {\n  font-size: 80%;\n  color: #900;\n  padding: 0 10px;\n}\n\n.gcli-field {\n  width: 100%;\n}\n\n.gcli-field-javascript {\n  margin-bottom: 0;\n}\n\n.gcli-tt {\n  box-shadow: 0 0 10px 1px #ddd;\n  border: 1px solid #999;\n  border-radius: 3px;\n  margin: 10px 0 0 0;\n  background: hsla(0, 100%, 100%, 0.95);\n  padding-bottom: 5px;\n}"});
define("text!gcli/ui/tooltip.html",[],function(){return'\n<div class="gcli-tt" aria-live="polite">\n  <div class="gcli-tt-description" save="${descriptionEle}">${description}</div>\n  ${field.element}\n  <div class="gcli-tt-error" save="${errorEle}">${assignment.conversion.message}</div>\n  <div class="gcli-tt-highlight" save="${highlightEle}"></div>\n</div>'});define("text!gcli/ui/output_view.css",[],function(){return"\n.gcli-row-in {\n  padding: 0 4px;\n  box-shadow: 0 -6px 10px -6px #ddd;\n  border-top: 1px solid #bbb;\n}\n\n.gcli-row-in > img {\n  cursor: pointer;\n}\n\n.gcli-row-hover {\n  display: none;\n  float: right;\n  padding: 2px 2px 0;\n}\n\n.gcli-row-in:hover > .gcli-row-hover {\n  display: inline;\n}\n\n.gcli-row-in:hover > .gcli-row-hover.gcli-row-hidden {\n  display: none;\n}\n\n.gcli-row-duration {\n  color: #666;\n}\n\n.gcli-row-prompt {\n  color: #00F;\n  font-weight: bold;\n  font-size: 120%;\n}\n\n.gcli-row-prompt.gcli-row-complete {\n  color: #060;\n}\n\n.gcli-row-prompt.gcli-row-error {\n  color: #F00;\n}\n\n.gcli-row-duration {\n  font-size: 80%;\n}\n\n.gcli-row-out {\n  margin: 0 10px 15px;\n  padding: 0 10px;\n  line-height: 1.2em;\n  font-size: 95%;\n}\n\n.gcli-row-out strong,\n.gcli-row-out b,\n.gcli-row-out th,\n.gcli-row-out h1,\n.gcli-row-out h2,\n.gcli-row-out h3 {\n  color: #000;\n}\n\n.gcli-row-out p {\n  margin: 5px 0;\n}\n\n.gcli-row-out a {\n  color: hsl(200,40%,40%);\n  text-decoration: none;\n}\n\n.gcli-row-out a:hover {\n  cursor: pointer;\n  border-bottom: 1px dotted hsl(200,40%,60%);\n}\n\n.gcli-row-out input[type=password],\n.gcli-row-out input[type=text],\n.gcli-row-out textarea {\n  font-size: 120%;\n  background: transparent;\n  padding: 3px;\n  border-radius: 3px;\n  border: 1px solid #bbb;\n}\n\n.gcli-row-out table,\n.gcli-row-out td,\n.gcli-row-out th {\n  border: 0;\n  padding: 0 2px;\n}\n\n.gcli-row-terminal,\n.gcli-row-subterminal {\n  border-radius: 3px;\n  border: 1px solid #ddd;\n}\n\n.gcli-row-terminal {\n  height: 200px;\n  width: 620px;\n  font-size: 80%;\n}\n\n.gcli-row-subterminal {\n  height: 150px;\n  width: 300px;\n  font-size: 75%;\n}\n\n.gcli-out-shortcut {\n  font-weight: normal;\n  border: 1px solid #999;\n  border-radius: 3px;\n  color: #666;\n  cursor: pointer;\n  padding: 0 3px 1px;\n  margin: 1px 4px;\n  display: inline-block;\n}\n\n.gcli-out-shortcut:before {\n  content: '\\bb';\n  padding-right: 2px;\n  color: hsl(25,78%,50%);\n  font-weight: bold;\n  font-size: 110%;\n}\n\n.gcli-row-throb {\n  float: right;\n  width: 220px;\n  height: 19px;\n  background-image: url(data:image/gif;base64, );\n}"});
define("text!gcli/ui/output_terminal.html",[],function(){return'\n<div class="gcli-row">\n  <\!-- The div for the input (i.e. what was typed) --\>\n  <div class="gcli-row-in" save="${elems.rowin}" aria-live="assertive"\n      onclick="${copyToInput}" ondblclick="${execute}">\n\n    <\!-- What the user actually typed --\>\n    <span save="${elems.prompt}" class="gcli-row-prompt ${elems.error ? \'gcli-row-error\' : \'\'} ${elems.completed ? \'gcli-row-complete\' : \'\'}">${prompt}</span>\n    <span class="gcli-row-in-typed">${outputData.canonical}</span>\n\n    <\!-- The extra details that appear on hover --\>\n    <span class="gcli-row-duration gcli-row-hover" save="${elems.duration}"></span>\n    <\!--\n    <img class="gcli-row-hover" onclick="${hideOutput}" save="${elems.hide}"\n        alt="Hide command output" _src="${url(\'images/minus.png\')}"/>\n    <img class="gcli-row-hover gcli-row-hidden" onclick="${showOutput}" save="${elems.show}"\n        alt="Show command output" _src="${url(\'images/plus.png\')}"/>\n    <img class="gcli-row-hover" onclick="${remove}"\n        alt="Remove this command from the history"\n        _src="${url(\'images/closer.png\')}"/>\n    --\>\n    <div class="gcli-row-throb" save="${elems.throb}"></div>\n  </div>\n\n  <\!-- The div for the command output --\>\n  <div class="gcli-row-out" aria-live="assertive" save="${elems.rowout}">\n  </div>\n</div>'});
define("gcli/history",["require","exports","module"],function(g,i){function f(){this._buffer=[""];this._current=0}f.prototype.destroy=function(){delete this._buffer};f.prototype.add=function(d){this._buffer.splice(1,0,d);this._current=0};f.prototype.forward=function(){this._current>0&&this._current--;return this._buffer[this._current]};f.prototype.backward=function(){this._current<this._buffer.length-1&&this._current++;return this._buffer[this._current]};i.History=f});
define("text!gcli/ui/inputter.css",[],function(){return"\n.gcli-in-input,\n.gcli-in-complete,\n.gcli-prompt {\n  font-family: Segoe UI, Helvetica Neue, Verdana, Arial, sans-serif;\n}\n\n.gcli-in-input,\n.gcli-in-complete {\n  font-size: 110%;\n  font-weight: normal;\n  font-style: normal;\n  padding: 0 0 0 22px;\n  background-color: transparent;\n}\n\n.gcli-in-input {\n  color: #000;\n  border: 0;\n  box-shadow: 0 0 10px 1px #ddd;\n  border-top: 1px solid #999;\n}\n\n.gcli-in-complete {\n  position: absolute;\n  z-index: -1000;\n  color: transparent;\n  margin-top: -1px;\n  border-top: 1px solid transparent;\n}\n\n.gcli-prompt {\n  position: absolute;\n  z-index: -1001;\n  padding: 0 1px;\n  color: hsl(25,78%,50%);\n  font-size: 150%;\n  font-weight: bold;\n  line-height: 95%;\n}\n\n.gcli-in-incomplete {\n  border-bottom: 2px dotted #999;\n}\n\n.gcli-in-error {\n  border-bottom: 2px dotted #F00;\n}\n\n.gcli-in-ontab {\n  color: hsl(200,40%,70%);\n}\n\n.gcli-in-todo {\n  color: hsl(48,28%,76%);\n}\n\n.gcli-in-closebrace {\n  color: hsl(0,0%,80%);\n}\n\n.gcli-in-scratchlink {\n  float: right;\n  font-size: 85%;\n  color: #888;\n  padding-right: 10px;\n}"});
define("text!gcli/ui/completer.html",[],function(){return'\n<div>\n  <loop foreach="member in ${statusMarkup}">\n    <span class="${member.className}">${member.string}</span>\n  </loop>\n  <span class="gcli-in-ontab">${directTabText}</span>\n  <span class="gcli-in-todo" foreach="param in ${emptyParameters}">${param}</span>\n  <span class="gcli-in-ontab">${arrowTabText}</span>\n  <span class="gcli-in-closebrace" if="${unclosedJs}">}</span>\n  <div class="gcli-in-scratchlink" if="${scratchLink}">${scratchLink}</div>\n</div>'});
define("gcli/ui/prompt",["require","exports","module"],function(g,i){function f(d,e){this.element=e.element;this.element.classList.add("gcli-prompt");this.element.appendChild(this.element.ownerDocument.createTextNode(d.promptChar||"\u00bb"));if(this.inputter=e.inputter){this.inputter.onResize.add(this.resized,this);var c=this.inputter.getDimensions();c&&this.resized(c)}}f.prototype.destroy=function(){this.inputter&&this.inputter.onResize.remove(this.resized,this);delete this.element};f.prototype.resized=
function(d){this.element.style.top=d.top+"px";this.element.style.height=d.height+"px";this.element.style.left=d.left+"px";this.element.style.width=d.width+"px"};i.Prompt=f});define("text!gcli/ui/display.css",[],function(){return"\n.gcli-output {\n  height: 100%;\n  overflow-x: hidden;\n  overflow-y: auto;\n  font-family: Segoe UI, Helvetica Neue, Verdana, Arial, sans-serif;\n}"});define("text!gcli/ui/display.html",[],function(){return'\n<div class="gcli-panel" save="${panel}">\n  <div save="${tooltip}"></div>\n  <div class="gcli-panel-connector"></div>\n</div>'});
define("gcli/types/spell",["require","exports","module"],function(g,i){function f(){this._nWords={}}f.letters="abcdefghijklmnopqrstuvwxyz".split("");f.prototype.train=function(d){d.forEach(function(d){d=d.toLowerCase();this._nWords[d]=this._nWords.hasOwnProperty(d)?this._nWords[d]+1:1},this)};f.prototype.correct=function(d){if(this._nWords.hasOwnProperty(d))return d;var e={},d=this._edits(d);d.forEach(function(c){this._nWords.hasOwnProperty(c)&&(e[this._nWords[c]]=c)},this);if(this._countKeys(e)>
0)return e[this._max(e)];d.forEach(function(c){this._edits(c).forEach(function(c){this._nWords.hasOwnProperty(c)&&(e[this._nWords[c]]=c)},this)},this);return this._countKeys(e)>0?e[this._max(e)]:null};f.prototype._countKeys=function(d){var e=0,c;for(c in d)d.hasOwnProperty(c)&&e++;return e};f.prototype._max=function(d){var e=[],c;for(c in d)d.hasOwnProperty(c)&&e.push(c);return Math.max.apply(null,e)};f.prototype._edits=function(d){for(var e=[],c=0;c<d.length;c++)e.push(d.slice(0,c)+d.slice(c+1));
for(c=0;c<d.length-1;c++)e.push(d.slice(0,c)+d.slice(c+1,c+2)+d.slice(c,c+1)+d.slice(c+2));for(c=0;c<d.length;c++)f.letters.forEach(function(f){e.push(d.slice(0,c)+f+d.slice(c+1))},this);for(c=0;c<=d.length;c++)f.letters.forEach(function(f){e.push(d.slice(0,c)+f+d.slice(c))},this);return e};i.Speller=f});
define("gcli/argument",["require","exports","module"],function(g,i){function f(a,b,c){a===void 0?this.suffix=this.prefix=this.text="":(this.text=a,this.prefix=b!==void 0?b:"",this.suffix=c!==void 0?c:"")}function d(){this.suffix=this.prefix=this.text=""}function e(a,b,c){this.text=a!==void 0?a:"";this.prefix=b!==void 0?b:"";this.suffix=c!==void 0?c:"";e._moveSpaces(this)}function c(a,b,c){if(!Array.isArray(a))throw Error("args is not an array of Arguments");this.args=b===void 0?a:a.slice(b,c);a=f.merge(this.args);
this.text=a.text;this.prefix=a.prefix;this.suffix=a.suffix}function k(a){this.arg=a;this.text=a.text;this.prefix=a.prefix;this.suffix=a.suffix}function h(){this.suffix=this.prefix=this.text=""}function b(a,b,c){typeof a==="string"?(this.valueArg=this.nameArg=null,this.text=a,this.prefix=b,this.suffix=c):b==null?(this.nameArg=a,this.valueArg=null,this.text="",this.prefix=this.nameArg.toString(),this.suffix=""):(this.nameArg=a,this.valueArg=b,this.text=this.valueArg.text,this.prefix=this.nameArg.toString()+
this.valueArg.prefix,this.suffix=this.valueArg.suffix)}function a(){this.args=[]}f.prototype.type="Argument";f.prototype.merge=function(a){return new f(this.text+this.suffix+a.prefix+a.text,this.prefix,a.suffix)};f.prototype.beget=function(a){var b=this.text,c=this.prefix,d=this.suffix;if(a.text!=null&&(b=a.text,!a.dontQuote)){var e=b.indexOf(" ")>=0||b.length==0,h=/['"]$/.test(c);e&&!h&&(c+="'",d="'"+d)}a.prefixSpace&&c.charAt(0)!==" "&&(c=" "+c);a.prefixPostSpace&&c.charAt(c.length-1)!==" "&&(c+=
" ");a.suffixSpace&&d.charAt(d.length-1)!==" "&&(d+=" ");return b===this.text&&d===this.suffix&&c===this.prefix?this:new (a.type||f)(b,c,d)};f.prototype.assign=function(a){this.assignment=a};f.prototype.getArgs=function(){return[this]};f.prototype.equals=function(a){return this===a?!0:a==null||!(a instanceof f)?!1:this.text===a.text&&this.prefix===a.prefix&&this.suffix===a.suffix};f.prototype.toString=function(){return this.prefix+this.text+this.suffix};f.merge=function(a,b,c){for(var c=c===void 0?
a.length:c,d,b=b===void 0?0:b;b<c;b++){var e=a[b];d=d?d.merge(e):e}return d};Object.defineProperty(f.prototype,"_summaryJson",{get:function(){return"<"+this.prefix+":"+this.text+":"+this.suffix+"> (a="+(this.assignment==null?"null":this.assignment.param.name)+", t="+this.type+")"},enumerable:!0});i.Argument=f;d.prototype=Object.create(f.prototype);d.prototype.type="BlankArgument";i.BlankArgument=d;e.prototype=Object.create(f.prototype);e.prototype.type="ScriptArgument";e._moveSpaces=function(a){for(;a.text.charAt(0)===
" ";)a.prefix+=" ",a.text=a.text.substring(1);for(;a.text.charAt(a.text.length-1)===" ";)a.suffix=" "+a.suffix,a.text=a.text.slice(0,-1)};e.prototype.beget=function(a){a.type=e;a=f.prototype.beget.call(this,a);e._moveSpaces(a);return a};i.ScriptArgument=e;c.prototype=Object.create(f.prototype);c.prototype.type="MergedArgument";c.prototype.assign=function(a){this.args.forEach(function(b){b.assign(a)},this);this.assignment=a};c.prototype.getArgs=function(){return this.args};c.prototype.equals=function(a){return this===
a?!0:a==null||!(a instanceof c)?!1:this.text===a.text&&this.prefix===a.prefix&&this.suffix===a.suffix};i.MergedArgument=c;k.prototype=Object.create(f.prototype);k.prototype.type="TrueNamedArgument";k.prototype.assign=function(a){this.arg&&this.arg.assign(a);this.assignment=a};k.prototype.getArgs=function(){return[this.arg]};k.prototype.equals=function(a){return this===a?!0:a==null||!(a instanceof k)?!1:this.text===a.text&&this.prefix===a.prefix&&this.suffix===a.suffix};k.prototype.beget=function(a){a.text&&
console.error("Can't change text of a TrueNamedArgument",this,a);a.type=k;a=f.prototype.beget.call(this,a);a.arg=new f(a.text,a.prefix,a.suffix);return a};i.TrueNamedArgument=k;h.prototype=Object.create(f.prototype);h.prototype.type="FalseNamedArgument";h.prototype.getArgs=function(){return[]};h.prototype.equals=function(a){return this===a?!0:a==null||!(a instanceof h)?!1:this.text===a.text&&this.prefix===a.prefix&&this.suffix===a.suffix};i.FalseNamedArgument=h;b.prototype=Object.create(f.prototype);
b.prototype.type="NamedArgument";b.prototype.assign=function(a){this.nameArg.assign(a);this.valueArg!=null&&this.valueArg.assign(a);this.assignment=a};b.prototype.getArgs=function(){return this.valueArg?[this.nameArg,this.valueArg]:[this.nameArg]};b.prototype.equals=function(a){return this===a?!0:a==null?!1:!(a instanceof b)?!1:this.text===a.text&&this.prefix===a.prefix&&this.suffix===a.suffix};b.prototype.beget=function(a){a.type=b;var a=f.prototype.beget.call(this,a),c=/^([\s]*)([^\s]*)([\s]*['"]?)$/.exec(a.prefix);
this.valueArg==null&&a.text===""?(a.nameArg=new f(c[2],c[1],c[3]),a.valueArg=null):(a.nameArg=new f(c[2],c[1],""),a.valueArg=new f(a.text,c[3],a.suffix));return a};i.NamedArgument=b;a.prototype=Object.create(f.prototype);a.prototype.type="ArrayArgument";a.prototype.addArgument=function(a){this.args.push(a)};a.prototype.addArguments=function(a){Array.prototype.push.apply(this.args,a)};a.prototype.getArguments=function(){return this.args};a.prototype.assign=function(a){this.args.forEach(function(b){b.assign(a)},
this);this.assignment=a};a.prototype.getArgs=function(){return this.args};a.prototype.equals=function(a){if(this===a)return!0;if(a==null)return!1;if(a.type!=="ArrayArgument")return!1;if(this.args.length!==a.args.length)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(a.args[b]))return!1;return!0};a.prototype.toString=function(){return"{"+this.args.map(function(a){return a.toString()},this).join(",")+"}"};i.ArrayArgument=a});
define("gcli/types",["require","exports","module","gcli/argument","gcli/argument"],function(g,i){function f(a,b,c,d,e){this.value=a;this.arg=b;if(b==null)throw Error("Missing arg");this._status=c||h.VALID;this.message=d;this.predictions=e}function d(a,b){this.arg=b;this.conversions=a;this.value=a.map(function(a){return a.value},this);this._status=h.combine(a.map(function(a){return a.getStatus()}));this.message="";this.predictions=[]}function e(){}var c=g("gcli/argument").Argument,k=g("gcli/argument").BlankArgument,
h={VALID:{toString:function(){return"VALID"},valueOf:function(){return 0}},INCOMPLETE:{toString:function(){return"INCOMPLETE"},valueOf:function(){return 1}},ERROR:{toString:function(){return"ERROR"},valueOf:function(){return 2}},combine:function(){for(var a=h.VALID,b=0;b<arguments.length;b++){var c=arguments[b];Array.isArray(c)&&(c=h.combine.apply(null,c));c>a&&(a=c)}return a}};i.Status=h;f.prototype.assign=function(a){this.arg.assign(a)};f.prototype.isDataProvided=function(){return this.arg.type!==
"BlankArgument"};f.prototype.equals=function(a){return this===a?!0:a==null?!1:this.valueEquals(a)&&this.argEquals(a)};f.prototype.valueEquals=function(a){return this.value===a.value};f.prototype.argEquals=function(a){return a==null?!1:this.arg.equals(a.arg)};f.prototype.getStatus=function(){return this._status};f.prototype.toString=function(){return this.arg.toString()};f.prototype.getPredictions=function(){return typeof this.predictions==="function"?this.predictions():this.predictions||[]};f.prototype.constrainPredictionIndex=
function(a){if(a!=null){var b=this.getPredictions();if(b.length!==0)return a%=b.length,a<0&&(a=b.length+a),a}};f.maxPredictions=11;i.Conversion=f;d.prototype=Object.create(f.prototype);d.prototype.assign=function(a){this.conversions.forEach(function(b){b.assign(a)},this);this.assignment=a};d.prototype.getStatus=function(a){return a&&a.conversion?a.conversion.getStatus():this._status};d.prototype.isDataProvided=function(){return this.conversions.length>0};d.prototype.valueEquals=function(a){if(!(a instanceof
d))throw Error("Can't compare values with non ArrayConversion");if(this.value===a.value)return!0;if(this.value.length!==a.value.length)return!1;for(var b=0;b<this.conversions.length;b++)if(!this.conversions[b].valueEquals(a.conversions[b]))return!1;return!0};d.prototype.toString=function(){return"[ "+this.conversions.map(function(a){return a.toString()},this).join(", ")+" ]"};i.ArrayConversion=d;e.prototype.stringify=function(){throw Error("Not implemented");};e.prototype.parse=function(){throw Error("Not implemented");
};e.prototype.parseString=function(a){return this.parse(new c(a))};e.prototype.name=void 0;e.prototype.increment=function(){};e.prototype.decrement=function(){};e.prototype.getBlank=function(){return this.parse(new k)};e.prototype.getType=function(){return this};i.Type=e;var b={};i.getTypeNames=function(){return Object.keys(b)};i.registerType=function(a){if(typeof a==="object")if(a instanceof e){if(!a.name)throw Error("All registered types must have a name");b[a.name]=a}else throw Error("Can't registerType using: "+
a);else if(typeof a==="function"){if(!a.prototype.name)throw Error("All registered types must have a name");b[a.prototype.name]=a}else throw Error("Unknown type: "+a);};i.registerTypes=function(a){Object.keys(a).forEach(function(b){var c=a[b];c.name=b;a.registerType(c)})};i.deregisterType=function(a){delete b[a.name]};i.getType=function(a){var c;if(typeof a==="string")return c=b[a],typeof c==="function"&&(c=new c({})),c;if(typeof a==="object"){if(!a.name)throw Error("Missing 'name' member to typeSpec");
c=b[a.name];typeof c==="function"&&(c=new c(a));return c}throw Error("Can't extract type from "+a);}});
define("gcli/types/javascript",["require","exports","module","gcli/l10n","gcli/types"],function(g,i){var f,d;function e(){}function c(a){return a.indexOf("moz")===0||a.indexOf("webkit")===0||a.indexOf("ms")===0}var k=g("gcli/l10n"),h=g("gcli/types"),b=h.Conversion,a=h.Type,j=h.Status;i.startup=function(){h.registerType(e)};i.shutdown=function(){h.unregisterType(e)};var l;typeof window!=="undefined"&&(l=window);i.setGlobalObject=function(a){l=a};i.getGlobalObject=function(){return l};i.unsetGlobalObject=
function(){l=void 0};e.prototype=Object.create(a.prototype);e.prototype.stringify=function(a){return a==null?"":a};e.MAX_COMPLETION_MATCHES=10;e.prototype.parse=function(a){var h=a.text,m=l;if(h==="")return new b(void 0,a,j.INCOMPLETE);if(!isNaN(parseFloat(h))&&isFinite(h))return new b(h,a);if(h.trim().match(/(null|undefined|NaN|Infinity|true|false)/))return new b(h,a);var g=this._findCompletionBeginning(h);if(g.err)return new b(h,a,j.ERROR,g.err);if(g.state===f)return new b(h,a);if(g.state!==d)return new b(h,
a,j.INCOMPLETE,"");var g=h.substring(g.startPos).split("."),n,i;if(g.length>1){n=g.pop().trimLeft();for(var p=0;p<g.length;p++){i=g[p].trim();if(m==null)return new b(h,a,j.ERROR,k.lookup("jstypeParseScope"));if(i==="")return new b(h,a,j.INCOMPLETE,"");if(this._isSafeProperty(m,i))return new b(h,a);try{m=m[i]}catch(o){return new b(h,a,j.VALID,"")}}}else n=g[0].trimLeft();if(i&&!i.match(/^[0-9A-Za-z]*$/))return new b(h,a);if(m==null)return new b(h,a,j.ERROR,k.lookupFormat("jstypeParseMissing",[i]));
if(!n.match(/^[0-9A-Za-z]*$/))return new b(h,a);if(this._isIteratorOrGenerator(m))return null;i=n.length;var D=i===0?h:h.slice(0,-i),B=j.INCOMPLETE;i="";var x={},A=0,g=m;try{for(;g!=null&&Object.keys(x).length<e.MAX_COMPLETION_MATCHES;)Object.keys(g).forEach(function(a){a.indexOf(n)===0&&!(a in x)&&(x[a]={prop:a,distUpPrototypeChain:A})}),A++,g=Object.getPrototypeOf(g)}catch(J){return new b(h,a,j.INCOMPLETE,"")}x=Object.keys(x).map(function(a){if(a===n)B=j.VALID;return x[a]});x.sort(function(a,b){return a.distUpPrototypeChain!==
b.distUpPrototypeChain?a.distUpPrototypeChain-b.distUpPrototypeChain:c(a.prop)?c(b.prop)?a.prop.localeCompare(b.prop):1:c(b.prop)?-1:a.prop.localeCompare(b.prop)});x.length>e.MAX_COMPLETION_MATCHES&&(x=x.slice(0,e.MAX_COMPLETION_MATCHES-1));g=x.map(function(a){var b,c=!0;if(this._isSafeProperty(m,a.prop))b="(property getter)";else try{var j=m[a.prop];typeof j==="function"?b="(function)":typeof j==="boolean"||typeof j==="number"?(b="= "+j,c=!1):typeof j==="string"?(j.length>40&&(j=j.substring(0,37)+
"\u2026"),b="= '"+j+"'",c=!1):b="("+typeof j+")"}catch(d){b="("+k.lookup("jstypeParseError")+")"}return{name:D+a.prop,value:{name:D+a.prop,description:b},description:b,incomplete:c}},this);if(g.length===0)B=j.ERROR,i=k.lookupFormat("jstypeParseMissing",[n]);g.length===1&&B===j.VALID&&(g=void 0);return new b(h,a,B,i,g)};d=0;f=1;var m="{[(".split(""),n="}])".split(""),p={"{":"}","[":"]","(":")"},o=/[a-zA-Z0-9.]/;e.prototype._findCompletionBeginning=function(a){for(var b=[],c=d,j=0,e,h=!1,l=0;l<a.length;l++)switch(e=
a[l],o.test(e)||(h=!0),c){case d:if(e==='"')c=3;else if(e==="'")c=2;else if(e===";")j=l+1;else if(e===" ")j=l+1;else if(m.indexOf(e)!=-1)b.push({token:e,start:j}),j=l+1;else if(n.indexOf(e)!=-1){j=b.pop();if(!j||p[j.token]!=e)return{err:k.lookup("jstypeBeginSyntax")};j=e==="}"?l+1:j.start}break;case 3:if(e==="\\")l++;else if(e==="\n")return{err:k.lookup("jstypeBeginUnterm")};else e==='"'&&(c=d);break;case 2:if(e==="\\")l++;else if(e==="\n")return{err:k.lookup("jstypeBeginUnterm")};else e==="'"&&(c=
d)}c===d&&h&&(c=f);return{state:c,startPos:j}};e.prototype._isIteratorOrGenerator=function(a){if(a===null)return!1;if(typeof aObject==="object"){if(typeof a.__iterator__==="function"||a.constructor&&a.constructor.name==="Iterator")return!0;try{var b=a.toString();if(typeof a.next==="function"&&b.indexOf("[object Generator")===0)return!0}catch(c){}}return!1};e.prototype._isSafeProperty=function(a,b){if(typeof a!=="object")return!1;for(var c;a;){try{if(c=Object.getOwnPropertyDescriptor(a,b))break}catch(j){return j.name===
"NS_ERROR_XPC_BAD_CONVERT_JS"||j.name==="NS_ERROR_XPC_BAD_OP_ON_WN_PROTO"?!1:!0}a=Object.getPrototypeOf(a)}return!c?!1:!c.get?!1:typeof c.get!=="function"||"prototype"in c.get};e.prototype.name="javascript";i.JavascriptType=e});
define("gcli/types/node","require,exports,module,gcli/host,gcli/l10n,gcli/types,gcli/types,gcli/types,gcli/types,gcli/argument".split(","),function(g,i){function f(){}function d(a){if("allowEmpty"in a&&typeof a.allowEmpty!=="boolean")throw Error("Legal values for allowEmpty are [true|false]");this.allowEmpty=a.allowEmpty}var e=g("gcli/host"),c=g("gcli/l10n"),k=g("gcli/types"),h=g("gcli/types").Type,b=g("gcli/types").Status,a=g("gcli/types").Conversion,j=g("gcli/argument").BlankArgument;i.startup=
function(){k.registerType(f);k.registerType(d)};i.shutdown=function(){k.unregisterType(f);k.unregisterType(d)};var l;typeof document!=="undefined"&&(l=document);i._empty=[];i.setDocument=function(a){l=a;if(l!=null)i._empty=l.querySelectorAll("x>:root")};i.unsetDocument=function(){l=void 0};i.getDocument=function(){return l};f.prototype=Object.create(h.prototype);f.prototype.stringify=function(a){return a==null?"":a.__gcliQuery||"Error"};f.prototype.parse=function(j){if(j.text==="")return new a(void 0,
j,b.INCOMPLETE);var d;try{d=l.querySelectorAll(j.text)}catch(h){return new a(void 0,j,b.ERROR,c.lookup("nodeParseSyntax"))}if(d.length===0)return new a(void 0,j,b.INCOMPLETE,c.lookup("nodeParseNone"));if(d.length===1)return d=d.item(0),d.__gcliQuery=j.text,e.flashNodes(d,!0),new a(d,j,b.VALID,"");e.flashNodes(d,!1);return new a(void 0,j,b.ERROR,c.lookupFormat("nodeParseMultiple",[d.length]))};f.prototype.name="node";d.prototype=Object.create(h.prototype);d.prototype.getBlank=function(){return new a(i._empty,
new j,b.VALID)};d.prototype.stringify=function(a){return a==null?"":a.__gcliQuery||"Error"};d.prototype.parse=function(j){if(j.text==="")return new a(void 0,j,b.INCOMPLETE);var d;try{d=l.querySelectorAll(j.text)}catch(h){return new a(void 0,j,b.ERROR,c.lookup("nodeParseSyntax"))}if(d.length===0&&!this.allowEmpty)return new a(void 0,j,b.INCOMPLETE,c.lookup("nodeParseNone"));e.flashNodes(d,!1);return new a(d,j,b.VALID,"")};d.prototype.name="nodelist"});
define("gcli/types/selection","require,exports,module,gcli/l10n,gcli/types,gcli/types,gcli/types,gcli/types,gcli/types/spell".split(","),function(g,i){function f(b){b&&Object.keys(b).forEach(function(a){this[a]=b[a]},this)}var d=g("gcli/l10n"),e=g("gcli/types"),c=g("gcli/types").Type,k=g("gcli/types").Status,h=g("gcli/types").Conversion;g("gcli/types/spell");i.startup=function(){e.registerType(f)};i.shutdown=function(){e.unregisterType(f)};f.prototype=Object.create(c.prototype);f.prototype.stringify=
function(b){if(b==null)return"";if(this.stringifyProperty!=null)return b[this.stringifyProperty];var a=null;this.getLookup().some(function(c){return c.value===b?(a=c.name,!0):!1},this);return a};f.prototype.clearCache=function(){delete this._cachedLookup};f.prototype.getLookup=function(){if(this._cachedLookup)return this._cachedLookup;if(this.lookup)return typeof this.lookup==="function"?this.cacheable?this._cachedLookup=this.lookup():this.lookup():this.lookup;if(Array.isArray(this.data))return this.lookup=
this._dataToLookup(this.data);if(typeof this.data==="function")return this._dataToLookup(this.data());throw Error("SelectionType has no data");};f.prototype._dataToLookup=function(b){return b.map(function(a){return{name:a,value:a}},this)};f.prototype._findPredictions=function(b){var a=[],c=this.getLookup(),d,e,f=h.maxPredictions,g=b.text.toLowerCase();if(b.suffix.length>0){for(d=0;d<c.length&&a.length<f;d++)e=c[d],e.name===b.text&&this._addToPredictions(a,e,b);return a}for(d=0;d<c.length;d++)if(e=
c[d],e._gcliLowerName==null)e._gcliLowerName=e.name.toLowerCase();for(d=0;d<c.length&&a.length<f;d++)e=c[d],e.name===b.text&&this._addToPredictions(a,e,b);for(d=0;d<c.length&&a.length<f;d++)e=c[d],e._gcliLowerName.indexOf(g)===0&&!e.value.hidden&&a.indexOf(e)===-1&&this._addToPredictions(a,e,b);if(a.length<f/2)for(d=0;d<c.length&&a.length<f;d++)e=c[d],e._gcliLowerName.indexOf(g)!==-1&&!e.value.hidden&&a.indexOf(e)===-1&&this._addToPredictions(a,e,b);return a};f.prototype._addToPredictions=function(b,
a){b.push(a)};f.prototype.parse=function(b){var a=this._findPredictions(b);if(a.length===0){var c=d.lookupFormat("typesSelectionNomatch",[b.text]);return new h(void 0,b,k.ERROR,c,a)}this.noMatch&&this.noMatch();return a[0].name===b.text?new h(a[0].value,b,k.VALID,"",a):new h(void 0,b,k.INCOMPLETE,"",a)};f.prototype.decrement=function(b){var a=this.getLookup(),b=this._findValue(a,b);b===-1&&(b=0);b++;b>=a.length&&(b=0);return a[b].value};f.prototype.increment=function(b){var a=this.getLookup(),b=this._findValue(a,
b);b===-1&&(b=1);b--;b<0&&(b=a.length-1);return a[b].value};f.prototype._findValue=function(b,a){for(var c=-1,d=0;d<b.length;d++)if(b[d].value===a){c=d;break}return c};f.prototype.name="selection";i.SelectionType=f});
define("gcli/types/basic","require,exports,module,gcli/l10n,gcli/types,gcli/types,gcli/types,gcli/types,gcli/types,gcli/types/selection,gcli/argument,gcli/argument".split(","),function(g,i){function f(){}function d(a){a?(this._min=a.min,this._max=a.max,this._step=a.step||1):this._step=1}function e(){}function c(a){if(typeof a.defer!=="function")throw Error("Instances of DeferredType need typeSpec.defer to be a function that returns a type");Object.keys(a).forEach(function(b){this[b]=a[b]},this)}function k(){}
function h(b){if(!b.subtype)console.error("Array.typeSpec is missing subtype. Assuming string."+JSON.stringify(b)),b.subtype="string";Object.keys(b).forEach(function(a){this[a]=b[a]},this);this.subtype=a.getType(this.subtype)}var b=g("gcli/l10n"),a=g("gcli/types"),j=g("gcli/types").Type,l=g("gcli/types").Status,m=g("gcli/types").Conversion,n=g("gcli/types").ArrayConversion,p=g("gcli/types/selection").SelectionType,o=g("gcli/argument").BlankArgument,r=g("gcli/argument").ArrayArgument;i.startup=function(){a.registerType(f);
a.registerType(d);a.registerType(e);a.registerType(k);a.registerType(c);a.registerType(h)};i.shutdown=function(){a.unregisterType(f);a.unregisterType(d);a.unregisterType(e);a.unregisterType(k);a.unregisterType(c);a.unregisterType(h)};f.prototype=Object.create(j.prototype);f.prototype.stringify=function(a){return a==null?"":a.toString()};f.prototype.parse=function(a){return a.text==null||a.text===""?new m(void 0,a,l.INCOMPLETE,""):new m(a.text,a)};f.prototype.name="string";i.StringType=f;d.prototype=
Object.create(j.prototype);d.prototype.stringify=function(a){return a==null?"":""+a};d.prototype.getMin=function(){if(this._min){if(typeof this._min==="function")return this._min();if(typeof this._min==="number")return this._min}};d.prototype.getMax=function(){if(this._max){if(typeof this._max==="function")return this._max();if(typeof this._max==="number")return this._max}};d.prototype.parse=function(a){if(a.text.replace(/^\s*-?/,"").length===0)return new m(void 0,a,l.INCOMPLETE,"");var c=parseInt(a.text,
10);if(isNaN(c))return new m(void 0,a,l.ERROR,b.lookupFormat("typesNumberNan",[a.text]));var j=this.getMax();if(j!=null&&c>j)return new m(void 0,a,l.ERROR,b.lookupFormat("typesNumberMax",[c,j]));j=this.getMin();return j!=null&&c<j?new m(void 0,a,l.ERROR,b.lookupFormat("typesNumberMin",[c,j])):new m(c,a)};d.prototype.decrement=function(a){if(typeof a!=="number"||isNaN(a))return this.getMax()||1;a-=this._step;a=Math.ceil(a/this._step)*this._step;return this._boundsCheck(a)};d.prototype.increment=function(a){if(typeof a!==
"number"||isNaN(a))return a=this.getMin(),a!=null?a:0;a+=this._step;a=Math.floor(a/this._step)*this._step;return this.getMax()==null?a:this._boundsCheck(a)};d.prototype._boundsCheck=function(a){var b=this.getMin();if(b!=null&&a<b)return b;b=this.getMax();return b!=null&&a>b?b:a};d.prototype.name="number";i.NumberType=d;e.prototype=Object.create(p.prototype);e.prototype.lookup=[{name:"false",value:!1},{name:"true",value:!0}];e.prototype.parse=function(a){return a.type==="TrueNamedArgument"?new m(!0,
a):a.type==="FalseNamedArgument"?new m(!1,a):p.prototype.parse.call(this,a)};e.prototype.stringify=function(a){return a==null?"":""+a};e.prototype.getBlank=function(){return new m(!1,new o,l.VALID,"",this.lookup)};e.prototype.name="boolean";i.BooleanType=e;c.prototype=Object.create(j.prototype);c.prototype.stringify=function(a){return this.defer().stringify(a)};c.prototype.parse=function(a){return this.defer().parse(a)};c.prototype.decrement=function(a){var b=this.defer();return b.decrement?b.decrement(a):
void 0};c.prototype.increment=function(a){var b=this.defer();return b.increment?b.increment(a):void 0};c.prototype.increment=function(a){var b=this.defer();return b.increment?b.increment(a):void 0};c.prototype.getType=function(){return this.defer()};Object.defineProperty(c.prototype,"isImportant",{get:function(){return this.defer().isImportant},enumerable:!0});c.prototype.name="deferred";i.DeferredType=c;k.prototype=Object.create(j.prototype);k.prototype.stringify=function(){return""};k.prototype.parse=
function(a){return new m(void 0,a)};k.prototype.name="blank";i.BlankType=k;h.prototype=Object.create(j.prototype);h.prototype.stringify=function(a){return a==null?"":a.join(" ")};h.prototype.parse=function(a){if(a.type==="ArrayArgument"){var b=a.getArguments().map(function(a){var b=this.subtype.parse(a);return a.conversion=b},this);return new n(b,a)}else throw console.error("non ArrayArgument to ArrayType.parse",a),Error("non ArrayArgument to ArrayType.parse");};h.prototype.getBlank=function(){return new n([],
new r)};h.prototype.name="array";i.ArrayType=h});
define("gcli/types/resource",["require","exports","module","gcli/types","gcli/types/selection"],function(g,i){function f(a,b,c,j){this.name=a;this.type=b;this.inline=c;this.element=j}function d(a){this.name=a.href;if(!this.name)this.name=a.ownerNode.id?"css#"+a.ownerNode.id:"inline-css";this.inline=a.href==null;this.type=f.TYPE_CSS;this.element=a}function e(a){this.name=a.src;if(!this.name)this.name=a.id?"script#"+a.id:"inline-script";this.inline=a.src===""||a.src==null;this.type=f.TYPE_SCRIPT;this.element=
a}function c(a,b){var c={};a.forEach(function(a){c[a.name]==null&&(c[a.name]=[]);c[a.name].push(a)});Object.keys(c).forEach(function(a){a=c[a];a.length>1&&b(a)})}function k(a){this.include=a.include;if(this.include!==f.TYPE_SCRIPT&&this.include!==f.TYPE_CSS&&this.include!=null)throw Error("invalid include property: "+this.include);}var h=g("gcli/types"),b=g("gcli/types/selection").SelectionType;i.startup=function(){h.registerType(k)};i.shutdown=function(){h.unregisterType(k);i.clearResourceCache()};
i.clearResourceCache=function(){j.clear()};var a;typeof document!=="undefined"&&(a=document);i.setDocument=function(b){a=b};i.unsetDocument=function(){j.clear();a=void 0};i.getDocument=function(){return a};f.prototype.getContents=function(){throw Error("not implemented");};f.TYPE_SCRIPT="text/javascript";f.TYPE_CSS="text/css";d.prototype=Object.create(f.prototype);d.prototype.loadContents=function(a){a(this.element.ownerNode.innerHTML)};d._getAllStyles=function(){var b=[];if(a==null)return b;Array.prototype.forEach.call(a.styleSheets,
function(a){d._getStyle(a,b)});c(b,function(a){for(var b=0;b<a.length;b++)a[b].name=a[b].name+"-"+b});return b};d._getStyle=function(a,b){var c=j.get(a);c||(c=new d(a),j.add(a,c));b.push(c);try{Array.prototype.forEach.call(a.cssRules,function(a){a.type==CSSRule.IMPORT_RULE&&a.styleSheet&&d._getStyle(a.styleSheet,b)},this)}catch(e){}};e.prototype=Object.create(f.prototype);e.prototype.loadContents=function(a){if(this.inline)a(this.element.innerHTML);else{var b=new XMLHttpRequest;b.onreadystatechange=
function(){b.readyState===b.DONE&&a(b.responseText)};b.open("GET",this.element.src,!0);b.send()}};e._getAllScripts=function(){if(a==null)return[];var b=a.querySelectorAll("script"),b=Array.prototype.map.call(b,function(a){var b=j.get(a);b||(b=new e(a),j.add(a,b));return b});c(b,function(a){for(var b=0;b<a.length;b++)a[b].name=a[b].name+"-"+b});return b};k.prototype=Object.create(b.prototype);k.prototype.getLookup=function(){var a=[];this.include!==f.TYPE_SCRIPT&&Array.prototype.push.apply(a,d._getAllStyles());
this.include!==f.TYPE_CSS&&Array.prototype.push.apply(a,e._getAllScripts());return a.map(function(a){return{name:a.name,value:a}})};k.prototype.name="resource";var j={_cached:[],get:function(a){for(var b=0;b<j._cached.length;b++)if(j._cached[b].node===a)return j._cached[b].resource;return null},add:function(a,b){j._cached.push({node:a,resource:b})},clear:function(){j._cached=[]}}});define("text!gcli/ui/fields/menu.css",[],function(){return"\n.gcli-menu {\n  width: 100%;\n  overflow: hidden;\n  font-size: 90%;\n}\n\n.gcli-menu-field {\n  border: 1px solid #aaa;\n  border-top: 0;\n  border-bottom-right-radius: 5px;\n  border-bottom-left-radius: 5px;\n  max-height: 300px;\n  margin: 0 3px;\n  padding: 0;\n}\n\n.gcli-menu-template {\n  border-collapse: collapse;\n  width: 100%;\n}\n\n.gcli-menu-option {\n  overflow: hidden;\n  white-space: nowrap;\n  cursor: pointer;\n}\n\n.gcli-menu-option:hover {\n  background-image: -moz-linear-gradient(top, #f8f8f8, #ccc);\n  background-color: #ddd;\n}\n\n.gcli-menu-name {\n  padding: 2px 3px;\n  -moz-padding-start: 8px;\n  -webkit-padding-start: 8px;\n}\n\n.gcli-menu-desc {\n  color: #777;\n  padding: 0 3px;\n  -moz-padding-end: 8px;\n  -webkit-padding-end: 8px;\n}\n\n.gcli-menu-highlight,\n.gcli-menu-highlight.gcli-menu-option:hover {\n  background-image: -moz-linear-gradient(top, #eee, #b8b8b8);\n  background-color: #c8c8c8;\n}\n\n.gcli-menu-typed {\n  color: #FF6600;\n}\n\n.gcli-menu-more {\n  font-size: 80%;\n  text-align: right;\n  -moz-padding-end: 8px;\n  -webkit-padding-end: 8px;\n}"});
define("text!gcli/ui/fields/menu.html",[],function(){return'\n<div>\n  <table class="gcli-menu-template" aria-live="polite">\n    <tr class="gcli-menu-option" foreach="item in ${items}"\n        onclick="${onItemClickInternal}" title="${item.manual}">\n      <td class="gcli-menu-name">${item.name}</td>\n      <td class="gcli-menu-desc">${item.description}</td>\n    </tr>\n  </table>\n  <div class="gcli-menu-more" if="${items.hasMore}">${l10n.fieldMenuMore}</div>\n</div>'});
define("gcli/util",["require","exports","module"],function(g,i){function f(c,d){for(var e=0;e<d.length;e++)if(c===d[e])return e;return-1}function d(c,d){var e=c.getAttribute("data-command");e||(e=c.querySelector("*[data-command]").getAttribute("data-command"));e?d(e):console.warn("Missing data-command for "+util.findCssSelector(c))}i.createEvent=function(c){var d=[],e=!1,b=[],a=void 0,j=function(a){if(e)b.push(a);else for(var c=0;c<d.length;c++){var j=d[c];j.func.call(j.scope,a)}};j.add=function(a,
b){d.push({func:a,scope:b})};j.remove=function(a,b){var j=!1;d=d.filter(function(c){(c=c.func!==a&&c.scope!==b)||(j=!0);return c});j||console.warn("Failed to remove handler from "+c)};j.removeAll=function(){d=[]};j.holdFire=function(){e=!0};j.resumeFire=function(){if(e!==!0)throw Error("Event not held: "+c);e=!1;if(b.length!==0){if(b.length===1)j(b[0]);else{var d=b[0],f=b[b.length-1];a?j(a(d,f,b)):j(f)}b=[]}};Object.defineProperty(j,"eventCombiner",{set:function(b){if(typeof b!=="function")throw Error("eventCombiner is not a function");
a=b},enumerable:!0});return j};i.NS_XHTML="http://www.w3.org/1999/xhtml";i.NS_XUL="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";i.createElement=function(c,d){return i.isXmlDocument(c)?c.createElementNS(i.NS_XHTML,d):c.createElement(d)};i.clearElement=function(c){for(;c.hasChildNodes();)c.removeChild(c.firstChild)};var e=/^\s*$/;i.removeWhitespace=function(c,d){for(var h=0;h<c.childNodes.length;){var b=c.childNodes.item(h);b.nodeType===3&&e.test(b.textContent)?c.removeChild(b):(d&&
b.nodeType===1&&i.removeWhitespace(b,d),h++)}};i.importCss=function(c,d,e){if(c){d=d||document;if(!e){e=0;if(c.length!=0)for(var b=0;b<c.length;b++){var a=c.charCodeAt(b),e=(e<<5)-e+a;e&=e}e="hash-"+e}if(b=d.getElementById(e))return b.tagName.toLowerCase()!=="style"&&console.error("Warning: importCss passed id="+e+", but that pre-exists (and isn't a style tag)"),b;b=i.createElement(d,"style");b.id=e;b.appendChild(d.createTextNode(c));(d.getElementsByTagName("head")[0]||d.documentElement).appendChild(b);
return b}};i.setContents=function(c,d){if(typeof HTMLElement!=="undefined"&&d instanceof HTMLElement)i.clearElement(c),c.appendChild(d);else if(i.isXmlDocument(c.ownerDocument))try{var e=c.ownerDocument.documentElement.namespaceURI;if(!e)e=i.NS_XHTML;i.clearElement(c);for(var b=c.ownerDocument.createRange().createContextualFragment('<div xmlns="'+e+'">'+d+"</div>").firstChild;b.hasChildNodes();)c.appendChild(b.firstChild)}catch(a){throw console.error("Bad XHTML",a),console.trace(),a;}else c.innerHTML=
d};i.setTextContent=function(c,d){c.textContent=d};i.toDom=function(c,d){var e=i.createElement(c,"div");i.setContents(e,d);return e.children[0]};i.isXmlDocument=function(c){c=c||document;return c.contentType&&c.contentType!="text/html"?!0:c.xmlVersion!=null?!0:!1};i.findCssSelector=function(c){var d=c.ownerDocument;if(c.id&&d.getElementById(c.id)===c)return"#"+c.id;var e=c.tagName.toLowerCase();if(e==="html")return"html";if(e==="head")return"head";if(e==="body")return"body";c.parentNode==null&&console.log("danger: "+
e);var b,a;if(c.classList.length>0)for(var j=0;j<c.classList.length;j++){b="."+c.classList.item(j);a=d.querySelectorAll(b);if(a.length===1)return b;b=e+b;a=d.querySelectorAll(b);if(a.length===1)return b;a=f(c,c.parentNode.children)+1;b=b+":nth-child("+a+")";a=d.querySelectorAll(b);if(a.length===1)return b}a=f(c,c.parentNode.children)+1;return b=i.findCssSelector(c.parentNode)+" > "+e+":nth-child("+a+")"};i.createUrlLookup=function(c){return function(d){try{return g("text!gcli/ui/"+d)}catch(e){if(c.filename)return c.filename+
d;var b=c.id.split("/").pop()+".js";return c.uri.substr(-b.length)!==b?(console.error("Can't work out path from module.uri/module.id"),d):c.uri?c.uri.substr(0,c.uri.length-b.length-1)+"/"+d:b+"/"+d}}};i.updateCommand=function(c,e){d(c,function(c){e.update(c)})};i.executeCommand=function(c,e){d(c,function(c){e.exec({visible:!0,typed:c})})};i.KeyEvent={DOM_VK_CANCEL:3,DOM_VK_HELP:6,DOM_VK_BACK_SPACE:8,DOM_VK_TAB:9,DOM_VK_CLEAR:12,DOM_VK_RETURN:13,DOM_VK_ENTER:14,DOM_VK_SHIFT:16,DOM_VK_CONTROL:17,DOM_VK_ALT:18,
DOM_VK_PAUSE:19,DOM_VK_CAPS_LOCK:20,DOM_VK_ESCAPE:27,DOM_VK_SPACE:32,DOM_VK_PAGE_UP:33,DOM_VK_PAGE_DOWN:34,DOM_VK_END:35,DOM_VK_HOME:36,DOM_VK_LEFT:37,DOM_VK_UP:38,DOM_VK_RIGHT:39,DOM_VK_DOWN:40,DOM_VK_PRINTSCREEN:44,DOM_VK_INSERT:45,DOM_VK_DELETE:46,DOM_VK_0:48,DOM_VK_1:49,DOM_VK_2:50,DOM_VK_3:51,DOM_VK_4:52,DOM_VK_5:53,DOM_VK_6:54,DOM_VK_7:55,DOM_VK_8:56,DOM_VK_9:57,DOM_VK_SEMICOLON:59,DOM_VK_EQUALS:61,DOM_VK_A:65,DOM_VK_B:66,DOM_VK_C:67,DOM_VK_D:68,DOM_VK_E:69,DOM_VK_F:70,DOM_VK_G:71,DOM_VK_H:72,
DOM_VK_I:73,DOM_VK_J:74,DOM_VK_K:75,DOM_VK_L:76,DOM_VK_M:77,DOM_VK_N:78,DOM_VK_O:79,DOM_VK_P:80,DOM_VK_Q:81,DOM_VK_R:82,DOM_VK_S:83,DOM_VK_T:84,DOM_VK_U:85,DOM_VK_V:86,DOM_VK_W:87,DOM_VK_X:88,DOM_VK_Y:89,DOM_VK_Z:90,DOM_VK_CONTEXT_MENU:93,DOM_VK_NUMPAD0:96,DOM_VK_NUMPAD1:97,DOM_VK_NUMPAD2:98,DOM_VK_NUMPAD3:99,DOM_VK_NUMPAD4:100,DOM_VK_NUMPAD5:101,DOM_VK_NUMPAD6:102,DOM_VK_NUMPAD7:103,DOM_VK_NUMPAD8:104,DOM_VK_NUMPAD9:105,DOM_VK_MULTIPLY:106,DOM_VK_ADD:107,DOM_VK_SEPARATOR:108,DOM_VK_SUBTRACT:109,
DOM_VK_DECIMAL:110,DOM_VK_DIVIDE:111,DOM_VK_F1:112,DOM_VK_F2:113,DOM_VK_F3:114,DOM_VK_F4:115,DOM_VK_F5:116,DOM_VK_F6:117,DOM_VK_F7:118,DOM_VK_F8:119,DOM_VK_F9:120,DOM_VK_F10:121,DOM_VK_F11:122,DOM_VK_F12:123,DOM_VK_F13:124,DOM_VK_F14:125,DOM_VK_F15:126,DOM_VK_F16:127,DOM_VK_F17:128,DOM_VK_F18:129,DOM_VK_F19:130,DOM_VK_F20:131,DOM_VK_F21:132,DOM_VK_F22:133,DOM_VK_F23:134,DOM_VK_F24:135,DOM_VK_NUM_LOCK:144,DOM_VK_SCROLL_LOCK:145,DOM_VK_COMMA:188,DOM_VK_PERIOD:190,DOM_VK_SLASH:191,DOM_VK_BACK_QUOTE:192,
DOM_VK_OPEN_BRACKET:219,DOM_VK_BACK_SLASH:220,DOM_VK_CLOSE_BRACKET:221,DOM_VK_QUOTE:222,DOM_VK_META:224}});
define("gcli/ui/view",["require","exports","module","gcli/util","gcli/ui/domtemplate"],function(g,i){var f=g("gcli/util"),d=g("gcli/ui/domtemplate");i.createView=function(e){if(e.html==null)throw Error("options.html is missing");return{isView:!0,appendTo:function(c,d){d===!0&&f.clearElement(c);c.appendChild(this.toDom(c.ownerDocument))},toDom:function(c){e.css&&f.importCss(e.css,c,e.cssId);c=f.toDom(c,e.html);d.template(c,e.data||{},e.options||{});return c}}}});
define("gcli/ui/inputter","require,exports,module,gcli/util,gcli/util,gcli/types,gcli/history,text!gcli/ui/inputter.css".split(","),function(g,i){var f;function d(a,c){this.requisition=c.requisition;this.focusManager=c.focusManager;this.element=c.element;this.element.classList.add("gcli-in-input");this.element.spellcheck=!1;this.document=this.element.ownerDocument;this.scratchpad=a.scratchpad;if(b!=null)this.style=e.importCss(b,this.document,"gcli-inputter");this.lastTabDownAt=0;this._caretChange=
null;this.onKeyDown=this.onKeyDown.bind(this);this.onKeyUp=this.onKeyUp.bind(this);this.element.addEventListener("keydown",this.onKeyDown,!1);this.element.addEventListener("keyup",this.onKeyUp,!1);this.history=new h;this._scrollingThroughHistory=!1;this._choice=null;this.onChoiceChange=e.createEvent("Inputter.onChoiceChange");this.onMouseUp=this.onMouseUp.bind(this);this.element.addEventListener("mouseup",this.onMouseUp,!1);this.focusManager&&this.focusManager.addMonitoredElement(this.element,"input");
this.requisition.onTextChange.add(this.textChanged,this);this.assignment=this.requisition.getAssignmentAt(0);this.onAssignmentChange=e.createEvent("Inputter.onAssignmentChange");this.onInputChange=e.createEvent("Inputter.onInputChange");this.onResize=e.createEvent("Inputter.onResize");this.onWindowResize=this.onWindowResize.bind(this);this.document.defaultView.addEventListener("resize",this.onWindowResize,!1);this.requisition.update(this.element.value||"")}var e=g("gcli/util"),c=g("gcli/util").KeyEvent,
k=g("gcli/types").Status,h=g("gcli/history").History,b=g("text!gcli/ui/inputter.css");d.prototype.destroy=function(){this.document.defaultView.removeEventListener("resize",this.onWindowResize,!1);this.requisition.onTextChange.remove(this.textChanged,this);this.focusManager&&this.focusManager.removeMonitoredElement(this.element,"input");this.element.removeEventListener("mouseup",this.onMouseUp,!1);this.element.removeEventListener("keydown",this.onKeyDown,!1);this.element.removeEventListener("keyup",
this.onKeyUp,!1);this.history.destroy();this.style&&(this.style.parentNode.removeChild(this.style),delete this.style);delete this.onMouseUp;delete this.onKeyDown;delete this.onKeyUp;delete this.onWindowResize;delete this.tooltip;delete this.document;delete this.element};d.prototype.onWindowResize=function(){if(this.element){var a=this.getDimensions();if(a)this.onResize(a)}};d.prototype.getDimensions=function(){if(this.element.getBoundingClientRect){for(var a,b,c=this.element.parentNode;c&&c.nodeName!==
"#document";){var d=this.document.defaultView.getComputedStyle(c,"");if(d&&(d=d.getPropertyValue("position"),d==="absolute"||d==="fixed")){b=c.getBoundingClientRect();a=b.top;b=b.left;break}c=c.parentNode}c=this.element.getBoundingClientRect();return{top:c.top-(a||0)+1,height:c.bottom-c.top-1,left:c.left-(b||0)+2,width:c.right-c.left}}};d.prototype.onMouseUp=function(){this._checkAssignment()};d.prototype.textChanged=function(){if(this.document){if(this._caretChange==null)this._caretChange=f;var a=
this.requisition.toString(),b=this.getInputState();b.typed=a;this._processCaretChange(b);if(this.element.value!==a)this.element.value=a;this.onInputChange({inputState:b})}};f=3;d.prototype._processCaretChange=function(a){var b,c;switch(this._caretChange){case 1:b=0;c=a.typed.length;break;case 2:c=b=a.typed.length;break;case f:b=a.cursor.start;do b++;while(b<a.typed.length&&a.typed[b-1]!==" ");c=b;break;default:b=a.cursor.start,c=a.cursor.end}b=b>a.typed.length?a.typed.length:b;c=c>a.typed.length?
a.typed.length:c;a={typed:a.typed,cursor:{start:b,end:c}};if(this.element.selectionStart!==b)this.element.selectionStart=b;if(this.element.selectionEnd!==c)this.element.selectionEnd=c;this._checkAssignment(b);this._caretChange=null;return a};d.prototype._checkAssignment=function(a){if(a==null)a=this.element.selectionStart;a=this.requisition.getAssignmentAt(a);if(this.assignment!==a)this.assignment=a,this.onAssignmentChange({assignment:this.assignment});if(this.focusManager)a=this.assignment.conversion.message,
this.focusManager.setError(a!=null&&a!=="")};d.prototype.setInput=function(a){this.requisition.update(a)};d.prototype.setCursor=function(a){this._caretChange=0;this._processCaretChange({typed:this.element.value,cursor:a})};d.prototype.focus=function(){this.element.focus();this._checkAssignment()};d.prototype.onKeyDown=function(a){if(a.keyCode===c.DOM_VK_UP||a.keyCode===c.DOM_VK_DOWN)a.preventDefault();else if(!(a.keyCode===c.DOM_VK_F1||a.keyCode===c.DOM_VK_ESCAPE||a.keyCode===c.DOM_VK_UP||a.keyCode===
c.DOM_VK_DOWN)){if(this.focusManager)this.focusManager.onInputChange();if(a.keyCode===c.DOM_VK_TAB){this.lastTabDownAt=0;if(!a.shiftKey)a.preventDefault(),this.lastTabDownAt=a.timeStamp;if(a.metaKey||a.altKey||a.crtlKey)this.document.commandDispatcher?this.document.commandDispatcher.advanceFocus():this.element.blur()}}};d.prototype.onKeyUp=function(a){if(this.focusManager&&a.keyCode===c.DOM_VK_F1)this.focusManager.helpRequest();else if(this.focusManager&&a.keyCode===c.DOM_VK_ESCAPE)this.focusManager.removeHelp();
else if(a.keyCode===c.DOM_VK_UP)if(this.tooltip&&this.tooltip.isMenuShowing)this.changeChoice(-1);else if(this.element.value===""||this._scrollingThroughHistory)this._scrollingThroughHistory=!0,this.requisition.update(this.history.backward());else if(this.assignment.getStatus()===k.VALID){if(this.requisition.increment(this.assignment),this.focusManager)this.focusManager.onInputChange()}else this.changeChoice(-1);else if(a.keyCode===c.DOM_VK_DOWN)if(this.tooltip&&this.tooltip.isMenuShowing)this.changeChoice(1);
else if(this.element.value===""||this._scrollingThroughHistory)this._scrollingThroughHistory=!0,this.requisition.update(this.history.forward());else if(this.assignment.getStatus()===k.VALID){if(this.requisition.decrement(this.assignment),this.focusManager)this.focusManager.onInputChange()}else this.changeChoice(1);else if(a.keyCode===c.DOM_VK_RETURN)this.requisition.getStatus()===k.VALID?(this._scrollingThroughHistory=!1,this.history.add(this.element.value),this.requisition.exec()):this.tooltip.selectChoice()||
this.focusManager.setError(!0),this._choice=null;else if(a.keyCode===c.DOM_VK_TAB&&!a.shiftKey){if(this.element.value.length>0&&this.lastTabDownAt+1E3>a.timeStamp){this._caretChange=f;a=this.getInputState();this._processCaretChange(a);if(this._choice==null)this._choice=0;this.requisition.complete(a.cursor,this._choice)}this.lastTabDownAt=0;this._scrollingThroughHistory=!1;this._choice=null;this.onChoiceChange({choice:this._choice})}else this.scratchpad&&this.scratchpad.shouldActivate(a)?this.scratchpad.activate(this.element.value)&&
this.requisition.update(""):(this._scrollingThroughHistory=!1,this._caretChange=0,this.requisition.update(this.element.value),this._choice=null,this.onChoiceChange({choice:this._choice}))};d.prototype.changeChoice=function(a){if(this._choice==null)this._choice=0;this._choice+=a;this.onChoiceChange({choice:this._choice})};d.prototype.getCurrentAssignment=function(){return this.requisition.getAssignmentAt(this.element.selectionStart)};d.prototype.getInputState=function(){var a={typed:this.element.value,
cursor:{start:this.element.selectionStart,end:this.element.selectionEnd}};a.typed==null&&(a={typed:"",cursor:{start:0,end:0}},console.log('fixing input.typed=""',a));if(a.cursor.start==null)a.cursor.start=0;return a};i.Inputter=d});
define("gcli/ui/completer","require,exports,module,gcli/util,gcli/ui/domtemplate,text!gcli/ui/completer.html".split(","),function(g,i){function f(e,h){this.requisition=h.requisition;this.scratchpad=e.scratchpad;this.input={typed:"",cursor:{start:0,end:0}};this.choice=0;this.element=h.element;this.element.classList.add("gcli-in-complete");this.element.setAttribute("tabindex","-1");this.element.setAttribute("aria-live","polite");this.document=this.element.ownerDocument;this.inputter=h.inputter;this.inputter.onInputChange.add(this.update,
this);this.inputter.onAssignmentChange.add(this.update,this);this.inputter.onChoiceChange.add(this.update,this);if(h.autoResize){this.inputter.onResize.add(this.resized,this);var b=this.inputter.getDimensions();b&&this.resized(b)}this.template=d.toDom(this.document,c);d.removeWhitespace(this.template,!0);this.update()}var d=g("gcli/util"),e=g("gcli/ui/domtemplate"),c=g("text!gcli/ui/completer.html");f.prototype.destroy=function(){this.inputter.onInputChange.remove(this.update,this);this.inputter.onAssignmentChange.remove(this.update,
this);this.inputter.onChoiceChange.remove(this.update,this);this.inputter.onResize.remove(this.resized,this);delete this.document;delete this.element;delete this.template;delete this.inputter};f.prototype.resized=function(c){this.element.style.top=c.top+"px";this.element.style.height=c.height+"px";this.element.style.lineHeight=c.height+"px";this.element.style.left=c.left+"px";this.element.style.width=c.width+"px"};f.prototype.update=function(c){this.choice=c&&c.choice!=null?c.choice:0;var c=this._getCompleterTemplateData(),
h=this.template.cloneNode(!0);e.template(h,c,{stack:"completer.html"});for(d.clearElement(this.element);h.hasChildNodes();)this.element.appendChild(h.firstChild)};f.prototype._getCompleterTemplateData=function(){var c=this.inputter.getInputState(),d="",b="",a=this.requisition.getAssignmentAt(c.cursor.start),j=[];if(c.typed.trim().length!==0){var e=a.arg,f=a.getPredictionAt(this.choice);if(f){if(f=f.name,e=e.text,a.isInName()&&(f=" "+f),e!==f){var g=e.replace(/^\s*/,"");f.indexOf(g)===0&&c.cursor.start===
c.typed.length?(g=e.match(/^(\s*)/)[0].length,d=f.slice(e.length-g)):b="\u21e5 "+f}}else e.type==="NamedArgument"&&e.text===""&&j.push("<"+a.param.type.name+">\u00a0")}d!==""?d+="\u00a0":this.requisition.typedEndsWithSeparator()||j.unshift("\u00a0");c=this.requisition.getInputStatusMarkup(c.cursor.start);c.forEach(function(a){a.string=a.string.replace(/ /g,"\u00a0");a.className="gcli-in-"+a.status.toString().toLowerCase()},this);f=(e=this.requisition.commandAssignment.value)&&e.name==="{";this.requisition.getAssignments().forEach(function(b){b.param.isPositionalAllowed&&
b.arg.toString().trim()===""&&(d!==""&&a===b||j.push(b.param.isDataRequired?"<"+b.param.name+">\u00a0":"["+b.param.name+"]\u00a0"))}.bind(this));var i=!1;e&&e.hasNamedParameters&&e.params.forEach(function(a){var b=this.requisition.getAssignment(a.name).arg;!a.isPositionalAllowed&&!a.hidden&&b.type==="BlankArgument"&&(i=!0)},this);i&&j.push("[options]\u00a0");e=f&&this.requisition.getAssignment(0).arg.suffix.indexOf("}")===-1;return{statusMarkup:c,directTabText:d,emptyParameters:j,arrowTabText:b,unclosedJs:e,
scratchLink:this.scratchpad&&f?this.scratchpad.linkText:""}};i.Completer=f});
define("gcli/ui/fields","require,exports,module,gcli/util,gcli/util,gcli/types/basic".split(","),function(g,i){function f(b,a){this.type=b;this.document=a.document;this.requisition=a.requisition}function d(b,a){f.call(this,b,a);this.element=e.createElement(this.document,"div");this.onFieldChange=e.createEvent("BlankField.onFieldChange")}var e=g("gcli/util"),c=g("gcli/util").KeyEvent,k=g("gcli/types/basic").BlankType;f.prototype.element=void 0;f.prototype.destroy=function(){delete this.messageElement};
f.prototype.setConversion=function(){throw Error("Field should not be used directly");};f.prototype.getConversion=function(){throw Error("Field should not be used directly");};f.prototype.setMessageElement=function(b){this.messageElement=b};f.prototype.setMessage=function(b){this.messageElement&&(b==null&&(b=""),e.setContents(this.messageElement,b))};f.prototype.onInputChange=function(b){var a=this.getConversion();this.onFieldChange({conversion:a});this.setMessage(a.message);b.keyCode===c.DOM_VK_RETURN&&
this.requisition.exec()};f.prototype.isImportant=!1;f.claim=function(){throw Error("Field should not be used directly");};f.TOOLTIP_MATCH=5;f.TOOLTIP_DEFAULT=4;f.MATCH=3;f.DEFAULT=2;f.BASIC=1;f.NO_MATCH=0;i.Field=f;var h=[];i.addField=function(b){if(typeof b!=="function")throw console.error("addField erroring on ",b),Error("addField requires a Field constructor");h.push(b)};i.removeField=function(b){if(typeof b!=="string")fields=fields.filter(function(a){return a!==b}),delete fields[b];else if(b instanceof
f)removeField(b.name);else throw console.error("removeField erroring on ",b),Error("removeField requires an instance of Field");};i.getField=function(b,a){var c,e=-1;h.forEach(function(a){var d=a.claim(b);d>e&&(e=d,c=a)});if(!c)throw console.error("Unknown field type ",b," in ",h),Error("Can't find field for "+b);return a.tooltip&&e<f.TOOLTIP_DEFAULT?new d(b,a):new c(b,a)};d.prototype=Object.create(f.prototype);d.claim=function(b){return b instanceof k?f.MATCH:f.NO_MATCH};d.prototype.setConversion=
function(b){this.setMessage(b.message)};d.prototype.getConversion=function(){return this.type.parse(new Argument)};i.addField(d)});
define("gcli/ui/fields/basic","require,exports,module,gcli/util,gcli/l10n,gcli/argument,gcli/argument,gcli/argument,gcli/argument,gcli/types,gcli/types,gcli/types/basic,gcli/types/basic,gcli/types/basic,gcli/types/basic,gcli/types/basic,gcli/ui/fields,gcli/ui/fields".split(","),function(g,i){function f(b,c){s.call(this,b,c);this.arg=new a;this.element=h.createElement(this.document,"input");this.element.type="text";this.element.classList.add("gcli-field");this.onInputChange=this.onInputChange.bind(this);
this.element.addEventListener("keyup",this.onInputChange,!1);this.onFieldChange=h.createEvent("StringField.onFieldChange")}function d(b,c){s.call(this,b,c);this.arg=new a;this.element=h.createElement(this.document,"input");this.element.type="number";if(this.type.max)this.element.max=this.type.max;if(this.type.min)this.element.min=this.type.min;if(this.type.step)this.element.step=this.type.step;this.onInputChange=this.onInputChange.bind(this);this.element.addEventListener("keyup",this.onInputChange,
!1);this.onFieldChange=h.createEvent("NumberField.onFieldChange")}function e(a,b){s.call(this,a,b);this.name=b.name;this.named=b.named;this.element=h.createElement(this.document,"input");this.element.type="checkbox";this.element.id="gcliForm"+this.name;this.onInputChange=this.onInputChange.bind(this);this.element.addEventListener("change",this.onInputChange,!1);this.onFieldChange=h.createEvent("BooleanField.onFieldChange")}function c(a,b){s.call(this,a,b);this.options=b;this.requisition.onAssignmentChange.add(this.update,
this);this.element=h.createElement(this.document,"div");this.update();this.onFieldChange=h.createEvent("DeferredField.onFieldChange")}function k(a,c){s.call(this,a,c);this.options=c;this._onAdd=this._onAdd.bind(this);this.members=[];this.element=h.createElement(this.document,"div");this.element.classList.add("gcli-array-parent");this.addButton=h.createElement(this.document,"button");this.addButton.classList.add("gcli-array-member-add");this.addButton.addEventListener("click",this._onAdd,!1);this.addButton.innerHTML=
b.lookup("fieldArrayAdd");this.element.appendChild(this.addButton);this.container=h.createElement(this.document,"div");this.container.classList.add("gcli-array-members");this.element.appendChild(this.container);this.onInputChange=this.onInputChange.bind(this);this.onFieldChange=h.createEvent("ArrayField.onFieldChange")}var h=g("gcli/util"),b=g("gcli/l10n"),a=g("gcli/argument").Argument,j=g("gcli/argument").TrueNamedArgument,l=g("gcli/argument").FalseNamedArgument,m=g("gcli/argument").ArrayArgument;
g("gcli/types");var n=g("gcli/types").ArrayConversion,p=g("gcli/types/basic").StringType,o=g("gcli/types/basic").NumberType,r=g("gcli/types/basic").BooleanType,q=g("gcli/types/basic").DeferredType,v=g("gcli/types/basic").ArrayType,s=g("gcli/ui/fields").Field,u=g("gcli/ui/fields");i.startup=function(){u.addField(f);u.addField(d);u.addField(e);u.addField(c);u.addField(k)};i.shutdown=function(){u.removeField(f);u.removeField(d);u.removeField(e);u.removeField(c);u.removeField(k)};f.prototype=Object.create(s.prototype);
f.prototype.destroy=function(){s.prototype.destroy.call(this);this.element.removeEventListener("keyup",this.onInputChange,!1);delete this.element;delete this.document;delete this.onInputChange};f.prototype.setConversion=function(a){this.arg=a.arg;this.element.value=a.arg.text;this.setMessage(a.message)};f.prototype.getConversion=function(){this.arg=this.arg.beget({text:this.element.value,prefixSpace:!0});return this.type.parse(this.arg)};f.claim=function(a){return a instanceof p?s.MATCH:s.BASIC};
d.prototype=Object.create(s.prototype);d.claim=function(a){return a instanceof o?s.MATCH:s.NO_MATCH};d.prototype.destroy=function(){s.prototype.destroy.call(this);this.element.removeEventListener("keyup",this.onInputChange,!1);delete this.element;delete this.document;delete this.onInputChange};d.prototype.setConversion=function(a){this.arg=a.arg;this.element.value=a.arg.text;this.setMessage(a.message)};d.prototype.getConversion=function(){this.arg=this.arg.beget({text:this.element.value,prefixSpace:!0});
return this.type.parse(this.arg)};e.prototype=Object.create(s.prototype);e.claim=function(a){return a instanceof r?s.MATCH:s.NO_MATCH};e.prototype.destroy=function(){s.prototype.destroy.call(this);this.element.removeEventListener("change",this.onInputChange,!1);delete this.element;delete this.document;delete this.onInputChange};e.prototype.setConversion=function(a){this.element.checked=a.value;this.setMessage(a.message)};e.prototype.getConversion=function(){return this.type.parse(this.named?this.element.checked?
new j(new a(" --"+this.name)):new l:new a(" "+this.element.checked))};c.prototype=Object.create(s.prototype);c.prototype.update=function(){var a=this.type.defer();if(a!==this.subtype)this.field&&(this.field.onFieldChange.remove(this.fieldChanged,this),this.field.destroy()),this.subtype=a,this.field=u.getField(a,this.options),this.field.onFieldChange.add(this.fieldChanged,this),h.clearElement(this.element),this.element.appendChild(this.field.element)};c.claim=function(a){return a instanceof q?s.MATCH:
s.NO_MATCH};c.prototype.destroy=function(){s.prototype.destroy.call(this);this.requisition.onAssignmentChange.remove(this.update,this);delete this.element;delete this.document;delete this.onInputChange};c.prototype.setConversion=function(a){this.field.setConversion(a)};c.prototype.getConversion=function(){return this.field.getConversion()};Object.defineProperty(c.prototype,"isImportant",{get:function(){return this.field.isImportant},enumerable:!0});k.prototype=Object.create(s.prototype);k.claim=function(a){return a instanceof
v?s.MATCH:s.NO_MATCH};k.prototype.destroy=function(){s.prototype.destroy.call(this);this.addButton.removeEventListener("click",this._onAdd,!1)};k.prototype.setConversion=function(a){h.clearElement(this.container);this.members=[];a.conversions.forEach(function(a){this._onAdd(null,a)},this)};k.prototype.getConversion=function(){for(var a=[],b=new m,c=0;c<this.members.length;c++){var d=this.members[c].field.getConversion();a.push(d);b.addArgument(d.arg)}return new n(a,b)};k.prototype._onAdd=function(a,
c){var d=h.createElement(this.document,"div");d.classList.add("gcli-array-member");this.container.appendChild(d);var e=u.getField(this.type.subtype,this.options);e.onFieldChange.add(function(){var a=this.getConversion();this.onFieldChange({conversion:a});this.setMessage(a.message)},this);c&&e.setConversion(c);d.appendChild(e.element);var j=h.createElement(this.document,"button");j.classList.add("gcli-array-member-del");j.addEventListener("click",this._onDel,!1);j.innerHTML=b.lookup("fieldArrayDel");
d.appendChild(j);d={element:d,field:e,parent:this};d.onDelete=function(){this.parent.container.removeChild(this.element);this.parent.members=this.parent.members.filter(function(a){return a!==this});this.parent.onInputChange()}.bind(d);j.addEventListener("click",d.onDelete,!1);this.members.push(d)}});
define("gcli/settings",["require","exports","module","gcli/util","gcli/types"],function(g,i){function f(){}function d(a,b,c,d){this.name=a;this.type=b;this.description=c;this._defaultValue=d;this.onChange=e.createEvent("Setting.onChange");this.setDefault()}var e=g("gcli/util"),c=g("gcli/types"),k={},h={},b;i.setDefaults=function(a){Object.keys(a).forEach(function(b){h[b]===void 0&&(h[b]=a[b])})};i.startup=function(){b=new f;b.load(h)};i.shutdown=function(){};i.getAll=function(a){var b=[];Object.keys(k).forEach(function(c){(a==
null||c.indexOf(a)!==-1)&&b.push(k[c])}.bind(this));b.sort(function(a,b){return a.name.localeCompare(b.name)}.bind(this));return b};i.addSetting=function(a){var b=c.getType(a.type),a=new d(a.name,b,a.description,a.defaultValue);k[a.name]=a;i.onChange({added:a.name});return a};i.getSetting=function(a){return k[a]};i.removeSetting=function(a){a=typeof nameOrPrefSpec==="string"?a:a.name;delete k[a];i.onChange({removed:a})};i.onChange=e.createEvent("Settings.onChange");f.prototype.load=function(a){if(typeof localStorage!==
"undefined"){var b=localStorage.getItem("gcli-settings");if(b!=null){var c=JSON.parse(b);Object.keys(c).forEach(function(b){a[b]=c[b]})}}};f.prototype.save=function(a){typeof localStorage!=="undefined"&&(a=JSON.stringify(a),localStorage.setItem("gcli-settings",a))};i.LocalSettingStorage=f;d.prototype.setDefault=function(){this.value=this._defaultValue};Object.defineProperty(d.prototype,"value",{get:function(){return h[this.name]},set:function(a){h[this.name]=a;b.save(h);this.onChange({setting:this,
value:a})},enumerable:!0})});
define("gcli/types/setting","require,exports,module,gcli/settings,gcli/types,gcli/types/selection,gcli/types/basic".split(","),function(g,i){function f(){e.onChange.add(function(){this.clearCache()},this)}function d(){}var e=g("gcli/settings"),c=g("gcli/types"),k=g("gcli/types/selection").SelectionType,h=g("gcli/types/basic").DeferredType;i.startup=function(){c.registerType(f);c.registerType(d)};i.shutdown=function(){c.unregisterType(f);c.unregisterType(d)};var b=null;f.prototype=new k({cacheable:!0});
f.prototype.lookup=function(){return e.getAll().map(function(a){return{name:a.name,value:a}})};f.prototype.noMatch=function(){b=null};f.prototype.stringify=function(a){b=a;return k.prototype.stringify.call(this,a)};f.prototype.parse=function(a){a=k.prototype.parse.call(this,a);b=a.value;return a};f.prototype.name="setting";d.prototype=Object.create(h.prototype);d.prototype.defer=function(){return b!=null?b.type:c.getType("blank")};d.prototype.name="settingValue"});
define("gcli/canon","require,exports,module,gcli/util,gcli/l10n,gcli/types,gcli/types,gcli/types/basic,gcli/types/selection".split(","),function(g,i){function f(a,b){if(a==null)return b?h.lookup(b):a;if(typeof a==="string")return a;if(typeof a==="object"){if(a.key)return h.lookup(a.key);var c=h.getPreferredLocales(),d;c.some(function(b){d=a[b];return d!=null});if(d!=null)return d;console.error("Can't find locale in descriptions: locales="+JSON.stringify(c)+", description="+JSON.stringify(a));return"(No description)"}return h.lookup(b)}
function d(a){Object.keys(a).forEach(function(b){this[b]=a[b]},this);if(!this.name)throw Error("All registered commands must have a name");if(this.params==null)this.params=[];if(!Array.isArray(this.params))throw Error("command.params must be an array in "+this.name);this.hasNamedParameters=!1;this.description="description"in this?this.description:void 0;this.description=f(this.description,"canonDescNone");this.manual="manual"in this?this.manual:void 0;this.manual=f(this.manual);var b=this.params;
this.params=[];var c=!1;if(this.returnType==null)this.returnType="string";b.forEach(function(a){if(a.group)a.params.forEach(function(b){b=new e(b,this,a.group);this.params.push(b);if(!b.isPositionalAllowed)this.hasNamedParameters=!0},this),c=!0;else if(c)throw Error("Parameters can't come after param groups. Ignoring "+this.name+"/"+a.name);else{var b=new e(a,this,null);this.params.push(b);if(!b.isPositionalAllowed)this.hasNamedParameters=!0}},this)}function e(c,d,e){this.command=d||{name:"unnamed"};
this.paramSpec=c;this.name=this.paramSpec.name;this.type=this.paramSpec.type;this.groupName=e;this.defaultValue=this.paramSpec.defaultValue;if(!this.name)throw Error("In "+this.command.name+": all params must have a name");c=this.type;this.type=b.getType(c);if(this.type==null)throw console.error("Known types: "+b.getTypeNames().join(", ")),Error("In "+this.command.name+"/"+this.name+": can't find type for: "+JSON.stringify(c));if(this.type instanceof j){if(this.defaultValue!==void 0)throw Error("In "+
this.command.name+"/"+this.name+": boolean parameters can not have a defaultValue. Ignoring");this.defaultValue=!1}if(this.defaultValue!=null)try{var h=this.type.parseString(this.type.stringify(this.defaultValue));if(h.getStatus()!==a.VALID)throw Error("In "+this.command.name+"/"+this.name+": Error round tripping defaultValue. status = "+h.getStatus());}catch(f){throw Error("In "+this.command.name+"/"+this.name+": "+f);}if(this.defaultValue===void 0)this.defaultValue=this.type.getBlank().value;if(!this.isPositionalAllowed&&
this.defaultValue===void 0)throw Error("In "+this.command.name+"/"+this.name+": Missing defaultValue for optional parameter.");}function c(){this.onOutput=k.createEvent("CommandOutputManager.onOutput")}var k=g("gcli/util"),h=g("gcli/l10n"),b=g("gcli/types"),a=g("gcli/types").Status,j=g("gcli/types/basic").BooleanType;g("gcli/types/selection");i.Command=d;e.prototype.isKnownAs=function(a){return a==="--"+this.name?!0:!1};e.prototype.getBlank=function(){return this.type.getBlank?this.type.getBlank():
this.type.parseString("")};Object.defineProperty(e.prototype,"manual",{get:function(){return f(this.paramSpec.manual||void 0)},enumerable:!0});Object.defineProperty(e.prototype,"description",{get:function(){return f(this.paramSpec.description||void 0,"canonDescNone")},enumerable:!0});Object.defineProperty(e.prototype,"isDataRequired",{get:function(){return this.defaultValue===void 0},enumerable:!0});Object.defineProperty(e.prototype,"hidden",{get:function(){return this.paramSpec.hidden},enumerable:!0});
Object.defineProperty(e.prototype,"isPositionalAllowed",{get:function(){return this.groupName==null},enumerable:!0});i.Parameter=e;var l={},m=[],n={};i.addCommand=function(a){l[a.name]!=null&&(delete l[a.name],m=m.filter(function(b){return b!==a.name}));var b=new d(a);l[a.name]=b;m.push(a.name);m.sort();n[a.name]=a;i.onCanonChange();return b};i.removeCommand=function(a){var b=typeof a==="string"?a:a.name;if(!l[b])return!1;delete l[b];delete n[b];m=m.filter(function(a){return a!==b});i.onCanonChange();
return!0};i.getCommand=function(a){return l[a]||void 0};i.getCommands=function(){return Object.keys(l).map(function(a){return l[a]},this)};i.getCommandNames=function(){return m.slice(0)};i.getCommandSpecs=function(){return n};i.onCanonChange=k.createEvent("canon.onCanonChange");i.CommandOutputManager=c;i.commandOutputManager=new c});
define("gcli/types/command","require,exports,module,gcli/canon,gcli/l10n,gcli/types,gcli/types/selection,gcli/types,gcli/types".split(","),function(g,i){function f(a){this.requisition=a.requisition;this.isIncompleteName=a.isIncompleteName;this.stringifyProperty="name"}function d(){this.stringifyProperty="name"}var e=g("gcli/canon"),c=g("gcli/l10n"),k=g("gcli/types"),h=g("gcli/types/selection").SelectionType,b=g("gcli/types").Status,a=g("gcli/types").Conversion;i.startup=function(){k.registerType(d);
k.registerType(f)};i.shutdown=function(){k.unregisterType(d);k.unregisterType(f)};f.prototype=Object.create(h.prototype);f.prototype.name="param";f.prototype.lookup=function(){var a=[];this.requisition.commandAssignment.value.params.forEach(function(b){var c=this.requisition.getAssignment(b.name).arg;!b.isPositionalAllowed&&c.type==="BlankArgument"&&a.push({name:"--"+b.name,value:b})},this);return a};f.prototype.parse=function(d){return this.isIncompleteName?h.prototype.parse.call(this,d):new a(void 0,
d,b.ERROR,c.lookup("cliUnusedArg"))};d.prototype=Object.create(h.prototype);d.prototype.name="command";d.prototype.lookup=function(){var a=e.getCommands();a.sort(function(a,b){return a.name.localeCompare(b.name)});return a.map(function(a){return{name:a.name,value:a}},this)};d.prototype._addToPredictions=function(a,b,c){(c.text.length!==0||b.name.indexOf(" ")===-1)&&a.push(b)};d.prototype.parse=function(d){var e=function(){return this._findPredictions(d)}.bind(this),h=this._findPredictions(d);if(h.length===
0)return h=c.lookupFormat("typesSelectionNomatch",[d.text]),new a(void 0,d,b.ERROR,h,e);var f=h[0].value;return h.length===1?f.name===d.text&&typeof f.exec==="function"?new a(f,d,b.VALID,""):new a(void 0,d,b.INCOMPLETE,"",e):h[0].name===d.text?new a(f,d,b.VALID,"",e):new a(void 0,d,b.INCOMPLETE,"",e)}});
define("gcli/ui/focus","require,exports,module,gcli/util,gcli/settings,gcli/l10n,gcli/canon".split(","),function(g,i){function f(a,c){a=a||{};this._document=c.document||document;this._debug=a.debug||!1;this._blurDelay=a.blurDelay||150;this._window=this._document.defaultView;this._commandOutputManager=a.commandOutputManager||k.commandOutputManager;this._commandOutputManager.onOutput.add(this._outputted,this);this._blurDelayTimeout=null;this._monitoredElements=[];this._recentOutput=this._helpRequested=
this._hasFocus=this._isError=!1;this.onVisibilityChange=d.createEvent("FocusManager.onVisibilityChange");this._focused=this._focused.bind(this);this._document.addEventListener("focus",this._focused,!0);b.onChange.add(this._eagerHelperChanged,this);this.isOutputVisible=this.isTooltipVisible=void 0;this._checkShow()}var d=g("gcli/util"),e=g("gcli/settings"),c=g("gcli/l10n"),k=g("gcli/canon"),h={name:"eagerHelper",type:{name:"selection",lookup:[{name:"never",value:1},{name:"sometimes",value:2},{name:"always",
value:3}]},defaultValue:2,description:c.lookup("eagerHelperDesc"),ignoreTypeDifference:!0},b;i.startup=function(){b=e.addSetting(h)};i.shutdown=function(){e.removeSetting(h);b=void 0};f.prototype.destroy=function(){b.onChange.remove(this._eagerHelperChanged,this);this._document.removeEventListener("focus",this._focused,!0);this._commandOutputManager.onOutput.remove(this._outputted,this);for(var a=0;a<this._monitoredElements.length;a++){var c=this._monitoredElements[a];console.error("Hanging monitored element: ",
c.element);c.element.removeEventListener("focus",c.onFocus,!0);c.element.removeEventListener("blur",c.onBlur,!0)}if(this._blurDelayTimeout)this._window.clearTimeout(this._blurDelayTimeout),this._blurDelayTimeout=null;delete this._focused;delete this._document;delete this._window;delete this._commandOutputManager};f.prototype.addMonitoredElement=function(a,b){this._debug&&console.log("FocusManager.addMonitoredElement("+(b||"unknown")+")");var c={element:a,where:b,onFocus:function(){this._reportFocus(b)}.bind(this),
onBlur:function(){this._reportBlur(b)}.bind(this)};a.addEventListener("focus",c.onFocus,!0);a.addEventListener("blur",c.onBlur,!0);this._document.activeElement===a&&this._reportFocus(b);this._monitoredElements.push(c)};f.prototype.removeMonitoredElement=function(a,b){this._debug&&console.log("FocusManager.removeMonitoredElement("+(b||"unknown")+")");this._monitoredElements=this._monitoredElements.filter(function(b){return b.element===a?(a.removeEventListener("focus",b.onFocus,!0),a.removeEventListener("blur",
b.onBlur,!0),!1):!0})};f.prototype.updatePosition=function(a){this.onVisibilityChange({tooltipVisible:this.isTooltipVisible,outputVisible:this.isOutputVisible,dimensions:a})};f.prototype._outputted=function(){this._recentOutput=!0;this._helpRequested=!1;this._checkShow()};f.prototype._focused=function(){this._reportBlur("document")};f.prototype._reportFocus=function(a){this._debug&&console.log("FocusManager._reportFocus("+(a||"unknown")+")");if(this._blurDelayTimeout)this._debug&&console.log("FocusManager.cancelBlur"),
this._window.clearTimeout(this._blurDelayTimeout),this._blurDelayTimeout=null;if(!this._hasFocus)this._hasFocus=!0;this._checkShow()};f.prototype._reportBlur=function(a){this._debug&&console.log("FocusManager._reportBlur("+a+")");if(this._hasFocus)this._blurDelayTimeout?this._debug&&console.log("FocusManager.blurPending"):this._blurDelayTimeout=this._window.setTimeout(function(){this._debug&&console.log("FocusManager.blur");this._hasFocus=!1;this._checkShow();this._blurDelayTimeout=null}.bind(this),
this._blurDelay)};f.prototype._eagerHelperChanged=function(){this._checkShow()};f.prototype.onInputChange=function(){this._recentOutput=!1;this._checkShow()};f.prototype.helpRequest=function(){this._debug&&console.log("FocusManager.helpRequest");this._helpRequested=!0;this._recentOutput=!1;this._checkShow()};f.prototype.removeHelp=function(){this._debug&&console.log("FocusManager.removeHelp");this._recentOutput=this._helpRequested=this._isError=this._importantFieldFlag=!1;this._checkShow()};f.prototype.setImportantFieldFlag=
function(a){this._debug&&console.log("FocusManager.setImportantFieldFlag",a);this._importantFieldFlag=a;this._checkShow()};f.prototype.setError=function(a){this._debug&&console.log("FocusManager._isError",a);this._isError=a;this._checkShow()};f.prototype._checkShow=function(){var a=!1,b={tooltipVisible:this.isTooltipVisible,outputVisible:this.isOutputVisible},c=this._shouldShowTooltip();if(this.isTooltipVisible!==c.visible)b.tooltipVisible=this.isTooltipVisible=c.visible,a=!0;c=this._shouldShowOutput();
if(this.isOutputVisible!==c.visible)b.outputVisible=this.isOutputVisible=c.visible,a=!0;a&&(this._debug&&console.log("FocusManager.onVisibilityChange",b),this.onVisibilityChange(b))};f.prototype._shouldShowTooltip=function(){return!this._hasFocus?{visible:!1,reason:"notHasFocus"}:b.value===1?{visible:!1,reason:"eagerHelperNever"}:b.value===3?{visible:!0,reason:"eagerHelperAlways"}:this._isError?{visible:!0,reason:"isError"}:this._helpRequested?{visible:!0,reason:"helpRequested"}:this._importantFieldFlag?
{visible:!0,reason:"importantFieldFlag"}:{visible:!1,reason:"default"}};f.prototype._shouldShowOutput=function(){return!this._hasFocus?{visible:!1,reason:"notHasFocus"}:this._recentOutput?{visible:!0,reason:"recentOutput"}:{visible:!1,reason:"default"}};i.FocusManager=f});
define("gcli/ui/output_terminal","require,exports,module,gcli/util,gcli/canon,gcli/ui/domtemplate,text!gcli/ui/output_view.css,text!gcli/ui/output_terminal.html".split(","),function(g,i,f){function d(d,e){this.element=e.element;this.requisition=e.requisition;this.commandOutputManager=d.commandOutputManager||k.commandOutputManager;this.commandOutputManager.onOutput.add(this.outputted,this);var h=e.element.ownerDocument;if(b!=null)this.style=c.importCss(b,h,"gcli-output-view");this.template=c.toDom(h,
a);this.templateOptions={allowEval:!0,stack:"output_terminal.html"}}function e(a,b){this.outputData=a;this.outputTerminal=b;this.url=c.createUrlLookup(f);this.elems={rowin:null,rowout:null,hide:null,show:null,duration:null,throb:null,prompt:null};var d=this.outputTerminal.template.cloneNode(!0);h.template(d,this,this.outputTerminal.templateOptions);this.outputTerminal.element.appendChild(this.elems.rowin);this.outputTerminal.element.appendChild(this.elems.rowout);this.outputData.onClose.add(this.closed,
this);this.outputData.onChange.add(this.changed,this)}var c=g("gcli/util"),k=g("gcli/canon"),h=g("gcli/ui/domtemplate"),b=g("text!gcli/ui/output_view.css"),a=g("text!gcli/ui/output_terminal.html");d.prototype.destroy=function(){this.style&&(this.style.parentNode.removeChild(this.style),delete this.style);this.commandOutputManager.onOutput.remove(this.outputted,this);delete this.commandOutputManager;delete this.requisition;delete this.element;delete this.template};d.prototype.outputted=function(a){if(!a.output.hidden)a.output.view=
new e(a.output,this)};d.prototype.setHeight=function(a){this.element.style.height=a+"px"};i.OutputTerminal=d;e.prototype.destroy=function(){this.outputData.onChange.remove(this.changed,this);this.outputData.onClose.remove(this.closed,this);this.outputTerminal.element.removeChild(this.elems.rowin);this.outputTerminal.element.removeChild(this.elems.rowout);delete this.outputData;delete this.outputTerminal;delete this.url;delete this.elems};Object.defineProperty(e.prototype,"prompt",{get:function(){return this.outputData.canonical?
"\u00bb":""},enumerable:!0});e.prototype.copyToInput=function(){this.outputTerminal.requisition&&this.outputTerminal.requisition.update(this.outputData.typed)};e.prototype.execute=function(){this.outputTerminal.requisition&&this.outputTerminal.requisition.exec({typed:this.outputData.typed})};e.prototype.hideOutput=function(a){this.elems.rowout.style.display="none";this.elems.hide.classList.add("cmd_hidden");this.elems.show.classList.remove("cmd_hidden");a.stopPropagation()};e.prototype.showOutput=
function(a){this.elems.rowout.style.display="block";this.elems.hide.classList.remove("cmd_hidden");this.elems.show.classList.add("cmd_hidden");a.stopPropagation()};e.prototype.closed=function(){this.destroy()};e.prototype.changed=function(){var a=this.outputData.duration!=null?"completed in "+this.outputData.duration/1E3+" sec ":"",a=this.elems.rowout.ownerDocument.createTextNode(a);this.elems.duration.appendChild(a);this.outputData.completed&&this.elems.prompt.classList.add("gcli-row-complete");
this.outputData.error&&this.elems.prompt.classList.add("gcli-row-error");this.outputData.toDom(this.elems.rowout);this.outputTerminal.element.scrollTop=Math.max(this.outputTerminal.element.scrollHeight,this.outputTerminal.element.clientHeight)-this.outputTerminal.element.clientHeight;this.elems.throb.style.display=this.outputData.completed?"none":"block"};i.OutputView=e});
define("gcli/ui/fields/menu","require,exports,module,gcli/util,gcli/l10n,gcli/argument,gcli/types,gcli/canon,gcli/ui/domtemplate,text!gcli/ui/fields/menu.css,text!gcli/ui/fields/menu.html".split(","),function(g,i){function f(b){b=b||{};this.document=b.document||document;this.type=b.type;if(!this.document)throw Error("No document");this.element=e.createElement(this.document,"div");this.element.classList.add(b.menuClass||"gcli-menu");b&&b.field&&this.element.classList.add(b.menuFieldClass||"gcli-menu-field");
a!=null&&e.importCss(a,this.document,"gcli-menu");this.template=e.toDom(this.document,j);this.templateOptions={blankNullUndefined:!0,stack:"menu.html"};this.items=null;this.onItemClick=e.createEvent("Menu.onItemClick")}function d(a,b,c){return typeof Proxy==="undefined"?a:Proxy.create({get:function(d,e){var j=a[e];if(e!=="name")return j;var h=j.indexOf(b);if(h===-1)return j;var f=j.substr(0,h),j=j.substr(h+b.length),h=c.createElement("span");h.appendChild(c.createTextNode(f));f=c.createElement("span");
f.classList.add("gcli-menu-typed");f.appendChild(c.createTextNode(b));h.appendChild(f);h.appendChild(c.createTextNode(j));return h}})}var e=g("gcli/util"),c=g("gcli/l10n"),k=g("gcli/argument").Argument,h=g("gcli/types").Conversion;g("gcli/canon");var b=g("gcli/ui/domtemplate"),a=g("text!gcli/ui/fields/menu.css"),j=g("text!gcli/ui/fields/menu.html");f.prototype.l10n=c.propertyLookup;f.prototype.destroy=function(){delete this.element;delete this.template;delete this.document};f.prototype.onItemClickInternal=
function(a){a=a.currentTarget.querySelector(".gcli-menu-name").textContent;a=new k(a);a.suffix=" ";a.prefix=" ";this.onItemClick({conversion:this.type.parse(a)})};f.prototype.show=function(a,c){this.items=a.filter(function(a){return a.hidden===void 0||a.hidden!==!0}.bind(this));if(c)this.items=this.items.map(function(a){return d(a,c,this.template.ownerDocument)}.bind(this));if(this.items.length===0)this.element.style.display="none";else{if(this.items.length>=h.maxPredictions)this.items.splice(-1),
this.items.hasMore=!0;var j=this.template.cloneNode(!0);b.template(j,this,this.templateOptions);e.clearElement(this.element);this.element.appendChild(j);this.element.style.display="block"}};f.prototype.setChoiceIndex=function(a){for(var b=this.element.querySelectorAll(".gcli-menu-option"),c=0;c<b.length;c++)b[c].classList.remove("gcli-menu-highlight");a!=null&&(b.length<=a?console.error("Cant highlight "+a+". Only "+b.length+" options"):b.item(a).classList.add("gcli-menu-highlight"))};f.prototype.selectChoice=
function(){var a=this.element.querySelector(".gcli-menu-highlight .gcli-menu-name");if(!a)return!1;a=new k(a.textContent);a.suffix=" ";a.prefix=" ";this.onItemClick({conversion:this.type.parse(a)});return!0};f.prototype.hide=function(){this.element.style.display="none"};f.prototype.setMaxHeight=function(a){this.element.style.maxHeight=a+"px"};i.Menu=f});
define("gcli/ui/fields/javascript","require,exports,module,gcli/util,gcli/argument,gcli/types/javascript,gcli/ui/fields/menu,gcli/ui/fields,gcli/ui/fields".split(","),function(g,i){function f(a,b){h.call(this,a,b);this.onInputChange=this.onInputChange.bind(this);this.arg=new e("","{ "," }");this.element=d.createElement(this.document,"div");this.input=d.createElement(this.document,"input");this.input.type="text";this.input.addEventListener("keyup",this.onInputChange,!1);this.input.classList.add("gcli-field");
this.input.classList.add("gcli-field-javascript");this.element.appendChild(this.input);this.menu=new k({document:this.document,field:!0,type:a});this.element.appendChild(this.menu.element);this.setConversion(this.type.parse(new e("")));this.onFieldChange=d.createEvent("JavascriptField.onFieldChange");this.menu.onItemClick.add(this.itemClicked,this)}var d=g("gcli/util"),e=g("gcli/argument").ScriptArgument,c=g("gcli/types/javascript").JavascriptType,k=g("gcli/ui/fields/menu").Menu,h=g("gcli/ui/fields").Field,
b=g("gcli/ui/fields");i.startup=function(){b.addField(f)};i.shutdown=function(){b.removeField(f)};f.prototype=Object.create(h.prototype);f.claim=function(a){return a instanceof c?h.TOOLTIP_MATCH:h.NO_MATCH};f.prototype.destroy=function(){h.prototype.destroy.call(this);this.input.removeEventListener("keyup",this.onInputChange,!1);this.menu.onItemClick.remove(this.itemClicked,this);this.menu.destroy();delete this.element;delete this.input;delete this.menu;delete this.document;delete this.onInputChange};
f.prototype.setConversion=function(a){this.arg=a.arg;this.input.value=a.arg.text;var b=0;if(this.type instanceof c){var d=a.arg.text.lastIndexOf(".");d!==-1&&(b=d)}var e=[];a.getPredictions().forEach(function(a){a.hidden||e.push({name:a.name.substring(b),complete:a.name,description:a.description||""})},this);this.menu.show(e);this.setMessage(a.message)};f.prototype.itemClicked=function(a){this.onFieldChange(a);this.setMessage(a.conversion.message)};f.prototype.onInputChange=function(a){this.item=
a.currentTarget.item;a=this.getConversion();this.onFieldChange({conversion:a});this.setMessage(a.message)};f.prototype.getConversion=function(){this.arg=new e(this.input.value,"{ "," }");return this.type.parse(this.arg)};f.DEFAULT_VALUE="__JavascriptField.DEFAULT_VALUE"});
define("gcli/ui/fields/selection","require,exports,module,gcli/util,gcli/l10n,gcli/argument,gcli/types,gcli/types,gcli/types/basic,gcli/types/selection,gcli/ui/fields/menu,gcli/ui/fields,gcli/ui/fields".split(","),function(g,i){function f(a,b){j.call(this,a,b);this.items=[];this.element=e.createElement(this.document,"select");this.element.classList.add("gcli-field");this._addOption({name:c.lookupFormat("fieldSelectionSelect",[b.name])});this.type.getLookup().forEach(this._addOption,this);this.onInputChange=
this.onInputChange.bind(this);this.element.addEventListener("change",this.onInputChange,!1);this.onFieldChange=e.createEvent("SelectionField.onFieldChange")}function d(b,c){j.call(this,b,c);this.onInputChange=this.onInputChange.bind(this);this.arg=new k;this.menu=new a({document:this.document,type:b});this.element=this.menu.element;this.onFieldChange=e.createEvent("SelectionTooltipField.onFieldChange");this.menu.onItemClick.add(this.itemClicked,this)}var e=g("gcli/util"),c=g("gcli/l10n"),k=g("gcli/argument").Argument;
g("gcli/types");g("gcli/types");var h=g("gcli/types/basic").BooleanType,b=g("gcli/types/selection").SelectionType,a=g("gcli/ui/fields/menu").Menu,j=g("gcli/ui/fields").Field,l=g("gcli/ui/fields");i.startup=function(){l.addField(f);l.addField(d)};i.shutdown=function(){l.removeField(f);l.removeField(d)};f.prototype=Object.create(j.prototype);f.claim=function(a){return a instanceof h?j.BASIC:a instanceof b?j.DEFAULT:j.NO_MATCH};f.prototype.destroy=function(){j.prototype.destroy.call(this);this.element.removeEventListener("change",
this.onInputChange,!1);delete this.element;delete this.document;delete this.onInputChange};f.prototype.setConversion=function(a){var b;this.items.forEach(function(c){if(c.value&&c.value===a.value)b=c.index},this);this.element.value=b;this.setMessage(a.message)};f.prototype.getConversion=function(){return this.type.parse(new k(this.items[this.element.value].name," "))};f.prototype._addOption=function(a){a.index=this.items.length;this.items.push(a);var b=e.createElement(this.document,"option");b.innerHTML=
a.name;b.value=a.index;this.element.appendChild(b)};d.prototype=Object.create(j.prototype);d.claim=function(a){return a.getType()instanceof b?j.TOOLTIP_MATCH:j.NO_MATCH};d.prototype.destroy=function(){j.prototype.destroy.call(this);this.menu.onItemClick.remove(this.itemClicked,this);this.menu.destroy();delete this.element;delete this.document;delete this.onInputChange};d.prototype.setConversion=function(a){this.arg=a.arg;this.menu.show(a.getPredictions().map(function(a){return a.value.description?
a.value:a},this),a.arg.text);this.setMessage(a.message)};d.prototype.itemClicked=function(a){this.onFieldChange(a);this.setMessage(a.conversion.message)};d.prototype.onInputChange=function(a){this.item=a.currentTarget.item;a=this.getConversion();this.onFieldChange({conversion:a});this.setMessage(a.message)};d.prototype.getConversion=function(){this.arg=this.arg.beget({text:this.input.value});return this.type.parse(this.arg)};d.prototype.setChoiceIndex=function(a){this.menu.setChoiceIndex(a)};d.prototype.selectChoice=
function(){return this.menu.selectChoice()};Object.defineProperty(d.prototype,"isImportant",{get:function(){return this.type.name!=="command"},enumerable:!0});d.DEFAULT_VALUE="__SelectionTooltipField.DEFAULT_VALUE"});
define("gcli/promise",["require","exports","module"],function(g,i){function f(){this._status=f.PENDING;this._value=void 0;this._onSuccessHandlers=[];this._onErrorHandlers=[];this._id=f._nextId++;f._outstanding[this._id]=this}f._nextId=0;f._outstanding=[];f._recent=[];f.ERROR=-1;f.PENDING=0;f.SUCCESS=1;f.prototype.isPromise=!0;f.prototype.isComplete=function(){return this._status!=f.PENDING};f.prototype.isResolved=function(){return this._status==f.SUCCESS};f.prototype.isRejected=function(){return this._status==
f.ERROR};f.prototype.then=function(d,e){typeof d==="function"&&(this._status===f.SUCCESS?d.call(null,this._value):this._status===f.PENDING&&this._onSuccessHandlers.push(d));typeof e==="function"&&(this._status===f.ERROR?e.call(null,this._value):this._status===f.PENDING&&this._onErrorHandlers.push(e));return this};f.prototype.chainPromise=function(d){var e=new f;e._chainedFrom=this;this.then(function(c){try{e.resolve(d(c))}catch(f){e.reject(f)}},function(c){e.reject(c)});return e};f.prototype.resolve=
function(d){return this._complete(this._onSuccessHandlers,f.SUCCESS,d,"resolve")};f.prototype.reject=function(d){return this._complete(this._onErrorHandlers,f.ERROR,d,"reject")};f.prototype._complete=function(d,e,c,g){if(this._status!=f.PENDING)throw f._error("Promise complete. Attempted "+g+"() with ",c),f._error("Prev status = ",this._status,", value = ",this._value),Error("Promise already complete");else if(d.length==0&&e==f.ERROR){f._error("Promise rejection ignored and silently dropped");f._error(c);
var h;if(c.stack){f._error("Printing original stack");for(h=c.stack;h;h=h.caller)f._error(h)}else if(c.fileName&&c.lineNumber)f._error("Error originating at "+c.fileName+", line "+c.lineNumber);else if(typeof Components!=="undefined")try{if(Components.stack){f._error("Original stack not available. Printing current stack");for(h=Components.stack;h;h=h.caller)f._error(h)}}catch(b){}}f._setTimeout(function(){this._status=e;this._value=c;d.forEach(function(a){a.call(null,this._value)},this);delete this._onSuccessHandlers;
delete this._onErrorHandlers;delete f._outstanding[this._id];for(f._recent.push(this);f._recent.length>20;)f._recent.shift()}.bind(this),1);return this};f.prototype.toString=function(){return"[Promise "+this._id+"]"};f.group=function(d){Array.isArray(d)||(d=Array.prototype.slice.call(arguments));if(d.length===0)return(new f).resolve([]);var e=new f,c=[],g=0,h=function(b){return function(a){c[b]=a;g++;e._status!==f.ERROR&&g===d.length&&e.resolve(c)}};d.forEach(function(b,a){var c=h(a),d=e.reject.bind(e);
b.then(c,d)});return e};f._setTimeout=function(d,e){return setTimeout(d,e)};f._error=function(){console.warn(arguments)};i.Promise=f});
define("gcli/cli","require,exports,module,gcli/util,gcli/ui/view,gcli/l10n,gcli/canon,gcli/promise,gcli/types,gcli/types,gcli/types/basic,gcli/types/basic,gcli/types/basic,gcli/types/basic,gcli/argument,gcli/argument,gcli/argument,gcli/argument,gcli/argument,gcli/argument".split(","),function(g,i){function f(a,c){this.param=a;this.conversion=void 0;this.paramIndex=c;this.onAssignmentChange=b.createEvent("Assignment.onAssignmentChange");this.setBlank()}function d(){var a={name:"__command",type:"command"},
c=this;Object.defineProperty(a,"description",{get:function(){var a=c.value;return a&&a.description?a.description:"The command to execute"},enumerable:!0});this.param=new l.Parameter(a);this.paramIndex=-1;this.onAssignmentChange=b.createEvent("CommandAssignment.onAssignmentChange");this.setBlank()}function e(a,c){this.param=new l.Parameter({name:"__unassigned",description:j.lookup("cliOptions"),type:{name:"param",requisition:a,isIncompleteName:c.text.charAt(0)==="-"}});this.paramIndex=-1;this.onAssignmentChange=
b.createEvent("UnassignedAssignment.onAssignmentChange");this.conversion=this.param.type.parse(c);this.conversion.assign(this)}function c(a,c){this.environment=a;this.document=c;if(this.document==null)try{this.document=document}catch(e){}this.commandAssignment=new d;this._assignments={};this.assignmentCount=0;this._args=[];this._unassigned=[];this._structuralChangeInProgress=!1;this.commandAssignment.onAssignmentChange.add(this._commandAssignmentChanged,this);this.commandAssignment.onAssignmentChange.add(this._assignmentChanged,
this);this.commandOutputManager=l.commandOutputManager;this.onAssignmentChange=b.createEvent("Requisition.onAssignmentChange");this.onTextChange=b.createEvent("Requisition.onTextChange")}function k(a){for(var b=0;b<a.length;b++){var c=a.charAt(b);if(c===" "||c==='"'||c==="'"||c==="{"||c==="}"||c==="\\")return!1}return!0}function h(a){a=a||{};this.command=a.command||"";this.args=a.args||{};this.typed=a.typed||"";this.canonical=a.canonical||"";this.hidden=a.hidden===!0?!0:!1;this.data=void 0;this.error=
this.completed=!1;this.start=new Date;this.onClose=b.createEvent("Output.onClose");this.onChange=b.createEvent("Output.onChange")}var b=g("gcli/util"),a=g("gcli/ui/view"),j=g("gcli/l10n"),l=g("gcli/canon"),m=g("gcli/promise").Promise,n=g("gcli/types").Status,p=g("gcli/types").Conversion,o=g("gcli/types/basic").ArrayType,r=g("gcli/types/basic").StringType,q=g("gcli/types/basic").BooleanType,v=g("gcli/types/basic").NumberType,s=g("gcli/argument").Argument,u=g("gcli/argument").ArrayArgument,y=g("gcli/argument").NamedArgument,
t=g("gcli/argument").TrueNamedArgument,w=g("gcli/argument").MergedArgument,D=g("gcli/argument").ScriptArgument,B;i.startup=function(){B=l.addCommand(A)};i.shutdown=function(){l.removeCommand(A.name);B=void 0};Object.defineProperty(f.prototype,"arg",{get:function(){return this.conversion.arg},enumerable:!0});Object.defineProperty(f.prototype,"value",{get:function(){return this.conversion.value},enumerable:!0});f.prototype.getMessage=function(){return this.conversion.message?this.conversion.message:
""};f.prototype.getPredictions=function(){return this.conversion.getPredictions()};f.prototype.getPredictionAt=function(a){a==null&&(a=0);if(!this.isInName()){var b=this.getPredictions();if(b.length!==0)return a%=b.length,a<0&&(a=b.length+a),b[a]}};f.prototype.isInName=function(){return this.conversion.arg.type==="NamedArgument"&&this.conversion.arg.prefix.slice(-1)!==" "};f.prototype.setConversion=function(a){var b=this.conversion;this.conversion=a;this.conversion.assign(this);if(!this.conversion.equals(b))this.onAssignmentChange({assignment:this,
conversion:this.conversion,oldConversion:b})};f.prototype.setBlank=function(){this.setConversion(this.param.type.getBlank())};f.prototype.ensureVisibleArgument=function(){if(this.conversion.arg.type!=="BlankArgument")return!1;this.conversion=this.param.type.parse(this.conversion.arg.beget({text:"",prefixSpace:this.param instanceof d}));this.conversion.assign(this);return!0};f.prototype.getStatus=function(a){return this.param.isDataRequired&&!this.conversion.isDataProvided()?n.INCOMPLETE:!this.param.isDataRequired&&
this.arg.type==="BlankArgument"?n.VALID:this.conversion.getStatus(a)};f.prototype.toString=function(){return this.conversion.toString()};Object.defineProperty(f.prototype,"_summaryJson",{get:function(){return{param:this.param.name+"/"+this.param.type.name,defaultValue:this.param.defaultValue,arg:this.conversion.arg._summaryJson,value:this.value,message:this.getMessage(),status:this.getStatus().toString(),predictionCount:this.getPredictions().length}},enumerable:!0});i.Assignment=f;var x=eval;i.setEvalFunction=
function(a){x=a};i.unsetEvalFunction=function(){x=void 0};var A={name:"{",params:[{name:"javascript",type:"javascript",description:""}],hidden:!0,returnType:"object",description:{key:"cliEvalJavascript"},exec:function(a){return x(a.javascript)},evalRegexp:/^\s*{\s*/};d.prototype=Object.create(f.prototype);d.prototype.getStatus=function(a){return n.combine(f.prototype.getStatus.call(this,a),this.conversion.value&&this.conversion.value.exec?n.VALID:n.INCOMPLETE)};i.CommandAssignment=d;e.prototype=Object.create(f.prototype);
e.prototype.getStatus=function(){return this.conversion.getStatus()};c.prototype.destroy=function(){this.commandAssignment.onAssignmentChange.remove(this._commandAssignmentChanged,this);this.commandAssignment.onAssignmentChange.remove(this._assignmentChanged,this);delete this.document;delete this.environment};c.prototype._assignmentChanged=function(a){if(!(a.oldConversion!=null&&a.conversion.valueEquals(a.oldConversion))&&!this._structuralChangeInProgress&&(this.onAssignmentChange(a),!a.conversion.argEquals(a.oldConversion)))this.onTextChange()};
c.prototype._commandAssignmentChanged=function(a){if(!a.conversion.valueEquals(a.oldConversion)){this._assignments={};if(a=this.commandAssignment.value)for(var b=0;b<a.params.length;b++){var c=a.params[b],d=new f(c,b);d.onAssignmentChange.add(this._assignmentChanged,this);this._assignments[c.name]=d}this.assignmentCount=Object.keys(this._assignments).length}};c.prototype.getAssignment=function(a){return this._assignments[typeof a==="string"?a:Object.keys(this._assignments)[a]]||void 0};c.prototype._getFirstBlankPositionalAssignment=
function(){var a=null;Object.keys(this._assignments).some(function(b){b=this.getAssignment(b);return b.arg.type==="BlankArgument"&&b.param.isPositionalAllowed?(a=b,!0):!1},this);return a};c.prototype.getParameterNames=function(){return Object.keys(this._assignments)};c.prototype.cloneAssignments=function(){return Object.keys(this._assignments).map(function(a){return this._assignments[a]},this)};c.prototype.getStatus=function(){var a=n.VALID;if(this._unassigned.length!==0){var b=!0;this._unassigned.forEach(function(a){a.param.type.isIncompleteName||
(b=!1)});a=b?n.INCOMPLETE:n.ERROR}this.getAssignments(!0).forEach(function(b){b=b.getStatus();b>a&&(a=b)},this);if(a===n.INCOMPLETE)a=n.ERROR;return a};c.prototype.getArgsObject=function(){var a={};this.getAssignments().forEach(function(b){a[b.param.name]=b.conversion.isDataProvided()?b.value:b.param.defaultValue},this);return a};c.prototype.getAssignments=function(a){var b=[];a===!0&&b.push(this.commandAssignment);Object.keys(this._assignments).forEach(function(a){b.push(this.getAssignment(a))},
this);return b};c.prototype.setAssignment=function(a,b){for(var c=a.arg.getArgs(),d=b.getArgs(),e=Math.max(c.length,d.length),j=0;j<e;j++)if(j>=c.length||c[j].type==="BlankArgument")this._args.push(d[j]);else{var h=this._args.indexOf(c[j]);if(h===-1)throw console.error("Couldn't find ",c[j]," in ",this._args),Error("Couldn't find "+c[j]);j>=d.length?this._args.splice(h,1):this._args[h]=d[j]}c=a.param.type.parse(b);a.setConversion(c)};c.prototype.setBlankArguments=function(){this.getAssignments().forEach(function(a){a.setBlank()},
this)};c.prototype.complete=function(a,b){var c=this.getAssignmentAt(a.start);this.onTextChange.holdFire();var d=c.getPredictionAt(b);if(d==null)c.arg.suffix.slice(-1)!==" "&&c.getStatus()===n.VALID&&this._addSpace(c),c.isInName()&&(d=c.conversion.arg.beget({prefixPostSpace:!0}),this.setAssignment(c,d));else{var j=c.arg.beget({text:d.name,dontQuote:c===this.commandAssignment});this.setAssignment(c,j);d.incomplete||(this._addSpace(c),c instanceof e&&this.update(this.toString()))}this.onTextChange();
this.onTextChange.resumeFire()};c.prototype._addSpace=function(a){var b=a.conversion.arg.beget({suffixSpace:!0});b!==a.conversion.arg&&this.setAssignment(a,b)};c.prototype.decrement=function(a){var b=a.param.type.decrement(a.conversion.value);b!=null&&(b=a.param.type.stringify(b),b=a.conversion.arg.beget({text:b}),this.setAssignment(a,b))};c.prototype.increment=function(a){var b=a.param.type.increment(a.conversion.value);b!=null&&(b=a.param.type.stringify(b),b=a.conversion.arg.beget({text:b}),this.setAssignment(a,
b))};c.prototype.toCanonicalString=function(){var a=[],b=this.commandAssignment.value?this.commandAssignment.value.name:this.commandAssignment.arg.text;a.push(b);Object.keys(this._assignments).forEach(function(b){var b=this._assignments[b],c=b.param.type;b.value!==b.param.defaultValue&&(a.push(" "),a.push(c.stringify(b.value)))},this);b==="{"&&this.getAssignment(0).arg.suffix.indexOf("}")===-1&&a.push(" }");return a.join("")};c.prototype.createInputArgTrace=function(){if(!this._args)throw Error("createInputMap requires a command line. See source.");
var a=[],b;this._args.forEach(function(c){for(b=0;b<c.prefix.length;b++)a.push({arg:c,chr:c.prefix[b],part:"prefix"});for(b=0;b<c.text.length;b++)a.push({arg:c,chr:c.text[b],part:"text"});for(b=0;b<c.suffix.length;b++)a.push({arg:c,chr:c.suffix[b],part:"suffix"})});return a};c.prototype.toString=function(){return this._args?this._args.map(function(a){return a.toString()}).join(""):this.toCanonicalString()};c.prototype.typedEndsWithSeparator=function(){if(this._args){var a=this._args.slice(-1)[0];
return a.suffix.slice(-1)===" "?!0:a.text===""&&a.suffix===""&&a.prefix.slice(-1)===" "}return this.toCanonicalString().slice(-1)===" "};c.prototype.getInputStatusMarkup=function(a){for(var b=this.createInputArgTrace(),a=b[a===0?0:a-1],c=[],e=0;e<b.length;e++){var j=b[e],h=j.arg,f=n.VALID;if(j.part==="text"&&(f=h.assignment.getStatus(h),f===n.INCOMPLETE)){var g=a.arg.assignment.arg.type==="NamedArgument",g=a.part==="text"||g&&a.part==="suffix";if((h.assignment!==a.arg.assignment||!g)&&!(h.assignment instanceof
d))f=n.ERROR}c.push({status:f,string:j.chr})}for(e=0;e<c.length-1;)c[e].status===c[e+1].status?(c[e].string+=c[e+1].string,c.splice(e+1,1)):e++;return c};c.prototype.getAssignmentAt=function(a){if(!this._args)throw console.trace(),Error("Missing args");if(a===0)return this.commandAssignment;var b=[],c,d;for(c=0;c<this._args.length;c++){var e=this._args[c],j=e.assignment;for(d=0;d<e.prefix.length;d++)b.push(j);for(d=0;d<e.text.length;d++)b.push(j);if(e.assignment.arg.type!=="NamedArgument")this._args.length>
c+1?j=this._args[c+1].assignment:(d=this._getFirstBlankPositionalAssignment(),d!=null&&(j=d));for(d=0;d<e.suffix.length;d++)b.push(j)}b=b[a-1];if(!b)throw Error("Missing assignment. cursor="+a+" text="+this.toString());return b};c.prototype.exec=function(a){var b,c,d=!1;a&&a.hidden&&(d=!0);if(a)if(typeof a==="string")this.update(a);else if(typeof a.typed==="string")this.update(a.typed);else if(a.command!=null)(b=l.getCommand(a.command))||console.error("Command not found: "+a.command),c=a.args;if(!b)b=
this.commandAssignment.value,c=this.getArgsObject();if(!b)throw Error("Unknown command");a=this.toString();A.evalRegexp.test(a)&&(a=a.replace(A.evalRegexp,""),a=a.replace(/\s*}\s*$/,""));var e=new h({command:b,args:c,typed:a,canonical:this.toCanonicalString(),hidden:d});this.commandOutputManager.onOutput({output:e});try{var j=i.createExecutionContext(this),f=b.exec(c,j);f!=null&&typeof f.then==="function"?(f.then(function(a){e.complete(a)},function(a){e.error=!0;e.complete(a)},function(a){e.progress(a)}),
e.promise=f):e.complete(f)}catch(g){console.error(g),e.error=!0,e.complete(g)}this.update("");return e};c.prototype.update=function(a){this._structuralChangeInProgress=!0;this._args=this._tokenize(a);a=this._args.slice(0);this._split(a);this._assign(a);this._structuralChangeInProgress=!1;this.onTextChange()};Object.defineProperty(c.prototype,"_summaryJson",{get:function(){var a={$args:this._args.map(function(a){return a._summaryJson}),_command:this.commandAssignment._summaryJson,_unassigned:this._unassigned.forEach(function(a){return a._summaryJson})};
Object.keys(this._assignments).forEach(function(b){a[b]=this.getAssignment(b)._summaryJson}.bind(this));return a},enumerable:!0});c.prototype._tokenize=function(a){function b(a){return a.replace(/\uF000/g," ").replace(/\uF001/g,"'").replace(/\uF002/g,'"').replace(/\uF003/g,"{").replace(/\uF004/g,"}")}if(a==null||a.length===0)return[new s("","","")];if(k(a))return[new s(a,"","")];for(var c=1,a=a.replace(/\\\\/g,"\\").replace(/\\b/g,"\u0008").replace(/\\f/g,"\u000c").replace(/\\n/g,"\n").replace(/\\r/g,
"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\u000b").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\ /g,"\uf000").replace(/\\'/g,"\uf001").replace(/\\"/g,"\uf002").replace(/\\{/g,"\uf003").replace(/\\}/g,"\uf004"),d=0,e=0,j="",h=[],f=0;;){var g=a[d];switch(c){case 1:g==="'"?(j=a.substring(e,d+1),c=3,e=d+1):g==='"'?(j=a.substring(e,d+1),c=4,e=d+1):g==="{"?(j=a.substring(e,d+1),c=5,f++,e=d+1):/ /.test(g)||(j=a.substring(e,d),c=2,e=d);break;case 2:g===" "&&(c=b(a.substring(e,d)),h.push(new s(c,
j,"")),c=1,e=d,j="");break;case 3:g==="'"&&(c=b(a.substring(e,d)),h.push(new s(c,j,g)),c=1,e=d+1,j="");break;case 4:g==='"'&&(c=b(a.substring(e,d)),h.push(new s(c,j,g)),c=1,e=d+1,j="");break;case 5:g==="{"?f++:g==="}"&&(f--,f===0&&(c=b(a.substring(e,d)),h.push(new D(c,j,g)),c=1,e=d+1,j=""))}d++;if(d>=a.length){c===1?d!==e&&(a=a.substring(e,d),(d=h[h.length-1])?d.suffix+=a:h.push(new s("",a,""))):c===5?(c=b(a.substring(e,d+1)),h.push(new D(c,j,""))):(c=b(a.substring(e,d+1)),h.push(new s(c,j,"")));
break}}return h};c.prototype._split=function(a){var b;if(a[0].type==="ScriptArgument")b=new p(B,new D),this.commandAssignment.setConversion(b);else{for(var c=1;c<=a.length;){b=this.commandAssignment.param.type.parse(c===1?a[0]:new w(a,0,c));if(!b.value||b.value.exec)break;c++}this.commandAssignment.setConversion(b);for(b=0;b<c;b++)a.shift()}};c.prototype._addUnassignedArgs=function(a){a.forEach(function(a){this._unassigned.push(new e(this,a))}.bind(this))};c.prototype._assign=function(a){this._unassigned=
[];if(this.commandAssignment.value)if(a.length===0)this.setBlankArguments();else{if(this.assignmentCount!==0){if(this.assignmentCount===1){var b=this.getAssignment(0);if(b.param.type instanceof r){var c=a.length===1?a[0]:new w(a),c=b.param.type.parse(c);b.setConversion(c);return}}var d=this.getParameterNames(),j={};this.getAssignments(!1).forEach(function(b){for(var c=0;c<a.length;)if(b.param.isKnownAs(a[c].text)){var e=a.splice(c,1)[0];d=d.filter(function(a){return a!==b.param.name});if(b.param.type instanceof
q)e=new t(e);else{var h=null;c+1<=a.length&&(h=a.splice(c,1)[0]);e=new y(e,h)}b.param.type instanceof o?(h=j[b.param.name],h||(h=new u,j[b.param.name]=h),h.addArgument(e)):(e=b.param.type.parse(e),b.setConversion(e))}else c++},this);d.forEach(function(b){b=this.getAssignment(b);if(b.param.isPositionalAllowed)if(b.param.type instanceof o){var c=j[b.param.name];c||(c=new u,j[b.param.name]=c);c.addArguments(a);a=[]}else a.length===0?b.setBlank():(c=a.splice(0,1)[0],(b.param.type instanceof v?/-[-a-zA-Z_]/.test(c.text):
c.text.charAt(0)==="-")?this._unassigned.push(new e(this,c)):(c=b.param.type.parse(c),b.setConversion(c)));else b.setBlank()},this);Object.keys(j).forEach(function(a){var b=this.getAssignment(a),a=b.param.type.parse(j[a]);b.setConversion(a)},this)}this._addUnassignedArgs(a)}else this._addUnassignedArgs(a)};i.Requisition=c;h.prototype.complete=function(a){this.data=a;this.end=new Date;this.duration=this.end.getTime()-this.start.getTime();this.completed=!0;this.onChange({output:this})};h.prototype.progress=
function(a){this.data=a;this.onChange({output:this})};h.prototype.toDom=function(a){b.clearElement(a);var c=a.ownerDocument,d=this.data;if(d!=null){var e;typeof HTMLElement!=="undefined"&&d instanceof HTMLElement?e=d:d.isView?e=d.toDom(c):(this.command.returnType==="terminal"?Array.isArray(d)?(e=b.createElement(c,"div"),d.forEach(function(){var a=b.createElement(c,"textarea");a.classList.add("gcli-row-subterminal");a.readOnly=!0;e.appendChild(a)})):(e=b.createElement(c,"textarea"),e.classList.add("gcli-row-terminal"),
e.readOnly=!0):e=b.createElement(c,"p"),this.command.returnType==="string"?b.setTextContent(e,d):b.setContents(e,d.toString()));for(var d=e.querySelectorAll("*[href]"),j=0;j<d.length;j++)d[j].setAttribute("target","_blank");a.appendChild(e)}};h.prototype.toString=function(a){var b=this.data;return b==null?"":typeof HTMLElement!=="undefined"&&b instanceof HTMLElement?b.textContent:b.isView?b.toDom(a).textContent:b.toString()};i.Output=h;i.createExecutionContext=function(b){return{exec:b.exec.bind(b),
update:b.update.bind(b),document:b.document,environment:b.environment,createView:a.createView,createPromise:function(){return new m}}}});
define("gcli/ui/intro","require,exports,module,gcli/settings,gcli/l10n,gcli/util,gcli/ui/view,gcli/cli,text!gcli/ui/intro.html".split(","),function(g,i){var f=g("gcli/settings"),d=g("gcli/l10n"),e=g("gcli/util"),c=g("gcli/ui/view"),k=g("gcli/cli").Output,h={name:"hideIntro",type:"boolean",description:d.lookup("hideIntroDesc"),defaultValue:!1},b;i.startup=function(){b=f.addSetting(h)};i.shutdown=function(){f.removeSetting(h);b=void 0};i.maybeShowIntro=function(a,c){if(!b.value){var d=new k;a.onOutput({output:d});
var e=this.createView(c,d);d.complete(e)}};i.createView=function(a,j){return c.createView({html:g("text!gcli/ui/intro.html"),options:{stack:"intro.html"},data:{l10n:d.propertyLookup,onclick:function(b){e.updateCommand(b.currentTarget,a)},ondblclick:function(b){e.executeCommand(b.currentTarget,a)},showHideButton:j!=null,onGotIt:function(){b.value=!0;j.onClose()}}})}});
define("gcli/ui/tooltip","require,exports,module,gcli/util,gcli/cli,gcli/ui/fields,gcli/ui/domtemplate,text!gcli/ui/tooltip.css,text!gcli/ui/tooltip.html".split(","),function(g,i){function f(a,c){this.inputter=c.inputter;this.requisition=c.requisition;this.focusManager=c.focusManager;this.element=c.element;this.element.classList.add(a.tooltipClass||"gcli-tooltip");this.document=this.element.ownerDocument;if(this.panelElement=c.panelElement)this.panelElement.classList.add("gcli-panel-hide"),this.focusManager.onVisibilityChange.add(this.visibilityChanged,
this);this.focusManager.addMonitoredElement(this.element,"tooltip");this.fields=[];if(h!=null)this.style=d.importCss(h,this.document,"gcli-tooltip");this.template=d.toDom(this.document,b);this.templateOptions={blankNullUndefined:!0,stack:"tooltip.html"};this.inputter.onChoiceChange.add(this.choiceChanged,this);this.inputter.onAssignmentChange.add(this.assignmentChanged,this);this.assignment=void 0;this.assignmentChanged({assignment:this.inputter.assignment})}var d=g("gcli/util"),e=g("gcli/cli").CommandAssignment,
c=g("gcli/ui/fields"),k=g("gcli/ui/domtemplate"),h=g("text!gcli/ui/tooltip.css"),b=g("text!gcli/ui/tooltip.html");f.prototype.destroy=function(){this.inputter.onAssignmentChange.remove(this.assignmentChanged,this);this.inputter.onChoiceChange.remove(this.choiceChanged,this);this.panelElement&&this.focusManager.onVisibilityChange.remove(this.visibilityChanged,this);this.focusManager.removeMonitoredElement(this.element,"tooltip");this.style&&(this.style.parentNode.removeChild(this.style),delete this.style);
this.field.onFieldChange.remove(this.fieldChanged,this);this.field.destroy();delete this.errorEle;delete this.descriptionEle;delete this.highlightEle;delete this.document;delete this.element;delete this.panelElement;delete this.template};Object.defineProperty(f.prototype,"isMenuShowing",{get:function(){return this.focusManager.isTooltipVisible&&this.field!=null&&this.field.menu!=null},enumerable:!0});f.prototype.assignmentChanged=function(a){if(this.assignment!==a.assignment)this.assignment&&this.assignment.onAssignmentChange.remove(this.assignmentContentsChanged,
this),this.assignment=a.assignment,this.field&&(this.field.onFieldChange.remove(this.fieldChanged,this),this.field.destroy()),this.field=c.getField(this.assignment.param.type,{document:this.document,name:this.assignment.param.name,requisition:this.requisition,required:this.assignment.param.isDataRequired,named:!this.assignment.param.isPositionalAllowed,tooltip:!0}),this.focusManager.setImportantFieldFlag(this.field.isImportant),this.field.onFieldChange.add(this.fieldChanged,this),this.assignment.onAssignmentChange.add(this.assignmentContentsChanged,
this),this.field.setConversion(this.assignment.conversion),this.highlightEle=this.descriptionEle=this.errorEle=void 0,a=this.template.cloneNode(!0),k.template(a,this,this.templateOptions),d.clearElement(this.element),this.element.appendChild(a),this.element.style.display="block",this.field.setMessageElement(this.errorEle),this._updatePosition()};f.prototype.choiceChanged=function(a){this.field&&this.field.setChoiceIndex&&this.field.setChoiceIndex(this.assignment.conversion.constrainPredictionIndex(a.choice))};
f.prototype.selectChoice=function(){return this.field&&this.field.selectChoice?this.field.selectChoice():!1};f.prototype.fieldChanged=function(a){this.requisition.setAssignment(this.assignment,a.conversion.arg);this.focusManager.setError(a.conversion.message!=null&&a.conversion.message!=="");this.document.defaultView.setTimeout(function(){this.inputter.focus()}.bind(this),10)};f.prototype.assignmentContentsChanged=function(a){a.conversion.arg.text!==a.oldConversion.arg.text&&(this.field.setConversion(a.conversion),
d.setContents(this.descriptionEle,this.description),this._updatePosition())};f.prototype._updatePosition=function(){var a=this.getDimensionsOfAssignment();if(this.panelElement)this.panelElement.style.left=a.start*10+"px";this.focusManager.updatePosition(a)};f.prototype.getDimensionsOfAssignment=function(){for(var a="",b=this.requisition.getAssignments(!0),c=0;c<b.length;c++){if(b[c]===this.assignment)break;a+=b[c].toString()}a+=this.assignment.arg.prefix;b=a.length;a+=this.assignment.arg.text;return{start:b,
end:a.length}};Object.defineProperty(f.prototype,"description",{get:function(){if(this.assignment instanceof e&&this.assignment.value==null)return"";var a=this.assignment.param.manual;if(a){var b=this.document.createElement("span");d.setContents(b,a);this.assignment.param.isDataRequired||(a=this.document.createElement("span"),a.appendChild(this.document.createTextNode(" (Optional)")),b.appendChild(a));return b}return this.assignment.param.description},enumerable:!0});f.prototype.visibilityChanged=
function(a){this.panelElement&&(a.tooltipVisible?this.panelElement.classList.remove("gcli-panel-hide"):this.panelElement.classList.add("gcli-panel-hide"))};i.Tooltip=f});
define("gcli/ui/display","require,exports,module,gcli/util,gcli/settings,gcli/ui/intro,gcli/ui/domtemplate,gcli/ui/tooltip,gcli/ui/output_terminal,gcli/ui/inputter,gcli/ui/completer,gcli/ui/focus,gcli/ui/prompt,gcli/cli,text!gcli/ui/display.css,text!gcli/ui/display.html".split(","),function(g,i){function f(f){var g=f.document||document;this.displayStyle=void 0;if(r!=null)this.displayStyle=c.importCss(r,g,"gcli-css-display");this.requisition=new o(f.enviroment||{},g);this.focusManager=new n(f,{document:g});
this.inputElement=d(g,f.inputElement||null,"gcli-input");this.inputter=new l(f,{requisition:this.requisition,focusManager:this.focusManager,element:this.inputElement});this.completeElement=e(this.inputElement,f.completeElement||null,"gcli-row-complete");this.completer=new m(f,{requisition:this.requisition,inputter:this.inputter,autoResize:this.completeElement.gcliCreated,element:this.completeElement});this.prompt=new p(f,{inputter:this.inputter,element:e(this.inputElement,f.promptElement||null,"gcli-prompt")});
this.element=d(g,f.displayElement||null,"gcli-display");this.element.classList.add("gcli-display");this.template=c.toDom(g,q);this.elements={};b.template(this.template,this.elements,{stack:"display.html"});this.element.appendChild(this.template);this.tooltip=new a(f,{requisition:this.requisition,inputter:this.inputter,focusManager:this.focusManager,element:this.elements.tooltip,panelElement:this.elements.panel});this.inputter.tooltip=this.tooltip;this.outputElement=c.createElement(g,"div");this.outputElement.classList.add("gcli-output");
this.outputList=new j(f,{requisition:this.requisition,element:this.outputElement});this.element.appendChild(this.outputElement);h.maybeShowIntro(this.outputList.commandOutputManager,this.requisition)}function d(a,b,c){if(!b&&(b=a.getElementById(c),!b))throw Error("Missing element, id="+c);return b}function e(a,b){var d=a.ownerDocument;if(!b&&(b=d.getElementById("gcli-row-complete"),!b))b=c.createElement(d,"div"),a.parentNode.insertBefore(b,a.nextSibling),b.gcliCreated=!0;return b}var c=g("gcli/util"),
k=g("gcli/settings"),h=g("gcli/ui/intro"),b=g("gcli/ui/domtemplate"),a=g("gcli/ui/tooltip").Tooltip,j=g("gcli/ui/output_terminal").OutputTerminal,l=g("gcli/ui/inputter").Inputter,m=g("gcli/ui/completer").Completer,n=g("gcli/ui/focus").FocusManager,p=g("gcli/ui/prompt").Prompt,o=g("gcli/cli").Requisition,r=g("text!gcli/ui/display.css"),q=g("text!gcli/ui/display.html");i.createDisplay=function(a){a.settings!=null&&k.setDefaults(a.settings);var a=new f(a),b=a.requisition;return{exec:b.exec.bind(b),update:b.update.bind(b),
destroy:a.destroy.bind(a)}};f.prototype.destroy=function(){delete this.element;delete this.template;this.outputList.destroy();delete this.outputList;delete this.outputElement;this.tooltip.destroy();delete this.tooltip;this.prompt.destroy();delete this.prompt;this.completer.destroy();delete this.completer;delete this.completeElement;this.inputter.destroy();delete this.inputter;delete this.inputElement;this.focusManager.destroy();delete this.focusManager;this.requisition.destroy();delete this.requisition;
this.displayStyle&&this.displayStyle.parentNode.removeChild(this.displayStyle);delete this.displayStyle};i.Display=f});
define("gcli/index","require,exports,module,gcli/legacy,gcli/canon,gcli/canon,gcli/types/basic,gcli/types/command,gcli/types/javascript,gcli/types/node,gcli/types/resource,gcli/types/selection,gcli/types/setting,gcli/settings,gcli/cli,gcli/ui/intro,gcli/ui/focus,gcli/ui/fields/basic,gcli/ui/fields/javascript,gcli/ui/fields/selection,gcli/ui/display".split(","),function(g,i){g("gcli/legacy");i.addCommand=g("gcli/canon").addCommand;i.removeCommand=g("gcli/canon").removeCommand;g("gcli/types/basic").startup();
g("gcli/types/command").startup();g("gcli/types/javascript").startup();g("gcli/types/node").startup();g("gcli/types/resource").startup();g("gcli/types/selection").startup();g("gcli/types/setting").startup();g("gcli/settings").startup();g("gcli/cli").startup();g("gcli/ui/intro").startup();g("gcli/ui/focus").startup();g("gcli/ui/fields/basic").startup();g("gcli/ui/fields/javascript").startup();g("gcli/ui/fields/selection").startup();var f=g("gcli/ui/display");i.createDisplay=function(d){return f.createDisplay(d||
{})};i.createView=i.createDisplay});define("text!gcli/commands/help_man.html",[],function(){return'\n<div>\n  <h3>${command.name}</h3>\n\n  <h4 class="gcli-help-header">\n    ${l10n.helpManSynopsis}:\n    <span class="gcli-out-shortcut" onclick="${onclick}" data-command="${command.name}">\n      ${command.name}\n      <span foreach="param in ${command.params}">\n        ${param.defaultValue !== undefined ? \'[\' + param.name + \']\' : param.name}\n      </span>\n    </span>\n  </h4>\n\n  <h4 class="gcli-help-header">${l10n.helpManDescription}:</h4>\n\n  <p class="gcli-help-description">${describe(command, __element)}</p>\n\n  <div if="${command.exec}">\n    <h4 class="gcli-help-header">${l10n.helpManParameters}:</h4>\n\n    <ul class="gcli-help-parameter">\n      <li if="${command.params.length === 0}">${l10n.helpManNone}</li>\n      <li foreach="param in ${command.params}">\n        ${param.name} <em>${getTypeDescription(param)}</em>\n        <br/>\n        ${describe(param, __element)}\n      </li>\n    </ul>\n  </div>\n\n  <div if="${!command.exec}">\n    <h4 class="gcli-help-header">${l10n.subCommands}:</h4>\n\n    <ul class="gcli-help-${subcommands}">\n      <li if="${subcommands.length === 0}">${l10n.subcommandsNone}</li>\n      <li foreach="subcommand in ${subcommands}">\n        <strong>${subcommand.name}</strong>:\n        ${subcommand.description}\n        <span class="gcli-out-shortcut" data-command="help ${subcommand.name}"\n            onclick="${onclick}" ondblclick="${ondblclick}">\n          help ${subcommand.name}\n        </span>\n      </li>\n    </ul>\n  </div>\n\n</div>'});
define("text!gcli/commands/help_list.html",[],function(){return'\n<div>\n  <div if="${includeIntro}">\n    <h2>Welcome to GCLI</h2>\n    <p>GCLI is an experiment to create a highly usable JavaScript command line for developers.</p>\n    <p>\n      Useful links:\n      <a href=\'https://github.com/joewalker/gcli\'>Source</a> (Apache-2.0),\n      <a href=\'https://github.com/joewalker/gcli/blob/master/docs/index.md\'>Documentation</a> (for users/embedders),\n      <a href=\'https://wiki.mozilla.org/DevTools/Features/GCLI\'>Mozilla feature page</a> (for GCLI in the web console).\n    </p>\n  </div>\n\n  <h3>${heading}</h3>\n\n  <table>\n    <tr foreach="command in ${matchingCommands}">\n      <th class="gcli-help-name">${command.name}</th>\n      <td class="gcli-help-arrow">-</td>\n      <td>\n        ${command.description}\n        <span class="gcli-out-shortcut"\n            onclick="${onclick}" ondblclick="${ondblclick}"\n            data-command="help ${command.name}">help ${command.name}</span>\n      </td>\n    </tr>\n  </table>\n</div>'});
define("text!gcli/commands/help.css",[],function(){return"\n.gcli-help-name {\n  text-align: end;\n}\n\n.gcli-help-arrow {\n  color: #AAA;\n}\n\n.gcli-help-description {\n  margin: 0 20px;\n  padding: 0;\n}\n\n.gcli-help-parameter {\n  margin: 0 30px;\n  padding: 0;\n}\n\n.gcli-help-header {\n  margin: 10px 0 6px;\n}"});
define("gcli/commands/help","require,exports,module,gcli/canon,gcli/l10n,gcli/util,gcli/ui/view,text!gcli/commands/help_man.html,text!gcli/commands/help_list.html,text!gcli/commands/help.css".split(","),function(g,i){function f(a,b){var d=e.getCommands().filter(function(b){return b.hidden?!1:a.search&&b.name.indexOf(a.search)!==0?!1:!a.search&&b.name.indexOf(" ")!=-1?!1:!0});d.sort(function(a,b){return a.name.localeCompare(b.name)});var h;h=d.length===0?c.lookupFormat("helpListNone",[a.search]):a.search==
null?c.lookup("helpListAll"):c.lookupFormat("helpListPrefix",[a.search]);return{l10n:c.propertyLookup,includeIntro:a.search==null,matchingCommands:d,heading:h,onclick:function(a){k.updateCommand(a.currentTarget,b)},ondblclick:function(a){k.executeCommand(a.currentTarget,b)}}}function d(a,b){var d={l10n:c.propertyLookup,command:a,onclick:function(a){k.updateCommand(a.currentTarget,b)},ondblclick:function(a){k.executeCommand(a.currentTarget,b)},describe:function(a,b){var c=a.manual||a.description,d=
b.ownerDocument.createElement("div");k.setTextContent(d,c);return d.childNodes},getTypeDescription:function(a){var b="",b=a.defaultValue===void 0?c.lookup("helpManRequired"):a.defaultValue===null?c.lookup("helpManOptional"):a.defaultValue;return"("+a.type.name+", "+b+")"}};Object.defineProperty(d,"subcommands",{get:function(){var b=e.getCommands().filter(function(b){return b.name.indexOf(a.name)===0&&b.name!==a.name});b.sort(function(a,b){return a.name.localeCompare(b.name)});return b},enumerable:!0});
return d}var e=g("gcli/canon"),c=g("gcli/l10n"),k=g("gcli/util"),h=g("gcli/ui/view");i.helpManHtml=g("text!gcli/commands/help_man.html");i.helpListHtml=g("text!gcli/commands/help_list.html");i.helpCss=g("text!gcli/commands/help.css");var b={name:"help",description:c.lookup("helpDesc"),manual:c.lookup("helpManual"),params:[{name:"search",type:"string",description:c.lookup("helpSearchDesc"),manual:c.lookup("helpSearchManual2"),defaultValue:null}],returnType:"html",exec:function(a,b){var c=e.getCommand(a.search||
void 0);return c?h.createView({html:i.helpManHtml,options:{allowEval:!0,stack:"help_man.html"},data:d(c,b),css:i.helpCss,cssId:"gcli-help"}):h.createView({html:i.helpListHtml,options:{allowEval:!0,stack:"help_list.html"},data:f(a,b),css:i.helpCss,cssId:"gcli-help"})}};i.startup=function(){e.addCommand(b)};i.shutdown=function(){e.removeCommand(b)}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,i){function f(d){this._init(d)}f.prototype={_init:function(d){var e=d.parent,c=this,e=i.node(e);if(!e)throw g["no parent"];if(!d.model)throw g["no tree model"];if(!d.renderer)throw g["no renderer"];this._parent=e;this._treeModel=d.model;this._renderer=d.renderer;this._showRoot=d.showRoot===void 0?!1:d.showRoot;this._indent=d.indent===void 0?16:d.indent;this._onCollapse=d.onCollapse;this._labelColumnIndex=
d.labelColumnIndex===void 0?0:d.labelColumnIndex;this._id=d.id===void 0?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(d){c._showRoot?(d._depth=0,c._generate([d],0)):c._treeModel.getChildren(d,function(d){c._generate(d,0)})})},_generate:function(d,e){i.empty(this._parent);var c=document.createElement(this._tableElement);
c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(d,e);c.appendChild(this._bodyElement);this._parent.appendChild(c);this._rowsChanged()},_generateChildren:function(d,e,c){for(var f=0;f<d.length;f++){var h=document.createElement(this._tableRowElement);h.id=this._treeModel.getId(d[f]);h._depth=e;h._item=d[f];this._renderer.render(d[f],
h);h.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*e+"px";c?(this._bodyElement.insertBefore(h,c.nextSibling),c&&(c=h)):this._bodyElement.appendChild(h)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,e,c){var f=this._treeModel.getId(d),h;if(f===this._id)this._removeChildRows(f),this._generateChildren(e,0),this._rowsChanged();else{var b=i.node(f);b?(b._item=d,b&&(c||
b._expanded)?(b._expanded=!0,this._removeChildRows(f),this._renderer.updateExpandVisuals(b,!0),e?(this._generateChildren(e,b._depth+1,b),this._rowsChanged()):(h=this,e=this._treeModel.getChildren(b._item,function(a){h._generateChildren(a,b._depth+1,b);h._rowsChanged()}))):this._renderer.updateExpandVisuals(b,!1)):console.log(g["could not find table row "]+f)}},getItem:function(d){var e=i.node(d);return e&&e._item?e._item:d},toggle:function(d){var e=i.node(d);e&&(e._expanded?(this.collapse(d),this._renderer.updateExpandVisuals(e,
!1)):(this.expand(d),this._renderer.updateExpandVisuals(e,!0)))},isExpanded:function(d){return(d=i.node(d))?d._expanded:!1},expand:function(d,e,c){var d=typeof d==="string"?d:this._treeModel.getId(d),f=i.node(d);if(f&&!f._expanded){f._expanded=!0;var h=this;this._renderer.updateExpandVisuals(f,!0);this._treeModel.getChildren(f._item,function(b){h._generateChildren(b,f._depth+1,f);h._rowsChanged();e&&e.apply(h,c)})}},_removeChildRows:function(d){for(var e=d===this._id,c=!1,f=-1,h=[],b=i.$$array(".treeTableRow",
this._parent),a=0;a<b.length;a++){var j=b[a];if(c)break;if(e)j._depth>f?h.push(j):c=!0;else if(j.id===d)e=!0,f=j._depth}for(d=0;d<h.length;d++)e=h[d],e.parentNode.removeChild(e)},collapse:function(d){var d=typeof d==="string"?d:this._treeModel.getId(d),e=i.node(d);if(e){if(!e._expanded)return;e._expanded=!1;this._renderer.updateExpandVisuals(e,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(e._item)}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/contentTypes",[],function(){function g(c,d){function e(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 b=c&&c.split(".").pop(),a=null,j=0;j<d.length;j++){var f=d[j];e(a,f,c,b)===f&&(a=f)}return a}function i(c){this.serviceRegistry=c;this.map=function(c){function h(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var c=c.getServiceReferences(d).concat(c.getServiceReferences(e)),
b={},a=0;a<c.length;a++)for(var j=h(c[a].getProperty("contentTypes")),f=0;f<j.length;f++){var g=j[f];b[g.id]||(b[g.id]={id:g.id,name:g.name,image:g.image,"extends":g["extends"],extension:h(g.extension),filename:h(g.filename)})}return b}(c);c.registerService(f,this)}var f="orion.core.contenttypes",d="orion.core.contenttype",e="orion.file.contenttype";i.prototype={getContentTypes:function(){var c=this.getContentTypesMap(),d=[],e;for(e in c)c.hasOwnProperty(e)&&d.push(c[e]);return d},getContentTypesMap:function(){return this.map},
getFileContentType:function(c){return g(c.Name,this.getContentTypes())},getFilenameContentType:function(c){return g(c,this.getContentTypes())},getContentType:function(c){return this.map[c]||null},isExtensionOf:function(c,d){c=typeof c==="string"?this.getContentType(c):c;d=typeof d==="string"?this.getContentType(d):d;if(!c||!d)return!1;if(c.id===d.id)return!0;else for(var e=c,b={};e&&(e=this.getContentType(e["extends"]));){if(e.id===d.id)return!0;if(b[e.id])throw Error("Cycle: "+e.id);b[e.id]=!0}return!1},
isSomeExtensionOf:function(c,d){for(var e=0;e<d.length;e++)if(this.isExtensionOf(c,d[e]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:g}});
define("orion/PageUtil",[],function(){var g=/^http[s]?/i;return{matchResourceParameters:function(g){var g=g||window.location.toString(),f={resource:""},d=g.indexOf("#");if(d!==-1&&(g=g.substring(d+1),g.length!==0)){g=g.split(",");Object.defineProperty(f,"resourceRaw",{value:g[0]});f.resource=decodeURIComponent(g[0]);for(d=1;d<g.length;d++){var e=/([^=]*)(=?)(.*)/.exec(g[d]),c=decodeURIComponent(e[1]||""),e=decodeURIComponent(e[3]||"");c!==""&&c!=="resource"&&(f[c]=e)}}return f},validateURLScheme:function(i,
f){var d=i;if(i.indexOf("://")===-1){var e=document.createElement("a");e.href=i;d=e.href}e=!1;return(e=f?f.some(function(c){return RegExp("^"+c+":","i").test(d)}):g.test(d))?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(g,i,f,d,e,c,k,h){function b(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 a(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function j(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 l(a){this._init(a)}function m(a,b,c,d,j,f,h){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=j!==void 0&&j!==null?j:!1;this.domScope=e.node(f);this.scopeName=h||(f?f.id:null)}function n(a,b){this.token=a;this.parameterName=b}function p(a,b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function o(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 r=window.navigator.platform.indexOf("Mac")!==
-1;b.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(a){var c=new b(this.commandService,this.handler,this.items,this.userData,this.command);c.domNode=this.domNode;c.domParent=this.domParent;if(a)c.parameters=a.makeCopy();else if(this.parameters)c.parameters=this.parameters.makeCopy();return c}};b.prototype.constructor=b;a.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(r){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 j=this;window.setTimeout(function(){j._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,j=d.invocation;if(j&&j.parameters&&e.callback){j.parameters.setValue(c.parameterName,c.parameterValue);var f=this;window.setTimeout(function(){f._invoke(j)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(a,c,d,e){c?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(c):1)&&a.callback&&this._invoke(new b(this,d,c,null,a),e):(c=this._urlBindings[a])&&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 c=!1;a.parameters.updateParameters(a);c=this._parameterCollector.collectParameters(a);
if(!c){var d=new k.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),c=d.contentContainer();c.classList.add("parameterPopup");var e=window.document.activeElement,j=this._parameterCollector.getFillFunction(a,function(){e&&e.focus();d.destroy()})(c);d.show();window.setTimeout(function(){j.focus();j.select()},0);c=!0}c||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,j;for(j in this._activeBindings)if((d=this._activeBindings[j])&&d.keyBinding&&d.command)d.keyBinding.scopeName?(b[d.keyBinding.scopeName]||(b[d.keyBinding.scopeName]=[]),b[d.keyBinding.scopeName].push(d)):(c=f.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 h in b)if(b[h].length&&b[h].length>0){c=document.createElement("h2");a.appendChild(c);c.appendChild(document.createTextNode(h));for(j=0;j<b[h].length;j++)d=b[h][j],c=f.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,j){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=j}else a[b]={title:d,position:c,emptyGroupMessage:j,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,j,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};j&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:j,bindingOnly:e});f&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:f,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=e.$$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,j,f,h){if(typeof a!=="string")throw"a scope id for rendering must be specified";
b=e.node(b);if(!b)throw"no parent";var g=this._contributionsByScopeId[a];if(!c&&g){var c=g.localSelectionService||this._defaultSelectionService,l=this;c&&c.getSelections(function(c){l.renderCommands(a,b,c,d,j,f)})}else g&&(this._render(this._contributionsByScopeId[a],b,c,d,j||"button",f,h),this._checkForTrailingSeparator(b,j,!0))},destroy:function(a){a=e.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();
this.destroy(b);a.removeChild(b)}},_render:function(a,c,d,e,j,f,g){var l=a.sortedContributions;if(!l){var l=[],m=!1,i;for(i in a)if(!a.hasOwnProperty||a.hasOwnProperty(i)){var n=a[i];if(n&&typeof n.position==="number")n.id=i,l.push(n),m=!0}if(m)l.sort(function(a,b){return a.position-b.position}),a.sortedContributions=l}for(a=0;a<l.length;a++){var o;if(l[a].children&&Object.getOwnPropertyNames(l[a].children).length>0){var n=l[a],m=l[a].children,r=this,p;if(j==="tool"||j==="button")if(n.title){p=this._createDropdownMenu(c,
n.title);g&&h.generateNavGrid(g,p.menuButton);var R=m,O=n;window.setTimeout(function(){r._render(R,p.menu,d,e,"menu",f,g);r._checkForTrailingSeparator(p.menu,"menu",!0);if(p.menu.childNodes.length===0)if(O.emptyGroupMessage){if(!p.menuButton.emptyGroupTooltip)p.menuButton.emptyGroupTooltip=new k.Tooltip({node:p.menuButton,text:O.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else g&&h.removeNavGrid(g,p.menuButton),p.menu.parentNode&&p.menu.parentNode.removeChild(p.menu),
p.destroyButton&&p.destroyButton.parentNode&&p.destroyButton.parentNode.removeChild(p.destroyButton);else p.menuButton.style.visibility="visible"},0)}else{var K;c.childNodes.length>0&&!this._checkForTrailingSeparator(c,j)&&(K=this.generateSeparatorImage(c));r._render(m,c,d,e,j,f,g);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==K&&(K=this.generateSeparatorImage(c))}else n.title?(i=document.createElement("li"),c.appendChild(i),n=this._createDropdownMenu(i,n.title,!0),r._render(m,n.menu,
d,e,"menu",f,g),n.menu.childNodes.length===0&&c.removeChild(i)):(c.childNodes.length>0&&this._generateMenuSeparator(c),r._render(m,c,d,e,j,f,g),this._generateMenuSeparator(c))}else{i=(m=this._commandList[l[a].id])?!0:!1;var z=null,z=null;if(m){o=new b(this,e,d,f,m);o.domParent=c;n=i&&(m.visibleWhen?m.visibleWhen(d):!0);if(this._activeBindings[m.id]&&this._activeBindings[m.id].keyBinding)z=this._activeBindings[m.id],z.invocation=n?o:null,z.bindingOnly&&(i=!1);if(this._urlBindings[m.id]&&this._urlBindings[m.id].urlBinding)z=
this._urlBindings[m.id],z.invocation=n?o:null,z.bindingOnly&&(i=!1);i=i&&n}if(i)if(m.choiceCallback){j==="tool"||j==="button"?(i=c,n=!1,c.nodeName.toLowerCase()==="ul"&&(i=document.createElement("li"),c.appendChild(i))):(i=c,n=!0);var S=this;this._createDropdownMenu(i,m.name,n,function(a){this.populateChoicesMenu(a,d,e,f,S)}.bind(m))}else j==="tool"?(i="tool"+m.id+a,m._addTool(c,i,o,g)):j==="button"?(i="button"+m.id+a,m._addButton(c,i,o,g)):j==="menu"&&m._addMenuItem(c,o,g)}}},_createDropdownMenu:function(a,
b,d,j){var a=e.node(a),f,h=document.createElement("span");h.classList.add("dropdownTrigger");d?(h.classList.add("dropdownMenuItem"),f="dropdownSubMenu",d="dropdownArrowRight",h.tabIndex=0,h.role="menuitem"):(h.classList.add("commandButton"),d="dropdownArrowDown",h.tabIndex=0,h.role="button");b=document.createTextNode(b);h.appendChild(b);b=document.createElement("span");b.classList.add(d);h.appendChild(b);d=a;a.nodeName.toLowerCase()==="ul"?(d=document.createElement("li"),a.appendChild(d),a=d):(h.classList.add("commandMargins"),
a=h);d.appendChild(h);f&&d.classList.add(f);f=document.createElement("ul");d.appendChild(f);f.classList.add("dropdownMenu");h.dropdown=new c.Dropdown({dropdown:f,populate:j});f.dropdown=h.dropdown;return{menuButton:h,menu:f,dropdown:h.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 j=document.createElement("input");j.type="checkbox";j.role="menuitem";
j.checked=c;j.classList.add("checkedMenuItem");a.appendChild(j);b=document.createTextNode(b);a.appendChild(b);e.appendChild(a);j.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}};a.prototype.constructor=a;l.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,b,c,d){c.handler=c.handler||this;var e;if(this.hrefCallback){if(e=this._makeLink(a,c,"commandLink"),!e)return}else e=document.createElement("span"),e.tabIndex=d?-1:0,e.role="button",this.hasImage()?(j(this,e,b),this.name&&e.setAttribute("aria-label",this.name)):(b=window.document.createTextNode(this.name),e.appendChild(b),e.classList.add("commandMissingImageButton"),e.classList.add("commandButton")),this._hookCallback(e,
c);c.domNode=e;c.domParent=a;if(this.tooltip)e.commandTooltip=new k.Tooltip({node:e,text:this.tooltip,position:["above","below","right","left"]});a.nodeName.toLowerCase()==="ul"?(b=document.createElement("li"),a.appendChild(b),a=b):e.classList.add("commandMargins");a.appendChild(e);h.generateNavGrid(d,c.domNode)},_addButton:function(a,b,c,d){c.handler=c.handler||this;var e;if(this.hrefCallback)e=this._makeLink(a,c,"commandLink");else if(!this.name&&this.hasImage()){if(e=document.createElement("span"),
e.tabIndex=0,e.role="button",j(this,e,b),this.tooltip&&e.setAttribute("aria-label",this.tooltip),this._hookCallback(e,c),this.tooltip)e.commandTooltip=new k.Tooltip({node:e,text:this.tooltip,position:["above","below","right","left"]})}else e=this._makeButton(a,c,"commandButton"),this._hookCallback(e,c);c.domParent=a;a.nodeName.toLowerCase()==="ul"?(b=document.createElement("li"),a.appendChild(b),a=b):e.classList.add("commandMargins");a.appendChild(e);h.generateNavGrid(d,c.domNode)},_addMenuItem:function(a,
b,c){b.domParent=a;var d,e=a.dropdown;this.hrefCallback?d=this._makeLink(a,b,"dropdownMenuItem",["right","left","above","below"]):(d=this._makeButton(a,b,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(d,b,function(){e.close(!0)}));d.role="menuitem";h.generateNavGrid(c,b.domNode);a.nodeName.toLowerCase()==="ul"?(b=document.createElement("li"),a.appendChild(b),a=b):d.classList.add("commandMargins");a.appendChild(d)},_makeButton:function(a,b,c,d){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var e=document.createTextNode(this.name);a.appendChild(e);c&&a.classList.add(c);if(this.tooltip)a.commandTooltip=new k.Tooltip({node:a,text:this.tooltip,position:d||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,c,d){var e=document.createElement("a");e.id=this.name;c&&e.classList.add(c);e.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){e.href=
a}):e.href=a?a:"#";if(this.tooltip)e.commandTooltip=new k.Tooltip({node:e,text:this.tooltip,position:d||["above","below","right","left"]});return b.domNode=e},_hookCallback:function(a,b,c,d){a.addEventListener("click",function(a){c&&c();b.commandService._invoke(b);d&&d();e.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER||a.keyCode===e.KEY.SPACE)c&&c(),b.commandService._invoke(b),d&&d(),e.stop(a)},!1)},populateChoicesMenu:function(a,b,c,d,j){c=this.getChoices(b,c,d);
for(d=0;d<c.length;d++){var f=c[d];if(f.name){var h=document.createElement("li");a.appendChild(h);var g=document.createElement("span");g.tabIndex=0;g.role="menuitem";g.classList.add("dropdownMenuItem");var l=document.createTextNode(f.name);g.appendChild(l);h.appendChild(g);g.choice=f;g.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);g.addEventListener("keydown",function(a){(a.keyCode===e.KEY.ENTER||a.keyCode===e.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,b)},!1)}else j._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")}};l.prototype.constructor=l;m.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(r?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(r&&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}};m.prototype.constructor=m;n.prototype={match:function(a){a=d.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};n.prototype.constructor=n;p.prototype={optionsRequested:function(){return this.optionsRequested}};p.prototype.constructor=p;o.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 p(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new o(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};o.prototype.constructor=o;return{CommandService:a,CommandKeyBinding:m,Command:l,CommandInvocation:b,URLBinding:n,ParametersDescription:o,CommandParameter:p}});
define("orion/URITemplate",[],function(){function g(b){this._text=b}function i(b,a){if(a==="U")return encodeURIComponent(b).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(a==="U+R")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]");if(a==="U+R-,")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+a);}function f(b,a,c){for(var d=[],e=0;e<b.length;e++)typeof b[e]!=="undefined"&&
d.push(i(b[e],a));return d.join(c)}function d(b,a,c,d){for(var e=Object.keys(b),f=[],h=0;h<e.length;h++)typeof b[e[h]]!=="undefined"&&f.push(i(e[h],a)+c+i(b[e[h]],a));return f.join(d)}function e(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=k[b[0]])?b=b.substring(1):this._operator=k.NUL;for(var a=[],c=b.split(","),d=0;d<c.length;d++){var e=c[d].match(h);if(e===null)throw Error("Bad VarSpec: "+b);a.push({name:e[1],explode:!!e[2],prefix:e[3]?parseInt(e[3],
10):-1})}this._varSpecList=a}function c(b){for(var a=[],c=0,d=b.indexOf("{",c);d!==-1;){a.push(new g(b.substring(c,d)));c=b.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+b);a.push(new e(b.substring(d+1,c)));c+=1;d=b.indexOf("{",c)}a.push(new g(b.substring(c)));this._templateComponents=a}var k={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-,"}},h=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;g.prototype={expand:function(){return encodeURI(this._text)}};e.prototype={expand:function(b){for(var a=[],c=
0;c<this._varSpecList.length;c++){var e=this._varSpecList[c],h=e.name,g=b[h],k=typeof g;if(k!=="undefined"&&g!==null){var o=a.length===0?this._operator.first:this._operator.sep;if(k==="string")this._operator.named&&(o+=i(h,"U+R"),o+=g.length===0?this._operator.ifemp:"="),e.prefix!==-1&&e.prefix<g.length&&(g=g.substring(0,e.prefix)),o+=i(g,this._operator.allow);else if(Array.isArray(g))e.explode?o+=f(g,this._operator.allow,this._operator.sep):(this._operator.named&&(o+=i(h,"U+R"),o+=g.length===0?this._operator.ifemp:
"="),o+=f(g,this._operator.allow,","));else if(k==="object")e.explode?o+=d(g,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(o+=i(h,"U+R"),o+=Object.keys(g).length===0?this._operator.ifemp:"="),o+=d(g,this._operator.allow,",",","));else throw Error("bad param type: "+h+" : "+k);a.push(o)}}return a.join("")}};c.prototype={expand:function(b){for(var a=[],c=0;c<this._templateComponents.length;c++)a.push(this._templateComponents[c].expand(b));return a.join("")}};return c});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(g,i,f,d,e,c){function k(b,a,c){var d="";c&&(d="^");if(d=f.parse("/"+d+b.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!a.caseSensitive&&(d+="i"),b.regExp={pattern:c,flags:d},b.wildCard=!0}var h=h||{};h.searchUtils=h.searchUtils||{};h.searchUtils.ALL_FILE_TYPE="*.*";h.searchUtils.doSearch=function(b,a,c,d){if(b){var e=!0;c==="*"&&(c="");c===
""&&(e=d&&d.type!==h.searchUtils.ALL_FILE_TYPE);if(e){c!==""&&h.searchUtils.addRecentSearch(a,c,d?d.regEx:!1);var b=b.createSearchParams(c,!1,!1,d),f=h.searchUtils.generateSearchHref(b);h.searchUtils.getOpenSearchPref(a,function(a){a?window.open(f):window.location=f})}}else window.alert(g["Can't search: no search service is available"])};h.searchUtils.generateSearchHelper=function(b,a){var c=b.keyword,d=c,e={};b.fileType&&b.fileType!==h.searchUtils.ALL_FILE_TYPE&&c===""&&(d="*."+b.fileType);if(b.regEx)e.searchStr=
c,k(e,b,a);else{var f=c.indexOf("*")>-1,g=c.indexOf("?")>-1;f&&(c=c.split("*").join(".*"));g&&(c=c.split("?").join("."));!f&&!g&&!b.nameSearch?(e.searchStr=b.caseSensitive?c.split("\\").join(""):c.split("\\").join("").toLowerCase(),e.wildCard=!1):(e.searchStr=b.caseSensitive?c:c.toLowerCase(),k(e,b,a),e.wildCard=!0)}e.searchStrLength=e.searchStr.length;return{params:b,inFileQuery:e,displayedSearchTerm:d}};h.searchUtils.convertSearchParams=function(b){if(b.rows!==void 0)b.rows=parseInt(b.rows);if(b.start!==
void 0)b.start=parseInt(b.start);if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive==="string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";if(typeof b.nameSearch==="string")b.nameSearch=b.nameSearch.toLowerCase()==="true"};h.searchUtils.copySearchParams=function(b,a){var c={},d;for(d in b)if(b[d]!==void 0&&b[d]!==null&&(a||d!=="replace"))c[d]=b[d];return c};h.searchUtils.generateSearchHref=function(b){var a=i.toUrl("search/search.html"),b=h.searchUtils.copySearchParams(b,
!0),d=b.resource;b.resource=void 0;return(new c(a+"#{,resource,params*}")).expand({resource:d,params:b})};h.searchUtils.generateFindURLBinding=function(b,a,d,e){b={find:a.searchStr,regEx:a.wildCard?!0:void 0,caseSensitive:b.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof d==="number"?d:void 0};return","+(new c("{,params*}")).expand({params:b})};h.searchUtils.convertFindURLBinding=function(b){if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive===
"string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";if(typeof b.atLine==="string")b.atLine=parseInt(b.atLine)};h.searchUtils.replaceRegEx=function(b,a,c){return b.replace(RegExp(a.pattern,a.flags),c)};h.searchUtils.replaceStringLiteral=function(b,a,c){a=f.parse("/"+a+"/gim");return h.searchUtils.replaceRegEx(b,a,c)};h.searchUtils.searchOnelineLiteral=function(b,a,c){var d;d=0;for(var e=!1,f=[];;)if(d=a.indexOf(b.searchStr,d),d<0)break;else{f.push({startIndex:d,length:b.searchStrLength});
e=!0;if(c)break;d+=b.searchStrLength}return e?f:null};h.searchUtils.findRegExp=function(b,a,c,d){if(!a)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(a,c).exec(b.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};h.searchUtils.searchOnelineRegEx=function(b,a,c){for(var d=0,e=!1,f=[];;)if(d=h.searchUtils.findRegExp(a,b.regExp.pattern,b.regExp.flags,d)){f.push(d);e=!0;if(c)break;d=d.startIndex+d.length}else break;return e?f:null};
h.searchUtils.generateNewContents=function(b,a,c,d,e,f){if(d&&a){if(!b)c.contents=[];for(var g=0;g<a.length;g++){for(var i=a[g],k=!1,q=!1,v=[],s,u=0,y=0;y<d.children.length;y++)if(d.children[y].lineNumber-1===g){u=y;for(k=0;k<d.children[y].matches.length;k++)d.children[y+k].checked!==!1&&v.push(k);q=v.length>0;s=d.children[y].matches;k=!0;break}if(k){if(q){v=h.searchUtils.replaceCheckedMatches(i,e,s,v,f);i=v.replacedStr;for(k=0;k<d.children[u].matches.length;k++)d.children[u+k].newMatches=v.newMatches}else for(k=
0;k<d.children[u].matches.length;k++)d.children[u+k].newMatches=d.children[u+k].matches;b?c.contents[g]=i:c.contents.push(i)}else b||c.contents.push(i)}}};h.searchUtils.generateMatchContext=function(b,a,c){var d=[],e=b*2+1,f;a.length<=e?(f=0,b=a.length-1):(f=c-b,f<0?(f=0,b=f+e-1):(b=c+b,b>a.length-1&&(b=a.length-1,f=b-e+1)));for(e=f;e<=b;e++)d.push({context:a[e],current:e===c});return d};h.searchUtils.splitFile=function(b){for(var a=0,c=0,d=0,e=0,f=[];;){a!==-1&&a<=d&&(a=b.indexOf("\r",d));c!==-1&&
c<=d&&(c=b.indexOf("\n",d));if(c===-1&&a===-1){f.push(b.substring(e));break}var h=1;a!==-1&&c!==-1?a+1===c?(h=2,d=c+1):d=(a<c?a:c)+1:d=a!==-1?a+1:c+1;f.push(b.substring(e,d-h));e=d}return f};h.searchUtils.searchWithinFile=function(b,a,c,d,e,f){c=h.searchUtils.splitFile(c);if(e)a.contents=c;if(a){a.children=[];for(var g=d=0;g<c.length;g++){var k=c[g];if(k&&k.length>0){var i=f?k:k.toLowerCase();if(i=b.wildCard?h.searchUtils.searchOnelineRegEx(b,i):h.searchUtils.searchOnelineLiteral(b,i)){var q=g+1;
if(e)for(var v=0;v<i.length;v++){var s=v+1,s={parent:a,checked:a.checked,type:"detail",matches:i,lineNumber:q,matchNumber:s,name:k,location:a.location+"-"+q+"-"+s};a.children.push(s)}else s={parent:a,context:h.searchUtils.generateMatchContext(2,c,g),checked:a.checked,type:"detail",matches:i,lineNumber:q,name:k,location:a.location+"-"+q},a.children.push(s);d+=i.length}}}a.totalMatches=d}};h.searchUtils.replaceCheckedMatches=function(b,a,c,d,e){for(var f=0,h="",g=[],k=0;k<c.length;k++){f!==c[k].startIndex&&
(h+=b.substring(f,c[k].startIndex));if(c[k].length)e=c[k].length;for(var f=!1,i=0;i<d.length;i++)if(d[i]===k){f=!0;break}f?(g.push({startIndex:h.length,length:a.length}),h+=a):(g.push({startIndex:h.length,length:e}),h+=b.substring(c[k].startIndex,c[k].startIndex+e));f=c[k].startIndex+e}f<b.length&&(h+=b.substring(f));return{replacedStr:h,newMatches:g}};h.searchUtils.fullPathNameByMeta=function(b){var a=b.length,c="";if(a>0)for(a-=1;a>-1;a--)c=c+(c===""?"":"/")+b[a].Name;return c};h.searchUtils.path2FolderName=
function(b,a,c){return b.substring(0,b.length-a.length-(c?0:1))};h.searchUtils._storeRecentSearch=function(b,a){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("recentSearch",a)})};h.searchUtils.addRecentSearch=function(b,a,c){typeof a==="string"&&a&&b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var e,d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d){for(e in d)if(d[e].name===a)return;
d.length>=20&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:a,regEx:c});h.searchUtils._storeRecentSearch(b,d)})};h.searchUtils.getSearches=function(b,a,c){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b=b.get(a);typeof b==="string"&&(b=JSON.parse(b));b&&c&&c(b)})};h.searchUtils.getMixedSearches=function(b,a,c,d){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var e,f=b.get("recentSearch");typeof f===
"string"&&(f=JSON.parse(f));if(a)for(e in b=b.get("search"),typeof b==="string"&&(b=JSON.parse(b)),b)if(c){var g=h.searchUtils.parseQueryStr(b[e].query);f.some(function(a){return g.searchStrTitle===a.name})||f.push({name:g.searchStrTitle,label:b[e].name})}else f.push({name:null,label:b[e].name,value:b[e].query});f&&d&&d(f)})};h.searchUtils.getOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(b){b=b.get("nav.config");a(b&&b["links.newtab"]!==
"undefined"?b["links.newtab"]?!0:!1:!1)})};h.searchUtils.setOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("openSearchPref",{openInNewTab:a})})};return h.searchUtils});
(function(g,i){typeof define==="function"&&define.amd?define("orion/Deferred",[],i):typeof exports==="object"?module.exports=i():(g.orion=g.orion||{},g.orion.Deferred=i())})(this,function(){function g(){for(var a;a=k.shift()||h.shift();)a();b=!1}function i(a,c){(c?h:k).push(a);b||(b=!0,c?setTimeout(g,0):g())}function f(a){return function(){a.apply(null,arguments)}}function d(){}function e(){var a=Error("Cancel");a.name="Cancel";return a}function c(){function a(){for(var a;a=g.shift();){var c=a.deferred,
e=h==="resolved"?"resolve":"reject";if(typeof a[e]==="function")try{var k=a[e](b);k&&typeof k.then==="function"?(c.cancel=k.cancel||d,k.then(f(c.resolve),f(c.reject),c.progress)):c.resolve(k)}catch(i){c.reject(i)}else c[e](b)}}var b,h,g=[],k=this;this.reject=function(c){h||(h="rejected",b=c,g.length&&i(a));return k.promise};this.resolve=function(c){h||(h="resolved",b=c,g.length&&i(a));return k.promise};this.progress=function(a){h||g.forEach(function(b){b.progress&&b.progress(a)});return k.promise};
this.cancel=function(){h||k.reject(e())};this.then=function(b,d,e){var b={resolve:b,reject:d,progress:e,deferred:new c},f=b.deferred,j=this.cancel.bind(this),k=function(){i(function(){(f.cancel===k?j:f.cancel)()},!0)};f.cancel=k;d=f.promise;d.cancel=function(){f.cancel()};g.push(b);h&&i(a,!0);return d};this.promise={then:this.then,cancel:this.cancel}}var k=[],h=[],b=!1;c.all=function(a,b){function d(a,b){g||(h[a]=b,--f===0&&k.resolve(h))}function e(a,c){if(!g){if(b)try{d(a,b(c));return}catch(f){c=
f}k.reject(c)}}var f=a.length,h=[],g=!1,k=new c;k.then(null,function(){g=!0;a.forEach(function(a){a.cancel&&a.cancel()})});f===0?k.resolve(h):a.forEach(function(a,b){a.then(d.bind(null,b),e.bind(null,b))});return k.promise};c.when=function(a,b,d,e){var f;if(!(a&&typeof a.then==="function"))f=new c,f.resolve(a),a=f.promise;return a.then(b,d,e)};return c});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,i){function f(c,b,a){this._properties=a||{};this._properties["service.id"]=c;this._properties.objectClass=b;this._properties["service.names"]=b}function d(c,b,a){this._serviceId=c;this._serviceReference=b;this._internalRegistry=a}function e(c,b){function a(a){return function(){var d;try{if(!b())throw Error("Service was unregistered");var e=c[a].apply(c,Array.prototype.slice.call(arguments));if(e&&typeof e.then==="function")return e;
else d=new g,d.resolve(e)}catch(f){d=new g,d.reject(f)}return d.promise}}for(var d in c)typeof c[d]==="function"&&(this[d]=a(d))}function c(c,b){this.type=c;this.serviceReference=b}function k(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var d=this;this._internalRegistry={isRegistered:function(b){return d._entries[b]?!0:!1},unregisterService:function(b){var a=d._entries[b];if(!a)throw Error("already unregistered");var e=a.reference;d._serviceEventTarget.dispatchEvent(new c("unregistering",
e));d._entries[b]=null;e.getProperty("objectClass").forEach(function(a){for(var b=d._namedReferences[a],c=0;c<b.length;c++)if(b[c]===e){b.length===1?delete d._namedReferences[a]:b.splice(c,1);break}})},modifyService:function(b){b=d._entries[b];if(!b)throw Error("already unregistered");d._serviceEventTarget.dispatchEvent(new c("modified",b.reference))}}}f.prototype={getPropertyKeys:function(){var c=[],b;for(b in this._properties)this._properties.hasOwnProperty(b)&&c.push(b);return c},getProperty:function(c){return this._properties[c]}};
f.prototype.constructor=f;d.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(c){var b=this._serviceReference._properties;this._serviceReference._properties=c||{};c["service.id"]=this._serviceId;c.objectClass=b.objectClass;c["service.names"]=b["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
d.prototype.constructor=d;k.prototype={getService:function(c){var b;if(typeof c==="string")(c=this._namedReferences[c])&&c.some(function(a){b=this._entries[a.getProperty("service.id")].service;return!!b},this);else if(c=this._entries[c.getProperty("service.id")])b=c.service;return b||null},getServiceReferences:function(c){if(c)return this._namedReferences[c]?this._namedReferences[c]:[];var b=[];this._entries.forEach(function(a){a&&b.push(a.reference)});return b},registerService:function(h,b,a){if(typeof b===
"undefined"||b===null)throw Error("invalid service");typeof h==="string"?h=[h]:Array.isArray(h)||(h=[]);var j=this._entries.length,g=new f(j,h,a),k=this._namedReferences;h.forEach(function(a){k[a]=k[a]||[];k[a].push(g)});h=new e(b,this._internalRegistry.isRegistered.bind(null,j));this._entries.push({reference:g,service:h});h=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new c("registered",g));return new d(j,g,h)},addEventListener:function(c,b){this._serviceEventTarget.addEventListener(c,
b)},removeEventListener:function(c,b){this._serviceEventTarget.removeEventListener(c,b)}};k.prototype.constructor=k;return{ServiceRegistry:k}});
define("orion/xhr",["orion/Deferred"],function(g){function i(f,d,e,c){var g=typeof e.response!=="undefined"?e.response:e.responseText,h;try{h=e.status}catch(b){h=0}f={args:d,response:g,responseText:typeof g==="string"?g:null,status:h,url:f,xhr:e};if(typeof c!=="undefined")f.error=c;return f}return function(f,d,e){var e=e||{},c=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,k=new g,h=e.headers||{},b=e.log||!1,a;typeof h["X-Requested-With"]==="undefined"&&(h["X-Requested-With"]="XMLHttpRequest");
if(typeof e.data!=="undefined"&&(f==="POST"||f==="PUT"))a=e.data;if(typeof e.responseType==="string")c.responseType=e.responseType;c.onprogress=function(a){a.xhr=c;k.progress(a)};c.onreadystatechange=function(){if(c.readyState===4){var a=i(d,e,c),f=c.status;200<=f&&f<400?k.resolve(a):(b&&typeof console!=="undefined"&&console.log(Error(c.statusText)),k.reject(a))}};try{c.open(f,d,!0);if(typeof e.timeout==="number")if(typeof c.timeout==="number")c.timeout=e.timeout,c.addEventListener("timeout",function(){k.reject(i(d,
e,c,"Timeout exceeded"))});else{var j=setTimeout(function(){k.reject(i(d,e,c,"Timeout exceeded"))},e.timeout);k.then(clearTimeout.bind(null,j),clearTimeout.bind(null,j))}Object.keys(h).forEach(function(a){c.setRequestHeader(a,h[a])});c.send(a)}catch(l){k.reject(i(d,e,c,l))}return k.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,i,f){function d(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function e(a,b){return{get:function(c,d){if(b===0)return null;var e=localStorage.getItem(a+c);if(e===null)return null;e=JSON.parse(e);return d||b===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(c,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+1E3*b;
if(Object.keys(d).length===0)localStorage.removeItem(a+c);else{var e=JSON.stringify(d);localStorage.setItem(a+c,e);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function c(a){this._currentPromises={};this._cache=new e("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function k(a){this._location=
a;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function h(){this._cache=new e("/orion/preferences/local",-1)}function b(a,b){this._userProvider=new c(a);this._localProvider=new h;b=b||"defaults.pref";b.indexOf("://")===-1&&(b=g.toUrl(b));this._defaultsProvider=new k(b);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.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(c){b._stores[a]=c}}(d)));return i.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};c.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new i,d=null;
b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromises[a]=c;var e=this;this._service.get(a).then(function(b){e._cache.set(a,b);delete e._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},e._cache.set(a,b),delete e._currentPromises[a],c.resolve(b)):(delete e._currentPromises[a],c.resolve(e._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};k.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var c=new i,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromise=c;var e=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);e._cache.set(a,b[a]||{});e._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(e._cache.set(a,{}),e._currentPromise=null,c.resolve({})):(e._currentPromise=null,b=e._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new i;a.resolve();return a}};h.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}};b.DEFAULT_SCOPE=1;b.LOCAL_SCOPE=2;b.USER_SCOPE=4;b.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(a,c){if(!c||typeof c!=="number"||c>7||c<1)c=b.DEFAULT_SCOPE|b.LOCAL_SCOPE|
b.USER_SCOPE;var e=[];b.USER_SCOPE&c&&this._userProvider.available()&&e.push(this._userProvider);b.LOCAL_SCOPE&c&&e.push(this._localProvider);b.DEFAULT_SCOPE&c&&e.push(this._defaultsProvider);var f=new d(a,e);return f.sync().then(function(){return f})},getSetting:function(a,b,c){for(var d,e=0;e<a.length;e++)if(a[e].label===b)for(var f=0;f<a[e].data.length;f++)if(a[e].data[f].label===c){d=a[e].data[f].value;break}return d}};return{PreferencesService:b}});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(g,i){var f,d,e,c,k,h="pid";f=function(a,b,c){function d(a,c,e){c.forEach(function(d,f){try{var h=a[f].getProperty("__plugin__"),g=h&&b.getPlugin(h);(!h||g&&g.getState()==="active")&&c[f].updated(e)}catch(k){typeof console!=="undefined"&&console.log(k)}})}i.call(this,a,"orion.cm.managedservice");var e={},f={},k=function(b){var d=[];b.plugin.getServiceReferences().forEach(function(b){if(b.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var e=b.getProperty(h),b=a.getService(b);e&&b&&(e=(e=c._find(e))&&e.getProperties(),d.push(b.updated(e)))}});return g.all(d)};this.addingService=function(b){var c=b.getProperty(h),d=a.getService(b);if(!c||!d)return null;e[c]||(e[c]=[]);f[c]||(f[c]=[]);e[c].push(b);f[c].push(d);return d};this.onServiceAdded=function(a,b){var e=a.getProperty(h),e=c._find(e);d([a],[b],e&&e.getProperties())};this.onOpen=function(){b.addEventListener("started",k)};this.onClose=function(){b.removeEventListener("started",
k)};this.notifyUpdated=function(a){var b=a.getPid();d(e[b]||[],f[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(e[a]||[],f[a]||[],null)};this.removedService=function(a,b){var c=a.getProperty(h),d=e[c],j=f[c];d.length>1?d.splice(d.indexOf(a),1):delete e[c];j.length>1?j.splice(j.indexOf(b),1):delete f[c]}};d=function(){function a(a,b,d){this.store=new e(this,d);this.configAdmin=new c(this,this.store);this.tracker=new f(a,b,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}();c=function(){function a(a,b){this.factory=a;this.store=b}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 b="/cm/configurations";
e=function(){function a(a,c){this.factory=a;this.prefsService=c;this.configs=Object.create(null);this.pref=null;var d=this;this.initPromise=this.prefsService.getPreferences(b).then(function(a){d.pref=a;a.keys().forEach(function(b){if(!d.configs[b]){var c=a.get(b);typeof c==="object"&&c!==null&&Object.keys(c).length>0&&(c[h]=b,d.configs[b]=new k(d.factory,d,c))}})})}a.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 k(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 a}();k=function(){function a(a){for(var b={},c=Object.keys(a),d=0;d<c.length;d++){var e=c[d],f=a[e];b[e]=f instanceof Array?f.slice():f}return b}function b(c,d,e){this.factory=
c;this.store=d;if(e!==null&&typeof e==="object")this.pid=e[h],c=a(e),delete c[h],this.properties=c;else if(typeof e==="string")this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);}b.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var c=null;if(this.properties&&(c=a(this.properties),!b))c[h]=this.pid;return c},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(b){this._checkRemoved();b=a(b);delete b[h];this.properties=b;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return b}();return{ConfigurationAdminFactory:d}});
define("orion/PageLinks",["require","orion/Deferred","orion/PageUtil","orion/URITemplate","orion/URL-shim"],function(g,i,f,d){function e(c,e){for(var h=c.getServiceReferences(e||"orion.page.link"),b=f.matchResourceParameters(window.location.href),a={OrionHome:(new URL(g.toUrl("."),window.location)).href.slice(0,-1),Location:b.resource},b=[],j=0;j<h.length;j++){for(var l={},m=h[j].getPropertyKeys(),n=0;n<m.length;n++)l[m[n]]=h[j].getProperty(m[n]);if(l.uriTemplate&&l.nls&&(l.name||l.nameKey)){var p=
new i;g(["i18n!"+l.nls],function(b){var c=new d(l.uriTemplate),c=window.decodeURIComponent(c.expand(a)),c=f.validateURLScheme(c);l.href=c;l.textContent=l.nameKey?b[l.nameKey]:l.name;p.resolve(l)});b.push(p)}else if(l.uriTemplate&&l.name)m=new d(l.uriTemplate),m=window.decodeURIComponent(m.expand(a)),m=f.validateURLScheme(m),l.href=m,l.textContent=l.name,b.push((new i).resolve(l))}return i.all(b)}return{createPageLinks:function(c,d){return e(c,d).then(function(c){return c.map(function(b){var a=b.href,
b=b.textContent,c=document.createElement("a");c.href=a;c.target="_self";c.classList.add("targetSelector");c.textContent=b;return c})})},getPageLinksInfo:e}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(g,i,f,d){function e(c){this._init(c)}e.prototype={_init:function(c){this._dropdownNode=f.node(c.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=c.dropdown;this._serviceRegistry=c.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(c){var d=0,e;for(e in c)c.hasOwnProperty(e)&&d++;return d},_makeMenuItem:function(c,d){var e=document.createElement("span");e.role="menuitem";e.tabIndex=0;var b=document.createTextNode(c);e.appendChild(b);e.classList.add("dropdownMenuItem");e.addEventListener("click",d,!1);e.addEventListener("keydown",function(a){(a.keyCode===
f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&d()},!1);return e},_renderAuthenticatedService:function(c){var d=this,e=this.authenticatedServices[c].authService;if(e&&e.logout){var b=document.createElement("li"),a=this._makeMenuItem(g["Sign Out"],function(){e.logout().then(function(){d.addUserItem(c,e,d.authenticatedServices[c].label);localStorage.removeItem(c);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var b=localStorage.key(a);b&&b.indexOf("/orion/preferences/user")===
0&&localStorage.removeItem(b)}e.getAuthForm(window.location.href).then(function(a){window.location=a})})});b.appendChild(a);this._dropdownNode.appendChild(b)}},renderServices:function(){function c(b){f[b]||(f[b]=e.createDocumentFragment());return f[b]}var e=document,f=[];d.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(b){this._dropdown.empty();b.forEach(function(a){var b=c(typeof a.category==="number"?a.category:1),d=e.createElement("li"),f=e.createElement("a");f.role=
"menuitem";f.classList.add("dropdownMenuItem");f.href=a.href;f.textContent=a.textContent;d.appendChild(f);b.appendChild(d)});if(this.keyAssistFunction){var b=document.createElement("li"),a=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction);a.classList.add("key-assist-menuitem");b.appendChild(a);c(0).appendChild(b)}var d=this;f.sort(function(a,b){return a-b}).forEach(function(a,b){if(b<f.length-1){var c=document.createElement("li");c.classList.add("dropdownSeparator");var e=document.createElement("span");
e.classList.add("dropdownSeparator");c.appendChild(e);a.appendChild(c)}d._dropdownNode.appendChild(a)});if(this.isSingleService())for(var i in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(i)&&this._renderAuthenticatedService(i,0)}.bind(this))},setKeyAssist:function(c){this.keyAssistFunction=c;this.renderServices()},addUserItem:function(c,d,e,b){b?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:d,label:e,data:b}):
(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?{authService:d,label:e,pending:this.unauthenticatedServices[c].pending}:{authService:d,label:e});this.renderServices()}};e.prototype.constructor=e;return{UserMenu:e}});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,i){function f(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var d={};return{getMessageBundle:function(e){function c(){g(["i18n!"+e],function(a){if(a){var b=e;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}k.resolve(a)})}if(d[e])return d[e];var k=new i;d[e]=
k;var h=f(e);if(h)return k.resolve(h),k;try{g([e],c)}catch(b){g(["orion/i18n!"+e],c)}return k},formatMessage:function(d){var c=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(d,e){return c[(e<<0)+1]})}}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,i,f){function d(c,d,b){if(!c[d])throw d+g[" is not supported in this file system"];return c[d].apply(c,b)}function e(c,f,b,a){if(!c.readBlob)throw g["source file service does not support binary read"];if(!b.writeBlob)throw g["target file service does not support binary write"];if(f[f.length-1]!=="/")return d(c,"readBlob",[f]).then(function(c){return d(b,"writeBlob",[a,c])});var j=a.substring(0,
a.length-1),l=decodeURIComponent(j.substring(j.lastIndexOf("/")+1)),j=j.substring(0,j.lastIndexOf("/")+1);return d(b,"createFolder",[j,l]).then(function(){},function(){}).then(function(){return d(c,"fetchChildren",[f]).then(function(d){for(var f=[],h=0;h<d.length;++h){var g=d[h].Location,j=g;d[h].Directory&&(j=g.substring(0,g.length-1));j=decodeURIComponent(j.substring(j.lastIndexOf("/")+1));j=a+encodeURIComponent(j);d[h].Directory&&(j+="/");f[h]=e(c,g,b,j)}return i.all(f)})})}function c(c,d){function b(a){var b=
new i;b.reject(g["No Matching FileService for location:"]+a);return b}var a=c.getServiceReferences("orion.core.file"),e=a;if(d)for(var e=[],l=0;l<a.length;++l)d(a[l])&&e.push(a[l]);for(var m=[],n=[],p=[],o=[],r={fetchChildren:function(){var a=new i;a.resolve(o);return a},createWorkspace:function(){var a=new i;a.reject(g["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(g["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:o,ChildrenLocation:"/"})},100);return a},search:b,createProject:b,createFolder:b,createFile:b,deleteFile:b,moveFile:b,copyFile:b,read:b,write:b},a=0;a<e.length;++a)o[a]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[a].getProperty("top"),ChildrenLocation:e[a].getProperty("top"),Name:e[a].getProperty("Name")},l=e[a].getProperty("pattern")||".*",l[0]!=="^"&&(l="^"+l),m[a]=RegExp(l),n[a]=c.getService(e[a]),p[a]=e[a].getProperty("Name"),
e[a].getProperty("NameKey")&&e[a].getProperty("nls")&&f.getMessageBundle(e[a].getProperty("nls")).then(function(a,b){o[a].Name=b[e[a].getProperty("NameKey")];p[a]=b[e[a].getProperty("NameKey")]}.bind(this,a));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return n[0]?0:-1;for(var b=0;b<m.length;++b)if(m[b].test(a))return b;throw g["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?r:n[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?r.Name:p[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?r.Location:o[a].Location}}c.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 d(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return d(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return d(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,e,b,a){return d(this._getService(c),"createProject",arguments)},createFolder:function(c,e){return d(this._getService(c),"createFolder",arguments)},createFile:function(c,e){return d(this._getService(c),"createFile",arguments)},deleteFile:function(c){return d(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,f,b){var a=this._getService(c),g=this._getService(f);if(a===g)return d(a,"moveFile",arguments);var i=c[c.length-1]==="/",m=f;m[m.length-1]!=="/"&&(m+="/");if(b)m+=encodeURIComponent(b);else{var n=c;i&&(n=n.substring(0,n.length-1));m+=n.substring(n.lastIndexOf("/")+1)}i&&m[m.length-1]!=="/"&&(m+="/");return e(a,c,g,m).then(function(){return d(a,"deleteFile",[c])})},copyFile:function(c,f,b){var a=this._getService(c),g=this._getService(f);if(a===g)return d(a,"copyFile",arguments);
var i=c[c.length-1]==="/",m=f;m[m.length-1]!=="/"&&(m+="/");if(b)m+=encodeURIComponent(b);else{var n=c;i&&(n=n.substring(0,n.length-1));m+=n.substring(n.lastIndexOf("/")+1)}i&&m[m.length-1]!=="/"&&(m+="/");return e(a,c,g,m)},read:function(c,e){return d(this._getService(c),"read",arguments)},write:function(c,e,b){return d(this._getService(c),"write",arguments)},remoteImport:function(c,e){return d(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,e){return d(this._getService(c),
"remoteExport",arguments)},search:function(c){return d(this._getService(c.resource),"search",arguments)}};c.prototype.constructor=c;return{FileClient:c}});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,i,f,d,e,c){function k(c,b,a,e){this.registry=c;this.fileClient=b;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this._searchParams=a;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(a);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location}k.prototype.search=function(c){var b=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=c;var a=this;this.registry.getService("orion.page.dialog").confirm(g["The search term on this location will not use indexed files."]+"\n"+g["It will take longer time. Do you want to proceed?"],function(c){c&&b.getContentTypes().then(function(b){a.contentTypesCache=
b;a._visitRecursively(a._childrenLocation).then(function(){a._sort(a.fileLocations);a._onSearchComplete({response:{numFound:a.fileLocations.length,docs:a.fileLocations}})})})})};k.prototype.searchName=function(c,b){if(c)this.searchHelper=d.generateSearchHelper(c,!0);if(b)this.onSearchNameComplete=b;var a=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var f=this.fileSkeleton[e].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?
d.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(a.push(this.fileSkeleton[e]),a.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:a.length,docs:a}})}};k.prototype.buildSkeleton=function(c,b){this._buildingSkeleton=!0;var a=this.registry.getService("orion.core.contenttypes"),d=this;c();a.getContentTypes().then(function(a){d.contentTypesCache=a;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=
!1;b();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};k.prototype._searchCompleted=function(){console.log("Search Completed.")};k.prototype._searchFiles=function(){var d=[],b;if(this.fileLocations.length>0){b=this;for(var a=0;a<b.fileLocations.length;a++)d.push(b._sniffSearch(b.fileLocations[a]))}return c.all(d)};k.prototype._sort=function(c){c.sort(function(b,a){var c=b.Name&&b.Name.toLowerCase(),d=a.Name&&a.Name.toLowerCase();return c<d?-1:c>d?1:0})};k.prototype._onFileType=function(c){return this.searchHelper.params.fileType?
this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:c.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};k.prototype._visitRecursively=function(d){var b=[],a=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(d);var f=a.registry.getService("orion.page.progress");return(f?f.progress(a.fileClient.fetchChildren(d),"Crawling search for children of "+d):a.fileClient.fetchChildren(d)).then(function(d){for(var f=0;f<d.length;f++)if(d[f].Directory!==void 0&&d[f].Directory===!1)if(a._searchOnName)b.push(a._buildSingleSkeleton(d[f]));
else if(a._buildSkeletonOnly)b.push(a._buildSingleSkeleton(d[f]));else{var g=e.getFilenameContentType(d[f].Name,a.contentTypesCache);g&&(g["extends"]==="text/plain"||g.id==="text/plain")&&a._onFileType(g)&&b.push(a._sniffSearch(d[f]))}else d[f].Location&&b.push(a._visitRecursively(d[f].ChildrenLocation));return c.all(b)})};k.prototype._hitOnceWithinFile=function(c){c=this._searchParams.caseSensitive?c:c.toLowerCase();return this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,
c,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,c,!0)};k.prototype._reportSingleHit=function(c){c.LastModified=c.LocalTimeStamp;this.fileLocations.push(c);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};k.prototype._sniffSearch=function(c){this._totalCounter++;var b=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(c),this.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(b.fileClient.read(c.Location),"Reading file "+c.Location).then(function(a){b._hitOnceWithinFile(a)&&b._reportSingleHit(c);b.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],b._hitCounter,b._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};k.prototype._buildSingleSkeleton=function(d){this._totalCounter++;
this.fileSkeleton.push(d);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();d=new c;d.resolve(this._totalCounter);return d};k.prototype.constructor=k;return{SearchCrawler:k}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler".split(","),function(g,i,f,d,e,c){function k(c){this.registry=c.serviceRegistry;this._commandService=c.commandService;(this._fileService=c.fileService)||console.error("No file service on search client")}k.prototype={search:function(d,b,a){var f=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var d=a.response.docs[c];b.push({name:d.Name,path:d.Location,
folderName:e.path2FolderName(d.Path?d.Path:d.Location,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b};if(this._crawler&&d.nameSearch)this._crawler.searchName(d,function(b){a(f(b),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(d),"Searching "+d.keyword).then(function(b){var c=d.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);a(f(b),c)},function(b){a(null,null,b)})}catch(g){typeof g==="string"&&g.indexOf("search")>
-1&&this._crawler?this._crawler.searchName(d,function(b){a(f(b),null)}):typeof g==="string"&&g.indexOf("search")>-1&&!d.nameSearch?(new c.SearchCrawler(this.registry,this._fileService,d,{childrenLocation:this.getChildrenLocation()})).search(function(b){a(f(b),null)}):this.registry.getService("orion.page.message").setErrorMessage(g)}},getFileService:function(){return this._fileService},setCrawler:function(c){this._crawler=c},handleError:function(c,b){console.error(c);f.empty(b);b.appendChild(document.createTextNode(c));
return c},setLocationByMetaData:function(c,b){var a="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(c.Location);b&&c&&c.Parents&&c.Parents.length>0?e=b.index==="last"?c.Parents[c.Parents.length-1]:c.Parents[0]:c&&c.Directory&&c.Location&&c.Parents&&(e=c);if(e)this.setLocationbyURL(e.Location),a=e.Name,this._childrenLocation=e.ChildrenLocation;else if(c)this.setLocationbyURL(this._searchRootLocation),a=this._fileService.fileServiceName(c.Location),this._childrenLocation=c.ChildrenLocation;
e=f.node("search");a||(a="");if(e&&e.placeholder){e.value="";var i=d.formatMessage(g["Search ${0}"],a);e.placeholder=i.length>30?i.substring(0,27)+"...":d.formatMessage(g["Search ${0}"],a)}if(e&&e.title)e.title=g["Type a keyword or wild card to search in "]+a},setLocationbyURL:function(c){this._searchLocation=c},setRootLocationbyURL:function(c){this._searchRootLocation=c},setChildrenLocationbyURL:function(c){this._childrenLocation=c},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(c,b,a,d){a=a?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:a,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:c}:{resource:a,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:c}},defaultRenderer:{makeRenderFunction:function(c,b,a,e,k){function m(a){return!c?!0:(a=c.getFilenameContentType(a))&&(a["extends"]==="text/plain"||a.id==="text/plain")?!0:!1}return function(c,h,o){if(o)f.empty(b),c=document.createElement("div"),c.appendChild(document.createTextNode(g["Search failed."])),b.appendChild(c),typeof e==="function"&&e(b);else{var o=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)}}}(),r=!1;f.empty(b);if(c&&c.length>0){var q=document.createElement("table");q.setAttribute("role","presentation");for(var v=0;v<c.length;v++){var s=c[v],u;if(!r&&(r=!0,a))u=
q.insertRow(0).insertCell(0),u.textContent=a;u=q.insertRow(-1).insertCell(0);u.colspan=2;k&&k(u);var y=document.createElement("a");y.appendChild(document.createTextNode(s.name));s.LineNumber&&y.appendChild(document.createTextNode(" (Line "+s.LineNumber+")"));var t=s.location;s.isExternalResource?t=s.path:(t=s.directory?i.toUrl("navigate/table.html")+"#"+s.path:m(s.name)?i.toUrl("edit/edit.html")+"#"+s.path:s.path,t==="#"&&(t=""));y.setAttribute("href",t);y.setAttribute("aria-describedby",(s.folderName?
s.folderName:s.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));y.style.verticalAlign="middle";u.appendChild(y);o(u,s)}b.appendChild(q);typeof e==="function"&&e(b)}!r&&h&&(c=d.formatMessage(g["No matches found for ${0}"],h),f.empty(b),b.appendChild(document.createTextNode(c)),typeof e==="function"&&e(b))}}}}};k.prototype.constructor=k;return{Searcher:k}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/webui/dialog".split(","),function(g,i,f,d,e,c){function k(c){this._init(c)}k.prototype=new c.Dialog;k.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="'+
d.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>';k.prototype._init=function(c){this.title=c.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=c.searcher;this._progress=c.progress;this._onHide=c.onHide;
this._contentTypeService=new f.ContentTypeService(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=c.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(g["Missing required argument: fileService"]);this._searchRenderer=c.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(g["Missing required argument: searchRenderer"]);this._favService=c.favoriteService;if(!this._favService)throw Error(g["Missing required argument: favService"]);this._initialize()};k.prototype._bindToDom=function(c){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},
!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER){var c=e.$("a",b.$results);c&&(e.stop(a),window.open(c.href),b.hide())}},!1);c.addEventListener("keydown",function(a){var c,d,f,g,h;if(a.keyCode===e.KEY.DOWN||a.keyCode===e.KEY.UP)d=e.$$array("a",b.$results),c=e.$$array("a",b.$favresults),f=document.activeElement,h=d.indexOf(f),g=c.indexOf(f),a.keyCode===e.KEY.DOWN?g>=0?(g<c.length-1?c[g+1]:d.length>0?d[0]:c[0]).focus():h>=0?(h<d.length-1?d[h+1]:c.length>0?c[0]:d[0]).focus():
(d.length>0||c.length>0)&&(-1<c.length-1?c[0]:d[0]).focus():g>=0?(f=b.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=b.$fileName,(h>0?d[h-1]:c.length>0?c[c.length-1]:f).focus()):d.length>0?d[d.length-1].focus():c.length>0&&c[c.length-1].focus(),e.stop(a)});c.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=b._searchOnRoot?b._searcher.getSearchRootLocation():
b._searcher.getChildrenLocation(),a=new i.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0)};k.prototype.populateFavorites=function(){var c=document.createElement("div");c.appendChild(document.createTextNode(g["Populating favorites&#x2026;"]));
e.empty(this.$favresults);this.$favresults.appendChild(c);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())};k.prototype.showFavorites=function(){var c=this;return function(b){if(b.navigator)b=b.navigator;c._searchRenderer.makeRenderFunction(c._contentTypeService,c.$favresults,!1,c.decorateResult.bind(c),
c.showFavoritesImage)(b);if(b&&b.length>0)b=document.createElement("div"),b.style.borderBottom="1px dashed #BBBBBB",b.style.padding="5px",c.$favresults.appendChild(b)}};k.prototype.showFavoritesImage=function(c){var b=new Image;b.classList.add("modelDecorationSprite");b.classList.add("core-sprite-makeFavorite");b.src=d.toUrl("images/none.png");b.title=g.Favorite;c.appendChild(b);b.style.verticalAlign="middle"};k.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var c=(new Date).getTime();
c-this._time>this._searchDelay?(this._time=c,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};k.prototype.doSearch=function(){var c=this.$fileName.value,b=this.showFavorites();this._progress?this._progress.progress(this._favService.queryFavorites(c),"Getting favorites for: "+c).then(function(a){b(a)}):this._favService.queryFavorites(c).then(function(a){b(a)});if(c){var a=document.createElement("div");a.appendChild(document.createTextNode(g["Searching..."]));e.empty(this.$favresults);
this.$results.appendChild(a);var d=this;setTimeout(function(){var a=d._searcher.createSearchParams(c,!0,d._searchOnRoot),b=d._searchRenderer.makeRenderFunction(d._contentTypeService,d.$results,!1,d.decorateResult.bind(d));d._searcher.search(a,!1,b)},0)}};k.prototype.decorateResult=function(c){for(var b=this,c=e.$$array("a",c),a=0;a<c.length;a++){var d=c[a];d.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&b.hide()},!1);d.addEventListener("keyup",function(a){a.keyCode===
e.KEY.ENTER&&b.hide()},!1)}};k.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};k.prototype._afterHiding=function(){this._onHide&&this._onHide()};k.prototype.constructor=k;return{OpenResourceDialog:k}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(g,i,f,d,e,c,k){var h={},b=(new URL(g.toUrl("."),window.location)).href.slice(0,-1);h._cloneItemWithoutChildren=function j(b){if(b===null||typeof b!=="object")return b;var c=b.constructor(),d;for(d in b)d!=="children"&&d!=="Children"&&(c[d]=j(b[d]));return c};h._createOpenWithCommands=function(b){function c(b,d){for(var e=
b.getServiceReferences("orion.navigate.openWith"),f=[],g=0;g<e.length;g++){var h=e[g];h.getProperty("editor")===d.id&&(h=h.getProperty("contentType"),h instanceof Array?f=f.concat(h):h!==null&&typeof h!=="undefined"&&f.push(h))}return f}for(var d=function(){for(var c=b.getServiceReferences("orion.edit.editor"),d=[],e=0;e<c.length;e++){var f=c[e],g=f.getProperty("id");d.push({id:g,name:f.getProperty("name"),nameKey:f.getProperty("nameKey"),nls:f.getProperty("nls"),uriTemplate:f.getProperty("orionTemplate")||
f.getProperty("uriTemplate")})}return d}(),e=function(b){for(b=b.getServiceReferences("orion.navigate.openWith.default");0<b.length;)return{editor:b[0].getProperty("editor")};return null}(b),f=[],g=0;g<d.length;g++){var h=d[g],i=e&&e.editor===h.id,k=c(b,h);k.length&&f.push({properties:{name:h.name||h.id,nameKey:h.nameKey,id:"eclipse.openWithCommand."+h.id,tooltip:h.name,tooltipKey:h.nameKey,contentType:k,uriTemplate:h.uriTemplate,nls:h.nls,forceSingleItem:!0,isEditor:i?"default":"editor"},service:{}})}return f};
h._makeValidator=function(d,f,g,h){function i(b,c,d,e){var f=d.match,g;if(c.indexOf("|")>=0)return g=c.substring(0,c.indexOf("|")),c=c.substring(c.indexOf("|")+1),i(b,g,d,e)?!0:i(b,c,d,e);else if(c.indexOf(":")>=0)return g=c.substring(0,c.indexOf(":")),c=c.substring(c.indexOf(":")+1),b[g]?i(b[g],c,d,e):!1;else{a:{g=!1;var h;if(b[c]){if(f)if(typeof f==="string"){if(!typeof(b[c]==="string")){d=!1;break a}if(d.variableName){if(f=RegExp(f).exec(b[c]))g=f[0],h=d.variableMatchPosition==="before"?b[c].substring(0,
f.index):d.variableMatchPosition==="after"?b[c].substring(f.index+g.length):d.variableMatchPosition==="only"?g:b[c],g=!0}else{d=RegExp(f).test(b[c]);break a}}else b[c]===f&&(h=b[c],g=!0);else h=b[c],g=!0;if(g&&d.variableName&&(e[d.variableName]=h,e.itemCached=b,d.replacements))for(b=0;b<d.replacements.length;b++)c=!1,d.replacements[b].pattern?e[d.variableName]=e[d.variableName].replace(RegExp(d.replacements[b].pattern),d.replacements[b].replacement||""):c=!0,c&&window.console.log("Invalid replacements specified in validation property.  "+
d.replacements[b]);d=g}else d=!1}return d}}return{info:d,validationFunction:function(b){typeof h==="function"&&(b=h.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var c=0;c<b.length;c++){var f;a:{var k=b[c],l=g;if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var u=this.info.validationProperties[f];if(u.source){if(!i(k,u.source,u,this)){f=!1;break a}}else{window.console.log("Invalid validationProperties in "+
d.id+".  No source property specified.");f=!1;break a}}if(this.info.contentType&&l){u=!1;if(k=e.getFilenameContentType(k.Name,l))for(f=0;f<this.info.contentType.length;f++)if(k.id===this.info.contentType[f]){u=!0;break}f=u}else f=!0}if(!f)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(d){if(this.info.uriTemplate){var e={},f;for(f in d)d.hasOwnProperty(f)&&(e[f]=d[f]);if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var g=
this.info.validationProperties[f];g.source&&g.variableName&&(this.itemCached===d&&this[g.variableName]||i(d,g.source,g,this),d[g.variableName]?window.console.log("Variable name "+g.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):e[g.variableName]=this[g.variableName])}e.OrionHome=b;d=new c(this.info.uriTemplate);return window.decodeURIComponent(d.expand(e))}return null}}};h._createCommandOptions=function(b,c,d,e,f,g){function r(i,k){var r=
h._makeValidator(b,d,e,g);i.visibleWhen=r.validationFunction.bind(r);if(f)if(r.generatesURI.bind(r)())i.hrefCallback=function(b){b=Array.isArray(b.items)?b.items[0]:b.items;return r.getURI.bind(r)(b)};else{var q=b;i.callback=function(b){var e;if(q.forceSingleItem)b=Array.isArray(b.items)?b.items[0]:b.items,e=h._cloneItemWithoutChildren(b);else if(Array.isArray(b.items)){e=[];for(var f=0;f<b.items.length;f++)e.push(h._cloneItemWithoutChildren(b.items[f]))}else e=h._cloneItemWithoutChildren(b.items);
if(d)var g=d.getService("orion.page.progress");c.run?g?g.progress(c.run(e),"Running command: "+i.name):c.run(e):d&&(g?g.progress(d.getService(c).run(e),"Running command: "+i.name):d.getService(c).run(e))}}k.resolve(i)}var q=new i;b.nls?k.getMessageBundle(b.nls).then(function(c){r({name:b.nameKey?c[b.nameKey]:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltipKey?c[b.tooltipKey]:b.tooltip,isEditor:b.isEditor},q)}):r({name:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltip,isEditor:b.isEditor},
q);return q};h.getOpenWithCommands=function(b){var c=[],d;for(d in b._commandList){var e=b._commandList[d];e.isEditor&&c.push(e)}return c};return h});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(g,i,f,d,e){function c(c,b,a,d){this._inputField=c;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);(c=d?d.group:null)||(c=this._inputField.id?this._inputField.id:"default__dropDown__group");this._idPrefix=c+"__dropDown__";this.containerId=this._idPrefix+"UIContainer";this._dismissed=!0;
var e=this;this._optRenderer=new k(b,a,function(){e.dismiss();e._inputField.focus()});this._initUI()}function k(c,b,a){this._searcher=c;this._serviceRegistry=b;this._cancelCallBack=a}c.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)};c.prototype.dismiss=function(){this._dismissed=!0;this._optUIContainer.style.display="none"};c.prototype.show=function(c){for(var b=0,a=0,d=this._inputField;d;)b+=d.offsetLeft,a+=d.offsetTop,d=d.offsetParent;this._optUIContainer.style.display="block";this._optUIContainer.style.top=a+this._inputField.offsetHeight+2+"px";this._optUIContainer.style.left=b+"px";this._optUIContainer.style.width=this._inputField.offsetWidth+"px";this._optRenderer._searchBox.value=
c;this._optRenderer._searchBox.focus();this._dismissed=this._mouseDown=!1};c.prototype.toggle=function(){this._dismissed?this.show(this._inputField.value):this.dismiss()};c.prototype.constructor=c;k.prototype.getOptions=function(){return{searchStr:this._searchBox.value,caseSensitive:this._caseSensitiveCB.checked,regEx:this._regExCB.checked,type:this._fileTypes.options[this._fileTypes.selectedIndex].value}};k.prototype.render=function(c,b){this._parentDiv=c;if(typeof this._parentDiv==="string")this._parentDiv=
document.getElementById(this._parentDiv);var a=this._serviceRegistry.getService("orion.core.contenttypes");if(a){var e=this;a.getContentTypes().then(function(a){e.contentTypesCache=a;e._render(b)})}else a=new d.ContentTypeService(this._serviceRegistry),this.contentTypesCache=a.getContentTypes(),this._render(b)};k.prototype._render=function(c){c?this._renderHTML(c):this._renderRaw()};k.prototype._submitSearch=function(){var c=this.getOptions();f.doSearch(this._searcher,this._serviceRegistry,c.searchStr,
c)};k.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 c=[{label:g["All types"],value:f.ALL_FILE_TYPE}],b=0;b<this.contentTypesCache.length;b++)if(this.contentTypesCache[b]["extends"]==="text/plain"||this.contentTypesCache[b].id===
"text/plain")for(var a=0;a<this.contentTypesCache[b].extension.length;a++)c.push({label:this.contentTypesCache[b].extension[a],value:this.contentTypesCache[b].extension[a]});for(b=0;b<c.length;b++){var a=document.createElement("option"),d=document.createTextNode(c[b].label);a.appendChild(d);this._fileTypes.appendChild(a);a.value=c[b].value}var i=this;this._searchBox.addEventListener("keydown",function(a){a=a.charCode||a.keyCode;a===13&&i._submitSearch();a===27&&i._cancelCallBack&&i._cancelCallBack()});
this._fileTypes.addEventListener("change",function(){var a=i._fileTypes.options[i._fileTypes.selectedIndex].value;i._searchBox.placeholder=a===f.ALL_FILE_TYPE?g["Type a search term"]:e.formatMessage(g["All ${0} files"],a)});this._submitButton.onclick=function(){i._submitSearch()}};k.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(g["Files that contain:"]));document.getElementById("advSearchInput").placeholder=g["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(g["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(g["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(g["Regular expression"]));document.getElementById("advSearchSubmit").value=g.Search};k.prototype._renderHTML=function(c){var b=this,a=new XMLHttpRequest;a.open("GET",i.toUrl(c),!0);a.onreadystatechange=function(){if(this.readyState===
4&&this.status===200)b._parentDiv.innerHTML=this.responseText,b._initHTMLLabels(),b._initControls()};a.send()};k.prototype._htmlTemplate='<ul class="advSearchOptUL"><li class="advSearchOptLILabel"><label>'+g["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+g["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+g["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
g["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+g["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+g.Search+'"></input></li></ul>';k.prototype._renderRaw=function(){this._parentDiv.innerHTML=this._htmlTemplate;this._initControls()};k.prototype.constructor=k;return{advSearchOptContainer:c,
advSearchOptRenderer:k}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/editor/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/container/ThemeSheetWriter,orion/searchUtils,orion/inputCompletion/inputCompletion,orion/globalSearch/advSearchOptContainer,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html".split(","),function(g,
i,f,d,e,c,k,h,b,a,j,l,m,n,p,o,r,q,v,s,u,y,t,w,D,B,x,A){function J(a,b){if(a.getLabel)return a.getLabel();else{var c=new y;c.resolve(b.properties.name);return c}}function L(b){a.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(b=b.getService("orion.page.progress"))&&b.init.bind(b)("progressPane")}function I(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 R(b,c){var d=b.getServiceReferences("orion.core.auth");G=[];if(a.node("userMenu")){var e=a.node("userDropdown"),f=new l.Dropdown({dropdown:e}),h=new t.UserMenu({dropdownNode:e,dropdown:f,serviceRegistry:b}),e=a.node("userTrigger");new m.Tooltip({node:e,text:g.Options,position:["below","left"]});I(b,e);h.setKeyAssist(c);
for(e=0;e<d.length;e++){var f=d[e],j=b.getService(f);J(j,f).then(function(a){j.getKey().then(function(b){G.push(b);j.getUser().then(function(c){h.addUserItem(b,j,a,c)},function(c,d){h.addUserItem(b,j,a,d)});window.addEventListener("storage",function(){Y[b]!==localStorage.getItem(b)&&(Y[b]=localStorage.getItem(b),j.getUser().then(function(c){h.addUserItem(b,j,a,c)},function(){h.addUserItem(b,j,a)}))},!1)})})}}}function O(b){var c=document.createElement("span");c.id="advancedSearchDropDown";a.node("searchOptions").appendChild(c);
c.tabIndex=0;c.classList.add("advancedSearchDecorationSprite");c.classList.add("core-sprite-openarrow");c.title=g["Advanced search"];c.onclick=function(){b.toggle()};c.addEventListener("keydown",function(a){(a.charCode||a.keyCode)===13&&b.toggle()});c.classList.add("bannerMenuSearchOptions")}function K(b,c){var d=a.node("relatedDropdown");E||(E=new l.Dropdown({dropdown:d}));b._addMenuItem(d,c)}function z(b,e,f,g,h){var j,i=b.getServiceReferences("orion.page.link.related");i.length<=0||a.node("relatedLinks")&&
y.when(function(){if(j)return j;var a=b.getService("orion.core.contenttypes");a||(a=new p.ContentTypeService(b),a=b.getService("orion.core.contenttypes"));return a.getContentTypes().then(function(a){return j=a})}(),function(){var k;a.node("relatedLinks")&&E&&(E.close(),E.empty());for(var m=[],l=0;l<i.length;l++){var n={},o,r=i[l].getPropertyKeys();for(o=0;o<r.length;o++)n[r[o]]=i[l].getProperty(r[o]);if(n.id){var s=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(e)){var b=new d.CommandInvocation(g,
e,e,null,a);K(a,b)}else typeof h==="function"&&(k||(k=h()),y.when(k,function(b){b&&e===$&&(!a.visibleWhen||a.visibleWhen(b))&&K(a,new d.CommandInvocation(g,b,b,null,a))}))},q=null;o=null;if(f.indexOf(n.id)<0)if((n.nls&&n.nameKey||n.name)&&n.uriTemplate)o=c._createCommandOptions(n,i[l],b,j,!0),m.push(o),o.then(function(a){a=new d.Command(a);s(a)});else{if(!q&&(q=g.findCommand(n.id))){s(q);continue}if(!q){var v=b.getServiceReferences("orion.navigate.command");for(o=0;o<v.length;o++)if(v[o].getProperty("id")===
n.id){for(var n={},r=v[o].getPropertyKeys(),p=0;p<r.length;p++)n[r[p]]=v[o].getProperty(r[p]);o=c._createCommandOptions(n,v[o],b,j,!0);m.push(o);o.then(function(a){q=new d.Command(a);s(q)});break}}}}}y.all(m,function(a){return a}).then(function(){var b=a.node("relatedTrigger");if(E&&b)b.style.visibility=E.getItems().length===0?"hidden":"visible"})})}function S(b){var c=a.node("globalActions");c&&(b.destroy(c),b.renderCommands(c.id,c,{},{},"tool"))}function ca(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 q.ThemeSheetWriter).getSheet(c);b=document.createElement("STYLE");b.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function U(b){var c={},d=null;typeof b==="string"&&(b=a.node(b));b||(b=a.node("pageActions"));for(var e=b;e&&e.classList;){if(e.classList.contains("toolComposite")){d=
e;break}e=e.parentNode}if(b.classList.contains("commandMarker"))c.commandNode=b;if(d&&(c.slideContainer=a.$(".slideParameters",d),c.parameterArea=a.$(".parameters",d),c.dismissArea=a.$(".parametersDismiss",d),c.notifications=a.$("#notificationArea",d),d.parentNode&&(c.toolbarTarget=a.$(".toolbarTarget",d.parentNode),c.toolbarTarget)))b=a.bounds(d),c.toolbarTargetY=b.height+1;return c}function ba(b){if(b.toolbarTarget&&b.toolbarTargetY){var c=0,d;b.notifications&&b.notifications.classList.contains("slideContainerActive")&&
(d=a.bounds(b.notifications),c+=d.height);b.slideContainer&&b.slideContainer.classList.contains("slideContainerActive")&&(d=a.bounds(b.slideContainer),c+=d.height);c>0&&(c+=8);b.toolbarTarget.style.top=b.toolbarTargetY+c+"px";b.toolbarTarget.style.bottom=0}}var o=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),Y={},G=[],E,$,M=[],F,C=null;return{addSettings:function(b){var c=document.getElementById("settingsTab"),d=document.getElementById("settingsAction"),
e=!1,f;c.style.visibility="";d.style.visibility="";d.onclick=function(){if(!e){e=!0;c.style.backgroundColor="#555";c.style.zIndex="99";c.style.borderTopRightRadius="3px";c.style.borderTopLeftRadius="3px";d.className="core-sprite-settings-white";c.id="settingsNode";d.id="settingsButton";var g=document.getElementById("innerPanels"),h=g.getBoundingClientRect(),j=c.getBoundingClientRect();f?f.style.visibility="visible":(f=document.createElement("div"),f.className="settingsPanel",f.style.width="150px",
f.style.height="150px",f.style.backgroundColor="#555",f.style.zIndex="99",f.style.top=j.top-h.top+24-4+"px",f.id="settingsPanel",f.style.borderTopLeftRadius="3px",f.style.borderBottomRightRadius="3px",f.style.borderBottomLeftRadius="3px",g.appendChild(f),a.addAutoDismiss([d,c,f],function(){d.className="core-sprite-settings";c.style.backgroundColor="white";f.style.visibility="hidden";e=!1}));a.empty(f);b.appendTo(f)}}},generateBanner:function(b,c,l,o,r,q,p,t){function K(b){b.registerService("orion.cm.managedservice",
{updated:function(b){for(var b=b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?"_blank":"_self":"_self",c=a.$$array(".targetSelector"),d=0;d<c.length;d++)c[d].target=b}},{pid:"nav.config"})}ca(o);o=a.node(b);if(!o)throw g["could not find banner parent, id was "]+b;b=document.createRange();b.selectNode(o);b=b.createContextualFragment(B);a.processTextNodes(b,g);o.firstChild?o.insertBefore(b,o.firstChild):o.appendChild(b);b=a.node("home");b.href=i.toUrl("navigate/table.html");b.setAttribute("aria-label",
g["Orion Home"]);a.node("progressPane").src=i.toUrl("images/none.png");if(b=a.node("pageToolbar"))b.classList.add("toolbarLayout"),b.innerHTML=A+f.slideoutHTMLFragment("mainToolbar");(b=a.node("closeNotifications"))&&b.setAttribute("aria-label",g["Close notification"]);if(b=a.node("footer"))b.innerHTML=x,a.processTextNodes(b,g);l.setParameterCollector(new e.CommandParameterCollector(U,ba));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(b){if(b.charOrCode===a.KEY.ESCAPE)z.style.display="none"},!1);a.addAutoDismiss([z],function(){z.style.display="none"});var F=a.node("primaryNav");F&&w.createPageLinks(c,"orion.page.link").then(function(a){a.forEach(function(a){F.appendChild(a)})});var E=a.node("search");if(!E)throw"failed to generate HTML for banner";E.setAttribute("placeholder",
g.Search);new m.Tooltip({node:E,text:g["Type a keyword or wild card to search in root"],position:["below","left"]});var I=new u.advSearchOptContainer(E,r,c,{group:"advancedSearch"});new s.InputCompletion(E,function(a){v.getMixedSearches(c,!0,!1,function(b){var c,d=[],e=!1,f=!1;for(c in b)b[c].label&&b[c].value?(e||(d.push({type:"category",label:g["Saved searches"]}),e=!0),d.push({type:"proposal",value:{name:b[c].label,value:i.toUrl("search/search.html")+"#"+b[c].value,type:"link"}})):(f||(d.push({type:"category",
label:g["Recent searches"]}),f=!0),d.push({type:"proposal",label:b[c].name,value:b[c].name}));a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var d=c.getServiceReferences("orion.search.proposal");if(!d||d.length===0)b(null);else{var e=[];d.forEach(function(b){var d=b.getProperty("filterForMe");e.push(c.getService(b).run(a).then(function(a){for(var b={filterForMe:d,proposals:[]},c=0;c<a.length;c++){b.proposals.push({type:"category",label:a[c].category});for(var e=0;e<a[c].datalist.length;e++)b.proposals.push({type:"proposal",
label:a[c].datalist[e],value:a[c].datalist[e]})}return b}))});y.all(e).then(function(a){b(a)})}}});E.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&v.doSearch(r,c,E.value)});O(I);a.addAutoDismiss([a.node(I.containerId),a.node("advancedSearchDropDown")],function(){I.dismiss()});if(b=a.$(".split")){var o=a.$(".sidePanelLayout"),J=a.$(".mainPanelLayout");if(o&&J)C={side:o,main:J},C.splitter=new j.Splitter({node:b,sidePanel:o,mainPanel:J,toggle:!0}),b=new d.Command({name:g["Toggle side panel"],
tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){C.splitter.toggleSidePanel()}}),l.addCommand(b),l.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.CommandKeyBinding("o",!0)),p&&(C.splitter.addResizeListener(function(a){p&&a===J&&p.getTextView().resize()}),p.getTextView().setKeyBinding(new h.KeyBinding("o",!0),"toggleOutliner"),p.getTextView().setAction("toggleOutliner",function(){C.splitter.toggleSidePanel();return!0},{name:g["Toggle Outliner"]}))}b=
new d.Command({name:g["Make Favorite"],tooltip:g["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=c.getService("orion.core.favorite"),d=c.getService("orion.page.progress"),e=function(a){return function(e){e?c.getService("orion.page.message").setMessage(a.Name+
g[" is already a favorite."],2E3):d.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},f=0;f<a.length;f++){var h=a[f];d.progress(b.hasFavorite(h.ChildrenLocation||h.Location),"Checking favorite "+h.Name).then(e(h))}}});l.addCommand(b);var G=function(a,b,c){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new n.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new D.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:d,onHide:function(){c&&c.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},b=new d.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){G(r,c,p)}});p&&(p.getTextView().setKeyBinding(new h.KeyBinding("f",!0,!0,!1),b.id),p.getTextView().setAction(b.id,function(){G(r,c,p);return!0},b));l.addCommand(b);l.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new d.CommandKeyBinding("f",!0,!0));b=new d.Command({name:g["Global search"],tooltip:g["Global search"],id:"eclipse.globalSearch",callback:function(){var b=a.node("search");b&&b.focus()}});p&&(p.getTextView().setKeyBinding(new h.KeyBinding("h",!0,!1,!0),b.id),p.getTextView().setAction(b.id,function(){var b=p.getSelection(),c=null;b.end>b.start&&(c=p.getModel().getText(b.start,b.end));if(b=a.node("search")){if(c)b.value=c;b.focus()}return!0},b));l.addCommand(b);l.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new d.CommandKeyBinding("h",!0,!1,!0));b=new d.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var b=a.node("banner"),c=a.node("footer"),d=a.$(".content-fixedHeight");b.style.display==="none"?(b.style.display="block",c.style.display="block",d.classList.remove("content-fixedHeight-maximized")):(b.style.display="none",c.style.display="none",d.classList.add("content-fixedHeight-maximized"));
p&&p.getTextView().resize();return!0}});l.addCommand(b);l.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.CommandKeyBinding("m",!0,!0));p&&(p.getTextView().setKeyBinding(new d.CommandKeyBinding("m",!0,!0),b.id),p.getTextView().setAction(b.id,b.callback,b));t&&t.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});t=new d.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});l.addCommand(t);l.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.CommandKeyBinding(112,!0,!0));t=new d.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});l.addCommand(t);l.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new d.CommandKeyBinding("o",!0,!0));t=new d.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(z.style.display==="none"){var b;a.empty(z);if(p){b=document.createElement("h2");b.appendChild(document.createTextNode(g.Editor));z.appendChild(b);b=p.getTextView().getActions(!1);for(var c=0;c<b.length;c++){var d=b[c],e=d,f=p.getTextView(),h=f.getActionDescription(d);if(h&&h.name)e=h.name;d=f.getKeyBindings(d);
for(f=0;f<d.length;f++){var h=k.getUserKeyString(d[f]),j=document.createElement("span");j.role="listitem";j.appendChild(document.createTextNode(h+" = "+e));j.appendChild(document.createElement("br"));z.appendChild(j)}}}b=document.createElement("h2");b.appendChild(document.createTextNode(g.Global));z.appendChild(b);l.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});l.addCommand(t);l.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new d.CommandKeyBinding(191,
!1,!0));p&&(b=window.navigator.platform.indexOf("Mac")!==-1,p.getTextView().setKeyBinding(new d.CommandKeyBinding(191,!1,!0,!b,b),t.id),p.getTextView().setAction(t.id,t.callback,t));S(l);R(c,t.callback);L(c);window.addEventListener("hashchange",function(){l.processURL(window.location.href)},!1);window.setTimeout(function(){K(c)},0)},getToolbarElements:U,getMainSplitter:function(){return C},layoutToolbarElements:ba,setPageTarget:function(c){var d,e,f=c.breadcrumbRootName;c.target?(c.searchService&&
c.searchService.setLocationByMetaData(c.target),c.fileService&&!c.breadcrumbTarget&&(e=f?f+" ":"",e+=c.fileService.fileServiceName(c.target.Location),f=null),d=c.name||c.target.Name,$=c.target,z(c.serviceRegistry,c.target,M,c.commandService,c.makeAlternate)):(c.breadcrumbTarget||(f=f||c.task||c.name),d=c.name);(F=c.title)||(F=d?d+" - "+c.task:c.task);window.document.title=F;a.empty(a.node("location"));new b.BreadCrumbs({container:"location",resource:c.breadcrumbTarget||c.target,rootSegmentName:f,
workspaceRootSegmentName:e,makeHref:c.makeBreadcrumbLink})},setDirtyIndicator:function(b){if(F)F.charAt(0)==="*"&&!b&&(F=F.substring(1)),b&&F.charAt(0)!=="*"&&(F="*"+F),window.document.title=F;var c=a.node("dirty");if(c)c.textContent=b?"*":""},setPageCommandExclusions:function(a){M=a},notifyAuthenticationSite:o}});
define("orion/widgets/Shell","i18n!orion/widgets/nls/messages,orion/i18nUtil,gcli/index,gcli/types,gcli/types/selection,gcli/argument,gcli/ui/fields,gcli/ui/fields/menu,gcli/util,gcli/settings,gcli/canon,gcli/cli,gcli/commands/help".split(","),function(g,i,f,d,e,c,k,h,b,a,j,l,m){function n(){}n.prototype=Object.create(e.SelectionType.prototype);var p;p={CompletionStatus:{MATCH:0,PARTIAL:1,ERROR:2}};p.Shell=function(){function c(a){this._init(a.input,a.output)}c.prototype={clear:function(){for(var a=
document.getElementsByClassName("gcli-output")[0];a.hasChildNodes();)a.removeChild(a.lastChild);this.output(i.formatMessage(g["For a list of available commands type '${0}'."],"<b>help</b>"))},output:function(a){var b=new l.Output;j.commandOutputManager.onOutput({output:b});b.complete(a)},registerCommand:function(a){if(!a.exec)a.exec=a.callback;if(!a.params)a.params=a.parameters;f.addCommand(a)},registerType:function(a){function b(a){this.typeSpec=a}b.prototype=Object.create(n.prototype);b.prototype.name=
a.getName();b.prototype.parse=function(b){var c=a.parse(b,this.typeSpec),e=d.Status.VALID;if(c.status)switch(c.status){case p.CompletionStatus.ERROR:e=d.Status.ERROR;break;case p.CompletionStatus.PARTIAL:e=d.Status.INCOMPLETE}return new d.Conversion(c.value,b,e,c.message,c.predictions)};if(a.stringify)b.prototype.stringify=function(b){return a.stringify(b,this.typeSpec)};if(a.increment)b.prototype.increment=function(b){return a.increment(b,this.typeSpec)};if(a.decrement)b.prototype.decrement=function(b){return a.decrement(b,
this.typeSpec)};d.registerType(b)},setFocusToInput:function(){this.inputText.focus()},setInputText:function(a){if(a)this.inputText.value=a.toString()},addField:function(){},_init:function(c,d){function e(a,c){k.Field.call(this,a,c);this.isImportant=!0;this.element=b.createElement(this.document,"div");this.element.className="orion";this.menu=new h.Menu({document:this.document,field:!0,type:a});this.menu.onItemClick=this.onItemClick.bind(this);this.element.appendChild(this.menu.element);this.onFieldChange=
b.createEvent("CustomField.fieldChanged");this.onInputChange=this.onInputChange.bind(this)}var j=document.createElement("div");j.id="gcli-display";j.style.height="100%";j.style.width="100%";d.appendChild(j);this.inputText=document.createElement("input");this.inputText.type="text";this.inputText.id="gcli-input";this.inputText.style.width="100%";this.inputText.style.height="100%";c.appendChild(this.inputText);a.getSetting("hideIntro").value=!0;a.getSetting("eagerHelper").value=2;var l=this;setTimeout(function(){f.createDisplay();
l.output(i.formatMessage(g["For a list of available commands type '${0}'."],"<b>help</b>"))});m.startup();m.helpListHtml=m.helpListHtml.replace('"${includeIntro}"',"${false}");e.prototype=Object.create(k.Field.prototype);e.prototype.destroy=function(){k.Field.prototype.destroy.call(this);this.menu.destroy();delete this.element;delete this.menu;delete this.document;delete this.onInputChange};e.prototype.setConversion=function(a){this.setMessage(a.message);var b=[];a.getPredictions().forEach(function(a){a.hidden||
b.push({name:a.name,complete:a.name,description:a.description||""})},this);this.menu.show(b);if(a.then){var c=this;a.then(function(){c.element&&c.setConversion(c.getConversion())})}};e.prototype.onItemClick=function(a){a=a.conversion;this.onFieldChange({conversion:a});this.setMessage(a.message)};e.claim=function(a){return a instanceof n?k.Field.MATCH+1:k.Field.NO_MATCH};k.addField(e)}};return c}();return p});
define("shell/paramType-plugin",["i18n!orion/shell/nls/messages","require","orion/widgets/Shell","orion/i18nUtil","orion/Deferred"],function(g,i,f,d,e){var c;c={};var k=function(){function c(b,a){this.plugins=b;this.urlsToExclude=a}c.prototype={name:"all",getPluginLocations:function(){var b=[],a=this;this.plugins.forEach(function(c){c=c.getLocation();(!a.urlsToExclude||!a.urlsToExclude[c])&&b.push(c)});return b},isAllPlugin:function(){return!0},start:function(b){return this._invokeOnAllPlugins("start",
b)},stop:function(){return this._invokeOnAllPlugins("stop")},uninstall:function(){return this._invokeOnAllPlugins("uninstall")},update:function(){return this._invokeOnAllPlugins("update")},_invokeOnAllPlugins:function(b,a){var c=this.urlsToExclude?[]:this.plugins;if(this.urlsToExclude){var d=this;this.plugins.forEach(function(a){d.urlsToExclude[a.getLocation()]||c.push(a)})}var f=new e,g=c.length,h=0;c.forEach(function(c){c[b](a).then(function(){++h===g&&f.resolve()},function(a){f.reject(a)})});return f}};
return c}();c.ParamTypePlugin=function(){function c(b){this.pluginRegistry=b;var a=this;b.addEventListener("installed",function(){a._initPluginsList()});b.addEventListener("uninstalled",function(){a._initPluginsList()});b.addEventListener("stopping",function(){a._sort(a.plugins)});b.addEventListener("lazy activation",function(){a._sort(a.plugins)});window.setTimeout(function(){a._computeDefaultPlugins();a._initPluginsList()},1)}c.prototype={getName:function(){return"plugin"},getPlugins:function(){return this.plugins.slice(0)},
parse:function(b,a){var c=b.text||"",d=this._getPredictions(c,a.multiple,a.excludeDefaultPlugins);return this._createCompletion(c,d)},stringify:function(b){return b.name},_defaultPluginUrls:{},_computeDefaultPlugins:function(){var b=localStorage.getItem("/orion/preferences/default/plugins");if(b){var b=JSON.parse(b),a=this;Object.keys(b).forEach(function(b){var c=a._defaultPluginUrls;b=i.toUrl(b);if(b.indexOf("://")===-1){var d=document.createElement("a");d.href=b;b=d.href}c[b]=!0})}},_createCompletion:function(b,
a){for(var c,e=0;e<a.length;e++){var h=a[e];if(h.name===b){c=h;break}}var i;c?e=f.CompletionStatus.MATCH:a&&a.length>0?e=f.CompletionStatus.PARTIAL:(e=f.CompletionStatus.ERROR,i=d.formatMessage(g["'${0}' is not valid"],b));return{value:c?c.value:void 0,status:e,message:i,predictions:a}},_formatLocationAsPluginName:function(b){var a=b.split("/"),a=a[a.length-1],a=a.split(".html")[0],a=a.replace(/([a-z])([A-Z])/,"$1 $2"),a=function(a){return a.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})}(a),
a=a.replace("plugin",""),a=a.replace("Plugin","");a===""&&(a=b);return a.trim()},_getPredictions:function(b,a,c){var d=[];if(this.plugins){var e=this;this.plugins.forEach(function(a){(!c||!e._defaultPluginUrls[a.getLocation()])&&a.name.indexOf(b)===0&&d.push({name:a.name,value:a})});a&&"all".indexOf(b)===0&&d.push({name:"all",value:new k(this.plugins,c?this._defaultPluginUrls:null)})}return d},_initPluginsList:function(){this.plugins=[];var b=this;this.pluginRegistry.getPlugins().forEach(function(a){var c=
a.getLocation(),d=a.getHeaders();a.name=d.name||b._formatLocationAsPluginName(c);b.plugins.push(a)});this._sort(this.plugins)},_sort:function(b){b.sort(function(a,b){var c=a.getState(),c=c==="active"||c==="starting",d=b.getState();if(c!==(d==="active"||d==="starting"))return c?-1:1;c=a.name&&a.name.toLowerCase();d=b.name&&b.name.toLowerCase();return c<d?-1:c>d?1:0})}};return c}();return c});
define("shell/paramType-service",["i18n!orion/shell/nls/messages","orion/widgets/Shell","orion/i18nUtil"],function(g,i,f){var d;d={};d.ParamTypeService=function(){function d(c){this.pluginRegistry=c;var e=this;c.addEventListener("installed",function(){e._initServicesList()});c.addEventListener("uninstalled",function(){e._initServicesList()});window.setTimeout(function(){e._initServicesList()},1)}d.prototype={getName:function(){return"service"},parse:function(c){var c=c.text||"",d=this._getPredictions(c);
return this._createCompletion(c,d)},stringify:function(c){return c},_createCompletion:function(c,d){for(var e,b=0;b<d.length;b++){var a=d[b];if(a.name===c){e=a;break}}var j;e?b=i.CompletionStatus.MATCH:d&&d.length>0?b=i.CompletionStatus.PARTIAL:(b=i.CompletionStatus.ERROR,j=f.formatMessage(g["'${0}' is not valid"],c));return{value:e?e.value:void 0,status:b,message:j,predictions:d}},_getPredictions:function(c){var d=[];this.services&&this.services.forEach(function(e){e.indexOf(c)===0&&d.push({name:e,
value:e})});return d},_initServicesList:function(){var c={};this.pluginRegistry.getPlugins().forEach(function(d){d.getServiceReferences().forEach(function(b){b.getProperty("service.names").forEach(function(a){c[a]=!0})})});this.services=[];for(var d in c)this.services.push(d);this._sort(this.services)},_sort:function(c){c.sort(function(c,d){var b=c.toLowerCase(),a=d.toLowerCase();return b<a?-1:b>a?1:0})}};return d}();return d});
define("shell/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(g,i,f,d,e,c,k){var h={},b=(new URL(g.toUrl("."),window.location)).href.slice(0,-1);h._cloneItemWithoutChildren=function j(b){if(b===null||typeof b!=="object")return b;var c=b.constructor(),d;for(d in b)d!=="children"&&d!=="Children"&&(c[d]=j(b[d]));return c};h._createOpenWithCommands=function(b){function c(b,d){for(var e=
b.getServiceReferences("orion.navigate.openWith"),f=[],g=0;g<e.length;g++){var h=e[g];h.getProperty("editor")===d.id&&(h=h.getProperty("contentType"),h instanceof Array?f=f.concat(h):h!==null&&typeof h!=="undefined"&&f.push(h))}return f}for(var d=function(){for(var c=b.getServiceReferences("orion.edit.editor"),d=[],e=0;e<c.length;e++){var f=c[e],g=f.getProperty("id");d.push({id:g,name:f.getProperty("name"),nameKey:f.getProperty("nameKey"),nls:f.getProperty("nls"),uriTemplate:f.getProperty("orionTemplate")||
f.getProperty("uriTemplate")})}return d}(),e=function(b){for(b=b.getServiceReferences("orion.navigate.openWith.default");0<b.length;)return{editor:b[0].getProperty("editor")};return null}(b),f=[],g=0;g<d.length;g++){var h=d[g],i=e&&e.editor===h.id,k=c(b,h);k.length&&f.push({properties:{name:h.name||h.id,nameKey:h.nameKey,id:"eclipse.openWithCommand."+h.id,tooltip:h.name,tooltipKey:h.nameKey,contentType:k,uriTemplate:h.uriTemplate,nls:h.nls,forceSingleItem:!0,isEditor:i?"default":"editor"},service:{}})}return f};
h._makeValidator=function(d,f,g,h){function i(b,c,d,e){var f=d.match,g;if(c.indexOf("|")>=0)return g=c.substring(0,c.indexOf("|")),c=c.substring(c.indexOf("|")+1),i(b,g,d,e)?!0:i(b,c,d,e);else if(c.indexOf(":")>=0)return g=c.substring(0,c.indexOf(":")),c=c.substring(c.indexOf(":")+1),b[g]?i(b[g],c,d,e):!1;else{a:{g=!1;var h;if(b[c]){if(f)if(typeof f==="string"){if(!typeof(b[c]==="string")){d=!1;break a}if(d.variableName){if(f=RegExp(f).exec(b[c]))g=f[0],h=d.variableMatchPosition==="before"?b[c].substring(0,
f.index):d.variableMatchPosition==="after"?b[c].substring(f.index+g.length):d.variableMatchPosition==="only"?g:b[c],g=!0}else{d=RegExp(f).test(b[c]);break a}}else b[c]===f&&(h=b[c],g=!0);else h=b[c],g=!0;if(g&&d.variableName&&(e[d.variableName]=h,e.itemCached=b,d.replacements))for(b=0;b<d.replacements.length;b++)c=!1,d.replacements[b].pattern?e[d.variableName]=e[d.variableName].replace(RegExp(d.replacements[b].pattern),d.replacements[b].replacement||""):c=!0,c&&window.console.log("Invalid replacements specified in validation property.  "+
d.replacements[b]);d=g}else d=!1}return d}}return{info:d,validationFunction:function(b){typeof h==="function"&&(b=h.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var c=0;c<b.length;c++){var f;a:{var k=b[c],l=g;if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var u=this.info.validationProperties[f];if(u.source){if(!i(k,u.source,u,this)){f=!1;break a}}else{window.console.log("Invalid validationProperties in "+
d.id+".  No source property specified.");f=!1;break a}}if(this.info.contentType&&l){u=!1;if(k=e.getFilenameContentType(k.Name,l))for(f=0;f<this.info.contentType.length;f++)if(k.id===this.info.contentType[f]){u=!0;break}f=u}else f=!0}if(!f)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(d){if(this.info.uriTemplate){var e={},f;for(f in d)d.hasOwnProperty(f)&&(e[f]=d[f]);if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var g=
this.info.validationProperties[f];g.source&&g.variableName&&(this.itemCached===d&&this[g.variableName]||i(d,g.source,g,this),d[g.variableName]?window.console.log("Variable name "+g.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):e[g.variableName]=this[g.variableName])}e.OrionHome=b;d=new c(this.info.uriTemplate);return window.decodeURIComponent(d.expand(e))}return null}}};h._createCommandOptions=function(b,c,d,e,f,g){function r(i,k){var r=
h._makeValidator(b,d,e,g);i.visibleWhen=r.validationFunction.bind(r);if(f)if(r.generatesURI.bind(r)())i.hrefCallback=function(b){b=Array.isArray(b.items)?b.items[0]:b.items;return r.getURI.bind(r)(b)};else{var q=b;i.callback=function(b){var e;if(q.forceSingleItem)b=Array.isArray(b.items)?b.items[0]:b.items,e=h._cloneItemWithoutChildren(b);else if(Array.isArray(b.items)){e=[];for(var f=0;f<b.items.length;f++)e.push(h._cloneItemWithoutChildren(b.items[f]))}else e=h._cloneItemWithoutChildren(b.items);
if(d)var g=d.getService("orion.page.progress");c.run?g?g.progress(c.run(e),"Running command: "+i.name):c.run(e):d&&(g?g.progress(d.getService(c).run(e),"Running command: "+i.name):d.getService(c).run(e))}}k.resolve(i)}var q=new i;b.nls?k.getMessageBundle(b.nls).then(function(c){r({name:b.nameKey?c[b.nameKey]:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltipKey?c[b.tooltipKey]:b.tooltip,isEditor:b.isEditor},q)}):r({name:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltip,isEditor:b.isEditor},
q);return q};h.getOpenWithCommands=function(b){var c=[],d;for(d in b._commandList){var e=b._commandList[d];e.isEditor&&c.push(e)}return c};return h});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(g,i){function f(b,a){var c=Object.keys(b),d=Object.keys(a);if(c.length!==d.length)return!1;c.sort();d.sort();for(var e=0,f=c.length;e<f;e++){var g=c[e];if(g!==d[e])return!1;var h=b[g],g=a[g];if(h!==g&&JSON.stringify(h)!==JSON.stringify(g))return!1}return!0}function d(b){if(b.indexOf("://")===-1){var a=document.createElement("a");a.href=b;return a.href}return b}function e(b){var a=null;return{key:function(c){return(a=a||
Object.keys(b))[c]},getItem:function(a){return b[a]},setItem:function(c,d){b[c]=d;a=null},removeItem:function(c){delete b[c];a=null},clear:function(){(a=a||Object.keys(b)).forEach(function(a){delete b[a]}.bind(this));a=null}}}function c(b,a){return{type:b,plugin:a}}function k(b,a,d){function e(a,b,c){if(!x)return(new g).reject(Error("plugin not connected"));var f=J++,h=new g;h.then(null,function(a){w==="active"&&a instanceof Error&&a.name==="Cancel"&&d.postMessage({id:f,cancel:a.message||"Cancel"},
x)});L[String(f)]=h;d.postMessage({id:f,serviceId:a,method:b,params:c},x);return h.promise}function h(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return w==="active"?e(a.serviceId,c,b):q.start({"transient":!0}).then(function(){return e(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new i;b.dispatchEvent=c.dispatchEvent.bind(c);var d=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||
d(a);c.addEventListener(a,b)};var f=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&f(a)}}return b}function k(a){var c=JSON.parse(JSON.stringify(a.properties));c.__plugin__=b;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);c.objectClass=a;return c}function p(a){var b=h(a),c=k(a),c=d.registerService(a.names||a.type,b,c);A[a.serviceId]={registration:c,proxy:b}}function o(){d.persist(b,{created:v,headers:s,services:u,autostart:y,lastModified:t})}
function r(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var c=a.params[0];I({headers:c.headers,services:c.services}).then(function(){B.resolve(q)})}else if("dispatchEvent"===a.method){var e=A[a.serviceId].proxy;e.dispatchEvent.apply(e,a.params)}else if("progress"===a.method)b=L[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)B&&B.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=L[String(a.id)],delete L[String(a.id)],
a.error){var f=d.handleServiceError(q,a.error);b.reject(f)}else b.resolve(a.result)}catch(g){console.log("Plugin._responseHandler "+g)}}var q=this,a=a||{},v=a.created||(new Date).getTime(),s=a.headers||{},u=a.services||[],y=a.autostart,t=a.lastModified||0,w="installed",D,B,x,A={},J=0,L={},I;this._persist=o;this._resolve=function(){w="resolved";d.dispatchEvent(new c("resolved",q))};this._getAutostart=function(){return y};this._getCreated=function(){return v};this.getLocation=function(){return b};this.getHeaders=
function(){return JSON.parse(JSON.stringify(s))};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 t};this.getServiceReferences=function(){var a=[];Object.keys(A).forEach(function(b){a.push(A[b].registration.getReference())});return a};this.getState=function(){return w};this.start=function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));
if(D)return D.promise.then(this.start.bind(this,a));if(w==="active")return(new g).resolve();if(!a||!a["transient"]){var e=a&&a.lazy?"lazy":"started";e!==y&&(y=e,o())}e=d.getState();if(e!=="starting"&&e!=="active")return a["transient"]?(new g).reject(Error("start transient error")):(new g).resolve();if(w==="installed")try{this._resolve()}catch(f){return(new g).reject(f)}w==="resolved"&&u.forEach(function(a){p(a)});if(a&&a.lazy)return w!=="starting"&&(w="starting",d.dispatchEvent(new c("lazy activation",
q))),(new g).resolve();var h=new g;D=h;w="starting";d.dispatchEvent(new c("starting",q));B=new g;x=d.connect(b,r);B.then(function(){B=null;w="active";d.dispatchEvent(new c("started",q));D=null;h.resolve()},function(){B=null;w="stopping";d.dispatchEvent(new c("stopping",q));Object.keys(A).forEach(function(a){A[a].registration.unregister();delete A[a]});d.disconnect(x);x=null;w="resolved";D=null;d.dispatchEvent(new c("stopped",q));h.reject(Error("plugin activation error"))});return h.promise};this.stop=
function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(D)return D.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==y)y="stopped",o();if(w!=="active"&&w!=="starting")return(new g).resolve();D=a=new g;w="stopping";d.dispatchEvent(new c("stopping",q));Object.keys(A).forEach(function(a){A[a].registration.unregister();delete A[a]});x&&(d.disconnect(x),x=null);w="resolved";D=null;d.dispatchEvent(new c("stopped",q));a.resolve();return a.promise};
I=function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!a)return t===0&&(t=(new Date).getTime(),o()),d.loadManifest(b).then(I);var e=s,h=u,i=y;s=a.headers||{};u=a.services||{};y=a.autostart||y;a.lastModified?t=a.lastModified:(t=(new Date).getTime(),o());if(f(s,e)&&f(u,h)&&y===i)return(new g).resolve();if(w==="active"||w==="starting"){var l=[];Object.keys(u).forEach(function(a){var b=u[a];l.push(a);var c=A[a];if(c){if(f(b.methods,Object.keys(c.proxy))){var a=k(b),
d=c.registration.getReference(),e={};d.getPropertyKeys().forEach(function(a){e[a]=d.getProperty(a)});f(a,e)||c.registration.setProperties(a);return}c.registration.unregister();delete A[a]}p(b)});Object.keys(A).forEach(function(a){l.indexOf(a)===-1&&(A[a].registration.unregister(),delete A[a])})}w==="active"&&(d.disconnect(x),B=new g,x=d.connect(b,r),B.then(function(){B=null},function(){B=null;w="stopping";d.dispatchEvent(new c("stopping"),q);Object.keys(A).forEach(function(a){A[a].registration.unregister();
delete A[a]});d.disconnect(x);x=null;w="resolved";d.dispatchEvent(new c("stopped",q))}));return(new g).resolve()};this.update=function(a){return I(a).then(function(){d.dispatchEvent(new c("updated",q))})};this.uninstall=function(){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(w==="active"||w==="starting"||w==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));d.removePlugin(this);w="uninstalled";d.dispatchEvent(new c("uninstalled",
q));return(new g).resolve()}}var h=/^http[s]?/i;return{Plugin:k,PluginRegistry:function(b,a){function f(a){var b=a.source;p.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 a=a||{},l=a.storage||localStorage;l.getItem||(l=e(l));var m="installed",n=[],p=[],o=new i,r={},q={registerService:b.registerService.bind(b),connect:function(b,c,d){function e(a){a=
Error(a);a.name="timeout";c({method:"timeout",error:a})}var f={handler:c,url:b},g=setTimeout(e.bind(null,"Load timeout for: "+b),d||15E3),h=document.createElement("iframe");h.name=b+"_"+(new Date).getTime();if(!a.visible)h.style.display="none",h.style.visibility="hidden";h.src=b;h.onload=function(){clearTimeout(g);setTimeout(e.bind(null,"Plugin handshake timeout for: "+b),5E3)};h.sandbox="allow-scripts allow-same-origin";document.body.appendChild(h);f.target=h.contentWindow;f.close=function(){h&&
(document.body.removeChild(h),h=null)};p.push(f);return f},disconnect:function(a){for(var b=0;b<p.length;b++)if(a===p[b]){p.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<n.length;b++)if(a===n[b]){n.splice(b,1);break}l.removeItem("plugin."+a.getLocation())},persist:function(a,b){l.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{o.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new g,c=q.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],q.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(q.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return m},handleServiceError:function(a,b){if(b&&b.status===401){var c=a.getHeaders(),d=a.getName()||a.getLocation(),e=document.createElement("span");e.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(c.login)e.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=c.login,h.test(d.href)?(e.appendChild(d),e.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+c.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(e)}}if(b.__isError){var f=b,b=Error(f.message);Object.keys(f).forEach(function(a){b[a]=f[a]});delete b.__isError}return b}};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=q.getState;this.init=function(){if(!(m==="starting"||m==="active"||m==="stopping")){addEventListener("message",f,!1);for(var b=[],c=0,e=l.length;c<e;c++)b.push(l.key(c));b.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&n.push(new k(b,a,q))}});
n.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});a.plugins&&Object.keys(a.plugins).forEach(function(b){b=d(b);if(!this.getPlugin(b)){var c=a.plugins[b],c=typeof c==="object"||{};c.autostart=c.autostart||a.defaultAutostart||"lazy";n.push(new k(b,c,q))}}.bind(this));m="starting"}};this.start=function(){m!=="starting"&&this.init();if(m!=="starting")return(new g).reject("Cannot start framework. Framework is already "+m+".");var a=[],b=(new Date).getTime();n.forEach(function(c){var d=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===d)return c.start({"transient":!0});if("lazy"===d)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===d?a.push(c.start({"transient":!0})):"lazy"===d?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){m="active"})};this.stop=function(){if(m!=="starting"&&m!=="active")return(new g).reject("Cannot stop registry. Registry is already "+
m+".");m="stopping";var a=[];n.forEach(function(b){a.push(b.stop({"transient":!0}))});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",f);m="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=d(a),e=this.getPlugin(a);if(e)return(new g).resolve(e);if(r[a])return r[a];if(b)return e=new k(a,b,q),n.push(e),
e._persist(),q.dispatchEvent(new c("installed",e)),(new g).resolve(e);var f=q.loadManifest(a).then(function(b){e=new k(a,b,q);n.push(e);e._persist();delete r[a];q.dispatchEvent(new c("installed",e));return e},function(b){delete r[a];throw b;});return r[a]=f};this.getPlugins=function(){return n.slice()};this.getPlugin=function(a){var b=null,a=d(a);n.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=o.addEventListener.bind(o);this.removeEventListener=o.removeEventListener.bind(o);
this.resolvePlugins=function(){var a=!0;n.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,i,f,d,e,c){var k;return{startup:function(){if(k)return k;k=new i;var h=window.serviceRegistry=new f.ServiceRegistry,b=new d.PreferencesService(h);return b.getPreferences("/plugins").then(function(a){var d={plugins:{}};a.keys().forEach(function(b){var c=g.toUrl(b);d.plugins[c]=a[b]});var f=window.pluginRegistry=new e.PluginRegistry(h,d);return f.start().then(function(){if(h.getServiceReferences("orion.core.preference.provider").length>
0)return b.getPreferences("/plugins",b.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=g.toUrl(a);f.getPlugin(a)||b.push(f.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 c.ConfigurationAdminFactory(h,f,b)).getConfigurationAdmin().then(h.registerService.bind(h,"orion.cm.configadmin"))}).then(function(){var a=h.getService("orion.core.auth");
if(a){var b=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})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return b}}).then(function(){var a={serviceRegistry:h,preferences:b,pluginRegistry:f};k.resolve(a);return a})})}}});
define("shell/shellPageFileService",["i18n!orion/shell/nls/messages","orion/bootstrap","orion/fileClient","orion/Deferred"],function(g,i,f,d){var e;e={};var c,k;i.startup().then(function(d){k=d.serviceRegistry;c=new f.FileClient(k)});e.ShellPageFileService=function(){function e(){this.currentDirectory=null;var b=this;this.withNode(this.SEPARATOR,function(a){b.rootNode=a});this.currentRetrievals={}}e.prototype={SEPARATOR:"/",computePathString:function(b){if(b.Location===this.SEPARATOR)return this.SEPARATOR;
var a=this.SEPARATOR+c.fileServiceName(b.Location),d=b.Parents;if(d){a+=this.SEPARATOR;for(var e=d.length;--e>=0;)a+=d[e].Name,a+=this.SEPARATOR;a+=b.Name}b.Directory&&(a+=this.SEPARATOR);return a},createDirectory:function(b,a){return this._createResource(b,a,!0)},createFile:function(b,a){return this._createResource(b,a,!1)},ensureDirectory:function(b,a){var c=new d;if(typeof a!=="string")a.Directory?c.resolve(a):c.reject(g["Cannot create directory, it already exists as a file"]);else{var b=b||this.getCurrentDirectory(),
e=this;this.withChildren(b,function(d){if(d)for(var f=0;f<d.length;f++)if(d[f].Name===a){d[f].Directory?c.resolve(d[f]):c.reject(g["Cannot create directory, it already exists as a file"]);return}e.createDirectory(b,a).then(function(a){c.resolve(a)},function(a){c.reject(a)})},function(a){c.reject(a)})}return c},ensureFile:function(b,a){var c=new d;if(typeof a!=="string")a.Directory?c.reject(g["Cannot create file, it already exists as a directory"]):c.resolve(a);else{var b=b||this.getCurrentDirectory(),
e=this;this.withChildren(b,function(d){if(d)for(var f=0;f<d.length;f++)if(d[f].Name===a){d[f].Directory?c.reject(g["Cannot create file, it already exists as a directory"]):c.resolve(d[f]);return}e.createFile(b,a).then(function(a){c.resolve(a)},function(a){c.reject(a)})},function(a){c.reject(a)})}return c},getChild:function(b,a){if(a.length===0)return null;if(a===".")return b;if(a==="..")return this.getParent(b);if(!b.Children)return null;for(var c=0;c<b.Children.length;c++)if(b.Children[c].Name===
a)return b.Children[c];return null},getCurrentDirectory:function(){return this.currentDirectory},getDirectory:function(b,a){if(a.indexOf(this.SEPARATOR)===0)b=this.rootNode,a=a.substring(1);else if(!b){if(!this.currentDirectory)return null;b=this.currentDirectory}for(var c=a.substring(0,a.lastIndexOf(this.SEPARATOR)).split(this.SEPARATOR),d=b,e=0;e<c.length;e++)if(c[e].length>0&&(d=this.getChild(d,c[e]),!d||!d.Directory))return null;c=a.substring(a.lastIndexOf(this.SEPARATOR)+1);(c=this.getChild(d,
c))&&this._retrieveNode(c);d.Children||this._retrieveNode(d);return d},getParent:function(b){b.parent&&this._retrieveNode(b.parent);return b.parent},loadWorkspace:function(b){var a=k.getService("orion.page.progress");return a?a.progress(c.loadWorkspace(b),"Loading workspace "+b):c.loadWorkspace(b)},read:function(b){return c.read(b.Location,!1)},readBlob:function(b){var a=c._getService(b.Location);return!a.readBlob?(b=new d,b.reject(g["Source file service does not support binary read"]),b):a.readBlob(b.Location)},
setCurrentDirectory:function(b){this.currentDirectory=b;this._retrieveNode(b)},withChildren:function(b,a,d){if(b.Children)a&&a(b.Children);else if(b.ChildrenLocation){var e=this,f=k.getService("orion.page.progress");(f?f.progress(c.fetchChildren(b.ChildrenLocation),"Getting children of "+b.Name):c.fetchChildren(b.ChildrenLocation)).then(function(c){e._sort(c);var d=b.Parents?b.Parents.slice(0):[];d.unshift(b);for(var f=0;f<c.length;f++)c[f].parent=b,c[f].Parents=d;b.Children=c;a&&a(c)},function(a){d&&
d(a)})}else a&&a(null)},withNode:function(b,a,d){var e=this,f=k.getService("orion.page.progress");(f?f.progress(c.loadWorkspace(b),"Loading workspace "+b):c.loadWorkspace(b)).then(function(b){e._retrieveNode(b,a,d)},d)},write:function(b,a){return c.write(b.Location,a)},writeBlob:function(b,a){var e=c._getService(b.Location);return!e.writeBlob?(e=new d,e.reject(g["Target file service does not support binary write"]),e):e.writeBlob(b.Location,a)},_createResource:function(b,a,e){var f=b.Location+this.SEPARATOR+
a,g=new d,h=this.currentRetrievals[f]||[];h.push(g);if(h.length===1){this.currentRetrievals[f]=h;var i=this,k=function(b){if(e)b.Name=a;i.currentRetrievals[f].forEach(function(a){a.resolve(b)});delete i.currentRetrievals[f]},r=function(a){i.currentRetrievals[f].forEach(function(b){b.reject(a.responseText)});delete i.currentRetrievals[f]};e?b.Projects?c.createProject(b.Location,a).then(function(a){c.read(a.ContentLocation,!0).then(k,r)},r):c.createFolder(b.Location,a).then(k,r):c.createFile(b.Location,
a).then(k,r)}return g},_retrieveNode:function(b,a,d){if(b.parent&&b.Children)a&&a(b);else{var e=this,f=function(a,b,c){a.Directory&&!a.Children?e.withChildren(a,function(){b&&b(a)},c):b&&b(a)},g=function(a){if(a.Location!==e.SEPARATOR)if(a.Parents)if(a.Parents.length===0){var b=c.fileServiceRootURL(a.Location),d=k.getService("orion.page.progress");(d?d.progress(c.loadWorkspace(b),"Loading workspace "+b):c.loadWorkspace(b)).then(function(b){b.parent=e.rootNode;a.parent=b})}else{a.parent=a.Parents[0];
for(b=0;b<a.Parents.length-1;b++)a.Parents[b].parent=a.Parents[b+1],a.Parents[b].Directory=!0}else a.parent=e.rootNode};if(!b.Parents&&!b.Projects&&b.Location!==e.SEPARATOR&&b.Name!==c.fileServiceName(b.Location)){var h=k.getService("orion.page.progress");(h?h.progress(c.loadWorkspace(b.Location),"Loading workspace "+b.Location):c.loadWorkspace(b.Location)).then(function(c){b.Parents=c.Parents;g(b);f(b,a,d)})}else{if(b.ChildrenLocation)b.Directory=!0;g(b);f(b,a,d)}}},_sort:function(b){b.sort(function(a,
b){if(a.Directory!==b.Directory)return a.Directory?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})}};return e}();return e});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(g,i,f){function d(c,d,e,b,a){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=d;this.notificationContainerDomId=a;this.domId=e;this.progressDomId=b||e;this._hookedClose=!1}function e(c,d,e,b){this.statusService=c;this.progressId=d;if(e){this.deferred=e;this.begin(b);var a=this;e.then(function(){a.done.bind(a)()},function(){a.done.bind(a)()})}}
d.prototype={_init:function(){var c=i.node("closeNotifications"),d=this;c&&!this._hookedClose&&(c.addEventListener("click",function(){d.setProgressMessage("")},!1),c.addEventListener("keydown",function(c){(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)&&d.setProgressMessage("")},!1))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(c,d,e){this._init();this.currentMessage=
c;var b=i.node(this.domId);if(typeof e==="boolean"){var a=this,f=b.getAttribute("aria-live");b.setAttribute("aria-live",e?"polite":"off");window.setTimeout(function(){c===a.currentMessage&&(i.empty(b),b.appendChild(document.createTextNode(c)),window.setTimeout(function(){b.setAttribute("aria-live",f)},100))},100)}else i.empty(b),b.appendChild(document.createTextNode(c));typeof d==="number"&&(a=this,window.setTimeout(function(){c===a.currentMessage&&(i.empty(b),b.appendChild(document.createTextNode("")))},
d))},setErrorMessage:function(c){this.currentMessage=c;this._init();var d=c.responseText||c.message||c;try{d=JSON.parse(d)}catch(e){}var c=d.Message||d,b="red";if(d.Severity)switch(d.Severity){case "Warning":b="#FFCC00";break;case "Error":b="red";break;case "Info":case "Ok":b="green"}d=document.createElement("span");d.style.color=b;d.appendChild(document.createTextNode(c));c=i.node(this.domId);i.empty(c);c.appendChild(d)},setProgressMessage:function(c){this._init();this.currentMessage=c;var d=document.createElement("span");
d.classList.add("imageSprite");d.classList.add("core-sprite-progress");var e=i.node(this.progressDomId);i.empty(e);e.appendChild(d);e.appendChild(document.createTextNode(c));d=i.node(this.notificationContainerDomId);d.classList.add("progressNormal");if(c&&c.length>0)d.classList.add("slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else d.classList.remove("slideContainerActive");f.layoutToolbarElements(this._getNotifierElements())},
setProgressResult:function(c){this.currentMessage=c;var d=c.responseText||c;try{d=JSON.parse(d)}catch(e){}this._init();var b=d.Message||d,a="core-sprite-info",g="progressInfo",l=document.createElement("span");l.classList.add("imageSprite");c=[];if(d.Severity)switch(d.Severity){case "Warning":a="core-sprite-warning";g="progressWarning";c.push("progressInfo");c.push("progressError");c.push("progressNormal");break;case "Error":a="core-sprite-error";g="progressError";c.push("progressWarning");c.push("progressInfo");
c.push("progressNormal");break;default:c.push("progressWarning"),c.push("progressError"),c.push("progressNormal")}l.classList.add(a);var m=i.node(this.progressDomId),a=i.node(this.notificationContainerDomId);i.empty(m);m.appendChild(l);d.HTML?(d=document.createElement("span"),d.innerHTML=b,m.appendChild(d)):m.appendChild(document.createTextNode("   "+b));if(g&&this.progressDomId!==this.domId){a.classList.add(g);for(b=0;b<c.length;b++)a.classList.remove(c[b])}a.classList.add("slideContainerActive");
f.layoutToolbarElements(this._getNotifierElements())},showWhile:function(c,d){var e=this;if(d){e.setProgressMessage(d);var b=function(){d===e.currentMessage&&e.setProgressMessage("")};c.then(b,b)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,d){return new e(this,++this._lastProgressId,c,d)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var c="",d=!0,e;for(e in this._progressMonitors)this._progressMonitors[e].status&&(d||(c+=", "),
c+=this._progressMonitors[e].status,d=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};
d.prototype.constructor=d;e.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};e.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};e.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};e.prototype.constructor=e;return{StatusReportingService:d,ProgressMonitor:e}});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,i,f,d){function e(){}e.prototype={_initialize:function(c,e,h,b,a){this._tooltip=new d.Tooltip({node:c,hideDelay:a||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:h,trigger:b?b:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";c=document.createRange();c.selectNode(this.$parent);c=c.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(c,g);this.$parent.appendChild(c);var i=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&i.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var d=0;d<c.childNodes.length;d++){var e=c.childNodes[d];e.id&&(this["$"+e.id]=e);this._bindElements(e)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var d=
f.firstTabbable(this.$parent);d&&d.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};e.prototype.constructor=e;return{PopupDialog:e}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(g,i){var f={root:i};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,i,f,d){var e={};(function(){var c=!1;e.updateNavTools=function(d,e,b,a,i){var l=d.getService("orion.page.command"),m=f.node(b);if(m)l.destroy(m);else throw g["could not find toolbar "]+b;l.renderCommands(b,m,i,e,"button");if(a&&(b=f.node(a)))l.destroy(b),l.renderCommands(a,b,null,e,"button");c||(c=!0,d.getService("orion.page.selection").addEventListener("selectionChanged",
function(b){var c=f.node(a);if(c){var g=d.getService("orion.page.command");g.destroy(c);g.renderCommands(a,c,b.selections,e,"button")}}))};e.createOperationsCommands=function(c,e,b){function a(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new d.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){b.removeCompletedOperations().then(function(){e.loadOperations.bind(e)()})},
visibleWhen:function(){return!0}});c.addCommand(f);f=new d.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],c=0;c<a.length;c++){var d=a[c];b.removeOperation.bind(b)(d.Location).then(function(){e.loadOperations.bind(e)()},function(){e.loadOperations.bind(e)()})}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return!a(b);for(var c in b)if(a(b[c]))return!1;
return!0}});c.addCommand(f);f=new d.Command({name:g.Cancel,tooltip:g["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return a(b)&&(b.operation&&b.operation.cancelable?!0:!1);for(var c in b)if(!a(b[c])||!b[c].operation||!b[c].operation.cancelable)return!1;
return!0}});c.addCommand(f)}})();return e});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,i,f,d,e){function c(c){this._options=c}c.prototype=new d.PopupDialog;c.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>';c.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.serviceRegistry.getService("orion.page.command");e.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};c.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};c.prototype.setOperations=function(c,d){this._myOperations||
this._init(this._options);this._myOperations=[];this._operationsDeferreds=[];if(c)for(var b in c)this._myOperations.push(c[b]),this._operationsDeferreds.push(d[b]);this._renderOperations()};c.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(d){}var b={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==b.Message)b.DetailedMessage=c.DetailedMessage;return b};c.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};c.prototype._renderOperationsTable=function(c,d,b){f.empty(c);for(var a=0;a<d.length;a++){var e=d[a],i=document.createElement("tr"),m=document.createElement("td");m.style.paddingLeft="5px;";m.style.paddingRight="5px;";m.textContent=e.Name;i.appendChild(m);var n=document.createElement("div");m.appendChild(n);m=document.createElement("span");n.appendChild(m);m.classList.add("imageSprite");var p=document.createElement("span");p.classList.add("primaryColumn");
n.appendChild(p);p.appendChild(document.createTextNode(e.Name));switch(e.type){case "Warning":m.classList.add("core-sprite-warning");m.setAttribute("aria-label",g["Operation resulted in a warning."]);break;case "error":m.classList.add("core-sprite-error");m.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":m.classList.add("core-sprite-start");m.setAttribute("aria-label",g["Operation is running."]);break;case "abort":m.classList.add("core-sprite-stop");
m.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":m.classList.add("core-sprite-ok"),m.setAttribute("aria-label","Operation ok.")}if(e.error)m=e.error.Message||e.error,e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(m+=": "+e.error.DetailedMessage),n.appendChild(document.createElement("br")),p=document.createElement("span"),p.classList.add("secondaryColumn"),p.style.marginLeft="18px;",n.appendChild(p),p.textContent=m;m=document.createElement("span");
n.appendChild(m);this._commandService.renderCommands("operationsDialogItems",n,{operation:e,deferred:b[a]},this,"tool");c.appendChild(i)}this._setOperationsVisibility()};c.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"};c.prototype.constructor=c;return{OperationsDialog:c}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,i,f,d,e){function c(c,b){if(!this._progressPane){this._progressPane=d.node(c);this._operationsDialog=new e.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:b});var a=this;this._progressPane.addEventListener("keydown",function(b){(b.charOrCode===" "||b.keyCode===d.KEY.ENTER)&&a._operationsDialog.show()})}}function k(c,b,a){this._serviceRegistry=
c;this._serviceRegistration=c.registerService("orion.page.progress",this);this._operationsClient=b;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=a}c.prototype={_switchIconTo:function(c){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=c;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(c,b){var a={},d;for(d in c)c[d].progressMonitor||
(a[d]=c[d]);if(this._isEmpty(a))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in a){var f=a[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];this._progressPane.setAttribute("aria-valuetext",
g["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=g["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(a,b)},_isEmpty:function(c){for(var b in c)return!1;return!0}};c.prototype.constructon=c;k.prototype=
{init:function(d){if(!this._progressMonitorClass)this._progressMonitorTool=new c(d,this._serviceRegistry)},progress:function(c,b,a){var d=this,e=this._operationsIndex++;!a&&this._progressMonitorClass&&(a=new this._progressMonitorClass,a.begin(b));c.then(function(){if(d._operations[e]){var f=d._operations[e];if(b)f.Name=b;d._lastOperation=f;f.type="loadend";if(a)f.progressMonitor=a;d.writeOperation.bind(d)(e,f,c);f.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(d._operations[e]){var g=
d._operations[e];if(b)g.Name=b;if(a)g.progressMonitor=a;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,c);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(b)f.Name=b;if(a)f.progressMonitor=a;d.writeOperation.bind(d)(e,f,c)});return c},removeOperation:function(c){for(var b in this._operations)if(this._operations[b].Location&&this._operations[b].Location===c){this._removeOperationFromTheList(b);break}this._operationsClient.removeOperation.bind(this._operationsClient)(c)},
_removeOperationFromTheList:function(c){var b=this._operations[c].progressMonitor;delete this._operations[c];delete this._operationDeferrds[c];b?b.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var c in this._operations){var b=this._operations[c];if(b.type&&b.type!=="loadstart"&&b.type!=="progress")(b=this._operations[c].progressMonitor)&&b.done(),delete this._operations[c],delete this._operationDeferrds[c]}this._progressMonitorTool.generateOperationsInfo(operations,
this._operationDeferrds)},setProgressResult:function(c){this._serviceRegistry.getService("orion.page.message").setProgressResult(c)},showWhile:function(c,b){b&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(b);var a=this;c.then(function(){a._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(b){a.setProgressResult.bind(a)(b);return b});return this.progress(c,b)},writeOperation:function(c,b,a){this._operations[c]=b;this._operationDeferrds[c]=
a;b.Location&&serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(a){a.put(b.Location,{Name:b.Name,expires:b.expires})});b.progressMonitor?b.progressMonitor.progress(b.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};k.prototype.constructor=k;return{ProgressService:k}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,i){function f(c,d,b){return c[d].apply(c,b)}function d(c){this._location=c}function e(){var c=new i;c.reject(g["No Matching OperationService for location:"]+this._location);return c}function c(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var e=c.getServiceReferences("orion.core.operation"),
b=0;b<e.length;b++){var a=c.getService(e[b]);this._services[b]=a;a=e[b].getProperty("pattern")||".*";a[0]!=="^"&&(a="^"+a);this._patterns[b]=RegExp(a)}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 d(a)}}d.prototype={getOperation:e,getOperations:e,removeCompletedOperations:e,removeOperation:e,cancelOperation:e};d.prototype.constructor=d;c.prototype={getOperations:function(){var c=
new i;if(this._operations)return c.resolve(this._operations),c;var d=this;this._preferenceService.getPreferences("/operations").then(function(b){d._operations=b;c.resolve(d._operations)});return c},getOperation:function(c){return f(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],d=this,b=0;b<this._services.length;b++){var a=this._patterns[b],e=new i;c[b]=e.promise;f(this._services[b],"removeCompletedOperations").then(function(b){return function(c){Array.isArray(c)&&
d.getOperations.bind(d)().then(function(d){for(var e=d.keys(),f=0;f<e.length;f++){var g=e[f];a.test(g)&&c.indexOf(g)<0&&d.remove(g)}b.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return i.all(c)},removeOperation:function(c){var d=this;return f(this._getService(c),"removeOperation",arguments).then(function(){d.getOperations.bind(d)().then(function(b){b.remove(c)})},function(b){return b},function(b){return b})}};c.prototype.constructor=c;return{OperationsClient:c}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(i){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,d=f.exec(i),e=[],c=0;d;){if(d.length===3&&d[2].length>0){var k=new URL(d[2]);k.protocol!==":"&&g.validateURLScheme(k.href)&&(d.index>c&&e.push({segmentStr:i.substring(c,d.index)}),e.push({segmentStr:d[1].length>0?d[1]:d[2],urlStr:d[2]}),c=d.index+d[0].length)}d=f.exec(i)}if(c===0)return null;c<i.length-1&&e.push({segmentStr:i.substring(c)});return e},processURLSegments:function(g,
f){f.forEach(function(d){if(d.urlStr){var e=document.createElement("a");e.href=d.urlStr;e.appendChild(document.createTextNode(d.segmentStr))}else e=document.createElement("span"),e.textContent=d.segmentStr;g.appendChild(e)})}}});
define("shell/resultWriters",["orion/Deferred","orion/urlUtils"],function(g,i){var f;f={};f.FileBlobWriter=function(){function d(d,c){this.destination=d;this.shellPageFileService=c;this.blobs=[]}d.prototype={addBlob:function(d){this.blobs.push(d)},write:function(){var d=new g,c=this;this.shellPageFileService.ensureFile(null,this.destination).then(function(f){c.shellPageFileService.writeBlob(f,c.blobs[0]).then(function(){d.resolve()},function(c){d.reject(c)})},function(c){d.reject(c)});return d}};
return d}();f.FileStringWriter=function(){function d(d,c){this.destination=d;this.shellPageFileService=c;this.value=""}d.prototype={appendNewline:function(){this.value+="\n"},appendText:function(d){this.value+=d},write:function(){var d=new g,c=this;this.shellPageFileService.ensureFile(null,this.destination).then(function(f){c.shellPageFileService.write(f,c.value).then(function(){d.resolve()},function(c){d.reject(c)})},function(c){d.reject(c)});return d}};return d}();f.ShellBlobWriter=function(){function d(d){this.rootElement=
d;this.blobCount=0}d.prototype={addBlob:function(){this.blobCount++},write:function(){var d=new g,c=document.createElement("span");c.textContent="("+this.blobCount+" blobs)";this.rootElement.appendChild(c);d.resolve();return d}};return d}();f.ShellStringWriter=function(){function d(d){this.rootElement=d;this.tempRoot=document.createElement("div")}d.prototype={appendNewline:function(){this.tempRoot.appendChild(document.createElement("br"))},appendText:function(d){var c=document.createElement("span"),
f=i.detectValidURL(d);f?i.processURLSegments(c,f):c.textContent=d;this.tempRoot.appendChild(c)},write:function(){for(var d=new g,c=this.tempRoot.childNodes;c.length>0;)this.rootElement.appendChild(c[0]);d.resolve();return d}};return d}();return f});
define("shell/paramType-file",["i18n!orion/shell/nls/messages","orion/widgets/Shell","orion/i18nUtil","orion/Deferred","shell/resultWriters"],function(g,i,f,d,e){function c(c,b,a,d){this.value=c;this.typeSpec=b;this.typedPath=a;this.shellPageFileService=d}var k;k={};c.prototype={getPluginRepresentation:function(){var c=new d;if(typeof this.value==="string")c.resolve({file:{path:this.value}});else{var b=this.typedPath.lastIndexOf(this.shellPageFileService.SEPARATOR,this.typedPath.length-2),a=b!==-1?
this.typedPath.substring(0,b):".",e=this,f=0,g=this.value.slice(0),i=[],k=function(a){a&&i.push(a);f===0&&g.length===0&&(e.typeSpec.multiple?c.resolve(i):c.resolve(i[0]))},o=function(){for(;g.length>0;){var b=g[0],c={isDirectory:b.Directory,path:a};b.recursePath&&b.recursePath.forEach(function(a){c.path+=e.shellPageFileService.SEPARATOR+a});c.path+=e.shellPageFileService.SEPARATOR+b.Name;b.Directory&&e.typeSpec.multiple&&e.typeSpec.recurse&&function(a){f++;e.shellPageFileService.withChildren(a,function(b){f--;
var c=a.recursePath?a.recursePath.slice(0):[];c.push(a.Name);b.forEach(function(a){a.recursePath=c});g.push.apply(g,b);g.length===b.length&&(b.length===0?k():o())},function(){f--;k()})}(b);g.splice(0,1);e.typeSpec.content&&!c.isDirectory?function(a){f++;e.shellPageFileService.readBlob(b).then(function(b){f--;a.blob=b;k(a)},function(){f--;k(a)})}(c):k(c)}};o()}return c},getValue:function(){return this.value},resourceExists:function(){return typeof this.value!=="string"},stringify:function(){return this.typedPath}};
k.ParamTypeFile=function(){function d(b){this.shellPageFileService=b}d.prototype={getName:function(){return"file"},parse:function(b,a){var c=b.text||"",d=this._getPredictions(c);return this._createCompletion(c,d,a)},processResult:function(b,a,c,d){var h=document.createElement("div"),i=this,k=0,o=function(a){this.callback=function(){var c=f.formatMessage(g["Wrote ${0}"],typeof a==="string"?a:i.shellPageFileService.computePathString(a)),j=new e.ShellStringWriter(h);j.appendText(c);j.appendNewline();
j.write();--k!==0||d?b.progress(h):b.resolve(h)};return this},r=function(a){this.callback=function(c){var j=f.formatMessage(g["Failed to write ${0}"],typeof a==="string"?a:i.shellPageFileService.computePathString(a));j+=" ["+c+"]";c=new e.ShellStringWriter(h);c.appendText(j);c.appendNewline();c.write();--k!==0||d?b.progress(h):b.resolve(h)};return this},c=c||this.shellPageFileService.getCurrentDirectory();k++;this.shellPageFileService.ensureDirectory(null,c).then(function(b){k--;var c=a.getValue();
a.isArray()||(c=[c]);c.forEach(function(a){k++;for(var c=a.path.split(i.shellPageFileService.SEPARATOR),d=0;d<c.length;){var h=c[d];if(h===".")c.splice(d,1);else if(h===".."){if(d===0){r(f.formatMessage(g["Cannot write ${0}, it is not a descendent of the output directory"],a.path));return}c.splice(d-- -1,2)}else d++}var j=function(a,b,c){var d=c[0];c.splice(0,1);var f=i.shellPageFileService.computePathString(a)+i.shellPageFileService.SEPARATOR+d;c.length===0?b.isDirectory?i.shellPageFileService.ensureDirectory(a,
d).then(o(f).callback,r(f).callback):i.shellPageFileService.ensureFile(a,d).then(function(a){var c=new e.FileBlobWriter(a,i.shellPageFileService);c.addBlob(b.blob);c.write().then(o(a).callback,r(a).callback)},r(f).callback):i.shellPageFileService.ensureDirectory(a,d).then(function(a){j(a,b,c)},r(i.shellPageFileService.computePathString(a)+i.shellPageFileService.SEPARATOR+d).callback)};j(b,a,c)})},r(c).callback)},stringify:function(b){return typeof b==="string"?b:b.stringify()},_createCompletion:function(b,
a,d){if(!a)return{value:void 0,status:i.CompletionStatus.ERROR,message:f.formatMessage(g["'${0}' is not valid"],b),predictions:null};var e,h,k;if(d.exist===!1){var p;for(h=0;h<a.length;h++){var o=a[h];if(o.name===b){p=o;break}}p?(h=i.CompletionStatus.ERROR,e=f.formatMessage(g["'${0}' already exists"],b)):(h=i.CompletionStatus.MATCH,k=new c(b,d,b,this.shellPageFileService));a=[]}else{var r=[];a.forEach(function(a){(a.value.Directory||d.file)&&r.push(a)});a=r;if(d.exist){var q=[];p=b.replace(/[\-(){}\[\]+,.\\\^$|#]/g,
"\\$&");p=p.replace(/\?/g,".");p=p.replace(/\*/g,".*");var v=RegExp("^"+p+"$");a.forEach(function(a){a.name.match(v)&&(a.value.Directory&&d.directory||!a.value.Directory&&d.file)&&q.push(a.value)});d.multiple&&q.length||q.length===1?(h=i.CompletionStatus.MATCH,k=new c(q,d,b,this.shellPageFileService)):a.length?h=i.CompletionStatus.PARTIAL:(h=i.CompletionStatus.ERROR,e=f.formatMessage(g["'${0}' is not valid"],b))}else{for(h=0;h<a.length;h++)if(o=a[h],o.name===b){p=o;break}h=i.CompletionStatus.MATCH;
k=p?new c([p.value],d,b,this.shellPageFileService):new c(b,d,b,this.shellPageFileService)}}return{value:k,status:h,message:e,predictions:a}},_find:function(b,a){for(var c=0;c<b.length;c++)if(a(b[c]))return b[c];return null},_getPredictions:function(b){var a=this.shellPageFileService.getDirectory(null,b);if(!a)return null;var c=a.Children||[],d=b.lastIndexOf(this.shellPageFileService.SEPARATOR)+1,e=b.substring(0,d),f=b.substring(d),g=f.length===0||f===".",b=[],d=[];g&&b.push({name:e+".",value:a,incomplete:!0});
if(g||f==="..")(g=this.shellPageFileService.getParent(a))&&b.push({name:e+"..",value:g,incomplete:!0});f.trim().length===0&&e.length>0&&b.push({name:e,value:a,incomplete:!1});a=f.replace(/[\-(){}\[\]+,.\\\^$|#]/g,"\\$&");a=a.replace(/\?/g,".");a=a.replace(/\*/g,".*");f=RegExp("^"+a);for(g=0;g<c.length;g++){var h=c[g];if(h.Name.match(f)){var i=!h.Directory||h.Children&&h.Children.length===0,a=e+h.Name;h.Directory?b.push({name:a,value:h,incomplete:!i}):d.push({name:a,value:h,incomplete:!i})}}return b.concat(d)}};
return d}();return k});
define("shell/shellPage","i18n!orion/shell/nls/messages,orion/bootstrap,orion/commands,orion/fileClient,orion/searchClient,orion/globalCommands,orion/widgets/Shell,orion/webui/treetable,shell/shellPageFileService,shell/paramType-file,shell/paramType-plugin,shell/paramType-service,orion/i18nUtil,shell/extensionCommands,orion/contentTypes,orion/pluginregistry,orion/PageUtil,orion/URITemplate,orion/Deferred,orion/status,orion/progress,orion/operationsClient,shell/resultWriters".split(","),function(g,
i,f,d,e,c,k,h,b,a,j,l,m,n,p,o,r,q,v,s,u,y,t){function w(){var a=r.matchResourceParameters(window.location.href).resource;return a.length>0?a:null}function D(a){a=(new q(ga)).expand({resource:a});window.location.href=a}function B(a){for(var b=0;b<P.length;b++){var c=P[b];if(c.visibleWhen(a))return c.hrefCallback({items:a})}b=fa.getFileContentType(a);switch(b&&b.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return a.Location}c=null;for(b=
0;b<P.length;b++)if(P[b].isEditor==="default"){c=P[b];break}return!c?a.Location:c.hrefCallback({items:a})}function x(a){var b=document.createElement("a");if(a.Directory)return b.href="#"+a.Location,b.className="shellPageDirectory",b.textContent=a.Name,b;b.href=B(a);b.target="_blank";b.textContent=a.Name;return b}function A(a){var b=document.createElement("span");b.appendChild(document.createTextNode(g["Changed to: "]));var c=document.createElement("b");c.appendChild(document.createTextNode(a));b.appendChild(c);
return b}function J(a){a=a.directory.value[0];C.setCurrentDirectory(a);V=!0;D(a.Location);a=C.computePathString(a);return A(a)}function L(a){a=B(a.file.getValue()[0]);window.open(a)}function I(a,b){var c=b.createPromise(),d=C.getCurrentDirectory(),d=d?d.Location:w()||Z;C.loadWorkspace(d).then(function(a){C.setCurrentDirectory(a);C.withChildren(a,function(a){for(var b=document.createElement("div"),d=0;d<a.length;d++)b.appendChild(x(a[d])),b.appendChild(document.createElement("br"));c.resolve(b);setTimeout(function(){for(var a=
N.querySelectorAll(".shellPageDirectory"),b=0;b<a.length;b++)a[b].setAttribute("target","_self"),a[b].className=""},1)},function(a){aa(c,a)})},function(a){aa(c,a)});return c}function R(a,b){var c=b.createPromise(),d=C.getCurrentDirectory();C.loadWorkspace(d.Location).then(function(a){var a=C.computePathString(a),b=document.createElement("b");b.appendChild(document.createTextNode(a));c.resolve(b)},function(a){aa(c,a)});return c}function O(a){var b=document.createElement("div");a.plugin.getServiceReferences().forEach(function(a){var c=
{values:[]};a.getPropertyKeys().forEach(function(b){if(b==="service.names")c.name=a.getProperty(b).join();if(b==="id")c.id=a.getProperty(b);c.values.push({name:b,value:a.getProperty(b)})});if(c.name){c.elementId="serviceElement"+X++;c.values.forEach(function(a){a.elementId="serviceElement"+X++});var d=document.createElement("div");b.appendChild(d);var e=new ja,d=new h.TableTree({model:new ia(c),showRoot:!0,parent:d,renderer:e});e.tableTree=d}});return b}function K(){for(var a=W.getPlugins(),b=document.createElement("table"),
c=0;c<a.length;c++){var d=document.createElement("tr");b.appendChild(d);var e=document.createElement("td");d.appendChild(e);d=document.createElement("b");e.appendChild(d);d.textContent=a[c].name;d=a[c].getState();if(d!=="active"&&d!=="starting")d=document.createElement("span"),e.appendChild(d),d.textContent=" ("+g.disabled+")"}return b}function z(a,b){var c=b.createPromise();a.plugin.stop().then(function(){c.resolve(g.Succeeded)},function(a){c.resolve(a)});return c}function S(a,b){var c=b.createPromise();
a.plugin.start({lazy:!0}).then(function(){c.resolve(g.Succeeded)},function(a){c.resolve(a)});return c}function ca(a,b){var c=a.url.trim();if(/^\S+$/.test(c)){if(Q.getPlugin(c))return g["Plug-in is already installed"];var d=b.createPromise();Q.installPlugin(c).then(function(a){a.start({lazy:!0}).then(function(){T.getPreferences("/plugins").then(function(a){a.put(c,!0)});d.resolve(g.Succeeded)},function(a){d.resolve(a)})},function(a){d.resolve(a)});return d}return g["Invalid plug-in URL"]}function U(a,
b){var c=b.createPromise();a.plugin.update().then(function(){c.resolve(g.Succeeded)},function(a){c.resolve(a)});return c}function ba(a,b){var c=b.createPromise();if(a.plugin.isAllPlugin){if(!window.confirm(g["Are you sure you want to uninstall all contributed plug-ins?"]))return g.Aborted;a.plugin.uninstall().then(function(){T.getPreferences("/plugins").then(function(b){for(var c=a.plugin.getPluginLocations(),d=0;d<c.length;d++)b.remove(c[d])}.bind(this));c.resolve(g.Succeeded)},function(a){c.resolve(a)})}else{var d=
a.plugin.getLocation();Q.getPlugin(d).uninstall().then(function(){T.getPreferences("/plugins").then(function(a){a.remove(d)}.bind(this));c.resolve(g.Succeeded)},function(a){c.resolve(a)})}return c}function Y(a){var b=a.id.trim(),c=document.createElement("div");W.getPlugins().forEach(function(a){a.getServiceReferences().forEach(function(d){if(d.getProperty("service.names").indexOf(b)!==-1){var e={name:a.name,values:[]};d.getPropertyKeys().forEach(function(a){if(a==="id")e.id=d.getProperty(a);e.values.push({name:a,
value:d.getProperty(a)})});e.elementId="serviceElement"+X++;e.values.forEach(function(a){a.elementId="serviceElement"+X++});var f=document.createElement("div");c.appendChild(f);var g=new ja,f=new h.TableTree({model:new ia(e),showRoot:!0,parent:f,renderer:g});g.tableTree=f}})});return c}function G(a,b){typeof a!=="string"&&(a=a.xhr&&a.xhr.statusText?a.xhr.statusText:a.toString());a.split("\n").forEach(function(a){b.appendText(a);b.appendNewline()});return b.write()}function E(a,b,c,d){var e,f;c?f=
new t.FileBlobWriter(c,C):(e=document.createElement("div"),f=new t.ShellBlobWriter(e));c=b.getValue();b.isArray()||(c=[c]);c.forEach(function(a){f.addBlob(a)});f.write().then(function(){d?a.progress(e):a.resolve(e)},function(b){e=e||document.createElement("div");f=new t.ShellStringWriter(e);G(b,f).then(function(){a.reject(e)},function(){a.reject()})})}function $(a,b,c,d){var e,f;c?f=new t.FileStringWriter(c,C):(e=document.createElement("div"),f=new t.ShellStringWriter(e));G(b.stringify(),f).then(function(){d?
a.progress(e):a.resolve(e)},function(b){e=e||document.createElement("div");f=new t.ShellStringWriter(e);G(b,f).then(function(){a.reject(e)},function(){a.reject()})})}function M(a,b,c,d){var e=b.getType();e==="file"?da.processResult(a,b,c,d):e==="blob"?E(a,b,c,d):$(a,b,c,d)}function F(a,b,c,d,e){return typeof a.callback!=="function"?void 0:function(f){var g=new v,h=null;if(e)(h=f.output)&&(h=h.resourceExists()?h.getValue()[0]:h.getValue()),delete f.output;(function(a,b){var c=Object.keys(a);if(c.length===
0)b(a);else{var d=0;c.forEach(function(e){(function(e){(function(a,b){a&&a.getPluginRepresentation?a.getPluginRepresentation().then(function(a){b(a)}):b(a)})(a[e],function(f){a[e]=f;++d===c.length&&b(a)})})(e)})}})(f,function(e){c.progress(a.callback(e,{cwd:w()}),"Executing command "+function(a,b){var c=a,d;for(d in b)c+=" ",c+=b[d];return c}(b,f)).then(function(a){a=new ha(a,d);M(g,a,h)},function(a){aa(g,a)},function(a){typeof g.progress==="function"&&(a=new ha(a,d),M(g,a,h,!0))})});return g}}var C,
ea,N,da,V=!1,fa,P=[],H,Q,W,T,X=0,Z="/file",ga="{OrionHome}/shell/shellPage.html#{,resource}",ha=function(){function a(b,c){this.value=b;this.array=!1;if(c.indexOf("[")===0&&c.lastIndexOf("]")===c.length-1)this.array=!0,c=c.substring(1,c.length-1);this.type=c}a.prototype={getType:function(){return this.type},getValue:function(){return this.value},isArray:function(){return this.array},stringify:function(){if(this.type!=="string")return"("+(this.array?"[":"")+this.value+(this.array?"]":"")+")";if(!this.array)return this.value;
for(var a="",b=0;b<this.value.length;b++)a+=this.value[b],b!==this.value.length-1&&(a+="\n");return a}};return a}(),ia=function(){function a(b){this.root=b}a.prototype={getRoot:function(a){a(this.root)},getChildren:function(a,b){b(a.values)},getId:function(a){return a.elementId}};return a}(),ja=function(){function a(){}a.prototype={getTwistieElementId:function(a){return a+"__expand"},initTable:function(){},labelColumnIndex:function(){return 0},render:function(a,b){b.className+=" treeTableRow";var c=
document.createElement("td");b.appendChild(c);if(a.value)c=document.createElement("td"),b.appendChild(c),c.textContent=a.name,c=document.createElement("td"),b.appendChild(c),c.textContent=a.value;else{var d=document.createElement("span");c.appendChild(d);c=document.createElement("span");c.id=this.getTwistieElementId(b.id);d.appendChild(c);c.className="modelDecorationSprite core-sprite-closedarrow";var e=this;c.onclick=function(){e.tableTree.toggle(b.id)};c=document.createElement("td");b.appendChild(c);
d=document.createElement("b");c.appendChild(d);d.textContent=a.name;if(a.id)d=document.createElement("span"),c.appendChild(d),d.textContent=" ("+a.id+")";c.colSpan="2"}},updateExpandVisuals:function(a,b){var c=document.getElementById(this.getTwistieElementId(a.id));if(c){var d=c.className;b?(d+=" core-sprite-openarrow",d=d.replace(/\s?core-sprite-closedarrow/g,"")):(d+=" core-sprite-closedarrow",d=d.replace(/\s?core-sprite-openarrow/g,""));c.className=d}}};return a}(),aa=function(a,b){var c=b;try{c=
JSON.parse(b.responseText)}catch(d){}c&&c.Message?c=m.formatMessage(g["Error: ${0}"],c.Message):typeof b.url==="string"&&(c=b.status===0?m.formatMessage(g.NoResponseFromServer,b.url):m.formatMessage(g.ServerError,b.url,b.status,b.statusText));var e=document.createElement("span");e.textContent=c;a.resolve(e)};i.startup().then(function(h){Q=h.pluginRegistry;H=h.serviceRegistry;T=h.preferences;h=new f.CommandService({serviceRegistry:H});ea=new d.FileClient(H);var i=new e.Searcher({serviceRegistry:H,
commandService:h,fileService:ea}),o=new y.OperationsClient(H);new s.StatusReportingService(H,o,"statusPane","notifications","notificationArea");new u.ProgressService(H,o);c.generateBanner("orion-shellPage",H,h,T,i);c.setPageTarget({task:g.Shell});N=document.getElementById("shell-output");var h=document.getElementById("shell-input"),t=new k.Shell({input:h,output:N});N.onmousedown=function(a){N.onmouseup=null;if(a.button===0&&a.target.tagName.toUpperCase()==="DIV")N.onmouseup=function(b){N.onmouseup=
null;b.target===a.target&&Math.abs(b.clientX-a.clientX)<=2&&Math.abs(b.clientY-a.clientY)<=2&&t.setFocusToInput()}};var v=r.matchResourceParameters(window.location.href);if(v.command)t.setInputText(v.command),delete v.command,h=(new q(ga)).expand(v),window.location.href=h;t.setFocusToInput();C=new b.ShellPageFileService;h=w();C.loadWorkspace(h||Z).then(function(a){C.setCurrentDirectory(a)});h||(V=!0,D(Z));da=new a.ParamTypeFile(C);t.registerType(da);W=new j.ParamTypePlugin(Q);t.registerType(W);h=
new l.ParamTypeService(Q);t.registerType(h);t.registerCommand({name:"cd",description:g["Changes the current directory"],callback:J,parameters:[{name:"directory",type:{name:"file",directory:!0,exist:!0},description:g["The name of the directory"]}],returnType:"html"});t.registerCommand({name:"edit",description:g["Edits a file"],callback:L,parameters:[{name:"file",type:{name:"file",file:!0,exist:!0},description:g["The name of the file"]}]});t.registerCommand({name:"ls",description:g["Lists the files in the current directory"],
callback:I,returnType:"html"});t.registerCommand({name:"pwd",description:g["Prints the current directory location"],callback:R,returnType:"html"});t.registerCommand({name:"clear",description:g["Clears the shell screen"],callback:function(){t.clear()}});t.registerCommand({name:"plugins",description:g["Commands for working with plug-ins"]});t.registerCommand({name:"plugins list",description:g["Lists all registered plug-ins"],callback:K,returnType:"html"});t.registerCommand({name:"plugins install",description:g["Installs a plug-in from a URL"],
callback:ca,parameters:[{name:"url",type:"string",description:g["The plug-in URL"]}],returnType:"string"});t.registerCommand({name:"plugins uninstall",description:g["Uninstalls a contributed plug-in from the configuration"],callback:ba,parameters:[{name:"plugin",type:{name:"plugin",multiple:!0,excludeDefaultPlugins:!0},description:g["The name of the contributed plug-in"]}],returnType:"string"});t.registerCommand({name:"plugins reload",description:g["Reloads a plug-in"],callback:U,parameters:[{name:"plugin",
type:{name:"plugin",multiple:!0,excludeDefaultPlugins:!1},description:g["The name of the plug-in"]}],returnType:"string"});t.registerCommand({name:"plugins enable",description:g["Enables a contributed plug-in"],callback:S,parameters:[{name:"plugin",type:{name:"plugin",multiple:!0,excludeDefaultPlugins:!0},description:g["The name of the contributed plug-in"]}],returnType:"string"});t.registerCommand({name:"plugins disable",description:g["Disables a contributed plug-in"],callback:z,parameters:[{name:"plugin",
type:{name:"plugin",multiple:!0,excludeDefaultPlugins:!0},description:g["The name of the contributed plug-in"]}],returnType:"string"});t.registerCommand({name:"plugins services",description:g["Displays a plug-in's services"],callback:O,parameters:[{name:"plugin",type:{name:"plugin",multiple:!1,excludeDefaultPlugins:!1},description:g["The name of the plug-in"]}],returnType:"html"});t.registerCommand({name:"service",description:g["Commands for working with a service"]});t.registerCommand({name:"service contributors",
description:g["Displays all plug-in contributions for a service"],callback:Y,parameters:[{name:"id",type:"service",description:g["The service identifier"]}],returnType:"html"});fa=new p.ContentTypeService(H);H.getService("orion.core.contenttypes").getContentTypes().then(function(a){for(var b=n._createOpenWithCommands(H,a),c=function(a){P.push(a)},d=0;d<b.length;d++)n._createCommandOptions(b[d].properties,b[d].service,H,a,!0).then(c)});for(var h=H.getServiceReferences("orion.shell.command"),x=H.getService("orion.page.progress"),
i=0;i<h.length;++i){var o=h[i],B=H.getService(o);if(B){for(var v=o.getProperty("parameters")||[],E,G=0;G<v.length;G++)if(v[G].name==="output"){E=!0;break}E||v.push({name:"output",type:{name:"file",file:!0,directory:!0},description:g["The file or directory to re-direct output to"],defaultValue:null});var M=o.getProperty("returnType")||"string";o.getProperty("nls")&&o.getProperty("descriptionKey")?m.getMessageBundle(o.getProperty("nls")).then(function(a,b){var c=a.getProperty("name");t.registerCommand({name:c,
description:b[a.getProperty("descriptionKey")],callback:F(B,c,x,M,!E),returnType:"html",parameters:v,manual:b[a.getProperty("manual")]})},o):(G=o.getProperty("name"),t.registerCommand({name:G,description:o.getProperty("description"),callback:F(B,G,x,M,!E),returnType:"html",parameters:v,manual:o.getProperty("manual")}))}}window.addEventListener("hashchange",function(){if(V)V=!1;else{var a=window.location.hash.substring(1);a.length===0&&(a=Z);C.loadWorkspace(a).then(function(a){if(C.getCurrentDirectory().Location!==
a.Location){C.setCurrentDirectory(a);var b=C.computePathString(a);t.output(A(b));D(a.Location)}})}})})});