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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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


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


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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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