/**
 * @license RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/i18n 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) 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). 
 *
 *******************************************************************************/

/*******************************************************************************
 * @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) 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) 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 RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*

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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

 RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/text for details

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:  IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation
 Andy Clement (vmware) - bug 344614

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

 Contributors: IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 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
*/
(function(){function h(d,e,c,b,a,k){e[d]&&(c.push(d),(e[d]===!0||e[d]===1)&&b.push(a+d+"/"+k))}function i(d,e,c,b,a){e=b+e+"/"+a;require._fileExists(d.toUrl(e+".js"))&&c.push(e)}function f(d,e,c){for(var b in e)e.hasOwnProperty(b)&&(!d.hasOwnProperty(b)||c)?d[b]=e[b]:typeof e[b]==="object"&&f(d[b],e[b],c)}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(d){var g=d.config?d.config():{};return{version:"2.0.1+",load:function(c,b,a,k){k=k||{};if(k.locale)g.locale=k.locale;
var j=e.exec(c),d=j[1],m=j[4],p=j[5],r=m.split("-"),o=[],n={},q,s="";if(j[5])d=j[1],c=d+p;else{p=j[4];m=g.locale;if(!m)m=g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(k.isBuild){o.push(c);i(b,"root",o,d,p);for(q=0;q<r.length;q++)k=r[q],s+=(s?"-":"")+k,i(b,s,o,d,p);b(o,function(){a()})}else b([c],function(j){var c=[],k;h("root",j,c,o,d,p);for(q=0;q<r.length;q++)k=r[q],s+=(s?"-":"")+k,h(s,j,c,o,d,p);b(o,function(){var k,
e,g;for(k=c.length-1;k>-1&&c[k];k--){g=c[k];e=j[g];if(e===!0||e===1)e=b(d+g+"/"+p);f(n,e)}a(n)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,i,f,e){var e=e||{},d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,g=d.exec(h);if(g)if(i.defined(h))f(i(h));else if(e.isBuild||e.isTest)f({});else{var c=g[1],b=g[3]?g[2]:"",a=g[3]||g[2];i(["orion/bootstrap"],function(k){k.startup().then(function(j){var k=j.serviceRegistry,j=k.getServiceReferences("orion.i18n.message");if(b)j.some(function(a){return h===a.getProperty("name")?(k.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),
!0):!1})||f({});else{var m={},p;j.forEach(function(j){var k=j.getProperty("name");if((g=d.exec(k))&&c===g[1]&&a===(g[3]||g[2]))if(b=g[3]?g[2]:""){if((j=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.toLowerCase().indexOf(b.toLowerCase())===0)m[b]=!0,i.specified(k)||define(k,["orion/i18n!"+k],function(a){return a})}else p=j});i.specified(h)?f(m):p?k.getService(p).getMessageBundle().then(function(a){Object.keys(m).forEach(function(b){typeof a[b]==="undefined"&&
(a[b]=m[b])});define(h,[],a);f(a)},function(){define(h,[],m);f(m)}):(define(h,[],m),f(m))}})})}else f(null)}}});
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:"Exporting to ${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",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}?",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding."});
define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("orion/browserCompatibility",[],function(){function h(){for(var d=navigator.userAgent,e={browser:!1,version:!1},c=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"MSIE",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:5}],b=0;b<c.length;b++){var a=c[b],k=d.match(a.regExp);if(k){e.browser=!0;e.version=k[1]>=a.minVersion;e.name=a.name;break}}return e}
function i(){try{return"localStorage"in window&&window.localStorage!==null}catch(d){return!1}}function f(d){alert(d);throw"unsupported browser";}var e=h();if(e.browser)e.version||f("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+e.name+".\n");else if(i()&&!localStorage.skipBrowserCheck)if(confirm("Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.\nContinue anyway?"))localStorage.skipBrowserCheck=
1;else throw"unsupported browser";else i()||f("Sorry, your browser is not supported.\n\nTo use Orion, the latest version of the Chrome, Firefox, or Safari web browser is recommended.\n");return{isSupportedBrowser:h,supportsLocalStorage:i,throwBrowserAlert:f}});
(function(h,i){typeof define==="function"&&define.amd?define("orion/Deferred",i):typeof exports==="object"?module.exports=i():(h.orion=h.orion||{},h.orion.Deferred=i())})(this,function(){function h(){for(var k;k=c.shift()||b.shift();)k();a=!1}function i(k,j){(j?b:c).push(k);a||(a=!0,j?setTimeout(h,0):h())}function f(a){return function(){a.apply(null,arguments)}}function e(){}function d(){var a=Error("Cancel");a.name="Cancel";return a}function g(){function a(){for(var k;k=m.shift();){var d=k.deferred,
g=c==="resolved"?"resolve":"reject";if(typeof k[g]==="function")try{var p=k[g](b);p&&typeof p.then==="function"?(d.cancel=p.cancel||e,p.then(f(d.resolve),f(d.reject),d.progress)):d.resolve(p)}catch(h){d.reject(h)}else d[g](b)}}var b,c,m=[],p=this;this.reject=function(d){c||(c="rejected",b=d,m.length&&i(a));return p.promise};this.resolve=function(d){c||(c="resolved",b=d,m.length&&i(a));return p.promise};this.progress=function(a){c||m.forEach(function(b){b.progress&&b.progress(a)});return p.promise};
this.cancel=function(){c||p.reject(d())};this.then=function(b,j,d){var b={resolve:b,reject:j,progress:d,deferred:new g},e=b.deferred,f=!1,h=function(){f||(f=!0,i(function(){var a=e.cancel===h?p.cancel:e.cancel;typeof a==="function"&&a()},!0))};e.cancel=h;m.push(b);c&&i(a,!0);return e.promise};this.promise=Object.create(Object.prototype,{then:{value:p.then},cancel:{get:function(){return p.cancel},set:function(a){p.cancel=a}}})}var c=[],b=[],a=!1;g.all=function(a,b){function c(a,b){o||(f[a]=b,--e===
0&&n.resolve(f))}function d(a,k){if(!o){if(b)try{c(a,b(k));return}catch(e){k=e}n.reject(k)}}var e=a.length,f=[],o=!1,n=new g;n.then(null,function(){o=!0;a.forEach(function(a){a.cancel&&a.cancel()})});e===0?n.resolve(f):a.forEach(function(a,b){a.then(c.bind(null,b),d.bind(null,b))});return n.promise};g.when=function(a,b,c,d){var e;if(!(a&&typeof a.then==="function"))e=new g,e.resolve(a),a=e.promise;return a.then(b,c,d)};return g});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(h){if(!h.type)throw Error("unspecified type");var f=this._namedListeners[h.type];f&&f.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,f){if(typeof f==="function"||f.handleEvent)this._namedListeners[h]=this._namedListeners[h]||[],this._namedListeners[h].push(f)},
removeEventListener:function(h,f){var e=this._namedListeners[h];if(e)for(var d=0;d<e.length;d++)if(e[d]===f){e.length===1?delete this._namedListeners[h]:e.splice(d,1);break}}};h.prototype.constructor=h;h.attach=function(i){var f=new h;i.dispatchEvent=f.dispatchEvent.bind(f);i.addEventListener=f.addEventListener.bind(f);i.removeEventListener=f.removeEventListener.bind(f)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,i){function f(b,a,c){this._properties=c||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,c){this._serviceId=b;this._serviceReference=a;this._internalRegistry=c}function d(b,a){function c(j){return function(){var c;try{if(!a())throw Error("Service was unregistered");var k=b[j].apply(b,Array.prototype.slice.call(arguments));if(k&&typeof k.then==="function")return k;
else c=new h,c.resolve(k)}catch(d){c=new h,c.reject(d)}return c.promise}}for(var j in b)typeof b[j]==="function"&&(this[j]=c(j))}function g(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var c=b._entries[a];if(!c)throw Error("already unregistered");var j=c.reference;b._serviceEventTarget.dispatchEvent(new g("unregistering",
j));b._entries[a]=null;j.getProperty("objectClass").forEach(function(a){for(var c=b._namedReferences[a],k=0;k<c.length;k++)if(c[k]===j){c.length===1?delete b._namedReferences[a]:c.splice(k,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new g("modified",a.reference))}}}f.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]}};
f.prototype.constructor=f;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,c){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var j=this._entries.length,l=new f(j,b,c),m=this._namedReferences;b.forEach(function(a){m[a]=m[a]||[];m[a].push(l)});b=new d(a,this._internalRegistry.isRegistered.bind(null,j));this._entries.push({reference:l,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new g("registered",l));return new e(j,l,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 i(f,e,d,g){var c=typeof d.response!=="undefined"?d.response:d.responseText,b;try{b=d.status}catch(a){b=0}f={args:e,response:c,responseText:typeof c==="string"?c:null,status:b,url:f,xhr:d};if(typeof g!=="undefined")f.error=g;return f}return function(f,e,d){var d=d||{},g=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new h,b=d.headers||{},a=d.log||!1,k;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(f==="POST"||f==="PUT"))k=d.data;g.onprogress=function(a){a.xhr=g;c.progress(a)};g.onreadystatechange=function(){if(g.readyState===4){var b=i(e,d,g),j=g.status;200<=j&&j<400?c.resolve(b):(a&&typeof console!=="undefined"&&console.log(Error(g.statusText)),c.reject(b))}};try{g.open(f,e,!0);if(typeof d.responseType==="string")g.responseType=d.responseType;if(typeof d.timeout==="number")if(typeof g.timeout==="number")g.timeout=d.timeout,g.addEventListener("timeout",function(){c.reject(i(e,
d,g,"Timeout exceeded"))});else{var j=setTimeout(function(){c.reject(i(e,d,g,"Timeout exceeded"))},d.timeout);c.then(clearTimeout.bind(null,j),clearTimeout.bind(null,j))}Object.keys(b).forEach(function(a){g.setRequestHeader(a,b[a])});g.send(k)}catch(l){c.reject(i(e,d,g,l))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,i,f){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 e=localStorage.getItem(a+c);if(e===null)return null;e=JSON.parse(e);return d||b===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(c,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+1E3*b;
if(Object.keys(d).length===0)localStorage.removeItem(a+c);else{var e=JSON.stringify(d);localStorage.setItem(a+c,e);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function g(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,j){this._userProvider=new g(a);this._localProvider=new b;j=j||"defaults.pref";j.indexOf("://")===-1&&(j=h.toUrl(j));this._defaultsProvider=new c(j);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 i.all(a)},_scheduleFlush:function(a){this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._cached=null,this._scheduleFlush(c),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]=
{},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],d=0;d<this._providers.length;++d)c.push(this._providers[d].get(this._name,a).then(function(a){return function(c){b._stores[a]=c}}(d)));return i.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};g.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new i,d=null;
b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromises[a]=c;var e=this;this._service.get(a).then(function(b){e._cache.set(a,b);delete e._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},e._cache.set(a,b),delete e._currentPromises[a],c.resolve(b)):(delete e._currentPromises[a],c.resolve(e._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var c=new i,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromise=c;var e=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);e._cache.set(a,b[a]||{});e._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(e._cache.set(a,{}),e._currentPromise=null,c.resolve({})):(e._currentPromise=null,b=e._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new i;a.resolve();return a}};b.prototype={get:function(a){var b=new i,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new i;this._cache.set(a,b);c.resolve();return c}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,d){if(!c||typeof c!=="number"||c>7||c<1)d=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",d,!1);if((a.USER_SCOPE&c)!==0)return"/orion/preferences/user"+
b;else if((a.LOCAL_SCOPE&c)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},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 g=new e(b,d);return g.sync().then(function(){return g})},getSetting:function(a,b,c){for(var d,e=0;e<a.length;e++)if(a[e].label===
b)for(var g=0;g<a[e].data.length;g++)if(a[e].data[g].label===c){d=a[e].data[g].value;break}return d}};return{PreferencesService:a}});
(function(){function h(a){if(typeof a!=="string")throw new TypeError;}function i(a){return a?a.split("&"):[]}function f(a){return a.length===0?"":a.join("&")}function e(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function d(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function g(a,b){var c="",d=[],j=0;return{next:function(){if(c!==a.query)c=a.query,d=i(c);if(j<d.length){var k=e(d[j++]);
switch(b){case "keys":return k[0];case "values":return k[1];case "keys+values":return[k[0],k[1]];default:throw new TypeError;}}throw A;}}}function c(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(a){var b=[];a.split("/").forEach(function(a){a===".."?b.pop():a!=="."&&b.push(a)});return b.join("/")}function a(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function k(c,d){if(typeof c!=="string")throw new TypeError;var c=a(c),e=m.exec(c);
if(!e)return null;var j={};j.scheme=e[1]||"";if(j.scheme&&!r.test(j.scheme))return null;var k=e[2];if(k&&(k=p.exec(k),j.userinfo=k[1],j.host=k[2],j.port=k[3],j.port&&!o.test(j.port)))return null;j.path=e[3];j.query=e[4];j.fragment=e[5];if(!j.scheme&&d&&(j.scheme=d.scheme,!j.host&&d.host))j.userinfo=d.userinfo,j.host=d.host,j.port=d.port,j.pathRelative=!0;if(j.pathRelative)if(j.path){if(j.path[0]!=="/")e=/^(.*\/)[^\/]*$/.exec(d.path)[1]||"/",j.path=e+j.path}else j.path=d.path;if(j.scheme)j.scheme=
j.scheme.toLowerCase();if(j.port)j.port=/[1-9]\d*$/.exec(j.port)[0];if(j.host&&j.path)j.path=b(j.path);return j}function j(a,b){var d;if(b){b=b.href||b;d=k(b);if(!d||!d.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:d})}d=k(a,d);if(!d)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:d,writable:!0});var j=new c(this);Object.defineProperty(this,"query",{get:function(){return this._url?j:null},enumerable:!0})}
try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(l){}var m=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,p=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,r=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,o=/^\d*$/,n=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,q=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,s=/^([^?#\s]*)$/,y=/^([^\s]*)$/,B=/^\S*$/,w=/([^:]*):?(.*)/,A=typeof StopIteration!=="undefined"?StopIteration:
Error("Stop Iteration"),v={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(c.prototype,{get:{value:function(a){h(a);var b;i(this._url.query).some(function(c){c=e(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){h(a);h(b);var c=i(this._url.query);c.some(function(j,k){var g=e(j);if(g[0]===a)return g[1]=b,c[k]=d(g),!0})||c.push(d([a,b]));this._url.query=f(c)},enumerable:!0},has:{value:function(a){h(a);return i(this._url.query).some(function(b){if(e(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var b=i(this._url.query),c=b.filter(function(b){return e(b)[0]!==a});return c.length!==b.length?(this._url.query=f(c),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var c=g(this._url,"keys+values");try{for(;;){var d=c.next();a.call(b,d[1],d[0],this)}}catch(j){if(j!==A)throw j;}},enumerable:!0},keys:{value:function(){return g(this._url,
"keys")},enumerable:!0},values:{value:function(){return g(this._url,"values")},enumerable:!0},items:{value:function(){return g(this._url,"keys+values")}},size:{get:function(){return i(this._url.query).length},enumerable:!0},getAll:{value:function(a){h(a);var b=[];i(this._url.query).forEach(function(c){c=e(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){h(a);h(b);var c=i(this._url.query);c.push(d([a,b]));this._url.query=f(c)},enumerable:!0}});Object.defineProperties(j.prototype,
{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){h(a);this._input=a;this._url=k(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:""},enumerable:!0},protocol:{get:function(){return this._url?
this._url.scheme+":":":"},set:function(a){h(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,r.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){h(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=w.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var b=w.exec(this._userinfo),a=[encodeURIComponent(a||"")];
b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=w.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var b=[w.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},set:function(a){h(a);if(this._url&&(a=q.exec(a)))this._url.host=
a[1],this._url.port=/[1-9]\d*$/.exec(a[2])[0]},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){h(a);if(this._url&&n.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===v[this.protocol]&&(a="");return a},set:function(a){h(a);if(this._url&&o.exec(a))this._url.port=/[1-9]\d*$/.exec(a)[0]},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(a){h(a);if(this._url&&s.exec(a))this._url.host&&
a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?b(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),y.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),B.exec(a)))this._url.fragment=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&
(Object.defineProperty(j,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(j,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=j})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,i){function f(a,b){var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;c.sort();d.sort();for(var e=0,g=c.length;e<g;e++){var f=c[e];if(f!==d[e])return!1;var o=a[f],f=b[f];if(o!==f&&JSON.stringify(o)!==JSON.stringify(f))return!1}return!0}function e(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(b){}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 g(a,b){return{type:a,plugin:b}}function c(a,b,c){function d(a,b,e){if(!E)return(new h).reject(Error("plugin not connected"));var k=D++,g=new h;g.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:k,cancel:a.message||"Cancel"},
E)});I[String(k)]=g;c.postMessage({id:k,serviceId:a,method:b,params:e},E);return g.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 v==="active"?d(a.serviceId,c,b):q.start({"transient":!0}).then(function(){return d(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new i;b.dispatchEvent=c.dispatchEvent.bind(c);var j=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||
j(a);c.addEventListener(a,b)};var k=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&k(a)}}return b}function p(b){var c=JSON.parse(JSON.stringify(b.properties));c.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);c.objectClass=b;return c}function r(a){var b=e(a),d=p(a),d=c.registerService(a.names||a.type,b,d);u[a.serviceId]={registration:d,proxy:b}}function o(){c.persist(a,{created:s,headers:y,services:B,autostart:w,lastModified:A})}
function n(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var d=a.params[0];G({headers:d.headers,services:d.services}).then(function(){x.resolve(q)})}else if("dispatchEvent"===a.method){var e=u[a.serviceId].proxy;e.dispatchEvent.apply(e,a.params)}else if("progress"===a.method)b=I[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)x&&x.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=I[String(a.id)],delete I[String(a.id)],
a.error){var k=c.handleServiceError(q,a.error);b.reject(k)}else b.resolve(a.result)}catch(g){console.log("Plugin._responseHandler "+g)}}var q=this,b=b||{},s=b.created||(new Date).getTime(),y=b.headers||{},B=b.services||[],w=b.autostart,A=b.lastModified||0,v="installed",z,x,E,u={},D=0,I={},G;this._persist=o;this._resolve=function(){v="resolved";c.dispatchEvent(new g("resolved",q))};this._getAutostart=function(){return w};this._getCreated=function(){return s};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(y))};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 A};this.getServiceReferences=function(){var a=[];Object.keys(u).forEach(function(b){a.push(u[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));
if(z)return z.promise.then(this.start.bind(this,b));if(v==="active")return(new h).resolve();if(!b||!b["transient"]){var d=b&&b.lazy?"lazy":"started";d!==w&&(w=d,o())}d=c.getState();if(d!=="starting"&&d!=="active")return b["transient"]?(new h).reject(Error("start transient error")):(new h).resolve();if(v==="installed")try{this._resolve()}catch(e){return(new h).reject(e)}v==="resolved"&&B.forEach(function(a){r(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",c.dispatchEvent(new g("lazy activation",
q))),(new h).resolve();var k=new h;z=k;v="starting";c.dispatchEvent(new g("starting",q));x=new h;E=c.connect(a,n);x.then(function(){x=null;v="active";c.dispatchEvent(new g("started",q));z=null;k.resolve()},function(){x=null;v="stopping";c.dispatchEvent(new g("stopping",q));Object.keys(u).forEach(function(a){u[a].registration.unregister();delete u[a]});c.disconnect(E);E=null;v="resolved";z=null;c.dispatchEvent(new g("stopped",q));k.reject(Error("plugin activation error"))});return k.promise};this.stop=
function(a){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(z)return z.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==w)w="stopped",o();if(v!=="active"&&v!=="starting")return(new h).resolve();z=a=new h;v="stopping";c.dispatchEvent(new g("stopping",q));Object.keys(u).forEach(function(a){u[a].registration.unregister();delete u[a]});E&&(c.disconnect(E),E=null);v="resolved";z=null;c.dispatchEvent(new g("stopped",q));a.resolve();return a.promise};
G=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!b)return A===0&&(A=(new Date).getTime(),o()),c.loadManifest(a).then(G);var d=y,e=B,k=w;y=b.headers||{};B=b.services||{};w=b.autostart||w;b.lastModified?A=b.lastModified:(A=(new Date).getTime(),o());if(f(y,d)&&f(B,e)&&w===k)return(new h).resolve();if(v==="active"||v==="starting"){var l=[];Object.keys(B).forEach(function(a){var b=B[a];l.push(a);var c=u[a];if(c){if(f(b.methods,Object.keys(c.proxy))){var a=p(b),
d=c.registration.getReference(),e={};d.getPropertyKeys().forEach(function(a){e[a]=d.getProperty(a)});f(a,e)||c.registration.setProperties(a);return}c.registration.unregister();delete u[a]}r(b)});Object.keys(u).forEach(function(a){l.indexOf(a)===-1&&(u[a].registration.unregister(),delete u[a])})}v==="active"&&(c.disconnect(E),x=new h,E=c.connect(a,n),x.then(function(){x=null},function(){x=null;v="stopping";c.dispatchEvent(new g("stopping"),q);Object.keys(u).forEach(function(a){u[a].registration.unregister();
delete u[a]});c.disconnect(E);E=null;v="resolved";c.dispatchEvent(new g("stopped",q))}));return(new h).resolve()};this.update=function(a){return G(a).then(function(){c.dispatchEvent(new g("updated",q))})};this.uninstall=function(){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));c.removePlugin(this);v="uninstalled";c.dispatchEvent(new g("uninstalled",
q));return(new h).resolve()}}var b=/^http[s]?/i;return{Plugin:c,PluginRegistry:function(a,k){function j(a){var b=a.source;r.some(function(c){if(b===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var k=k||{},l=k.storage||localStorage;l.getItem||(l=d(l));var m="installed",f=[],r=[],o=new i,n={},q={registerService:a.registerService.bind(a),connect:function(a,b,c){function d(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var e={handler:b,url:a},j=setTimeout(d.bind(null,"Load timeout for: "+a),c||15E3),g=document.createElement("iframe");g.name=a+"_"+(new Date).getTime();if(!k.visible)g.style.display="none",g.style.visibility="hidden";g.src=a;g.onload=function(){clearTimeout(j);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};g.sandbox="allow-scripts allow-same-origin";document.body.appendChild(g);e.target=g.contentWindow;e.close=function(){g&&
(document.body.removeChild(g),g=null)};r.push(e);return e},disconnect:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<f.length;b++)if(a===f[b]){f.splice(b,1);break}l.removeItem("plugin."+a.getLocation())},persist:function(a,b){l.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{o.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new h,c=q.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],q.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(q.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return m},handleServiceError:function(a,c){if(c&&c.status===401){var d=a.getHeaders(),e=a.getName()||a.getLocation(),j=document.createElement("span");j.appendChild(document.createTextNode("Authentication required for: "+
e+"."));if(d.login)j.appendChild(document.createTextNode(" ")),e=document.createElement("a"),e.target="_blank",e.textContent="Login",e.href=d.login,b.test(e.href)?(j.appendChild(e),j.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+d.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(j)}}if(c.__isError){var k=c,c=Error(k.message);Object.keys(k).forEach(function(a){c[a]=k[a]});delete c.__isError}return c}};this.getLocation=
function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=q.getState;this.init=function(){if(!(m==="starting"||m==="active"||m==="stopping")){addEventListener("message",j,!1);for(var a=[],b=0,d=l.length;b<d;b++)a.push(l.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&f.push(new c(b,a,q))}});
f.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});k.plugins&&Object.keys(k.plugins).forEach(function(a){a=e(a);if(!this.getPlugin(a)){var b=k.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||k.defaultAutostart||"lazy";f.push(new c(a,b,q))}}.bind(this));m="starting"}};this.start=function(){m!=="starting"&&this.init();if(m!=="starting")return(new h).reject("Cannot start framework. Framework is already "+m+".");var a=[],b=(new Date).getTime();f.forEach(function(c){var d=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===d)return c.start({"transient":!0});if("lazy"===d)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===d?a.push(c.start({"transient":!0})):"lazy"===d?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){m="active"})};this.stop=function(){if(m!=="starting"&&m!=="active")return(new h).reject("Cannot stop registry. Registry is already "+
m+".");m="stopping";var a=[];f.forEach(function(b){a.push(b.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",j);m="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),d=this.getPlugin(a);if(d)return(new h).resolve(d);if(n[a])return n[a];if(b)return d=new c(a,b,q),f.push(d),
d._persist(),q.dispatchEvent(new g("installed",d)),(new h).resolve(d);var j=q.loadManifest(a).then(function(b){d=new c(a,b,q);f.push(d);d._persist();delete n[a];q.dispatchEvent(new g("installed",d));return d},function(b){delete n[a];throw b;});return n[a]=j};this.getPlugins=function(){return f.slice()};this.getPlugin=function(a){var b=null,a=e(a);f.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=o.addEventListener.bind(o);this.removeEventListener=o.removeEventListener.bind(o);
this.resolvePlugins=function(){var a=!0;f.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(e,d){function g(c){var d=c.getProperty("service.id"),e=this.addingService(c);e&&(b[d]=c,a[d]=e)}function c(c){var d=c.getProperty("service.id"),e=a[d];delete b[d];delete a[d];this.removedService(c,e)}this.serviceRegistry=e;var b={},a={},k=i,j,l;this.close=function(){if(k!==f)throw"Already closed";k=i;e.removeEventListener("registered",j);e.removeEventListener("unregistering",l);l=j=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(k!==i)throw"Already open";k=f;var a=this;j=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(d)!==-1&&(g.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};l=function(b){b.serviceReference.getProperty("objectClass").indexOf(d)!==
-1&&c.call(a,b.serviceReference)};e.addEventListener("registered",j);e.addEventListener("unregistering",l);e.getServiceReferences(d).forEach(function(b){g.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,f=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,i){var f,e,d,g,c,b="pid";f=function(a,c,d){function e(a,b,d){b.forEach(function(e,g){try{var k=a[g].getProperty("__plugin__"),l=k&&c.getPlugin(k);(!k||l&&l.getState()==="active")&&b[g].updated(d)}catch(f){typeof console!=="undefined"&&console.log(f)}})}i.call(this,a,"orion.cm.managedservice");var g={},f={},o=function(c){var e=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var j=c.getProperty(b),c=a.getService(c);j&&c&&(j=(j=d._find(j))&&j.getProperties(),e.push(c.updated(j)))}});return h.all(e)};this.addingService=function(c){var d=c.getProperty(b),e=a.getService(c);if(!d||!e)return null;g[d]||(g[d]=[]);f[d]||(f[d]=[]);g[d].push(c);f[d].push(e);return e};this.onServiceAdded=function(a,c){var j=a.getProperty(b),j=d._find(j);e([a],[c],j&&j.getProperties())};this.onOpen=function(){c.addEventListener("started",o)};this.onClose=function(){c.removeEventListener("started",
o)};this.notifyUpdated=function(a){var b=a.getPid();e(g[b]||[],f[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();e(g[a]||[],f[a]||[],null)};this.removedService=function(a,c){var d=a.getProperty(b),e=g[d],j=f[d];e.length>1?e.splice(e.indexOf(a),1):delete g[d];j.length>1?j.splice(j.indexOf(c),1):delete f[d]}};e=function(){function a(b,c,e){this.store=new d(this,e);this.configAdmin=new g(this,this.store);this.tracker=new f(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}();g=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 d(e,g){this.factory=e;this.prefsService=g;this.configs=Object.create(null);this.pref=null;var k=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){k.pref=a;a.keys().forEach(function(d){if(!k.configs[d]){var e=a.get(d);typeof e==="object"&&e!==null&&Object.keys(e).length>0&&(e[b]=d,k.configs[d]=new c(k.factory,k,e))}})})}d.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 d}();c=function(){function a(b){for(var c={},d=Object.keys(b),e=0;e<d.length;e++){var j=d[e],g=b[j];c[j]=g instanceof Array?g.slice():g}return c}function c(d,e,j){this.factory=
d;this.store=e;if(j!==null&&typeof j==="object")this.pid=j[b],d=a(j),delete d[b],this.properties=d;else if(typeof j==="string")this.pid=j,this.properties=null;else throw Error("Invalid pid/properties "+j);}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,i,f,e,d,g){var c;return{startup:function(){if(c)return c;c=new i;var b=new f.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(e){var j={plugins:{}};e.keys().forEach(function(a){var b=h.toUrl(a);j.plugins[b]=e[a]});var l=new d.PluginRegistry(b,j);return l.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);l.getPlugin(a)||b.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(b,function(a){console.log(a)})})}).then(function(){return(new g.ConfigurationAdminFactory(b,l,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){setTimeout(function(){window.location=a},0)})}),d=localStorage.getItem("lastLogin");if(!d||d<(new Date).getTime()-9E5)return c}}).then(function(){var d={serviceRegistry:b,preferences:a,pluginRegistry:l};c.resolve(d);return d})})}}});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,i){function f(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var e={};return{getMessageBundle:function(d){function g(){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 i;e[d]=
c;var b=f(d);if(b)return c.resolve(b),c;try{h([d],g)}catch(a){h(["orion/i18n!"+d],g)}return c},formatMessage:function(d){var e=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(c,b){return e[(b<<0)+1]})}}});
define("orion/webui/littlelib",[],function(){function h(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b,a){var c=b.compareDocumentPosition(a);return b===a||Boolean(c&16)}function f(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=f(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=g.exec(b.nodeValue);c&&c.length>1&&a(b,c)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)d(b.childNodes[c],a)}var g=/\$\{([^\}]+)\}/,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:i,bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+document.body.scrollLeft,top:b.top+
document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:f,lastTabbable:e,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:function(b,a){d(b,function(b,c){b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)})},processDOMNodes:function(b,a){d(b,function(b,c){var d=a[c[1]];if(d){var e=document.createRange(),g=c.index;e.setStart(b,g);e.setEnd(b,
g+c[0].length);e.deleteContents();e.insertNode(d)}})},addAutoDismiss:function(b,a){c.length===0&&document.addEventListener("click",function(a){for(var b=[],d=0;d<c.length;d++){var e=c[d].dismiss,g=!1,f;if(c[d].excludeNodes.every(function(b){return b&&(g=document.compareDocumentPosition(document,b)!==1)&&i(b,a.target)?(f=b,!1):!0})){try{e()}catch(o){typeof console!=="undefined"&&console&&console.error(o&&o.message)}g=document.compareDocumentPosition(document,f)!==1}g&&b.push(c[d])}c=b},!0);c.push({excludeNodes:b,
dismiss:a})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(h){function i(f,e){e||(e="orion.page.selection");this._serviceRegistry=f;h.attach(this);this._serviceRegistration=f.registerService(e,this);this._selections=null}i.prototype={getSelection:function(f){var e=this._getSingleSelection();typeof f==="function"&&f(e);return e},getSelections:function(f){var e=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(e);return e},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var e=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;e!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Filter bindings":"Filter bindings","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":"Bugs","Privacy Policy":"Privacy",
"Terms of Use":"Terms","Copyright Agent":"Copyright","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.":"I20130625-1555","Add this page to the favorites list":"Add this page to the favorites list","LOG: ":"LOG: ",View:"View","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 Sidebar":"Toggle Sidebar","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,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("text",["module"],function(h){var i,f,e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),a=c&&location.hostname,k=c&&(location.port||void 0),j=[],l=h.config&&h.config()||{};i={version:"2.0.5",strip:function(a){if(a){var a=a.replace(d,""),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").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:l.createXhr||function(){var a,b,c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){c=e[b];try{a=new ActiveXObject(c)}catch(d){}if(a){e=[c];break}}return a},parseName:function(a){var b,
c,d=!1,e=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;e!==-1&&(!b||e>1)?(b=a.substring(0,e),c=a.substring(e+1,a.length)):b=a;a=c||b;e=a.indexOf("!");e!==-1&&(d=a.substring(e+1)==="strip",a=a.substring(0,e),c?c=a:b=a);return{moduleName:b,ext:c,strip:d}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,c,d){var e,j;e=i.xdRegExp.exec(a);if(!e)return!0;a=e[2];e=e[3];e=e.split(":");j=e[1];e=e[0];return(!a||a===b)&&(!e||e.toLowerCase()===c.toLowerCase())&&(!j&&!e||j===d)},finishLoad:function(a,
b,c,d){c=b?i.strip(c):c;l.isBuild&&(j[a]=c);d(c)},load:function(d,e,j,g){if(g.isBuild&&!g.inlineText)j();else{l.isBuild=g.isBuild;var f=i.parseName(d),g=f.moduleName+(f.ext?"."+f.ext:""),h=e.toUrl(g),s=l.useXhr||i.useXhr;!c||s(h,b,a,k)?i.get(h,function(a){i.finishLoad(d,f.strip,a,j)},function(a){j.error&&j.error(a)}):e([g],function(a){i.finishLoad(f.moduleName+"."+f.ext,f.strip,a,j)})}},write:function(a,b,c){if(j.hasOwnProperty(b)){var d=i.jsEscape(j[b]);c.asModule(a+"!"+b,"define(function () { return '"+
d+"';});\n")}},writeFile:function(a,b,c,d,e){var b=i.parseName(b),j=b.ext?"."+b.ext:"",g=b.moduleName+j,k=c.toUrl(b.moduleName+j)+".js";i.load(g,c,function(){var b=function(a){return d(k,a)};b.asModule=function(a,b){return d.asModule(a,k,b)};i.write(a,g,b,e)},e)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),i.get=function(a,b){var c=f.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)};else if(l.env===
"xhr"||!l.env&&i.createXhr())i.get=function(a,b,c,d){var e=i.createXhr(),j;e.open("GET",a,!0);if(d)for(j in d)d.hasOwnProperty(j)&&e.setRequestHeader(j.toLowerCase(),d[j]);if(l.onXhr)l.onXhr(e,a);e.onreadystatechange=function(){var d;if(e.readyState===4)d=e.status,d>399&&d<600?(d=Error(a+" HTTP status: "+d),d.xhr=e,c(d)):b(e.responseText)};e.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")i.get=function(a,b){var c,d,e=new java.io.File(a),j=java.lang.System.getProperty("line.separator"),
e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),g="";try{c=new java.lang.StringBuffer;(d=e.readLine())&&d.length()&&d.charAt(0)===65279&&(d=d.substring(1));for(c.append(d);(d=e.readLine())!==null;)c.append(j),c.append(d);g=String(c.toString())}finally{e.close()}b(g)};return i});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,i,f){return{slideoutHTMLFragment:function(e){var d=document.createElement("div");d.innerHTML=f;var g=i.$("#slideContainer",d);g.id=e+g.id;g=i.$("#pageCommandParameters",d);g.id=e+g.id;g=i.$("#pageCommandDismiss",d);g.id=e+g.id;return d.innerHTML}}});
define("orion/util",[],function(){var h=navigator.userAgent,i=parseFloat(h.split("MSIE")[1])||void 0,f=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,e=h.indexOf("Opera")!==-1,d=parseFloat(h.split("Chrome/")[1])||void 0,g=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,k=a||h,j=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:f,isOpera:e,isChrome:d,isSafari:g,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:h,isIOS:k,isMac:j,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/keyBinding",["orion/util"],function(h){function i(e,d,g,c,b,a){this.type=a||"keydown";this.keyCode=typeof e==="string"&&this.type==="keydown"?e.toUpperCase().charCodeAt(0):e;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=g!==void 0&&g!==null?g:!1;this.mod3=c!==void 0&&c!==null?c:!1;this.mod4=b!==void 0&&b!==null?b:!1}function f(e){this.keys=e}i.prototype={getKeys:function(){return[this]},match:function(e,d){if(d!==void 0){if(d!==0)return!1}else if(e instanceof Array){if(e.length>1)return!1;
e=e[0]}return e.type!==this.type?!1:this.keyCode===e.keyCode||this.keyCode===String.fromCharCode(h.isOpera?e.which:e.charCode!==void 0?e.charCode:e.keyCode)?this.mod1!==(h.isMac?e.metaKey:e.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==e.shiftKey?!1:this.mod3!==e.altKey?!1:h.isMac&&this.mod4!==e.ctrlKey?!1:!0:!1},equals:function(e){return!e?!1:this.keyCode!==e.keyCode?!1:this.mod1!==e.mod1?!1:this.mod2!==e.mod2?!1:this.mod3!==e.mod3?!1:this.mod4!==e.mod4?!1:this.type!==e.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(e,d){var g=this.keys;if(d!==void 0)return d>g.length?!1:g[d].match(e)?d===g.length-1?!0:d+1:!1;else{e instanceof Array||(e=[e]);if(e.length>g.length)return!1;var c;for(c=0;c<e.length;c++)if(!g[c].match(e[c]))return!1;return c===g.length?!0:c}},equals:function(e){if(!e.keys)return!1;if(e.keys.length!==this.keys.length)return!1;for(var d=0;d<e.keys.length;d++)if(!e.keys[d].equals(this.keys[d]))return!1;return!0}};return{KeyBinding:i,KeyStroke:i,
KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,i){function f(e){this._init(e)}f.prototype={_init:function(e){this._dropdownNode=i.node(e.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=e.populate;var d=this;this._triggerNode.addEventListener("click",function(e){d.toggle()&&i.stop(e)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(e){if(e.keyCode===i.KEY.ENTER||e.keyCode===i.KEY.SPACE)d.toggle(),i.stop(e)},!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){var d=i.$$(".dropdownSubMenu",
this._dropdownNode);i.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(d)),this.close.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();e[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var e=i.bounds(this._dropdownNode),d=i.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;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(g){g.parentNode.parentNode===d._dropdownNode&&
e.push(g)});return e},empty:function(){var e=this;i.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===e._dropdownNode&&d.parentNode.removeChild(d)})},_dropdownKeyDown:function(e){if(e.keyCode===i.KEY.UP||e.keyCode===i.KEY.DOWN||e.keyCode===i.KEY.RIGHT||e.keyCode===i.KEY.ENTER||e.keyCode===i.KEY.LEFT){var d=this.getItems(),g=document.activeElement;if(d.length&&d.length>0&&g){var c=d.indexOf(g);c<0&&(c=d.indexOf(g.parentNode));c>=0&&(e.keyCode===i.KEY.UP&&c>0?(c--,d[c].focus()):e.keyCode===
i.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):e.keyCode===i.KEY.ENTER||e.keyCode===i.KEY.RIGHT?g.classList.contains("dropdownTrigger")&&g.dropdown&&g.dropdown.open():e.keyCode===i.KEY.LEFT&&g.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(e))}}else e.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(e))}};f.prototype.constructor=f;return{Dropdown:f}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown"></span></button><ul class="dropdownMenu"></ul>'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0">${ButtonText}<span class="dropdownArrowRight"></span></span><ul class="dropdownMenu"></ul></li>'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(h,i){function f(e){this._init(e)}f.prototype={_init:function(e){this._node=i.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(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=e.showDelay===void 0?500:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(d._node,c.target)&&(d.show(),i.stop(c))},!1);for(var g=0;g<e.length;g++)this._node.addEventListener(e[g],function(c){i.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;i.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){i.contains(e._tip,d.target)&&(e.hide(),i.stop(d))},!1)},!1)}return this._tip},_positionTip:function(e,d){this._makeTipNode();e==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var g=this._node,c;for(c=i.bounds(g);g&&!c.width&&!c.height;g=g.parentNode)c=
i.bounds(g);var g=i.bounds(this._tipInner),b;switch(e){case "above":b=c.top-g.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":b=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":b=c.top-this._tailSize/2;c=c.left-g.width-this._tailSize-1;break;default:b=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(b+g.height>a.height)if(d)b=a.height-g.height-1;else return!1;if(c+g.width>a.width)if(d)c=a.width-g.width-
1;else return!1;if(c<0)if(d)c=4;else return!1;if(b<0)if(d)b=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+e),e==="above"||e==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),e==="left"))this._tail.style.left=g.width+"px";this._tip.style.top=b+"px";this._tip.style.left=c+"px";this._tip.style.width=g.width+"px";this._tip.style.height=g.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,g=0;!d&&g<e._position.length;)d=e._positionTip(e._position[g]),g++;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._tip.removeAttribute("style");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._tail=this._tipInner=this._tip=null}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(h,i,f,e,d,g,c,b){function a(a,b){for(var c in b)if(b[c]&&b[c].keyBinding&&b[c].command&&b[c].keyBinding.match(a)){var d=b[c],e=d.keyBinding;if(!e.domScope||f.contains(f.node(e.domScope),a.target)){var j=d.invocation;if(j){var g=d.command;if(g.hrefCallback){f.stop(a);
c=g.hrefCallback.call(j.handler||window,j);c.then?c.then(function(a){window.open(a)}):window.open(c);break}else if(g.onClick||g.callback){f.stop(a);window.setTimeout(function(){(g.onClick||g.callback).call(j.handler||window,j)},0);break}}}}}function k(a,b,c){b.classList.add("commandImage");var d;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(d=document.createElement("span"),b.appendChild(d),d.classList.add(a.spriteClass),d.classList.add(a.imageClass)):(d=new Image,d.alt=a.name,
d.name=c,d.id=c,d.src=a.image,b.appendChild(d));return d}function j(a,b,c,d,e){this.commandRegistry=e;this.handler=a;this.items=b;this.userData=c;this.command=d;if(d.parameters)this.parameters=d.parameters.makeCopy();this.id=d.id}function l(a){this._init(a)}var m=null,p={};window.document.addEventListener("keydown",function(b){b=b||window.event;if(function(a){if(i.isMac){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}(b)){if(b.target.contentEditable==="true")return;var c=b.target.nodeName.toLowerCase();if(c==="input")switch(b.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}c={};if(m){var d,e,j;e=Object.keys(p);for(d=0;d<e.length;d++)j=e[d],c[j]=p[j];var g=m();e=Object.keys(g);for(d=0;d<e.length;d++)j=e[d],c[j]=g[j]}else c=p;a(b,c)},!1);j.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new j(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=
this.parameters.makeCopy();return b}};j.prototype.constructor=j;l.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||h.toUrl("images/none.png");this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},populateChoicesMenu:function(a,
b,c,d,e){this.getChoices(b,c,d).forEach(function(c){if(c.name){var d=document.createElement("li");a.appendChild(d);var j=document.createElement("span");j.tabIndex=0;j.role="menuitem";j.classList.add("dropdownMenuItem");var g=document.createTextNode(c.name);j.appendChild(g);d.appendChild(j);j.choice=c;j.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);j.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&
a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else e._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==h.toUrl("images/none.png")}};l.prototype.constructor=l;return{Command:l,CommandInvocation:j,createDropdownMenu:function(a,b,c,j,g,l){a=f.node(a);if(!a)throw"no parent node was specified";
var m=document.createRange();m.selectNode(a);m=m.createContextualFragment(d);f.processTextNodes(m,{ButtonText:b});a.appendChild(m);a=a.lastChild;m=a.previousSibling;j?m.classList.add(j):(m.classList.add("orionButton"),m.classList.add("commandButton"));if(g){if(!l)m.textContent="",m.setAttribute("aria-label",b);k({spriteClass:"commandSprite",imageClass:g},m,b);m.classList.add("orionButton")}m.dropdown=new e.Dropdown({dropdown:a,populate:c});a.dropdown=m.dropdown;return{menuButton:m,menu:a,dropdown:m.dropdown}},
createCheckedMenuItem:function(a,b,d,e){a=f.node(a);if(!a)throw"no parent node was specified";var j=document.createRange();j.selectNode(a);j=j.createContextualFragment(c);f.processTextNodes(j,{ItemText:b});a.appendChild(j);a=f.$(".checkedMenuItem",a.lastChild);a.checked=d;a.addEventListener("change",e,!1)},createCommandItem:function(a,c,d,e,j,g,l){var f,g=g||!c.name&&c.hasImage();if(c.hrefCallback)f=document.createElement("a"),f.id=e,g&&c.hasImage()?k(c,f,e):(f.className="commandLink",f.appendChild(document.createTextNode(c.name))),
l=c.hrefCallback.call(d.handler,d),l.then?l.then(function(a){f.href=a}):f.href=l?l:"#";else{f=document.createElement("button");f.className="orionButton";g?c.hasImage()?(k(c,f,e),c.name&&f.setAttribute("aria-label",c.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),f.appendChild(document.createTextNode(c.name))):(f.classList.add("commandButton"),e=document.createTextNode(c.name),f.appendChild(e));var m=l||c.callback;if(m)c.onClick=m,f.addEventListener("click",function(){m.call(d.handler,
d)},!1)}a.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),a.appendChild(l),a=l):f.classList.add("commandMargins");a.appendChild(f);if(c.tooltip)f.commandTooltip=new b.Tooltip({node:f,text:c.tooltip,position:["above","below","right","left"]});j&&(p[c.id]={keyBinding:j,command:c,invocation:d});return f},createCommandMenuItem:function(a,c,d,e,j){var g,k=a.dropdown;if(c.hrefCallback)g=document.createElement("a"),g.appendChild(document.createTextNode(c.name)),j=c.hrefCallback.call(d.handler,
d),j.then?j.then(function(a){g.href=a}):g.href=j?j:"#";else{g=document.createElement("span");g.tabIndex=0;g.appendChild(document.createTextNode(c.name));var l=j||c.callback;if(l)c.onClick=l,g.addEventListener("click",function(){k.close(!0);l.call(d.handler,d)},!1)}if(c.tooltip)g.commandTooltip=new b.Tooltip({node:g,text:c.tooltip,position:["right","left","above","below"]});g.className="dropdownMenuItem";g.role="menuitem";j=document.createElement("li");a.appendChild(j);j.appendChild(g);e&&(p[c.id]=
{keyBinding:e,command:c,invocation:d});return g},setKeyBindingProvider:function(a){m=a},localKeyBindings:p,_testMethodProcessKey:a}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function f(d){var e="",c=navigator.platform.indexOf("Mac")!==-1;d.mod1&&(e+=c?"Cmd+":"Ctrl+");d.mod2&&(e+="Shift+");d.mod3&&(e+="Alt+");d.mod4&&c&&(e+="Ctrl+");if(d.alphaKey)return e+d.alphaKey;if(d.type==="keypress")return e+d.keyCode;for(var b in i.KEY)if(typeof(i.KEY[b]==="number")&&i.KEY[b]===d.keyCode)return e+b;var a;switch(d.keyCode){case 59:a=d.mod2?":":";";break;case 61:a=d.mod2?"+":"=";break;case 188:a=
d.mod2?"<":",";break;case 190:a=d.mod2?">":".";break;case 191:a=d.mod2?"?":"/";break;case 192:a=d.mod2?"~":"`";break;case 219:a=d.mod2?"{":"[";break;case 220:a=d.mod2?"|":"\\";break;case 221:a=d.mod2?"}":"]";break;case 222:a=d.mod2?'"':"'"}return a?e+a:d.keyCode>=112&&d.keyCode<=123?e+"F"+(d.keyCode-111):e+String.fromCharCode(d.keyCode)}function e(d){var e=window.navigator.platform.indexOf("Mac")!==-1;return e&&d.metaKey||!e&&d.ctrlKey}return{getUserKeyString:function(d){for(var e="",d=d.getKeys(),
c=0;c<d.length;c++)c!==0&&(e+=" "),e+=f(d[c]);return e},getUserText:function(d,e,c,b,a,k,j,l,f){var h=!1,j=function(j){return function(l){if(!h){var q=i.node(d),r=q.value;if(q)if(j&&l.keyCode===i.KEY.ESCAPE){if(c)e.style.display="inline";h=!0;q.parentNode.removeChild(q);k&&k()}else if(!(j&&l.keyCode!==i.KEY.ENTER)){if(r.length===0||!f&&r===b){if(c)e.style.display="inline"}else a(r);h=!0;q.parentNode&&q.parentNode.removeChild(q);k&&k()}}}},r=document.createElement("input");r.id=d;r.value=b||"";e.parentNode.insertBefore(r,
e.nextSibling);r.classList.add("userEditBoxPrompt");if(c)e.style.display="none";r.addEventListener("keydown",j(!0),!1);r.addEventListener("blur",j(!1),!1);window.setTimeout(function(){r.focus();if(b){var a=i.node(d),c=l?b.indexOf(l):-1;if(c>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",c),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,c);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=c}else a.select()}},
0)},openInNewWindow:e,followLink:function(d,g){g&&e(g)?window.open(d):window.location=d},createButton:function(d,e){var c=document.createElement("button");c.className="orionButton commandButton commandMargins";c.addEventListener("click",function(b){e();i.stop(b)},!1);d&&c.appendChild(document.createTextNode(d));return c},createDropdownButton:function(){}}});
define("orion/PageUtil",[],function(){var h=/^(?:[a-zA-Z0-9-_.!~*'()#;,\/?:@&=+$\[\]]|%[0-9A-F][0-9A-F])*$/,i=/^http[s]?/i;return{matchResourceParameters:function(f){var f=f||window.location.toString(),e={resource:""},d=f.indexOf("#");if(d!==-1&&(f=f.substring(d+1),f.length!==0)){f=f.split(",");Object.defineProperty(e,"resourceRaw",{value:f[0]});e.resource=decodeURIComponent(f[0]);if(!e.resource.match(h))e.resource=encodeURI(e.resource).replace(/%5B/g,"[").replace(/%5D/g,"]");for(d=1;d<f.length;d++){var g=
/([^=]*)(=?)(.*)/.exec(f[d]),c=decodeURIComponent(g[1]||""),g=decodeURIComponent(g[3]||"");c!==""&&c!=="resource"&&(e[c]=g)}}return e},validateURLScheme:function(f,e){var d=f;if(f.indexOf("://")===-1){var g=document.createElement("a");g.href=f;d=g.href}g=!1;return(g=e?e.some(function(c){return RegExp("^"+c+":","i").test(d)}):i.test(d))?f:(console.log("Illegal URL Scheme: '"+f+"'"),"")}}});
define("orion/explorers/navigationUtils",[],function(){function h(f,e){if(!i&&f)f.push({domNode:e}),e.tabIndex=-1,e.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,e,d){f&&(f=f.getGridNavHolder(e,!0))&&h(f,d)},generateNavGrid:h,removeNavGrid:function(f,e){if(f)for(var d=0;d<f.length;d++)if(f[d].domNode===e){f.splice(d,1);break}}}});
define("orion/commandRegistry","require,orion/commands,orion/uiUtils,orion/PageUtil,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip,orion/explorers/navigationUtils".split(","),function(h,i,f,e,d,g,c,b,a,k,j){function l(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,b){this.token=a;this.parameterName=b}function p(a,b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function r(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}l.prototype={_init:function(a){this._selectionService=a.selection;var b=this;i.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&
this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var d=this._urlBindings[b],e=d.command,j=d.invocation;if(j&&j.parameters&&e.callback){j.parameters.setValue(c.parameterName,c.parameterValue);var g=this;window.setTimeout(function(){g._invoke(j)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,d){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new i.CommandInvocation(c,
b,null,a,this),d):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,d)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},confirm:function(a,b,c,d,e,j){var g=!1;if(this._parameterCollector&&!e){var k=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,e){var j=document.createElement("span");j.classList.add("parameterPrompt");j.textContent=b;a.appendChild(j);j=document.createElement("button");j.addEventListener("click",function(){g=!0;k._parameterCollector.close()},!1);e.appendChild(j);j.appendChild(document.createTextNode(c));j.className="dismissButton";var l=document.createElement("button");l.addEventListener("click",function(){g=!1;k._parameterCollector.close()},!1);e.appendChild(l);l.appendChild(document.createTextNode(d));l.className=
"dismissButton";return j},function(){j(g)}))return}g=window.confirm(b);j(g)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,b){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var c=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(c=this._parameterCollector.collectParameters(a),!c)){var d=new k.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),c=d.contentContainer();c.classList.add("parameterPopup");var e=window.document.activeElement,j=this._parameterCollector.getFillFunction(a,function(){e&&e.focus();d.destroy()})(c);d.show();window.setTimeout(function(){j.focus();j.select()},0);c=!0}c||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||
window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function b(a){var c=a.invocation;if(c)if(a=a.command,a.hrefCallback)c=a.hrefCallback.call(c.handler||window,c),c.then?c.then(function(a){window.open(a)}):window.open(c);else if(a.onClick||a.callback)(a.onClick||a.callback).call(c.handler||window,c)}function c(a){return function(){b(a)}}var d=
{},e,j,g=[],k;for(k in this._activeBindings)(j=this._activeBindings[k])&&j.keyBinding&&j.command&&g.push(j);g.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});for(k=0;k<g.length;k++)j=g[k],j.keyBinding.scopeName?(d[j.keyBinding.scopeName]||(d[j.keyBinding.scopeName]=[]),d[j.keyBinding.scopeName].push(j)):(e=f.getUserKeyString(j.keyBinding),a.createItem(e,j.command.name,c(j)));for(var l in d)d[l].length&&d[l].length>0&&(a.createHeader(l),d[l].forEach(function(b){e=f.getUserKeyString(b.keyBinding);
a.createItem(e,b.command.name,c(b))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,c,d,e,j,g,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;if(g)a[b].imageClass=
g;if(k)a[b].tooltip=k;a[b].emptyGroupMessage=j}else a[b]={title:d,position:c,emptyGroupMessage:j,imageClass:g,tooltip:k,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){if(b.length>1)a[b]||(a[b]={position:0,children:{}}),a=a[b].children});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,
b,c,d,e,j,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};j&&((c=this._commandList[b])?this._addBinding(c,"key",j,e):this._addPendingBinding(b,"key",j,e));g&&((c=this._commandList[b])?this._addBinding(c,"url",g,e):this._addPendingBinding(b,"url",g,e));a.sortedContributions=null},_addBinding:function(a,b,c,d){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]=
{command:a,keyBinding:c,bindingOnly:d}:b==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:d})},_addPendingBinding:function(a,b,c,d){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:c,bindingOnly:d})},_checkForTrailingSeparator:function(a,b,c){var e;if(b==="tool"||b==="button")if((e=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&e.classList.contains("commandSeparator"))return c?(a.removeChild(e),!1):!0;if(b===
"menu"&&(a=d.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(e=a[a.length-1],c)e.parentNode.parentNode.removeChild(e.parentNode);else return!0;return!1},renderCommands:function(a,b,c,e,j,g,k){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._selectionService,f=this;c&&c.getSelections(function(c){f.renderCommands(a,
b,c,e,j,g)})}else l&&(this._render(this._contributionsByScopeId[a],b,c,e,j||"button",g,k),this._checkForTrailingSeparator(b,j,!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(a,b,c,d,e,g,l){var f=a.sortedContributions;if(!f){var f=[],m=!1,h;for(h in a)if(!a.hasOwnProperty||a.hasOwnProperty(h)){var p=
a[h];if(p&&typeof p.position==="number")p.id=h,f.push(p),m=!0}if(m)f.sort(function(a,b){return a.position-b.position}),a.sortedContributions=f}var r=0,u=this;f.forEach(function(a){var f,m;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){f=a.children;var h;if(e==="tool"||e==="button")if(a.title)h=u._createDropdownMenu(b,a.title,null,null,a.imageClass,a.tooltip),l&&j.generateNavGrid(l,h.menuButton),window.setTimeout(function(){u._render(a.children,h.menu,
c,d,"menu",g,l);u._checkForTrailingSeparator(h.menu,"menu",!0);if(h.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!h.menuButton.emptyGroupTooltip)h.menuButton.emptyGroupTooltip=new k.Tooltip({node:h.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else l&&j.removeNavGrid(l,h.menuButton),h.menu.parentNode&&h.menu.parentNode.removeChild(h.menu),h.destroyButton&&h.destroyButton.parentNode&&h.destroyButton.parentNode.removeChild(h.destroyButton);
else h.menuButton.style.visibility="visible"},0);else{var p;b.childNodes.length>0&&!u._checkForTrailingSeparator(b,e)&&(p=u.generateSeparatorImage(b));u._render(f,b,c,d,e,g,l);b.childNodes.length>0&&b.childNodes[b.childNodes.length-1]!==p&&(p=u.generateSeparatorImage(b))}else if(a.title){if(p=u._createDropdownMenu(b,a.title,!0,null,null,a.imageClass))u._render(f,p.menu,c,d,"menu",g,l),p.menu.childNodes.length===0&&p.destroyButton&&b.removeChild(p.destroyButton)}else b.childNodes.length>0&&u._generateMenuSeparator(b),
u._render(f,b,c,d,e,g,l),u._generateMenuSeparator(b)}else{var o=u._commandList[a.id];f=o?!0:!1;var v=null,v=null;if(o){m=new i.CommandInvocation(d,c,g,o,u);m.domParent=b;p=f&&(o.visibleWhen?o.visibleWhen(c):!0);if(u._activeBindings[o.id]&&u._activeBindings[o.id].keyBinding)v=u._activeBindings[o.id],v.invocation=p?m:null,v.bindingOnly&&(f=!1);if(u._urlBindings[o.id]&&u._urlBindings[o.id].urlBinding)v=u._urlBindings[o.id],v.invocation=p?m:null,v.bindingOnly&&(f=!1);f=f&&p}if(f)o.choiceCallback?(e===
"tool"||e==="button"?(f=b,p=!1,b.nodeName.toLowerCase()==="ul"&&(f=document.createElement("li"),b.appendChild(f))):(f=b,p=!0),u._createDropdownMenu(f,o.name,p,function(a){o.populateChoicesMenu(a,c,d,g,u)}.bind(o),o.imageClass,o.tooltip||o.title)):(m.handler=m.handler||this,m.domParent=b,p=function(){u._invoke(m)},e==="menu"?f=i.createCommandMenuItem(b,o,m,null,p):(f=e+o.id+r,f=i.createCommandItem(b,o,m,f,null,e==="tool",p)),j.generateNavGrid(l,f),m.domNode=f,r++)}})},_createDropdownMenu:function(a,
c,e,j,l,f){a=d.node(a);if(!a||!d.contains(document.body,a))return null;var m,h=a;if(e)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(b),d.processTextNodes(f,{ButtonText:c}),a.appendChild(f),m=a.lastChild,a=m.lastChild,c=a.previousSibling,c.dropdown=new g.Dropdown({dropdown:a,populate:j}),a.dropdown=c.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(h=document.createElement("li"),a.appendChild(h),m=h),a=null,l&&(a="dropdownButtonWithIcon",f=f||c),f=l?f||c:f,j=i.createDropdownMenu(h,
c,j,a,l),c=j.menuButton,a=j.menu,f)c.commandTooltip=new k.Tooltip({node:c,text:f,position:["above","below","right","left"]});return{menuButton:c,menu:a,dropdown:c.dropdown,destroyButton:m}},_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}};l.prototype.constructor=l;m.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;p.prototype={optionsRequested:function(){return this.optionsRequested}};p.prototype.constructor=p;r.prototype=
{_storeParameters:function(a){this.parameterTable=null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:
null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new p(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new r(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=
r;return{CommandRegistry:l,URLBinding:m,ParametersDescription:r,CommandParameter:p}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,i,f){function e(d,e){this._activeContainer=null;this._getElementsFunction=d;this._toolbarLayoutFunction=e}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&f.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&f.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(d,e,c){typeof d==="string"&&(d=f.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=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;d=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(d.length===0){e=this._activeElements.dismissArea||
this._activeElements.parameterArea;d=document.createElement("button");d.id="closebox";d.className="imageSprite core-sprite-close dismissButton";d.title=h.Close;e.appendChild(d);var a=this;d.addEventListener("click",function(){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&&b.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(d,e){f.$$array("input",e).forEach(function(c){c.type==="checkbox"?d.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&d.parameters.setValue(c.parameterName,c.value.trim())});f.$$array("textArea",e).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,e){var c=this;return function(b,a){var k=null,j=function(){e&&e();c.close()},l=function(a){a.keyCode===f.KEY.ENTER&&c._collectAndCall(d,b);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)j(),f.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",e=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=d,e.appendChild(c),l=function(a){a.keyCode===f.KEY.ESCAPE&&(j(),f.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",c.id=d,e.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,
e.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;k||(k=c);c.addEventListener("keydown",l,!1)});var m=a;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",b.appendChild(m);var i=function(a,b){var c=document.createElement("button");b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");return c};
if(d.parameters.hasOptionalParameters())d.parameters.optionsRequested=!1,i(h.More,m).addEventListener("click",function(){d.parameters.optionsRequested=!0;c._collectAndCall(d,b);j()},!1);i(h.Submit,m).addEventListener("click",function(){c._collectAndCall(d,b);j()},!1);m=i(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=h.Close;m.addEventListener("click",function(){j()},!1);return k}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
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/contentTypes",[],function(){function h(d,c){function b(a,b,c,d){var c=b.filename.indexOf(c)>=0,e=b.extension.indexOf(d)>=0;if(c||e)if(!a||c&&a.extension.indexOf(d)>=0)return b;return a}for(var a=d&&d.split(".").pop(),e=null,j=0;j<c.length;j++){var l=c[j];b(e,l,d,a)===l&&(e=l)}return e}function i(g){this.serviceRegistry=g;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={},g=0;g<c.length;g++)for(var j=b(c[g].getProperty("contentTypes")),l=0;l<j.length;l++){var f=j[l];a[f.id]||(a[f.id]={id:f.id,name:f.name,image:f.image,"extends":f["extends"],extension:b(f.extension),filename:b(f.filename)})}return a}(g);g.registerService(f,this)}var f="orion.core.contenttypes",e="orion.core.contenttype",d="orion.file.contenttype";i.prototype={getContentTypes:function(){var d=this.getContentTypesMap(),c=[],b;for(b in d)d.hasOwnProperty(b)&&c.push(d[b]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(d){return 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:i,getFilenameContentType:h}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function f(a,b,c){for(var d=[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&
d.push(i(a[e],b));return d.join(c)}function e(a,b,c,d){for(var e=Object.keys(a),g=[],f=0;f<e.length;f++)typeof a[e[f]]!=="undefined"&&g.push(i(e[f],b)+c+i(a[e[f]],b));return g.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=[],e=a.split(","),g=0;g<e.length;g++){var f=e[g].match(b);if(f===null)throw Error("Bad VarSpec: "+a);d.push({name:f[1],explode:!!f[2],prefix:f[3]?parseInt(f[3],
10):-1})}this._varSpecList=d}function g(a){for(var b=[],c=0,e=a.indexOf("{",c);e!==-1;){b.push(new h(a.substring(c,e)));c=a.indexOf("}",e+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new d(a.substring(e+1,c)));c+=1;e=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],g=d.name,h=a[g],r=typeof h;if(r!=="undefined"&&h!==null){var o=b.length===0?this._operator.first:this._operator.sep;if(r==="string")this._operator.named&&(o+=i(g,"U+R"),o+=h.length===0?this._operator.ifemp:"="),d.prefix!==-1&&d.prefix<h.length&&(h=h.substring(0,d.prefix)),o+=i(h,this._operator.allow);else if(Array.isArray(h))d.explode?o+=f(h,this._operator.allow,this._operator.sep):(this._operator.named&&(o+=i(g,"U+R"),o+=h.length===0?this._operator.ifemp:
"="),o+=f(h,this._operator.allow,","));else if(r==="object")d.explode?o+=e(h,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(o+=i(g,"U+R"),o+=Object.keys(h).length===0?this._operator.ifemp:"="),o+=e(h,this._operator.allow,",",","));else throw Error("bad param type: "+g+" : "+r);b.push(o)}}return b.join("")}};g.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 g});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,i,f,e,d){function g(){return(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function c(b,a){var c=b.getServiceReferences(a||"orion.page.link"),j=f.matchResourceParameters(window.location.href),l={OrionHome:g(),Location:j.resource},h=[];c.forEach(function(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});if(b.uriTemplate&&
b.nls&&(b.name||b.nameKey)){var c=new i;d.getMessageBundle(b.nls).then(function(a){var d=new e(b.uriTemplate),d=window.decodeURIComponent(d.expand(l)),d=f.validateURLScheme(d);b.href=d;b.textContent=b.nameKey?a[b.nameKey]:b.name;c.resolve(b)});h.push(c)}else if(b.uriTemplate&&b.name){var j=new e(b.uriTemplate),j=window.decodeURIComponent(j.expand(l)),j=f.validateURLScheme(j);b.href=j;b.textContent=b.name;h.push((new i).resolve(b))}});return i.all(h)}return{createPageLinks:function(b,a){return c(b,
a).then(function(a){a.sort(function(a,b){var c=a.textContent&&a.textContent.toLowerCase(),d=b.textContent&&b.textContent.toLowerCase();return c<d?-1:c>d?1:0});return a.map(function(a){var b=a.href,a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:c,getOrionHome:g}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(h,i,f,e,d,g,c,b,a){var k={},j=a.getOrionHome();k._cloneItemWithoutChildren=function p(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=p(a[c]));return b};k._getOpenWithNavCommandExtensions=function(a){function b(a,c){for(var d=a.getServiceReferences("orion.navigate.openWith"),
e=[],j=0;j<d.length;j++){var g=d[j];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?e=e.concat(g):g!==null&&typeof g!=="undefined"&&e.push(g))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],j=e.getProperty("id");c.push({id:j,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||e.getProperty("uriTemplate")})}return c}(),
d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],j=0;j<c.length;j++){var g=c[j],k=d&&d.editor===g.id,f=b(a,g);f.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:f,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:k?"default":"editor"},service:{}})}return e};k._makeValidator=function(a,
b,c,e){function k(a,b,c,d){var e=c.match,j;if(b.indexOf("|")>=0)return j=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),k(a,j,c,d)?!0:k(a,b,c,d);else if(b.indexOf(":")>=0)return j=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[j]?k(a[j],b,c,d):!1;else{a:{j=!1;var g;if(typeof a[b]!=="undefined"){if(typeof e==="undefined")g=a[b],j=!0;else if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))j=e[0],g=c.variableMatchPosition===
"before"?a[b].substring(0,e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+j.length):c.variableMatchPosition==="only"?j:a[b],j=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===e&&(g=a[b],j=!0);if(j&&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=j}else c=!1}return c}}return{info:a,validationFunction:function(b){typeof e==="function"&&(b=e.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var j=0;j<b.length;j++){var g;a:{var f=b[j],l=c;if(this.info.validationProperties)for(g=0;g<this.info.validationProperties.length;g++){var h=this.info.validationProperties[g];if(typeof h.source!=="undefined"){if(!k(f,h.source,h,this)){g=
!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");g=!1;break a}}if(this.info.contentType&&l){h=!1;if(f=d.getFilenameContentType(f.Name,l))for(g=0;g<this.info.contentType.length;g++)if(f.id===this.info.contentType[g]){h=!0;break}g=h}else g=!0}if(!g)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=
0;c<this.info.validationProperties.length;c++){var d=this.info.validationProperties[c];d.source&&d.variableName&&(this.itemCached===a&&this[d.variableName]||k(a,d.source,d,this),a[d.variableName]?window.console.log("Variable name "+d.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[d.variableName]=this[d.variableName])}b.OrionHome=j;a=new g(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null}}};k._createCommandOptions=
function(a,b,d,e,j,g){function f(c,l){var h=k._makeValidator(a,d,e,g);c.visibleWhen=h.validationFunction.bind(h);if(j)if(h.generatesURI.bind(h)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var i=a;c.callback=function(a){var e;if(i.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,e=k._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){e=[];for(var j=0;j<a.items.length;j++)e.push(k._cloneItemWithoutChildren(a.items[j]))}else e=
k._cloneItemWithoutChildren(a.items);if(d)var g=d.getService("orion.page.progress");b.run?g?g.progress(b.run(e),"Running command: "+c.name):b.run(e):d&&(g?g.progress(d.getService(b).run(e),"Running command: "+c.name):d.getService(b).run(e))}}l.resolve(c)}var l=new i;a.nls?c.getMessageBundle(a.nls).then(function(b){f({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,showGlobally:a.showGlobally},l)}):f({name:a.name,image:a.image,
id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},l);return l};k.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};var l;k.createAndPlaceFileCommandsExtension=function(a,b,c,d,e,j){var g=!!j;return k.createFileCommands(a,null,j?"all":void 0,g).then(function(a){b._addedOpenWithCommands=g;var j=!1,k=!1;a.forEach(function(a){b.addCommand(a);e&&!j&&(j=!0,b.addCommandGroup(c,"eclipse.fileCommandExtensions",
1E3,null,e));e&&!k&&(k=!0,b.addCommandGroup(c,"eclipse.openWith",1E3,"Open With",e+"/eclipse.fileCommandExtensions"));this.isEditor?b.registerCommandContribution(c,a.id,d+this.index,e?e+"/eclipse.fileCommandExtensions/eclipse.openWith":null):b.registerCommandContribution(c,a.id,d+this.index,e?e+"/eclipse.fileCommandExtensions":null)});return{}})};k.createFileCommands=function(a,b,c,d){var c=c===void 0?"global":c,d=d===void 0?!0:d,e=a.getServiceReferences("orion.navigate.command"),j=[];if(c==="all"||
c==="global")for(var g=0;g<e.length;g++)if(e[g].getProperty("id")!=="orion.navigateFromMetadata"){for(var h=a.getService(e[g]),w={},A=e[g].getPropertyKeys(),v=0;v<A.length;v++)w[A[v]]=e[g].getProperty(A[v]);(c==="all"||w.forceSingleItem&&w.showGlobally)&&j.push({properties:w,service:h})}return i.when(function(){var c=a.getService("orion.core.contenttypes")||b;return l||i.when(c.getContentTypes(),function(a){return l=a})}(),function(){j=d?j.concat(k._getOpenWithNavCommandExtensions(a,l)):j;var b=j.map(function(b){var c=
b.properties;return k._createCommandOptions(c,b.service,a,l,!0).then(function(a){a=new f.Command(a);if(c.isEditor)a.isEditor=c.isEditor;return a})});return i.all(b,function(a){return{_error:a}}).then(function(a){return a})})};k.createOpenWithCommands=function(a,b,c){return c&&c._addedOpenWithCommands?(new i).resolve(k.getOpenWithCommands(c)):k.createFileCommands(a,b,"none",!0)};return k});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,i){function f(e){this._init(e)}f.prototype={_init:function(e){var d=i.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._workspaceRootURL=e.workspaceRootURL;this._makeHref=e.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var e;if(this._resource&&this._resource.Parents){e=document.createElement("a");var d=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(e,d):e.href=h.toUrl("navigate/table.html")+"#"+d}else e=document.createElement("span");i.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));return e}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],
buildSegment:function(e){var d=document.createElement("a");d.classList.add("breadcrumb");d.appendChild(document.createTextNode(e));return d},addSegmentHref:function(e,d){this._makeHref?this._makeHref(e,d.Location,d):e.href=h.toUrl("navigate/table.html")+"#"+d.ChildrenLocation},buildSegments:function(e,d){if(this._resource.Parents){var g=this._resource.Parents.slice(0),c,b;g&&(g=g.slice(0),d==="reverse"&&(g=g.reverse().slice(0)),g.forEach(function(a){e?(b=e,e=null):b=a.Name;c=this.buildSegment(b);
this.path+=a.Name;this.addSegmentHref(c,a);c.include=!1;this.segments.push(c)}.bind(this)))}},addDivider:function(){var e=document.createElement("span");e.appendChild(document.createTextNode(" / "));this.path+="/";e.classList.add("breadcrumbSeparator");this.append(e)},refresh:function(){(this.crumbs=i.node(this._id))?i.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),this.dirty=document.createElement("span"),this.dirty.id=
"dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(e){this.crumbs.appendChild(e)},addTitle:function(e,d){var g=d||document.title;this.crumbs.childNodes.length===0&&(e=document.createElement("span"),e.appendChild(document.createTextNode(g)),e.classList.add("breadcrumb"),e.classList.add("currentLocation"),
this.append(e))},finalSegment:function(e,d){e=document.createElement("span");d?e.appendChild(document.createTextNode(d)):e.appendChild(document.createTextNode(this._resource.Name));e.classList.add("currentLocation");this.path+=this._resource.Name;this.append(e)},firstSegment:function(e){if(e)this.append(e),this._resource&&this._resource.Parents?(e.classList.add("breadcrumb"),this.addDivider()):(e.href="",e.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(e){e.include===
!0&&(this.append(e),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var e=this.segments.slice(0).reverse();e.forEach(function(d){this.append(d);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?d.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=e.reverse()}},measure:function(){this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;
if(d)this.addTitle(e,d);else if(this.finalSegment(e,d),this._resource&&this._resource.Parents&&(this.buildSegments(d,"reverse"),this.measureSegments(),this.firstSegment(e)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(e,d):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(e),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(e,
d)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(h,i){function f(e){this._init(e)}f.prototype={_init:function(e){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(e.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(e.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.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._closeByDefault=e.closeByDefault;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(){var e=localStorage.getItem(this._prefix+"/toggleState");this._closed=e?e==="closed":this._closeByDefault?
!0:!1;if(this._vertical)if(e=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(e,10);else{if(this._closeByDefault)this._splitTop=150}else if(e=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(e,10);else if(this._closeByDefault)this._splitLeft=150},_adjustToSplitPosition:function(e){var d=i.bounds(this.$node),g=i.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-g.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-g.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=i.bounds(this.$node.parentNode),g=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=d.height-(g.top-d.top+g.height)+"px":this.$mainNode.style.width=d.width-(g.left-d.left+g.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 i.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),
i.stop(e)},_mouseMove:function(e){if(this._tracking){var d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=e.clientY;if(this._splitTop<d.top+5)this._splitTop=d.top+5;else if(this._splitTop>d.top+d.height-5)this._splitTop=d.top+d.height-5;var g=this._splitTop;this.$node.parentNode.style.position==="relative"&&(g=this._splitTop-d.top);this.$node.style.top=g+"px"}else{this._splitLeft=e.clientX;if(this._splitLeft<d.left+5)this._splitLeft=d.left+5;else if(this._splitLeft>d.left+d.width-
5)this._splitLeft=d.left+d.width-5;g=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(g=this._splitLeft-d.left);this.$node.style.left=g+"px"}this._adjustToSplitPosition(!0);i.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"),i.stop(e)}};f.prototype.constructor=f;return{Splitter:f}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(h){return{makeRelative:function(h){if(!h)return h;var f=window.location.protocol+"//"+window.location.host;return h.indexOf(f)===0?h.substring(f.length):h},isAtRoot:function(i){if(!i)return!1;if(i==="/workspace")return!0;var f=new URL(h.toUrl("workspace"),window.location.href);return(new URL(i,window.location.href)).href.indexOf(f.href)===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(h,i,f){function e(d){this._favorites=[];f.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],e=0;e<d.length;e++){var c=d[e],b=c.ChildrenLocation?c.ChildrenLocation:c.Location,b=i.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,e,c){this._favorites.push({name:d,path:e,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(d){for(var e in this._favorites)if(this._favorites[e].path===
d){this._favorites.splice(e,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(d,e){var c=!1,b;for(b in this._favorites)if(this._favorites[b].path===d){var a=this._favorites[b];if(a.name!==e)a.name=e,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(d){for(var e in this._favorites)if(this._favorites[e].path===d)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(d){var e;
if(!d)return this._favorites;var c="";for(e=0;e<d.length;e++){var b=d.charAt(e);c+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}c+=".*";d=RegExp(c);c=[];for(e in this._favorites)this._favorites[e].name.search(d)===0&&c.push(this._favorites[e]);return c},_initializeFavorites:function(){var d=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var c,e=e.get("navigate");typeof e==="string"&&(e=JSON.parse(e));if(e)for(c in e)e[c].isFavorite=
!0,d._favorites.push(e[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(e){e.put("navigate",d)})},_sorter:function(d,e){var c=d.name.toLowerCase(),b=e.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/ThemePreferences",[],function(){function h(h,f){this._preferences=h;this._themeData=f;var e=f.getThemeStorageInfo(),d=h.listenForChangedSettings(e.storage,2,function(e){e.key===d&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,f,e){var d=e.get(h.styleset);d||(d=f.getStyles(),e.put(h.styleset,JSON.stringify(d)));(f=e.get("selected"))&&(f=JSON.parse(f));if(!f||f[h.selectedKey]===void 0)f=f||{},f[h.selectedKey]=h.defaultTheme,e.put("selected",JSON.stringify(f))},
apply:function(){this.setTheme()},getTheme:function(h){var f=this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var g=JSON.parse(d.get("selected")),d=JSON.parse(d.get(e.styleset)),c;if(d)for(var b=0;b<d.length;b++)if(d[b].name===g[e.selectedKey]){c=d[b];break}h({style:c,styles:d})}.bind(this))},setTheme:function(h,f){var e=this._themeData,d=e.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(g){this._initialize(d,
e,g);var c=JSON.parse(g.get("selected"));h||(h=c[d.selectedKey]);c[d.selectedKey]=h;g.put("selected",JSON.stringify(c));f?g.put(d.styleset,JSON.stringify(f)):f=JSON.parse(g.get(d.styleset));for(g=0;g<f.length;g++)if(f[g].name===c[d.selectedKey]){e.processSettings(f[g]);break}}.bind(this))},setFontSize:function(h){var f=this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var g=JSON.parse(d.get("selected")),c=JSON.parse(d.get(e.styleset)),
b;if(c)for(var a=0;a<c.length;a++)c[a].fontSize=h,c[a].name===g[e.selectedKey]&&(b=c[a]);d.put(e.styleset,JSON.stringify(c));f.processSettings(b)}.bind(this))}};return{ThemePreferences:h}});
define("orion/editor/eventTarget",[],function(){function h(){}h.addMixin=function(i){var f=h.prototype,e;for(e in f)f.hasOwnProperty(e)&&(i[e]=f[e])};h.prototype={addEventListener:function(h,f,e){if(!this._eventTypes)this._eventTypes={};var d=this._eventTypes[h];d||(d=this._eventTypes[h]={level:0,listeners:[]});d.listeners.push({listener:f,useCapture:e})},dispatchEvent:function(h){var f=h.type;this._dispatchEvent("pre"+f,h);this._dispatchEvent(f,h);this._dispatchEvent("post"+f,h)},_dispatchEvent:function(h,
f){var e=this._eventTypes?this._eventTypes[h]:null;if(e){var d=e.listeners;try{if(e.level++,d)for(var g=0,c=d.length;g<c;g++)if(d[g]){var b=d[g].listener;typeof b==="function"?b.call(this,f):b.handleEvent&&typeof b.handleEvent==="function"&&b.handleEvent(f)}}finally{if(e.level--,e.compact&&e.level===0){for(g=d.length-1;g>=0;g--)d[g]||d.splice(g,1);d.length===0&&delete this._eventTypes[h];e.compact=!1}}}},isListening:function(h){return!this._eventTypes?!1:this._eventTypes[h]!==void 0},removeEventListener:function(h,
f,e){if(this._eventTypes){var d=this._eventTypes[h];if(d){for(var g=d.listeners,c=0,b=g.length;c<b;c++){var a=g[c];if(a&&a.listener===f&&a.useCapture===e){d.level!==0?(g[c]=null,d.compact=!0):g.splice(c,1);break}}g.length===0&&delete this._eventTypes[h]}}}};return{EventTarget:h}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(h,i,f){function e(d){d=d||{};this._document=d.document||document}var d={};e.getTheme=function(g){var g=g||"default",c=d[g];c||(c=d[g]=new e);return c};e.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(d,c){var b=this,a=b._themeClass;b._themeClass=d;this._load(d,c,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(d){return this.dispatchEvent(d)},
buildStyleSheet:function(d,c){function b(b,c,e){c&&(a.push("."+d+" ."+b+" {"),a.push("\t"+(e?"background-color":"color")+": "+c+";"),a.push("}"))}var a=[];a.push("");a.push("."+d+" {");c.fontFamily&&a.push("\tfont-family: "+c.fontFamily+";");c.fontSize&&a.push("\tfont-size: "+c.fontSize+";");c.fontSize&&a.push("\tcolor: "+c.text+";");a.push("}");a.push("."+d+".textview {");c.background&&a.push("\tbackground-color: "+c.background+";");a.push("}");b("ruler.annotations",c.annotationRuler,!0);b("ruler.lines",
c.annotationRuler,!0);b("ruler.folding",c.annotationRuler,!0);b("ruler.overview",c.overviewRuler,!0);b("rulerLines",c.lineNumber,!1);b("rulerLines.even",c.lineNumberEven,!1);b("rulerLines.odd",c.lineNumberOdd,!1);b("annotationLine.currentLine",c.currentLine,!0);b("entity-name-tag",c.keyword,!1);b("entity-other-attribute-name",c.attribute,!1);b("string-quoted",c.string,!1);b("line_caret",c.currentLine,!0);b("token_keyword",c.keyword,!1);b("token_string",c.string,!1);b("token_singleline_comment",c.comment,
!1);b("token_multiline_comment",c.comment,!1);b("token_doc_comment",c.comment,!1);b("token_doc_html_markup",c.comment,!1);return a.join("\n")},_createStyle:function(d,c,b,a){var e=this._document,d="orion-theme-"+d,j=e.getElementById(d);if(j){if(a||j.firstChild.data===c)return;j.removeChild(j.firstChild);j.appendChild(e.createTextNode(c))}else a?(j=f.createElement(e,"link"),j.rel="stylesheet",j.type="text/css",j.href=c,j.addEventListener("load",function(){b()})):(j=f.createElement(e,"style"),j.appendChild(e.createTextNode(c))),
j.id=d,(e.getElementsByTagName("head")[0]||e.documentElement).appendChild(j);a||b()},_load:function(d,c,b){if(d)if(typeof c==="string")this._createStyle(d,c,b);else if(c=c.href,c.substring(c.length-4)!==".css"&&(c+=".css"),/^\//.test(c)||/[a-zA-Z0-9]+:\/\//i.test(c)||!h.toUrl)this._createStyle(d,c,b,!0);else{var a=this;h(["text!"+c],function(c){a._createStyle(d,c,b,!1)})}else b()}};i.EventTarget.addMixin(e.prototype);return{TextTheme: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 i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var f="",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.height="15px";d.style.padding="10px";d.style.paddingRight="3px";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="0";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 g in e)f+=
e[g].toString();return f};i.prototype.writeLocationStyle=function(){var f="",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="#f1f1f2;";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="#f1f1f2";d.style.fontWeight="bold";e.push(d);d=new h.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize="8pt";d.style.color="#f1f1f2";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);d=new h.ThemeClass("progressPane_running");d.style.background="url(../images/progress_running_dark.gif) no-repeat center";d.style.width="16px";d.style.height="16px";e.push(d);
for(var g in e)f+=e[g].toString();return f};i.prototype.writeButtonStyle=function(){var f="",e=[],d=new h.ThemeClass("commandButton");d.style.color="#666";d.style.border="1px solid #dedede";d.style.backgroundColor="#ddd";d.style.textAlign="center";d.style.verticalAlign="baseline";d.style.cursor="pointer";d.style.display="inline-block";d.style.padding="5px 6px";d.style.borderRadius="3px";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 g in e)f+=e[g].toString();return f};i.prototype.writeMainStyle=function(){var f="",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%)";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="34px";d.style.borderBottom="1px solid #ebebeb";d.style.paddingTop="2px";e.push(d);for(var g in e)f+=e[g].toString();return f};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=
f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:i}});
define("orion/widgets/themes/container/ThemeData",["orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,i){function f(){}function e(){this.styles=[];var d=new f;d.name="Orion";d.navbar="#333";d.button="#EFEFEF";d.location="#efefef";d.selection="FEC";d.sidepanel="#FBFBFB";d.mainpanel="white";d.toolpanel="white";d.navtext="#bfbfbf";d.content="#3087B3";d.search="#444";d.breadcrumb="#3087B3";d.separator="#333";this.styles.push(d);d=new f;d.name="Green Zone";d.navbar=
"seagreen";d.button="lavender";d.location="darkseagreen";d.selection="moccasin";d.sidepanel="aliceblue";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="darkgreen";d.search="darkgreen";d.breadcrumb="#3087B3";d.separator="seagreen";this.styles.push(d);d=new f;d.name="Pretty In Pink";d.navbar="plum";d.button="lavender";d.location="pink";d.selection="lavender";d.sidepanel="seashell";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="mediumorchid";d.search="violet";
d.breadcrumb="#3087B3";d.separator="plum";this.styles.push(d);d=new f;d.name="Blue Monday";d.navbar="cornflowerblue";d.button="lavender";d.location="skyblue";d.selection="lavender";d.sidepanel="aliceblue";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="royalblue";d.search="royalblue";d.breadcrumb="#3087B3";d.separator="cornflowerblue";this.styles.push(d);d=new f;d.name="Vanilla Skies";d.navbar="sandybrown";d.button="lemmonchiffon";d.location="cornsilk";d.selection="lemonchiffon";
d.sidepanel="white";d.mainpanel="white";d.toolpanel="white";d.navtext="lemonchiffon";d.content="chocolate";d.search="moccasin";d.breadcrumb="#3087B3";d.separator="sandybrown";this.styles.push(d);d=new f;d.name="Beetlejuice";d.navbar="indigo";d.button="slateblue";d.location="darkslateblue";d.selection="silver";d.sidepanel="lavender";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="mediumslateblue";d.search="#444";d.breadcrumb="#3087B3";d.separator="indigo";this.styles.push(d);
d=new f;d.name="Red";d.navbar="#CD2127";d.button="#777777";d.location="#D85F56";d.selection="lightcoral";d.sidepanel="#EFDAB2";d.mainpanel="#FDFADD";d.toolpanel="#FDFADD";d.navtext="#FBFBFB";d.content="darkred";d.search="#D85F56";d.breadcrumb="darkred";d.separator="#CD2127";this.styles.push(d)}function d(){return this.styles}f.prototype.name="Orion";f.prototype.navbar="#333";f.prototype.button="#EFEFEF";f.prototype.location="#333";f.prototype.breadcrumb="#3087B3";f.prototype.separator="#333";f.prototype.selection=
"FEC";f.prototype.sidepanel="#FBFBFB";f.prototype.mainpanel="white";f.prototype.toolpanel="white";f.prototype.navtext="#bfbfbf";f.prototype.content="#3087B3";f.prototype.search="#444";e.prototype.styles=[];e.prototype.getStyles=d;e.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};e.prototype.getViewData=function(){for(var d={top:10,left:10,width:350,height:350,shapes:[{type:"RECTANGLE",name:"Navigation Bar",x:10,y:10,
width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:"Navigation Text",label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:"Search Box",x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:"Tool Panel",x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:"Selection Bar",x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},
{type:"RECTANGLE",name:"Location",x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:"Navigation Text",label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:"Content",label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:"Content",label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:"Content",label:"Location",
x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:"Main Panel",x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:"Button",x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:"Button Text",label:"Button",x:158,y:90,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",
name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:"Section Text",label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:"Line Color",x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:"Side Panel",x:10,y:71,
width:140,height:289,family:"sidepanel",fill:"#FBFBFB",order:12},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:"Navigation Text",label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},
{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"}]},c=0;c<3;c++)d.shapes.push({type:"TEXT",name:"content",label:"org.eclipse.orion.content",x:170,y:127+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)d.shapes.push({type:"TEXT",name:"content",label:"Item",x:25,y:115+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)d.shapes.push({type:"TRIANGLE",name:"twisty",x1:160,y1:121+c*20,x2:165,y2:124+c*20,x3:160,y3:127+c*20,family:"navbar",fill:"#333"});
d.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return d};e.prototype.processSettings=function(d){var c=new i.ThemeSheetWriter;(new h.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",c.getSheet(d))};return{ThemeData:e,getStyles:d}});
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...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
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,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(h,i,f,e){function d(d){this._displaySignOut=!0;this._init(d)}d.prototype={_init:function(d){this._dropdownNode=f.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={};this._noSeparator=d.noSeparator;this._dropDownItemClass=
d.dropDownItemClass;this._keyAssistClass=d.keyAssistClass;if(d.signOut!==void 0)this._displaySignOut=d.signOut},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);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&b.classList.add(this._dropDownItemClass):b.classList.add("dropdownMenuItem");b.addEventListener("click",c,!1);b.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&c()},!1);return b},_renderAuthenticatedService:function(d){var c=this,b=this.authenticatedServices[d].authService;if(b&&b.logout&&this._displaySignOut){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?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);a.forEach(function(a){var b=d(typeof a.category==="number"?a.category:1),e=c.createElement("li"),j=c.createElement("a");j.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&j.classList.add(this._dropDownItemClass):j.classList.add("dropdownMenuItem");
j.href=a.href;j.textContent=a.textContent;e.appendChild(j);b.appendChild(e)}.bind(this));if(this.keyAssistFunction){var a=document.createElement("li"),e=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&e.classList.add(this._keyAssistClass):e.classList.add("key-assist-menuitem");a.appendChild(e);d(0).appendChild(a)}var j=this;b.sort(function(a,b){return a-b}).forEach(function(a,c){if(c<b.length-1&&!this._noSeparator){var d=
document.createElement("li");d.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");d.appendChild(e);a.appendChild(d)}j._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var l in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(l)&&this._renderAuthenticatedService(l,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/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,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,i,f,e,d,g){function c(a,b,c){var d="";c&&(d="^");if(d=f.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={ALL_FILE_TYPE:"*.*"};b.doSearch=function(a,c,d,e){if(a){var f=!0;d==="*"&&(d="");d===""&&(f=e&&e.type!==b.ALL_FILE_TYPE);if(f){d!==""&&b.addRecentSearch(c,
d,e?e.regEx:!1);var a=a.createSearchParams(d,!1,!1,e),g=b.generateSearchHref(a);b.getOpenSearchPref(c,function(a){a?window.open(g):window.location=g})}}else window.alert(h["Can't search: no search service is available"])};b.generateSearchHelper=function(a,d){var e=a.keyword,f=e,g={};a.fileType&&a.fileType!==b.ALL_FILE_TYPE&&e===""&&(f="*."+a.fileType);if(a.regEx)g.searchStr=e,c(g,a,d);else{var h=e.indexOf("*")>-1,i=e.indexOf("?")>-1;h&&(e=e.split("*").join(".*"));i&&(e=e.split("?").join("."));!h&&
!i&&!a.nameSearch?(g.searchStr=a.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?e:e.toLowerCase(),c(g,a,d),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:f}};b.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows,10);if(a.start!==void 0)a.start=parseInt(a.start,10);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.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.generateSearchHref=function(a){var c=i.toUrl("search/search.html"),a=b.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return(new g(c+"#{,resource,params*}")).expand({resource:d,params:a})};b.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 g("{,params*}")).expand({params:a})};b.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,10)};b.replaceRegEx=function(a,
b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.replaceStringLiteral=function(a,c,d){c=f.parse("/"+c+"/gim");return b.replaceRegEx(a,c,d)};b.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var e=!1,f=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{f.push({startIndex:d,length:a.searchStrLength});e=!0;if(c)break;d+=a.searchStrLength}return e?f:null};b.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,
c).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};b.searchOnelineRegEx=function(a,c,d){for(var e=0,f=!1,g=[];;)if(e=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,e)){g.push(e);f=!0;if(d)break;e=e.startIndex+e.length}else break;return f?g:null};b.generateNewContents=function(a,c,d,e,f,g){if(e&&c){if(!a)d.contents=[];for(var h=0;h<c.length;h++){for(var i=c[h],n=!1,q=!1,s=[],y,B=0,w=0;w<e.children.length;w++)if(e.children[w].lineNumber-1===h){B=w;for(n=0;n<e.children[w].matches.length;n++)e.children[w+
n].checked!==!1&&s.push(n);q=s.length>0;y=e.children[w].matches;n=!0;break}if(n){if(q){s=b.replaceCheckedMatches(i,f,y,s,g);i=s.replacedStr;for(n=0;n<e.children[B].matches.length;n++)e.children[B+n].newMatches=s.newMatches}else for(n=0;n<e.children[B].matches.length;n++)e.children[B+n].newMatches=e.children[B+n].matches;a?d.contents[h]=i:d.contents.push(i)}else a||d.contents.push(i)}}};b.generateMatchContext=function(a,b,c){var d=[],e=a*2+1,f;b.length<=e?(f=0,a=b.length-1):(f=c-a,f<0?(f=0,a=f+e-1):
(a=c+a,a>b.length-1&&(a=b.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:b[e],current:e===c});return d};b.splitFile=function(a){for(var b=0,c=0,d=0,e=0,f=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){f.push(a.substring(e));break}var g=1;b!==-1&&c!==-1?b+1===c?(g=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;f.push(a.substring(e,d-g));e=d}return f};b.searchWithinFile=function(a,c,d,e,f,g){d=b.splitFile(d);if(f)c.contents=d;if(c){c.children=[];for(var h=
e=0;h<d.length;h++){var i=d[h];if(i&&i.length>0){var n=g?i:i.toLowerCase();if(n=a.wildCard?b.searchOnelineRegEx(a,n):b.searchOnelineLiteral(a,n)){var q,s=h+1;if(f)for(var y=0;y<n.length;y++)q=y+1,q={parent:c,checked:c.checked,type:"detail",matches:n,lineNumber:s,matchNumber:q,name:i,location:c.location+"-"+s+"-"+q},c.children.push(q);else q={parent:c,context:b.generateMatchContext(2,d,h),checked:c.checked,type:"detail",matches:n,lineNumber:s,name:i,location:c.location+"-"+s},c.children.push(q);e+=
n.length}}}c.totalMatches=e}};b.replaceCheckedMatches=function(a,b,c,d,e){for(var f=0,g="",h=[],i=0;i<c.length;i++){f!==c[i].startIndex&&(g+=a.substring(f,c[i].startIndex));if(c[i].length)e=c[i].length;for(var f=!1,q=0;q<d.length;q++)if(d[q]===i){f=!0;break}f?(h.push({startIndex:g.length,length:b.length}),g+=b):(h.push({startIndex:g.length,length:e}),g+=a.substring(c[i].startIndex,c[i].startIndex+e));f=c[i].startIndex+e}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}};b.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.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b._storeRecentSearch=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),20)})};b.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,
e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(f in e)if(e[f].name===c)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:c,regEx:d});b._storeRecentSearch(a,e)})};b.removeRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e)for(f in e)if(e[f].name===c){e.splice(f,1);b._storeRecentSearch(a,
e,d);break}})};b.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.getMixedSearches=function(a,c,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));c&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var c=b.parseQueryStr(a.query);
f.some(function(a){return c.searchStrTitle===a.name})||f.push({name:c.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&e&&e(f)})};b.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.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",
{openInNewTab:b})})};return b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,i,f,e,d,g){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;a.getContentTypes().then(function(a){this.contentTypesCache=a;this._visitRecursively(this._childrenLocation).then(function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})}.bind(this))}.bind(this))};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 g.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 j=d.getFilenameContentType(b[e].Name,c.contentTypesCache);j&&(j["extends"]==="text/plain"||j.id==="text/plain")&&c._onFileType(j)&&a.push(c._sniffSearch(b[e]))}else b[e].Location&&a.push(c._visitRecursively(b[e].ChildrenLocation));return g.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:f.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:f.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 g;b.resolve(this._totalCounter);return b};c.prototype.constructor=c;return{SearchCrawler:c}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,i,f,e){function d(){}d.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" id="closeDialog"></button></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&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);c=document.createRange();c.selectNode(this.$parent);
d=c.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE?b.hide():a.keyCode===f.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=!f.contains(d.$frame,a.target);if(b)for(var c=0;c<
d.$$modalExclusions.length;c++)if(f.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),f.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(f.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=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();f.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=f.bounds(this.$frame),b=f.bounds(document.documentElement),a;d?(a=f.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 f.firstTabbable(this.$parent)||this._defaultButton||f.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/util,orion/webui/dialog".split(","),function(h,i,f,e,d,g,c){function b(a){this._init(a)}b.prototype=new c.Dialog;b.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" 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>';b.prototype._init=function(a){this.title=a.title||h["Find File Named"];this.modal=!0;this.messages=h;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new f.ContentTypeService(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(h["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(h["Missing required argument: searchRenderer"]);this._favService=a.favoriteService;if(!this._favService)throw Error(h["Missing required argument: favService"]);this._initialize()};b.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);
b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===d.KEY.ENTER){var c=d.$("a",b.$results);c&&(d.stop(a),window.open(c.href),b.hide())}},!1);a.addEventListener("keydown",function(a){var c,e,f,g,h;if(a.keyCode===d.KEY.DOWN||a.keyCode===d.KEY.UP)e=d.$$array("a",b.$results),c=d.$$array("a",b.$favresults),f=document.activeElement,h=e.indexOf(f),g=c.indexOf(f),a.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=b.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=b.$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(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=
b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new i.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),
this.$fileNameMessage.appendChild(document.createTextNode(this._message)));if(this._initialText)this.$fileName.value=this._initialText,this.doSearch()};b.prototype.populateFavorites=function(){var a=document.createElement("div");a.appendChild(document.createTextNode(h["Populating favorites&#x2026;"]));d.empty(this.$favresults);this.$favresults.appendChild(a);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());
this._favService.addEventListener("favoritesChanged",this.showFavorites())};b.prototype.showFavorites=function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a._searchRenderer.makeRenderFunction(a._contentTypeService,a.$favresults,!1,a.decorateResult.bind(a),a.showFavoritesImage)(b);if(b&&b.length>0)b=document.createElement("div"),b.style.borderBottom="1px dashed #BBBBBB",b.style.padding="5px",a.$favresults.appendChild(b)}};b.prototype.showFavoritesImage=function(a){var b=new Image;
b.classList.add("modelDecorationSprite");b.classList.add("core-sprite-favorite");b.src=e.toUrl("images/none.png");b.title=h.Favorite;a.appendChild(b);b.style.verticalAlign="middle"};b.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._searcher.createSearchParams(a,
this._nameSearch,this._searchOnRoot),c=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=c;var e=document.createElement("div");e.appendChild(document.createTextNode(this._nameSearch?h["Searching..."]:g.formatMessage(h["Searching for occurrences of"],a)));d.empty(this.$results);this.$results.appendChild(e);this._searcher.search(b,!1,function(){c===this.currentSearch&&c.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=
function(a){for(var b=this,a=d.$$array("a",a),c=0;c<a.length;c++){var e=a[c];e.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&b.hide()},!1);e.addEventListener("keyup",function(a){a.keyCode===d.KEY.ENTER&&b.hide()},!1)}};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};b.prototype.constructor=b;return{OpenResourceDialog:b}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\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="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\t\t<nav id="primaryNav" class="bannerLeftArea" role="navigation">\n\t\t\t<div class="centralNavigation" id="centralNavigation" tabindex="0" role="button" style="margin-top:0;"></div>\n\t\t</nav>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\t\t<div class="bannerRightArea">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;">\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">\n\t\t\t\t\t<span class="dropdownArrowEmpty"></span>\n\t\t\t\t</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<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></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="logoFooter commandSprite core-sprite-orion-logo"></div>\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<ul>\n\t\t\t<\!-- <li><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a></li --\>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=3.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\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<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility:hidden;">\n</div>\n<div class="layoutRight" style="padding-left:7px;margin-left:4px;margin-top:6px;" id="settingsTab" style="visibility:hidden;">\n\t<button class="layoutRight core-sprite-wrench imageSprite" id="settingsAction" aria-live="off" style="visibility:hidden;"></button>\n</div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/objects",[],function(){return{mixin:function(h){Array.prototype.slice.call(arguments,1).forEach(function(i){for(var f=Object.keys(i),e=0;e<f.length;e++){var d=f[e];h[d]=i[d]}})}}});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,i){function f(e,d,f){this.CLEAR_PANEL=f!==null?f:!0;this.OPEN="false";f="";e.nodeType?this.node=e:(f=e+"_",e=document.getElementById(e),this.node=e.nodeType?e:document.createElement("span"));this.node.innerHTML=this.templateString;this.navLabelId=f+"navigationlabel";document.getElementById("navigationlabel").id=this.navLabelId;this.arrowId=f+"dropDownArrow";document.getElementById("dropDownArrow").id=this.arrowId;
this.navDropDownId=f+"navdropdown";document.getElementById("navdropdown").id=this.navDropDownId;if(d.icon)this.node.className=this.node.className+" "+d.icon,this.node.onclick=this.click.bind(this);else{if(d.label)e=document.getElementById(this.navLabelId),e.textContent=d.label,e.onclick=this.click.bind(this);if(d.caret)document.getElementById(this.arrowId).className=d.caret}this._dropdownNode=i.node(this.navDropDownId);this._triggerNode=i.node(this.navLabelId)}h.mixin(f.prototype,{templateString:'<div id="navigationlabel" class="navigationLabel dropdownTrigger" ></div><span id="dropDownArrow" class="dropDownArrow"></span><div class="dropDownContainer" id="navdropdown" style="display:none;"></div>',
click:function(){var e=document.getElementById(this.navDropDownId);e.style.display==="none"?this.updateContent(this.getContentNode(),function(){e.style.display="";this._positionDropdown();this.handle=i.addAutoDismiss([this.node,e],this.clearPanel.bind(this))}.bind(this)):this.CLEAR_PANEL&&this.clearPanel()},clearPanel:function(){document.getElementById(this.navDropDownId).style.display="none"},addContent:function(e){document.getElementById(this.navDropDownId).innerHTML=e},getContentNode:function(){return document.getElementById(this.navDropDownId)},
updateContent:function(e,d){d()},toggleLabel:function(e){document.getElementById(this.navLabelId).style.display=e?"":"none";document.getElementById(this.arrowId).style.display=e?"":"none"},_positionDropdown:function(){this._dropdownNode.style.left="";var e=i.bounds(this._dropdownNode),d=i.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)},destroy:function(){if(this.node)i.empty(this.node),this.node=this.select=null}});return f});
define("orion/widgets/input/GroupedContent",["orion/objects","orion/webui/littlelib"],function(h){function i(){}h.mixin(i.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">Main Pages</span><nav><ul id="navigationlinks"></ul></nav></section></div><div class="groupedContentDivider"></div><div style="float:left;"><section><span style="color:#333;padding:15px;">Related Links</span><nav><ul id="relatedLinks"></ul></nav></section></div>',getContentPane:function(){return this.templateString}});
return i});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,i,f){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,f){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",[f,b])});var j=f.substring(0,
f.length-1),g=decodeURIComponent(j.substring(j.lastIndexOf("/")+1)),j=j.substring(0,j.lastIndexOf("/")+1);return e(a,"createFolder",[j,g]).then(function(){},function(){}).then(function(){return e(c,"fetchChildren",[b]).then(function(b){for(var e=[],j=0;j<b.length;++j){var g=b[j].Location,h=g;b[j].Directory&&(h=g.substring(0,g.length-1));h=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=f+encodeURIComponent(h);b[j].Directory&&(h+="/");e[j]=d(c,g,a,h)}return i.all(e)})})}function g(c,b){function a(a){var b=
new i;b.reject(h["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],g=0;g<d.length;++g)b(d[g])&&e.push(d[g]);for(var m=[],p=[],r=[],o=[],n={fetchChildren:function(){var a=new i;a.resolve(o);return a},createWorkspace:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:h["File Servers"],Location:"/",Children:o,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<e.length;++d)o[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},g=e[d].getProperty("pattern")||".*",g[0]!=="^"&&(g="^"+g),m[d]=RegExp(g),p[d]=c.getService(e[d]),r[d]=e[d].getProperty("Name"),
e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&f.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){o[a].Name=b[e[a].getProperty("NameKey")];r[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return p[0]?0:-1;for(var b=0;b<m.length;++b)if(m[b].test(a))return b;throw h["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?n:p[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?n.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?n.Location:o[a].Location}}g.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 f=this._getService(c),j=this._getService(b);if(f===j)return e(f,"moveFile",arguments);var g=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var i=c;g&&(i=i.substring(0,i.length-1));h+=i.substring(i.lastIndexOf("/")+1)}g&&h[h.length-1]!=="/"&&(h+="/");return d(f,c,j,h).then(function(){return e(f,"deleteFile",[c])})},copyFile:function(c,b,a){var f=this._getService(c),j=this._getService(b);if(f===j)return e(f,"copyFile",arguments);
var g=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var i=c;g&&(i=i.substring(0,i.length-1));h+=i.substring(i.lastIndexOf("/")+1)}g&&h[h.length-1]!=="/"&&(h+="/");return d(f,c,j,h)},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)}};g.prototype.constructor=g;return{FileClient:g}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/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/ThemePreferences,orion/widgets/themes/container/ThemeData,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,orion/widgets/input/DropDownMenu,orion/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(h,
i,f,e,d,g,c,b,a,k,j,l,m,p,r,o,n,q,s,y,B,w,A,v,z,x,E,u,D,I,G,M,T){function U(a,b){if(a.getLabel)return a.getLabel();else{var c=new w;c.resolve(b.properties.name);return c}}function J(a){l.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 t(a,b){var c=a.getServiceReferences("orion.core.auth");O=[];for(var d=L.createMenuGenerator.apply(this,arguments),e=0;e<c.length;e++){var j=
c[e],f=a.getService(j);U(f,j).then(function(a){f.getKey().then(function(b){O.push(b);f.getUser().then(function(c){d.addUserItem(b,f,a,c)},function(c,e){d.addUserItem(b,f,a,e)});window.addEventListener("storage",function(){C[b]!==localStorage.getItem(b)&&(C[b]=localStorage.getItem(b),f.getUser().then(function(c){d.addUserItem(b,f,a,c)},function(){d.addUserItem(b,f,a)}))},!1)})})}}function Q(a,c,d,e,j){var f=arguments,h,k=a&&a.getServiceReferences("orion.page.link.related");k&&k.length!==0&&w.when(function(){if(h)return h;
var b=a.getService("orion.core.contenttypes");b||(b=new n.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var l;if(L.beforeGenerateRelatedLinks.apply(this,f)){for(var i=[],m=0;m<k.length;m++){var p={},C,r=k[m].getPropertyKeys();for(C=0;C<r.length;C++)p[r[C]]=k[m].getProperty(r[C]);if(p.id){var q=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(c)){var b=new g.CommandInvocation(c,c,null,a,e);L.addRelatedLinkCommand(a,
b)}else typeof j==="function"&&(l||(l=j()),w.when(l,function(b){b&&c===P&&(!a.visibleWhen||a.visibleWhen(b))&&L.addRelatedLinkCommand(a,new g.CommandInvocation(b,b,null,a,e))}))},n=null;C=null;if(d.indexOf(p.id)<0)if((p.nls&&p.nameKey||p.name)&&p.uriTemplate)C=b._createCommandOptions(p,k[m],a,h,!0),i.push(C),C.then(function(a){a=new g.Command(a);q(a)});else{if(!n&&(n=e.findCommand(p.id))){q(n);continue}if(!n){var o=a.getServiceReferences("orion.navigate.command");for(C=0;C<o.length;C++)if(o[C].getProperty("id")===
p.id){for(var p={},r=o[C].getPropertyKeys(),u=0;u<r.length;u++)p[r[u]]=o[C].getProperty(r[u]);C=b._createCommandOptions(p,o[C],a,h,!0);i.push(C);C.then(function(a){n=new g.Command(a);q(n)});break}}}}}w.all(i,function(a){return a}).then(function(){L.afterGenerateRelatedLinks.apply(this,f)})}})}function N(a){var b=l.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function K(a){var b={},c=null;typeof a==="string"&&(a=l.node(a));a||(a=l.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=l.$(".slideParameters",c),b.parameterArea=l.$(".parameters",c),b.dismissArea=l.$(".parametersDismiss",c),b.notifications=l.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=l.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=l.bounds(c),b.toolbarTargetY=a.height+1;return b}function F(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=
0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(c=l.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=l.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var d=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),C={},L={createMenuGenerator:M.createMenuGenerator||
function(a,b){if(l.node("userMenu")){var c=l.node("userDropdown"),d=new p.Dropdown({dropdown:c}),c=new A.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),d=l.node("userTrigger");new r.Tooltip({node:d,text:h.Options,position:["below","left"]});var d=document.getElementById("userTrigger"),e=d.className;e+=" imageSprite core-sprite-silhouette";d.className=e;c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:M.beforeGenerateRelatedLinks||function(){var a=l.node("relatedLinks");l.empty(a);
return!0},addRelatedLinkCommand:M.addRelatedLinkCommand||function(a,b){var c=l.node("relatedLinks");g.createCommandMenuItem(c,a,b).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:M.afterGenerateRelatedLinks||function(){},afterSetPageTarget:M.afterSetPageTarget||function(){},generateNavigationMenu:M.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new r.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new D("centralNavigation",{label:"Develop",
icon:"commandSprite core-sprite-hamburger"}),b=new I;a.addContent(b.getContentPane())},afterGenerateBanner:M.afterGenerateBanner||function(){}},O=[],P,R=[],H,S=null;return{addSettings:function(a){(new D("settingsTab",{label:"Develop",icon:"imageSprite core-sprite-wrench"},!1)).updateContent=a.updateContent.bind(a)},generateBanner:function(b,d,j,k,p,C,r){function n(){this.create();this._filterString=""}function q(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=l.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new y.ThemePreferences(k,new B.ThemeData)).apply();var s=l.node(b);if(!s)throw h["could not find banner parent, id was "]+b;var D=document.createRange();D.selectNode(s);D=D.createContextualFragment(x);l.processTextNodes(D,h);s.firstChild?s.insertBefore(D,s.firstChild):s.appendChild(D);s=l.node("home");s.href=i.toUrl("navigate/table.html");s.setAttribute("aria-label",
h["Orion Home"]);l.node("progressPane").src=i.toUrl("images/none.png");if(s=l.node("pageToolbar"))s.classList.add("toolbarLayout"),s.innerHTML=u+f.slideoutHTMLFragment("mainToolbar");(s=l.node("closeNotifications"))&&s.setAttribute("aria-label",h["Close notification"]);if(s=l.node("footer"))s.innerHTML=E,l.processTextNodes(s,h);j.setParameterCollector(new c.CommandParameterCollector(K,F));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&
a.setProgressMessage("")},!1);L.generateNavigationMenu.apply(this,arguments);var w=l.node("navigationlinks");w&&v.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){var b=document.createElement("li");b.appendChild(a);w.appendChild(b)})});if(s=l.$(".split")){var D=l.$(".sidePanelLayout"),I=l.$(".mainPanelLayout");if(D&&I)S={side:D,main:I},S.splitter=new m.Splitter({node:s,sidePanel:D,mainPanel:I,toggle:!0,closeByDefault:s.style&&s.style.left==="0%"}),s=new g.Command({name:h["Toggle side panel"],
tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){S.splitter.toggleSidePanel()}}),j.addCommand(s),j.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new e.KeyBinding("o",!0)),r&&S.splitter.addResizeListener(function(a){r&&a===I&&(a=r.getTextView())&&a.resize()})}s=new g.Command({name:h["Make Favorite"],tooltip:h["Add to the favorites list"],imageClass:"core-sprite-favorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?
a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=d.getService("orion.core.favorite"),c=d.getService("orion.page.progress"),e=function(a){return function(e){e?d.getService("orion.page.message").setMessage(a.Name+h[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},j=0;j<a.length;j++){var f=a[j];c.progress(b.hasFavorite(f.ChildrenLocation||f.Location),
"Checking favorite "+f.Name).then(e(f))}}});j.addCommand(s);var O=!1,R=function(a,b,c){if(!O){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new o.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var j=new z.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,favoriteService:d,onHide:function(){O=!1;c&&c.getTextView()&&c.getTextView().focus()}});window.setTimeout(function(){O=!0;j.show()},0)}},s=new g.Command({name:h["Find File Named..."],
tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){R(p,d,r)}});j.addCommand(s);j.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new e.KeyBinding("f",!0,!0));s=new g.Command({name:h["Toggle banner and footer"],tooltip:h["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=l.node("banner"),b=l.node("footer"),c=l.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility=
"visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized")):(a.style.visibility="hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"));r&&r.getTextView()&&r.getTextView().resize();return!0}});j.addCommand(s);j.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.KeyBinding("m",!0,!0));s=new g.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});
j.addCommand(s);j.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.KeyBinding(112,!0,!0));s=new g.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});j.addCommand(s);j.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.KeyBinding("o",!0,!0));n.prototype={create:function(){var a=this._keyAssistDiv=
document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");a.setAttribute("role","menu");var b=this._keyAssistInput=document.createElement("input");b.classList.add("keyAssistInput");b.type="text";b.placeholder=h["Filter bindings"];a.appendChild(b);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(G.isIOS||G.isAndroid)c.style.overflowY="auto";a.appendChild(c);var d=this._keyAssistTable=document.createElement("table");
d.tabIndex=0;d.classList.add("keyAssistList");c.appendChild(d);document.body.appendChild(a);b.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("input",function(){this.filterChanged()}.bind(this));c.addEventListener(G.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&this.hide()}.bind(this));
l.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){l.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(r&&r.getTextView()){var b=r.getTextView(),c=b.getActions(!0).filter(function(a){return(a=b.getActionDescription(a))&&a.name});c.sort(function(a,c){return b.getActionDescription(a).name.localeCompare(b.getActionDescription(c).name)});this.createHeader(h.Editor);for(var d=function(a){return function(){b.focus();
return b.invokeAction(a)}},e={},f,g=0;g<c.length;g++)for(var k=c[g],i=b.getActionDescription(k),m=b.getKeyBindings(k),p=0;p<m.length;p++){f=m[p];var C=a.getUserKeyString(f);f.scopeName?(e[f.scopeName]||(e[f.scopeName]=[]),e[f.scopeName].push({bindingString:C,name:i.name,execute:d(k)})):this.createItem(C,i.name,d(k))}for(var n in e)if(e[n].length){this.createHeader(n);for(c=0;c<e[n].length;c++)f=e[n][c],this.createItem(f.bindingString,f.name,f.execute)}}this.createHeader(h.Global);j.showKeyBindings(this)},
createItem:function(a,b,c){if(this._filterString){var d=this._filterString.toLowerCase(),e;d!==this._filterString?(d=this._filterString,e=function(a){return a}):e=function(a){return a.toLowerCase()};if(e(b).indexOf(d)===-1&&e(a).indexOf(d)===-1&&e(this._lastHeader).indexOf(d)===-1)return}var j=this._keyAssistTable.insertRow(-1);j.id="keyAssist-keyBinding-"+this._idCount++;j.setAttribute("role","menuitem");j._execute=c;j.classList.add("keyAssistItem");j.addEventListener("click",function(a){this._selectedRow=
j;this.execute();a.preventDefault()}.bind(this));c=j.insertCell(-1);c.classList.add("keyAssistName");c.appendChild(document.createTextNode(b));c=j.insertCell(-1);c.classList.add("keyAssistAccel");c.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var b=this._keyAssistTable.insertRow(-1);b.classList.add("keyAssistSection");var b=b.insertCell(-1),c=document.createElement("h2");c.appendChild(document.createTextNode(a));b.appendChild(c)},execute:function(){window.setTimeout(function(){this.hide();
var a=this._selectedRow;this._selectedRow=null;a&&a._execute&&a._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var a=this._keyAssistInput.value;if(this._filterString!==a)this._filterString=a,this.createContents()}.bind(this),100)},hide:function(){var a=document.activeElement,b=this._keyAssistDiv,a=b===a||(b.compareDocumentPosition(a)&16)!==0;b.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==
1&&this._previousActiveElement.focus();this._previousActiveElement=null},isVisible:function(){return this._keyAssistDiv.style.display==="block"},select:function(a){var b=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(b.length===0)this._selectedIndex=-1;else{var c=this._selectedIndex;c+=a?1:-1;c%=b.length;c<0&&(c=b.length-1);if(this._selectedIndex!==-1)a=b[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=c;if(this._selectedIndex!==-1){this._selectedRow=
a=b[this._selectedIndex];a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var b=a.getBoundingClientRect(),d=this._keyAssistContents,e=d.getBoundingClientRect();a.offsetTop<d.scrollTop?c===0?d.scrollTop=0:a.scrollIntoView(!0):b.bottom>e.bottom&&a.scrollIntoView(!1)}}},show:function(){this._previousActiveElement=document.activeElement;this.createContents();this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*
0.75)+"px";this._keyAssistDiv.style.display="block";this._keyAssistInput.value=this._filterString;this._keyAssistInput.focus();this._keyAssistInput.select()},_keyDown:function(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var b=0,b=G.isIE||G.isOpera?-a.wheelDelta:G.isFirefox?a.detail*40:-a.wheelDeltaY,c=this._keyAssistContents,d=c.scrollTop;c.scrollTop+=b;if(d!==c.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var P=new n,H=new g.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){P.isVisible()?P.hide():P.show();return!0}});j.addCommand(H);j.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.KeyBinding(191,!1,!0));s=function(){r.getTextView().setKeyBinding(new e.KeyBinding(191,!1,!0,!G.isMac,G.isMac),H.id);r.getTextView().setAction(H.id,H.callback,H)};r&&(r.getTextView()?
s():r.addEventListener("TextViewInstalled",s));N(j);t(d,H.callback);J(d);window.addEventListener("hashchange",function(){j.processURL(window.location.href)},!1);window.setTimeout(function(){q(d)},0);L.afterGenerateBanner.apply(this,arguments)},getToolbarElements:K,getMainSplitter:function(){return S},layoutToolbarElements:F,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&
(c=d?d+" ":"",c+=a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,P=a.target,Q(e,a.target,R,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name,Q(e,{NoTarget:""},R,a.commandService,a.makeAlternate));(H=a.title)||(H=b?b+" - "+a.task:a.task);window.document.title=H;L.afterSetPageTarget.apply(this,arguments);if(b=l.node("location")){l.empty(b);var f=e&&new T.FileClient(e),e=a.breadcrumbTarget||a.target,f=f&&e&&e.Location?f.fileServiceRootURL(e.Location):
null;new j.BreadCrumbs({container:b,resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:f,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(H)H.charAt(0)==="*"&&!a&&(H=H.substring(1)),a&&H.charAt(0)!=="*"&&(H="*"+H),window.document.title=H;var b=l.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){R=a},notifyAuthenticationSite:d}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(i){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,e=f.exec(i),d=[],g=0;e;){if(e.length===3&&e[2].length>0){var c=new URL(e[2]);c.protocol!==":"&&h.validateURLScheme(c.href)&&(e.index>g&&d.push({segmentStr:i.substring(g,e.index)}),d.push({segmentStr:e[1].length>0?e[1]:e[2],urlStr:e[2]}),g=e.index+e[0].length)}e=f.exec(i)}if(g===0)return null;g<i.length-1&&d.push({segmentStr:i.substring(g)});return d},processURLSegments:function(h,
f){f.forEach(function(e){if(e.urlStr){var d=document.createElement("a");d.href=e.urlStr;d.appendChild(document.createTextNode(e.segmentStr))}else d=document.createElement("span"),d.textContent=e.segmentStr;h.appendChild(d)})}}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands","orion/PageUtil","orion/urlUtils"],function(h,i,f,e,d){function g(b,a,c,d,e){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=a;this.notificationContainerDomId=e;this.domId=c;this.progressDomId=d||c;this._hookedClose=!1;this._timer=null}var c;g.prototype={_init:function(){var b=i.node("closeNotifications");if(b&&!this._hookedClose)this._hookedClose=!0,
b.addEventListener("click",function(){window.clearTimeout(this._timer);this.setProgressMessage("")}.bind(this))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,a,c){this._init();this.currentMessage=b;var d=i.node(this.domId);if(typeof c==="boolean"){var e=d.getAttribute("aria-live");d.setAttribute("aria-live",c?"polite":"off");window.setTimeout(function(){b===
this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode(b)),window.setTimeout(function(){d.setAttribute("aria-live",e)},100))}.bind(this),100)}else i.empty(d),d.appendChild(document.createTextNode(b));typeof a==="number"&&window.setTimeout(function(){b===this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),a)},setErrorMessage:function(b){this.currentMessage=b;this._init();var a=b.responseText||b.message||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(c){}var b=
a.Message||a,d="red";if(a.Severity)switch(a.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}a=document.createElement("span");a.style.color=d;a.appendChild(document.createTextNode(b));b=i.node(this.domId);i.empty(b);b.appendChild(a)},setProgressMessage:function(b){this._init();this.currentMessage=b;var a=document.createElement("span");a.classList.add("imageSprite");a.classList.add("progressIcon");a.classList.add("core-sprite-progress");var c=i.node(this.progressDomId);
i.empty(c);c.appendChild(a);c.appendChild(document.createTextNode(b));a=i.node(this.notificationContainerDomId);a.classList.remove("notificationHide");if(b&&b.length>0)a.classList.add("progressNormal"),a.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else a.classList.remove("notificationShow"),a.classList.add("notificationHide")},setProgressResult:function(b){this.currentMessage=b;var a=b.responseText||b;if(typeof a===
"string")try{a=JSON.parse(a)}catch(c){}this._init();var e=a.Message||a,f="core-sprite-information",g="progressInfo",h=document.createElement("span");h.classList.add("imageSprite");h.classList.add("progressIcon");b=[];if(a.Severity)switch(a.Severity){case "Warning":f="core-sprite-warning";g="progressWarning";b.push("progressInfo");b.push("progressError");b.push("progressNormal");break;case "Error":f="core-sprite-error";g="progressError";b.push("progressWarning");b.push("progressInfo");b.push("progressNormal");
break;default:b.push("progressWarning"),b.push("progressError"),b.push("progressNormal")}b.push("notificationHide");h.classList.add(f);var r=i.node(this.progressDomId),f=i.node(this.notificationContainerDomId);i.empty(r);r.appendChild(h);if(a.HTML)a=document.createElement("span"),a.innerHTML=e,r.appendChild(a);else{if(h=d.detectValidURL(e))e=document.createDocumentFragment(),d.processURLSegments(e,h),Array.prototype.forEach.call(i.$$("a",e),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&
a.Severity!=="Error")this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);e=document.createTextNode(e)}r.appendChild(e)}if(g&&this.progressDomId!==this.domId){f.classList.add(g);for(g=0;g<b.length;g++)f.classList.remove(b[g])}f.classList.add("notificationShow")},showWhile:function(b,a){var c=this;if(a){c.setProgressMessage(a);var d=function(){a===c.currentMessage&&c.setProgressMessage("")};b.then(d,d)}return b},
_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,a){return new c(this,++this._lastProgressId,b,a)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",a=!0,c;for(c in this._progressMonitors)this._progressMonitors[c].status&&(a||(b+=", "),b+=this._progressMonitors[c].status,a=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};g.prototype.constructor=g;c=function(b,a,c,d){this.statusService=b;this.progressId=a;if(c){this.deferred=c;this.begin(d);var e=this;c.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}};
c.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};c.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};c.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};c.prototype.constructor=c;return{StatusReportingService:g,ProgressMonitor:c}});
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,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,i,f,e){function d(){}d.prototype={_initialize:function(d,c,b,a,k){this._tooltip=new e.Tooltip({node:d,hideDelay:k||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&&f.processTextNodes(d,h);this.$parent.appendChild(d);var j=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&j.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=
f.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/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,i,f,e){var d={};(function(){var g=!1;d.updateNavTools=function(c,b,a,d,e,l){var i=f.node(d);if(i)b.destroy(i);else throw h["could not find toolbar "]+d;b.renderCommands(d,i,l,a,"button");if(e&&(d=f.node(e)))b.destroy(d),b.renderCommands(e,d,null,a,"button");g||(g=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var d=f.node(e);
d&&(b.destroy(d),b.renderCommands(e,d,c.selections,a,"button"))}))};d.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new 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(f);
f=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],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;return!0}});c.addCommand(f);
f=new 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 d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(f)}})();
return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,i,f,e,d){function g(c){this._options=c}g.prototype=new e.PopupDialog;g.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink" class="navlinkonpage">All Operations</a></td></tr></table><div id="operationsExist"><div style="padding-left: 7px" id="myOperationsListEmpty">No operations running on this page.</div><table id="myOperationsList" style="display: none;"></table></div><div style="padding-left: 7px" id="operationsDontExist">No operations running.</div>';g.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};g.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};g.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()};g.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};g.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};g.prototype._renderOperationsTable=function(c,b,a){f.empty(c);for(var d=0;d<b.length;d++){var e=b[d],g=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px";i.style.paddingRight="5px";i.textContent=e.Name;g.appendChild(i);var p=document.createElement("div");i.appendChild(p);i=document.createElement("span");i.style.paddingRight="5px";i.classList.add("imageSprite");switch(e.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",
h["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",h["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");i.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}p.appendChild(i);
i=document.createElement("span");i.classList.add("operationStatus");i.textContent=e.Name;p.appendChild(i);if(e.error){var r=e.error.Message||e.error;e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(r+=": "+e.error.DetailedMessage);i.textContent=r;i.classList.remove("operationStatus");i.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",p,{operation:e,deferred:a[d]},this,"tool");c.appendChild(g)}this._setOperationsVisibility()};g.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"};g.prototype.constructor=g;return{OperationsDialog:g}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,i,f,e,d){function g(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,commandRegistry: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,d){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}g.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 e="";for(d in c){var f=c[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=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}};
g.prototype.constructon=g;c.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new g(b,this._commandRegistry)},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var g=d._operations[e];if(a)g.Name=a;if(c)g.progressMonitor=c;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[b].progressMonitor)&&
a.done(),delete this._operations[b],delete this._operationDeferrds[b]}this._progressMonitorTool.generateOperationsInfo(this._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&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/dialogs",[],function(){function h(h){this._serviceRegistry=h;this._serviceRegistration=h.registerService("orion.page.dialog",this)}h.prototype={confirm:function(h,f){f(window.confirm(h))},openFiles:function(){}};h.prototype.constructor=h;return{DialogService:h}});
define("orion/ssh/sshTools",[],function(){var h=h||{};h.SshService=function(){function h(f){if(f)this._serviceRegistry=f,this._serviceRegistration=f.registerService("orion.net.ssh",this)}h.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(f,e){e||(e="");var d=localStorage.getItem(e+this._KNOWN_HOSTS);d?d.indexOf(f)<0&&localStorage.setItem(e+this._KNOWN_HOSTS,d+"\n"+f):localStorage.setItem(e+this._KNOWN_HOSTS,f)},clearKnownhosts:function(f){f||(f="");localStorage.removeItem(f+this._KNOWN_HOSTS)},
getKnownHosts:function(f){f||(f="");return localStorage.getItem(f+this._KNOWN_HOSTS)}};return h}();return h});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(h,i,f,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 i=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(i.id);if(a!==void 0)i.hidden=!a;if(!i.hidden)i._contentParent.style.display="block";i._updateExpandedState(!i.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function g(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 g(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;g.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)}};g.prototype.constructor=g;return{Section:d}});
define("orion/tasks",["i18n!orion/nls/messages","require","orion/webui/littlelib","orion/section","orion/commandRegistry"],function(h,i,f,e){function d(d){var c=f.node(d.parent);if(!c)throw h["no parent"];if(!d.serviceRegistry)throw h["no service registry"];this._parent=c;this._registry=d.serviceRegistry;this._description=d.description;this._tasks=d.tasks;this._title=d.title||h.Tasks;this._collapsed=d.collapsed;this._id=d.id||this._parent.id+"taskList";this._contentId=this._parent.id+"taskContent";
this._item=d.item;this._handler=d.handler;this._commandService=d.commandService;this._descriptionProperty=d.descriptionProperty;this.renderTasks()}d.prototype={renderTasks:function(){if(!this._taskSection){var d="taskListContent"+this._title,c=document.createElement("div");c.id=d;this._taskSection=new e.Section(this._parent,{id:this._id,title:this._title,content:c,preferenceService:this._registry.getService("orion.core.preference"),canHide:!0,hidden:this._collapsed,useAuxStyle:!0});this._description&&
(d=document.createElement("p"),d.appendChild(document.createTextNode(this._description)),c.appendChild(d));d=document.createElement("table");d.role="presentation";c.appendChild(d);for(c=0;c<this._tasks.length;c++){var b=document.createElement("tr");d.appendChild(b);var a=document.createElement("td");b.appendChild(a);this._commandService.registerCommandContribution("task"+c,this._tasks[c].commandId,1);this._commandService.renderCommands("task"+c,a,this._item,this._handler,"button");a.childNodes.length>
0&&a.childNodes[0].classList.add("taskTitle");a=document.createElement("td");b.appendChild(a);a.classList.add("taskDescription");(b=this._commandService.findCommand(this._tasks[c].commandId))&&a.appendChild(document.createTextNode(this._descriptionProperty?b[this._descriptionProperty]:b.tooltip))}}}};d.prototype.constructor=d;return{TaskList:d}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function f(e){this._init(e)}f.prototype={_init:function(e){var d=e.parent,f=this,d=i.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){i.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&
this._renderer.wrapperCallback(f);var c=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(c);c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(e,d);c.appendChild(this._bodyElement);f.appendChild(c);
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]);this._renderer.rowCallback&&this._renderer.rowCallback(b);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=i.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=i.node(e);return d&&d._item?d._item:e},toggle:function(e){var d=i.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=i.node(e))?e._expanded:!1},expand:function(e,d,f){var e=typeof e==="string"?e:this._treeModel.getId(e),c=i.node(e);
if(c&&!c._expanded){c._expanded=!0;var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){b._generateChildren(a,c._depth+1,c);b._rowsChanged();d&&d.apply(b,f)})}},_removeChildRows:function(e){for(var d=e===this._id,f=!1,c=-1,b=[],a=i.$$array(".treeTableRow",this._parent),h=0;h<a.length;h++){var j=a[h];if(f)break;if(d)j._depth>c?b.push(j):f=!0;else if(j.id===e)d=!0,c=j._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=i.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)}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(f,e){this.firstLevelChildren=f;this.reset();this._init(e)}h.prototype={_init:function(f){if(f)this.isExpanded=f.isExpanded,this.isExpandable=f.isExpandable,this.forceExpandFunc=f.forceExpandFunc,this.getChildrenFunc=f.getChildrenFunc},topLevel:function(f){return f.parent?f.parent===this.root:!0},_getChildren:function(f){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(f):f?f.children:
null},_expanded:function(f){if(!f)return!0;var e=this._getChildren(f),e=e&&e.length>0;this.isExpanded&&e&&(e=this.isExpanded(f));return e},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(this.setCursor(this._getChildren(f)[0]),this.cursor()):null},_drillToLast:function(f){return this._expanded(f)?(f=this._getChildren(f),this._drillToLast(f[f.length-1])):f},_forward:function(f){if(!this._cursor)return null;var e=this._diveIn(this._cursor);
if(!e){if(f&&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(f){if(!this._cursor)return null;var e=this._findSibling(this._cursor,!1);e&&e!==this._cursor.parent&&(e=this._drillToLast(e));if(f&&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(f,e){for(var d=this.topLevel(f),g=this._getChildren(f.parent),g=d?this.firstLevelChildren:g,c=0;c<g.length;c++)if(g[c]===f)return c===0&&!e?d?null:f.parent:c===g.length-1&&e?d?null:this._findSibling(f.parent,e):e?g[c+1]:g[c-1];return null},_inParentChain:function(f,e){for(var d=f.parent;d;){if(d===e)return!0;d=d.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,e,d){this.setCursor(e);var g=[];for(g.push(e);;){if(this.iterate(f))g.push(this.cursor());else break;if(d===this.cursor())return g}return null},setCursor:function(f){this._prevCursor=this._cursor;this._cursor=f},setTree:function(f){this.firstLevelChildren=f;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(f,e){var d=this.cursor(),
g=this._scan(!0,f,e);g||(g=this._scan(!1,f,e));this.setCursor(d);return g},iterate:function(f,e){return f?this._forward(e):this._backward(e)},iterateOnTop:function(f,e){var d=this._findSibling(this._getTopLevelParent(this.cursor()),f);d?this.setCursor(d):e&&this.firstLevelChildren.length>0&&this.setCursor(f?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(f){if(!this._cursor)return null;return this._inParentChain(this._cursor,f)?(this.setCursor(f),
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,i,f){var h={},e=navigator.userAgent.indexOf("iPad")!==-1,d=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function g(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 f.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:a.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return e.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();c=function(a){if(a.target===d){if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,
e._modelIterator.cursor()))return!0;if(a.keyCode===i.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return e.onEnter(a)}};d.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,
!1)};d.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};d.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=d}g.prototype={_init:function(c){this._linearGridMove=!1;if(c)this._selectionPolicy=c.selectionPolicy,this.gridClickSelectionPolicy=c.gridClickSelectionPolicy||"none",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):i.node(this.explorer._parentId)},
isExpandable:function(c){return!c?!1:i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)))?!0:!1},isExpanded:function(c){return!c?!1:this.explorer.myTree.isExpanded(this.model.getId(c))},refreshSelection:function(c){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){b._clearSelection();for(var d=0;d<a.length;d++)b._selections.push(a[d]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,c)})},refreshModel:function(c,b,a,d){this._currentColumn=
0;this.topIterationNodes=[];this.model=b;this._navDict=c;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(c){for(var c=this.model.getId(c),b=0;b<this._selections.length;b++)if(c===this.model.getId(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},getAriaContainerElement:function(c){for(var b=
this._parentDiv,a;c&&c!==b&&(a=c.getAttribute("role"))!=="grid"&&a!=="tree"&&a!=="treegrid";)c=c.parentNode;return c===b?null:c},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&&(a=this.getAriaContainerElement(d.domNode),b?(d.domNode.classList.add("treeIterationCursor"),a&&a.setAttribute("aria-activedescendant",d.domNode.id)):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:i.node(c)},iterate:function(c,
b,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(c,b)&&(this.cursorOn(null,!1,c),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(c,b){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(c);if(a){var d=i.node(this.explorer.renderer.getCheckBoxId(a.id)),e=b?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(a,d,e,!0)}}else this._select(c,b)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(c){return(c=i.node(c))?i.bounds(c).height:0},_visible:function(c){if(c.offsetWidth===0||c.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var a=this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var b=a.top>b?a.top:
b,a=a.bottom<d?a.bottom:d,c=c.getClientRects(),d=0,e=c.length;d<e;d++){var 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=i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));
if(b.target!==a&&!(this.gridClickSelectionPolicy==="none"&&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 g}();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/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(h,i,f,e,d,g){var c={};c.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;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=f.node(b+"placeHolderRow");a=f.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return f.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){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=f.node(g);h&&f.empty(h);if(b)b.rootId=g;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:g,
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,navHandlerFactory:c?c.navHandlerFactory: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=
a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler==="function"?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new d.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,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 g.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 g.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;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;f.empty(a);this._treeTableClass&&
a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return f},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){a=window.sessionStorage[a+"selection"];typeof a==="string"&&(a=a.length>0?JSON.parse(a):null);var b;if(a&&this.explorer.getNavDict()){var c=[];for(b=0;b<a.length;b++){var d=this.explorer.getNavDict().getValue(a[b]);if(d&&d.rowDomNode&&
d.model&&(c.push(d.model),this._highlightSelection&&d.rowDomNode.classList.add("checkedRow"),d=f.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(f.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=f.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(){if(this.commandService)for(var a=
f.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=f.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._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);d>0&&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/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/webui/littlelib,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/contentTypes".split(","),function(h,i,f,e,d,g){function c(a,b,c,d,e,f,h){var o;if(b.Directory)o=document.createElement("a"),o.className="navlinkonpage",o.href=a+"#"+b.ChildrenLocation,o.appendChild(document.createTextNode(b.Name));else{e||(e=g.getOpenWithCommands(c));if(!f)for(a=0;a<e.length;a++)e[a].isEditor===
"default"&&(f=e[a]);o=document.createElement("a");o.className="navlink targetSelector";h&&typeof h==="object"&&Object.keys(h).forEach(function(a){o[a]=h[a]});o.appendChild(document.createTextNode(b.Name));for(var n=b.Location,q=!1,a=0;a<e.length;a++)if(c=e[a],c.visibleWhen(b)){n=c.hrefCallback({items:b});q=!0;break}i.when(d.getFileContentType(b),function(a){var c;if(c=!q)if(c=f){a:{switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":c=
!0;break a}c=!1}c=!c}c&&(n=f.hrefCallback({items:b}));c=o;var d=b.Location,e;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":e=document.createElement("img");e.src=d;e.classList.add("thumbnail");break;default:a&&a.image?(e=document.createElement("img"),e.src=a.image,e.classList.add("thumbnail")):(e=document.createElement("span"),e.className="core-sprite-file_model modelDecorationSprite")}c.firstChild?c.insertBefore(e,c.firstChild):
c.appendChild(e);o.href=n})}return o}function b(a,b,c,d){this.explorer=b;this.commandService=c;this.contentTypeService=d;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}b.prototype=new e.SelectionRenderer;b.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};b.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};b.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};
b.prototype.getCellHeaderElement=function(a){if(this.oneColumn&&a!==0)return null;switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};b.prototype.setTarget=function(a){this.target=a};b.prototype.createFolderNode=function(a){var b;this.showFolderLinks?b=c(this.folderLink||"",a,this.commandService,this.contentTypeService):(b=document.createElement("span"),b.textContent=a.Name);return b};b.prototype.showFolderLinks=!0;b.prototype.getCellElement=function(a,b,e){switch(a){case 0:var a=
document.createElement("td"),f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var h;if(b.Directory)this.getExpandImage(e,f),h=this.createFolderNode(b),f.appendChild(h),this.explorer._makeDropTarget(b,h),this.explorer._makeDropTarget(b,e);else{if(!this.openWithCommands){this.openWithCommands=g.getOpenWithCommands(this.commandService);for(h=0;h<this.openWithCommands.length;h++)if(this.openWithCommands[h].isEditor===
"default")this.defaultEditor=this.openWithCommands[h]}h=c("",b,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,{target:this.target});f.appendChild(h)}if(h)h.id=e.id+"NameLink",h.nodeType===1&&(d.addNavGrid(this.explorer.getNavDict(),b,h),h.setAttribute("role","link"),h.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,b,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");
if(b.LocalTimeStamp)e.textContent=(new Date(b.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!b.Directory&&typeof b.Length==="number")b=parseInt(b.Length,10)/1024,e.textContent=Math.ceil(b).toLocaleString()+" KB";e.style.textAlign="right";return e}};b.prototype.constructor=b;return{NavigatorRenderer:b,createLink:c}});
define("orion/navoutliner","i18n!orion/navigate/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/commands,orion/commandRegistry,orion/keyBinding,orion/section,orion/selection,orion/explorers/explorer,orion/explorers/navigatorRenderer,orion/explorers/navigationUtils".split(","),function(h,i,f,e,d,g,c,b,a,k,j,l){function m(a,b){this.explorer=b;this._init(a)}function p(a,b,c){this.selection=b;this.registry=a;this.renderer=new m({checkbox:!1},this);this.renderer.commandService=c;this.renderer.contentTypeService=
a.getService("orion.core.contenttypes")}function r(a){var b=f.node(a.parent);if(!b)throw"no parent";if(!a.serviceRegistry)throw"no service registry";this._parent=b;this._registry=a.serviceRegistry;this.commandService=a.commandService;this.render()}m.prototype=k.SelectionRenderer.prototype;m.prototype.constructor=m;m.prototype.getLabelColumnIndex=function(){return 0};m.prototype.getCellElement=function(a,b,c){var d,e,f,g,a=document.createElement("td");c.appendChild(a);a.classList.add("mainNavColumn");
a.classList.add("singleNavColumn");b.directory?g=j.createLink(i.toUrl("navigate/table.html"),{Name:b.name,ChildrenLocation:b.path,Directory:!0},this.commandService,this.contentTypeService):b.path?g=j.createLink("",{Name:b.name,Location:b.path},this.commandService,this.contentTypeService):typeof b.getProperty==="function"&&b.getProperty("Name")&&b.getProperty("top")?(d=i.toUrl("navigate/table.html")+"#"+b.getProperty("top"),e="navlinkonpage",f=b.getProperty("Name")):(d="",f=h["Unknown item"]);d===
"#"&&(d="");if(!g)g=document.createElement("a"),g.href=d,g.className=e,g.appendChild(document.createTextNode(f));a.appendChild(g);l.addNavGrid(this.explorer.getNavDict(),b,g)};p.prototype=k.Explorer.prototype;p.prototype.constructor=p;r.prototype={render:function(){var a=this._registry,c=this.commandService,d=this;if(a){var e=a.getServiceReferences("orion.core.file");if(e.length>1){if(!this.fileSystemsSection)this.fileSystemsSection=new b.Section(this._parent,{id:"fileSystemsSection",title:"Places",
content:'<div id="fileSystemsContent"></div>',preferenceService:a.getService("orion.core.preference"),canHide:!0,useAuxStyle:!0,slideout:!0,onExpandCollapse:function(a,b){c.destroy(b.selectionNode);a&&c.renderCommands(b.selectionNode.id,b.selectionNode,null,d,"button")}});this.explorer=new p(a,this.fileSystemSelection);this.fileSystemsTable=this.explorer.createTree("fileSystemsContent",new k.SimpleFlatModel(e,"fs",function(a){return typeof a.getProperty==="function"&&a.getProperty("top")?a.getProperty("top"):
""}))}}}};r.prototype.constructor=r;return{NavigationOutliner:r}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","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","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.","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","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< 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","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"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","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search",
"Open in Search page for this directory":"Open in Search page for this directory","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term"});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=h[e])});return f});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler,orion/explorers/navigatorRenderer,orion/extensionCommands,orion/Deferred".split(","),function(h,i,f,e,d,g,c,b,a){function k(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function j(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new k(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}k.prototype.makeRenderFunction=function(d,g,j,k,o){var n=this.serviceRegistry,q=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(n,d,q);var s=this;return function(b,n,w){a.when(s.openWithCommands,function(a){if(w)f.empty(g),a=document.createElement("div"),a.appendChild(document.createTextNode(h["Search failed."])),g.appendChild(a),typeof k==="function"&&k(g);else{var s=
function(){function a(b,c){var d=c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),z=!1;f.empty(g);if(b&&b.length>0){var x=document.createElement("table");x.setAttribute("role","presentation");for(var E=0;E<b.length;E++){var u=
b[E],D;if(!z&&(z=!0,j))D=x.insertRow(0).insertCell(0),D.textContent=j;D=x.insertRow(-1).insertCell(0);D.colspan=2;o&&o(D);var I={Name:u.name,Directory:u.directory,Location:u.path||u.location},I=c.createLink(i.toUrl("navigate/table.html"),I,q,d,a,null,{"aria-describedby":(u.folderName?u.folderName:u.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}});u.LineNumber&&I.appendChild(document.createTextNode(" (Line "+u.LineNumber+")"));D.appendChild(I);s(D,u)}g.appendChild(x);typeof k===
"function"&&k(g)}!z&&n&&(a=e.formatMessage(h["No matches found for ${0}"],n),f.empty(g),g.appendChild(document.createTextNode(a)),typeof k==="function"&&k(g))}})}};j.prototype={search:function(a,b,c){var e=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var e=a.response.docs[c];b.push({name:e.Name,path:e.Location,folderName:d.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return b};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,
function(a){c(e(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var d=a.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(e(b),d)},function(a){c(null,null,a)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(a){c(e(a),null)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new g.SearchCrawler(this.registry,this._fileService,
a,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(e(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);f.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>
0?d=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(d=a);if(d)this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;d=f.node("search");c||(c="");if(d&&d.placeholder){d.value="";var g=e.formatMessage(h["Search ${0}"],c);d.placeholder=g.length>30?g.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(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?
this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};j.prototype.constructor=j;return{Searcher:j}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,i){function f(c,b,a){return c[b].apply(c,a)}function e(c){this._location=c}function d(){var c=new i;c.reject(h["No Matching OperationService for location:"]+this._location);return c}function g(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;g.prototype={getOperations:function(){var c=
new i;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return f(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new i;c[a]=e.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return i.all(c)},removeOperation:function(c){var b=this;return f(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})}};g.prototype.constructor=g;return{OperationsClient:g}});
define("orion/compare/compareUtils",["orion/URITemplate"],function(h){var i=i||{};i.compareUtils=i.compareUtils||{};i.compareUtils.lookUpMapper=function(f,e,d){for(var g=0,c=0;c<f.length;c++){var b=f[c][e];b===0&&(b=1);if(d>=g&&d<g+b)return{mapperIndex:c,startFrom:g};if(c===f.length-1)break;g+=f[c][e]}return{mapperIndex:f.length-1,startFrom:g}};i.compareUtils.lookUpLineIndex=function(f,e,d){if(d===0)return 0;for(var g=0,c=0;c<d;c++)g+=f[c][e];return g};i.compareUtils.updateMapper=function(f,e,d,g,
c){if(g!==c&&(g>0||c>0)){var b=i.compareUtils.lookUpMapper(f,e,d);if(!(b.mapperIndex<0)){if(g>0)for(var a=d-b.startFrom,d=b.mapperIndex;d<f.length;d++){a=f[d][e]-a;if(g<=a){f[d][e]-=g;break}f[d][e]-=a;g-=a;a=0}c>0&&(f[b.mapperIndex][e]+=c)}}};i.compareUtils.overlapMapper=function(f,e,d,g,c){f=d+f[e]-1;f<d&&(f=d);c<g&&(c=g);return f<g||c<d?!1:!0};i.compareUtils.findFirstDiff=function(f,e,d,g){for(var c=0,b=null,a=0;a<f.length;a++){if(c>g)break;if(i.compareUtils.overlapMapper(f[a],e,c,d,g)&&(b={mapperIndex:a,
startFrom:c},f[a][2]!==0))break;c+=f[a][e]}return b};i.compareUtils.matchMapper=function(f,e,d,g){if(f.length===0)return d;var c=d+Math.round((g-d)/3),b=i.compareUtils.findFirstDiff(f,e,d,g),a=f[b.mapperIndex][e]===0?b.startFrom:b.startFrom+f[b.mapperIndex][e]-1,h=i.compareUtils.lookUpLineIndex(f,1-e,b.mapperIndex),j=b.startFrom-d;return f[b.mapperIndex][2]===0?h-j:c>=b.startFrom&&c<=a?h-Math.round((g-d)/3):c<b.startFrom?h-j:(f[b.mapperIndex][1-e]===0?h:h+f[b.mapperIndex][1-e]-1)-(a-d)};i.compareUtils.getMapperLineCount=
function(f){for(var e=0,d=0;d<f.length;d++)e+=Math.max(f[d][0],f[d][1]);return e};i.compareUtils.getAnnotationIndex=function(f,e){for(var d=0;d<f.length;d++)if(f[d][0]===e)return d;return-1};i.compareUtils.getAnnotationMapperIndex=function(f,e){return f[e][1]};i.compareUtils.getAnnotationIndexByMapper=function(f,e){for(var d=0;d<f.length;d++)if(f[d][1]===e)return{current:d,prev:d-1,next:d+1};return{current:-1,prev:-1,next:-1}};i.compareUtils.isMapperConflict=function(f,e){return e<0?!1:!f[e][3]?!1:
f[e][3]===1};i.compareUtils.mergeDiffBlocks=function(f,e,d,g,c,b){for(var a=0;a<e.length;a++){var h=e[a][0],j=d[e[a][1]];if(j[0]>0){for(var i="",m=0;m<j[0];m++)i=i+g[j[2]-1+m].substring(c)+b;j=f.getLineCount();h>=j&&(h=j-1);h=f.getLineStart(h);f.setText(i,h,h)}}};i.compareUtils.generateCompareHref=function(f,e){var d=require.toUrl("compare/compare.html");if(!e.conflict)e.conflict=void 0;if(!e.readonly)e.readonly=void 0;return(new h(d+"#{,resource,params*}")).expand({resource:f,params:e})};i.compareUtils.generateCompareTreeHref=
function(f,e){var d=require.toUrl("compare-tree/compare-tree.html");return(new h(d+"#{,resource,params*}")).expand({resource:f,params:e})};return i.compareUtils});
define("orion/explorers/explorer-table","i18n!orion/navigate/nls/messages,require,orion/Deferred,orion/webui/littlelib,orion/i18nUtil,orion/fileUtils,orion/explorers/explorer,orion/EventTarget".split(","),function(h,i,f,e,d,g,c,b){function a(a,b,c,d,e,f){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!f}function k(a){b.attach(this);this.registry=a.serviceRegistry;this.treeRoot=a.treeRoot;this.selection=a.selection;this.fileClient=a.fileClient;
this.excludeFiles=a.excludeFiles;this.excludeFolders=a.excludeFolders;this.navHandlerFactory=a.navHandlerFactory;this.parentId=a.parentId;this.renderer=a.rendererFactory(this);this.dragAndDrop=a.dragAndDrop;this.setFocus=a.setFocus;this.myTree=this.model=null;this._hookedDrag=this.checkbox=!1;var c=this.modelEventDispatcher=new b,d=this;"copy,copyMultiple,create,delete,deleteMultiple,import,move,moveMultiple".split(",").forEach(function(a){c.addEventListener(a,d.modelHandler[a].bind(d))});var e=this.renderer;
this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){e.setTarget(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self")}},{pid:"nav.config"})}a.prototype=new c.ExplorerModel;a.prototype.getRoot=function(a){a(this.root)};a.prototype.processParent=function(a,b){if(this.excludeFiles||this.excludeFolders){var c=[],d;for(d in b)if(!(b[d].Directory?this.excludeFolders:this.excludeFiles))c.push(b[d]),b[d].parent=a;b=c}else for(c in b)b[c].parent=
a;a.children=b;a.children.sort(function(a,b){var c=a.Directory;if(c!==b.Directory)return c?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0});return b};a.prototype.getChildren=function(a,b){var c=this;a.children?b(a.children):a.Directory!==void 0&&a.Directory===!1?b([]):a.Location?this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+a.Name).then(function(d){b(c.processParent(a,
d))}):b([])};a.prototype.hasChildren=function(){var a=!1;this.root.Children&&(a=this.root.Children.length>0);return a};a.prototype.constructor=a;k.prototype=Object.create(c.Explorer.prototype);k.prototype.modelHandler={copy:function(){},copyMultiple:function(a){var b=this,c={};a.items.forEach(function(a){a=a.newValue.Parents[0]||b.treeRoot;c[a.Location]=a});Object.keys(c).forEach(function(a){b.changedItem(c[a],!0)})},create:function(a){this.changedItem(a.parent,!0,a.newValue)},"delete":function(){},
deleteMultiple:function(a){var a=a.items,b=this,c;if(a.some(function(a){return a.oldValue.Location===b.treeRoot.Location?(c=a.parent,!0):!1}))this.loadResourceList(c);else{var d={};a.forEach(function(a){a=a.parent;d[a.Location]=a});Object.keys(d).forEach(function(a){b.changedItem(d[a],!0)})}},"import":function(a){this.changedItem(a.target,!0)},move:function(a){var b=a.oldValue,c=a.newValue,a=a.parent,d=this,e=null;if(a.Projects)if(d.treeRoot.Location===b.Location){var g=d.treeRoot,b=c.ChildrenLocation?
c:this.fileClient.read(c.ContentLocation,!0);f.when(b,function(a){d.dispatchEvent({type:"rootMoved",oldValue:g,newValue:a});d.loadResourceList(a)})}else e=d.isExpanded(b)&&b;else b.Directory&&(e=d.isExpanded(b)&&c);d.changedItem(a,!0);e&&d.changedItem(e,!0)},moveMultiple:function(){this.changedItem(this.treeRoot,!0)}};k.prototype._makeDropTarget=function(a,b,c){function f(a,b,c,e,j,i){b=b||"";if(a.isFile)g.isAtRoot(c.Location)?e.registry.getService("orion.page.message").setProgressResult({Severity:"Error",
Message:h["You cannot copy files directly into the workspace.  Create a folder first."]}):a.file(function(a){j(c,a,e,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(d.formatMessage(h["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var k=a.createReader(),l=function(c){k.readEntries(function(d){for(var g=0;g<d.length;g++)f(d[g],b+a.name+"/",c,e,j,i)})},m=e.registry.getService("orion.page.progress");g.isAtRoot(c.Location)?m.progress(i.createProject(c.ChildrenLocation,a.name),"Initializing project "+
a.name).then(function(a){e.loadResourceList(e.treeRoot.Path,!0);m.progress(i.read(a.ContentLocation,!0),"Loading project info "+a.name).then(function(a){l(a)})}):m.progress(i.createFolder(c.Location,a.name),"Creating folder "+a.name).then(function(a){e.changedItem(c,!0);l(a)})}}if(this.dragAndDrop){var i=this,k=this.dragAndDrop,n=function(a){b.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(c)this._oldDragLeave&&b.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=
n;b.addEventListener("dragleave",n,!1);n=function(a){if(a.dataTransfer.effectAllowed==="all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";b.classList.add("dragOver");e.stop(a)};if(c)this._oldDragEnter&&b.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=n;b.addEventListener("dragenter",n,!1);n=function(a){if(a.dataTransfer.effectAllowed==="all"||a.dataTransfer.effectAllowed==="uninitialized"||
a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";e.stop(a)};if(c&&!this._oldDragOver)b.addEventListener("dragover",n,!1),this._oldDragOver=n;n=function(c){b.classList.remove("dragOver");if(c.dataTransfer.items&&c.dataTransfer.items.length>0)for(var m=0;m<c.dataTransfer.items.length;m++){var n=null;typeof c.dataTransfer.items[m].getAsEntry==="function"?n=c.dataTransfer.items[m].getAsEntry():typeof c.dataTransfer.items[m].webkitGetAsEntry==="function"&&(n=c.dataTransfer.items[m].webkitGetAsEntry());
n&&f(n,null,a,i,k,i.fileClient)}else if(c.dataTransfer.files&&c.dataTransfer.files.length>0)for(m=0;m<c.dataTransfer.files.length;m++)n=c.dataTransfer.files[m],!n.length&&(!n.type||n.type==="")?i.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:d.formatMessage(h["Did not drop ${0}.  Folder drop is not supported in this browser."],n.name)}):g.isAtRoot(a.Location)?i.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:h["You cannot copy files directly into the workspace.  Create a folder first."]}):
k(a,n,i,n.name.indexOf(".zip")===n.name.length-4&&window.confirm(d.formatMessage(h["Unzip ${0}?"],n.name)));e.stop(c)};if(c)this._oldDrop&&b.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=n;b.addEventListener("drop",n,!1)}};k.prototype.changedItem=function(a,b){if(this.treeRoot&&this.treeRoot.Location===a.Location)return this.loadResourceList(this.treeRoot,b);var c=this;return this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+
a.Name).then(function(d){d=c.model.processParent(a,d);c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,d,b);return(new f).resolve(d)})};k.prototype.isExpanded=function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};k.prototype.getNameNode=function(a){if(a=this.model.getId(a))return e.node(a+"NameLink")};k.prototype.scopeUp=function(){};k.prototype.loadResourceList=function(a,b,c){a&&typeof a==="object"&&(a=a.ChildrenLocation||a.ContentLocation);a=g.makeRelative(a);if(!b&&a===
this._lastPath)return(new f).resolve(this.treeRoot);this._lastPath=a;var d=this;return b||a!==this.treeRoot.Path?this.load(this.fileClient.loadWorkspace(a),"Loading "+a).then(function(){d.treeRoot.Path=a;typeof c==="function"&&c();d.dispatchEvent({type:"rootChanged",root:d.treeRoot});return(new f).resolve(d.treeRoot)},function(a){d.treeRoot.Path=null;d.dispatchEvent({type:"rootChanged",root:d.treeRoot});return(new f).reject(a)}):(new f).resolve(d.treeRoot)};k.prototype.load=function(b,c,d){var g=
e.node(this.parentId),i=e.node("progress");if(!i)i=document.createElement("div"),i.id="progress",e.empty(g),g.appendChild(i);e.empty(i);var k=setTimeout(function(){e.empty(i);i.appendChild(document.createTextNode(c))},500),n=this;return f.when(b,function(b){n.treeRoot={};clearTimeout(k);for(var c in b)n.treeRoot[c]=b[c];n.model=new a(n.registry,n.treeRoot,n.fileClient,n.parentId,n.excludeFiles,n.excludeFolders);n.model.processParent(n.treeRoot,b.Children);if(n.dragAndDrop)n._hookedDrag?n._makeDropTarget(n.treeRoot,
g,!0):(b=(b=g&&("draggable"in g||"ondragstart"in g&&"ondrop"in g))&&!(!window.File||!window.FileList||!window.FileReader),n._hookedDrag=!0,b?n._makeDropTarget(n.treeRoot,g,!0):(n.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser.")));n.model.hasChildren()?n.createTree(n.parentId,n.model,{navHandlerFactory:n.navHandlerFactory,setFocus:typeof n.setFocus==="undefined"?!0:n.setFocus,selectionPolicy:n.renderer.selectionPolicy,onCollapse:function(a){if(n.getNavHandler())n.getNavHandler().onCollapse(a)}}):
(e.empty(g),b=document.createElement("div"),b.classList.add("noFile"),b.textContent=h.NoFile,c=document.createElement("span"),c.classList.add("core-sprite-addcontent"),c.classList.add("icon-inline"),c.classList.add("imageSprite"),e.processDOMNodes(b,[c]),g.appendChild(b));if(typeof d==="function")try{d()}catch(j){n.registry&&n.registry.getService("orion.page.message").setErrorMessage(j)}if(typeof n.onchange==="function")n.onchange(n.treeRoot);return(new f).resolve(n.treeRoot)},function(a){clearTimeout(k);
n.registry.getService("orion.page.message").setProgressResult(a);return(new f).reject(a)})};k.prototype.onchange=function(){};k.prototype.constructor=k;return{FileExplorer:k,FileModel:a}});
define("orion/webui/dialogs/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,orion/webui/littlelib,orion/webui/dialog,orion/fileUtils,orion/selection,orion/explorers/navigationUtils,orion/explorers/explorer,orion/explorers/explorer-table".split(","),function(h,i,f,e,d,g,c,b){function a(a,b){this.explorer=b;this._init(a)}function k(a){this._init(a)}a.prototype=new c.SelectionRenderer;a.prototype.constructor=a;a.prototype.getLabelColumnIndex=function(){return 0};a.prototype.getCellElement=
function(a,b,c){a=document.createElement("td");c.appendChild(a);var d=document.createElement("span");d.id=c.id+"navSpan";a.appendChild(d);d.className="mainNavColumn singleNavColumn";this.getExpandImage(c,d);d.appendChild(document.createTextNode(b.Name))};k.prototype=new f.Dialog;k.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
k.prototype._init=function(a){this.title=a.title||h["Choose a Folder"];this.modal=!0;this.buttons=[{text:h.OK,isDefault:!0,callback:this.done.bind(this)}];this.customFocus=!0;this._fileClient=a.fileClient;this._serviceRegistry=a.serviceRegistry;this._message=a.message||"";this._func=a.func;this._initialize()};k.prototype._bindToDom=function(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
k.prototype.loadFolderList=function(c){c=e.makeRelative(c);this.selection=new d.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new b.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this._serviceRegistry,fileClient:this._fileClient,parentId:"directoryTree",excludeFiles:!0,rendererFactory:function(b){return new a({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"},b)}});this.explorer.loadResourceList(c,!0,null)};k.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};k.prototype.constructor=k;return{DirectoryPrompterDialog:k}});
define("orion/webui/dialogs/SFTPConnectionDialog",["i18n!orion/widgets/nls/messages","orion/webui/littlelib","orion/webui/popupdialog","orion/webui/dialog"],function(h,i,f,e){function d(c,b){this.messages=h;this._initialize(c);this._notify=b}function g(c){this._init(c)}localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:h.name,items:[]}));d.prototype=new f.PopupDialog;d.prototype.TEMPLATE='<div><label for="sftpHost">${Remote host:}</label><input id="sftpHost" /></div><div><label for="sftpPort">${Port:}</label><input id="sftpPort" /></div><div><label for="sftpPath">${Remote path:}</label><input id="sftpPath" /></div><div><label for="sftpUser">${User name:}</label><input id="sftpUser" /></div><div class="layoutBlock layoutRight"><button id="addSftpConnection" class="dropdownTrigger orionButton commandButton">${Add}</button></div>';
d.prototype._bindToDom=function(){this.$addSftpConnection.addEventListener("click",function(){this._notify({name:this.$sftpUser.value+"@"+this.$sftpHost.value+":"+this.$sftpPort.value+this.$sftpPath.value});this.hide()}.bind(this),!1)};d.prototype.constructor=d;g.prototype=new e.Dialog;g.prototype.TEMPLATE='<div><div><label for="sftpPath">${Location:}</label></div><div><select id="sftpConnectionList" name="sftpConnectionList"></select><button id="newSftpConnection" style="margin-left: 16px;" class="dropdownTrigger orionButton commandButton">${New}<span class="dropdownArrowDown"></span></button></div><div><label for="sftpPassword">${Password:}</label></div><div><input id="sftpPassword" type="password" /></div><p>${If the same file exists in both the source and destination:}</p><input type="radio" name="overwriteOption" id="overwriteCancel" checked value="overwriteCancel" /><label for="overwriteCancel">${Cancel the transfer}</label><br /><input type="radio" name="overwriteOption" id="overwriteAll" value="overwriteAll" /><label for="overwriteAll">${Always overwrite destination}</label><br /><input type="radio" name="overwriteOption" id="overwriteOlder" value="overWriteOlder" /><label for="overwriteOlder">${Overwrite if source is newer}</label></div>';
g.prototype._init=function(c){this.title="SFTP Transfer";this.messages=h;this.modal=!0;this.buttons=[{text:h["Start Transfer"],callback:this.done.bind(this)}];this.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));this._func=c.func;this._initialize()};g.prototype._bindToDom=function(){this.$sftpConnectionList.style.minWidth="220px";this._popupDialog=new d(this.$newSftpConnection,this.onAddConnection.bind(this));this._addChildDialog(this._popupDialog);this._populateSelect()};
g.prototype._afterHiding=function(){this._popupDialog.hide()};g.prototype.done=function(){var c=this.$sftpConnectionList.value.split("@"),b,a,d;if(c.length===2)d=c[0],a=c[1];else if(c.length===3)d=c[0]+"@"+c[1],a=c[2];else{this.hide();return}var e=a.indexOf(":");e<=0&&(b=22);var f=a.indexOf("/");f<=0||(b?c=a.substring(0,f):(c=a.substring(0,e),b=a.substring(e+1,f)),a=a.substring(f),this._func(c,b,a,d,this.$sftpPassword.value,this._computeOverwriteValue()));this.hide()};g.prototype._computeOverwriteValue=
function(){if(this.$overwriteCancel.checked)return"no-overwrite";else if(this.$overwriteOlder.checked)return"overwrite-older";return""};g.prototype._populateSelect=function(){i.empty(this.$sftpConnectionList);for(var c=0;c<this.sftpConnectionStoreData.items.length;c++){var b=this.sftpConnectionStoreData.items[c].name,a=document.createElement("option");a.appendChild(document.createTextNode(b));a.value=b;this.$sftpConnectionList.appendChild(a)}};g.prototype.onAddConnection=function(c){for(var b=!1,
a=0;a<this.sftpConnectionStoreData.items.length;a++)if(this.sftpConnectionStoreData.items[a].name===c.name){b=!0;break}if(!b)this.sftpConnectionStoreData.items.unshift(c),localStorage.setItem("orion.sftpConnections",JSON.stringify(this.sftpConnectionStoreData)),this._populateSelect(),this.$sftpConnectionList.value=c.name};g.prototype.constructor=g;return{SFTPConnectionDialog:g}});
define("orion/webui/dialogs/ImportDialog",["i18n!orion/widgets/nls/messages","orion/webui/littlelib","orion/webui/dialog"],function(h,i,f){function e(d){this._init(d)}e.prototype=new f.Dialog;e.prototype.TEMPLATE='<div ondragover="event.preventDefault()"><div class="uploadContainer" id="uploadContainer"><div class="dottedOutline"><div id="dragArea" class="floatingSection"><div class="uploadInstruction">${Drag a file here}</div><div class="uploadOptions">(<input style="height: 20px;" class="uploadOptionsItem" id="unzipCheckbox" checked="true" type="checkbox"><label style="line-height: 20px;" class="uploadOptionsItem" for="${id}_unzipCheckbox">${unzip zips}</label>)</div><div class="tipInstruction">${or if you prefer}</div></div></div></div><div class="layoutBlock layoutRight"><input type="file" name="selectedFile" id="selectedFile" class="uploadChooser" /><span id="uploadButton" role="button" class="commandButton disabled" tabindex="0">${Upload}</span></div></div>';
e.prototype._init=function(d){this.title=h["Import a file or zip"];this.messages=h;this.modal=!0;this._importLocation=d.importLocation;this._func=d.func;this._initialize()};e.prototype._bindToDom=function(){this.$uploadContainer.addEventListener("dragenter",this.dragEnter.bind(this),!1);this.$uploadContainer.addEventListener("dragover",this.dragOver.bind(this),!1);this.$uploadContainer.addEventListener("dragleave",this.dragLeave.bind(this),!1);this.$uploadContainer.addEventListener("drop",this.drop.bind(this),
!1);this.$selectedFile.addEventListener("change",this.checkUploadState.bind(this),!1);this.$uploadButton.addEventListener("click",this.uploadSelected.bind(this),!1)};e.prototype.handleReadyState=function(d,e){if(this.req.readyState===4){if(this.req.status===400){var c={};try{c=JSON.parse(this.req.responseText)}catch(b){}if(c.JsonData&&c.JsonData.ExistingFiles&&confirm(c.Message+"\nWould you like to retry the import with force overwriting?")){this.uploadFile.bind(this)(e,!0);return}}this.hide();this._func()}};
e.prototype.checkUploadState=function(){this.$selectedFile.files&&this.$selectedFile.files.length>0?this.$uploadButton.classList.remove(this.DISABLED):this.$uploadButton.classList.add(this.DISABLED)};e.prototype.uploadFile=function(d,e){var c=this.$unzipCheckbox.checked&&d.name.indexOf(".zip")===d.name.length-4;this.req=new XMLHttpRequest;this.req.open("post",e?this._importLocation+(this._importLocation.indexOf("?")>0?"&force=true":"?force=true"):this._importLocation,!0);this.req.setRequestHeader("X-Requested-With",
"XMLHttpRequest");this.req.setRequestHeader("Slug",d.name);c||this.req.setRequestHeader("X-Xfer-Options","raw");this.req.setRequestHeader("Content-Type",d.type);this.req.onreadystatechange=function(b){this.handleReadyState.bind(this)(b,d)}.bind(this);this.req.send(d)};e.prototype.uploadSelected=function(){this.$uploadButton.classList.contains(this.DISABLED)||this.$selectedFile.files&&this.$selectedFile.files.length>0&&this.uploadFile(this.$selectedFile.files[0])};e.prototype.dragEnter=function(d){if(d.dataTransfer.effectAllowed===
"all"||d.dataTransfer.effectAllowed==="uninitialized"||d.dataTransfer.effectAllowed.indexOf("copy")>=0)d.dataTransfer.dropEffect="copy";i.stop(d)};e.prototype.dragLeave=function(d){i.stop(d)};e.prototype.dragOver=function(d){if(d.dataTransfer.effectAllowed==="all"||d.dataTransfer.effectAllowed==="uninitialized"||d.dataTransfer.effectAllowed.indexOf("copy")>=0)d.dataTransfer.dropEffect="copy";i.stop(d)};e.prototype.drop=function(d){i.stop(d);d=d.dataTransfer.files;if(d.length&&d.length>0)for(var e=
0;e<d.length;e++)this.uploadFile(d[e])};e.prototype.constructor=e;return{ImportDialog:e}});
define("orion/fileCommands","i18n!orion/navigate/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/uiUtils,orion/fileUtils,orion/commands,orion/commandRegistry,orion/extensionCommands,orion/contentTypes,orion/compare/compareUtils,orion/Deferred,orion/webui/dialogs/DirectoryPrompterDialog,orion/webui/dialogs/SFTPConnectionDialog,orion/webui/dialogs/ImportDialog".split(","),function(h,i,f,e,d,g,c,b,a,k,j,l,m,p,r){function o(a){this.registry=a;this.favorites=[];var b=this,a=this.registry.getService("orion.core.favorite");
z||(z=this.registry.getService("orion.page.progress"));z.progress(a.getFavorites(),"Getting favorites").then(function(a){b.cacheFavorites(a.navigator)});a.addEventListener("favoritesChanged",function(a){b.cacheFavorites(a.navigator)})}function n(a,b){var c=a.modelEventDispatcher;c&&typeof c.dispatchEvent==="function"&&c.dispatchEvent(b)}function q(a){z?z.setProgressResult(a):window.console.log(a)}function s(a,b,c,e,g){var h;b.Location===a.treeRoot.Location?a=f.node(c):(b=a.makeNewItemPlaceHolder(b,
c))?(a=b.refNode,h=b.tempNode):a=f.node(c);a?d.getUserText(c+"EditBox",a,!1,e,function(a){a&&(h&&h.parentNode&&h.parentNode.removeChild(h),g(a))}):(c=window.prompt(e))&&g(c)}function y(a){if(!a)return{};Array.isArray(a)&&(a=a.length===1?a[0]:{});return a}function B(a){a=y(a);return a.Location&&g.isAtRoot(a.Location)}function w(a,b,c,d,e,f){z=c;if(d){var h;h=g.isAtRoot(a.treeRoot.ChildrenLocation)?a.treeRoot:z.progress(b.loadWorkspace(""),"Loading workspace");l.when(h,function(g){g=b.createProject(g.ChildrenLocation,
d);f&&(g=c.showWhile(g,f));g.then(function(f){c.progress(b.read(f.ContentLocation,!0),"Reading metadata of newly created project "+d).then(function(b){e&&e(b);a.loadResourceList("",!0)},q)},q)},q)}}var A={},v=null,z=null,x=null;o.prototype={cacheFavorites:function(a){this.favorites=[];for(var b=0;b<a.length;b++)a[b].directory&&this.favorites.push(a[b]);this.favorites.sort(function(a,b){return a<b?-1:a>b?1:0})}};o.prototype.constructor=o;A.uploadFile=function(a,b,c,d,e){this.req=new XMLHttpRequest;
this.req.open("post",e?a.ImportLocation+(a.ImportLocation.indexOf("?")>0?"&force=true":"?force=true"):a.ImportLocation,!0);this.req.setRequestHeader("X-Requested-With","XMLHttpRequest");this.req.setRequestHeader("Slug",b.name);d||this.req.setRequestHeader("X-Xfer-Options","raw");this.req.setRequestHeader("Content-Type",b.type);this.req.onreadystatechange=function(){if(this.req.readyState===4){if(this.req.status===400){var e={};try{e=JSON.parse(this.req.responseText)}catch(f){}if(e.JsonData&&e.JsonData.ExistingFiles&&
(c&&c.serviceRegistry?c.serviceRegistry.getService("orion.page.dialog").confirm:confirm)(e.Message+"\nWould you like to retry the import with force overwriting?")){A.uploadFile(a,b,c,d,!0);return}}n(c,{type:"create",parent:a,newValue:null})}}.bind(this);this.req.send(b)};A.updateNavTools=function(a,b,c,d,e,g,h){function j(a,d){var g=f.node(e);if(g){var i=b._contributionsByScopeId[e],a=a||i&&i.localSelectionService||b.getSelectionService();i&&a&&l.when(a.getSelections(),function(a){b.destroy(g);a=
!a||Array.isArray(a)&&!a.length;h&&a?b.renderCommands(g.id,g,d,c,"button"):b.renderCommands(g.id,g,null,c,"button")})}}var i=f.node(d);if(i)b.destroy(i);else throw Error("could not find toolbar "+d);if(g.Location!==x)b.closeParameterCollector(),x=g.Location;b.renderCommands(i.id,i,g,c,"button");x&&b.processURL(window.location.href);e&&j(null,c.treeRoot);if(!v){v=new o(a);var k=a.getService("orion.page.selection");k.addEventListener("selectionChanged",function(){j(k,c.treeRoot)})}};A.createFileCommands=
function(a,f,i,o){function G(a){var a=g.makeRelative(a),a=a.split("#"),a=a[a.length-1],b=a.indexOf("/?");b>0&&(a=a.substring(0,b+1));return a}function A(b,c,d){for(var b=Array.isArray(b)?b:[b],c=function(a){Array.isArray(a)||(a=[a]);var b=[],c=[],e=this;a.forEach(function(a){b.push((d?o.copyFile:o.moveFile).apply(o,[a.Location,e.path]).then(function(b){c.push({oldValue:a,newValue:b});x({type:d?"copy":"move",oldValue:a,newValue:b})},q))});l.all(b).then(function(){x({type:d?"copyMultiple":"moveMultiple",
items:c})})},f=[],g=0;g<b.length;g++){if(b[g].parent&&b[g].parent.Location)b[g].parent.stripped=b[g].parent.stripped||G(b[g].parent.Location),f.indexOf(b[g].parent.stripped)!==-1||f.push(b[g].parent.stripped);if(b[g].Directory&&!d)b[g].stripped=b[g].stripped||G(b[g].Location),f.push(b[g].stripped)}b=[];if(v){for(var j=v.favorites,g=0;g<j.length;g++){var k=G(j[g].path);f.indexOf(k)!==-1||b.push({name:j[g].name,imageClass:"core-sprite-favorite",path:k,callback:c})}j.length>0&&b.push({})}j=[];k=i.treeRoot.Children;
for(g=0;g<k.length;g++){var n=k[g];n.stripped=n.stripped||(n.Directory?G(n.Location):null);n.stripped&&f.indexOf(n.stripped)===-1&&j.push(n)}j.sort(function(a,b){return a.stripped<b.stripped?-1:a.stripped>b.stripped?1:0});for(g=0;g<j.length;g++){for(var f=j[g],k=f.Name,n=f.stripped.split("/").length+1,p=0;p<n-2;p++)k="  "+k;b.push({name:k,path:f.stripped,callback:c})}j.length>0&&b.push({});b.push({name:h["Choose folder..."],callback:function(b){(new m.DirectoryPrompterDialog({title:h["Choose a Folder"],
serviceRegistry:a,fileClient:o,func:function(a){if(a&&a.Location){Array.isArray(b)||(b=[b]);var c=[],f=[];b.forEach(function(b){var g=a.Location,i=b.Name||null,j=d?o.copyFile:o.moveFile,k=e.formatMessage(d?h["Copying ${0}"]:h["Moving ${0}"],b.Location);d&&b.parent&&b.parent.Location===g&&((i=window.prompt(e.formatMessage(h["Enter a new name for '${0}'"],b.Name),e.formatMessage(h["Copy of ${0}"],b.Name)))||(g=null));g&&(g=j.apply(o,[b.Location,a.Location,i]),c.push(z.showWhile(g,k).then(function(a){f.push({oldValue:b,
newValue:a});x({type:d?"copy":"move",oldValue:b,newValue:a})},q)))});l.all(c).then(function(){x({type:d?"copyMultiple":"moveMultiple",items:f})})}}})).show()}});return b}function T(a){if(a.parent)return{item:a,parent:a.parent};else if(a.Parents&&a.Parents[0])return{item:a,parent:a.Parents[0]};return o.loadWorkspace(o.fileServiceRootURL(a.Location)).then(function(b){return l.when(b.Children||o.fetchChildren(b)).then(function(c){b.Children=c;c=b.Children.some(function(b){return b.Location===a.Location?
(a=b,!0):!1});return{item:a,parent:c?b:null}})})}z=a.getService("orion.page.progress");var x=n.bind(null,i),J=function(a){var b=Array.isArray(a)?a:[a];if(b.length===0)return!1;for(var c=0;c<b.length;c++)if(a=b[c],!a.Location||a.Projects)return!1;return!0},t=new c.Command({name:h.Rename,tooltip:h["Rename the selected files or folders"],imageClass:"core-sprite-rename",id:"eclipse.renameResource",visibleWhen:function(a){return Array.isArray(a)?a.length===1&&a[0].Name:a.Location&&!a.Projects},parameters:new b.ParametersDescription(null,
{},function(a){var a=Array.isArray(a.items)?a.items:[a.items],c=i.treeRoot;return a.some(function(a){return a===c})?[new b.CommandParameter("name","text",h["Name:"],c.Name)]:null}),callback:function(a){function b(a){var d=c.Location;l.when(T(c),function(b){c=b.item;var f=b.parent;f&&f.Projects&&f.Projects.some(function(a){return a.Id===c.Id?(d=a.Location,!0):!1});b=o.moveFile(d,f.Location,a);z.showWhile(b,e.formatMessage(h["Renaming ${0}"],d)).then(function(a){x({type:"move",oldValue:c,newValue:a,
parent:f})},q)})}var c=y(a.items),f;a.parameters.hasParameters()&&(f=a.parameters.valueFor("name"))!==null?b(f):((f=i.getNameNode(c))||(f=a.domParent||a.domNode),d.getUserText(f.id+"EditBox",f,!0,c.Name,b,null,null,"."))}});f.addCommand(t);var Q=new k.ContentTypeService(a),t=new c.Command({name:h["Compare with each other"],tooltip:h["Compare the selected 2 files with each other"],id:"eclipse.compareWithEachOther",visibleWhen:function(a){if(Array.isArray(a))if(a.length===2&&!a[0].Directory&&!a[1].Directory){var b=
Q.getFilenameContentType(a[0].Name),a=Q.getFilenameContentType(a[1].Name);if(b&&(b["extends"]==="text/plain"||b.id==="text/plain")&&a&&(a["extends"]==="text/plain"||a.id==="text/plain"))return!0}else if(a.length===2&&a[0].Directory&&a[1].Directory)return!0;return!1},hrefCallback:function(a){return a.items[0].Directory&&a.items[1].Directory?j.generateCompareTreeHref(a.items[0].Location,{compareTo:a.items[1].Location,readonly:!0}):j.generateCompareHref(a.items[0].Location,{compareTo:a.items[1].Location,
readonly:!0})}});f.addCommand(t);t=new c.Command({name:h["Compare with..."],tooltip:h["Compare the selected folder with a specified folder"],id:"eclipse.compareWith",visibleWhen:function(a){return Array.isArray(a)&&a.length===1&&a[0].Directory?!0:!1},callback:function(b){(new m.DirectoryPrompterDialog({title:h["Choose a Folder"],serviceRegistry:a,fileClient:o,func:function(a){a&&a.Location&&(a=j.generateCompareTreeHref(b.items[0].Location,{compareTo:a.Location,readonly:!0}),window.open(a))}})).show()}});
f.addCommand(t);t=new c.Command({name:h.Delete,tooltip:h["Delete the selected files or folders"],imageClass:"core-sprite-delete",id:"eclipse.deleteFile",visibleWhen:J,callback:function(b){var c=Array.isArray(b.items)?b.items:[b.items],b=c.length===1?e.formatMessage(h["Are you sure you want to delete '${0}'?"],c[0].Name):e.formatMessage(h["Are you sure you want to delete these ${0} items?"],c.length);a.getService("orion.page.dialog").confirm(b,function(a){if(a){var b=[],a=c.map(function(a){var c=a.Location;
return l.when(T(a),function(d){a=d.item;var f=d.parent;f&&f.Projects&&(c=null,f.Projects.some(function(b){return b.Id===a.Id?(c=b.Location,!0):!1}));if(!c)return(new l).resolve();d=o.deleteFile(c);return z.showWhile(d,e.formatMessage(h["Deleting ${0}"],c)).then(function(){b.push({oldValue:a,newValue:null,parent:f});x({type:"delete",oldValue:a,newValue:null,parent:f})},q)})});l.all(a).then(function(){x({type:"deleteMultiple",items:b})},q)}})}});f.addCommand(t);t=new c.Command({name:h["Export as zip"],
tooltip:h["Create a zip file of the folder contents and download it"],imageClass:"core-sprite-exportzip",id:"eclipse.downloadFile",visibleWhen:function(a){a=y(a);return a.ExportLocation&&a.Directory},hrefCallback:function(a){return y(a.items).ExportLocation}});f.addCommand(t);t=new b.ParametersDescription([new b.CommandParameter("name","text",h["Name:"],h["New File"])]);t=new c.Command({name:h["New File"],tooltip:h["Create a new file"],imageClass:"core-sprite-new_file",id:"eclipse.newFile",parameters:t,
callback:function(a){i.selection.getSelections(function(b){var c;c=b.length===1&&b[0].Directory?b[0]:y(a.items);b=function(a){if(a){var b=o.createFile(c.Location,a);z.showWhile(b,e.formatMessage(h["Creating ${0}"],a)).then(function(a){x({type:"create",parent:c,newValue:a})},q)}};a.parameters&&a.parameters.valueFor("name")?b(a.parameters.valueFor("name")):s(i,c,a.domNode.id,h["New File"],b)})},visibleWhen:function(a){a=y(a);return a.Directory&&!g.isAtRoot(a.Location)}});f.addCommand(t);var t=new b.ParametersDescription([new b.CommandParameter("name",
"text",h["Folder name:"],h["New Folder"])]),N=new c.Command({name:h["New Folder"],tooltip:h["Create a new folder"],imageClass:"core-sprite-new_folder",id:"eclipse.newFolder",parameters:t,callback:function(a){i.selection.getSelections(function(b){var c;c=b.length===1&&b[0].Directory?b[0]:y(a.items);b=function(a){if(a){var b=o.createFolder(c.Location,a);z.showWhile(b,e.formatMessage(h["Creating ${0}"],a)).then(function(a){x({type:"create",parent:c,newValue:a})},q)}};a.parameters&&a.parameters.valueFor("name")?
b(a.parameters.valueFor("name")):s(i,c,a.domNode.id,h["New Folder"],b)})},visibleWhen:function(a){a=y(a);return a.Directory&&!g.isAtRoot(a.Location)}});f.addCommand(N);var K=new b.ParametersDescription([new b.CommandParameter("url","url",h["File URL:"],"URL"),new b.CommandParameter("unzip","boolean",h["Unzip *.zip files:"],!0)]),K=new c.Command({name:h["Import from HTTP..."],tooltip:h["Copy a file from a URL and optionally unzip it"],id:"orion.importZipURL",parameters:K,callback:function(a){var b=
y(a.items),c=a.parameters&&a.parameters.valueFor("url");if(b&&c){var d=b.ImportLocation+(b.ImportLocation.indexOf("?")===-1?"?":"&")+"source="+c,a=a.parameters&&a.parameters.valueFor("unzip")&&c.indexOf(".zip")===c.length-4?"":"raw",d=o.remoteImport(d,{OptionHeader:a});z.showWhile(d,e.formatMessage(h["Importing from ${0}"],c)).then(function(){x({type:"import",target:b})})}},visibleWhen:function(a){a=y(a);return a.Directory&&!g.isAtRoot(a.Location)}});f.addCommand(K);t=new c.Command({name:h["New Folder"],
parameters:t,imageClass:"core-sprite-new_folder",tooltip:h["Create an empty folder"],description:h["Create an empty folder on the Orion server.  You can import, upload, or create content in the editor."],id:"orion.new.project",callback:function(a){i.selection.getSelections(function(b){b.length===1&&b[0].Directory?N.callback(a):(y(a.items),a.parameters&&a.parameters.valueFor("name")?w(i,o,z,a.parameters.valueFor("name")):s(a.items,a.domNode.id,h["New Folder"],function(a){w(i,o,z,a)}))})},visibleWhen:B});
f.addCommand(t);t=new c.Command({name:h["Link to Server"],tooltip:h["Link to existing content on the server"],description:h["Create a folder that links to an existing folder on the server."],imageClass:"core-sprite-link",id:"orion.new.linkProject",parameters:new b.ParametersDescription([new b.CommandParameter("name","text","Name:","New Folder"),new b.CommandParameter("url","url",h["Server path:"],"")]),callback:function(a){var b=function(a,b){if(a&&b){var c=o.createProject(i.treeRoot.ChildrenLocation,
a,b,!0),d=i;z.showWhile(c,e.formatMessage(h["Linking to ${0}"],b)).then(function(){d.loadResourceList(d.treeRoot.Path,!0)},q)}};a.parameters&&a.parameters.valueFor("name")&&a.parameters.valueFor("url")?b(a.parameters.valueFor("name"),a.parameters.valueFor("url")):q(h["The name and server location were not specified."])},visibleWhen:B});f.addCommand(t);t=new c.Command({name:h["Go Up"],tooltip:h["Move up to the parent folder"],imageClass:"core-sprite-go-up",id:"eclipse.upFolder",callback:function(){typeof i.scopeUp===
"function"&&i.scopeUp()},visibleWhen:function(a){a=y(a);return a.Parents}});f.addCommand(t);t=new c.Command({name:h["Import local file..."],tooltip:h["Copy files and folders from your local file system"],imageClass:"core-sprite-importzip",id:"orion.import",callback:function(a){var b=y(a.items);(new r.ImportDialog({importLocation:b.ImportLocation,func:function(){x({type:"import",target:b})}})).show()},visibleWhen:function(a){a=y(a);return a.Directory&&!g.isAtRoot(a.Location)}});f.addCommand(t);t=new c.Command({name:h["SFTP from..."],
tooltip:h["Copy files and folders from a specified SFTP connection"],imageClass:"core-sprite-transferin",id:"orion.importSFTP",callback:function(a){var b=y(a.items);(new p.SFTPConnectionDialog({func:function(a,c,d,f,g,i){c=o.remoteImport(b.ImportLocation,{OptionHeader:i?"sftp,"+i:"sftp",Host:a,Port:c,Path:d,UserName:f,Passphrase:g});z.showWhile(c,e.formatMessage(h["Importing from ${0}"],a)).then(function(a){x({type:"import",target:b});q(a)},q)}})).show()},visibleWhen:function(a){a=y(a);return a.Directory&&
!g.isAtRoot(a.Location)}});f.addCommand(t);t=new c.Command({name:h["SFTP to..."],tooltip:h["Copy files and folders to a specified SFTP location"],imageClass:"core-sprite-transferout",id:"eclipse.exportSFTPCommand",callback:function(a){var b=y(a.items);(new p.SFTPConnectionDialog({func:function(a,c,d,f,g,i){c=o.remoteExport(b.ExportLocation,{OptionHeader:i?"sftp,"+i:"sftp",Host:a,Port:c,Path:d,UserName:f,Passphrase:g});z.showWhile(c,e.formatMessage(h.Exporting,a)).then(q,q)}})).show()},visibleWhen:function(a){a=
y(a);return a.Directory&&!g.isAtRoot(a.Location)}});f.addCommand(t);t=new c.Command({name:h["Copy to"],tooltip:"Copy files and folders to a specified location",id:"eclipse.copyFile",choiceCallback:function(a,b){return A(a,b,!0)},visibleWhen:J});f.addCommand(t);J=new c.Command({name:h["Move to"],tooltip:h["Move files and folders to a new location"],id:"eclipse.moveFile",choiceCallback:function(a,b){return A(a,b,!1)},visibleWhen:J});f.addCommand(J);var F=[],J=new c.Command({name:h["Copy Items"],tooltip:h["Copy the selected items to the copy/paste buffer"],
id:"eclipse.copySelections",callback:function(){i.selection.getSelections(function(a){F=a})}});f.addCommand(J);J=new c.Command({name:h["Paste Items"],tooltip:h["Paste items from the copy/paste buffer"],id:"eclipse.pasteSelections",visibleWhen:function(a){a=y(a);return a.Directory&&!g.isAtRoot(a.Location)},callback:function(a){i.selection.getSelections(function(b){var c;c=b.length===1&&b[0].Directory?b[0]:y(a.items);if(F.length>0)if(g.isAtRoot(c.Location))q(h["Cannot paste into the root"]);else{var d=
[],f=[];F.forEach(function(a){var b=a.Location,g=a.Name||null;b&&(a.parent&&a.parent.Location===c.Location&&((g=window.prompt(e.formatMessage(h["Enter a new name for '${0}'"],a.Name),e.formatMessage(h["Copy of ${0}"],a.Name)))||(b=null)),b&&(a=o.copyFile(b,c.Location,g),f.push(z.showWhile(a,e.formatMessage(h["Pasting ${0}"],b)).then(function(a){d.push({oldValue:c,newValue:a});x({type:"copy",oldValue:c,newValue:a})},q))))});l.all(f).then(function(){x({type:"copyMultiple",items:d})})}})}});f.addCommand(J)};
A.createNewContentCommand=function(a,d,e,f,g,i,j){var f=e?[]:[new b.CommandParameter("folderName","text",h["Folder name:"],d),new b.CommandParameter("url","url",h["Extracted from:"],f),new b.CommandParameter("unzip","boolean",h["Unzip *.zip files:"],!0)],k=null;f.length>0&&(k=new b.ParametersDescription(f));return new c.Command({name:d,parameters:k,id:a,callback:function(a){if(e)window.open(e);else if(a.parameters&&a.parameters.valueFor("folderName")){var b=a.parameters.valueFor("folderName");w(g,
i,j,b,function(b){a.parameters.clientCollect=!0;a.commandRegistry.runCommand("orion.importZipURL",b,g,a.parameters)})}else s(g,a.items,a.domNode.id,d,function(b){w(g,i,j,b,function(b){a.commandRegistry.runCommand("orion.importZipURL",b,g,a.parameters)})})},visibleWhen:B})};return A});
define('built-table.js',"require,i18n!orion/navigate/nls/messages,orion/browserCompatibility,orion/bootstrap,orion/Deferred,orion/i18nUtil,orion/webui/littlelib,orion/selection,orion/status,orion/progress,orion/dialogs,orion/ssh/sshTools,orion/keyBinding,orion/commandRegistry,orion/favorites,orion/tasks,orion/navoutliner,orion/searchClient,orion/fileClient,orion/operationsClient,orion/globalCommands,orion/fileCommands,orion/extensionCommands,orion/explorers/explorer-table,orion/explorers/navigatorRenderer,orion/fileUtils,orion/PageUtil,orion/URITemplate,orion/contentTypes,orion/URL-shim,orion/PageLinks".split(","),function(h,
i,f,e,d,g,c,b,a,k,j,l,m,p,r,o,n,q,s,y,B,w,A,v,z,x,E,u,D){e.startup().then(function(d){function e(a){window.location=(new u("#{,resource,params*}")).expand({resource:a})}function f(){var a=E.matchResourceParameters();F.loadResourceList(a.resource,!1).then(function(){B.setPageTarget({task:"Navigator",target:F.treeRoot,serviceRegistry:g,searchService:N,fileService:x,commandService:t});w.updateNavTools(g,t,F,"pageActions","selectionTools",F.treeRoot,!0)})}var g=d.serviceRegistry,d=d.preferences,h=new b.Selection(g),
o=new y.OperationsClient(g);new a.StatusReportingService(g,o,"statusPane","notifications","notificationArea");new j.DialogService(g);new l.SshService(g);new r.FavoritesService({serviceRegistry:g});var t=new p.CommandRegistry({selection:h});new k.ProgressService(g,o,t);var x=new s.FileClient(g),N=new q.Searcher({serviceRegistry:g,commandService:t,fileService:x});B.setPageCommandExclusions(["eclipse.openWith","orion.navigateFromMetadata"]);B.generateBanner("orion-navigate",g,t,d,N);var K=new D.ContentTypeService(g),
F=new v.FileExplorer({serviceRegistry:g,treeRoot:{children:[]},selection:h,fileClient:x,parentId:"explorer-tree",dragAndDrop:w.uploadFile,rendererFactory:function(a){return new z.NavigatorRenderer({checkbox:!1,cachePrefix:"Navigator"},a,t,K)}});F.scopeUp=function(){var a=this.treeRoot,b=a&&a.Parents;b&&(a=b.length===0?x.fileServiceRootURL(a.Location):b[0].ChildrenLocation,e(a))}.bind(F);F.addEventListener("rootMoved",function(a){e(a.newInput)});f();w.createFileCommands(g,t,F,x);t.addCommandGroup("pageActions",
"orion.new",1E3,i.New,null,null,"core-sprite-addcontent");t.addCommandGroup("pageActions","orion.gitGroup",200);t.addCommandGroup("selectionTools","orion.selectionGroup",500,i.Actions,null,null,"core-sprite-gear");t.addCommandGroup("selectionTools","orion.importExportGroup",100,null,"orion.selectionGroup");t.addCommandGroup("selectionTools","orion.newResources",101,null,"orion.selectionGroup");t.registerCommandContribution("pageActions","eclipse.copySelections",1,null,!0,new m.KeyBinding("c",!0));
t.registerCommandContribution("pageActions","eclipse.pasteSelections",1,null,!0,new m.KeyBinding("v",!0));t.registerCommandContribution("pageActions","eclipse.openResource",500);t.registerCommandContribution("pageActions","eclipse.newFile",1,"orion.new");t.registerCommandContribution("pageActions","eclipse.newFolder",2,"orion.new",!1,null,new p.URLBinding("newFolder","name"));t.registerCommandContribution("navActions","eclipse.upFolder",3,null,!1,new m.KeyBinding(38,!1,!1,!0));t.registerCommandContribution("pageActions",
"orion.new.project",1,"orion.new");t.registerCommandContribution("pageActions","orion.new.linkProject",2,"orion.new");d=new m.KeyBinding(113);d.domScope="explorer-tree";d.scopeName="Navigator";t.registerCommandContribution("selectionTools","eclipse.renameResource",2,"orion.selectionGroup",!1,d);t.registerCommandContribution("selectionTools","eclipse.copyFile",3,"orion.selectionGroup");t.registerCommandContribution("selectionTools","eclipse.moveFile",4,"orion.selectionGroup");d=new m.KeyBinding(46);
d.domScope="explorer-tree";d.scopeName="Navigator";t.registerCommandContribution("selectionTools","eclipse.deleteFile",5,"orion.selectionGroup",!1,d);t.registerCommandContribution("selectionTools","eclipse.compareWithEachOther",6,"orion.selectionGroup");t.registerCommandContribution("selectionTools","eclipse.compareWith",7,"orion.selectionGroup");t.registerCommandContribution("selectionTools","orion.importZipURL",1,"orion.selectionGroup/orion.importExportGroup");t.registerCommandContribution("selectionTools",
"orion.import",2,"orion.selectionGroup/orion.importExportGroup");t.registerCommandContribution("selectionTools","eclipse.downloadFile",3,"orion.selectionGroup/orion.importExportGroup");t.registerCommandContribution("selectionTools","orion.importSFTP",4,"orion.selectionGroup/orion.importExportGroup");t.registerCommandContribution("selectionTools","eclipse.exportSFTPCommand",5,"orion.selectionGroup/orion.importExportGroup");A.createAndPlaceFileCommandsExtension(g,t,"selectionTools",0,"orion.selectionGroup",
!0).then(function(){w.updateNavTools(g,t,F,"pageActions","selectionTools",F.treeRoot,!0);F.updateCommands();F.addEventListener("rootChanged",function(a){var b=c.node("navActions");if(b)t.destroy(b),t.renderCommands(b.id,b,a.root,null,"tool");else throw Error("could not find toolbar navActions");});new n.NavigationOutliner({parent:"fileSystems",commandService:t,serviceRegistry:g})});window.addEventListener("hashchange",function(){f()},!1)})});