/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/**
 * @license 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). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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 RequireJS text 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * 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). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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


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


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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(f,i){typeof define==="function"&&define.amd?define("orion/Deferred",[],i):typeof exports==="object"?module.exports=i():(f.orion=f.orion||{},f.orion.Deferred=i())})(this,function(){function f(){for(var j;j=h.shift()||a.shift();)j();e=!1}function i(j,b){(b?a:h).push(j);e||(e=!0,b?setTimeout(f,0):f())}function g(a){return function(){a.apply(null,arguments)}}function c(){}function b(){var a=Error("Cancel");a.name="Cancel";return a}function d(){function a(){for(var j;j=k.shift();){var b=j.deferred,
d=l==="resolved"?"resolve":"reject";if(typeof j[d]==="function")try{var m=j[d](e);m&&typeof m.then==="function"?(b.cancel=m.cancel||c,m.then(g(b.resolve),g(b.reject),b.progress)):b.resolve(m)}catch(h){b.reject(h)}else b[d](e)}}var e,l,k=[],h=this;this.reject=function(b){l||(l="rejected",e=b,k.length&&i(a));return h.promise};this.resolve=function(b){l||(l="resolved",e=b,k.length&&i(a));return h.promise};this.progress=function(a){l||k.forEach(function(e){e.progress&&e.progress(a)});return h.promise};
this.cancel=function(){l||h.reject(b())};this.then=function(e,b,n){var e={resolve:e,reject:b,progress:n,deferred:new d},m=e.deferred,c=this.cancel.bind(this),h=function(){i(function(){(m.cancel===h?c:m.cancel)()},!0)};m.cancel=h;b=m.promise;b.cancel=function(){m.cancel()};k.push(e);l&&i(a,!0);return b};this.promise={then:this.then,cancel:this.cancel}}var h=[],a=[],e=!1;d.all=function(a,e){function b(a,e){g||(h[a]=e,--c===0&&f.resolve(h))}function k(a,j){if(!g){if(e)try{b(a,e(j));return}catch(k){j=
k}f.reject(j)}}var c=a.length,h=[],g=!1,f=new d;f.then(null,function(){g=!0;a.forEach(function(a){a.cancel&&a.cancel()})});c===0?f.resolve(h):a.forEach(function(a,e){a.then(b.bind(null,e),k.bind(null,e))});return f.promise};d.when=function(a,e,b,k){var c;if(!(a&&typeof a.then==="function"))c=new d,c.resolve(a),a=c.promise;return a.then(e,b,k)};return d});
define("orion/EventTarget",[],function(){function f(){this._namedListeners={}}f.prototype={dispatchEvent:function(f){if(!f.type)throw Error("unspecified type");var g=this._namedListeners[f.type];g&&g.forEach(function(c){try{typeof c==="function"?c(f):c.handleEvent(f)}catch(b){typeof console!=="undefined"&&console.log(b)}});return!f.defaultPrevented},addEventListener:function(f,g){if(typeof g==="function"||g.handleEvent)this._namedListeners[f]=this._namedListeners[f]||[],this._namedListeners[f].push(g)},
removeEventListener:function(f,g){var c=this._namedListeners[f];if(c)for(var b=0;b<c.length;b++)if(c[b]===g){c.length===1?delete this._namedListeners[f]:c.splice(b,1);break}}};f.prototype.constructor=f;f.attach=function(i){var g=new f;i.dispatchEvent=g.dispatchEvent.bind(g);i.addEventListener=g.addEventListener.bind(g);i.removeEventListener=g.removeEventListener.bind(g)};return f});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(f,i){function g(a,e,j){this._properties=j||{};this._properties["service.id"]=a;this._properties.objectClass=e;this._properties["service.names"]=e}function c(a,e,j){this._serviceId=a;this._serviceReference=e;this._internalRegistry=j}function b(a,e){function j(b){return function(){var j;try{if(!e())throw Error("Service was unregistered");var n=a[b].apply(a,Array.prototype.slice.call(arguments));if(n&&typeof n.then==="function")return n;
else j=new f,j.resolve(n)}catch(d){j=new f,j.reject(d)}return j.promise}}for(var b in a)typeof a[b]==="function"&&(this[b]=j(b))}function d(a,e){this.type=a;this.serviceReference=e}function h(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var a=this;this._internalRegistry={isRegistered:function(e){return a._entries[e]?!0:!1},unregisterService:function(e){var j=a._entries[e];if(!j)throw Error("already unregistered");var b=j.reference;a._serviceEventTarget.dispatchEvent(new d("unregistering",
b));a._entries[e]=null;b.getProperty("objectClass").forEach(function(e){for(var j=a._namedReferences[e],d=0;d<j.length;d++)if(j[d]===b){j.length===1?delete a._namedReferences[e]:j.splice(d,1);break}})},modifyService:function(e){e=a._entries[e];if(!e)throw Error("already unregistered");a._serviceEventTarget.dispatchEvent(new d("modified",e.reference))}}}g.prototype={getPropertyKeys:function(){var a=[],e;for(e in this._properties)this._properties.hasOwnProperty(e)&&a.push(e);return a},getProperty:function(a){return this._properties[a]}};
g.prototype.constructor=g;c.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(a){var e=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;a.objectClass=e.objectClass;a["service.names"]=e["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
c.prototype.constructor=c;h.prototype={getService:function(a){var e;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(a){e=this._entries[a.getProperty("service.id")].service;return!!e},this);else if(a=this._entries[a.getProperty("service.id")])e=a.service;return e||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:[];var e=[];this._entries.forEach(function(a){a&&e.push(a.reference)});return e},registerService:function(a,e,j){if(typeof e===
"undefined"||e===null)throw Error("invalid service");typeof a==="string"?a=[a]:Array.isArray(a)||(a=[]);var n=this._entries.length,l=new g(n,a,j),k=this._namedReferences;a.forEach(function(a){k[a]=k[a]||[];k[a].push(l)});a=new b(e,this._internalRegistry.isRegistered.bind(null,n));this._entries.push({reference:l,service:a});a=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new d("registered",l));return new c(n,l,a)},addEventListener:function(a,e){this._serviceEventTarget.addEventListener(a,
e)},removeEventListener:function(a,e){this._serviceEventTarget.removeEventListener(a,e)}};h.prototype.constructor=h;return{ServiceRegistry:h}});
define("orion/xhr",["orion/Deferred"],function(f){function i(g,c,b,d){var h=typeof b.response!=="undefined"?b.response:b.responseText,a;try{a=b.status}catch(e){a=0}g={args:c,response:h,responseText:typeof h==="string"?h:null,status:a,url:g,xhr:b};if(typeof d!=="undefined")g.error=d;return g}return function(g,c,b){var b=b||{},d=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,h=new f,a=b.headers||{},e=b.log||!1,j;typeof a["X-Requested-With"]==="undefined"&&(a["X-Requested-With"]="XMLHttpRequest");
if(typeof b.data!=="undefined"&&(g==="POST"||g==="PUT"))j=b.data;if(typeof b.responseType==="string")d.responseType=b.responseType;d.onprogress=function(a){a.xhr=d;h.progress(a)};d.onreadystatechange=function(){if(d.readyState===4){var a=i(c,b,d),j=d.status;200<=j&&j<400?h.resolve(a):(e&&typeof console!=="undefined"&&console.log(Error(d.statusText)),h.reject(a))}};try{d.open(g,c,!0);if(typeof b.timeout==="number")if(typeof d.timeout==="number")d.timeout=b.timeout,d.addEventListener("timeout",function(){h.reject(i(c,
b,d,"Timeout exceeded"))});else{var n=setTimeout(function(){h.reject(i(c,b,d,"Timeout exceeded"))},b.timeout);h.then(clearTimeout.bind(null,n),clearTimeout.bind(null,n))}Object.keys(a).forEach(function(e){d.setRequestHeader(e,a[e])});d.send(j)}catch(l){h.reject(i(c,b,d,l))}return h.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(f,i,g){function c(a,e){this._name=a;this._providers=e;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function b(a,e){return{get:function(b,d){if(e===0)return null;var c=localStorage.getItem(a+b);if(c===null)return null;c=JSON.parse(c);return d||e===-1||c._expires&&c._expires>(new Date).getTime()?(delete c._expires,c):null},set:function(b,d){if(e!==0){if(e!==-1)d._expires=(new Date).getTime()+1E3*e;
if(Object.keys(d).length===0)localStorage.removeItem(a+b);else{var c=JSON.stringify(d);localStorage.setItem(a+b,c);delete d._expires}}},remove:function(e){localStorage.removeItem(a+e)}}}function d(a){this._currentPromises={};this._cache=new b("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var e=a.getServiceReferences("orion.core.preference.provider");if(e.length>0)this._service=a.getService(e[0])}return!!this._service}}function h(a){this._location=
a;this._currentPromise=null;this._cache=new b("/orion/preferences/default",3600)}function a(){this._cache=new b("/orion/preferences/local",-1)}function e(e,b){this._userProvider=new d(e);this._localProvider=new a;b=b||"defaults.pref";b.indexOf("://")===-1&&(b=f.toUrl(b));this._defaultsProvider=new h(b);this._serviceRegistration=e.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var a=[],e=0;e<this._stores.length;++e){var b=this._stores[e];this._dirty.indexOf(b)!==-1&&
a.push(this._providers[e].put(this._name,b))}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 e=this._stores[a],b;for(b in e)e.hasOwnProperty(b)&&typeof this._cached[b]==="undefined"&&(this._cached[b]=
e[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,e){if(this._stores.length!==0){var b=this._stores[0];if(b[a]!==e)b[a]=e,this._cached=null,this._scheduleFlush(b)}},remove:function(a){for(var e=0;e<this._stores.length;++e){var b=this._stores[e];if(b.hasOwnProperty(a))return delete b[a],this._cached=null,this._scheduleFlush(b),!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 e=this,b=[],d=0;d<this._providers.length;++d)b.push(this._providers[d].get(this._name,a).then(function(a){return function(b){e._stores[a]=b}}(d)));return i.all(b).then(function(){e._cached=null;e._getCached()})},flush:function(){this._flush()}};d.prototype={get:function(a,e){if(this._currentPromises[a])return this._currentPromises[a];var b=new i,d=null;
e?this._cache.remove(a):d=this._cache.get(a);if(d!==null)b.resolve(d);else{this._currentPromises[a]=b;var c=this;this._service.get(a).then(function(e){c._cache.set(a,e);delete c._currentPromises[a];b.resolve(e)},function(e){e.status===404?(e={},c._cache.set(a,e),delete c._currentPromises[a],b.resolve(e)):(delete c._currentPromises[a],b.resolve(c._cache.get(a,!0)||{}))})}return b},put:function(a,e){this._cache.set(a,e);return this._service.put(a,e)}};h.prototype={get:function(a,e){if(this._currentPromise)return this._currentPromise;
var b=new i,d=null;e?this._cache.remove(a):d=this._cache.get(a);if(d!==null)b.resolve(d);else{this._currentPromise=b;var c=this;g("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(e){e=JSON.parse(e.response);c._cache.set(a,e[a]||{});c._currentPromise=null;b.resolve(e[a]||{})},function(e){e.xhr.status===401||e.xhr.status===404?(c._cache.set(a,{}),c._currentPromise=null,b.resolve({})):(c._currentPromise=null,e=c._cache.get(a,!0),e!==null?b.resolve(e[a]||{}):b.resolve({}))})}return b},
put:function(){var a=new i;a.resolve();return a}};a.prototype={get:function(a){var e=new i,a=this._cache.get(a);a!==null?e.resolve(a):e.resolve({});return e},put:function(a,e){var b=new i;this._cache.set(a,e);b.resolve();return b}};e.DEFAULT_SCOPE=1;e.LOCAL_SCOPE=2;e.USER_SCOPE=4;e.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(a,b){if(!b||typeof b!=="number"||b>7||b<1)b=e.DEFAULT_SCOPE|e.LOCAL_SCOPE|
e.USER_SCOPE;var d=[];e.USER_SCOPE&b&&this._userProvider.available()&&d.push(this._userProvider);e.LOCAL_SCOPE&b&&d.push(this._localProvider);e.DEFAULT_SCOPE&b&&d.push(this._defaultsProvider);var k=new c(a,d);return k.sync().then(function(){return k})},getSetting:function(a,e,b){for(var d,c=0;c<a.length;c++)if(a[c].label===e)for(var h=0;h<a[c].data.length;h++)if(a[c].data[h].label===b){d=a[c].data[h].value;break}return d}};return{PreferencesService:e}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(f,i){function g(a,b){var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;d.sort();c.sort();for(var k=0,h=d.length;k<h;k++){var g=d[k];if(g!==c[k])return!1;var f=a[g],g=b[g];if(f!==g&&JSON.stringify(f)!==JSON.stringify(g))return!1}return!0}function c(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function b(a){var b=null;return{key:function(d){return(b=b||
Object.keys(a))[d]},getItem:function(b){return a[b]},setItem:function(d,c){a[d]=c;b=null},removeItem:function(d){delete a[d];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function d(a,b){return{type:a,plugin:b}}function h(a,b,c){function h(a,b,e){if(!A)return(new f).reject(Error("plugin not connected"));var d=I++,j=new f;j.then(null,function(a){u==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:d,cancel:a.message||"Cancel"},
A)});J[String(d)]=j;c.postMessage({id:d,serviceId:a,method:b,params:e},A);return j.promise}function k(a){var b={};if(a.methods&&(a.methods.forEach(function(e){b[e]=function(){var b=Array.prototype.slice.call(arguments);return u==="active"?h(a.serviceId,e,b):m.start({"transient":!0}).then(function(){return h(a.serviceId,e,b)})}}),b.addEventListener&&b.removeEventListener)){var e=new i;b.dispatchEvent=e.dispatchEvent.bind(e);var d=b.addEventListener;b.addEventListener=function(a,b){e._namedListeners[a]||
d(a);e.addEventListener(a,b)};var c=b.removeEventListener;b.removeEventListener=function(a,b){e.removeEventListener(a,b);e._namedListeners[a]&&c(a)}}return b}function r(b){var d=JSON.parse(JSON.stringify(b.properties));d.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);d.objectClass=b;return d}function q(a){var b=k(a),e=r(a),e=c.registerService(a.names||a.type,b,e);y[a.serviceId]={registration:e,proxy:b}}function p(){c.persist(a,{created:w,headers:s,services:t,autostart:v,lastModified:x})}
function o(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var e=a.params[0];F({headers:e.headers,services:e.services}).then(function(){C.resolve(m)})}else if("dispatchEvent"===a.method){var d=y[a.serviceId].proxy;d.dispatchEvent.apply(d,a.params)}else if("progress"===a.method)b=J[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)C&&C.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=J[String(a.id)],delete J[String(a.id)],
a.error){var j=c.handleServiceError(m,a.error);b.reject(j)}else b.resolve(a.result)}catch(k){console.log("Plugin._responseHandler "+k)}}var m=this,b=b||{},w=b.created||(new Date).getTime(),s=b.headers||{},t=b.services||[],v=b.autostart,x=b.lastModified||0,u="installed",G,C,A,y={},I=0,J={},F;this._persist=p;this._resolve=function(){u="resolved";c.dispatchEvent(new d("resolved",m))};this._getAutostart=function(){return v};this._getCreated=function(){return w};this.getLocation=function(){return a};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 x};this.getServiceReferences=function(){var a=[];Object.keys(y).forEach(function(b){a.push(y[b].registration.getReference())});return a};this.getState=function(){return u};this.start=function(b){if(u==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));
if(G)return G.promise.then(this.start.bind(this,b));if(u==="active")return(new f).resolve();if(!b||!b["transient"]){var j=b&&b.lazy?"lazy":"started";j!==v&&(v=j,p())}j=c.getState();if(j!=="starting"&&j!=="active")return b["transient"]?(new f).reject(Error("start transient error")):(new f).resolve();if(u==="installed")try{this._resolve()}catch(k){return(new f).reject(k)}u==="resolved"&&t.forEach(function(a){q(a)});if(b&&b.lazy)return u!=="starting"&&(u="starting",c.dispatchEvent(new d("lazy activation",
m))),(new f).resolve();var h=new f;G=h;u="starting";c.dispatchEvent(new d("starting",m));C=new f;A=c.connect(a,o);C.then(function(){C=null;u="active";c.dispatchEvent(new d("started",m));G=null;h.resolve()},function(){C=null;u="stopping";c.dispatchEvent(new d("stopping",m));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});c.disconnect(A);A=null;u="resolved";G=null;c.dispatchEvent(new d("stopped",m));h.reject(Error("plugin activation error"))});return h.promise};this.stop=
function(a){if(u==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(G)return G.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==v)v="stopped",p();if(u!=="active"&&u!=="starting")return(new f).resolve();G=a=new f;u="stopping";c.dispatchEvent(new d("stopping",m));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});A&&(c.disconnect(A),A=null);u="resolved";G=null;c.dispatchEvent(new d("stopped",m));a.resolve();return a.promise};
F=function(b){if(u==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(!b)return x===0&&(x=(new Date).getTime(),p()),c.loadManifest(a).then(F);var j=s,k=t,h=v;s=b.headers||{};t=b.services||{};v=b.autostart||v;b.lastModified?x=b.lastModified:(x=(new Date).getTime(),p());if(g(s,j)&&g(t,k)&&v===h)return(new f).resolve();if(u==="active"||u==="starting"){var l=[];Object.keys(t).forEach(function(a){var b=t[a];l.push(a);var e=y[a];if(e){if(g(b.methods,Object.keys(e.proxy))){var a=r(b),
d=e.registration.getReference(),c={};d.getPropertyKeys().forEach(function(a){c[a]=d.getProperty(a)});g(a,c)||e.registration.setProperties(a);return}e.registration.unregister();delete y[a]}q(b)});Object.keys(y).forEach(function(a){l.indexOf(a)===-1&&(y[a].registration.unregister(),delete y[a])})}u==="active"&&(c.disconnect(A),C=new f,A=c.connect(a,o),C.then(function(){C=null},function(){C=null;u="stopping";c.dispatchEvent(new d("stopping"),m);Object.keys(y).forEach(function(a){y[a].registration.unregister();
delete y[a]});c.disconnect(A);A=null;u="resolved";c.dispatchEvent(new d("stopped",m))}));return(new f).resolve()};this.update=function(a){return F(a).then(function(){c.dispatchEvent(new d("updated",m))})};this.uninstall=function(){if(u==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(u==="active"||u==="starting"||u==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));c.removePlugin(this);u="uninstalled";c.dispatchEvent(new d("uninstalled",
m));return(new f).resolve()}}var a=/^http[s]?/i;return{Plugin:h,PluginRegistry:function(e,j){function n(a){var b=a.source;g.some(function(e){if(b===e.target){if(typeof e.useStructuredClone==="undefined")e.useStructuredClone=typeof a.data!=="string";e.handler(e.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},l=j.storage||localStorage;l.getItem||(l=b(l));var k="installed",r=[],g=[],p=new i,o={},m={registerService:e.registerService.bind(e),connect:function(a,b,e){function d(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var c={handler:b,url:a},k=setTimeout(d.bind(null,"Load timeout for: "+a),e||15E3),m=document.createElement("iframe");m.name=a+"_"+(new Date).getTime();if(!j.visible)m.style.display="none",m.style.visibility="hidden";m.src=a;m.onload=function(){clearTimeout(k);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};m.sandbox="allow-scripts allow-same-origin";document.body.appendChild(m);c.target=m.contentWindow;c.close=function(){m&&
(document.body.removeChild(m),m=null)};g.push(c);return c},disconnect:function(a){for(var b=0;b<g.length;b++)if(a===g[b]){g.splice(b,1);try{a.close()}catch(e){}break}},removePlugin:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.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{p.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new f,e=m.connect(a,function(a){e&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],m.disconnect(e),e=null,b.resolve(a)):"timeout"===a.method&&(m.disconnect(e),e=null,b.reject(a.error)))});return b.promise},getState:function(){return k},handleServiceError:function(b,e){if(e&&e.status===401){var d=b.getHeaders(),c=b.getName()||b.getLocation(),j=document.createElement("span");j.appendChild(document.createTextNode("Authentication required for: "+
c+"."));if(d.login)j.appendChild(document.createTextNode(" ")),c=document.createElement("a"),c.target="_blank",c.textContent="Login",c.href=d.login,a.test(c.href)?(j.appendChild(c),j.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+d.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(j)}}if(e.__isError){var k=e,e=Error(k.message);Object.keys(k).forEach(function(a){e[a]=k[a]});delete e.__isError}return e}};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=m.getState;this.init=function(){if(!(k==="starting"||k==="active"||k==="stopping")){addEventListener("message",n,!1);for(var a=[],b=0,e=l.length;b<e;b++)a.push(l.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&r.push(new h(b,a,m))}});
r.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=c(a);if(!this.getPlugin(a)){var b=j.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||j.defaultAutostart||"lazy";r.push(new h(a,b,m))}}.bind(this));k="starting"}};this.start=function(){k!=="starting"&&this.init();if(k!=="starting")return(new f).reject("Cannot start framework. Framework is already "+k+".");var a=[],b=(new Date).getTime();r.forEach(function(e){var d=
e._getAutostart();e.getLastModified()===0?a.push(e.update().then(function(){if("started"===d)return e.start({"transient":!0});if("lazy"===d)return e.start({lazy:!0,"transient":!0});e._resolve()})):"started"===d?a.push(e.start({"transient":!0})):"lazy"===d?(a.push(e.start({lazy:!0,"transient":!0})),b>e.getLastModified()+864E5&&e.update()):e._resolve()});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){k="active"})};this.stop=function(){if(k!=="starting"&&k!=="active")return(new f).reject("Cannot stop registry. Registry is already "+
k+".");k="stopping";var a=[];r.forEach(function(b){a.push(b.stop({"transient":!0}))});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",n);k="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new f).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=c(a),e=this.getPlugin(a);if(e)return(new f).resolve(e);if(o[a])return o[a];if(b)return e=new h(a,b,m),r.push(e),
e._persist(),m.dispatchEvent(new d("installed",e)),(new f).resolve(e);var j=m.loadManifest(a).then(function(b){e=new h(a,b,m);r.push(e);e._persist();delete o[a];m.dispatchEvent(new d("installed",e));return e},function(b){delete o[a];throw b;});return o[a]=j};this.getPlugins=function(){return r.slice()};this.getPlugin=function(a){var b=null,a=c(a);r.some(function(e){if(a===e.getLocation())return b=e,!0});return b};this.addEventListener=p.addEventListener.bind(p);this.removeEventListener=p.removeEventListener.bind(p);
this.resolvePlugins=function(){var a=!0;r.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function f(c,b){function d(b){var d=b.getProperty("service.id"),c=this.addingService(b);c&&(a[d]=b,e[d]=c)}function h(b){var d=b.getProperty("service.id"),c=e[d];delete a[d];delete e[d];this.removedService(b,c)}this.serviceRegistry=c;var a={},e={},j=i,n,l;this.close=function(){if(j!==g)throw"Already closed";j=i;c.removeEventListener("registered",n);c.removeEventListener("unregistering",l);l=n=null;var a=this;this.getServiceReferences().forEach(function(b){h.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return a.length?Object.keys(a).map(function(b){return a[b]}):null};this.open=function(){if(j!==i)throw"Already open";j=g;var a=this;n=function(e){if(e.serviceReference.getProperty("objectClass").indexOf(b)!==-1&&(d.call(a,e.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(e.serviceReference,a.serviceRegistry.getService(e.serviceReference))};l=function(e){e.serviceReference.getProperty("objectClass").indexOf(b)!==
-1&&h.call(a,e.serviceReference)};c.addEventListener("registered",n);c.addEventListener("unregistering",l);c.getServiceReferences(b).forEach(function(b){d.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,g=1;f.prototype={addingService:function(c){return this.serviceRegistry.getService(c)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return f});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(f,i){var g,c,b,d,h,a="pid";g=function(b,e,d){function c(a,b,d){b.forEach(function(c,j){try{var h=a[j].getProperty("__plugin__"),k=h&&e.getPlugin(h);(!h||k&&k.getState()==="active")&&b[j].updated(d)}catch(l){typeof console!=="undefined"&&console.log(l)}})}i.call(this,b,"orion.cm.managedservice");var h={},g={},p=function(e){var c=[];e.plugin.getServiceReferences().forEach(function(e){if(e.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var h=e.getProperty(a),e=b.getService(e);h&&e&&(h=(h=d._find(h))&&h.getProperties(),c.push(e.updated(h)))}});return f.all(c)};this.addingService=function(e){var d=e.getProperty(a),c=b.getService(e);if(!d||!c)return null;h[d]||(h[d]=[]);g[d]||(g[d]=[]);h[d].push(e);g[d].push(c);return c};this.onServiceAdded=function(b,e){var j=b.getProperty(a),j=d._find(j);c([b],[e],j&&j.getProperties())};this.onOpen=function(){e.addEventListener("started",p)};this.onClose=function(){e.removeEventListener("started",
p)};this.notifyUpdated=function(a){var b=a.getPid();c(h[b]||[],g[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();c(h[a]||[],g[a]||[],null)};this.removedService=function(b,e){var d=b.getProperty(a),c=h[d],j=g[d];c.length>1?c.splice(c.indexOf(b),1):delete h[d];j.length>1?j.splice(j.indexOf(e),1):delete g[d]}};c=function(){function a(e,c,j){this.store=new b(this,j);this.configAdmin=new d(this,this.store);this.tracker=new g(e,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();d=function(){function a(b,e){this.factory=b;this.store=e}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 e="/cm/configurations";
b=function(){function b(d,c){this.factory=d;this.prefsService=c;this.configs=Object.create(null);this.pref=null;var j=this;this.initPromise=this.prefsService.getPreferences(e).then(function(b){j.pref=b;b.keys().forEach(function(e){if(!j.configs[e]){var d=b.get(e);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[a]=e,j.configs[e]=new h(j.factory,j,d))}})})}b.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 h(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(e){(e=a._find(e))&&e.getProperties()!==null&&b.push(e)});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 b}();h=function(){function b(a){for(var e={},d=Object.keys(a),c=0;c<d.length;c++){var j=d[c],h=a[j];e[j]=h instanceof Array?h.slice():h}return e}function e(d,c,h){this.factory=
d;this.store=c;if(h!==null&&typeof h==="object")this.pid=h[a],d=b(h),delete d[a],this.properties=d;else if(typeof h==="string")this.pid=h,this.properties=null;else throw Error("Invalid pid/properties "+h);}e.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(e){this._checkRemoved();var d=null;if(this.properties&&(d=b(this.properties),!e))d[a]=this.pid;return d},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(e){this._checkRemoved();e=b(e);delete e[a];this.properties=e;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return e}();return{ConfigurationAdminFactory:c}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(f,i,g,c,b,d){var h;return{startup:function(){if(h)return h;h=new i;var a=window.serviceRegistry=new g.ServiceRegistry,e=new c.PreferencesService(a);return e.getPreferences("/plugins").then(function(c){var n={plugins:{}};c.keys().forEach(function(a){var b=f.toUrl(a);n.plugins[b]=c[a]});var l=window.pluginRegistry=new b.PluginRegistry(a,n);return l.start().then(function(){if(a.getServiceReferences("orion.core.preference.provider").length>
0)return e.getPreferences("/plugins",e.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=f.toUrl(a);l.getPlugin(a)||b.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(b,function(a){console.log(a)})})}).then(function(){return(new d.ConfigurationAdminFactory(a,l,e)).getConfigurationAdmin().then(a.registerService.bind(a,"orion.cm.configadmin"))}).then(function(){var b=a.getService("orion.core.auth");
if(b){var e=b.getUser().then(function(a){if(a)localStorage.setItem("lastLogin",(new Date).getTime());else return b.getAuthForm(window.location.href).then(function(a){window.location=a})}),d=localStorage.getItem("lastLogin");if(!d||d<(new Date).getTime()-9E5)return e}}).then(function(){var b={serviceRegistry:a,preferences:e,pluginRegistry:l};h.resolve(b);return b})})}}});
(function(){function f(b,d,c,a,e,j){d[b]&&(c.push(b),(d[b]===!0||d[b]===1)&&a.push(e+b+"/"+j))}function i(b,d,c,a,e){d=a+d+"/"+e;require._fileExists(b.toUrl(d))&&c.push(d)}var g=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,c={};define("i18n",{version:"1.0.0",load:function(b,d,h,a){var a=a||{},e=g.exec(b),j=e[1],n=e[4],l=e[5],k=n.split("-"),r=[],q={},p,o,m="";e[5]?(j=e[1],b=j+l):(l=e[4],n=a.locale||(a.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
k=n.split("-"));if(a.isBuild){r.push(b);i(d,"root",r,j,l);for(p=0;o=k[p];p++)m+=(m?"-":"")+o,i(d,m,r,j,l);d(r,function(){h()})}else d([b],function(a){var b=[];f("root",a,b,r,j,l);for(p=0;o=k[p];p++)m+=(m?"-":"")+o,f(m,a,b,r,j,l);d(r,function(){var e,m;for(e=b.length-1;e>-1&&(o=b[e]);e--){m=a[o];if(m===!0||m===1)m=d(j+o+"/"+l);var k=q,n=void 0;for(n in m)!(n in c)&&!(n in k)&&(k[n]=m[n])}h(q)})})}})})();
define("orion/i18n",[],function(){return{load:function(f,i,g,c){var c=c||{},b=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,d=b.exec(f);if(d)if(i.defined(f))g(i(f));else if(c.isBuild||c.isTest)g({});else{var h=d[1],a=d[3]?d[2]:"",e=d[3]||d[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var l=j.serviceRegistry,j=l.getServiceReferences("orion.i18n.message");if(a)j.some(function(a){return f===a.getProperty("name")?(l.getService(a).getMessageBundle().then(function(a){g(a)},function(){g({})}),
!0):!1})||g({});else{var k={},r;j.forEach(function(j){var l=j.getProperty("name");if((d=b.exec(l))&&h===d[1]&&e===(d[3]||d[2]))if(a=d[3]?d[2]:""){if((j=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.indexOf(a)===0)k[a]=!0,i.specified(l)||define(l,["orion/i18n!"+l],function(a){return a})}else r=j});i.specified(f)?g(k):r?l.getService(r).getMessageBundle().then(function(a){Object.keys(k).forEach(function(b){typeof a[b]==="undefined"&&(a[b]=k[b])});define(f,
[],a);g(a)},function(){define(f,[],k);g(k)}):(define(f,[],k),g(k))}})})}else g(null)}}});
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(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
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(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
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(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
define("orion/explorers/navigationUtils",[],function(){function f(g,c){if(!i&&g)g.push({domNode:c}),c.tabIndex=-1,c.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(g,c,b){g&&(g=g.getGridNavHolder(c,!0))&&f(g,b)},generateNavGrid:f,removeNavGrid:function(g,c){if(g)for(var b=0;b<g.length;b++)if(g[b].domNode===c){g.splice(b,1);break}}}});
define("orion/i18nUtil",["require","orion/Deferred"],function(f,i){function g(b){if(b=localStorage.getItem("orion/messageBundle/"+b))if(b=JSON.parse(b),b._expires&&b._expires>(new Date).getTime())return delete b._expires,b;return null}var c={};return{getMessageBundle:function(b){function d(){f(["i18n!"+b],function(a){if(a){var e=b;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(a));delete a._expires}h.resolve(a)})}if(c[b])return c[b];var h=new i;c[b]=
h;var a=g(b);if(a)return h.resolve(a),h;try{f([b],d)}catch(e){f(["orion/i18n!"+b],d)}return h},formatMessage:function(b){var d=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(b,a){return d[(a<<0)+1]})}}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Make Favorite":"Make Favorite","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:",
"Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Import local file...":"Import local file...",
"Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ${0}":"Exporting from ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location","Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer",
"Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New","Click on an item to make a selection, then use this menu to see what actions are available.":"Click on an item to make a selection, then use this menu to see what actions are available.",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content",Favorites:"Favorites",
"Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?"});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(f,i,g){function c(b,a,e){if(!b[a])throw a+f[" is not supported in this file system"];return b[a].apply(b,e)}function b(d,a,e,j){if(!d.readBlob)throw f["source file service does not support binary read"];if(!e.writeBlob)throw f["target file service does not support binary write"];if(a[a.length-1]!=="/")return c(d,"readBlob",[a]).then(function(a){return c(e,"writeBlob",[j,a])});var n=j.substring(0,
j.length-1),l=decodeURIComponent(n.substring(n.lastIndexOf("/")+1)),n=n.substring(0,n.lastIndexOf("/")+1);return c(e,"createFolder",[n,l]).then(function(){},function(){}).then(function(){return c(d,"fetchChildren",[a]).then(function(a){for(var c=[],l=0;l<a.length;++l){var n=a[l].Location,g=n;a[l].Directory&&(g=n.substring(0,n.length-1));g=decodeURIComponent(g.substring(g.lastIndexOf("/")+1));g=j+encodeURIComponent(g);a[l].Directory&&(g+="/");c[l]=b(d,n,e,g)}return i.all(c)})})}function d(b,a){function e(a){var b=
new i;b.reject(f["No Matching FileService for location:"]+a);return b}var d=b.getServiceReferences("orion.core.file"),c=d;if(a)for(var c=[],l=0;l<d.length;++l)a(d[l])&&c.push(d[l]);for(var k=[],r=[],q=[],p=[],o={fetchChildren:function(){var a=new i;a.resolve(p);return a},createWorkspace:function(){var a=new i;a.reject(f["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(f["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:f["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return a},search:e,createProject:e,createFolder:e,createFile:e,deleteFile:e,moveFile:e,copyFile:e,read:e,write:e},d=0;d<c.length;++d)p[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:c[d].getProperty("top"),ChildrenLocation:c[d].getProperty("top"),Name:c[d].getProperty("Name")},l=c[d].getProperty("pattern")||".*",l[0]!=="^"&&(l="^"+l),k[d]=RegExp(l),r[d]=b.getService(c[d]),q[d]=c[d].getProperty("Name"),
c[d].getProperty("NameKey")&&c[d].getProperty("nls")&&g.getMessageBundle(c[d].getProperty("nls")).then(function(a,b){p[a].Name=b[c[a].getProperty("NameKey")];q[a]=b[c[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return r[0]?0:-1;for(var b=0;b<k.length;++b)if(k[b].test(a))return b;throw f["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?o:r[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?o.Name:q[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?o.Location:p[a].Location}}d.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return c(this._getService(b),"fetchChildren",arguments)},createWorkspace:function(b){return c(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return c(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,a,e,d){return c(this._getService(b),"createProject",arguments)},createFolder:function(b,a){return c(this._getService(b),"createFolder",arguments)},createFile:function(b,a){return c(this._getService(b),"createFile",arguments)},deleteFile:function(b){return c(this._getService(b),"deleteFile",arguments)},
moveFile:function(d,a,e){var j=this._getService(d),n=this._getService(a);if(j===n)return c(j,"moveFile",arguments);var l=d[d.length-1]==="/",k=a;k[k.length-1]!=="/"&&(k+="/");if(e)k+=encodeURIComponent(e);else{var g=d;l&&(g=g.substring(0,g.length-1));k+=g.substring(g.lastIndexOf("/")+1)}l&&k[k.length-1]!=="/"&&(k+="/");return b(j,d,n,k).then(function(){return c(j,"deleteFile",[d])})},copyFile:function(d,a,e){var j=this._getService(d),n=this._getService(a);if(j===n)return c(j,"copyFile",arguments);
var l=d[d.length-1]==="/",k=a;k[k.length-1]!=="/"&&(k+="/");if(e)k+=encodeURIComponent(e);else{var g=d;l&&(g=g.substring(0,g.length-1));k+=g.substring(g.lastIndexOf("/")+1)}l&&k[k.length-1]!=="/"&&(k+="/");return b(j,d,n,k)},read:function(b,a){return c(this._getService(b),"read",arguments)},write:function(b,a,e){return c(this._getService(b),"write",arguments)},remoteImport:function(b,a){return c(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,a){return c(this._getService(b),
"remoteExport",arguments)},search:function(b){return c(this._getService(b.resource),"search",arguments)}};d.prototype.constructor=d;return{FileClient:d}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(f,i){function g(b,a,e){return b[a].apply(b,e)}function c(b){this._location=b}function b(){var b=new i;b.reject(f["No Matching OperationService for location:"]+this._location);return b}function d(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var a=b.getServiceReferences("orion.core.operation"),
e=0;e<a.length;e++){var d=b.getService(a[e]);this._services[e]=d;d=a[e].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[e]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new c(a)}}c.prototype={getOperation:b,getOperations:b,removeCompletedOperations:b,removeOperation:b,cancelOperation:b};c.prototype.constructor=c;d.prototype={getOperations:function(){var b=
new i;if(this._operations)return b.resolve(this._operations),b;var a=this;this._preferenceService.getPreferences("/operations").then(function(e){a._operations=e;b.resolve(a._operations)});return b},getOperation:function(b){return g(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],a=this,e=0;e<this._services.length;e++){var d=this._patterns[e],c=new i;b[e]=c.promise;g(this._services[e],"removeCompletedOperations").then(function(b){return function(e){Array.isArray(e)&&
a.getOperations.bind(a)().then(function(a){for(var c=a.keys(),h=0;h<c.length;h++){var n=c[h];d.test(n)&&e.indexOf(n)<0&&a.remove(n)}b.resolve()})}}(c),function(a){return function(b){a.reject(b)}}(c))}return i.all(b)},removeOperation:function(b){var a=this;return g(this._getService(b),"removeOperation",arguments).then(function(){a.getOperations.bind(a)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};d.prototype.constructor=d;return{OperationsClient:d}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",
Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Save Search":"Save Search","Save search query":"Save search query",
"Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes","Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Search Again":"Search Again","Search again":"Search again","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result",
"Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results","Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results",
"Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename",Searches:"Searches","You can save frequently used by searches by choosing ${0} in the search toolbar.":"You can save frequently used by searches by choosing ${0} in the search toolbar."});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
define("orion/editor/regex",[],function(){return{escape:function(f){return f.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(f){return(f=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(f))?{pattern:f[1],flags:f[2]}:null}}});
define("orion/URITemplate",[],function(){function f(a){this._text=a}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function g(a,b,d){for(var c=[],k=0;k<a.length;k++)typeof a[k]!=="undefined"&&
c.push(i(a[k],b));return c.join(d)}function c(a,b,d,c){for(var k=Object.keys(a),h=[],g=0;g<k.length;g++)typeof a[k[g]]!=="undefined"&&h.push(i(k[g],b)+d+i(a[k[g]],b));return h.join(c)}function b(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=h[b[0]])?b=b.substring(1):this._operator=h.NUL;for(var d=[],c=b.split(","),l=0;l<c.length;l++){var k=c[l].match(a);if(k===null)throw Error("Bad VarSpec: "+b);d.push({name:k[1],explode:!!k[2],prefix:k[3]?parseInt(k[3],
10):-1})}this._varSpecList=d}function d(a){for(var d=[],c=0,h=a.indexOf("{",c);h!==-1;){d.push(new f(a.substring(c,h)));c=a.indexOf("}",h+1);if(c===-1)throw Error("Invalid template: "+a);d.push(new b(a.substring(h+1,c)));c+=1;h=a.indexOf("{",c)}d.push(new f(a.substring(c)));this._templateComponents=d}var h={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-,"}},a=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;f.prototype={expand:function(){return encodeURI(this._text)}};b.prototype={expand:function(a){for(var b=[],d=
0;d<this._varSpecList.length;d++){var h=this._varSpecList[d],k=h.name,f=a[k],q=typeof f;if(q!=="undefined"&&f!==null){var p=b.length===0?this._operator.first:this._operator.sep;if(q==="string")this._operator.named&&(p+=i(k,"U+R"),p+=f.length===0?this._operator.ifemp:"="),h.prefix!==-1&&h.prefix<f.length&&(f=f.substring(0,h.prefix)),p+=i(f,this._operator.allow);else if(Array.isArray(f))h.explode?p+=g(f,this._operator.allow,this._operator.sep):(this._operator.named&&(p+=i(k,"U+R"),p+=f.length===0?this._operator.ifemp:
"="),p+=g(f,this._operator.allow,","));else if(q==="object")h.explode?p+=c(f,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(p+=i(k,"U+R"),p+=Object.keys(f).length===0?this._operator.ifemp:"="),p+=c(f,this._operator.allow,",",","));else throw Error("bad param type: "+k+" : "+q);b.push(p)}}return b.join("")}};d.prototype={expand:function(a){for(var b=[],d=0;d<this._templateComponents.length;d++)b.push(this._templateComponents[d].expand(a));return b.join("")}};return d});
define("orion/contentTypes",[],function(){function f(b,c){function a(a,b,e,d){var e=b.filename.indexOf(e)>=0,c=b.extension.indexOf(d)>=0;if(e||c)if(!a||e&&a.extension.indexOf(d)>=0)return b;return a}for(var e=b&&b.split(".").pop(),j=null,n=0;n<c.length;n++){var l=c[n];a(j,l,b,e)===l&&(j=l)}return j}function i(d){this.serviceRegistry=d;this.map=function(d){function a(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var d=d.getServiceReferences(c).concat(d.getServiceReferences(b)),
e={},j=0;j<d.length;j++)for(var n=a(d[j].getProperty("contentTypes")),l=0;l<n.length;l++){var k=n[l];e[k.id]||(e[k.id]={id:k.id,name:k.name,image:k.image,"extends":k["extends"],extension:a(k.extension),filename:a(k.filename)})}return e}(d);d.registerService(g,this)}var g="orion.core.contenttypes",c="orion.core.contenttype",b="orion.file.contenttype";i.prototype={getContentTypes:function(){var b=this.getContentTypesMap(),c=[],a;for(a in b)b.hasOwnProperty(a)&&c.push(b[a]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(b){return f(b.Name,this.getContentTypes())},getFilenameContentType:function(b){return f(b,this.getContentTypes())},getContentType:function(b){return this.map[b]||null},isExtensionOf:function(b,c){b=typeof b==="string"?this.getContentType(b):b;c=typeof c==="string"?this.getContentType(c):c;if(!b||!c)return!1;if(b.id===c.id)return!0;else for(var a=b,e={};a&&(a=this.getContentType(a["extends"]));){if(a.id===c.id)return!0;if(e[a.id])throw Error("Cycle: "+a.id);e[a.id]=!0}return!1},
isSomeExtensionOf:function(b,c){for(var a=0;a<c.length;a++)if(this.isExtensionOf(b,c[a]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:f}});
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(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
(function(){function f(a){return a?a.slice(1).split("&"):[]}function i(a){return a.length===0?"":"?"+a.join("&")}function g(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function c(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function b(a,b){var e="",d=[],c=0;return{next:function(){if(e!==a.search)e=a.search,d=f(e);if(c<d.length){var j=g(d[c++]);switch(b){case "keys":return j[0];case "values":return j[1];
case "keys+values":return[j[0],j[1]];default:throw new TypeError;}}throw l;}}}function d(a){if(typeof a!=="string")throw new TypeError;}function h(a){var b=a.protocol;return!b||b===":"||b==="http:"&&!a.hostname?!1:!0}function a(a){Object.defineProperty(this,"_anchor",{value:a})}function e(b,e){b=b||"";if(typeof b!=="string")throw new TypeError("url");e=e?e.href||e:"";if(typeof e!=="string")throw new TypeError("base");Object.defineProperty(this,"_input",{value:b,writable:!0});var d=document.implementation.createHTMLDocument("");
if(e){var c=d.createElement("a");c.href=e;if(c.protocol.length<2||!c.host)throw Error("InvalidStateError");var j=d.createElement("base");j.href=c.href;d.head.appendChild(j)}var m=d.createElement("a");m.href=b;d.body.appendChild(m);Object.defineProperty(this,"_urlAnchor",{value:m});var l=new a(m);Object.defineProperty(this,"query",{get:function(){return h(m)?l:null},enumerable:!0})}try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(j){}var n=
/([^:]*):?(.*)/,l=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(a.prototype,{get:{value:function(a){d(a);var b;f(this._anchor.search).some(function(e){e=g(e);if(e[0]===a)return b=e[1],!0});return b},enumerable:!0},set:{value:function(a,b){d(a);d(b);var e=f(this._anchor.search);e.some(function(d,j){var m=g(d);if(m[0]===a)return m[1]=b,e[j]=c(m),!0})||e.push(c([a,b]));this._anchor.search=i(e)},enumerable:!0},has:{value:function(a){d(a);return f(this._anchor.search).some(function(b){if(g(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){d(a);var b=f(this._anchor.search),e=b.filter(function(b){return g(b)[0]!==a});return e.length!==b.length?(this._anchor.search=i(e),!0):!1},enumerable:!0},clear:{value:function(){this._anchor.search=""},enumerable:!0},forEach:{value:function(a,e){if(typeof a!=="function")throw new TypeError;var d=b(this._anchor,"keys+values");try{for(;;){var c=d.next();a.call(e,c[1],c[0],this)}}catch(j){if(j!==l)throw j;}},enumerable:!0},keys:{value:function(){return b(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return b(this._anchor,"values")},enumerable:!0},items:{value:function(){return b(this._anchor,"keys+values")}},size:{get:function(){return f(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){d(a);var b=[];f(this._anchor.search).forEach(function(e){e=g(e);e[0]===a&&b.push(e[1])});return b},enumerable:!0},append:{value:function(a,b){d(a);d(b);var e=f(this._anchor.search);e.push(c([a,b]));this._anchor.search=i(e)},enumerable:!0}});
Object.defineProperties(e.prototype,{href:{get:function(){return h(this._urlAnchor)?this._urlAnchor.href:this._input},set:function(a){d(a);this._input=a;this._urlAnchor.href=a},enumerable:!0},origin:{get:function(){return h(this._urlAnchor)?this._urlAnchor.protocol+"//"+this._urlAnchor.host:""},enumerable:!0},protocol:{get:function(){return h(this._urlAnchor)?this._urlAnchor.protocol:":"},set:function(a){d(a);this._urlAnchor.protocol=a},enumerable:!0},_userinfo:{get:function(){return!h(this._urlAnchor)?
"":RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host).exec(this._urlAnchor.href)[2]||""},set:function(a){d(a);this._urlAnchor.href=this._urlAnchor.href.replace(RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host),this._urlAnchor.protocol+"//"+(a?a+"@":"")+this._urlAnchor.host)}},username:{get:function(){if(!h(this._urlAnchor))return"";var a=n.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){d(a);var b=n.exec(this._userinfo),
a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")},enumerable:!0},password:{get:function(){if(!h(this._urlAnchor))return"";var a=n.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){d(a);var b=[n.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")},enumerable:!0},host:{get:function(){return h(this._urlAnchor)?this._urlAnchor.host:""},set:function(a){d(a);this._urlAnchor.host=a},enumerable:!0},hostname:{get:function(){return h(this._urlAnchor)?
this._urlAnchor.hostname:""},set:function(a){d(a);this._urlAnchor.hostname=a},enumerable:!0},port:{get:function(){return h(this._urlAnchor)?this._urlAnchor.port:""},set:function(a){d(a);this._urlAnchor.port=a},enumerable:!0},pathname:{get:function(){return h(this._urlAnchor)?this._urlAnchor.pathname:""},set:function(a){d(a);this._urlAnchor.pathname=a},enumerable:!0},search:{get:function(){return h(this._urlAnchor)?this._urlAnchor.search:""},set:function(a){d(a);this._urlAnchor.search=a},enumerable:!0},
hash:{get:function(){return h(this._urlAnchor)?this._urlAnchor.hash:""},set:function(a){d(a);this._urlAnchor.hash=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(e,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(e,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=e})();define("orion/URL-shim",function(){});
define("orion/editor/util",[],function(){var f=navigator.userAgent,i=parseFloat(f.split("MSIE")[1])||void 0,g=parseFloat(f.split("Firefox/")[1]||f.split("Minefield/")[1])||void 0,c=f.indexOf("Opera")!==-1,b=parseFloat(f.split("Chrome/")[1])||void 0,d=f.indexOf("Safari")!==-1&&!b,h=parseFloat(f.split("WebKit/")[1])||void 0,a=f.indexOf("Android")!==-1,e=f.indexOf("iPad")!==-1,f=f.indexOf("iPhone")!==-1,j=e||f,n=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,k=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,e){return b[(e<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:g,isOpera:c,isChrome:b,isSafari:d,isWebkit:h,isAndroid:a,isIPad:e,isIPhone:f,isIOS:j,isMac:n,isWindows:l,isLinux:k,platformDelimiter:l?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(f){function i(g,c,b,d,h){this.keyCode=typeof g==="string"?g.toUpperCase().charCodeAt(0):g;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=b!==void 0&&b!==null?b:!1;this.mod3=d!==void 0&&d!==null?d:!1;this.mod4=h!==void 0&&h!==null?h:!1}i.prototype={match:function(g){return this.keyCode===g.keyCode?this.mod1!==(f.isMac?g.metaKey:g.ctrlKey)?!1:this.mod2!==g.shiftKey?!1:this.mod3!==g.altKey?!1:f.isMac&&this.mod4!==g.ctrlKey?!1:!0:!1},equals:function(g){return!g?
!1:this.keyCode!==g.keyCode?!1:this.mod1!==g.mod1?!1:this.mod2!==g.mod2?!1:this.mod3!==g.mod3?!1:this.mod4!==g.mod4?!1:!0}};return{KeyBinding:i}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(f){if(!f)return f;var i=window.location.protocol+"//"+window.location.host;return f.indexOf(i)===0?f.substring(i.length):f},isAtRoot:function(f){return this.makeRelative(f).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(f,i,g){function c(b){this._favorites=[];g.attach(this);this._init(b);this._initializeFavorites()}c.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(b){for(var b=Array.isArray(b)?
b:[b],d=0;d<b.length;d++){var c=b[d],a=c.ChildrenLocation?c.ChildrenLocation:c.Location,a=i.makeRelative(a);this.addFavorite(c.Name,a,c.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(b){this.addFavorite(b,b,!1,!0)},addFavorite:function(b,d,c){this._favorites.push({name:b,path:d,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(b){for(var d in this._favorites)if(this._favorites[d].path===
b){this._favorites.splice(d,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(b,d){var c=!1,a;for(a in this._favorites)if(this._favorites[a].path===b){var e=this._favorites[a];if(e.name!==d)e.name=d,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(b){for(var d in this._favorites)if(this._favorites[d].path===b)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(b){var d;
if(!b)return this._favorites;var c="";for(d=0;d<b.length;d++){var a=b.charAt(d);c+=a==="*"?".*":a==="?"?".?":this._SPECIAL_CHARS.indexOf(a)>=0?"\\"+a:a}c+=".*";b=RegExp(c);c=[];for(d in this._favorites)this._favorites[d].name.search(b)===0&&c.push(this._favorites[d]);return c},_initializeFavorites:function(){var b=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var c,d=d.get("navigate");typeof d==="string"&&(d=JSON.parse(d));if(d)for(c in d)d[c].isFavorite=
!0,b._favorites.push(d[c]);b._favorites.sort(b._sorter);b._notifyListeners()})},_storeFavorites:function(){var b=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(c){c.put("navigate",b)})},_sorter:function(b,c){var h=b.name.toLowerCase(),a=c.name.toLowerCase();return h>a?1:h<a?-1:0},getFavorites:function(){return{navigator:this._favorites}}};c.prototype.constructor=c;return{FavoritesService:c}});
define("orion/widgets/themes/ThemeClass",[],function(){function f(f){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=f;this.classString="."+f+"{ "}f.prototype.className=null;f.prototype.classString=void 0;f.prototype.style=void 0;f.prototype.closeString=" }\n";f.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:f}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(f){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 g="",c=[],b=new f.ThemeClass("orionPage");
b.style.backgroundColor="#fdfdfd";b.style.width="100%";b.style.height="100%";c.push(b);b=new f.ThemeClass("topRowBanner");b.style.margin="0";b.style.border="0";b.style.backgroundColor=this.navbar;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";b.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";b.style.height="28px";c.push(b);b=new f.ThemeClass("a");b.style.textDecoration="none";
b.style.color=this.content;c.push(b);b=new f.ThemeClass("navlink");b.style.display="inline-block";b.style.padding="2px";b.style.color=this.content;c.push(b);b=new f.ThemeClass("primaryNav");b.style.color=this.navtext;b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.paddingTop="6px";b.style.verticalAlign="baseline";c.push(b);b=new f.ThemeClass("primaryNav a");b.style.fontSize="8pt";b.style.color=this.navtext;b.style.marginRight="6px";b.style.marginLeft="6px";b.style.verticalAlign="baseline";
b.style.textDecoration="none";c.push(b);b=new f.ThemeClass("primaryNav a:hover");b.style.color="#bfbfbf";b.style.cursor="hand";b.style.color="white";b.style.fontWeight="normal";c.push(b);for(var d in c)g+=c[d].toString();return g};i.prototype.writeLocationStyle=function(){var g="",c=[],b=new f.ThemeClass("titleArea");b.style.margin="0";b.style.paddingTop="5px";b.style.border="0";b.style.background=this.location;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";b.style.borderBottom="1px solid "+this.location;b.style.minHeight="20px";c.push(b);b=new f.ThemeClass("breadcrumb");b.style.fontSize="8pt";b.style.textDecoration="none";b.style.color=this.content;b.style.paddingTop="2px";c.push(b);b=new f.ThemeClass("a.breadcrumb:hover");b.style.textDecoration="none";b.style.borderBottom="1px dotted";b.style.color="#F58B0F";b.style.cursor="pointer";c.push(b);b=new f.ThemeClass("breadcrumbSeparator");b.style.fontSize="8pt";
b.style.textDecoration="none";b.style.color=this.navbar;b.style.fontWeight="bold";c.push(b);b=new f.ThemeClass("currentLocation");b.style.fontWeight="bold";b.style.fontSize="8pt";b.style.color=this.navbar;b.style.textDecoration="none";b.style.textWrap="normal";b.style.lineHeight="10pt";c.push(b);b=new f.ThemeClass("a.currentLocation:hover");b.style.fontWeight="bold";b.style.fontSize="10pt";b.style.color="#666666";b.style.textDecoration="none";b.style.borderBottom="0";c.push(b);b=new f.ThemeClass("navlinkonpage");
b.style.color=this.content;c.push(b);for(var d in c)g+=c[d].toString();return g};i.prototype.writeButtonStyle=function(){var g="",c=[],b=new f.ThemeClass("commandButton");b.style.color="#222";b.style.border="1px solid #dedede";b.style.backgroundColor=this.button;b.style.textAlign="center";b.style.verticalAlign="baseline";b.style.cursor="pointer";b.style.display="inline-block";b.style.padding="6px";b.style.paddingTop="4px";b.style.borderRadius="1px";b.style.lineHeight="12px";b.style.fontSize="8pt";
b.style.userSelect="none";c.push(b);b=new f.ThemeClass("commandButton:over");b.style.backgroundColor="#e6e6e6";b.style.border="1px solid #808080";c.push(b);b=new f.ThemeClass("commandMenu");b.style.color="#222";b.style.display="inline-block";b.style.verticalAlign="baseline";b.style.margin="0";b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.border="1px solid #dedede";b.style.backgroundColor="#efefef";b.style.cursor="pointer";b.style.borderRadius="1px";c.push(b);b=new f.ThemeClass("commandMenuItem");
b.style.border="0";b.style.padding="0";b.style.margin="0";c.push(b);for(var d in c)g+=c[d].toString();return g};i.prototype.writeMainStyle=function(){var g="",c=[],b=new f.ThemeClass("searchbox");b.style.backgroundImage="url(../images/core_sprites.png)";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="4px -297px";b.style.width="12px";b.style.height="12px";b.style.backgroundColor=this.search;b.style.border="1px solid "+this.search;b.style.fontSize="11px";b.style.width="15em";b.style.height=
"16px";b.style.borderRadius="10px";b.style.color="#999";b.style.padding="0";b.style.paddingLeft="20px";b.style.marginLeft="5px";b.style.marginTop="6px !important";b.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";c.push(b);b=new f.ThemeClass("searchbox:focus");b.style.color="white";b.style.outline="none";c.push(b);b=new f.ThemeClass("checkedRow");b.style.cssText="background-color:"+this.selection+" !important;";c.push(b);b=new f.ThemeClass("navbar-item-selected");
b.style.background=this.selection;b.style.color=this.content;c.push(b);b=new f.ThemeClass("auxpane");b.style.border="0";b.style.background=this.sidepanel;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";b.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";b.style.overflowX="auto";b.style.minWidth="200px";b.style.paddingTop="16px";c.push(b);b=new f.ThemeClass("mainpane");
b.style.background=this.mainpanel;b.style.border=0;c.push(b);b=new f.ThemeClass("mainToolbar");b.style.background=this.toolpanel;b.style.height="31px";b.style.borderBottom="1px solid #ebebeb";c.push(b);for(var d in c)g+=c[d].toString();return g};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,
this.button=g.button.value,this.location=g.location.value,this.selection=g.selection.value,this.sidepanel=g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=
g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:i}});
define("orion/inputCompletion/inputCompletion",[],function(){function f(f,g,c){this._inputField=f;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=g;(f=c?c.group:null)||(f=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=f+"__completion__";this._proposeFromStart=c?c.proposeFromStart:!1;this._extendedProvider=c?c.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._dataList=[];this._initUI();var b=this;this._completionUIContainer.addEventListener("mousedown",function(){b._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){b._mouseDown=!1});this._inputField.addEventListener("blur",function(){b._mouseDown?window.setTimeout(function(){b._inputField.focus()},200):b._dismiss()});this._inputField.addEventListener("keydown",function(c){b.onKeyDown(c)});this._inputField.addEventListener("input",function(){b._proposeOn(b._inputField.value)});
this._inputField.addEventListener("focus",function(){if(b._dismissed&&b._binderFunc)b._dismissing?b._dismissing=!1:b._binderFunc&&b._binderFunc(function(c){b._bind(c);b._proposeOn(b._inputField.value)})})}f.prototype.onKeyDown=function(f){if(this._dismissed)return!0;var g=f.charCode||f.keyCode;if(g===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return f.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
f.ctrlKey),f.stopPropagation(),!1}else if((g===40||g===38)&&this._proposalList&&this._proposalList.length>0)return f.preventDefault(),this._walk(g===40),f.stopPropagation(),!1;else if(g===27)return f.preventDefault(),this._dismiss(),!1;return!0};f.prototype._bind=function(f){this._dataList=f};f.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};f.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};f.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)};f.prototype._createProposalLink=function(f,g,c,b){var d=document.createElement("a");d.href=require.toUrl(g);d.appendChild(this._createBoldText(f,
c,b));return d};f.prototype._createBoldText=function(f,g,c){if(g<0)return document.createTextNode(f);var b=document.createElement("span"),d;0!==g&&(d=document.createTextNode(f.substring(0,g)),b.appendChild(d));var h=document.createElement("b");b.appendChild(h);d=document.createTextNode(f.substring(g,g+c));h.appendChild(d);g+c<f.length-1&&(d=document.createTextNode(f.substring(g+c)),b.appendChild(d));return b};f.prototype._proposeOnCategory=function(f,g){if(g.length!==0){var c=this;if(f){var b=document.createElement("li");
b.className="inputCompletionLICategory";var d=document.createTextNode(f);b.appendChild(d);this._completionUL.appendChild(b)}for(d=0;d<g.length;d++){b=document.createElement("li");b.onmouseover=function(a){c._selectProposal(a.currentTarget)};b.onclick=function(a){c._dismiss(a.currentTarget.completionItem.value)};b.className="inputCompletionLINormal";b.completionItem=g[d].item;if(typeof g[d].item.value==="string"){var h=this._createBoldText(g[d].item.value,g[d].boldIndex,g[d].boldLength);b.appendChild(h)}else g[d].item.value.name&&
g[d].item.value.type==="link"&&b.appendChild(this._createProposalLink(g[d].item.value.name,g[d].item.value.value,g[d].boldIndex,g[d].boldLength));this._completionUL.appendChild(b);this._proposalList.push({item:g[d].item,domNode:b})}}};f.prototype._domNode2Index=function(f){for(var g=0;g<this._proposalList.length;g++)if(this._proposalList[g].domNode===f)return g;return-1};f.prototype._highlight=function(f,g){var c=f,b=!1;isNaN(c)||(b=!0,c=this._proposalList&&f>=0&&f<this._proposalList.length?this._proposalList[f].domNode:
null);if(c)c.className=g?"inputCompletionLISelected":"inputCompletionLINormal",g&&b&&(c.offsetTop<this._completionUIContainer.scrollTop?c.scrollIntoView(!0):c.offsetTop+c.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&c.scrollIntoView(!1))};f.prototype._selectProposal=function(f){var g=f;isNaN(g)&&(g=this._domNode2Index(f));if(g!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=g,this._highlight(this._proposalIndex,!0)};
f.prototype._dismiss=function(f,g){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof f==="string")this._inputField.value=f,this._dismissing=!0,this._inputField.focus();else if(f&&f.name&&f.type==="link")g?window.open(f.value):window.location.href=f.value;var c=this;window.setTimeout(function(){c._completionUIContainer.style.display="none"},200)}};f.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var f=0,g=0,c=this._inputField;c;)f+=
c.offsetLeft,g+=c.offsetTop,c=c.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=g+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=f+"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"};f.prototype._walk=function(f){f=this._proposalIndex+(f?
1:-1);f<-1?f=this._proposalList.length-1:f>=this._proposalList.length&&(f=-1);this._selectProposal(f)};f.prototype._proposeOnList=function(f,g,c){for(var b="",d=[],h=g?g.length:0,a=0;a<f.length;a++)if(f[a].type==="category")this._proposeOnCategory(b,d),b=f[a].label,d=[];else{var e=!0,j=-1;if(g&&c){var n;typeof f[a].value==="string"?n=f[a].value.toLowerCase():f[a].value.name&&(n=f[a].value.name.toLowerCase());j=n.indexOf(g);j<0?e=!1:this._proposeFromStart&&(e=j===0)}e&&d.push({item:f[a],boldIndex:j,
boldLength:h})}this._proposeOnCategory(b,d)};f.prototype._proposeOn=function(f){this._completionUL.textContent="";var g=f?f.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,g,!0);if(this._extendedProvider&&g){var c=this;this._extendedProvider(f,function(b){if(b)for(var d=0;d<b.length;d++)c._proposeOnList(b[d].proposals,b[d].filterForMe?g:f,b[d].filterForMe);c._show()},[])}else this._show()};f.prototype.constructor=f;return{InputCompletion:f}});
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(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
(function(){var f=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,h=c&&(location.port||void 0),a=[];define("text",[],function(){var e,j,n;typeof window!=="undefined"&&window.navigator&&window.document?j=function(a,b){var c=e.createXhr();c.open("GET",a,!0);c.onreadystatechange=
function(){c.readyState===4&&b(c.responseText)};c.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(n=require.nodeRequire("fs"),j=function(a,b){var e=n.readFileSync(a,"utf8");e.indexOf("\ufeff")===0&&(e=e.substring(1));b(e)}):typeof Packages!=="undefined"&&(j=function(a,b){var e=new java.io.File(a),c=java.lang.System.getProperty("line.separator"),e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),d,j,m="";try{d=new java.lang.StringBuffer;
(j=e.readLine())&&j.length()&&j.charAt(0)===65279&&(j=j.substring(1));for(d.append(j);(j=e.readLine())!==null;)d.append(c),d.append(j);m=String(d.toString())}finally{e.close()}b(m)});return e={version:"1.0.7",strip:function(a){if(a){var a=a.replace(i,""),b=a.match(g);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,
e;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(b=0;b<3;b++){e=f[b];try{a=new ActiveXObject(e)}catch(c){}if(a){f=[e];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:j,parseName:function(a){var b=!1,e=a.indexOf("."),c=a.substring(0,e),a=a.substring(e+1,a.length),e=a.indexOf("!");e!==-1&&(b=a.substring(e+1,a.length),b=b==="strip",a=a.substring(0,e));return{moduleName:c,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
b,c,d){var j=e.xdRegExp.exec(a),h;if(!j)return!0;a=j[2];j=j[3];j=j.split(":");h=j[1];j=j[0];return(!a||a===b)&&(!j||j===c)&&(!h&&!j||h===d)},finishLoad:function(b,c,d,j,h){d=c?e.strip(d):d;h.isBuild&&(a[b]=d);j(d)},load:function(a,j,f,n){if(n.isBuild&&!n.inlineText)f();else{var g=e.parseName(a),i=g.moduleName+"."+g.ext,m=j.toUrl(i),w=n&&n.text&&n.text.useXhr||e.useXhr;!c||w(m,b,d,h)?e.get(m,function(b){e.finishLoad(a,g.strip,b,f,n)}):j([i],function(a){e.finishLoad(g.moduleName+"."+g.ext,g.strip,a,
f,n)})}},write:function(b,c,d){if(c in a){var j=e.jsEscape(a[c]);d.asModule(b+"!"+c,"define(function () { return '"+j+"';});\n")}},writeFile:function(a,b,c,d,j){var b=e.parseName(b),h=b.moduleName+"."+b.ext,m=c.toUrl(b.moduleName+"."+b.ext)+".js";e.load(h,c,function(){var b=function(a){return d(m,a)};b.asModule=function(a,b){return d.asModule(a,m,b)};e.write(a,h,b,j)},j)}}})})();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/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(f,i,g){return{generateEditSiteHref:function(c){var b=f.toUrl("sites/site.html");return(new g(b+"#{,resource,params*}")).expand({resource:i.makeRelative(c.Location)})}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",
Save:"Save","Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} repository:","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration","There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?",
"There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",
ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",
ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",Stopped:"Stopped","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
SitesCommandScope:"Sites"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(f,i){var g={root:i};Object.keys(f).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=f[c])});return g});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(f,i,g,c){function b(a,b,e){var c=a[b],d=new g;if(typeof c!=="function")throw f["Service method missing: "]+b;c.apply(a,e).then(function(a){d.resolve(a)},function(a){d.reject(a)});return d}function d(a,b){return new c.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function h(a,b,e){this._serviceRegistry=a;this._siteService=b;this._selfHost=e.getProperty("canSelfHost");
this._sitePattern=e.getProperty("sitePattern");this._filePattern=e.getProperty("filePattern");this._name=e.getProperty("name");this._id=e.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return d(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function a(a,e){a[e]=function(){return b(this._getService(),e,Array.prototype.slice.call(arguments))}}
function e(a,b,e){for(var c=a.getServiceReferences("orion.site"),d=[],g=[],i=[],o=0;o<c.length;o++){var m=c[o].getProperty(b),m=m[0]!=="^"?"^"+m:m;d.push(c[o]);g.push(RegExp(m));i.push(a.getService(c[o]))}e=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var e=0;e<g.length;e++)if(g[e].test(a))return e;throw f["No Matching SiteService for "]+b+": "+a;}(e);return new h(a,i[e],d[e])}h.prototype={isFileMapped:function(a,b){if(!a){var e=new g;e.resolve(!1);return e}return this.getURLOnSite(a,
b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,e){function c(e,h,f){return d.isFileMapped(a,b).then(function(a){a||f.push({Source:e,Target:h,FriendlyPath:e});a=new g;a.resolve();return a})}var d=this,h="/"+b.Name,f;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";f=d.toInternalForm(b.Location).then(function(b){return c(h,b,a.Mappings).then(function(){return d.updateSiteConfiguration(a.Location,a).then(function(a){return d.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var i=b.Name+" site";f=d.toInternalForm(b.Location).then(function(a){var b=[];return c(h,a,b).then(function(){return d.createSiteConfiguration(i,e,b,null,{Status:"started"}).then(function(a){return a})})})}return f.then(function(a){return d.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(b){a(h.prototype,
b)});h.prototype.constructor=h;return{forLocation:function(a,b){return e(a,"pattern",b)},forFileLocation:function(a,b){return e(a,"filePattern",b)},getFileClient:d,SiteClient:h}});
define("orion/selection",["orion/EventTarget"],function(f){function i(g,c){c||(c="orion.page.selection");this._serviceRegistry=g;f.attach(this);this._serviceRegistration=g.registerService(c,this);this._selections=null}i.prototype={getSelection:function(f){f(this._getSingleSelection())},getSelections:function(f){f(this._selections||[])},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(f){var c=this._selections;this._selections=
Array.isArray(f)?f.length>0?f:null:f?[f]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/PageUtil",[],function(){var f=/^http[s]?/i;return{matchResourceParameters:function(f){var f=f||window.location.toString(),g={resource:""},c=f.indexOf("#");if(c!==-1&&(f=f.substring(c+1),f.length!==0)){f=f.split(",");Object.defineProperty(g,"resourceRaw",{value:f[0]});g.resource=decodeURIComponent(f[0]);for(c=1;c<f.length;c++){var b=/([^=]*)(=?)(.*)/.exec(f[c]),d=decodeURIComponent(b[1]||""),b=decodeURIComponent(b[3]||"");d!==""&&d!=="resource"&&(g[d]=b)}}return g},validateURLScheme:function(i,
g){var c=i;if(i.indexOf("://")===-1){var b=document.createElement("a");b.href=i;c=b.href}b=!1;return(b=g?g.some(function(b){return RegExp("^"+b+":","i").test(c)}):f.test(c))?i:(console.log("Illegal URL Scheme: '"+i+"'"),"")}}});
define("orion/PageLinks",["require","orion/Deferred","orion/PageUtil","orion/URITemplate","orion/URL-shim"],function(f,i,g,c){function b(b,h){for(var a=b.getServiceReferences(h||"orion.page.link"),e=g.matchResourceParameters(window.location.href),j={OrionHome:(new URL(f.toUrl("."),window.location)).href.slice(0,-1),Location:e.resource},e=[],n=0;n<a.length;n++){for(var l={},k=a[n].getPropertyKeys(),r=0;r<k.length;r++)l[k[r]]=a[n].getProperty(k[r]);if(l.uriTemplate&&l.nls&&(l.name||l.nameKey)){var q=
new i;f(["i18n!"+l.nls],function(a){var b=new c(l.uriTemplate),b=window.decodeURIComponent(b.expand(j)),b=g.validateURLScheme(b);l.href=b;l.textContent=l.nameKey?a[l.nameKey]:l.name;q.resolve(l)});e.push(q)}else if(l.uriTemplate&&l.name)k=new c(l.uriTemplate),k=window.decodeURIComponent(k.expand(j)),k=g.validateURLScheme(k),l.href=k,l.textContent=l.name,e.push((new i).resolve(l))}return i.all(e)}return{createPageLinks:function(c,f){return b(c,f).then(function(a){return a.map(function(a){var b=a.href,
a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:b}});
define("orion/webui/littlelib",["require"],function(){function f(a,b){b||(b=document);return b.querySelectorAll(a)}function i(a,b){var c=a.compareDocumentPosition(b);return a===b||Boolean(c&16)}function g(a){if(a.tabIndex>=0)return a;if(a.hasChildNodes())for(var b=0;b<a.childNodes.length;b++){var c=g(a.childNodes[b]);if(c)return c}return null}function c(a){if(a.tabIndex>=0)return a;if(a.hasChildNodes())for(var b=a.childNodes.length-1;b>=0;b--){var d=c(a.childNodes[b]);if(d)return d}return null}function b(a,
e){if(a.nodeType===3){var c=d.exec(a.nodeValue);c&&c.length>1&&a.parentNode.replaceChild(document.createTextNode(e[c[1]]||c[1]),a)}if(a.hasChildNodes())for(c=0;c<a.childNodes.length;c++)b(a.childNodes[c],e)}var d=/\$\{([^\}]+)\}/,h=[];return{$:function(a,b){b||(b=document);return b.querySelector(a)},$$:f,$$array:function(a,b){return Array.prototype.slice.call(f(a,b))},node:function(a){var b=a;typeof a==="string"&&(b=document.getElementById(a));return b},contains:i,bounds:function(a){a=a.getBoundingClientRect();
return{left:a.left+document.body.scrollLeft,top:a.top+document.body.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:g,lastTabbable:c,stop:function(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())},processTextNodes:b,addAutoDismiss:function(a,b){h.length===0&&document.addEventListener("click",function(a){for(var b=[],e=0;e<h.length;e++){for(var c=h[e].excludeNodes,d=h[e].dismiss,f=!1,g=!0,o=0;o<
c.length;o++)if((f=document.compareDocumentPosition(document,c[o])!==1)&&i(c[o],a.target)){g=!1;break}g&&(d(),f=document.compareDocumentPosition(document,c[o])!==1);f&&b.push(h[e])}h=b},!0);h.push({excludeNodes:a,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/webui/tooltip",["require","orion/webui/littlelib"],function(f,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._node=i.node(c.node);if(!this._node)throw"no dom node for tooltip found";this._position=c.position||["right","above","below","left"];this._text=c.text;this._hideDelay=c.hideDelay===void 0?200:c.hideDelay;this._tailSize=c.tailSize||10;this._trigger=c.trigger||"mouseover";this._afterShowing=c.afterShowing;this._afterHiding=c.afterHiding;var b=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===b._node&&(b.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=c.showDelay===void 0?1E3:c.showDelay;c=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(b._node,c.target)&&(b.show(),i.stop(c))},!1);for(var d=0;d<c.length;d++)this._node.addEventListener(c[d],function(c){i.contains(b._node,c.target)&&b.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 c=this;i.addAutoDismiss([this._tip,this._node],function(){c.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(c._timeout)window.clearTimeout(c._timeout),c._timeout=null;c._tip.addEventListener("mouseout",function(b){i.contains(c._tip,b.target)&&(c.hide(),i.stop(b))},!1)},!1)}return this._tip},_positionTip:function(c,b){this._makeTipNode();if(this._tailBorder)this._tip.removeChild(this._tailBorder),this._tailBorder=null,this._tip.removeChild(this._tail),this._tail=null;c==="left"?this._tipInner.classList.add("left"):
this._tipInner.classList.remove("left");var d=i.bounds(this._node),f=i.bounds(this._tipInner),a;switch(c){case "above":a=d.top-f.height-this._tailSize-1;d=d.left-this._tailSize;break;case "below":a=d.top+d.height+this._tailSize+1;d=d.left-this._tailSize;break;case "left":a=d.top-this._tailSize/2;d=d.left-f.width-this._tailSize-1;break;default:a=d.top-this._tailSize/2,d=d.left+d.width+this._tailSize+1}var e=i.bounds(document.documentElement);if(a+f.height>e.height)if(b)a=e.height-f.height-1;else return!1;
if(d+f.width>e.width)if(b)d=e.width-f.width-1;else return!1;if(d<0)if(b)d=4;else return!1;if(a<0)if(b)a=4;else return!1;this._tailBorder=document.createElement("span");this._tailBorder.classList.add("tooltipTailBorderFrom"+c);this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+c);c==="above"||c==="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=a+"px";this._tip.style.left=d+"px";this._tip.style.width=f.width+"px";this._tip.style.height=f.height+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var c=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var b=!1,d=0;!b&&d<c._position.length;)b=c._positionTip(c._position[d]),
d++;b||c._positionTip(c._position[0],!0);c._tip.classList.add("tooltipShowing");c._afterShowing&&c._afterShowing()},this._showDelay)}},hide:function(c){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(c===void 0)c=this._hideDelay;var b=this;this._timeout=window.setTimeout(function(){b._tip.classList.remove("tooltipShowing");b._afterHiding&&b._afterHiding()},c)}},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}};g.prototype.constructor=g;return{Tooltip:g}});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(f,i,g,c){function b(){}b.prototype={_initialize:function(b,h,a,e,j){this._tooltip=new c.Tooltip({node:b,hideDelay:j||0,afterShowing:this._afterShowingFunction(h).bind(this),afterHiding:a,trigger:e?e:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";b=document.createRange();b.selectNode(this.$parent);b=b.createContextualFragment(this.TEMPLATE);
this.messages&&g.processTextNodes(b,f);this.$parent.appendChild(b);var n=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&n.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(b){for(var c=0;c<b.childNodes.length;c++){var a=b.childNodes[c];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},_afterShowingFunction:function(b){return function(){b&&b.bind(this)();if(!this.customFocus){var c=
g.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};b.prototype.constructor=b;return{PopupDialog:b}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(f,i){function g(c){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&c.metaKey||!b&&c.ctrlKey}return{getUserKeyString:function(c){var b="",d=navigator.platform.indexOf("Mac")!==-1;c.mod1&&(b+=d?"Cmd+":"Ctrl+");c.mod2&&(b+="Shift+");c.mod3&&(b+="Alt+");c.mod4&&d&&(b+="Ctrl+");if(c.alphaKey)return b+c.alphaKey;for(var f in i.KEY)if(typeof(i.KEY[f]==="number")&&i.KEY[f]===c.keyCode)return b+f;var a;switch(c.keyCode){case 59:a=
c.mod2?":":";";break;case 61:a=c.mod2?"+":"=";break;case 188:a=c.mod2?"<":",";break;case 190:a=c.mod2?">":".";break;case 191:a=c.mod2?"?":"/";break;case 192:a=c.mod2?"~":"`";break;case 219:a=c.mod2?"{":"[";break;case 220:a=c.mod2?"|":"\\";break;case 221:a=c.mod2?"}":"]";break;case 222:a=c.mod2?'"':"'"}return a?b+a:c.keyCode>=112&&c.keyCode<=123?b+"F"+(c.keyCode-111):b+String.fromCharCode(c.keyCode)},getUserText:function(c,b,d,f,a,e,j,g,l){var k=!1,j=function(j){return function(g){if(!k){var n=i.node(c),
m=n.value;if(n)if(j&&g.keyCode===i.KEY.ESCAPE){if(d)b.style.display="inline";n.parentNode.removeChild(n);k=!0;e&&e()}else if(!(j&&g.keyCode!==i.KEY.ENTER)){if(m.length===0||!l&&m===f){if(d)b.style.display="inline"}else a(m);k=!0;n.parentNode&&n.parentNode.removeChild(n);e&&e()}}}},r=document.createElement("input");r.id=c;r.value=f||"";b.parentNode.insertBefore(r,b.nextSibling);r.classList.add("userEditBoxPrompt");if(d)b.style.display="none";r.addEventListener("keydown",j(!0),!1);r.addEventListener("blur",
j(!1),!1);window.setTimeout(function(){r.focus();if(f){var a=i.node(c),b=g?f.indexOf(g):-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:g,followLink:function(c,b){b&&g(b)?window.open(c):window.location=c},createButton:function(c,b){var d=document.createElement("span");
d.role="button";d.tabIndex=0;d.appendChild(document.createTextNode(c));d.className="commandButton commandMargins";d.addEventListener("click",function(c){b();i.stop(c)},!1);d.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)b(),i.stop(c)},!1);return d}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(f,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._dropdownNode=i.node(c.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=c.populate;var b=this;this._triggerNode.addEventListener("click",function(c){b.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)b.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 c=this.getItems();if(c.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");c[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var c=i.bounds(this._dropdownNode),b=i.bounds(this._boundingNode(this._triggerNode));if(c.left+c.width>b.left+b.width)this._dropdownNode.style.right=0},_boundingNode:function(c){return c.style.right!==""||
c.style.position==="absolute"||!c.parentNode||!c.parentNode.style?c:this._boundingNode(c.parentNode)},close:function(c){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");c&&this._triggerNode.focus();return!0},getItems:function(){var c=[],b=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(d){d.parentNode.parentNode===b._dropdownNode&&c.push(d)});return c},empty:function(){var c=this;
i.$$array("li",this._dropdownNode).forEach(function(b){b.parentNode===c._dropdownNode&&b.parentNode.removeChild(b)})},_dropdownKeyDown:function(c){if(c.keyCode===i.KEY.UP||c.keyCode===i.KEY.DOWN||c.keyCode===i.KEY.RIGHT||c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.LEFT){var b=this.getItems(),d=document.activeElement;if(b.length&&b.length>0&&d){var f=b.indexOf(d);f>=0&&(c.keyCode===i.KEY.UP&&f>0?(f--,b[f].focus()):c.keyCode===i.KEY.DOWN&&f<b.length-1?(f++,b[f].focus()):c.keyCode===i.KEY.ENTER||c.keyCode===
i.KEY.RIGHT?d.classList.contains("dropdownTrigger")&&d.dropdown&&d.dropdown.open():c.keyCode===i.KEY.LEFT&&d.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(c))}}else c.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(c))}};g.prototype.constructor=g;return{Dropdown:g}});
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(f,i,g,c,b,d,h,a){function e(a,b,e,c,d){this.commandService=a;this.handler=b;this.items=e;this.userData=c;this.command=d;if(d.parameters)this.parameters=d.parameters.makeCopy();this.id=d.id}function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function n(a,b,e){b.classList.add("commandImage");var c;a.imageClass?(c=document.createElement("span"),b.appendChild(c),c.classList.add(a.spriteClass),c.classList.add(a.imageClass)):(c=new Image,c.alt=a.name,c.name=e,c.id=e,c.src=a.image,b.appendChild(c));return c}function l(a){this._init(a)}function k(a,e,c,d,j,f,h){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=e!==void 0&&e!==null?e:!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=b.node(f);this.scopeName=h||(f?f.id:null)}function r(a,b){this.token=a;this.parameterName=b}function q(a,b,e,c,d){this.name=a;this.type=b;this.label=e;this.value=c;this.lines=d||1}function p(a,b,e){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=e;this.clientCollect=b&&b.clientCollect}var o=window.navigator.platform.indexOf("Mac")!==
-1;e.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(a){var b=new e(this.commandService,this.handler,this.items,this.userData,this.command);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=this.parameters.makeCopy();return b}};e.prototype.constructor=e;j.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",
this);this._defaultSelectionService=a.selection;var b=this;window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(o){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 e=a.target.nodeName.toLowerCase();if(e==="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(e===
"textarea")return}b._processKey(a)},!1)},_processKey:function(a){function b(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var e in this._activeBindings)if(this._activeBindings[e]&&this._activeBindings[e].keyBinding&&this._activeBindings[e].command&&this._activeBindings[e].keyBinding.match(a)){var c=this._activeBindings[e],d=c.invocation;if(d)if(c=c.command,c.hrefCallback){b(a);a=c.hrefCallback.call(d.handler||window,d);a.then?a.then(function(a){window.open(a)}):window.open(a);
break}else if(c.callback){b(a);var j=this;window.setTimeout(function(){j._invoke(d)},0);break}}},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var e=this._urlBindings[b].urlBinding.match(a);if(e){var c=this._urlBindings[b],d=c.command,j=c.invocation;if(j&&j.parameters&&d.callback){j.parameters.setValue(e.parameterName,e.parameterValue);var f=this;window.setTimeout(function(){f._invoke(j)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,d){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new e(this,c,b,null,a),d):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,d)},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,e){this._parameterCollector&&(this._parameterCollector.close(),
this._parameterCollector.open(a,b,e))},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 e=!1;a.parameters.updateParameters(a);e=this._parameterCollector.collectParameters(a);
if(!e){var c=new h.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),e=c.contentContainer();e.classList.add("parameterPopup");var d=window.document.activeElement,j=this._parameterCollector.getFillFunction(a,function(){d&&d.focus();c.destroy()})(e);c.show();window.setTimeout(function(){j.focus();j.select()},0);e=!0}e||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={},e,c,d,j;for(j in this._activeBindings)if((c=this._activeBindings[j])&&c.keyBinding&&c.command)c.keyBinding.scopeName?(b[c.keyBinding.scopeName]||(b[c.keyBinding.scopeName]=[]),b[c.keyBinding.scopeName].push(c)):(e=g.getUserKeyString(c.keyBinding),d=document.createElement("span"),d.role="listitem",d.appendChild(document.createTextNode(e+" = "+c.command.name)),d.appendChild(document.createElement("br")),
a.appendChild(d));for(var f in b)if(b[f].length&&b[f].length>0){e=document.createElement("h2");a.appendChild(e);e.appendChild(document.createTextNode(f));for(j=0;j<b[f].length;j++)c=b[f][j],e=g.getUserKeyString(c.keyBinding),d=document.createElement("span"),d.role="listitem",d.appendChild(document.createTextNode(e+" = "+c.command.name)),d.appendChild(document.createElement("br")),a.appendChild(d)}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,e,c,d,j){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(c)a[b].title=c;if(e)a[b].position=e;a[b].emptyGroupMessage=j}else a[b]={title:c,position:e,emptyGroupMessage:j,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var e=b.split("/"),c=0;c<e.length;c++)if(e[c].length>1)a[e[c]]||(a[e[c]]={position:0,children:{}}),a=a[e[c]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,e,c,d,j,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,c));a[b]={position:e};j&&(e=this._commandList[b])&&(this._activeBindings[b]={command:e,keyBinding:j,bindingOnly:d});f&&(e=this._commandList[b])&&(this._urlBindings[b]={command:e,urlBinding:f,bindingOnly:d});a.sortedContributions=
null},_checkForTrailingSeparator:function(a,e,c){var d;if(e==="tool"||e==="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(e==="menu"&&(a=b.$$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,e,c,d,j,f,h){if(typeof a!=="string")throw"a scope id for rendering must be specified";
e=b.node(e);if(!e)throw"no parent";var g=this._contributionsByScopeId[a];if(!c&&g){var c=g.localSelectionService||this._defaultSelectionService,n=this;c&&c.getSelections(function(b){n.renderCommands(a,e,b,d,j,f)})}else g&&(this._render(this._contributionsByScopeId[a],e,c,d,j||"button",f,h),this._checkForTrailingSeparator(e,j,!0))},destroy:function(a){a=b.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var e=a.firstChild;e.commandTooltip&&e.commandTooltip.destroy();e.emptyGroupTooltip&&e.emptyGroupTooltip.destroy();
this.destroy(e);a.removeChild(e)}},_render:function(b,c,d,j,f,g,n){var l=b.sortedContributions;if(!l){var l=[],k=!1,i;for(i in b)if(!b.hasOwnProperty||b.hasOwnProperty(i)){var o=b[i];if(o&&typeof o.position==="number")o.id=i,l.push(o),k=!0}if(k)l.sort(function(a,b){return a.position-b.position}),b.sortedContributions=l}for(b=0;b<l.length;b++){var r;if(l[b].children&&Object.getOwnPropertyNames(l[b].children).length>0){var o=l[b],k=l[b].children,p=this,q;if(f==="tool"||f==="button")if(o.title){q=this._createDropdownMenu(c,
o.title);n&&a.generateNavGrid(n,q.menuButton);var M=k,L=o;window.setTimeout(function(){p._render(M,q.menu,d,j,"menu",g,n);p._checkForTrailingSeparator(q.menu,"menu",!0);if(q.menu.childNodes.length===0)if(L.emptyGroupMessage){if(!q.menuButton.emptyGroupTooltip)q.menuButton.emptyGroupTooltip=new h.Tooltip({node:q.menuButton,text:L.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else n&&a.removeNavGrid(n,q.menuButton),q.menu.parentNode&&q.menu.parentNode.removeChild(q.menu),
q.destroyButton&&q.destroyButton.parentNode&&q.destroyButton.parentNode.removeChild(q.destroyButton);else q.menuButton.style.visibility="visible"},0)}else{var H;c.childNodes.length>0&&!this._checkForTrailingSeparator(c,f)&&(H=this.generateSeparatorImage(c));p._render(k,c,d,j,f,g,n);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==H&&(H=this.generateSeparatorImage(c))}else o.title?(i=document.createElement("li"),c.appendChild(i),o=this._createDropdownMenu(i,o.title,!0),p._render(k,o.menu,
d,j,"menu",g,n),o.menu.childNodes.length===0&&c.removeChild(i)):(c.childNodes.length>0&&this._generateMenuSeparator(c),p._render(k,c,d,j,f,g,n),this._generateMenuSeparator(c))}else{i=(k=this._commandList[l[b].id])?!0:!1;var E=null,E=null;if(k){r=new e(this,j,d,g,k);r.domParent=c;o=i&&(k.visibleWhen?k.visibleWhen(d):!0);if(this._activeBindings[k.id]&&this._activeBindings[k.id].keyBinding)E=this._activeBindings[k.id],E.invocation=o?r:null,E.bindingOnly&&(i=!1);if(this._urlBindings[k.id]&&this._urlBindings[k.id].urlBinding)E=
this._urlBindings[k.id],E.invocation=o?r:null,E.bindingOnly&&(i=!1);i=i&&o}if(i)if(k.choiceCallback){f==="tool"||f==="button"?(i=c,o=!1,c.nodeName.toLowerCase()==="ul"&&(i=document.createElement("li"),c.appendChild(i))):(i=c,o=!0);var N=this;this._createDropdownMenu(i,k.name,o,function(a){this.populateChoicesMenu(a,d,j,g,N)}.bind(k))}else f==="tool"?(i="tool"+k.id+b,k._addTool(c,i,r,n)):f==="button"?(i="button"+k.id+b,k._addButton(c,i,r,n)):f==="menu"&&k._addMenuItem(c,r,n)}}},_createDropdownMenu:function(a,
e,c,j){var a=b.node(a),f,g=document.createElement("span");g.classList.add("dropdownTrigger");c?(g.classList.add("dropdownMenuItem"),f="dropdownSubMenu",c="dropdownArrowRight",g.tabIndex=0,g.role="menuitem"):(g.classList.add("commandButton"),c="dropdownArrowDown",g.tabIndex=0,g.role="button");e=document.createTextNode(e);g.appendChild(e);e=document.createElement("span");e.classList.add(c);g.appendChild(e);c=a;a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):(g.classList.add("commandMargins"),
a=g);c.appendChild(g);f&&c.classList.add(f);f=document.createElement("ul");c.appendChild(f);f.classList.add("dropdownMenu");g.dropdown=new d.Dropdown({dropdown:f,populate:j});f.dropdown=g.dropdown;return{menuButton:g,menu:f,dropdown:g.dropdown,destroyButton:a}},_generateCheckedMenuItem:function(a,b,e,c){var d=document.createElement("li");a.appendChild(d);a=document.createElement("label");a.classList.add("dropdownMenuItem");var j=document.createElement("input");j.type="checkbox";j.role="menuitem";
j.checked=e;j.classList.add("checkedMenuItem");a.appendChild(j);b=document.createTextNode(b);a.appendChild(b);d.appendChild(a);j.addEventListener("change",c,!1)},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");b.appendChild(e);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()==="ul"?
document.createElement("li"):document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};j.prototype.constructor=j;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(b,e,c,d){c.handler=c.handler||this;var j;if(this.hrefCallback){if(j=this._makeLink(b,c,"commandLink"),!j)return}else j=document.createElement("span"),j.tabIndex=d?-1:0,j.role="button",this.hasImage()?(n(this,j,e),this.name&&j.setAttribute("aria-label",this.name)):(e=window.document.createTextNode(this.name),j.appendChild(e),j.classList.add("commandMissingImageButton"),j.classList.add("commandButton")),this._hookCallback(j,
c);c.domNode=j;c.domParent=b;if(this.tooltip)j.commandTooltip=new h.Tooltip({node:j,text:this.tooltip,position:["above","below","right","left"]});b.nodeName.toLowerCase()==="ul"?(e=document.createElement("li"),b.appendChild(e),b=e):j.classList.add("commandMargins");b.appendChild(j);a.generateNavGrid(d,c.domNode)},_addButton:function(b,e,c,d){c.handler=c.handler||this;var j;if(this.hrefCallback)j=this._makeLink(b,c,"commandLink");else if(!this.name&&this.hasImage()){if(j=document.createElement("span"),
j.tabIndex=0,j.role="button",n(this,j,e),this.tooltip&&j.setAttribute("aria-label",this.tooltip),this._hookCallback(j,c),this.tooltip)j.commandTooltip=new h.Tooltip({node:j,text:this.tooltip,position:["above","below","right","left"]})}else j=this._makeButton(b,c,"commandButton"),this._hookCallback(j,c);c.domParent=b;b.nodeName.toLowerCase()==="ul"?(e=document.createElement("li"),b.appendChild(e),b=e):j.classList.add("commandMargins");b.appendChild(j);a.generateNavGrid(d,c.domNode)},_addMenuItem:function(b,
e,c){e.domParent=b;var d,j=b.dropdown;this.hrefCallback?d=this._makeLink(b,e,"dropdownMenuItem",["right","left","above","below"]):(d=this._makeButton(b,e,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(d,e,function(){j.close(!0)}));d.role="menuitem";a.generateNavGrid(c,e.domNode);b.nodeName.toLowerCase()==="ul"?(e=document.createElement("li"),b.appendChild(e),b=e):d.classList.add("commandMargins");b.appendChild(d)},_makeButton:function(a,b,e,c){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var d=document.createTextNode(this.name);a.appendChild(d);e&&a.classList.add(e);if(this.tooltip)a.commandTooltip=new h.Tooltip({node:a,text:this.tooltip,position:c||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,e,c){var d=document.createElement("a");d.id=this.name;e&&d.classList.add(e);d.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){d.href=
a}):d.href=a?a:"#";if(this.tooltip)d.commandTooltip=new h.Tooltip({node:d,text:this.tooltip,position:c||["above","below","right","left"]});return b.domNode=d},_hookCallback:function(a,e,c,d){a.addEventListener("click",function(a){c&&c();e.commandService._invoke(e);d&&d();b.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===b.KEY.ENTER||a.keyCode===b.KEY.SPACE)c&&c(),e.commandService._invoke(e),d&&d(),b.stop(a)},!1)},populateChoicesMenu:function(a,e,c,d,j){c=this.getChoices(e,c,d);
for(d=0;d<c.length;d++){var f=c[d];if(f.name){var g=document.createElement("li");a.appendChild(g);var h=document.createElement("span");h.tabIndex=0;h.role="menuitem";h.classList.add("dropdownMenuItem");var n=document.createTextNode(f.name);h.appendChild(n);g.appendChild(h);h.choice=f;h.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,e)},!1);h.addEventListener("keydown",function(a){(a.keyCode===b.KEY.ENTER||a.keyCode===b.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,e)},!1)}else j._generateMenuSeparator(a)}},getChoices:function(a,b,e){return this.choiceCallback?this.choiceCallback.call(b,a,e):null},makeChoiceCallback:function(a,b){return function(e){a.callback&&a.callback.call(a,b,e)}},hasImage:function(){return this.imageClass||this.image!==i.toUrl("images/none.png")}};l.prototype.constructor=l;k.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(o?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(o&&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}};k.prototype.constructor=k;r.prototype={match:function(a){a=c.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};r.prototype.constructor=r;q.prototype={optionsRequested:function(){return this.optionsRequested}};q.prototype.constructor=q;p.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 e=this.parameterTable[a];if(e)e.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 q(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new p(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};p.prototype.constructor=p;return{CommandService:j,CommandKeyBinding:k,Command:l,CommandInvocation:e,URLBinding:r,ParametersDescription:p,CommandParameter:q}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(f,i,g,c){var b={};(function(){var d=!1;b.updateNavTools=function(b,a,e,c,n){var l=b.getService("orion.page.command"),k=g.node(e);if(k)l.destroy(k);else throw f["could not find toolbar "]+e;l.renderCommands(e,k,n,a,"button");if(c&&(e=g.node(c)))l.destroy(e),l.renderCommands(c,e,null,a,"button");d||(d=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",
function(e){var d=g.node(c);if(d){var f=b.getService("orion.page.command");f.destroy(d);f.renderCommands(c,d,e.selections,a,"button")}}))};b.createOperationsCommands=function(b,a,e){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var g=new c.Command({name:f["Remove Completed"],tooltip:f["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){e.removeCompletedOperations().then(function(){a.loadOperations.bind(a)()})},
visibleWhen:function(){return!0}});b.addCommand(g);g=new c.Command({name:f.Remove,tooltip:f["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],c=0;c<b.length;c++){var d=b[c];e.removeOperation.bind(e)(d.Location).then(function(){a.loadOperations.bind(a)()},function(){a.loadOperations.bind(a)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;
return!0}});b.addCommand(g);g=new c.Command({name:f.Cancel,tooltip:f["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 e=a[b];e.deferred&&e.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;
return!0}});b.addCommand(g)}})();return b});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(f,i,g,c,b){function d(b){this._options=b}d.prototype=new c.PopupDialog;d.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink">All Operations</a></td></tr></table><span id="operationsExist"><span class="secondaryColumn" id="myOperationsListEmpty">No operations running on this page.</span><table id="myOperationsList" style="display: none;"></table></span><span class="secondaryColumn" id="operationsDontExist">No operations running.</span>';d.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.serviceRegistry.getService("orion.page.command");b.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};d.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};d.prototype.setOperations=function(b,a){this._myOperations||
this._init(this._options);this._myOperations=[];this._operationsDeferreds=[];if(b)for(var e in b)this._myOperations.push(b[e]),this._operationsDeferreds.push(a[e]);this._renderOperations()};d.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(a){}var e={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==e.Message)e.DetailedMessage=b.DetailedMessage;return e};d.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};d.prototype._renderOperationsTable=function(b,a,e){g.empty(b);for(var c=0;c<a.length;c++){var d=a[c],l=document.createElement("tr"),k=document.createElement("td");k.style.paddingLeft="5px;";k.style.paddingRight="5px;";k.textContent=d.Name;l.appendChild(k);var i=document.createElement("div");k.appendChild(i);k=document.createElement("span");i.appendChild(k);k.classList.add("imageSprite");var q=document.createElement("span");q.classList.add("primaryColumn");
i.appendChild(q);q.appendChild(document.createTextNode(d.Name));switch(d.type){case "Warning":k.classList.add("core-sprite-warning");k.setAttribute("aria-label",f["Operation resulted in a warning."]);break;case "error":k.classList.add("core-sprite-error");k.setAttribute("aria-label",f["Operation resulted in an error."]);break;case "loadstart":case "progress":k.classList.add("core-sprite-start");k.setAttribute("aria-label",f["Operation is running."]);break;case "abort":k.classList.add("core-sprite-stop");
k.setAttribute("aria-label",f["Operation is canceled."]);break;case "load":case "loadend":k.classList.add("core-sprite-ok"),k.setAttribute("aria-label","Operation ok.")}if(d.error)k=d.error.Message||d.error,d.error.DetailedMessage&&d.error.DetailedMessage!==""&&(k+=": "+d.error.DetailedMessage),i.appendChild(document.createElement("br")),q=document.createElement("span"),q.classList.add("secondaryColumn"),q.style.marginLeft="18px;",i.appendChild(q),q.textContent=k;k=document.createElement("span");
i.appendChild(k);this._commandService.renderCommands("operationsDialogItems",i,{operation:d,deferred:e[c]},this,"tool");b.appendChild(l)}this._setOperationsVisibility()};d.prototype._setOperationsVisibility=function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>
0?"":"none"};d.prototype.constructor=d;return{OperationsDialog:d}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(f,i,g,c,b){function d(a,e){if(!this._progressPane){this._progressPane=c.node(a);this._operationsDialog=new b.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:e});var d=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===c.KEY.ENTER)&&d._operationsDialog.show()})}}function h(a,b,c){this._serviceRegistry=
a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._operationsClient=b;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=c}d.prototype={_switchIconTo:function(a){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=a;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(a,b){var c={},d;for(d in a)a[d].progressMonitor||
(c[d]=a[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var g="";for(d in c){var h=c[d];if(h.type&&(h.type==="loadstart"||h.type==="progress")){g="running";break}}switch(g){case "running":this._progressPane.title=f["Operations running"];this._progressPane.alt=f["Operations running"];this._progressPane.setAttribute("aria-valuetext",
f["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=f["Some operations finished with warning"];this._progressPane.alt=f["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=f["Some operations finished with error"];this._progressPane.alt=f["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,b)},_isEmpty:function(a){for(var b in a)return!1;return!0}};d.prototype.constructon=d;h.prototype=
{init:function(a){if(!this._progressMonitorClass)this._progressMonitorTool=new d(a,this._serviceRegistry)},progress:function(a,b,c){var d=this,f=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(b));a.then(function(){if(d._operations[f]){var g=d._operations[f];if(b)g.Name=b;d._lastOperation=g;g.type="loadend";if(c)g.progressMonitor=c;d.writeOperation.bind(d)(f,g,a);g.Location||d._removeOperationFromTheList.bind(d)(f)}},function(g){if(d._operations[f]){var h=
d._operations[f];if(b)h.Name=b;if(c)h.progressMonitor=c;d._lastOperation=h;h.type=g.canceled?"abort":"error";h.error=g;d.writeOperation.bind(d)(f,h,a);h.Location||d._removeOperationFromTheList.bind(d)(f)}},function(g){if(b)g.Name=b;if(c)g.progressMonitor=c;d.writeOperation.bind(d)(f,g,a)});return a},removeOperation:function(a){for(var b in this._operations)if(this._operations[b].Location&&this._operations[b].Location===a){this._removeOperationFromTheList(b);break}this._operationsClient.removeOperation.bind(this._operationsClient)(a)},
_removeOperationFromTheList:function(a){var b=this._operations[a].progressMonitor;delete this._operations[a];delete this._operationDeferrds[a];b?b.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var a in this._operations){var b=this._operations[a];if(b.type&&b.type!=="loadstart"&&b.type!=="progress")(b=this._operations[a].progressMonitor)&&b.done(),delete this._operations[a],delete this._operationDeferrds[a]}this._progressMonitorTool.generateOperationsInfo(operations,
this._operationDeferrds)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(a,b){b&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(b);var c=this;a.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(a);return a});return this.progress(a,b)},writeOperation:function(a,b,c){this._operations[a]=b;this._operationDeferrds[a]=
c;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)}};h.prototype.constructor=h;return{ProgressService:h}});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(f,i,g,c,b,d){function h(a,b,c){var d="";c&&(d="^");if(d=g.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var a=a||{};a.searchUtils=a.searchUtils||{};a.searchUtils.ALL_FILE_TYPE="*.*";a.searchUtils.doSearch=function(b,c,d,g){if(b){var h=!0;d==="*"&&(d="");d===
""&&(h=g&&g.type!==a.searchUtils.ALL_FILE_TYPE);if(h){d!==""&&a.searchUtils.addRecentSearch(c,d,g?g.regEx:!1);var b=b.createSearchParams(d,!1,!1,g),i=a.searchUtils.generateSearchHref(b);a.searchUtils.getOpenSearchPref(c,function(a){a?window.open(i):window.location=i})}}else window.alert(f["Can't search: no search service is available"])};a.searchUtils.generateSearchHelper=function(b,c){var d=b.keyword,f=d,g={};b.fileType&&b.fileType!==a.searchUtils.ALL_FILE_TYPE&&d===""&&(f="*."+b.fileType);if(b.regEx)g.searchStr=
d,h(g,b,c);else{var i=d.indexOf("*")>-1,q=d.indexOf("?")>-1;i&&(d=d.split("*").join(".*"));q&&(d=d.split("?").join("."));!i&&!q&&!b.nameSearch?(g.searchStr=b.caseSensitive?d.split("\\").join(""):d.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=b.caseSensitive?d:d.toLowerCase(),h(g,b,c),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:b,inFileQuery:g,displayedSearchTerm:f}};a.searchUtils.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows);if(a.start!==
void 0)a.start=parseInt(a.start);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};a.searchUtils.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};a.searchUtils.generateSearchHref=function(b){var c=i.toUrl("search/search.html"),b=a.searchUtils.copySearchParams(b,
!0),f=b.resource;b.resource=void 0;return(new d(c+"#{,resource,params*}")).expand({resource:f,params:b})};a.searchUtils.generateFindURLBinding=function(a,b,c,f){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof f==="string"?f:void 0,atLine:typeof c==="number"?c:void 0};return","+(new d("{,params*}")).expand({params:a})};a.searchUtils.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive===
"string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine)};a.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};a.searchUtils.replaceStringLiteral=function(b,c,d){c=g.parse("/"+c+"/gim");return a.searchUtils.replaceRegEx(b,c,d)};a.searchUtils.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var f=!1,g=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{g.push({startIndex:d,length:a.searchStrLength});
f=!0;if(c)break;d+=a.searchStrLength}return f?g:null};a.searchUtils.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(b,c).exec(a.substring(d)))&&{startIndex:f.index+d,length:f[0].length}};a.searchUtils.searchOnelineRegEx=function(b,c,d){for(var f=0,g=!1,h=[];;)if(f=a.searchUtils.findRegExp(c,b.regExp.pattern,b.regExp.flags,f)){h.push(f);g=!0;if(d)break;f=f.startIndex+f.length}else break;return g?h:null};
a.searchUtils.generateNewContents=function(b,c,d,f,g,h){if(f&&c){if(!b)d.contents=[];for(var i=0;i<c.length;i++){for(var p=c[i],o=!1,m=!1,w=[],s,t=0,v=0;v<f.children.length;v++)if(f.children[v].lineNumber-1===i){t=v;for(o=0;o<f.children[v].matches.length;o++)f.children[v+o].checked!==!1&&w.push(o);m=w.length>0;s=f.children[v].matches;o=!0;break}if(o){if(m){w=a.searchUtils.replaceCheckedMatches(p,g,s,w,h);p=w.replacedStr;for(o=0;o<f.children[t].matches.length;o++)f.children[t+o].newMatches=w.newMatches}else for(o=
0;o<f.children[t].matches.length;o++)f.children[t+o].newMatches=f.children[t+o].matches;b?d.contents[i]=p:d.contents.push(p)}else b||d.contents.push(p)}}};a.searchUtils.generateMatchContext=function(a,b,c){var d=[],f=a*2+1,g;b.length<=f?(g=0,a=b.length-1):(g=c-a,g<0?(g=0,a=g+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,g=a-f+1)));for(f=g;f<=a;f++)d.push({context:b[f],current:f===c});return d};a.searchUtils.splitFile=function(a){for(var b=0,c=0,d=0,f=0,g=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&
c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){g.push(a.substring(f));break}var h=1;b!==-1&&c!==-1?b+1===c?(h=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;g.push(a.substring(f,d-h));f=d}return g};a.searchUtils.searchWithinFile=function(b,c,d,f,g,h){d=a.searchUtils.splitFile(d);if(g)c.contents=d;if(c){c.children=[];for(var i=f=0;i<d.length;i++){var p=d[i];if(p&&p.length>0){var o=h?p:p.toLowerCase();if(o=b.wildCard?a.searchUtils.searchOnelineRegEx(b,o):a.searchUtils.searchOnelineLiteral(b,o)){var m=i+1;
if(g)for(var w=0;w<o.length;w++){var s=w+1,s={parent:c,checked:c.checked,type:"detail",matches:o,lineNumber:m,matchNumber:s,name:p,location:c.location+"-"+m+"-"+s};c.children.push(s)}else s={parent:c,context:a.searchUtils.generateMatchContext(2,d,i),checked:c.checked,type:"detail",matches:o,lineNumber:m,name:p,location:c.location+"-"+m},c.children.push(s);f+=o.length}}}c.totalMatches=f}};a.searchUtils.replaceCheckedMatches=function(a,b,c,d,f){for(var g=0,h="",i=[],o=0;o<c.length;o++){g!==c[o].startIndex&&
(h+=a.substring(g,c[o].startIndex));if(c[o].length)f=c[o].length;for(var g=!1,m=0;m<d.length;m++)if(d[m]===o){g=!0;break}g?(i.push({startIndex:h.length,length:b.length}),h+=b):(i.push({startIndex:h.length,length:f}),h+=a.substring(c[o].startIndex,c[o].startIndex+f));g=c[o].startIndex+f}g<a.length&&(h+=a.substring(g));return{replacedStr:h,newMatches:i}};a.searchUtils.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};a.searchUtils.path2FolderName=
function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};a.searchUtils._storeRecentSearch=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b)})};a.searchUtils.addRecentSearch=function(b,c,d){typeof c==="string"&&c&&b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var g,f=f.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));if(f){for(g in f)if(f[g].name===c)return;
f.length>=20&&f.splice(19,f.length-20+1)}else f=[];f.splice(0,0,{name:c,regEx:d});a.searchUtils._storeRecentSearch(b,f)})};a.searchUtils.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};a.searchUtils.getMixedSearches=function(b,c,d,f){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var e,g=b.get("recentSearch");typeof g===
"string"&&(g=JSON.parse(g));if(c)for(e in b=b.get("search"),typeof b==="string"&&(b=JSON.parse(b)),b)if(d){var h=a.searchUtils.parseQueryStr(b[e].query);g.some(function(a){return h.searchStrTitle===a.name})||g.push({name:h.searchStrTitle,label:b[e].name})}else g.push({name:null,label:b[e].name,value:b[e].query});g&&f&&f(g)})};a.searchUtils.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?!0:!1:!1)})};a.searchUtils.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return a.searchUtils});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(f,i,g,c,b,d){function h(a,b,d,f){this.registry=a;this.fileClient=b;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=f&&f.searchOnName;this._buildSkeletonOnly=f&&f.buildSkeletonOnly;this._fetchChildrenCallBack=f&&f.fetchChildrenCallBack;this._searchParams=d;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:c.generateSearchHelper(d);this._location=f&&f.location;this._childrenLocation=f&&f.childrenLocation?f.childrenLocation:this._location}h.prototype.search=function(a){var b=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=a;var c=this;this.registry.getService("orion.page.dialog").confirm(f["The search term on this location will not use indexed files."]+"\n"+f["It will take longer time. Do you want to proceed?"],function(a){a&&b.getContentTypes().then(function(a){c.contentTypesCache=
a;c._visitRecursively(c._childrenLocation).then(function(){c._sort(c.fileLocations);c._onSearchComplete({response:{numFound:c.fileLocations.length,docs:c.fileLocations}})})})})};h.prototype.searchName=function(a,b){if(a)this.searchHelper=c.generateSearchHelper(a,!0);if(b)this.onSearchNameComplete=b;var d=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var f=0;f<this.fileSkeleton.length;f++){var g=this.fileSkeleton[f].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?
c.searchOnelineRegEx(this.searchHelper.inFileQuery,g,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,g,!0))if(d.push(this.fileSkeleton[f]),d.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:d.length,docs:d}})}};h.prototype.buildSkeleton=function(a,b){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;a();c.getContentTypes().then(function(a){d.contentTypesCache=a;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=
!1;b();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};h.prototype._searchCompleted=function(){console.log("Search Completed.")};h.prototype._searchFiles=function(){var a=[],b;if(this.fileLocations.length>0){b=this;for(var c=0;c<b.fileLocations.length;c++)a.push(b._sniffSearch(b.fileLocations[c]))}return d.all(a)};h.prototype._sort=function(a){a.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};h.prototype._onFileType=function(a){return this.searchHelper.params.fileType?
this.searchHelper.params.fileType===c.ALL_FILE_TYPE?!0:a.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};h.prototype._visitRecursively=function(a){var c=[],f=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(a);var g=f.registry.getService("orion.page.progress");return(g?g.progress(f.fileClient.fetchChildren(a),"Crawling search for children of "+a):f.fileClient.fetchChildren(a)).then(function(a){for(var g=0;g<a.length;g++)if(a[g].Directory!==void 0&&a[g].Directory===!1)if(f._searchOnName)c.push(f._buildSingleSkeleton(a[g]));
else if(f._buildSkeletonOnly)c.push(f._buildSingleSkeleton(a[g]));else{var h=b.getFilenameContentType(a[g].Name,f.contentTypesCache);h&&(h["extends"]==="text/plain"||h.id==="text/plain")&&f._onFileType(h)&&c.push(f._sniffSearch(a[g]))}else a[g].Location&&c.push(f._visitRecursively(a[g].ChildrenLocation));return d.all(c)})};h.prototype._hitOnceWithinFile=function(a){a=this._searchParams.caseSensitive?a:a.toLowerCase();return this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,
a,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,a,!0)};h.prototype._reportSingleHit=function(a){a.LastModified=a.LocalTimeStamp;this.fileLocations.push(a);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};h.prototype._sniffSearch=function(a){this._totalCounter++;var b=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(a),this.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(f["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(b.fileClient.read(a.Location),"Reading file "+a.Location).then(function(c){b._hitOnceWithinFile(c)&&b._reportSingleHit(a);b.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(f["${0} files found out of ${1}"],b._hitCounter,b._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};h.prototype._buildSingleSkeleton=function(a){this._totalCounter++;
this.fileSkeleton.push(a);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new d;a.resolve(this._totalCounter);return a};h.prototype.constructor=h;return{SearchCrawler:h}});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(f,i,g,c,b){function d(a,b,c,d){this._inputField=a;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);(a=d?d.group:null)||(a=this._inputField.id?this._inputField.id:"default__dropDown__group");this._idPrefix=a+"__dropDown__";this.containerId=this._idPrefix+"UIContainer";this._dismissed=!0;
var f=this;this._optRenderer=new h(b,c,function(){f.dismiss();f._inputField.focus()});this._initUI()}function h(a,b,c){this._searcher=a;this._serviceRegistry=b;this._cancelCallBack=c}d.prototype._initUI=function(){this._optUIContainer=document.getElementById(this.containerId);if(!this._optUIContainer)this._optUIContainer=document.createElement("div"),this._optUIContainer.id=this.containerId,this._optUIContainer.style.display="none",this._optUIContainer.className="advSearchOptContainer",document.body.appendChild(this._optUIContainer),
this._optRenderer.render(this._optUIContainer)};d.prototype.dismiss=function(){this._dismissed=!0;this._optUIContainer.style.display="none"};d.prototype.show=function(a){for(var b=0,c=0,d=this._inputField;d;)b+=d.offsetLeft,c+=d.offsetTop,d=d.offsetParent;this._optUIContainer.style.display="block";this._optUIContainer.style.top=c+this._inputField.offsetHeight+2+"px";this._optUIContainer.style.left=b+"px";this._optUIContainer.style.width=this._inputField.offsetWidth+"px";this._optRenderer._searchBox.value=
a;this._optRenderer._searchBox.focus();this._dismissed=this._mouseDown=!1};d.prototype.toggle=function(){this._dismissed?this.show(this._inputField.value):this.dismiss()};d.prototype.constructor=d;h.prototype.getOptions=function(){return{searchStr:this._searchBox.value,caseSensitive:this._caseSensitiveCB.checked,regEx:this._regExCB.checked,type:this._fileTypes.options[this._fileTypes.selectedIndex].value}};h.prototype.render=function(a,b){this._parentDiv=a;if(typeof this._parentDiv==="string")this._parentDiv=
document.getElementById(this._parentDiv);var d=this._serviceRegistry.getService("orion.core.contenttypes");if(d){var f=this;d.getContentTypes().then(function(a){f.contentTypesCache=a;f._render(b)})}else d=new c.ContentTypeService(this._serviceRegistry),this.contentTypesCache=d.getContentTypes(),this._render(b)};h.prototype._render=function(a){a?this._renderHTML(a):this._renderRaw()};h.prototype._submitSearch=function(){var a=this.getOptions();g.doSearch(this._searcher,this._serviceRegistry,a.searchStr,
a)};h.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 a=[{label:f["All types"],value:g.ALL_FILE_TYPE}],c=0;c<this.contentTypesCache.length;c++)if(this.contentTypesCache[c]["extends"]==="text/plain"||this.contentTypesCache[c].id===
"text/plain")for(var d=0;d<this.contentTypesCache[c].extension.length;d++)a.push({label:this.contentTypesCache[c].extension[d],value:this.contentTypesCache[c].extension[d]});for(c=0;c<a.length;c++){var d=document.createElement("option"),h=document.createTextNode(a[c].label);d.appendChild(h);this._fileTypes.appendChild(d);d.value=a[c].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===g.ALL_FILE_TYPE?f["Type a search term"]:b.formatMessage(f["All ${0} files"],a)});this._submitButton.onclick=function(){i._submitSearch()}};h.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(f["Files that contain:"]));document.getElementById("advSearchInput").placeholder=f["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(f["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(f["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(f["Regular expression"]));document.getElementById("advSearchSubmit").value=f.Search};h.prototype._renderHTML=function(a){var b=this,c=new XMLHttpRequest;c.open("GET",i.toUrl(a),!0);c.onreadystatechange=function(){if(this.readyState===
4&&this.status===200)b._parentDiv.innerHTML=this.responseText,b._initHTMLLabels(),b._initControls()};c.send()};h.prototype._htmlTemplate='<ul class="advSearchOptUL"><li class="advSearchOptLILabel"><label>'+f["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+f["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+f["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
f["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+f["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+f.Search+'"></input></li></ul>';h.prototype._renderRaw=function(){this._parentDiv.innerHTML=this._htmlTemplate;this._initControls()};h.prototype.constructor=h;return{advSearchOptContainer:d,
advSearchOptRenderer:h}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(f,i,g,c,b,d,h){var a={},e=(new URL(f.toUrl("."),window.location)).href.slice(0,-1);a._cloneItemWithoutChildren=function n(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=n(a[c]));return b};a._createOpenWithCommands=function(a){function b(a,c){for(var d=
a.getServiceReferences("orion.navigate.openWith"),e=[],f=0;f<d.length;f++){var g=d[f];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?e=e.concat(g):g!==null&&typeof g!=="undefined"&&e.push(g))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],f=e.getProperty("id");c.push({id:f,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||
e.getProperty("uriTemplate")})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],f=0;f<c.length;f++){var g=c[f],h=d&&d.editor===g.id,i=b(a,g);i.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:i,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return e};
a._makeValidator=function(a,c,f,g){function h(a,b,c,d){var e=c.match,f;if(b.indexOf("|")>=0)return f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),h(a,f,c,d)?!0:h(a,b,c,d);else if(b.indexOf(":")>=0)return f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?h(a[f],b,c,d):!1;else{a:{f=!1;var g;if(a[b]){if(e)if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))f=e[0],g=c.variableMatchPosition==="before"?a[b].substring(0,
e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+f.length):c.variableMatchPosition==="only"?f:a[b],f=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===e&&(g=a[b],f=!0);else g=a[b],f=!0;if(f&&c.variableName&&(d[c.variableName]=g,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=f}else c=!1}return c}}return{info:a,validationFunction:function(c){typeof g==="function"&&(c=g.call(this,c));if(c){if(Array.isArray(c)){if((this.info.forceSingleItem||this.info.uriTemplate)&&c.length!==1)return!1;if(c.length<1)return!1}else c=[c];for(var d=0;d<c.length;d++){var e;a:{var i=c[d],l=f;if(this.info.validationProperties)for(e=0;e<this.info.validationProperties.length;e++){var t=this.info.validationProperties[e];if(t.source){if(!h(i,t.source,t,this)){e=!1;break a}}else{window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified.");e=!1;break a}}if(this.info.contentType&&l){t=!1;if(i=b.getFilenameContentType(i.Name,l))for(e=0;e<this.info.contentType.length;e++)if(i.id===this.info.contentType[e]){t=!0;break}e=t}else e=!0}if(!e)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var f=
this.info.validationProperties[c];f.source&&f.variableName&&(this.itemCached===a&&this[f.variableName]||h(a,f.source,f,this),a[f.variableName]?window.console.log("Variable name "+f.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[f.variableName]=this[f.variableName])}b.OrionHome=e;a=new d(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null}}};a._createCommandOptions=function(b,c,d,e,f,g){function o(h,i){var m=
a._makeValidator(b,d,e,g);h.visibleWhen=m.validationFunction.bind(m);if(f)if(m.generatesURI.bind(m)())h.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return m.getURI.bind(m)(a)};else{var o=b;h.callback=function(b){var e;if(o.forceSingleItem)b=Array.isArray(b.items)?b.items[0]:b.items,e=a._cloneItemWithoutChildren(b);else if(Array.isArray(b.items)){e=[];for(var f=0;f<b.items.length;f++)e.push(a._cloneItemWithoutChildren(b.items[f]))}else e=a._cloneItemWithoutChildren(b.items);
if(d)var g=d.getService("orion.page.progress");c.run?g?g.progress(c.run(e),"Running command: "+h.name):c.run(e):d&&(g?g.progress(d.getService(c).run(e),"Running command: "+h.name):d.getService(c).run(e))}}i.resolve(h)}var m=new i;b.nls?h.getMessageBundle(b.nls).then(function(a){o({name:b.nameKey?a[b.nameKey]:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltipKey?a[b.tooltipKey]:b.tooltip,isEditor:b.isEditor},m)}):o({name:b.name,image:b.image,id:b.id||b.name,tooltip:b.tooltip,isEditor:b.isEditor},
m);return m};a.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return a});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(f,i,g,c,b,d,h){function a(a){return a instanceof Array?a:[a]}function e(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var j=g.Command,n=h.formatMessage;return{createSiteServiceCommands:function(a,d){var d=d||{},e=a.getService("orion.page.command"),h=new g.Command({name:f.Create,
tooltip:f["Create a new site configuration"],id:"orion.site.create",parameters:new g.ParametersDescription([new g.CommandParameter("name","string",f.Name)]),visibleWhen:function(){return!0},callback:function(e){var f=e.items,g=a.getService(f),f=b.getFileClient(a,f.getProperty("filePattern")),h=e.parameters&&e.parameters.valueFor("name"),e=a.getService("orion.page.progress");(e?e.progress(f.loadWorkspaces(),"Loading workspaces"):f.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&h&&g.createSiteConfiguration(h,
a).then(function(a){d.createCallback(c.generateEditSiteHref(a),a)},d.errorCallback)})}});e.addCommand(h)},createSiteCommands:function(g){var h=g.getService("orion.page.command"),i=g.getService("orion.page.dialog"),q=g.getService("orion.page.progress"),p=new j({name:f.Edit,tooltip:f["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return c.generateEditSiteHref(a.items instanceof
Array?a.items[0]:a.items)}});h.addCommand(p);p=new j({name:f.Start,tooltip:f["Start the site"],imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(c){var f=a(c.items),h=c.userData;if(h.site&&f.length>1)throw Error("userData.site requires a single site configuration to act upon");f=f.map(function(a){var c=h.site||{};c.HostingStatus={Status:"started"};a=a.Location;return b.forLocation(g,
a).updateSiteConfiguration(a,c)});q.showWhile(d.all(f)).then(e(c.items)).then(h.startCallback,h.errorCallback)}});h.addCommand(p);p=new j({name:f.Stop,tooltip:f["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(c){var f=a(c.items),h=c.userData;if(h.site&&f.length>1)throw Error("userData.site requires a single site configuration to act upon");f=f.map(function(a){var c=
h.site||{};c.HostingStatus={Status:"stopped"};a=a.Location;return b.forLocation(g,a).updateSiteConfiguration(a,c)});q.showWhile(d.all(f)).then(e(c.items)).then(h.stopCallback,h.errorCallback)}});h.addCommand(p);p=new j({name:f.Delete,tooltip:f["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){b=a(b);return b.length>0?b.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(c){var h=a(c.items),
j=c.userData,k=h.length===1?n(f.ConfirmDeleteSingle,h[0].Name):n(f.ConfirmDeleteMultiple,h.length);i.confirm(k,function(a){a&&(a=h.map(function(a){a=a.Location;return b.forLocation(g,a).deleteSiteConfiguration(a)}),d.all(a).then(e(c.items)).then(j.deleteCallback,j.errorCallback))})}});h.addCommand(p)},createViewOnSiteCommands:function(a){var c=a.getService("orion.core.file"),d=a.getService("orion.page.command");d.addCommand(new j({name:f["Add to site"],tooltip:f["Add the file to this site"],id:"orion.site.add-to",
imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},callback:function(d){var e=d.userData.file,f=d.items.SiteConfiguration,g=a.getService("orion.page.progress");return(g?g.progress(c.loadWorkspaces(),"Loading workspaces"):c.loadWorkspaces()).then(function(c){return b.forFileLocation(a,e.Location).mapOnSiteAndStart(f,e,c[0].Id)}).then(d.userData.addToCallback,d.userData.errorCallback)}}));d.addCommand(new j({name:f.View,tooltip:f["View the file on the site"],id:"orion.site.view-on-link",
visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(c){var d=c.userData.file,c=c.items.SiteConfiguration;return b.forFileLocation(a,d.Location).getURLOnSite(c,d)}}))}}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler".split(","),function(f,i,g,c,b,d){function h(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;(this._fileService=a.fileService)||console.error("No file service on search client")}h.prototype={search:function(a,c,f){var g=function(a){for(var c=[],d=0;d<a.response.docs.length;d++){var e=a.response.docs[d];c.push({name:e.Name,path:e.Location,
folderName:b.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return c};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(a){f(g(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var c=a.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);f(g(b),c)},function(a){f(null,null,a)})}catch(h){typeof h==="string"&&h.indexOf("search")>
-1&&this._crawler?this._crawler.searchName(a,function(a){f(g(a),null)}):typeof h==="string"&&h.indexOf("search")>-1&&!a.nameSearch?(new d.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(a){f(g(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(h)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);g.empty(b);b.appendChild(document.createTextNode(a));
return a},setLocationByMetaData:function(a,b){var d="",h=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?h=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(h=a);if(h)this.setLocationbyURL(h.Location),d=h.Name,this._childrenLocation=h.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),d=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;
h=g.node("search");d||(d="");if(h&&h.placeholder){h.value="";var i=c.formatMessage(f["Search ${0}"],d);h.placeholder=i.length>30?i.substring(0,27)+"...":c.formatMessage(f["Search ${0}"],d)}if(h&&h.title)h.title=f["Type a keyword or wild card to search in "]+d},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},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(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:"Path asc",
rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.type:void 0,keyword:a}},defaultRenderer:{makeRenderFunction:function(a,b,d,h,l){function k(b){return!a?!0:(b=a.getFilenameContentType(b))&&(b["extends"]==="text/plain"||b.id==="text/plain")?!0:!1}return function(a,q,p){if(p)g.empty(b),a=document.createElement("div"),a.appendChild(document.createTextNode(f["Search failed."])),b.appendChild(a),typeof h==="function"&&h(b);else{var p=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)}}}(),o=!1;g.empty(b);if(a&&a.length>0){var m=document.createElement("table");m.setAttribute("role","presentation");for(var w=0;w<a.length;w++){var s=a[w],t;if(!o&&(o=!0,d))t=
m.insertRow(0).insertCell(0),t.textContent=d;t=m.insertRow(-1).insertCell(0);t.colspan=2;l&&l(t);var v=document.createElement("a");v.appendChild(document.createTextNode(s.name));s.LineNumber&&v.appendChild(document.createTextNode(" (Line "+s.LineNumber+")"));var x=s.location;s.isExternalResource?x=s.path:(x=s.directory?i.toUrl("navigate/table.html")+"#"+s.path:k(s.name)?i.toUrl("edit/edit.html")+"#"+s.path:s.path,x==="#"&&(x=""));v.setAttribute("href",x);v.setAttribute("aria-describedby",(s.folderName?
s.folderName:s.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));v.style.verticalAlign="middle";t.appendChild(v);p(t,s)}b.appendChild(m);typeof h==="function"&&h(b)}!o&&q&&(a=c.formatMessage(f["No matches found for ${0}"],q),g.empty(b),b.appendChild(document.createTextNode(a)),typeof h==="function"&&h(b))}}}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(f,i,g){return{slideoutHTMLFragment:function(c){var b=document.createElement("div");b.innerHTML=g;var d=i.$("#slideContainer",b);d.id=c+d.id;d=i.$("#pageCommandParameters",b);d.id=c+d.id;d=i.$("#pageCommandDismiss",b);d.id=c+d.id;return b.innerHTML}}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(f,i,g){function c(b,c){this._activeContainer=null;this._getElementsFunction=b;this._toolbarLayoutFunction=c}c.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&g.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&g.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(b,c,h){typeof b==="string"&&(b=g.node(b));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===b)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(b))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=h;var a=c(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!a)return!1;this._activeElements.focusNode=a;b=g.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(b.length===0){c=this._activeElements.dismissArea||
this._activeElements.parameterArea;b=document.createElement("span");b.id="closebox";b.role="button";b.tabIndex=0;b.classList.add("imageSprite");b.classList.add("core-sprite-close");b.classList.add("dismiss");b.title=f.Close;c.appendChild(b);var e=this;b.addEventListener("click",function(){e.close()},!1);b.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&e.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(a)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){a.focus();a.select()},0);this._activeElements.commandNode&&this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(b,c){g.$$array("input",c).forEach(function(c){c.type==="checkbox"?b.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&b.parameters.setValue(c.parameterName,c.value.trim())});g.$$array("textArea",c).forEach(function(c){b.parameters.setValue(c.parameterName,
c.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?(b.domNode&&b.domNode.classList.add("commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(b,c){var h=this;return function(a,e){var j=null,i=function(){c&&c();h.close()},l=function(c){c.keyCode===g.KEY.ENTER&&h._collectAndCall(b,a);if(c.keyCode===g.KEY.ESCAPE||c.keyCode===g.KEY.ENTER)i(),g.stop(c)};b.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,a.appendChild(c);var d=b.name+"parameterCollector",e=c||a;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)c=document.createElement("textarea"),c.rows=b.lines,c.type="textarea",c.id=d,e.appendChild(c),l=function(a){a.keyCode===g.KEY.ESCAPE&&(i(),g.stop(a))};else if(b.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",
c.id=d,e.appendChild(c),b.value)c.checked=!0}else if(c=document.createElement("input"),c.type=b.type,c.id=d,e.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;j||(j=c);c.addEventListener("keydown",l,!1)});var k=e;if(!k)k=document.createElement("span"),k.className="layoutRight parametersDismiss",a.appendChild(k);var r=function(c){c._collectAndCall(b,
a);i()},q=function(a,b){var c=document.createElement("span");c.role="button";c.tabIndex=0;b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismiss");return c};if(b.parameters.hasOptionalParameters()){b.parameters.optionsRequested=!1;var p=q(f.More,k);p.addEventListener("click",function(){b.parameters.optionsRequested=!0;r(h)},!1);p.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)b.parameters.optionsRequested=!0,r(h)},!1)}p=q(f.Submit,
k);p.addEventListener("click",function(){r(h)},!1);p.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&r(h)},!1);k=q(null,k);k.id="closebox";k.classList.add("imageSprite");k.classList.add("core-sprite-close");k.title=f.Close;k.addEventListener("click",function(){i()},!1);k.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&i()},!1);return j}}};c.prototype.constructor=c;return{CommandParameterCollector:c}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(f,i){function g(c){this._init(c)}g.prototype={_init:function(c){var b=i.node(c.container);if(!b)throw"no parent container";this._container=b;b.classList.remove("currentLocation");this._id=c.id||"eclipse.breadcrumbs";this._resource=c.resource||null;this._rootSegmentName=c.rootSegmentName;this._workspaceRootSegmentName=c.workspaceRootSegmentName;this._makeHref=c.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var c;
this._resource&&this._resource.Parents?(c=document.createElement("a"),this._makeHref?this._makeHref(c,""):c.href=f.toUrl("navigate/table.html")+"#"):c=document.createElement("span");i.empty(c);c.appendChild(document.createTextNode(this._workspaceRootSegmentName));return c}return null},render:function(){var c=this._container,b=i.node(this._id);b?i.empty(b):(b=document.createElement("span"),b.id=this._id,c.appendChild(b));var d;if(d=this.getNavigatorWorkspaceRootSegment())if(d.classList.add("breadcrumb"),
b.appendChild(d),this._resource&&this._resource.Parents)d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),b.appendChild(d);else{d.href="";d.classList.remove("breadcrumb");d.classList.add("currentLocation");return}c=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var g=this._resource.Parents,a=g.length;--a>=0;)d=document.createElement("a"),d.classList.add("breadcrumb"),c?(d.appendChild(document.createTextNode(c)),
c=null):d.appendChild(document.createTextNode(g[a].Name)),this.path+=g[a].Name,this._makeHref?this._makeHref(d,g[a].Location):d.href=f.toUrl("navigate/table.html")+"#"+g[a].ChildrenLocation,b.appendChild(d),d=document.createElement("span"),d.appendChild(document.createTextNode(" / ")),this.path+="/",d.classList.add("breadcrumbSeparator"),b.appendChild(d);d=document.createElement("span");c?(d.appendChild(document.createTextNode(c)),c=null):d.appendChild(document.createTextNode(this._resource.Name));
d.classList.add("currentLocation");this.path+=this._resource.Name;b.appendChild(d)}b.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(c||document.title)),d.classList.add("breadcrumb"),d.classList.add("currentLocation"),b.appendChild(d))}};g.prototype.constructor=g;return{BreadCrumbs:g}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(f,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=c.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(c.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(c){this._resizeListeners.push(c)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var c;if(this._vertical){if(c=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=
parseInt(c,10)}else if(c=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(c,10)},_adjustToSplitPosition:function(c){var b=i.bounds(this.$node),d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=b.height;if(c||!this._splitTop)this._splitTop=b.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);c=this._splitTop;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-d.top);this.$sideNode.style.height=c+"px";this.$sideNode.style.bottom=
c-1+"px";this.$sideNode.style.display="block";this.$node.style.top=c+"px"}else{this._splitWidth=b.width;if(c||!this._splitLeft)this._splitLeft=b.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);c=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-d.left);this.$sideNode.style.width=c+"px";this.$sideNode.style.right=c-1+"px";this.$sideNode.style.display="block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c){var c=c||0,b=i.bounds(this.$node.parentNode),
d=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=b.height-(d.top-b.top+d.height)+"px":this.$mainNode.style.width=b.width-(d.left-b.left+d.width)+"px";var f=this;window.setTimeout(function(){f._notifyResizeListeners(f.$mainNode)},c);window.setTimeout(function(){f._notifyResizeListeners(f.$sideNode)},c)},_notifyResizeListeners:function(c){for(var b=0;b<this._resizeListeners.length;b++)this._resizeListeners[b](c)},_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 c=this;window.setTimeout(function(){c.$sideNode.classList.remove("sidePanelLayoutAnimation");c.$mainNode.classList.remove("mainPanelLayoutAnimation");c.$node.classList.remove("splitLayoutAnimation");c._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(c){if(c.target===this._thumb)return i.stop(c),this._thumbDown(c);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(c)},_mouseMove:function(c){if(this._tracking){var b;this._vertical?(b=this._splitTop=c.clientY,this.$node.parentNode.style.position===
"relative"&&(b=i.bounds(this.$node.parentNode),b=this._splitTop-b.top),this.$node.style.top=b+"px"):(b=this._splitLeft=c.clientX,this.$node.parentNode.style.position==="relative"&&(b=i.bounds(this.$node.parentNode),b=this._splitLeft-b.left),this.$node.style.left=b+"px");this._adjustToSplitPosition(!0);i.stop(c)}},_mouseUp:function(c){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(c)}};g.prototype.constructor=g;return{Splitter:g}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(f,i,g,c){function b(b){this._init(b)}b.prototype={_init:function(b){this._dropdownNode=g.node(b.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=b.dropdown;this._serviceRegistry=b.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(b){var c=0,a;for(a in b)b.hasOwnProperty(a)&&c++;return c},_makeMenuItem:function(b,c){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var e=document.createTextNode(b);a.appendChild(e);a.classList.add("dropdownMenuItem");a.addEventListener("click",c,!1);a.addEventListener("keydown",function(a){(a.keyCode===
g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&c()},!1);return a},_renderAuthenticatedService:function(b){var c=this,a=this.authenticatedServices[b].authService;if(a&&a.logout){var e=document.createElement("li"),g=this._makeMenuItem(f["Sign Out"],function(){a.logout().then(function(){c.addUserItem(b,a,c.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var e=localStorage.length-1;e>=0;e--){var f=localStorage.key(e);f&&f.indexOf("/orion/preferences/user")===
0&&localStorage.removeItem(f)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});e.appendChild(g);this._dropdownNode.appendChild(e)}},renderServices:function(){function b(c){a[c]||(a[c]=g.createDocumentFragment());return a[c]}var g=document,a=[];c.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(c){this._dropdown.empty();c.forEach(function(a){var c=b(typeof a.category==="number"?a.category:1),e=g.createElement("li"),f=g.createElement("a");f.role=
"menuitem";f.classList.add("dropdownMenuItem");f.href=a.href;f.textContent=a.textContent;e.appendChild(f);c.appendChild(e)});if(this.keyAssistFunction){var c=document.createElement("li"),j=this._makeMenuItem(f["Keyboard Shortcuts"],this.keyAssistFunction);j.classList.add("key-assist-menuitem");c.appendChild(j);b(0).appendChild(c)}var i=this;a.sort(function(a,b){return a-b}).forEach(function(b,c){if(c<a.length-1){var d=document.createElement("li");d.classList.add("dropdownSeparator");var e=document.createElement("span");
e.classList.add("dropdownSeparator");d.appendChild(e);b.appendChild(d)}i._dropdownNode.appendChild(b)});if(this.isSingleService())for(var l in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(l)&&this._renderAuthenticatedService(l,0)}.bind(this))},setKeyAssist:function(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,c,a,e){e?(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:c,label:a,data:e}):
(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:c,label:a,pending:this.unauthenticatedServices[b].pending}:{authService:c,label:a});this.renderServices()}};b.prototype.constructor=b;return{UserMenu:b}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(f,i,g,c){function b(){}b.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 b=
document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(b);c=c.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(c);this.$frame=b.lastChild;this.title&&g.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=g.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(){a.hide()},!1);this.$parent=g.$(".dialogContent",this.$frame);c=document.createRange();c.selectNode(this.$parent);
b=c.createContextualFragment(this.TEMPLATE);this.messages&&g.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=g.$(".dialogButtons",this.$frame);this._makeButtons();this.$close.addEventListener("keydown",function(b){(b.keyCode===g.KEY.ENTER||b.keyCode===g.KEY.SPACE)&&a.hide()},!1);this.$frame.addEventListener("keydown",function(b){b.keyCode===g.KEY.ESCAPE?a.hide():b.keyCode===g.KEY.ENTER&&typeof a._defaultCallback==="function"&&a._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 b=this;this.buttons.forEach(function(f){var a=c.createButton(f.text,f.callback);if(f.id)a.id=f.id,b["$"+a.id]=a;if(f.isDefault)b._defaultCallback=f.callback,b._defaultButton=a;b.$buttonContainer.appendChild(a)})}},_makeModal:function(){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},
!0);this._modalListener=function(a){var c=!g.contains(b.$frame,a.target);if(c)for(var e=0;e<b.$$modalExclusions.length;e++)if(g.contains(b.$$modalExclusions[e],a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),g.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,a=!1;this._addedBackdrop=[];for(var e=0;e<c.length;e++){for(var f=
0;f<this.$$modalExclusions.length;f++)if(g.contains(this.$$modalExclusions[f],c[e])){a=!0;break}!a&&c[e]!==b.$frame&&c[e].classList&&!c[e].classList.contains("tooltipContainer")&&(f=c[e],f.classList.contains("modalBackdrop")||(f.classList.add("modalBackdrop"),this._addedBackdrop.push(f)))}(c=g.lastTabbable(this.$buttonContainer)||g.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();g.stop(a)}},!1)},
_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},_bindElements:function(b){for(var c=0;c<b.childNodes.length;c++){var a=b.childNodes[c];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},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 b=this;this.keepAlive||window.setTimeout(function(){b.destroy()},0)},show:function(b){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=g.bounds(this.$frame),a=g.bounds(document.documentElement),e;b?(e=g.bounds(b),b=e.top+e.height+4,e=e.left+4,b+c.height>a.height&&(b=Math.max(0,a.height-c.height-4)),e+c.width>a.width&&(e=Math.max(0,a.width-c.width-4))):(e=Math.max(0,(a.width-c.width)/2),b=Math.max(0,(a.height-c.height)/2));this.$lastFocusedElement=
document.activeElement;this.$frame.style.top=b+"px";this.$frame.style.left=e+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return g.firstTabbable(this.$parent)||this._defaultButton||g.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(b){b.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}};b.prototype.constructor=b;return{Dialog:b}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/webui/dialog".split(","),function(f,i,g,c,b,d){function h(a){this._init(a)}h.prototype=new d.Dialog;h.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="'+
c.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>';h.prototype._init=function(a){this.title=a.title||f["Find File Named"];this.modal=!0;this.messages=f;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;
this._contentTypeService=new g.ContentTypeService(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.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(f["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(f["Missing required argument: searchRenderer"]);this._favService=a.favoriteService;if(!this._favService)throw Error(f["Missing required argument: favService"]);this._initialize()};h.prototype._bindToDom=function(a){var c=this;c.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",f.Search);this.$fileName.addEventListener("input",function(){c._time=+new Date;c._timeoutId&&clearTimeout(c._timeoutId);c._timeoutId=setTimeout(c.checkSearch.bind(c),0)},
!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===b.KEY.ENTER){var d=b.$("a",c.$results);d&&(b.stop(a),window.open(d.href),c.hide())}},!1);a.addEventListener("keydown",function(a){var d,f,g,h,i;if(a.keyCode===b.KEY.DOWN||a.keyCode===b.KEY.UP)f=b.$$array("a",c.$results),d=b.$$array("a",c.$favresults),g=document.activeElement,i=f.indexOf(g),h=d.indexOf(g),a.keyCode===b.KEY.DOWN?h>=0?(h<d.length-1?d[h+1]:f.length>0?f[0]:d[0]).focus():i>=0?(i<f.length-1?f[i+1]:d.length>0?d[0]:f[0]).focus():
(f.length>0||d.length>0)&&(-1<d.length-1?d[0]:f[0]).focus():h>=0?(g=c.$fileName,(h>0?d[h-1]:g).focus()):i>=0?(g=c.$fileName,(i>0?f[i-1]:d.length>0?d[d.length-1]:g).focus()):f.length>0?f[f.length-1].focus():d.length>0&&d[d.length-1].focus(),b.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(c._forceUseCrawler||!c._fileService.getService(c._searcher.getSearchLocation()).search){var a=c._searchOnRoot?c._searcher.getSearchRootLocation():
c._searcher.getChildrenLocation(),a=new i.SearchCrawler(c._searcher.registry,c._fileService,"",{searchOnName:!0,location:a});c._searcher.setCrawler(a);a.buildSkeleton(function(){c.$crawlingProgress.style.display="inline";c.$progress.appendChild(document.createTextNode(f["Building file skeleton..."]))},function(){c.$crawlingProgress.style.display="none";c.$progress.removeChild(c.$progress.lastChild)})}},0)};h.prototype.populateFavorites=function(){var a=document.createElement("div");a.appendChild(document.createTextNode(f["Populating favorites&#x2026;"]));
b.empty(this.$favresults);this.$favresults.appendChild(a);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())};h.prototype.showFavorites=function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a._searchRenderer.makeRenderFunction(a._contentTypeService,a.$favresults,!1,a.decorateResult.bind(a),
a.showFavoritesImage)(b);if(b&&b.length>0)b=document.createElement("div"),b.style.borderBottom="1px dashed #BBBBBB",b.style.padding="5px",a.$favresults.appendChild(b)}};h.prototype.showFavoritesImage=function(a){var b=new Image;b.classList.add("modelDecorationSprite");b.classList.add("core-sprite-makeFavorite");b.src=c.toUrl("images/none.png");b.title=f.Favorite;a.appendChild(b);b.style.verticalAlign="middle"};h.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();
a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};h.prototype.doSearch=function(){var a=this.$fileName.value,c=this.showFavorites();this._progress?this._progress.progress(this._favService.queryFavorites(a),"Getting favorites for: "+a).then(function(a){c(a)}):this._favService.queryFavorites(a).then(function(a){c(a)});if(a){var d=document.createElement("div");d.appendChild(document.createTextNode(f["Searching..."]));b.empty(this.$favresults);
this.$results.appendChild(d);var g=this;setTimeout(function(){var b=g._searcher.createSearchParams(a,!0,g._searchOnRoot),c=g._searchRenderer.makeRenderFunction(g._contentTypeService,g.$results,!1,g.decorateResult.bind(g));g._searcher.search(b,!1,c)},0)}};h.prototype.decorateResult=function(a){for(var c=this,a=b.$$array("a",a),d=0;d<a.length;d++){var f=a[d];f.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&c.hide()},!1);f.addEventListener("keyup",function(a){a.keyCode===
b.KEY.ENTER&&c.hide()},!1)}};h.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};h.prototype._afterHiding=function(){this._onHide&&this._onHide()};h.prototype.constructor=h;return{OpenResourceDialog:h}});
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(f,
i,g,c,b,d,h,a,e,j,n,l,k,r,q,p,o,m,w,s,t,v,x,u,G,C,A,y){function I(a,b){if(a.getLabel)return a.getLabel();else{var c=new v;c.resolve(b.properties.name);return c}}function J(a){j.node("progressPane").setAttribute("aria-label",f["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function F(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){var c;a.Name?c=document.createTextNode(a.Name):a.login&&
(c=document.createTextNode(a.login));c&&(b.childNodes.length>0?b.childNodes[0].nodeType===3?b.replaceChild(c,b.childNodes[0]):b.insertBefore(c,b.childNodes[0]):b.appendChild(c))})}function M(a,b){var c=a.getServiceReferences("orion.core.auth");R=[];if(j.node("userMenu")){var d=j.node("userDropdown"),e=new l.Dropdown({dropdown:d}),g=new x.UserMenu({dropdownNode:d,dropdown:e,serviceRegistry:a}),d=j.node("userTrigger");new k.Tooltip({node:d,text:f.Options,position:["below","left"]});F(a,d);g.setKeyAssist(b);
for(d=0;d<c.length;d++){var e=c[d],h=a.getService(e);I(h,e).then(function(a){h.getKey().then(function(b){R.push(b);h.getUser().then(function(c){g.addUserItem(b,h,a,c)},function(c,d){g.addUserItem(b,h,a,d)});window.addEventListener("storage",function(){Q[b]!==localStorage.getItem(b)&&(Q[b]=localStorage.getItem(b),h.getUser().then(function(c){g.addUserItem(b,h,a,c)},function(){g.addUserItem(b,h,a)}))},!1)})})}}}function L(a){var b=document.createElement("span");b.id="advancedSearchDropDown";j.node("searchOptions").appendChild(b);
b.tabIndex=0;b.classList.add("advancedSearchDecorationSprite");b.classList.add("core-sprite-openarrow");b.title=f["Advanced search"];b.onclick=function(){a.toggle()};b.addEventListener("keydown",function(b){(b.charCode||b.keyCode)===13&&a.toggle()});b.classList.add("bannerMenuSearchOptions")}function H(a,b){var c=j.node("relatedDropdown");B||(B=new l.Dropdown({dropdown:c}));a._addMenuItem(c,b)}function E(a,b,e,f,g){var h,i=a.getServiceReferences("orion.page.link.related");i.length<=0||j.node("relatedLinks")&&
v.when(function(){if(h)return h;var b=a.getService("orion.core.contenttypes");b||(b=new q.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var k;j.node("relatedLinks")&&B&&(B.close(),B.empty());for(var l=[],n=0;n<i.length;n++){var m={},o,p=i[n].getPropertyKeys();for(o=0;o<p.length;o++)m[p[o]]=i[n].getProperty(p[o]);if(m.id){var w=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var d=new c.CommandInvocation(f,
b,b,null,a);H(a,d)}else typeof g==="function"&&(k||(k=g()),v.when(k,function(d){d&&b===S&&(!a.visibleWhen||a.visibleWhen(d))&&H(a,new c.CommandInvocation(f,d,d,null,a))}))},r=null;o=null;if(e.indexOf(m.id)<0)if((m.nls&&m.nameKey||m.name)&&m.uriTemplate)o=d._createCommandOptions(m,i[n],a,h,!0),l.push(o),o.then(function(a){a=new c.Command(a);w(a)});else{if(!r&&(r=f.findCommand(m.id))){w(r);continue}if(!r){var t=a.getServiceReferences("orion.navigate.command");for(o=0;o<t.length;o++)if(t[o].getProperty("id")===
m.id){for(var m={},p=t[o].getPropertyKeys(),s=0;s<p.length;s++)m[p[s]]=t[o].getProperty(p[s]);o=d._createCommandOptions(m,t[o],a,h,!0);l.push(o);o.then(function(a){r=new c.Command(a);w(r)});break}}}}}v.all(l,function(a){return a}).then(function(){var a=j.node("relatedTrigger");if(B&&a)a.style.visibility=B.getItems().length===0?"hidden":"visible"})})}function N(a){var b=j.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function U(a){a.getPreferences("/themes",2).then(function(a){var b=
a.get("selected");if(b&&(b=JSON.parse(b),a=a.get("styles"))){var a=JSON.parse(a),c;for(c in a)if(a[c].name===b.selected){c=a[c];c=(new m.ThemeSheetWriter).getSheet(c);b=document.createElement("STYLE");b.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function O(a){var b={},c=null;typeof a==="string"&&(a=j.node(a));a||(a=j.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){c=
d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=j.$(".slideParameters",c),b.parameterArea=j.$(".parameters",c),b.dismissArea=j.$(".parametersDismiss",c),b.notifications=j.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=j.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=j.bounds(c),b.toolbarTargetY=a.height+1;return b}function P(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&
(c=j.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=j.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var p=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),Q={},R=[],B,S,T=[],D,K=null;return{addSettings:function(a){var b=document.getElementById("settingsTab"),c=document.getElementById("settingsAction"),
d=!1,e;b.style.visibility="";c.style.visibility="";c.onclick=function(){if(!d){d=!0;b.style.backgroundColor="#555";b.style.zIndex="99";b.style.borderTopRightRadius="3px";b.style.borderTopLeftRadius="3px";c.className="core-sprite-settings-white";b.id="settingsNode";c.id="settingsButton";var f=document.getElementById("innerPanels"),g=f.getBoundingClientRect(),h=b.getBoundingClientRect();e?e.style.visibility="visible":(e=document.createElement("div"),e.className="settingsPanel",e.style.width="150px",
e.style.height="150px",e.style.backgroundColor="#555",e.style.zIndex="99",e.style.top=h.top-g.top+24-4+"px",e.id="settingsPanel",e.style.borderTopLeftRadius="3px",e.style.borderBottomRightRadius="3px",e.style.borderBottomLeftRadius="3px",f.appendChild(e),j.addAutoDismiss([c,b,e],function(){c.className="core-sprite-settings";b.style.backgroundColor="white";e.style.visibility="hidden";d=!1}));j.empty(e);a.appendTo(e)}}},generateBanner:function(d,e,l,m,o,p,q,x){function D(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=j.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}U(m);m=j.node(d);if(!m)throw f["could not find banner parent, id was "]+d;d=document.createRange();d.selectNode(m);d=d.createContextualFragment(C);j.processTextNodes(d,f);m.firstChild?m.insertBefore(d,m.firstChild):m.appendChild(d);d=j.node("home");d.href=i.toUrl("navigate/table.html");d.setAttribute("aria-label",
f["Orion Home"]);j.node("progressPane").src=i.toUrl("images/none.png");if(d=j.node("pageToolbar"))d.classList.add("toolbarLayout"),d.innerHTML=y+g.slideoutHTMLFragment("mainToolbar");(d=j.node("closeNotifications"))&&d.setAttribute("aria-label",f["Close notification"]);if(d=j.node("footer"))d.innerHTML=A,j.processTextNodes(d,f);l.setParameterCollector(new b.CommandParameterCollector(O,P));var z=document.createElement("div");z.id="keyAssist";z.style.display="none";z.classList.add("keyAssistFloat");
z.role="list";z.setAttribute("aria-atomic","true");z.setAttribute("aria-live","assertive");document.body.appendChild(z);document.addEventListener("keydown",function(a){if(a.charOrCode===j.KEY.ESCAPE)z.style.display="none"},!1);j.addAutoDismiss([z],function(){z.style.display="none"});var E=j.node("primaryNav");E&&u.createPageLinks(e,"orion.page.link").then(function(a){a.forEach(function(a){E.appendChild(a)})});var B=j.node("search");if(!B)throw"failed to generate HTML for banner";B.setAttribute("placeholder",
f.Search);new k.Tooltip({node:B,text:f["Type a keyword or wild card to search in root"],position:["below","left"]});var H=new t.advSearchOptContainer(B,o,e,{group:"advancedSearch"});new s.InputCompletion(B,function(a){w.getMixedSearches(e,!0,!1,function(b){var c,d=[],e=!1,g=!1;for(c in b)b[c].label&&b[c].value?(e||(d.push({type:"category",label:f["Saved searches"]}),e=!0),d.push({type:"proposal",value:{name:b[c].label,value:i.toUrl("search/search.html")+"#"+b[c].value,type:"link"}})):(g||(d.push({type:"category",
label:f["Recent searches"]}),g=!0),d.push({type:"proposal",label:b[c].name,value:b[c].name}));a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var c=e.getServiceReferences("orion.search.proposal");if(!c||c.length===0)b(null);else{var d=[];c.forEach(function(b){var c=b.getProperty("filterForMe");d.push(e.getService(b).run(a).then(function(a){for(var b={filterForMe:c,proposals:[]},d=0;d<a.length;d++){b.proposals.push({type:"category",label:a[d].category});for(var e=0;e<a[d].datalist.length;e++)b.proposals.push({type:"proposal",
label:a[d].datalist[e],value:a[d].datalist[e]})}return b}))});v.all(d).then(function(a){b(a)})}}});B.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&w.doSearch(o,e,B.value)});L(H);j.addAutoDismiss([j.node(H.containerId),j.node("advancedSearchDropDown")],function(){H.dismiss()});if(d=j.$(".split")){var m=j.$(".sidePanelLayout"),F=j.$(".mainPanelLayout");if(m&&F)K={side:m,main:F},K.splitter=new n.Splitter({node:d,sidePanel:m,mainPanel:F,toggle:!0}),d=new c.Command({name:f["Toggle side panel"],
tooltip:f["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),l.addCommand(d),l.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new c.CommandKeyBinding("o",!0)),q&&(K.splitter.addResizeListener(function(a){q&&a===F&&q.getTextView().resize()}),q.getTextView().setKeyBinding(new a.KeyBinding("o",!0),"toggleOutliner"),q.getTextView().setAction("toggleOutliner",function(){K.splitter.toggleSidePanel();return!0},{name:f["Toggle Outliner"]}))}d=
new c.Command({name:f["Make Favorite"],tooltip:f["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=e.getService("orion.core.favorite"),c=e.getService("orion.page.progress"),d=function(a){return function(d){d?e.getService("orion.page.message").setMessage(a.Name+
f[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},g=0;g<a.length;g++){var h=a[g];c.progress(b.hasFavorite(h.ChildrenLocation||h.Location),"Checking favorite "+h.Name).then(d(h))}}});l.addCommand(d);var I=function(a,b,c){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new r.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new G.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:d,onHide:function(){c&&c.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},d=new c.Command({name:f["Find File Named..."],tooltip:f["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){I(o,e,q)}});q&&(q.getTextView().setKeyBinding(new a.KeyBinding("f",!0,!0,!1),d.id),q.getTextView().setAction(d.id,function(){I(o,e,q);return!0},d));l.addCommand(d);l.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new c.CommandKeyBinding("f",!0,!0));d=new c.Command({name:f["Global search"],tooltip:f["Global search"],id:"eclipse.globalSearch",callback:function(){var a=j.node("search");a&&a.focus()}});q&&(q.getTextView().setKeyBinding(new a.KeyBinding("h",!0,!1,!0),d.id),q.getTextView().setAction(d.id,function(){var a=q.getSelection(),b=null;a.end>a.start&&(b=q.getModel().getText(a.start,a.end));if(a=j.node("search")){if(b)a.value=b;a.focus()}return!0},d));l.addCommand(d);l.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new c.CommandKeyBinding("h",!0,!1,!0));d=new c.Command({name:f["Toggle banner and footer"],tooltip:f["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=j.node("banner"),b=j.node("footer"),c=j.$(".content-fixedHeight");a.style.display==="none"?(a.style.display="block",b.style.display="block",c.classList.remove("content-fixedHeight-maximized")):(a.style.display="none",b.style.display="none",c.classList.add("content-fixedHeight-maximized"));
q&&q.getTextView().resize();return!0}});l.addCommand(d);l.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new c.CommandKeyBinding("m",!0,!0));q&&(q.getTextView().setKeyBinding(new c.CommandKeyBinding("m",!0,!0),d.id),q.getTextView().setAction(d.id,d.callback,d));x&&x.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});x=new c.Command({name:f["System Configuration Details"],tooltip:f["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});l.addCommand(x);l.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new c.CommandKeyBinding(112,!0,!0));x=new c.Command({name:f["Background Operations"],tooltip:f["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});l.addCommand(x);l.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new c.CommandKeyBinding("o",!0,!0));x=new c.Command({name:f["Show Keys"],tooltip:f["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(z.style.display==="none"){var a;j.empty(z);if(q){a=document.createElement("h2");a.appendChild(document.createTextNode(f.Editor));z.appendChild(a);a=q.getTextView().getActions(!1);for(var b=0;b<a.length;b++){var c=a[b],d=c,e=q.getTextView(),g=e.getActionDescription(c);if(g&&g.name)d=g.name;c=e.getKeyBindings(c);
for(e=0;e<c.length;e++){var g=h.getUserKeyString(c[e]),i=document.createElement("span");i.role="listitem";i.appendChild(document.createTextNode(g+" = "+d));i.appendChild(document.createElement("br"));z.appendChild(i)}}}a=document.createElement("h2");a.appendChild(document.createTextNode(f.Global));z.appendChild(a);l.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});l.addCommand(x);l.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new c.CommandKeyBinding(191,
!1,!0));q&&(d=window.navigator.platform.indexOf("Mac")!==-1,q.getTextView().setKeyBinding(new c.CommandKeyBinding(191,!1,!0,!d,d),x.id),q.getTextView().setAction(x.id,x.callback,x));N(l);M(e,x.callback);J(e);window.addEventListener("hashchange",function(){l.processURL(window.location.href)},!1);window.setTimeout(function(){D(e)},0)},getToolbarElements:O,getMainSplitter:function(){return K},layoutToolbarElements:P,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName;a.target?(a.searchService&&
a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&(c=d?d+" ":"",c+=a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,S=a.target,E(a.serviceRegistry,a.target,T,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name);(D=a.title)||(D=b?b+" - "+a.task:a.task);window.document.title=D;j.empty(j.node("location"));new e.BreadCrumbs({container:"location",resource:a.breadcrumbTarget||a.target,rootSegmentName:d,
workspaceRootSegmentName:c,makeHref:a.makeBreadcrumbLink})},setDirtyIndicator:function(a){if(D)D.charAt(0)==="*"&&!a&&(D=D.substring(1)),a&&D.charAt(0)!=="*"&&(D="*"+D),window.document.title=D;var b=j.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){T=a},notifyAuthenticationSite:p}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(f,i,g){function c(b,c,a,e,f){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=f;this.domId=a;this.progressDomId=e||a;this._hookedClose=!1}function b(b,c,a,e){this.statusService=b;this.progressId=c;if(a){this.deferred=a;this.begin(e);var f=this;a.then(function(){f.done.bind(f)()},function(){f.done.bind(f)()})}}
c.prototype={_init:function(){var b=i.node("closeNotifications"),c=this;b&&!this._hookedClose&&(b.addEventListener("click",function(){c.setProgressMessage("")},!1),b.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&c.setProgressMessage("")},!1))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=g.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,c,a){this._init();this.currentMessage=
b;var e=i.node(this.domId);if(typeof a==="boolean"){var f=this,g=e.getAttribute("aria-live");e.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){b===f.currentMessage&&(i.empty(e),e.appendChild(document.createTextNode(b)),window.setTimeout(function(){e.setAttribute("aria-live",g)},100))},100)}else i.empty(e),e.appendChild(document.createTextNode(b));typeof c==="number"&&(f=this,window.setTimeout(function(){b===f.currentMessage&&(i.empty(e),e.appendChild(document.createTextNode("")))},
c))},setErrorMessage:function(b){this.currentMessage=b;this._init();var c=b.responseText||b.message||b;try{c=JSON.parse(c)}catch(a){}var b=c.Message||c,e="red";if(c.Severity)switch(c.Severity){case "Warning":e="#FFCC00";break;case "Error":e="red";break;case "Info":case "Ok":e="green"}c=document.createElement("span");c.style.color=e;c.appendChild(document.createTextNode(b));b=i.node(this.domId);i.empty(b);b.appendChild(c)},setProgressMessage:function(b){this._init();this.currentMessage=b;var c=document.createElement("span");
c.classList.add("imageSprite");c.classList.add("core-sprite-progress");var a=i.node(this.progressDomId);i.empty(a);a.appendChild(c);a.appendChild(document.createTextNode(b));c=i.node(this.notificationContainerDomId);c.classList.add("progressNormal");if(b&&b.length>0)c.classList.add("slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else c.classList.remove("slideContainerActive");g.layoutToolbarElements(this._getNotifierElements())},
setProgressResult:function(b){this.currentMessage=b;var c=b.responseText||b;try{c=JSON.parse(c)}catch(a){}this._init();var e=c.Message||c,f="core-sprite-info",n="progressInfo",l=document.createElement("span");l.classList.add("imageSprite");b=[];if(c.Severity)switch(c.Severity){case "Warning":f="core-sprite-warning";n="progressWarning";b.push("progressInfo");b.push("progressError");b.push("progressNormal");break;case "Error":f="core-sprite-error";n="progressError";b.push("progressWarning");b.push("progressInfo");
b.push("progressNormal");break;default:b.push("progressWarning"),b.push("progressError"),b.push("progressNormal")}l.classList.add(f);var k=i.node(this.progressDomId),f=i.node(this.notificationContainerDomId);i.empty(k);k.appendChild(l);c.HTML?(c=document.createElement("span"),c.innerHTML=e,k.appendChild(c)):k.appendChild(document.createTextNode("   "+e));if(n&&this.progressDomId!==this.domId){f.classList.add(n);for(e=0;e<b.length;e++)f.classList.remove(b[e])}f.classList.add("slideContainerActive");
g.layoutToolbarElements(this._getNotifierElements())},showWhile:function(b,c){var a=this;if(c){a.setProgressMessage(c);var e=function(){c===a.currentMessage&&a.setProgressMessage("")};b.then(e,e)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,f){return new b(this,++this._lastProgressId,c,f)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",c=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(c||(b+=", "),
b+=this._progressMonitors[a].status,c=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};
c.prototype.constructor=c;b.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};b.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};b.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};b.prototype.constructor=b;return{StatusReportingService:c,ProgressMonitor:b}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(f,i){function g(c){this._init(c)}g.prototype={_init:function(c){var b=c.parent,d=this,b=i.node(b);if(!b)throw f["no parent"];if(!c.model)throw f["no tree model"];if(!c.renderer)throw f["no renderer"];this._parent=b;this._treeModel=c.model;this._renderer=c.renderer;this._showRoot=c.showRoot===void 0?!1:c.showRoot;this._indent=c.indent===void 0?16:c.indent;this._onCollapse=c.onCollapse;this._labelColumnIndex=
c.labelColumnIndex===void 0?0:c.labelColumnIndex;this._id=c.id===void 0?"treetable":c.id;this._tableStyle=c.tableStyle;this._tableElement=c.tableElement||"table";this._tableBodyElement=c.tableBodyElement||"tbody";this._tableRowElement=c.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){d._showRoot?(b._depth=0,d._generate([b],0)):d._treeModel.getChildren(b,function(a){d._generate(a,0)})})},_generate:function(c,b){i.empty(this._parent);var d=document.createElement(this._tableElement);
d.id=this._id;this._tableStyle&&d.classList.add(this._tableStyle);this._renderer.initTable(d,this);this._bodyElement=document.createElement(this._tableBodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(c,b);d.appendChild(this._bodyElement);this._parent.appendChild(d);this._rowsChanged()},_generateChildren:function(c,b,d){for(var f=0;f<c.length;f++){var a=document.createElement(this._tableRowElement);a.id=this._treeModel.getId(c[f]);a._depth=b;a._item=c[f];this._renderer.render(c[f],
a);a.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*b+"px";d?(this._bodyElement.insertBefore(a,d.nextSibling),d&&(d=a)):this._bodyElement.appendChild(a)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(c,b,d){var g=this._treeModel.getId(c),a;if(g===this._id)this._removeChildRows(g),this._generateChildren(b,0),this._rowsChanged();else{var e=i.node(g);e?(e._item=c,e&&(d||
e._expanded)?(e._expanded=!0,this._removeChildRows(g),this._renderer.updateExpandVisuals(e,!0),b?(this._generateChildren(b,e._depth+1,e),this._rowsChanged()):(a=this,b=this._treeModel.getChildren(e._item,function(b){a._generateChildren(b,e._depth+1,e);a._rowsChanged()}))):this._renderer.updateExpandVisuals(e,!1)):console.log(f["could not find table row "]+g)}},getItem:function(c){var b=i.node(c);return b&&b._item?b._item:c},toggle:function(c){var b=i.node(c);b&&(b._expanded?(this.collapse(c),this._renderer.updateExpandVisuals(b,
!1)):(this.expand(c),this._renderer.updateExpandVisuals(b,!0)))},isExpanded:function(c){return(c=i.node(c))?c._expanded:!1},expand:function(c,b,d){var c=typeof c==="string"?c:this._treeModel.getId(c),f=i.node(c);if(f&&!f._expanded){f._expanded=!0;var a=this;this._renderer.updateExpandVisuals(f,!0);this._treeModel.getChildren(f._item,function(c){a._generateChildren(c,f._depth+1,f);a._rowsChanged();b&&b.apply(a,d)})}},_removeChildRows:function(c){for(var b=c===this._id,d=!1,f=-1,a=[],e=i.$$array(".treeTableRow",
this._parent),g=0;g<e.length;g++){var n=e[g];if(d)break;if(b)n._depth>f?a.push(n):d=!0;else if(n.id===c)b=!0,f=n._depth}for(c=0;c<a.length;c++)b=a[c],b.parentNode.removeChild(b)},collapse:function(c){var c=typeof c==="string"?c:this._treeModel.getId(c),b=i.node(c);if(b){if(!b._expanded)return;b._expanded=!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(c);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)}};g.prototype.constructor=g;return{TableTree:g}});
define("orion/sites/viewOnSiteTree","i18n!orion/sites/nls/messages,orion/i18nUtil,orion/Deferred,orion/commands,orion/globalCommands,orion/selection,orion/sites/siteUtils,orion/sites/siteClient,orion/sites/siteCommands,orion/webui/treetable,orion/webui/littlelib".split(","),function(f,i,g,c,b,d,h,a,e,j,n){var l=i.formatMessage,k=j.TableTree,r=function(){function a(b,c){this._siteService=b;this._root={};this._id=c}a.prototype={getRoot:function(a){a(this._root)},getChildren:function(a,b){if(a.children)b(a.children);
else if(a===this._root)this._siteService.getSiteConfigurations().then(function(c){a.children=c;b(c)});else return b([])},getId:function(a){return a===this._root||a===this._id?this._id:a.Id}};return a}(),q=function(){function a(b){this._commandService=b.serviceRegistry.getService("orion.page.command");this._options=b}a.prototype={initTable:function(a){a.classList.add("treetable")},render:function(a,b){b.className+="treeTableRow addsitesTableRow";var c=document.createElement("td");c.id=b.id+"col1";
var d=document.createElement("td");d.id=b.id+"col4";var e=h.generateEditSiteHref(a),g=document.createElement("a");g.href=e;c.appendChild(g);g.textContent=a.Name;e=document.createElement("span");e.style.padding="0 10px 0 10px";c.appendChild(e);g=a.HostingStatus;typeof g==="object"?g.Status==="started"?(e.appendChild(document.createTextNode(f.Started)),e=document.createElement("a"),e.href=g.URL,e.textContent=g.URL,c.appendChild(e)):(g=g.Status.substring(0,1).toUpperCase()+g.Status.substring(1),e.appendChild(document.createTextNode(g))):
e.appendChild(document.createTextNode(f.Unknown));e=document.createElement("span");e.id=b.id+"actionswrapper";e.classList.add("sectionTableItemActions");d.appendChild(e);var i=this._options;this._commandService.renderCommands(i.actionScopeId,e,a,null,"tool",{startCallback:i.startCallback,stopCallback:i.stopCallback,deleteCallback:i.deleteCallback,errorCallback:function(a){i.serviceRegistry.getService("orion.page.message").setProgressResult(a)}});b.appendChild(c);b.appendChild(d)},rowsChanged:function(){n.$$array(".treeTableRow").forEach(function(a,
b){var c=b%2?"darkTreeTableRow":"lightTreeTableRow",d=c==="darkTreeTableRow"?"lightTreeTableRow":"darkTreeTableRow";a.classList.add(c);a.classList.remove(d)})},labelColumnIndex:0};return a}(),p=function(){function a(b,c){function d(a,b){this.SiteConfiguration=a;this.Id="ViewOnSite"+a.Id;this.IsFileRunningOn=b}var e=[];e.push({Id:"newsite",Placeholder:!0});for(var f=0;f<b.length;f++)e.push(new d(b[f],c[f]));return e}function b(a,c,d){return a.isFileMapped(c,d).then(function(a){var b=c.HostingStatus&&
c.HostingStatus.Status==="started";return c&&d&&b&&a})}function c(a,b,d){r.call(this,a,b);this._file=d}c.prototype={getRoot:r.prototype.getRoot,getId:r.prototype.getId,getChildren:function(a,b){a.children?b(a.children):a===this._root?c.createViewOnSiteModelItems(this._siteService,this._file).then(function(c){a.children=c;b(c)}):b([])}};c.createViewOnSiteModelItems=function(c,d){return c.getSiteConfigurations().then(function(e){return g.all(e.map(function(a){return b(c,a,d)})).then(function(b){return a(e,
b)})})};return c}(),o=function(){function a(b){q.apply(this,Array.prototype.slice.call(arguments));this.serviceRegistry=b.serviceRegistry;this.file=b.file;this.addToCallback=b.addToCallback;this.errorCallback=b.errorCallback}a.prototype={initTable:function(a,b){this.tableTree=b;a.classList.add("treetable");a.classList.add("viewOnSiteTable");var c=document.createElement("thead"),d=document.createElement("th");c.appendChild(d);var e=document.createElement("th");c.appendChild(e);d.textContent=f.Name;
e.textContent=f.Actions;a.appendChild(c)},render:function(a,b){var c=a.SiteConfiguration;b.classList.add("treeTableRow");b.classList.add("sitesTableRow");a.Placeholder&&b.classList.add("newSiteRow");var d=document.createElement("td");d.id=b.id+"col1";a.Placeholder&&d.classList.add("newSiteCol");var e=document.createElement("td");e.id=b.id+"col2";d.textContent=a.Placeholder?f["New Site"]:c.Name;c=document.createElement("span");c.id=b.id+"actionswrapper";e.appendChild(c);this._commandService.renderCommands("viewOnSiteScope",
c,a,null,"button",{file:this.file,addToCallback:this.addToCallback,errorCallback:this.errorCallback});b.appendChild(d);b.appendChild(e)},rowsChanged:q.prototype.rowsChanged,labelColumnIndex:0};return a}();return function(){function c(d){var e=d.serviceRegistry,g=e.getService("orion.page.command"),h=e.getService("orion.page.progress"),i=this.siteService=a.forFileLocation(e,d.fileLocation),j=d.fileClient.read(d.fileLocation,!0);h&&h.progress(j,"Reading file metadata "+d.fileLocation);j.then(function(a){d.siteService=
i;d.model=new p(i,d.id,a);d.file=this.file=a;g.registerCommandContribution("viewOnSiteScope","orion.site.add-to",10);g.registerCommandContribution("viewOnSiteScope","orion.site.view-on-link",20);b.setPageTarget({task:f.ViewOnSiteTitle,target:a,serviceRegistry:e,commandService:g});var c=this;d.addToCallback=function(){c.refresh()};d.errorCallback=function(a){d.serviceRegistry.getService("orion.page.message").setErrorMessage(a)};d.renderer=new o(d);if(d.label)document.getElementById(d.label).textContent=
l(f.ViewOnSiteCaption,a.Name);a=this.model=d.model||new r(i,d.id);this.treeWidget=new k({id:d.id,parent:d.parent,model:a,showRoot:!1,renderer:d.renderer||new q(d)})}.bind(this))}c.prototype={refresh:function(){var a=this;p.createViewOnSiteModelItems(a.siteService,a.file).then(function(b){a.treeWidget.refresh(a.model._id,b,!0)})}};return c}()});
define("sites/view","orion/bootstrap,orion/status,orion/progress,orion/commands,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/sites/siteUtils,orion/sites/siteCommands,orion/sites/viewOnSiteTree,orion/PageUtil,orion/webui/littlelib".split(","),function(f,i,g,c,b,d,h,a,e,j,n,l,k){f.startup().then(function(e){function f(){var a=l.matchResourceParameters().file;a&&(s&&k.empty(document.getElementById("table")),s=new n({id:"view-on-site-table",parent:"table",label:"viewOnSiteCaption",
serviceRegistry:p,fileClient:m,fileLocation:a}),j.createViewOnSiteCommands(p))}var p=e.serviceRegistry,e=e.preferences,o=new d.OperationsClient(p);new i.StatusReportingService(p,o,"statusPane","notifications","notificationArea");new g.ProgressService(p,o);var o=new c.CommandService({serviceRegistry:p}),m=new b.FileClient(p),w=new h.Searcher({serviceRegistry:p,commandService:o,fileService:m}),s;window.addEventListener("hashchange",f());f();a.generateBanner("orion-viewSites",p,o,e,w)})});