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

/*

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

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

 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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). 

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 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
 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
*/
(function(){function h(b,f,e,c,a,j){f[b]&&(e.push(b),(f[b]===!0||f[b]===1)&&c.push(a+b+"/"+j))}function k(b,f,e,c,a){f=c+f+"/"+a;require._fileExists(b.toUrl(f+".js"))&&e.push(f)}function g(b,f,e){for(var c in f)f.hasOwnProperty(c)&&(!b.hasOwnProperty(c)||e)?b[c]=f[c]:typeof f[c]==="object"&&g(b[c],f[c],e)}var f=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(b){var i=b.config?b.config():{};return{version:"2.0.1+",load:function(e,c,a,j){j=j||{};if(j.locale)i.locale=j.locale;
var d=f.exec(e),l=d[1],b=d[4],p=d[5],u=b.split("-"),o=[],n={},r,v="";if(d[5])l=d[1],e=l+p;else{p=d[4];b=i.locale;if(!b)b=i.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();u=b.split("-")}if(j.isBuild){o.push(e);k(c,"root",o,l,p);for(r=0;r<u.length;r++)j=u[r],v+=(v?"-":"")+j,k(c,v,o,l,p);c(o,function(){a()})}else c([e],function(d){var j=[],e;h("root",d,j,o,l,p);for(r=0;r<u.length;r++)e=u[r],v+=(v?"-":"")+e,h(v,d,j,o,l,p);c(o,function(){var e,
b,f;for(e=j.length-1;e>-1&&j[e];e--){f=j[e];b=d[f];if(b===!0||b===1)b=c(l+f+"/"+p);g(n,b)}a(n)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,k,g,f){var f=f||{},b=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,i=b.exec(h);if(i)if(k.defined(h))g(k(h));else if(f.isBuild||f.isTest)g({});else{var e=i[1],c=i[3]?i[2]:"",a=i[3]||i[2];k(["orion/bootstrap"],function(j){j.startup().then(function(d){var j=d.serviceRegistry,d=j.getServiceReferences("orion.i18n.message");if(c)d.some(function(a){return h===a.getProperty("name")?(j.getService(a).getMessageBundle().then(function(a){g(a)},function(){g({})}),
!0):!1})||g({});else{var m={},p;d.forEach(function(d){var j=d.getProperty("name");if((i=b.exec(j))&&e===i[1]&&a===(i[3]||i[2]))if(c=i[3]?i[2]:""){if((d=f.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&d.toLowerCase().indexOf(c.toLowerCase())===0)m[c]=!0,k.specified(j)||define(j,["orion/i18n!"+j],function(a){return a})}else p=d});k.specified(h)?g(m):p?j.getService(p).getMessageBundle().then(function(a){Object.keys(m).forEach(function(d){typeof a[d]==="undefined"&&
(a[d]=m[d])});define(h,[],a);g(a)},function(){define(h,[],m);g(m)}):(define(h,[],m),g(m))}})})}else g(null)}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",Save:"Save",
"Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} repository:","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration","There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?",
"There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",
ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",
ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",Stopped:"Stopped","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
SitesCommandScope:"Sites"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(h,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
(function(h,k){typeof define==="function"&&define.amd?define("orion/Deferred",k):typeof exports==="object"?module.exports=k():(h.orion=h.orion||{},h.orion.Deferred=k())})(this,function(){function h(){for(var j;j=e.shift()||c.shift();)j();a=!1}function k(j,d){(d?c:e).push(j);a||(a=!0,d?setTimeout(h,0):h())}function g(a){return function(){a.apply(null,arguments)}}function f(){}function b(){var a=Error("Cancel");a.name="Cancel";return a}function i(){function a(){for(var j;j=c.shift();){var e=j.deferred,
b=l==="resolved"?"resolve":"reject";if(typeof j[b]==="function")try{var i=j[b](d);i&&typeof i.then==="function"?(e.cancel=i.cancel||f,i.then(g(e.resolve),g(e.reject),e.progress)):e.resolve(i)}catch(p){e.reject(p)}else e[b](d)}}var d,l,c=[],e=this;this.reject=function(b){l||(l="rejected",d=b,c.length&&k(a));return e.promise};this.resolve=function(b){l||(l="resolved",d=b,c.length&&k(a));return e.promise};this.progress=function(a){l||c.forEach(function(d){d.progress&&d.progress(a)});return e.promise};
this.cancel=function(){l||e.reject(b())};this.then=function(d,b,f){var d={resolve:d,reject:b,progress:f,deferred:new i},g=d.deferred,v=!1,h=function(){v||(v=!0,k(function(){var a=g.cancel===h?e.cancel:g.cancel;typeof a==="function"&&a()},!0))};g.cancel=h;c.push(d);l&&k(a,!0);return g.promise};this.promise=Object.create(Object.prototype,{then:{value:e.then},cancel:{get:function(){return e.cancel},set:function(a){e.cancel=a}}})}var e=[],c=[],a=!1;i.all=function(a,d){function l(a,d){f||(b[a]=d,--e===
0&&n.resolve(b))}function c(a,j){if(!f){if(d)try{l(a,d(j));return}catch(e){j=e}n.reject(j)}}var e=a.length,b=[],f=!1,n=new i;n.then(null,function(){f=!0;a.forEach(function(a){a.cancel&&a.cancel()})});e===0?n.resolve(b):a.forEach(function(a,d){a.then(l.bind(null,d),c.bind(null,d))});return n.promise};i.when=function(a,d,l,c){var e;if(!(a&&typeof a.then==="function"))e=new i,e.resolve(a),a=e.promise;return a.then(d,l,c)};return i});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(h){if(!h.type)throw Error("unspecified type");var g=this._namedListeners[h.type];g&&g.forEach(function(f){try{typeof f==="function"?f(h):f.handleEvent(h)}catch(b){typeof console!=="undefined"&&console.log(b)}});return!h.defaultPrevented},addEventListener:function(h,g){if(typeof g==="function"||g.handleEvent)this._namedListeners[h]=this._namedListeners[h]||[],this._namedListeners[h].push(g)},
removeEventListener:function(h,g){var f=this._namedListeners[h];if(f)for(var b=0;b<f.length;b++)if(f[b]===g){f.length===1?delete this._namedListeners[h]:f.splice(b,1);break}}};h.prototype.constructor=h;h.attach=function(k){var g=new h;k.dispatchEvent=g.dispatchEvent.bind(g);k.addEventListener=g.addEventListener.bind(g);k.removeEventListener=g.removeEventListener.bind(g)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,k){function g(c,a,j){this._properties=j||{};this._properties["service.id"]=c;this._properties.objectClass=a;this._properties["service.names"]=a}function f(c,a,j){this._serviceId=c;this._serviceReference=a;this._internalRegistry=j}function b(c,a){function j(d){return function(){var j;try{if(!a())throw Error("Service was unregistered");var e=c[d].apply(c,Array.prototype.slice.call(arguments));if(e&&typeof e.then==="function")return e;
else j=new h,j.resolve(e)}catch(b){j=new h,j.reject(b)}return j.promise}}for(var d in c)typeof c[d]==="function"&&(this[d]=j(d))}function i(c,a){this.type=c;this.serviceReference=a}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var c=this;this._internalRegistry={isRegistered:function(a){return c._entries[a]?!0:!1},unregisterService:function(a){var j=c._entries[a];if(!j)throw Error("already unregistered");var d=j.reference;c._serviceEventTarget.dispatchEvent(new i("unregistering",
d));c._entries[a]=null;d.getProperty("objectClass").forEach(function(a){for(var j=c._namedReferences[a],e=0;e<j.length;e++)if(j[e]===d){j.length===1?delete c._namedReferences[a]:j.splice(e,1);break}})},modifyService:function(a){a=c._entries[a];if(!a)throw Error("already unregistered");c._serviceEventTarget.dispatchEvent(new i("modified",a.reference))}}}g.prototype={getPropertyKeys:function(){var c=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&c.push(a);return c},getProperty:function(c){return this._properties[c]}};
g.prototype.constructor=g;f.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("already unregistered");return this._serviceReference},setProperties:function(c){var a=this._serviceReference._properties;this._serviceReference._properties=c||{};c["service.id"]=this._serviceId;c.objectClass=a.objectClass;c["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
f.prototype.constructor=f;e.prototype={getService:function(c){var a;if(typeof c==="string")(c=this._namedReferences[c])&&c.some(function(j){a=this._entries[j.getProperty("service.id")].service;return!!a},this);else if(c=this._entries[c.getProperty("service.id")])a=c.service;return a||null},getServiceReferences:function(c){if(c)return this._namedReferences[c]?this._namedReferences[c]:[];var a=[];this._entries.forEach(function(j){j&&a.push(j.reference)});return a},registerService:function(c,a,j){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof c==="string"?c=[c]:Array.isArray(c)||(c=[]);var d=this._entries.length,l=new g(d,c,j),e=this._namedReferences;c.forEach(function(a){e[a]=e[a]||[];e[a].push(l)});c=new b(a,this._internalRegistry.isRegistered.bind(null,d));this._entries.push({reference:l,service:c});c=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new i("registered",l));return new f(d,l,c)},addEventListener:function(c,a){this._serviceEventTarget.addEventListener(c,
a)},removeEventListener:function(c,a){this._serviceEventTarget.removeEventListener(c,a)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(h){function k(g,f,b,i){var e=typeof b.response!=="undefined"?b.response:b.responseText,c;try{c=b.status}catch(a){c=0}g={args:f,response:e,responseText:typeof e==="string"?e:null,status:c,url:g,xhr:b};if(typeof i!=="undefined")g.error=i;return g}return function(g,f,b){var b=b||{},i=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new h,c=b.headers||{},a=b.log||!1,j;typeof c["X-Requested-With"]==="undefined"&&(c["X-Requested-With"]="XMLHttpRequest");
if(typeof b.data!=="undefined"&&(g==="POST"||g==="PUT"))j=b.data;i.onprogress=function(a){a.xhr=i;e.progress(a)};i.onreadystatechange=function(){if(i.readyState===4){var d=k(f,b,i),j=i.status;200<=j&&j<400?e.resolve(d):(a&&typeof console!=="undefined"&&console.log(Error(i.statusText)),e.reject(d))}};try{i.open(g,f,!0);if(typeof b.responseType==="string")i.responseType=b.responseType;if(typeof b.timeout==="number")if(typeof i.timeout==="number")i.timeout=b.timeout,i.addEventListener("timeout",function(){e.reject(k(f,
b,i,"Timeout exceeded"))});else{var d=setTimeout(function(){e.reject(k(f,b,i,"Timeout exceeded"))},b.timeout);e.then(clearTimeout.bind(null,d),clearTimeout.bind(null,d))}Object.keys(c).forEach(function(a){i.setRequestHeader(a,c[a])});i.send(j)}catch(l){e.reject(k(f,b,i,l))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,k,g){function f(a,d){this._name=a;this._providers=d;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function b(a,d){return{get:function(l,c){if(d===0)return null;var e=localStorage.getItem(a+l);if(e===null)return null;e=JSON.parse(e);return c||d===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(l,c){if(d!==0){if(d!==-1)c._expires=(new Date).getTime()+1E3*d;
if(Object.keys(c).length===0)localStorage.removeItem(a+l);else{var e=JSON.stringify(c);localStorage.setItem(a+l,e);delete c._expires}}},remove:function(d){localStorage.removeItem(a+d)}}}function i(a){this._currentPromises={};this._cache=new b("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var d=a.getServiceReferences("orion.core.preference.provider");if(d.length>0)this._service=a.getService(d[0])}return!!this._service}}function e(a){this._location=
a;this._currentPromise=null;this._cache=new b("/orion/preferences/default",3600)}function c(){this._cache=new b("/orion/preferences/local",-1)}function a(a,d){this._userProvider=new i(a);this._localProvider=new c;d=d||"defaults.pref";d.indexOf("://")===-1&&(d=h.toUrl(d));this._defaultsProvider=new e(d);this._serviceRegistration=a.registerService("orion.core.preference",this)}f.prototype={_flush:function(){for(var a=[],d=0;d<this._stores.length;++d){var c=this._stores[d];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[d].put(this._name,c))}this._dirty=[];return k.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 d=this._stores[a],c;for(c in d)d.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
d[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,d){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==d)c[a]=d,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var d=0;d<this._stores.length;++d){var c=this._stores[d];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 d=this,c=[],e=0;e<this._providers.length;++e)c.push(this._providers[e].get(this._name,a).then(function(a){return function(c){d._stores[a]=c}}(e)));return k.all(c).then(function(){d._cached=null;d._getCached()})},flush:function(){this._flush()}};i.prototype={get:function(a,d){if(this._currentPromises[a])return this._currentPromises[a];var c=new k,e=null;
d?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromises[a]=c;var b=this;this._service.get(a).then(function(d){b._cache.set(a,d);delete b._currentPromises[a];c.resolve(d)},function(d){d.status===404?(d={},b._cache.set(a,d),delete b._currentPromises[a],c.resolve(d)):(delete b._currentPromises[a],c.resolve(b._cache.get(a,!0)||{}))})}return c},put:function(a,d){this._cache.set(a,d);return this._service.put(a,d)}};e.prototype={get:function(a,d){if(this._currentPromise)return this._currentPromise;
var c=new k,e=null;d?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromise=c;var b=this;g("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(d){d=JSON.parse(d.response);b._cache.set(a,d[a]||{});b._currentPromise=null;c.resolve(d[a]||{})},function(d){d.xhr.status===401||d.xhr.status===404?(b._cache.set(a,{}),b._currentPromise=null,c.resolve({})):(b._currentPromise=null,d=b._cache.get(a,!0),d!==null?c.resolve(d[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new k;a.resolve();return a}};c.prototype={get:function(a){var d=new k,a=this._cache.get(a);a!==null?d.resolve(a):d.resolve({});return d},put:function(a,d){var c=new k;this._cache.set(a,d);c.resolve();return c}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(c,d,e){if(!d||typeof d!=="number"||d>7||d<1)e=d,d=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",e,!1);if((a.USER_SCOPE&d)!==0)return"/orion/preferences/user"+
c;else if((a.LOCAL_SCOPE&d)!==0)return"/orion/preferences/local"+c;return"/orion/preferences/default"+c},getPreferences:function(c,d){if(!d||typeof d!=="number"||d>7||d<1)d=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var e=[];a.USER_SCOPE&d&&this._userProvider.available()&&e.push(this._userProvider);a.LOCAL_SCOPE&d&&e.push(this._localProvider);a.DEFAULT_SCOPE&d&&e.push(this._defaultsProvider);var b=new f(c,e);return b.sync().then(function(){return b})},getSetting:function(a,d,c){for(var e,b=0;b<a.length;b++)if(a[b].label===
d)for(var f=0;f<a[b].data.length;f++)if(a[b].data[f].label===c){e=a[b].data[f].value;break}return e}};return{PreferencesService:a}});
(function(){function h(a){if(typeof a!=="string")throw new TypeError;}function k(a){return a?a.split("&"):[]}function g(a){return a.length===0?"":a.join("&")}function f(a){var d=/([^=]*)(?:=?)(.*)/.exec(a),a=d[1]?decodeURIComponent(d[1]):"",d=d[2]?decodeURIComponent(d[2]):"";return[a,d]}function b(a){var d=encodeURIComponent(a[0]);a[1]&&(d+="="+encodeURIComponent(a[1]));return d}function i(a,d){var c="",e=[],j=0;return{next:function(){if(c!==a.query)c=a.query,e=k(c);if(j<e.length){var l=f(e[j++]);
switch(d){case "keys":return l[0];case "values":return l[1];case "keys+values":return[l[0],l[1]];default:throw new TypeError;}}throw x;}}}function e(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function c(a){var d=[];a.split("/").forEach(function(a){a===".."?d.pop():a!=="."&&d.push(a)});return d.join("/")}function a(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function j(d,e){if(typeof d!=="string")throw new TypeError;var d=a(d),l=m.exec(d);
if(!l)return null;var j={};j.scheme=l[1]||"";if(j.scheme&&!u.test(j.scheme))return null;var b=l[2];if(b&&(b=p.exec(b),j.userinfo=b[1],j.host=b[2],j.port=b[3],j.port&&!o.test(j.port)))return null;j.path=l[3];j.query=l[4];j.fragment=l[5];if(!j.scheme&&e&&(j.scheme=e.scheme,!j.host&&e.host))j.userinfo=e.userinfo,j.host=e.host,j.port=e.port,j.pathRelative=!0;if(j.pathRelative)if(j.path){if(j.path[0]!=="/")l=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",j.path=l+j.path}else j.path=e.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=c(j.path);return j}function d(a,d){var c;if(d){d=d.href||d;c=j(d);if(!c||!c.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:c})}c=j(a,c);if(!c)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:c,writable:!0});var l=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?l:null},enumerable:!0})}
try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(l){}var m=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,p=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,u=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,o=/^\d*$/,n=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,r=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,v=/^([^?#\s]*)$/,w=/^([^\s]*)$/,y=/^\S*$/,q=/([^:]*):?(.*)/,x=typeof StopIteration!=="undefined"?StopIteration:
Error("Stop Iteration"),s={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(a){h(a);var d;k(this._url.query).some(function(c){c=f(c);if(c[0]===a)return d=c[1],!0});return d},enumerable:!0},set:{value:function(a,d){h(a);h(d);var c=k(this._url.query);c.some(function(e,j){var l=f(e);if(l[0]===a)return l[1]=d,c[j]=b(l),!0})||c.push(b([a,d]));this._url.query=g(c)},enumerable:!0},has:{value:function(a){h(a);return k(this._url.query).some(function(d){if(f(d)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var d=k(this._url.query),c=d.filter(function(d){return f(d)[0]!==a});return c.length!==d.length?(this._url.query=g(c),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,d){if(typeof a!=="function")throw new TypeError;var c=i(this._url,"keys+values");try{for(;;){var e=c.next();a.call(d,e[1],e[0],this)}}catch(j){if(j!==x)throw j;}},enumerable:!0},keys:{value:function(){return i(this._url,
"keys")},enumerable:!0},values:{value:function(){return i(this._url,"values")},enumerable:!0},items:{value:function(){return i(this._url,"keys+values")}},size:{get:function(){return k(this._url.query).length},enumerable:!0},getAll:{value:function(a){h(a);var d=[];k(this._url.query).forEach(function(c){c=f(c);c[0]===a&&d.push(c[1])});return d},enumerable:!0},append:{value:function(a,d){h(a);h(d);var c=k(this._url.query);c.push(b([a,d]));this._url.query=g(c)},enumerable:!0}});Object.defineProperties(d.prototype,
{href:{get:function(){var a;if(this._url){a=this._url;var d=a.scheme?a.scheme+":":"";a.host&&(d+="//",a.userinfo&&(d+=a.userinfo+"@"),d+=a.host,a.port&&(d+=":"+a.port));d+=a.path;a.query&&(d+="?"+a.query);a.fragment&&(d+="#"+a.fragment);a=d}else a=this._input;return a},set:function(a){h(a);this._input=a;this._url=j(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,u.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=q.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var d=q.exec(this._userinfo),a=[encodeURIComponent(a||"")];
d[2]&&a.push(d[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=q.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var d=[q.exec(this._userinfo)[1]||""];a&&d.push(encodeURIComponent(a));this._userinfo=d.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=r.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===s[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&&v.exec(a))this._url.host&&
a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?c(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)),w.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)),y.exec(a)))this._url.fragment=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&
(Object.defineProperty(d,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(d,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=d})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,k){function g(a,c){var d=Object.keys(a),e=Object.keys(c);if(d.length!==e.length)return!1;d.sort();e.sort();for(var b=0,f=d.length;b<f;b++){var i=d[b];if(i!==e[b])return!1;var o=a[i],i=c[i];if(o!==i&&JSON.stringify(o)!==JSON.stringify(i))return!1}return!0}function f(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(c){}return a}function b(a){var c=null;return{key:function(d){return(c=
c||Object.keys(a))[d]},getItem:function(d){return a[d]},setItem:function(d,e){a[d]=e;c=null},removeItem:function(d){delete a[d];c=null},clear:function(){(c=c||Object.keys(a)).forEach(function(d){delete a[d]}.bind(this));c=null}}}function i(a,c){return{type:a,plugin:c}}function e(a,c,d){function e(a,c,j){if(!A)return(new h).reject(Error("plugin not connected"));var l=C++,b=new h;b.then(null,function(a){s==="active"&&a instanceof Error&&a.name==="Cancel"&&d.postMessage({id:l,cancel:a.message||"Cancel"},
A)});D[String(l)]=b;d.postMessage({id:l,serviceId:a,method:c,params:j},A);return b.promise}function b(a){var d={};if(a.methods&&(a.methods.forEach(function(c){d[c]=function(){var d=Array.prototype.slice.call(arguments);return s==="active"?e(a.serviceId,c,d):r.start({"transient":!0}).then(function(){return e(a.serviceId,c,d)})}}),d.addEventListener&&d.removeEventListener)){var c=new k;d.dispatchEvent=c.dispatchEvent.bind(c);var j=d.addEventListener;d.addEventListener=function(a,d){c._namedListeners[a]||
j(a);c.addEventListener(a,d)};var f=d.removeEventListener;d.removeEventListener=function(a,d){c.removeEventListener(a,d);c._namedListeners[a]&&f(a)}}return d}function f(d){var c=JSON.parse(JSON.stringify(d.properties));c.__plugin__=a;d=d.names||d.type||[];Array.isArray(d)||(d=[d]);c.objectClass=d;return c}function u(a){var c=b(a),e=f(a),e=d.registerService(a.names||a.type,c,e);t[a.serviceId]={registration:e,proxy:c}}function o(){d.persist(a,{created:v,headers:w,services:y,autostart:q,lastModified:x})}
function n(a){var c;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var e=a.params[0];E({headers:e.headers,services:e.services}).then(function(){B.resolve(r)})}else if("dispatchEvent"===a.method){var j=t[a.serviceId].proxy;j.dispatchEvent.apply(j,a.params)}else if("progress"===a.method)c=D[String(a.requestId)],c.progress.apply(c,a.params);else if("timeout"===a.method)B&&B.reject(a.error);else throw Error("Bad response method: "+a.method);else if(c=D[String(a.id)],delete D[String(a.id)],
a.error){var l=d.handleServiceError(r,a.error);c.reject(l)}else c.resolve(a.result)}catch(b){console.log("Plugin._responseHandler "+b)}}var r=this,c=c||{},v=c.created||(new Date).getTime(),w=c.headers||{},y=c.services||[],q=c.autostart,x=c.lastModified||0,s="installed",z,B,A,t={},C=0,D={},E;this._persist=o;this._resolve=function(){s="resolved";d.dispatchEvent(new i("resolved",r))};this._getAutostart=function(){return q};this._getCreated=function(){return v};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(w))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return x};this.getServiceReferences=function(){var a=[];Object.keys(t).forEach(function(d){a.push(t[d].registration.getReference())});return a};this.getState=function(){return s};this.start=function(c){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));
if(z)return z.promise.then(this.start.bind(this,c));if(s==="active")return(new h).resolve();if(!c||!c["transient"]){var e=c&&c.lazy?"lazy":"started";e!==q&&(q=e,o())}e=d.getState();if(e!=="starting"&&e!=="active")return c["transient"]?(new h).reject(Error("start transient error")):(new h).resolve();if(s==="installed")try{this._resolve()}catch(j){return(new h).reject(j)}s==="resolved"&&y.forEach(function(a){u(a)});if(c&&c.lazy)return s!=="starting"&&(s="starting",d.dispatchEvent(new i("lazy activation",
r))),(new h).resolve();var l=new h;z=l;s="starting";d.dispatchEvent(new i("starting",r));B=new h;A=d.connect(a,n);B.then(function(){B=null;s="active";d.dispatchEvent(new i("started",r));z=null;l.resolve()},function(){B=null;s="stopping";d.dispatchEvent(new i("stopping",r));Object.keys(t).forEach(function(a){t[a].registration.unregister();delete t[a]});d.disconnect(A);A=null;s="resolved";z=null;d.dispatchEvent(new i("stopped",r));l.reject(Error("plugin activation error"))});return l.promise};this.stop=
function(a){if(s==="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"!==q)q="stopped",o();if(s!=="active"&&s!=="starting")return(new h).resolve();z=a=new h;s="stopping";d.dispatchEvent(new i("stopping",r));Object.keys(t).forEach(function(a){t[a].registration.unregister();delete t[a]});A&&(d.disconnect(A),A=null);s="resolved";z=null;d.dispatchEvent(new i("stopped",r));a.resolve();return a.promise};
E=function(c){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!c)return x===0&&(x=(new Date).getTime(),o()),d.loadManifest(a).then(E);var e=w,j=y,l=q;w=c.headers||{};y=c.services||{};q=c.autostart||q;c.lastModified?x=c.lastModified:(x=(new Date).getTime(),o());if(g(w,e)&&g(y,j)&&q===l)return(new h).resolve();if(s==="active"||s==="starting"){var b=[];Object.keys(y).forEach(function(a){var d=y[a];b.push(a);var c=t[a];if(c){if(g(d.methods,Object.keys(c.proxy))){var a=f(d),
e=c.registration.getReference(),j={};e.getPropertyKeys().forEach(function(a){j[a]=e.getProperty(a)});g(a,j)||c.registration.setProperties(a);return}c.registration.unregister();delete t[a]}u(d)});Object.keys(t).forEach(function(a){b.indexOf(a)===-1&&(t[a].registration.unregister(),delete t[a])})}s==="active"&&(d.disconnect(A),B=new h,A=d.connect(a,n),B.then(function(){B=null},function(){B=null;s="stopping";d.dispatchEvent(new i("stopping"),r);Object.keys(t).forEach(function(a){t[a].registration.unregister();
delete t[a]});d.disconnect(A);A=null;s="resolved";d.dispatchEvent(new i("stopped",r))}));return(new h).resolve()};this.update=function(a){return E(a).then(function(){d.dispatchEvent(new i("updated",r))})};this.uninstall=function(){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(s==="active"||s==="starting"||s==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));d.removePlugin(this);s="uninstalled";d.dispatchEvent(new i("uninstalled",
r));return(new h).resolve()}}var c=/^http[s]?/i;return{Plugin:e,PluginRegistry:function(a,j){function d(a){var d=a.source;u.some(function(c){if(d===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},l=j.storage||localStorage;l.getItem||(l=b(l));var m="installed",p=[],u=[],o=new k,n={},g={registerService:a.registerService.bind(a),connect:function(a,d,c){function e(a){a=
Error(a);a.name="timeout";d({method:"timeout",error:a})}var l={handler:d,url:a},b=setTimeout(e.bind(null,"Load timeout for: "+a),c||15E3),f=document.createElement("iframe");f.name=a+"_"+(new Date).getTime();if(!j.visible)f.style.display="none",f.style.visibility="hidden";f.src=a;f.onload=function(){clearTimeout(b);setTimeout(e.bind(null,"Plugin handshake timeout for: "+a),5E3)};f.sandbox="allow-scripts allow-same-origin";document.body.appendChild(f);l.target=f.contentWindow;l.close=function(){f&&
(document.body.removeChild(f),f=null)};u.push(l);return l},disconnect:function(a){for(var d=0;d<u.length;d++)if(a===u[d]){u.splice(d,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var d=0;d<p.length;d++)if(a===p[d]){p.splice(d,1);break}l.removeItem("plugin."+a.getLocation())},persist:function(a,d){l.setItem("plugin."+a,JSON.stringify(d))},postMessage:function(a,d){d.target.postMessage(d.useStructuredClone?a:JSON.stringify(a),d.url)},dispatchEvent:function(a){try{o.dispatchEvent(a)}catch(d){console&&
console.log("PluginRegistry.dispatchEvent "+d)}},loadManifest:function(a){var d=new h,c=g.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],g.disconnect(c),c=null,d.resolve(a)):"timeout"===a.method&&(g.disconnect(c),c=null,d.reject(a.error)))});return d.promise},getState:function(){return m},handleServiceError:function(a,d){if(d&&d.status===401){var e=a.getHeaders(),j=a.getName()||a.getLocation(),l=document.createElement("span");l.appendChild(document.createTextNode("Authentication required for: "+
j+"."));if(e.login)l.appendChild(document.createTextNode(" ")),j=document.createElement("a"),j.target="_blank",j.textContent="Login",j.href=e.login,c.test(j.href)?(l.appendChild(j),l.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+e.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(l)}}if(d.__isError){var b=d,d=Error(b.message);Object.keys(b).forEach(function(a){d[a]=b[a]});delete d.__isError}return d}};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=g.getState;this.init=function(){if(!(m==="starting"||m==="active"||m==="stopping")){addEventListener("message",d,!1);for(var a=[],c=0,b=l.length;c<b;c++)a.push(l.key(c));a.forEach(function(a){if(a.indexOf("plugin.")===0){var d=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&p.push(new e(d,a,g))}});
p.sort(function(a,d){return a._getCreated()<d._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=f(a);if(!this.getPlugin(a)){var d=j.plugins[a],d=typeof d==="object"||{};d.autostart=d.autostart||j.defaultAutostart||"lazy";p.push(new e(a,d,g))}}.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=[],d=(new Date).getTime();p.forEach(function(c){var e=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===e)return c.start({"transient":!0});if("lazy"===e)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===e?a.push(c.start({"transient":!0})):"lazy"===e?(a.push(c.start({lazy:!0,"transient":!0})),d>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=[];p.forEach(function(d){a.push(d.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",d);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,d){var a=f(a),c=this.getPlugin(a);if(c)return(new h).resolve(c);if(n[a])return n[a];if(d)return c=new e(a,d,g),p.push(c),
c._persist(),g.dispatchEvent(new i("installed",c)),(new h).resolve(c);var j=g.loadManifest(a).then(function(d){c=new e(a,d,g);p.push(c);c._persist();delete n[a];g.dispatchEvent(new i("installed",c));return c},function(d){delete n[a];throw d;});return n[a]=j};this.getPlugins=function(){return p.slice()};this.getPlugin=function(a){var d=null,a=f(a);p.some(function(c){if(a===c.getLocation())return d=c,!0});return d};this.addEventListener=o.addEventListener.bind(o);this.removeEventListener=o.removeEventListener.bind(o);
this.resolvePlugins=function(){var a=!0;p.forEach(function(d){a=a&&d._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(f,b){function i(d){var e=d.getProperty("service.id"),j=this.addingService(d);j&&(c[e]=d,a[e]=j)}function e(d){var e=d.getProperty("service.id"),j=a[e];delete c[e];delete a[e];this.removedService(d,j)}this.serviceRegistry=f;var c={},a={},j=k,d,l;this.close=function(){if(j!==g)throw"Already closed";j=k;f.removeEventListener("registered",d);f.removeEventListener("unregistering",l);l=d=null;var a=this;this.getServiceReferences().forEach(function(d){e.call(a,
d)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return c.length?Object.keys(c).map(function(a){return c[a]}):null};this.open=function(){if(j!==k)throw"Already open";j=g;var a=this;d=function(d){if(d.serviceReference.getProperty("objectClass").indexOf(b)!==-1&&(i.call(a,d.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(d.serviceReference,a.serviceRegistry.getService(d.serviceReference))};l=function(d){d.serviceReference.getProperty("objectClass").indexOf(b)!==
-1&&e.call(a,d.serviceReference)};f.addEventListener("registered",d);f.addEventListener("unregistering",l);f.getServiceReferences(b).forEach(function(d){i.call(a,d)});if(typeof this.onOpen==="function")this.onOpen()}}var k=0,g=1;h.prototype={addingService:function(f){return this.serviceRegistry.getService(f)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return h});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(h,k){var g,f,b,i,e,c="pid";g=function(a,d,e){function b(a,c,e){c.forEach(function(j,l){try{var b=a[l].getProperty("__plugin__"),f=b&&d.getPlugin(b);(!b||f&&f.getState()==="active")&&c[l].updated(e)}catch(i){typeof console!=="undefined"&&console.log(i)}})}k.call(this,a,"orion.cm.managedservice");var f={},i={},o=function(d){var b=[];d.plugin.getServiceReferences().forEach(function(d){if(d.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var f=d.getProperty(c),d=a.getService(d);f&&d&&(f=(f=e._find(f))&&f.getProperties(),b.push(d.updated(f)))}});return h.all(b)};this.addingService=function(d){var e=d.getProperty(c),l=a.getService(d);if(!e||!l)return null;f[e]||(f[e]=[]);i[e]||(i[e]=[]);f[e].push(d);i[e].push(l);return l};this.onServiceAdded=function(a,d){var j=a.getProperty(c),j=e._find(j);b([a],[d],j&&j.getProperties())};this.onOpen=function(){d.addEventListener("started",o)};this.onClose=function(){d.removeEventListener("started",
o)};this.notifyUpdated=function(a){var d=a.getPid();b(f[d]||[],i[d]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();b(f[a]||[],i[a]||[],null)};this.removedService=function(a,d){var e=a.getProperty(c),j=f[e],l=i[e];j.length>1?j.splice(j.indexOf(a),1):delete f[e];l.length>1?l.splice(l.indexOf(d),1):delete i[e]}};f=function(){function a(d,c,e){this.store=new b(this,e);this.configAdmin=new i(this,this.store);this.tracker=new g(d,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(c){a.tracker.open();return c})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();i=function(){function a(d,c){this.factory=d;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";
b=function(){function j(d,j){this.factory=d;this.prefsService=j;this.configs=Object.create(null);this.pref=null;var b=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){b.pref=a;a.keys().forEach(function(d){if(!b.configs[d]){var j=a.get(d);typeof j==="object"&&j!==null&&Object.keys(j).length>0&&(j[c]=d,b.configs[d]=new e(b.factory,b,j))}})})}j.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var c=this._find(a);
c||(c=new e(this.factory,this,a),this.configs[a]=c);return c},list:function(){var a=this,c=[];this.pref.keys().forEach(function(e){(e=a._find(e))&&e.getProperties()!==null&&c.push(e)});return c},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,c){this.pref.put(a,c.getProperties(!0)||{})}};return j}();e=function(){function a(d){for(var c={},e=Object.keys(d),j=0;j<e.length;j++){var b=e[j],f=d[b];c[b]=f instanceof Array?f.slice():f}return c}function d(d,e,b){this.factory=
d;this.store=e;if(b!==null&&typeof b==="object")this.pid=b[c],d=a(b),delete d[c],this.properties=d;else if(typeof b==="string")this.pid=b,this.properties=null;else throw Error("Invalid pid/properties "+b);}d.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(d){this._checkRemoved();var e=null;if(this.properties&&(e=a(this.properties),!d))e[c]=this.pid;return e},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(d){this._checkRemoved();d=a(d);delete d[c];this.properties=d;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return d}();return{ConfigurationAdminFactory:f}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,k,g,f,b,i){var e;return{startup:function(){if(e)return e;e=new k;var c=new g.ServiceRegistry,a=new f.PreferencesService(c);return a.getPreferences("/plugins").then(function(j){var d={plugins:{}};j.keys().forEach(function(a){var c=h.toUrl(a);d.plugins[c]=j[a]});var l=new b.PluginRegistry(c,d);return l.start().then(function(){if(c.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var d=[];a.keys().forEach(function(a){a=h.toUrl(a);l.getPlugin(a)||d.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return k.all(d,function(a){console.log(a)})})}).then(function(){return(new i.ConfigurationAdminFactory(c,l,a)).getConfigurationAdmin().then(c.registerService.bind(c,"orion.cm.configadmin"))}).then(function(){var a=c.getService("orion.core.auth");
if(a){var d=a.getUser().then(function(d){if(d)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),e=localStorage.getItem("lastLogin");if(!e||e<(new Date).getTime()-9E5)return d}}).then(function(){var d={serviceRegistry:c,preferences:a,pluginRegistry:l};e.resolve(d);return d})})}}});
define("orion/webui/littlelib",[],function(){function h(c,a){a||(a=document);return a.querySelectorAll(c)}function k(c,a){var e=c.compareDocumentPosition(a);return c===a||Boolean(e&16)}function g(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var a=0;a<c.childNodes.length;a++){var e=g(c.childNodes[a]);if(e)return e}return null}function f(c){if(c.tabIndex>=0)return c;if(c.hasChildNodes())for(var a=c.childNodes.length-1;a>=0;a--){var e=f(c.childNodes[a]);if(e)return e}return null}function b(c,
a){if(c.nodeType===3){var e=i.exec(c.nodeValue);e&&e.length>1&&a(c,e)}if(c.hasChildNodes())for(e=0;e<c.childNodes.length;e++)b(c.childNodes[e],a)}var i=/\$\{([^\}]+)\}/,e=[];return{$:function(c,a){a||(a=document);return a.querySelector(c)},$$:h,$$array:function(c,a){return Array.prototype.slice.call(h(c,a))},node:function(c){var a=c;typeof c==="string"&&(a=document.getElementById(c));return a},contains:k,bounds:function(c){c=c.getBoundingClientRect();return{left:c.left+document.body.scrollLeft,top:c.top+
document.body.scrollTop,width:c.width,height:c.height}},empty:function(c){for(;c.hasChildNodes();)c.removeChild(c.firstChild)},firstTabbable:g,lastTabbable:f,stop:function(c){window.document.all?c.keyCode=0:(c.preventDefault(),c.stopPropagation())},processTextNodes:function(c,a){b(c,function(c,d){c.parentNode.replaceChild(document.createTextNode(a[d[1]]||d[1]),c)})},processDOMNodes:function(c,a){b(c,function(c,d){var e=a[d[1]];if(e){var b=document.createRange(),f=d.index;b.setStart(c,f);b.setEnd(c,
f+d[0].length);b.deleteContents();b.insertNode(e)}})},addAutoDismiss:function(c,a){e.length===0&&document.addEventListener("click",function(a){for(var d=[],c=0;c<e.length;c++){var b=e[c].dismiss,f=!1,i;if(e[c].excludeNodes.every(function(d){return d&&(f=document.compareDocumentPosition(document,d)!==1)&&k(d,a.target)?(i=d,!1):!0})){try{b()}catch(o){typeof console!=="undefined"&&console&&console.error(o&&o.message)}f=document.compareDocumentPosition(document,i)!==1}f&&d.push(e[c])}e=d},!0);e.push({excludeNodes:c,
dismiss:a})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",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,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("text",["module"],function(h){var k,g,f=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,i=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,c=e&&location.protocol&&location.protocol.replace(/\:/,""),a=e&&location.hostname,j=e&&(location.port||void 0),d=[],l=h.config&&h.config()||{};k={version:"2.0.5",strip:function(a){if(a){var a=a.replace(b,""),d=a.match(i);d&&(a=d[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,d,c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(d=0;d<3;d+=1){c=f[d];try{a=new ActiveXObject(c)}catch(e){}if(a){f=[c];break}}return a},parseName:function(a){var d,
c,e=!1,b=a.indexOf(".");d=a.indexOf("./")===0||a.indexOf("../")===0;b!==-1&&(!d||b>1)?(d=a.substring(0,b),c=a.substring(b+1,a.length)):d=a;a=c||d;b=a.indexOf("!");b!==-1&&(e=a.substring(b+1)==="strip",a=a.substring(0,b),c?c=a:d=a);return{moduleName:d,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,d,c,e){var b,j;b=k.xdRegExp.exec(a);if(!b)return!0;a=b[2];b=b[3];b=b.split(":");j=b[1];b=b[0];return(!a||a===d)&&(!b||b.toLowerCase()===c.toLowerCase())&&(!j&&!b||j===e)},finishLoad:function(a,
c,e,b){e=c?k.strip(e):e;l.isBuild&&(d[a]=e);b(e)},load:function(d,b,f,i){if(i.isBuild&&!i.inlineText)f();else{l.isBuild=i.isBuild;var g=k.parseName(d),i=g.moduleName+(g.ext?"."+g.ext:""),r=b.toUrl(i),h=l.useXhr||k.useXhr;!e||h(r,c,a,j)?k.get(r,function(a){k.finishLoad(d,g.strip,a,f)},function(a){f.error&&f.error(a)}):b([i],function(a){k.finishLoad(g.moduleName+"."+g.ext,g.strip,a,f)})}},write:function(a,c,e){if(d.hasOwnProperty(c)){var b=k.jsEscape(d[c]);e.asModule(a+"!"+c,"define(function () { return '"+
b+"';});\n")}},writeFile:function(a,d,c,e,b){var d=k.parseName(d),j=d.ext?"."+d.ext:"",l=d.moduleName+j,f=c.toUrl(d.moduleName+j)+".js";k.load(l,c,function(){var d=function(a){return e(f,a)};d.asModule=function(a,d){return e.asModule(a,f,d)};k.write(a,l,d,b)},b)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)g=require.nodeRequire("fs"),k.get=function(a,d){var c=g.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));d(c)};else if(l.env===
"xhr"||!l.env&&k.createXhr())k.get=function(a,d,c,e){var b=k.createXhr(),j;b.open("GET",a,!0);if(e)for(j in e)e.hasOwnProperty(j)&&b.setRequestHeader(j.toLowerCase(),e[j]);if(l.onXhr)l.onXhr(b,a);b.onreadystatechange=function(){var e;if(b.readyState===4)e=b.status,e>399&&e<600?(e=Error(a+" HTTP status: "+e),e.xhr=b,c(e)):d(b.responseText)};b.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")k.get=function(a,d){var c,e,b=new java.io.File(a),j=java.lang.System.getProperty("line.separator"),
b=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(b),"utf-8")),l="";try{c=new java.lang.StringBuffer;(e=b.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(c.append(e);(e=b.readLine())!==null;)c.append(j),c.append(e);l=String(c.toString())}finally{b.close()}d(l)};return k});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,k,g){return{slideoutHTMLFragment:function(f){var b=document.createElement("div");b.innerHTML=g;var i=k.$("#slideContainer",b);i.id=f+i.id;i=k.$("#pageCommandParameters",b);i.id=f+i.id;i=k.$("#pageCommandDismiss",b);i.id=f+i.id;return b.innerHTML}}});
define("orion/util",[],function(){var h=navigator.userAgent,k=parseFloat(h.split("MSIE")[1])||void 0,g=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,f=h.indexOf("Opera")!==-1,b=parseFloat(h.split("Chrome/")[1])||void 0,i=h.indexOf("Safari")!==-1&&!b,e=parseFloat(h.split("WebKit/")[1])||void 0,c=h.indexOf("Android")!==-1,a=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,j=a||h,d=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var d=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return d[(c<<0)+1]})},createElement:function(a,d){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",d):a.createElement(d)},isIE:k,isFirefox:g,isOpera:f,isChrome:b,isSafari:i,isWebkit:e,isAndroid:c,isIPad:a,isIPhone:h,isIOS:j,isMac:d,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/keyBinding",["orion/util"],function(h){function k(f,b,i,e,c,a){this.type=a||"keydown";this.keyCode=typeof f==="string"&&this.type==="keydown"?f.toUpperCase().charCodeAt(0):f;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=i!==void 0&&i!==null?i:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=c!==void 0&&c!==null?c:!1}function g(f){this.keys=f}k.prototype={getKeys:function(){return[this]},match:function(f,b){if(b!==void 0){if(b!==0)return!1}else if(f instanceof Array){if(f.length>1)return!1;
f=f[0]}return f.type!==this.type?!1:this.keyCode===f.keyCode||this.keyCode===String.fromCharCode(h.isOpera?f.which:f.charCode!==void 0?f.charCode:f.keyCode)?this.mod1!==(h.isMac?f.metaKey:f.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==f.shiftKey?!1:this.mod3!==f.altKey?!1:h.isMac&&this.mod4!==f.ctrlKey?!1:!0:!1},equals:function(f){return!f?!1:this.keyCode!==f.keyCode?!1:this.mod1!==f.mod1?!1:this.mod2!==f.mod2?!1:this.mod3!==f.mod3?!1:this.mod4!==f.mod4?!1:this.type!==f.type?!1:!0}};g.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(f,b){var i=this.keys;if(b!==void 0)return b>i.length?!1:i[b].match(f)?b===i.length-1?!0:b+1:!1;else{f instanceof Array||(f=[f]);if(f.length>i.length)return!1;var e;for(e=0;e<f.length;e++)if(!i[e].match(f[e]))return!1;return e===i.length?!0:e}},equals:function(f){if(!f.keys)return!1;if(f.keys.length!==this.keys.length)return!1;for(var b=0;b<f.keys.length;b++)if(!f.keys[b].equals(this.keys[b]))return!1;return!0}};return{KeyBinding:k,KeyStroke:k,
KeySequence:g}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,k){function g(f){this._init(f)}g.prototype={_init:function(f){this._dropdownNode=k.node(f.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=f.populate;var b=this;this._triggerNode.addEventListener("click",function(f){b.toggle()&&k.stop(f)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(f){if(f.keyCode===k.KEY.ENTER||f.keyCode===k.KEY.SPACE)b.toggle(),k.stop(f)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")?this.close():this.open()},open:function(){this._populate&&(this.empty(),this._populate(this._dropdownNode));var f=this.getItems();if(f.length>0){if(!this._hookedAutoDismiss){var b=k.$$(".dropdownSubMenu",
this._dropdownNode);k.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(b)),this.close.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();f[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var f=k.bounds(this._dropdownNode),b=k.bounds(this._boundingNode(this._triggerNode));if(f.left+f.width>b.left+b.width)this._dropdownNode.style.right=
0},_boundingNode:function(f){return f.style.right!==""||f.style.position==="absolute"||!f.parentNode||!f.parentNode.style?f:this._boundingNode(f.parentNode)},close:function(f){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");f&&this._triggerNode.focus();return!0},getItems:function(){var f=[],b=this;k.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(i){i.parentNode.parentNode===b._dropdownNode&&
f.push(i)});return f},empty:function(){var f=this;k.$$array("li",this._dropdownNode).forEach(function(b){b.parentNode===f._dropdownNode&&b.parentNode.removeChild(b)})},_dropdownKeyDown:function(f){if(f.keyCode===k.KEY.UP||f.keyCode===k.KEY.DOWN||f.keyCode===k.KEY.RIGHT||f.keyCode===k.KEY.ENTER||f.keyCode===k.KEY.LEFT){var b=this.getItems(),i=document.activeElement;if(b.length&&b.length>0&&i){var e=b.indexOf(i);e<0&&(e=b.indexOf(i.parentNode));e>=0&&(f.keyCode===k.KEY.UP&&e>0?(e--,b[e].focus()):f.keyCode===
k.KEY.DOWN&&e<b.length-1?(e++,b[e].focus()):f.keyCode===k.KEY.ENTER||f.keyCode===k.KEY.RIGHT?i.classList.contains("dropdownTrigger")&&i.dropdown&&i.dropdown.open():f.keyCode===k.KEY.LEFT&&i.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),k.stop(f))}}else f.keyCode===k.KEY.ESCAPE&&(this.close(!0),k.stop(f))}};g.prototype.constructor=g;return{Dropdown:g}});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,k){function g(f){this._init(f)}g.prototype={_init:function(f){this._node=k.node(f.node);if(!this._node)throw"no dom node for tooltip found";this._position=f.position||["right","above","below","left"];this._text=f.text;this._hideDelay=f.hideDelay===void 0?200:f.hideDelay;this._tailSize=f.tailSize||10;this._trigger=f.trigger||"mouseover";this._afterShowing=f.afterShowing;this._afterHiding=f.afterHiding;var b=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(e){e.target===b._node&&(b.show(),k.stop(e))},!1);else if(this._trigger==="mouseover"){this._showDelay=f.showDelay===void 0?500:f.showDelay;f=["mouseout","click"];this._node.addEventListener("mouseover",function(e){k.contains(b._node,e.target)&&(b.show(),k.stop(e))},!1);for(var i=0;i<f.length;i++)this._node.addEventListener(f[i],function(e){k.contains(b._node,e.target)&&b.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var f=this;k.addAutoDismiss([this._tip,this._node],function(){f.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(f._timeout)window.clearTimeout(f._timeout),f._timeout=null;f._tip.addEventListener("mouseout",function(b){k.contains(f._tip,b.target)&&(f.hide(),k.stop(b))},!1)},!1)}return this._tip},_positionTip:function(f,b){this._makeTipNode();f==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var i=this._node,e;for(e=k.bounds(i);i&&!e.width&&!e.height;i=i.parentNode)e=
k.bounds(i);var i=k.bounds(this._tipInner),c;switch(f){case "above":c=e.top-i.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":c=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":c=e.top-this._tailSize/2;e=e.left-i.width-this._tailSize-1;break;default:c=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var a=k.bounds(document.documentElement);if(c+i.height>a.height)if(b)c=a.height-i.height-1;else return!1;if(e+i.width>a.width)if(b)e=a.width-i.width-
1;else return!1;if(e<0)if(b)e=4;else return!1;if(c<0)if(b)c=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+f),f==="above"||f==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),f==="left"))this._tail.style.left=i.width+"px";this._tip.style.top=c+"px";this._tip.style.left=e+"px";this._tip.style.width=i.width+"px";this._tip.style.height=i.height+"px";return!0},contentContainer:function(){this._makeTipNode();
return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var f=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var b=!1,i=0;!b&&i<f._position.length;)b=f._positionTip(f._position[i]),i++;b||f._positionTip(f._position[0],!0);f._tip.classList.add("tooltipShowing");f._afterShowing&&f._afterShowing()},this._showDelay)}},hide:function(f){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(f===void 0)f=this._hideDelay;var b=this;this._timeout=window.setTimeout(function(){b._tip.classList.remove("tooltipShowing");b._tip.removeAttribute("style");b._afterHiding&&b._afterHiding()},f)}},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}};g.prototype.constructor=g;return{Tooltip:g}});
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,k,g,f,b,i,e,c){function a(a,d){for(var c in d)if(d[c]&&d[c].keyBinding&&d[c].command&&d[c].keyBinding.match(a)){var e=d[c],b=e.keyBinding;if(!b.domScope||g.contains(g.node(b.domScope),a.target)){var j=e.invocation;if(j){var l=e.command;if(l.hrefCallback){g.stop(a);
c=l.hrefCallback.call(j.handler||window,j);c.then?c.then(function(a){window.open(a)}):window.open(c);break}else if(l.onClick||l.callback){g.stop(a);window.setTimeout(function(){(l.onClick||l.callback).call(j.handler||window,j)},0);break}}}}}function j(a,d,c){d.classList.add("commandImage");var e;a.imageClass?a.addImageClassToElement?d.classList.add(a.imageClass):(e=document.createElement("span"),d.appendChild(e),e.classList.add(a.spriteClass),e.classList.add(a.imageClass)):(e=new Image,e.alt=a.name,
e.name=c,e.id=c,e.src=a.image,d.appendChild(e));return e}function d(a,d,c,e,b){this.commandRegistry=b;this.handler=a;this.items=d;this.userData=c;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function l(a){this._init(a)}var m=null,p={};window.document.addEventListener("keydown",function(d){d=d||window.event;if(function(a){if(k.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}(d)){if(d.target.contentEditable==="true")return;var c=d.target.nodeName.toLowerCase();if(c==="input")switch(d.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 e,b,j;b=Object.keys(p);for(e=0;e<b.length;e++)j=b[e],c[j]=p[j];var l=m();b=Object.keys(l);for(e=0;e<b.length;e++)j=b[e],c[j]=l[j]}else c=p;a(d,c)},!1);d.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var c=new d(this.handler,this.items,this.userData,this.command,this.commandRegistry);c.domNode=this.domNode;c.domParent=this.domParent;if(a)c.parameters=a.makeCopy();else if(this.parameters)c.parameters=
this.parameters.makeCopy();return c}};d.prototype.constructor=d;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,
d,c,e,b){this.getChoices(d,c,e).forEach(function(c){if(c.name){var e=document.createElement("li");a.appendChild(e);var j=document.createElement("span");j.tabIndex=0;j.role="menuitem";j.classList.add("dropdownMenuItem");var l=document.createTextNode(c.name);j.appendChild(l);e.appendChild(j);j.choice=c;j.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,d)},!1);j.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&
a.target.choice&&a.target.choice.callback.call(a.target.choice,d)},!1)}else b._generateMenuSeparator(a)})},getChoices:function(a,d,c){return this.choiceCallback?this.choiceCallback.call(d,a,c):null},makeChoiceCallback:function(a,d){return function(c){a.callback&&a.callback.call(a,d,c)}},hasImage:function(){return this.imageClass||this.image!==h.toUrl("images/none.png")}};l.prototype.constructor=l;return{Command:l,CommandInvocation:d,createDropdownMenu:function(a,d,c,e,l,i){a=g.node(a);if(!a)throw"no parent node was specified";
var m=document.createRange();m.selectNode(a);m=m.createContextualFragment(b);g.processTextNodes(m,{ButtonText:d});a.appendChild(m);a=a.lastChild;m=a.previousSibling;e?m.classList.add(e):(m.classList.add("orionButton"),m.classList.add("commandButton"));if(l){if(!i)m.textContent="",m.setAttribute("aria-label",d);j({spriteClass:"commandSprite",imageClass:l},m,d);m.classList.add("orionButton")}m.dropdown=new f.Dropdown({dropdown:a,populate:c});a.dropdown=m.dropdown;return{menuButton:m,menu:a,dropdown:m.dropdown}},
createCheckedMenuItem:function(a,d,c,b){a=g.node(a);if(!a)throw"no parent node was specified";var j=document.createRange();j.selectNode(a);j=j.createContextualFragment(e);g.processTextNodes(j,{ItemText:d});a.appendChild(j);a=g.$(".checkedMenuItem",a.lastChild);a.checked=c;a.addEventListener("change",b,!1)},createCommandItem:function(a,d,e,b,l,f,i){var m,f=f||!d.name&&d.hasImage();if(d.hrefCallback)m=document.createElement("a"),m.id=b,f&&d.hasImage()?j(d,m,b):(m.className="commandLink",m.appendChild(document.createTextNode(d.name))),
i=d.hrefCallback.call(e.handler,e),i.then?i.then(function(a){m.href=a}):m.href=i?i:"#";else{m=document.createElement("button");m.className="orionButton";f?d.hasImage()?(j(d,m,b),d.name&&m.setAttribute("aria-label",d.name)):(m.classList.add("commandButton"),m.classList.add("commandMissingImageButton"),m.appendChild(document.createTextNode(d.name))):(m.classList.add("commandButton"),b=document.createTextNode(d.name),m.appendChild(b));var g=i||d.callback;if(g)d.onClick=g,m.addEventListener("click",function(){g.call(e.handler,
e)},!1)}a.nodeName.toLowerCase()==="ul"?(i=document.createElement("li"),a.appendChild(i),a=i):m.classList.add("commandMargins");a.appendChild(m);if(d.tooltip)m.commandTooltip=new c.Tooltip({node:m,text:d.tooltip,position:["above","below","right","left"]});l&&(p[d.id]={keyBinding:l,command:d,invocation:e});return m},createCommandMenuItem:function(a,d,e,b,j){var l,f=a.dropdown;if(d.hrefCallback)l=document.createElement("a"),l.appendChild(document.createTextNode(d.name)),j=d.hrefCallback.call(e.handler,
e),j.then?j.then(function(a){l.href=a}):l.href=j?j:"#";else{l=document.createElement("span");l.tabIndex=0;l.appendChild(document.createTextNode(d.name));var i=j||d.callback;if(i)d.onClick=i,l.addEventListener("click",function(){f.close(!0);i.call(e.handler,e)},!1)}if(d.tooltip)l.commandTooltip=new c.Tooltip({node:l,text:d.tooltip,position:["right","left","above","below"]});l.className="dropdownMenuItem";l.role="menuitem";j=document.createElement("li");a.appendChild(j);j.appendChild(l);b&&(p[d.id]=
{keyBinding:b,command:d,invocation:e});return l},setKeyBindingProvider:function(a){m=a},localKeyBindings:p,_testMethodProcessKey:a}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,k){function g(b){var f="",e=navigator.platform.indexOf("Mac")!==-1;b.mod1&&(f+=e?"Cmd+":"Ctrl+");b.mod2&&(f+="Shift+");b.mod3&&(f+="Alt+");b.mod4&&e&&(f+="Ctrl+");if(b.alphaKey)return f+b.alphaKey;if(b.type==="keypress")return f+b.keyCode;for(var c in k.KEY)if(typeof(k.KEY[c]==="number")&&k.KEY[c]===b.keyCode)return f+c;var a;switch(b.keyCode){case 59:a=b.mod2?":":";";break;case 61:a=b.mod2?"+":"=";break;case 188:a=
b.mod2?"<":",";break;case 190:a=b.mod2?">":".";break;case 191:a=b.mod2?"?":"/";break;case 192:a=b.mod2?"~":"`";break;case 219:a=b.mod2?"{":"[";break;case 220:a=b.mod2?"|":"\\";break;case 221:a=b.mod2?"}":"]";break;case 222:a=b.mod2?'"':"'"}return a?f+a:b.keyCode>=112&&b.keyCode<=123?f+"F"+(b.keyCode-111):f+String.fromCharCode(b.keyCode)}function f(b){var f=window.navigator.platform.indexOf("Mac")!==-1;return f&&b.metaKey||!f&&b.ctrlKey}return{getUserKeyString:function(b){for(var f="",b=b.getKeys(),
e=0;e<b.length;e++)e!==0&&(f+=" "),f+=g(b[e]);return f},getUserText:function(b,f,e,c,a,j,d,l,m){var g=!1,d=function(d){return function(l){if(!g){var h=k.node(b),u=h.value;if(h)if(d&&l.keyCode===k.KEY.ESCAPE){if(e)f.style.display="inline";g=!0;h.parentNode.removeChild(h);j&&j()}else if(!(d&&l.keyCode!==k.KEY.ENTER)){if(u.length===0||!m&&u===c){if(e)f.style.display="inline"}else a(u);g=!0;h.parentNode&&h.parentNode.removeChild(h);j&&j()}}}},h=document.createElement("input");h.id=b;h.value=c||"";f.parentNode.insertBefore(h,
f.nextSibling);h.classList.add("userEditBoxPrompt");if(e)f.style.display="none";h.addEventListener("keydown",d(!0),!1);h.addEventListener("blur",d(!1),!1);window.setTimeout(function(){h.focus();if(c){var a=k.node(b),d=l?c.indexOf(l):-1;if(d>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",d),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,d);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=d}else a.select()}},
0)},openInNewWindow:f,followLink:function(b,i){i&&f(i)?window.open(b):window.location=b},createButton:function(b,f){var e=document.createElement("button");e.className="orionButton commandButton commandMargins";e.addEventListener("click",function(c){f();k.stop(c)},!1);b&&e.appendChild(document.createTextNode(b));return e},createDropdownButton:function(){}}});
define("orion/PageUtil",[],function(){var h=/^(?:[a-zA-Z0-9-_.!~*'()#;,\/?:@&=+$\[\]]|%[0-9A-F][0-9A-F])*$/,k=/^http[s]?/i;return{matchResourceParameters:function(g){var g=g||window.location.toString(),f={resource:""},b=g.indexOf("#");if(b!==-1&&(g=g.substring(b+1),g.length!==0)){g=g.split(",");Object.defineProperty(f,"resourceRaw",{value:g[0]});f.resource=decodeURIComponent(g[0]);if(!f.resource.match(h))f.resource=encodeURI(f.resource).replace(/%5B/g,"[").replace(/%5D/g,"]");for(b=1;b<g.length;b++){var i=
/([^=]*)(=?)(.*)/.exec(g[b]),e=decodeURIComponent(i[1]||""),i=decodeURIComponent(i[3]||"");e!==""&&e!=="resource"&&(f[e]=i)}}return f},validateURLScheme:function(g,f){var b=g;if(g.indexOf("://")===-1){var i=document.createElement("a");i.href=g;b=i.href}i=!1;return(i=f?f.some(function(e){return RegExp("^"+e+":","i").test(b)}):k.test(b))?g:(console.log("Illegal URL Scheme: '"+g+"'"),"")}}});
define("orion/explorers/navigationUtils",[],function(){function h(g,f){if(!k&&g)g.push({domNode:f}),f.tabIndex=-1,f.style.outline="none"}var k=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(g,f,b){g&&(g=g.getGridNavHolder(f,!0))&&h(g,b)},generateNavGrid:h,removeNavGrid:function(g,f){if(g)for(var b=0;b<g.length;b++)if(g[b].domNode===f){g.splice(b,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,k,g,f,b,i,e,c,a,j,d){function l(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,d){this.token=a;this.parameterName=d}function p(a,d,c,e,b){this.name=a;this.type=d;this.label=c;this.value=e;this.lines=b||1}function u(a,d,c){this._storeParameters(a);this._hasOptionalParameters=d&&d.hasOptionalParameters;this._options=d;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=d&&d.clientCollect}l.prototype={_init:function(a){this._selectionService=a.selection;var d=this;k.setKeyBindingProvider(function(){return d._activeBindings})},processURL:function(a){for(var d in this._urlBindings)if(this._urlBindings[d]&&
this._urlBindings[d].urlBinding&&this._urlBindings[d].command){var c=this._urlBindings[d].urlBinding.match(a);if(c){var e=this._urlBindings[d],b=e.command,j=e.invocation;if(j&&j.parameters&&b.callback){j.parameters.setValue(c.parameterName,c.parameterValue);var l=this;window.setTimeout(function(){l._invoke(j)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,d,c,e){d?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(d):1)&&a.callback&&this._invoke(new k.CommandInvocation(c,
d,null,a,this),e):(d=this._urlBindings[a])&&d.command&&d.command.callback&&this._invoke(d.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,d,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,d,c))},confirm:function(a,d,c,e,b,j){var l=!1;if(this._parameterCollector&&!b){var f=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,b){var j=document.createElement("span");j.classList.add("parameterPrompt");j.textContent=d;a.appendChild(j);j=document.createElement("button");j.addEventListener("click",function(){l=!0;f._parameterCollector.close()},!1);b.appendChild(j);j.appendChild(document.createTextNode(c));j.className="dismissButton";var i=document.createElement("button");i.addEventListener("click",function(){l=!1;f._parameterCollector.close()},!1);b.appendChild(i);i.appendChild(document.createTextNode(e));i.className=
"dismissButton";return j},function(){j(l)}))return}l=window.confirm(d);j(l)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,d){return this._collectAndInvoke(a.makeCopy(d),!1)},_collectAndInvoke:function(a,d){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(d||a.parameters.shouldCollectParameters())){var c=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(c=this._parameterCollector.collectParameters(a),!c)){var e=new j.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),c=e.contentContainer();c.classList.add("parameterPopup");var b=window.document.activeElement,l=this._parameterCollector.getFillFunction(a,function(){b&&b.focus();e.destroy()})(c);e.show();window.setTimeout(function(){l.focus();l.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 d(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(){d(a)}}var e=
{},b,j,l=[],f;for(f in this._activeBindings)(j=this._activeBindings[f])&&j.keyBinding&&j.command&&l.push(j);l.sort(function(a,d){return a.command.name.localeCompare(d.command.name)});for(f=0;f<l.length;f++)j=l[f],j.keyBinding.scopeName?(e[j.keyBinding.scopeName]||(e[j.keyBinding.scopeName]=[]),e[j.keyBinding.scopeName].push(j)):(b=g.getUserKeyString(j.keyBinding),a.createItem(b,j.command.name,c(j)));for(var i in e)e[i].length&&e[i].length>0&&(a.createHeader(i),e[i].forEach(function(d){b=g.getUserKeyString(d.keyBinding);
a.createItem(b,d.command.name,c(d))}))},addCommand:function(a){this._commandList[a.id]=a;var d=this._pendingBindings[a.id];if(d){var c=this;d.forEach(function(d){c._addBinding(a,d.type,d.binding,d.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,d,c,e,b,j,l,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];b&&(a=this._createEntryForPath(a,b));if(a[d]){if(e)a[d].title=e;if(c)a[d].position=c;if(l)a[d].imageClass=
l;if(f)a[d].tooltip=f;a[d].emptyGroupMessage=j}else a[d]={title:e,position:c,emptyGroupMessage:j,imageClass:l,tooltip:f,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,d){d&&d.split("/").forEach(function(d){if(d.length>1)a[d]||(a[d]={position:0,children:{}}),a=a[d].children});return a},registerSelectionService:function(a,d){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=d},registerCommandContribution:function(a,
d,c,e,b,j,l){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[d]={position:c};j&&((c=this._commandList[d])?this._addBinding(c,"key",j,b):this._addPendingBinding(d,"key",j,b));l&&((c=this._commandList[d])?this._addBinding(c,"url",l,b):this._addPendingBinding(d,"url",l,b));a.sortedContributions=null},_addBinding:function(a,d,c,e){if(!a.id)throw Error("No command id: "+a);d==="key"?this._activeBindings[a.id]=
{command:a,keyBinding:c,bindingOnly:e}:d==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:e})},_addPendingBinding:function(a,d,c,e){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:d,binding:c,bindingOnly:e})},_checkForTrailingSeparator:function(a,d,c){var e;if(d==="tool"||d==="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(d===
"menu"&&(a=b.$$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,d,c,e,j,l,f){if(typeof a!=="string")throw"a scope id for rendering must be specified";d=b.node(d);if(!d)throw"no parent";var i=this._contributionsByScopeId[a];if(!c&&i){var c=i.localSelectionService||this._selectionService,m=this;c&&c.getSelections(function(c){m.renderCommands(a,
d,c,e,j,l)})}else i&&(this._render(this._contributionsByScopeId[a],d,c,e,j||"button",l,f),this._checkForTrailingSeparator(d,j,!0))},destroy:function(a){a=b.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var d=a.firstChild;d.commandTooltip&&d.commandTooltip.destroy();d.emptyGroupTooltip&&d.emptyGroupTooltip.destroy();this.destroy(d);a.removeChild(d)}},_render:function(a,c,e,b,l,f,i){var m=a.sortedContributions;if(!m){var m=[],g=!1,p;for(p in a)if(!a.hasOwnProperty||a.hasOwnProperty(p)){var h=
a[p];if(h&&typeof h.position==="number")h.id=p,m.push(h),g=!0}if(g)m.sort(function(a,d){return a.position-d.position}),a.sortedContributions=m}var u=0,t=this;m.forEach(function(a){var m,g;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){m=a.children;var p;if(l==="tool"||l==="button")if(a.title)p=t._createDropdownMenu(c,a.title,null,null,a.imageClass,a.tooltip),i&&d.generateNavGrid(i,p.menuButton),window.setTimeout(function(){t._render(a.children,p.menu,
e,b,"menu",f,i);t._checkForTrailingSeparator(p.menu,"menu",!0);if(p.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!p.menuButton.emptyGroupTooltip)p.menuButton.emptyGroupTooltip=new j.Tooltip({node:p.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else i&&d.removeNavGrid(i,p.menuButton),p.menu.parentNode&&p.menu.parentNode.removeChild(p.menu),p.destroyButton&&p.destroyButton.parentNode&&p.destroyButton.parentNode.removeChild(p.destroyButton);
else p.menuButton.style.visibility="visible"},0);else{var h;c.childNodes.length>0&&!t._checkForTrailingSeparator(c,l)&&(h=t.generateSeparatorImage(c));t._render(m,c,e,b,l,f,i);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==h&&(h=t.generateSeparatorImage(c))}else if(a.title){if(h=t._createDropdownMenu(c,a.title,!0,null,null,a.imageClass))t._render(m,h.menu,e,b,"menu",f,i),h.menu.childNodes.length===0&&h.destroyButton&&c.removeChild(h.destroyButton)}else c.childNodes.length>0&&t._generateMenuSeparator(c),
t._render(m,c,e,b,l,f,i),t._generateMenuSeparator(c)}else{var o=t._commandList[a.id];m=o?!0:!1;var s=null,s=null;if(o){g=new k.CommandInvocation(b,e,f,o,t);g.domParent=c;h=m&&(o.visibleWhen?o.visibleWhen(e):!0);if(t._activeBindings[o.id]&&t._activeBindings[o.id].keyBinding)s=t._activeBindings[o.id],s.invocation=h?g:null,s.bindingOnly&&(m=!1);if(t._urlBindings[o.id]&&t._urlBindings[o.id].urlBinding)s=t._urlBindings[o.id],s.invocation=h?g:null,s.bindingOnly&&(m=!1);m=m&&h}if(m)o.choiceCallback?(l===
"tool"||l==="button"?(m=c,h=!1,c.nodeName.toLowerCase()==="ul"&&(m=document.createElement("li"),c.appendChild(m))):(m=c,h=!0),t._createDropdownMenu(m,o.name,h,function(a){o.populateChoicesMenu(a,e,b,f,t)}.bind(o),o.imageClass,o.tooltip||o.title)):(g.handler=g.handler||this,g.domParent=c,h=function(){t._invoke(g)},l==="menu"?m=k.createCommandMenuItem(c,o,g,null,h):(m=l+o.id+u,m=k.createCommandItem(c,o,g,m,null,l==="tool",h)),d.generateNavGrid(i,m),g.domNode=m,u++)}})},_createDropdownMenu:function(a,
d,e,l,f,m){a=b.node(a);if(!a||!b.contains(document.body,a))return null;var g,h=a;if(e)m=document.createRange(),m.selectNode(a),m=m.createContextualFragment(c),b.processTextNodes(m,{ButtonText:d}),a.appendChild(m),g=a.lastChild,a=g.lastChild,d=a.previousSibling,d.dropdown=new i.Dropdown({dropdown:a,populate:l}),a.dropdown=d.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(h=document.createElement("li"),a.appendChild(h),g=h),a=null,f&&(a="dropdownButtonWithIcon",m=m||d),m=f?m||d:m,l=k.createDropdownMenu(h,
d,l,a,f),d=l.menuButton,a=l.menu,m)d.commandTooltip=new j.Tooltip({node:d,text:m,position:["above","below","right","left"]});return{menuButton:d,menu:a,dropdown:d.dropdown,destroyButton:g}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var d=document.createElement("li");d.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");d.appendChild(c);a.appendChild(d)}},generateSeparatorImage:function(a){var d;d=a.nodeName.toLowerCase()===
"ul"?document.createElement("li"):document.createElement("span");a.appendChild(d);d.classList.add("core-sprite-sep");d.classList.add("imageSprite");d.classList.add("commandSeparator");return d}};l.prototype.constructor=l;m.prototype={match:function(a){a=f.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;u.prototype=
{_storeParameters:function(a){this.parameterTable=null;if(a){var d=this.parameterTable={};a.forEach(function(a){d[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,d){var c=this.parameterTable[a];if(c)c.value=d},forEach:function(a){for(var d in this.parameterTable)this.parameterTable[d].type&&this.parameterTable[d].name&&a(this.parameterTable[d])},makeCopy:function(){var a=[];this.forEach(function(d){d=new p(d.name,d.type,d.label,d.value,d.lines);a.push(d)});var d=new u(a,this._options,this.getParameters);d.clientCollect=this.clientCollect;return d},hasOptionalParameters:function(){return this._hasOptionalParameters}};u.prototype.constructor=
u;return{CommandRegistry:l,URLBinding:m,ParametersDescription:u,CommandParameter:p}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,k,g){function f(b,f){this._activeContainer=null;this._getElementsFunction=b;this._toolbarLayoutFunction=f}f.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&g.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&g.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(b,f,e){typeof b==="string"&&(b=g.node(b));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===b)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(b))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var c=f(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!c)return!1;this._activeElements.focusNode=c;b=g.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(b.length===0){f=this._activeElements.dismissArea||
this._activeElements.parameterArea;b=document.createElement("button");b.id="closebox";b.className="imageSprite core-sprite-close dismissButton";b.title=h.Close;f.appendChild(b);var a=this;b.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(c)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){c.focus();c.select&&c.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(b,f){g.$$array("input",f).forEach(function(e){e.type==="checkbox"?b.parameters.setValue(e.parameterName,e.checked):e.type!=="button"&&b.parameters.setValue(e.parameterName,e.value.trim())});g.$$array("textArea",f).forEach(function(e){b.parameters.setValue(e.parameterName,e.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?
(b.domNode&&b.domNode.classList.add("commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(b,f){var e=this;return function(c,a){var j=null,d=function(){f&&f();e.close()},l=function(a){a.keyCode===g.KEY.ENTER&&e._collectAndCall(b,c);if(a.keyCode===g.KEY.ESCAPE||a.keyCode===g.KEY.ENTER)d(),g.stop(a)};b.parameters.forEach(function(a){var e=null;if(a.label)e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",a.name+
"parameterCollector"),e.textContent=a.label,c.appendChild(e);var b=a.name+"parameterCollector",f=e||c;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)e=document.createElement("textarea"),e.rows=a.lines,e.type="textarea",e.id=b,f.appendChild(e),l=function(a){a.keyCode===g.KEY.ESCAPE&&(d(),g.stop(a))};else if(a.type==="boolean"){if(e=document.createElement("input"),e.type="checkbox",e.id=b,f.appendChild(e),a.value)e.checked=!0}else if(e=document.createElement("input"),e.type=a.type,e.id=b,
f.appendChild(e),a.value)e.value=a.value;e.classList.add("parameterInput");e.setAttribute("speech","speech");e.setAttribute("x-webkit-speech","x-webkit-speech");e.parameterName=a.name;j||(j=e);e.addEventListener("keydown",l,!1)});var m=a;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",c.appendChild(m);var p=function(a,d){var c=document.createElement("button");d.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");return c};
if(b.parameters.hasOptionalParameters())b.parameters.optionsRequested=!1,p(h.More,m).addEventListener("click",function(){b.parameters.optionsRequested=!0;e._collectAndCall(b,c);d()},!1);p(h.Submit,m).addEventListener("click",function(){e._collectAndCall(b,c);d()},!1);m=p(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=h.Close;m.addEventListener("click",function(){d()},!1);return j}}};f.prototype.constructor=f;return{CommandParameterCollector:f}});
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(b,e){function c(a,d,c,e){var c=d.filename.indexOf(c)>=0,b=d.extension.indexOf(e)>=0;if(c||b)if(!a||c&&a.extension.indexOf(e)>=0)return d;return a}for(var a=b&&b.split(".").pop(),j=null,d=0;d<e.length;d++){var l=e[d];c(j,l,b,a)===l&&(j=l)}return j}function k(i){this.serviceRegistry=i;this.map=function(e){function c(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var e=e.getServiceReferences(f).concat(e.getServiceReferences(b)),
a={},j=0;j<e.length;j++)for(var d=c(e[j].getProperty("contentTypes")),l=0;l<d.length;l++){var i=d[l];a[i.id]||(a[i.id]={id:i.id,name:i.name,image:i.image,"extends":i["extends"],extension:c(i.extension),filename:c(i.filename)})}return a}(i);i.registerService(g,this)}var g="orion.core.contenttypes",f="orion.core.contenttype",b="orion.file.contenttype";k.prototype={getContentTypes:function(){var b=this.getContentTypesMap(),e=[],c;for(c in b)b.hasOwnProperty(c)&&e.push(b[c]);return e},getContentTypesMap:function(){return this.map},
getFileContentType:function(b){return h(b.Name,this.getContentTypes())},getFilenameContentType:function(b){return h(b,this.getContentTypes())},getContentType:function(b){return this.map[b]||null},isExtensionOf:function(b,e){b=typeof b==="string"?this.getContentType(b):b;e=typeof e==="string"?this.getContentType(e):e;if(!b||!e)return!1;if(b.id===e.id)return!0;else for(var c=b,a={};c&&(c=this.getContentType(c["extends"]));){if(c.id===e.id)return!0;if(a[c.id])throw Error("Cycle: "+c.id);a[c.id]=!0}return!1},
isSomeExtensionOf:function(b,e){for(var c=0;c<e.length;c++)if(this.isExtensionOf(b,e[c]))return!0;return!1}};return{ContentTypeService:k,getFilenameContentType:h}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}function k(a,c){if(c==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(c==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(c==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+c);}function g(a,c,d){for(var e=[],b=0;b<a.length;b++)typeof a[b]!=="undefined"&&
e.push(k(a[b],c));return e.join(d)}function f(a,c,d,e){for(var b=Object.keys(a),f=[],i=0;i<b.length;i++)typeof a[b[i]]!=="undefined"&&f.push(k(b[i],c)+d+k(a[b[i]],c));return f.join(e)}function b(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=e[a[0]])?a=a.substring(1):this._operator=e.NUL;for(var b=[],d=a.split(","),l=0;l<d.length;l++){var f=d[l].match(c);if(f===null)throw Error("Bad VarSpec: "+a);b.push({name:f[1],explode:!!f[2],prefix:f[3]?parseInt(f[3],
10):-1})}this._varSpecList=b}function i(a){for(var c=[],d=0,e=a.indexOf("{",d);e!==-1;){c.push(new h(a.substring(d,e)));d=a.indexOf("}",e+1);if(d===-1)throw Error("Invalid template: "+a);c.push(new b(a.substring(e+1,d)));d+=1;e=a.indexOf("{",d)}c.push(new h(a.substring(d)));this._templateComponents=c}var e={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-,"}},c=/^((?:(?:[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)}};b.prototype={expand:function(a){for(var c=[],d=
0;d<this._varSpecList.length;d++){var e=this._varSpecList[d],b=e.name,i=a[b],h=typeof i;if(h!=="undefined"&&i!==null){var o=c.length===0?this._operator.first:this._operator.sep;if(h==="string")this._operator.named&&(o+=k(b,"U+R"),o+=i.length===0?this._operator.ifemp:"="),e.prefix!==-1&&e.prefix<i.length&&(i=i.substring(0,e.prefix)),o+=k(i,this._operator.allow);else if(Array.isArray(i))e.explode?o+=g(i,this._operator.allow,this._operator.sep):(this._operator.named&&(o+=k(b,"U+R"),o+=i.length===0?this._operator.ifemp:
"="),o+=g(i,this._operator.allow,","));else if(h==="object")e.explode?o+=f(i,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(o+=k(b,"U+R"),o+=Object.keys(i).length===0?this._operator.ifemp:"="),o+=f(i,this._operator.allow,",",","));else throw Error("bad param type: "+b+" : "+h);c.push(o)}}return c.join("")}};i.prototype={expand:function(a){for(var c=[],d=0;d<this._templateComponents.length;d++)c.push(this._templateComponents[d].expand(a));return c.join("")}};return i});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,k){function g(b){if(b=localStorage.getItem("orion/messageBundle/"+b))if(b=JSON.parse(b),b._expires&&b._expires>(new Date).getTime())return delete b._expires,b;return null}var f={};return{getMessageBundle:function(b){function i(){h(["i18n!"+b],function(a){if(a){var d=b;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+d,JSON.stringify(a));delete a._expires}e.resolve(a)})}if(f[b])return f[b];var e=new k;f[b]=
e;var c=g(b);if(c)return e.resolve(c),e;try{h([b],i)}catch(a){h(["orion/i18n!"+b],i)}return e},formatMessage:function(b){var f=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(e,c){return f[(c<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,k,g,f,b){function i(){return(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function e(c,a){var e=c.getServiceReferences(a||"orion.page.link"),d=g.matchResourceParameters(window.location.href),l={OrionHome:i(),Location:d.resource},m=[];e.forEach(function(a){var d={};a.getPropertyKeys().forEach(function(c){d[c]=a.getProperty(c)});if(d.uriTemplate&&
d.nls&&(d.name||d.nameKey)){var c=new k;b.getMessageBundle(d.nls).then(function(a){var e=new f(d.uriTemplate),e=window.decodeURIComponent(e.expand(l)),e=g.validateURLScheme(e);d.href=e;d.textContent=d.nameKey?a[d.nameKey]:d.name;c.resolve(d)});m.push(c)}else if(d.uriTemplate&&d.name){var e=new f(d.uriTemplate),e=window.decodeURIComponent(e.expand(l)),e=g.validateURLScheme(e);d.href=e;d.textContent=d.name;m.push((new k).resolve(d))}});return k.all(m)}return{createPageLinks:function(c,a){return e(c,
a).then(function(a){a.sort(function(a,c){var e=a.textContent&&a.textContent.toLowerCase(),b=c.textContent&&c.textContent.toLowerCase();return e<b?-1:e>b?1:0});return a.map(function(a){var c=a.href,a=a.textContent,e=document.createElement("a");e.href=c;e.target="_self";e.classList.add("targetSelector");e.textContent=a;return e})})},getPageLinksInfo:e,getOrionHome:i}});
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,k,g,f,b,i,e,c,a){var j={},d=a.getOrionHome();j._cloneItemWithoutChildren=function p(a){if(a===null||typeof a!=="object")return a;var d=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(d[c]=p(a[c]));return d};j._getOpenWithNavCommandExtensions=function(a){function d(a,c){for(var e=a.getServiceReferences("orion.navigate.openWith"),
b=[],j=0;j<e.length;j++){var f=e[j];f.getProperty("editor")===c.id&&(f=f.getProperty("contentType"),f instanceof Array?b=b.concat(f):f!==null&&typeof f!=="undefined"&&b.push(f))}return b}for(var c=function(){for(var d=a.getServiceReferences("orion.edit.editor"),c=[],e=0;e<d.length;e++){var b=d[e],j=b.getProperty("id");c.push({id:j,name:b.getProperty("name"),nameKey:b.getProperty("nameKey"),nls:b.getProperty("nls"),uriTemplate:b.getProperty("orionTemplate")||b.getProperty("uriTemplate")})}return c}(),
e=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),b=[],j=0;j<c.length;j++){var f=c[j],l=e&&e.editor===f.id,i=d(a,f);i.length&&b.push({properties:{name:f.name||f.id,nameKey:f.nameKey,id:"eclipse.openWithCommand."+f.id,tooltip:f.name,tooltipKey:f.nameKey,contentType:i,uriTemplate:f.uriTemplate,nls:f.nls,forceSingleItem:!0,isEditor:l?"default":"editor"},service:{}})}return b};j._makeValidator=function(a,
c,e,j){function f(a,d,c,e){var b=c.match,j;if(d.indexOf("|")>=0)return j=d.substring(0,d.indexOf("|")),d=d.substring(d.indexOf("|")+1),f(a,j,c,e)?!0:f(a,d,c,e);else if(d.indexOf(":")>=0)return j=d.substring(0,d.indexOf(":")),d=d.substring(d.indexOf(":")+1),a[j]?f(a[j],d,c,e):!1;else{a:{j=!1;var l;if(typeof a[d]!=="undefined"){if(typeof b==="undefined")l=a[d],j=!0;else if(typeof b==="string"){if(!typeof(a[d]==="string")){c=!1;break a}if(c.variableName){if(b=RegExp(b).exec(a[d]))j=b[0],l=c.variableMatchPosition===
"before"?a[d].substring(0,b.index):c.variableMatchPosition==="after"?a[d].substring(b.index+j.length):c.variableMatchPosition==="only"?j:a[d],j=!0}else{c=RegExp(b).test(a[d]);break a}}else a[d]===b&&(l=a[d],j=!0);if(j&&c.variableName&&(e[c.variableName]=l,e.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)d=!1,c.replacements[a].pattern?e[c.variableName]=e[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):d=!0,d&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=j}else c=!1}return c}}return{info:a,validationFunction:function(d){typeof j==="function"&&(d=j.call(this,d));if(d){if(Array.isArray(d)){if((this.info.forceSingleItem||this.info.uriTemplate)&&d.length!==1)return!1;if(d.length<1)return!1}else d=[d];for(var c=0;c<d.length;c++){var l;a:{var i=d[c],g=e;if(this.info.validationProperties)for(l=0;l<this.info.validationProperties.length;l++){var h=this.info.validationProperties[l];if(typeof h.source!=="undefined"){if(!f(i,h.source,h,this)){l=
!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");l=!1;break a}}if(this.info.contentType&&g){h=!1;if(i=b.getFilenameContentType(i.Name,g))for(l=0;l<this.info.contentType.length;l++)if(i.id===this.info.contentType[l]){h=!0;break}l=h}else l=!0}if(!l)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var c={},e;for(e in a)a.hasOwnProperty(e)&&(c[e]=a[e]);if(this.info.validationProperties)for(e=
0;e<this.info.validationProperties.length;e++){var b=this.info.validationProperties[e];b.source&&b.variableName&&(this.itemCached===a&&this[b.variableName]||f(a,b.source,b,this),a[b.variableName]?window.console.log("Variable name "+b.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):c[b.variableName]=this[b.variableName])}c.OrionHome=d;a=new i(this.info.uriTemplate);return window.decodeURIComponent(a.expand(c))}return null}}};j._createCommandOptions=
function(a,d,c,b,f,l){function i(e,g){var h=j._makeValidator(a,c,b,l);e.visibleWhen=h.validationFunction.bind(h);if(f)if(h.generatesURI.bind(h)())e.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var k=a;e.callback=function(a){var b;if(k.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,b=j._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){b=[];for(var f=0;f<a.items.length;f++)b.push(j._cloneItemWithoutChildren(a.items[f]))}else b=
j._cloneItemWithoutChildren(a.items);if(c)var l=c.getService("orion.page.progress");d.run?l?l.progress(d.run(b),"Running command: "+e.name):d.run(b):c&&(l?l.progress(c.getService(d).run(b),"Running command: "+e.name):c.getService(d).run(b))}}g.resolve(e)}var g=new k;a.nls?e.getMessageBundle(a.nls).then(function(d){i({name:a.nameKey?d[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?d[a.tooltipKey]:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},g)}):i({name:a.name,image:a.image,
id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},g);return g};j.getOpenWithCommands=function(a){var d=[],c;for(c in a._commandList){var e=a._commandList[c];e.isEditor&&d.push(e)}return d};var l;j.createAndPlaceFileCommandsExtension=function(a,d,c,e,b,f){var l=!!f;return j.createFileCommands(a,null,f?"all":void 0,l).then(function(a){d._addedOpenWithCommands=l;var j=!1,f=!1;a.forEach(function(a){d.addCommand(a);b&&!j&&(j=!0,d.addCommandGroup(c,"eclipse.fileCommandExtensions",
1E3,null,b));b&&!f&&(f=!0,d.addCommandGroup(c,"eclipse.openWith",1E3,"Open With",b+"/eclipse.fileCommandExtensions"));this.isEditor?d.registerCommandContribution(c,a.id,e+this.index,b?b+"/eclipse.fileCommandExtensions/eclipse.openWith":null):d.registerCommandContribution(c,a.id,e+this.index,b?b+"/eclipse.fileCommandExtensions":null)});return{}})};j.createFileCommands=function(a,d,c,e){var c=c===void 0?"global":c,e=e===void 0?!0:e,b=a.getServiceReferences("orion.navigate.command"),f=[];if(c==="all"||
c==="global")for(var i=0;i<b.length;i++)if(b[i].getProperty("id")!=="orion.navigateFromMetadata"){for(var h=a.getService(b[i]),q={},x=b[i].getPropertyKeys(),s=0;s<x.length;s++)q[x[s]]=b[i].getProperty(x[s]);(c==="all"||q.forceSingleItem&&q.showGlobally)&&f.push({properties:q,service:h})}return k.when(function(){var c=a.getService("orion.core.contenttypes")||d;return l||k.when(c.getContentTypes(),function(a){return l=a})}(),function(){f=e?f.concat(j._getOpenWithNavCommandExtensions(a,l)):f;var d=f.map(function(d){var c=
d.properties;return j._createCommandOptions(c,d.service,a,l,!0).then(function(a){a=new g.Command(a);if(c.isEditor)a.isEditor=c.isEditor;return a})});return k.all(d,function(a){return{_error:a}}).then(function(a){return a})})};j.createOpenWithCommands=function(a,d,c){return c&&c._addedOpenWithCommands?(new k).resolve(j.getOpenWithCommands(c)):j.createFileCommands(a,d,"none",!0)};return j});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,k){function g(f){this._init(f)}g.prototype={_init:function(f){var b=k.node(f.container);if(!b)throw"no parent container";this._container=b;b.classList.remove("currentLocation");this._id=f.id||"eclipse.breadcrumbs";this._resource=f.resource||null;this._rootSegmentName=f.rootSegmentName;this._workspaceRootSegmentName=f.workspaceRootSegmentName;this._workspaceRootURL=f.workspaceRootURL;this._makeHref=f.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var f;if(this._resource&&this._resource.Parents){f=document.createElement("a");var b=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(f,b):f.href=h.toUrl("navigate/table.html")+"#"+b}else f=document.createElement("span");k.empty(f);f.appendChild(document.createTextNode(this._workspaceRootSegmentName));return f}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],
buildSegment:function(f){var b=document.createElement("a");b.classList.add("breadcrumb");b.appendChild(document.createTextNode(f));return b},addSegmentHref:function(f,b){this._makeHref?this._makeHref(f,b.Location,b):f.href=h.toUrl("navigate/table.html")+"#"+b.ChildrenLocation},buildSegments:function(f,b){if(this._resource.Parents){var i=this._resource.Parents.slice(0),e,c;i&&(i=i.slice(0),b==="reverse"&&(i=i.reverse().slice(0)),i.forEach(function(a){f?(c=f,f=null):c=a.Name;e=this.buildSegment(c);
this.path+=a.Name;this.addSegmentHref(e,a);e.include=!1;this.segments.push(e)}.bind(this)))}},addDivider:function(){var f=document.createElement("span");f.appendChild(document.createTextNode(" / "));this.path+="/";f.classList.add("breadcrumbSeparator");this.append(f)},refresh:function(){(this.crumbs=k.node(this._id))?k.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(f){this.crumbs.appendChild(f)},addTitle:function(f,b){var i=b||document.title;this.crumbs.childNodes.length===0&&(f=document.createElement("span"),f.appendChild(document.createTextNode(i)),f.classList.add("breadcrumb"),f.classList.add("currentLocation"),
this.append(f))},finalSegment:function(f,b){f=document.createElement("span");b?f.appendChild(document.createTextNode(b)):f.appendChild(document.createTextNode(this._resource.Name));f.classList.add("currentLocation");this.path+=this._resource.Name;this.append(f)},firstSegment:function(f){if(f)this.append(f),this._resource&&this._resource.Parents?(f.classList.add("breadcrumb"),this.addDivider()):(f.href="",f.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(f){f.include===
!0&&(this.append(f),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var f=this.segments.slice(0).reverse();f.forEach(function(b){this.append(b);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?b.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=f.reverse()}},measure:function(){this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var f=this.getNavigatorWorkspaceRootSegment(),b=this._rootSegmentName;
if(b)this.addTitle(f,b);else if(this.finalSegment(f,b),this._resource&&this._resource.Parents&&(this.buildSegments(b,"reverse"),this.measureSegments(),this.firstSegment(f)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var f=this.getNavigatorWorkspaceRootSegment(),b=this._rootSegmentName;b?this.addTitle(f,b):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(f),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(f,
b)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};g.prototype.constructor=g;return{BreadCrumbs:g}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(h,k){function g(f){this._init(f)}g.prototype={_init:function(f){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=k.node(f.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=k.node(f.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=k.node(f.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=f.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(f.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add("splitThumbLayout");this._closeByDefault=f.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(f){this._resizeListeners.push(f)},_initializeFromStoredSettings:function(){var f=localStorage.getItem(this._prefix+"/toggleState");this._closed=f?f==="closed":this._closeByDefault?
!0:!1;if(this._vertical)if(f=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(f,10);else{if(this._closeByDefault)this._splitTop=150}else if(f=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(f,10);else if(this._closeByDefault)this._splitLeft=150},_adjustToSplitPosition:function(f){var b=k.bounds(this.$node),i=k.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=b.height;if(f||!this._splitTop)this._splitTop=b.top,localStorage.setItem(this._prefix+
"/yPosition",this._splitTop);f=this._splitTop;this.$node.parentNode.style.position==="relative"&&(f=this._splitTop-i.top);this.$sideNode.style.height=f+"px";this.$sideNode.style.bottom=f-1+"px";this.$sideNode.style.display="block";this.$node.style.top=f+"px"}else{this._splitWidth=b.width;if(f||!this._splitLeft)this._splitLeft=b.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);f=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(f=this._splitLeft-i.left);this.$sideNode.style.width=
f+"px";this.$sideNode.style.right=f-1+"px";this.$sideNode.style.display="block";this.$node.style.left=f+"px"}this._resize()},_resize:function(f){var f=f||0,b=k.bounds(this.$node.parentNode),i=k.bounds(this.$node);this._vertical?this.$mainNode.style.height=b.height-(i.top-b.top+i.height)+"px":this.$mainNode.style.width=b.width-(i.left-b.left+i.width)+"px";var e=this;window.setTimeout(function(){e._notifyResizeListeners(e.$mainNode)},f);window.setTimeout(function(){e._notifyResizeListeners(e.$sideNode)},
f)},_notifyResizeListeners:function(f){for(var b=0;b<this._resizeListeners.length;b++)this._resizeListeners[b](f)},_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 f=this;window.setTimeout(function(){f.$sideNode.classList.remove("sidePanelLayoutAnimation");f.$mainNode.classList.remove("mainPanelLayoutAnimation");f.$node.classList.remove("splitLayoutAnimation");f._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(f){if(f.target===this._thumb)return k.stop(f),this._thumbDown(f);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),
k.stop(f)},_mouseMove:function(f){if(this._tracking){var b=k.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=f.clientY;if(this._splitTop<b.top+5)this._splitTop=b.top+5;else if(this._splitTop>b.top+b.height-5)this._splitTop=b.top+b.height-5;var i=this._splitTop;this.$node.parentNode.style.position==="relative"&&(i=this._splitTop-b.top);this.$node.style.top=i+"px"}else{this._splitLeft=f.clientX;if(this._splitLeft<b.left+5)this._splitLeft=b.left+5;else if(this._splitLeft>b.left+b.width-
5)this._splitLeft=b.left+b.width-5;i=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(i=this._splitLeft-b.left);this.$node.style.left=i+"px"}this._adjustToSplitPosition(!0);k.stop(f)}},_mouseUp:function(f){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"),k.stop(f)}};g.prototype.constructor=g;return{Splitter:g}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(h){return{makeRelative:function(h){if(!h)return h;var g=window.location.protocol+"//"+window.location.host;return h.indexOf(g)===0?h.substring(g.length):h},isAtRoot:function(k){if(!k)return!1;if(k==="/workspace")return!0;var g=new URL(h.toUrl("workspace"),window.location.href);return(new URL(k,window.location.href)).href.indexOf(g.href)===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(h,k,g){function f(b){this._favorites=[];g.attach(this);this._init(b);this._initializeFavorites()}f.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(b){for(var b=Array.isArray(b)?
b:[b],f=0;f<b.length;f++){var e=b[f],c=e.ChildrenLocation?e.ChildrenLocation:e.Location,c=k.makeRelative(c);this.addFavorite(e.Name,c,e.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(b){this.addFavorite(b,b,!1,!0)},addFavorite:function(b,f,e){this._favorites.push({name:b,path:f,directory:e,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(b){for(var f in this._favorites)if(this._favorites[f].path===
b){this._favorites.splice(f,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(b,f){var e=!1,c;for(c in this._favorites)if(this._favorites[c].path===b){var a=this._favorites[c];if(a.name!==f)a.name=f,e=!0}e&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(b){for(var f in this._favorites)if(this._favorites[f].path===b)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(b){var f;
if(!b)return this._favorites;var e="";for(f=0;f<b.length;f++){var c=b.charAt(f);e+=c==="*"?".*":c==="?"?".?":this._SPECIAL_CHARS.indexOf(c)>=0?"\\"+c:c}e+=".*";b=RegExp(e);e=[];for(f in this._favorites)this._favorites[f].name.search(b)===0&&e.push(this._favorites[f]);return e},_initializeFavorites:function(){var b=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var e,f=f.get("navigate");typeof f==="string"&&(f=JSON.parse(f));if(f)for(e in f)f[e].isFavorite=
!0,b._favorites.push(f[e]);b._favorites.sort(b._sorter);b._notifyListeners()})},_storeFavorites:function(){var b=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){f.put("navigate",b)})},_sorter:function(b,f){var e=b.name.toLowerCase(),c=f.name.toLowerCase();return e>c?1:e<c?-1:0},getFavorites:function(){return{navigator:this._favorites}}};f.prototype.constructor=f;return{FavoritesService:f}});
define("orion/widgets/themes/ThemePreferences",[],function(){function h(h,g){this._preferences=h;this._themeData=g;var f=g.getThemeStorageInfo(),b=h.listenForChangedSettings(f.storage,2,function(f){f.key===b&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,g,f){var b=f.get(h.styleset);b||(b=g.getStyles(),f.put(h.styleset,JSON.stringify(b)));(g=f.get("selected"))&&(g=JSON.parse(g));if(!g||g[h.selectedKey]===void 0)g=g||{},g[h.selectedKey]=h.defaultTheme,f.put("selected",JSON.stringify(g))},
apply:function(){this.setTheme()},getTheme:function(h){var g=this._themeData,f=g.getThemeStorageInfo();this._preferences.getPreferences(f.storage,2).then(function(b){this._initialize(f,g,b);var i=JSON.parse(b.get("selected")),b=JSON.parse(b.get(f.styleset)),e;if(b)for(var c=0;c<b.length;c++)if(b[c].name===i[f.selectedKey]){e=b[c];break}h({style:e,styles:b})}.bind(this))},setTheme:function(h,g){var f=this._themeData,b=f.getThemeStorageInfo();this._preferences.getPreferences(b.storage,2).then(function(i){this._initialize(b,
f,i);var e=JSON.parse(i.get("selected"));h||(h=e[b.selectedKey]);e[b.selectedKey]=h;i.put("selected",JSON.stringify(e));g?i.put(b.styleset,JSON.stringify(g)):g=JSON.parse(i.get(b.styleset));for(i=0;i<g.length;i++)if(g[i].name===e[b.selectedKey]){f.processSettings(g[i]);break}}.bind(this))},setFontSize:function(h){var g=this._themeData,f=g.getThemeStorageInfo();this._preferences.getPreferences(f.storage,2).then(function(b){this._initialize(f,g,b);var i=JSON.parse(b.get("selected")),e=JSON.parse(b.get(f.styleset)),
c;if(e)for(var a=0;a<e.length;a++)e[a].fontSize=h,e[a].name===i[f.selectedKey]&&(c=e[a]);b.put(f.styleset,JSON.stringify(e));g.processSettings(c)}.bind(this))}};return{ThemePreferences:h}});
define("orion/editor/eventTarget",[],function(){function h(){}h.addMixin=function(k){var g=h.prototype,f;for(f in g)g.hasOwnProperty(f)&&(k[f]=g[f])};h.prototype={addEventListener:function(h,g,f){if(!this._eventTypes)this._eventTypes={};var b=this._eventTypes[h];b||(b=this._eventTypes[h]={level:0,listeners:[]});b.listeners.push({listener:g,useCapture:f})},dispatchEvent:function(h){var g=h.type;this._dispatchEvent("pre"+g,h);this._dispatchEvent(g,h);this._dispatchEvent("post"+g,h)},_dispatchEvent:function(h,
g){var f=this._eventTypes?this._eventTypes[h]:null;if(f){var b=f.listeners;try{if(f.level++,b)for(var i=0,e=b.length;i<e;i++)if(b[i]){var c=b[i].listener;typeof c==="function"?c.call(this,g):c.handleEvent&&typeof c.handleEvent==="function"&&c.handleEvent(g)}}finally{if(f.level--,f.compact&&f.level===0){for(i=b.length-1;i>=0;i--)b[i]||b.splice(i,1);b.length===0&&delete this._eventTypes[h];f.compact=!1}}}},isListening:function(h){return!this._eventTypes?!1:this._eventTypes[h]!==void 0},removeEventListener:function(h,
g,f){if(this._eventTypes){var b=this._eventTypes[h];if(b){for(var i=b.listeners,e=0,c=i.length;e<c;e++){var a=i[e];if(a&&a.listener===g&&a.useCapture===f){b.level!==0?(i[e]=null,b.compact=!0):i.splice(e,1);break}}i.length===0&&delete this._eventTypes[h]}}}};return{EventTarget:h}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(h,k,g){function f(b){b=b||{};this._document=b.document||document}var b={};f.getTheme=function(i){var i=i||"default",e=b[i];e||(e=b[i]=new f);return e};f.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(b,e){var c=this,a=c._themeClass;c._themeClass=b;this._load(b,e,function(){c.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:c.getThemeClass()})})},onThemeChanged:function(b){return this.dispatchEvent(b)},
buildStyleSheet:function(b,e){function c(c,d,e){d&&(a.push("."+b+" ."+c+" {"),a.push("\t"+(e?"background-color":"color")+": "+d+";"),a.push("}"))}var a=[];a.push("");a.push("."+b+" {");e.fontFamily&&a.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&a.push("\tfont-size: "+e.fontSize+";");e.fontSize&&a.push("\tcolor: "+e.text+";");a.push("}");a.push("."+b+".textview {");e.background&&a.push("\tbackground-color: "+e.background+";");a.push("}");c("ruler.annotations",e.annotationRuler,!0);c("ruler.lines",
e.annotationRuler,!0);c("ruler.folding",e.annotationRuler,!0);c("ruler.overview",e.overviewRuler,!0);c("rulerLines",e.lineNumber,!1);c("rulerLines.even",e.lineNumberEven,!1);c("rulerLines.odd",e.lineNumberOdd,!1);c("annotationLine.currentLine",e.currentLine,!0);c("entity-name-tag",e.keyword,!1);c("entity-other-attribute-name",e.attribute,!1);c("string-quoted",e.string,!1);c("line_caret",e.currentLine,!0);c("token_keyword",e.keyword,!1);c("token_string",e.string,!1);c("token_singleline_comment",e.comment,
!1);c("token_multiline_comment",e.comment,!1);c("token_doc_comment",e.comment,!1);c("token_doc_html_markup",e.comment,!1);return a.join("\n")},_createStyle:function(b,e,c,a){var f=this._document,b="orion-theme-"+b,d=f.getElementById(b);if(d){if(a||d.firstChild.data===e)return;d.removeChild(d.firstChild);d.appendChild(f.createTextNode(e))}else a?(d=g.createElement(f,"link"),d.rel="stylesheet",d.type="text/css",d.href=e,d.addEventListener("load",function(){c()})):(d=g.createElement(f,"style"),d.appendChild(f.createTextNode(e))),
d.id=b,(f.getElementsByTagName("head")[0]||f.documentElement).appendChild(d);a||c()},_load:function(b,e,c){if(b)if(typeof e==="string")this._createStyle(b,e,c);else if(e=e.href,e.substring(e.length-4)!==".css"&&(e+=".css"),/^\//.test(e)||/[a-zA-Z0-9]+:\/\//i.test(e)||!h.toUrl)this._createStyle(b,e,c,!0);else{var a=this;h(["text!"+e],function(e){a._createStyle(b,e,c,!1)})}else c()}};k.EventTarget.addMixin(f.prototype);return{TextTheme:f}});
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 k(){}k.prototype.navbar="#333";k.prototype.button="#777777";k.prototype.location="#EFEFEF";k.prototype.selection="FEC";k.prototype.sidepanel="#FBFBFB";k.prototype.mainpanel="white";k.prototype.navtext="#bfbfbf";k.prototype.content="#3087B3";k.prototype.search="#444";k.prototype.toolpanel="white";k.prototype.writeNavigationStyle=function(){var g="",f=[],b=new h.ThemeClass("orionPage");
b.style.backgroundColor="#fdfdfd";b.style.width="100%";b.style.height="100%";f.push(b);b=new h.ThemeClass("topRowBanner");b.style.margin="0";b.style.border="0";b.style.backgroundColor=this.navbar;b.style.height="15px";b.style.padding="10px";b.style.paddingRight="3px";f.push(b);b=new h.ThemeClass("a");b.style.textDecoration="none";b.style.color=this.content;f.push(b);b=new h.ThemeClass("navlink");b.style.display="inline-block";b.style.padding="2px";b.style.color=this.content;f.push(b);b=new h.ThemeClass("primaryNav");
b.style.color=this.navtext;b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.paddingTop="0";b.style.verticalAlign="baseline";f.push(b);b=new h.ThemeClass("primaryNav a");b.style.fontSize="8pt";b.style.color=this.navtext;b.style.marginRight="6px";b.style.marginLeft="6px";b.style.verticalAlign="baseline";b.style.textDecoration="none";f.push(b);b=new h.ThemeClass("primaryNav a:hover");b.style.color="#bfbfbf";b.style.cursor="hand";b.style.color="white";b.style.fontWeight="normal";f.push(b);for(var i in f)g+=
f[i].toString();return g};k.prototype.writeLocationStyle=function(){var g="",f=[],b=new h.ThemeClass("titleArea");b.style.margin="0";b.style.paddingTop="5px";b.style.border="0";b.style.background=this.location;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+"), color-stop(100%,"+this.location+"))";b.style.borderBottom="1px solid "+this.location;b.style.minHeight="20px";f.push(b);b=new h.ThemeClass("breadcrumb");b.style.fontSize="8pt";b.style.textDecoration=
"none";b.style.color="#f1f1f2;";b.style.paddingTop="2px";f.push(b);b=new h.ThemeClass("a.breadcrumb:hover");b.style.textDecoration="none";b.style.borderBottom="1px dotted";b.style.color="#F58B0F";b.style.cursor="pointer";f.push(b);b=new h.ThemeClass("breadcrumbSeparator");b.style.fontSize="8pt";b.style.textDecoration="none";b.style.color="#f1f1f2";b.style.fontWeight="bold";f.push(b);b=new h.ThemeClass("currentLocation");b.style.fontWeight="bold";b.style.fontSize="8pt";b.style.color="#f1f1f2";b.style.textDecoration=
"none";b.style.textWrap="normal";b.style.lineHeight="10pt";f.push(b);b=new h.ThemeClass("a.currentLocation:hover");b.style.fontWeight="bold";b.style.fontSize="10pt";b.style.color="#666666";b.style.textDecoration="none";b.style.borderBottom="0";f.push(b);b=new h.ThemeClass("navlinkonpage");b.style.color=this.content;f.push(b);b=new h.ThemeClass("progressPane_running");b.style.background="url(../images/progress_running_dark.gif) no-repeat center";b.style.width="16px";b.style.height="16px";f.push(b);
for(var i in f)g+=f[i].toString();return g};k.prototype.writeButtonStyle=function(){var g="",f=[],b=new h.ThemeClass("commandButton");b.style.color="#666";b.style.border="1px solid #dedede";b.style.backgroundColor="#ddd";b.style.textAlign="center";b.style.verticalAlign="baseline";b.style.cursor="pointer";b.style.display="inline-block";b.style.padding="5px 6px";b.style.borderRadius="3px";b.style.lineHeight="12px";b.style.fontSize="8pt";b.style.userSelect="none";f.push(b);b=new h.ThemeClass("commandButton:over");
b.style.backgroundColor="#e6e6e6";b.style.border="1px solid #808080";f.push(b);b=new h.ThemeClass("commandMenu");b.style.color="#222";b.style.display="inline-block";b.style.verticalAlign="baseline";b.style.margin="0";b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.border="1px solid #dedede";b.style.backgroundColor="#efefef";b.style.cursor="pointer";b.style.borderRadius="1px";f.push(b);b=new h.ThemeClass("commandMenuItem");b.style.border="0";b.style.padding="0";b.style.margin="0";f.push(b);
for(var i in f)g+=f[i].toString();return g};k.prototype.writeMainStyle=function(){var g="",f=[],b=new h.ThemeClass("searchbox");b.style.backgroundImage="url(../images/core_sprites.png)";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="4px -297px";b.style.width="12px";b.style.height="12px";b.style.backgroundColor=this.search;b.style.border="1px solid "+this.search;b.style.fontSize="11px";b.style.width="15em";b.style.height="16px";b.style.borderRadius="10px";b.style.color="#999";b.style.padding=
"0";b.style.paddingLeft="20px";b.style.marginLeft="5px";b.style.marginTop="6px !important";b.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";f.push(b);b=new h.ThemeClass("searchbox:focus");b.style.color="white";b.style.outline="none";f.push(b);b=new h.ThemeClass("checkedRow");b.style.cssText="background-color:"+this.selection+" !important;";f.push(b);b=new h.ThemeClass("navbar-item-selected");b.style.background=this.selection;b.style.color=
this.content;f.push(b);b=new h.ThemeClass("auxpane");b.style.border="0";b.style.background=this.sidepanel;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";b.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";f.push(b);b=new h.ThemeClass("mainpane");b.style.background=this.mainpanel;b.style.border=0;f.push(b);b=new h.ThemeClass("mainToolbar");b.style.background=this.toolpanel;
b.style.height="34px";b.style.borderBottom="1px solid #ebebeb";b.style.paddingTop="2px";f.push(b);for(var i in f)g+=f[i].toString();return g};k.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};k.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,this.button=g.button.value,this.location=g.location.value,this.selection=g.selection.value,this.sidepanel=
g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:k}});
define("orion/widgets/themes/container/ThemeData",["orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,k){function g(){}function f(){this.styles=[];var b=new g;b.name="Orion";b.navbar="#333";b.button="#EFEFEF";b.location="#efefef";b.selection="FEC";b.sidepanel="#FBFBFB";b.mainpanel="white";b.toolpanel="white";b.navtext="#bfbfbf";b.content="#3087B3";b.search="#444";b.breadcrumb="#3087B3";b.separator="#333";this.styles.push(b);b=new g;b.name="Green Zone";b.navbar=
"seagreen";b.button="lavender";b.location="darkseagreen";b.selection="moccasin";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="darkgreen";b.search="darkgreen";b.breadcrumb="#3087B3";b.separator="seagreen";this.styles.push(b);b=new g;b.name="Pretty In Pink";b.navbar="plum";b.button="lavender";b.location="pink";b.selection="lavender";b.sidepanel="seashell";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumorchid";b.search="violet";
b.breadcrumb="#3087B3";b.separator="plum";this.styles.push(b);b=new g;b.name="Blue Monday";b.navbar="cornflowerblue";b.button="lavender";b.location="skyblue";b.selection="lavender";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="royalblue";b.search="royalblue";b.breadcrumb="#3087B3";b.separator="cornflowerblue";this.styles.push(b);b=new g;b.name="Vanilla Skies";b.navbar="sandybrown";b.button="lemmonchiffon";b.location="cornsilk";b.selection="lemonchiffon";
b.sidepanel="white";b.mainpanel="white";b.toolpanel="white";b.navtext="lemonchiffon";b.content="chocolate";b.search="moccasin";b.breadcrumb="#3087B3";b.separator="sandybrown";this.styles.push(b);b=new g;b.name="Beetlejuice";b.navbar="indigo";b.button="slateblue";b.location="darkslateblue";b.selection="silver";b.sidepanel="lavender";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumslateblue";b.search="#444";b.breadcrumb="#3087B3";b.separator="indigo";this.styles.push(b);
b=new g;b.name="Red";b.navbar="#CD2127";b.button="#777777";b.location="#D85F56";b.selection="lightcoral";b.sidepanel="#EFDAB2";b.mainpanel="#FDFADD";b.toolpanel="#FDFADD";b.navtext="#FBFBFB";b.content="darkred";b.search="#D85F56";b.breadcrumb="darkred";b.separator="#CD2127";this.styles.push(b)}function b(){return this.styles}g.prototype.name="Orion";g.prototype.navbar="#333";g.prototype.button="#EFEFEF";g.prototype.location="#333";g.prototype.breadcrumb="#3087B3";g.prototype.separator="#333";g.prototype.selection=
"FEC";g.prototype.sidepanel="#FBFBFB";g.prototype.mainpanel="white";g.prototype.toolpanel="white";g.prototype.navtext="#bfbfbf";g.prototype.content="#3087B3";g.prototype.search="#444";f.prototype.styles=[];f.prototype.getStyles=b;f.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};f.prototype.getViewData=function(){for(var b={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"}]},e=0;e<3;e++)b.shapes.push({type:"TEXT",name:"content",label:"org.eclipse.orion.content",x:170,y:127+20*e,fill:"#3087B3",family:"content"});for(e=0;e<3;e++)b.shapes.push({type:"TEXT",name:"content",label:"Item",x:25,y:115+20*e,fill:"#3087B3",family:"content"});for(e=0;e<3;e++)b.shapes.push({type:"TRIANGLE",name:"twisty",x1:160,y1:121+e*20,x2:165,y2:124+e*20,x3:160,y3:127+e*20,family:"navbar",fill:"#333"});
b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};f.prototype.processSettings=function(b){var e=new k.ThemeSheetWriter;(new h.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",e.getSheet(b))};return{ThemeData:f,getStyles:b}});
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,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(h,k,g,f){function b(b){this._displaySignOut=!0;this._init(b)}b.prototype={_init:function(b){this._dropdownNode=g.node(b.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=b.dropdown;this._serviceRegistry=b.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices={};this._noSeparator=b.noSeparator;this._dropDownItemClass=
b.dropDownItemClass;this._keyAssistClass=b.keyAssistClass;if(b.signOut!==void 0)this._displaySignOut=b.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(b){var e=0,c;for(c in b)b.hasOwnProperty(c)&&e++;return e},_makeMenuItem:function(b,e){var c=document.createElement("span");c.role="menuitem";
c.tabIndex=0;var a=document.createTextNode(b);c.appendChild(a);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&c.classList.add(this._dropDownItemClass):c.classList.add("dropdownMenuItem");c.addEventListener("click",e,!1);c.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&e()},!1);return c},_renderAuthenticatedService:function(b){var e=this,c=this.authenticatedServices[b].authService;if(c&&c.logout&&this._displaySignOut){var a=document.createElement("li"),
f=this._makeMenuItem(h["Sign Out"],function(){c.logout().then(function(){e.addUserItem(b,c,e.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var f=localStorage.key(a);f&&f.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(f)}c.getAuthForm(window.location.href).then(function(a){window.location=a})})});a.appendChild(f);this._dropdownNode.appendChild(a)}},renderServices:function(){function b(a){c[a]||
(c[a]=e.createDocumentFragment());return c[a]}var e=document,c=[];f.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown?this._dropdown.empty():this._dropdownNode&&g.empty(this._dropdownNode);a.forEach(function(a){var d=b(typeof a.category==="number"?a.category:1),c=e.createElement("li"),f=e.createElement("a");f.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&f.classList.add(this._dropDownItemClass):f.classList.add("dropdownMenuItem");
f.href=a.href;f.textContent=a.textContent;c.appendChild(f);d.appendChild(c)}.bind(this));if(this.keyAssistFunction){var a=document.createElement("li"),f=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&f.classList.add(this._keyAssistClass):f.classList.add("key-assist-menuitem");a.appendChild(f);b(0).appendChild(a)}var d=this;c.sort(function(a,d){return a-d}).forEach(function(a,e){if(e<c.length-1&&!this._noSeparator){var b=
document.createElement("li");b.classList.add("dropdownSeparator");var f=document.createElement("span");f.classList.add("dropdownSeparator");b.appendChild(f);a.appendChild(b)}d._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(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,e,c,a){a?(this.unauthenticatedServices[b]&&
delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:e,label:c,data:a}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:e,label:c,pending:this.unauthenticatedServices[b].pending}:{authService:e,label:c});this.renderServices()}};b.prototype.constructor=b;return{UserMenu:b}});
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,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,k,g,f,b,i){function e(a,c,d){var e="";d&&(e="^");if(e=g.parse("/"+e+a.searchStr+"/"))d=e.pattern,e=e.flags,e.indexOf("i")===-1&&!c.caseSensitive&&(e+="i"),a.regExp={pattern:d,flags:e},a.wildCard=!0}var c={ALL_FILE_TYPE:"*.*"};c.doSearch=function(a,e,d,b){if(a){var f=!0;d==="*"&&(d="");d===""&&(f=b&&b.type!==c.ALL_FILE_TYPE);if(f){d!==""&&c.addRecentSearch(e,
d,b?b.regEx:!1);var a=a.createSearchParams(d,!1,!1,b),g=c.generateSearchHref(a);c.getOpenSearchPref(e,function(a){a?window.open(g):window.location=g})}}else window.alert(h["Can't search: no search service is available"])};c.generateSearchHelper=function(a,b){var d=a.keyword,f=d,m={};a.fileType&&a.fileType!==c.ALL_FILE_TYPE&&d===""&&(f="*."+a.fileType);if(a.regEx)m.searchStr=d,e(m,a,b);else{var g=d.indexOf("*")>-1,i=d.indexOf("?")>-1;g&&(d=d.split("*").join(".*"));i&&(d=d.split("?").join("."));!g&&
!i&&!a.nameSearch?(m.searchStr=a.caseSensitive?d.split("\\").join(""):d.split("\\").join("").toLowerCase(),m.wildCard=!1):(m.searchStr=a.caseSensitive?d:d.toLowerCase(),e(m,a,b),m.wildCard=!0)}m.searchStrLength=m.searchStr.length;return{params:a,inFileQuery:m,displayedSearchTerm:f}};c.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"};c.copySearchParams=function(a,c){var d={},e;for(e in a)if(a[e]!==void 0&&a[e]!==null&&(c||e!=="replace"))d[e]=a[e];return d};c.generateSearchHref=function(a){var e=k.toUrl("search/search.html"),a=c.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return(new i(e+"#{,resource,params*}")).expand({resource:d,params:a})};c.generateFindURLBinding=function(a,
c,d,e){a={find:c.searchStr,regEx:c.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof d==="number"?d:void 0};return","+(new i("{,params*}")).expand({params:a})};c.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)};c.replaceRegEx=function(a,
c,d){return a.replace(RegExp(c.pattern,c.flags),d)};c.replaceStringLiteral=function(a,e,d){e=g.parse("/"+e+"/gim");return c.replaceRegEx(a,e,d)};c.searchOnelineLiteral=function(a,c,d){var e;e=0;for(var b=!1,f=[];;)if(e=c.indexOf(a.searchStr,e),e<0)break;else{f.push({startIndex:e,length:a.searchStrLength});b=!0;if(d)break;e+=a.searchStrLength}return b?f:null};c.findRegExp=function(a,c,d,e){if(!c)return null;d=d||"";d+=(d.indexOf("g")===-1?"g":"")+(d.indexOf("m")===-1?"m":"");var b=null;return(b=RegExp(c,
d).exec(a.substring(e)))&&{startIndex:b.index+e,length:b[0].length}};c.searchOnelineRegEx=function(a,e,d){for(var b=0,f=!1,g=[];;)if(b=c.findRegExp(e,a.regExp.pattern,a.regExp.flags,b)){g.push(b);f=!0;if(d)break;b=b.startIndex+b.length}else break;return f?g:null};c.generateNewContents=function(a,e,d,b,f,g){if(b&&e){if(!a)d.contents=[];for(var i=0;i<e.length;i++){for(var h=e[i],k=!1,r=!1,v=[],w,y=0,q=0;q<b.children.length;q++)if(b.children[q].lineNumber-1===i){y=q;for(k=0;k<b.children[q].matches.length;k++)b.children[q+
k].checked!==!1&&v.push(k);r=v.length>0;w=b.children[q].matches;k=!0;break}if(k){if(r){v=c.replaceCheckedMatches(h,f,w,v,g);h=v.replacedStr;for(k=0;k<b.children[y].matches.length;k++)b.children[y+k].newMatches=v.newMatches}else for(k=0;k<b.children[y].matches.length;k++)b.children[y+k].newMatches=b.children[y+k].matches;a?d.contents[i]=h:d.contents.push(h)}else a||d.contents.push(h)}}};c.generateMatchContext=function(a,c,d){var e=[],b=a*2+1,f;c.length<=b?(f=0,a=c.length-1):(f=d-a,f<0?(f=0,a=f+b-1):
(a=d+a,a>c.length-1&&(a=c.length-1,f=a-b+1)));for(b=f;b<=a;b++)e.push({context:c[b],current:b===d});return e};c.splitFile=function(a){for(var c=0,d=0,e=0,b=0,f=[];;){c!==-1&&c<=e&&(c=a.indexOf("\r",e));d!==-1&&d<=e&&(d=a.indexOf("\n",e));if(d===-1&&c===-1){f.push(a.substring(b));break}var g=1;c!==-1&&d!==-1?c+1===d?(g=2,e=d+1):e=(c<d?c:d)+1:e=c!==-1?c+1:d+1;f.push(a.substring(b,e-g));b=e}return f};c.searchWithinFile=function(a,e,d,b,f,g){d=c.splitFile(d);if(f)e.contents=d;if(e){e.children=[];for(var i=
b=0;i<d.length;i++){var h=d[i];if(h&&h.length>0){var k=g?h:h.toLowerCase();if(k=a.wildCard?c.searchOnelineRegEx(a,k):c.searchOnelineLiteral(a,k)){var r,v=i+1;if(f)for(var w=0;w<k.length;w++)r=w+1,r={parent:e,checked:e.checked,type:"detail",matches:k,lineNumber:v,matchNumber:r,name:h,location:e.location+"-"+v+"-"+r},e.children.push(r);else r={parent:e,context:c.generateMatchContext(2,d,i),checked:e.checked,type:"detail",matches:k,lineNumber:v,name:h,location:e.location+"-"+v},e.children.push(r);b+=
k.length}}}e.totalMatches=b}};c.replaceCheckedMatches=function(a,c,d,e,b){for(var f=0,g="",i=[],h=0;h<d.length;h++){f!==d[h].startIndex&&(g+=a.substring(f,d[h].startIndex));if(d[h].length)b=d[h].length;for(var f=!1,k=0;k<e.length;k++)if(e[k]===h){f=!0;break}f?(i.push({startIndex:g.length,length:c.length}),g+=c):(i.push({startIndex:g.length,length:b}),g+=a.substring(d[h].startIndex,d[h].startIndex+b));f=d[h].startIndex+b}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:i}};c.fullPathNameByMeta=
function(a){var c=a.length,d="";if(c>0)for(c-=1;c>-1;c--)d=d+(d===""?"":"/")+a[c].Name;return d};c.path2FolderName=function(a,c,d){return a.substring(0,a.length-c.length-(d?0:1))};c._storeRecentSearch=function(a,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",c);d&&window.setTimeout(function(){d.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),20)})};c.addRecentSearch=function(a,e,d){typeof e==="string"&&e&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var f,
b=b.get("recentSearch");typeof b==="string"&&(b=JSON.parse(b));if(b){for(f in b)if(b[f].name===e)return;b.length>=20&&b.splice(19,b.length-20+1)}else b=[];b.splice(0,0,{name:e,regEx:d});c._storeRecentSearch(a,b)})};c.removeRecentSearch=function(a,e,d){typeof e==="string"&&e&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var f,b=b.get("recentSearch");typeof b==="string"&&(b=JSON.parse(b));if(b)for(f in b)if(b[f].name===e){b.splice(f,1);c._storeRecentSearch(a,
b,d);break}})};c.getSearches=function(a,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(c);typeof a==="string"&&(a=JSON.parse(a));a&&d&&d(a)})};c.getMixedSearches=function(a,e,d,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));e&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var e=c.parseQueryStr(a.query);
f.some(function(a){return e.searchStrTitle===a.name})||f.push({name:e.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&b&&b(f)})};c.getOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");c(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?!0:!1:!1)})};c.setOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",
{openInNewTab:c})})};return c});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,k,g,f,b,i){function e(c,a,e,d){this.registry=c;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=e;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:f.generateSearchHelper(e);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location}e.prototype.search=function(c){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=c;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))};e.prototype.searchName=function(c,a){if(c)this.searchHelper=f.generateSearchHelper(c,!0);if(a)this.onSearchNameComplete=a;var e=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var d=0;d<this.fileSkeleton.length;d++){var b=this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?f.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):f.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0))if(e.push(this.fileSkeleton[d]),
e.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:e.length,docs:e}})}};e.prototype.buildSkeleton=function(c,a){this._buildingSkeleton=!0;var e=this.registry.getService("orion.core.contenttypes"),d=this;c();e.getContentTypes().then(function(c){d.contentTypesCache=c;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};e.prototype._searchCompleted=function(){console.log("Search Completed.")};
e.prototype._searchFiles=function(){var c=[],a;if(this.fileLocations.length>0){a=this;for(var e=0;e<a.fileLocations.length;e++)c.push(a._sniffSearch(a.fileLocations[e]))}return i.all(c)};e.prototype._sort=function(c){c.sort(function(a,c){var d=a.Name&&a.Name.toLowerCase(),e=c.Name&&c.Name.toLowerCase();return d<e?-1:d>e?1:0})};e.prototype._onFileType=function(c){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===f.ALL_FILE_TYPE?!0:c.extension.indexOf(this.searchHelper.params.fileType)>=
0:!0};e.prototype._visitRecursively=function(c){var a=[],e=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(c);var d=e.registry.getService("orion.page.progress");return(d?d.progress(e.fileClient.fetchChildren(c),"Crawling search for children of "+c):e.fileClient.fetchChildren(c)).then(function(d){for(var c=0;c<d.length;c++)if(d[c].Directory!==void 0&&d[c].Directory===!1)if(e._searchOnName)a.push(e._buildSingleSkeleton(d[c]));else if(e._buildSkeletonOnly)a.push(e._buildSingleSkeleton(d[c]));
else{var f=b.getFilenameContentType(d[c].Name,e.contentTypesCache);f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&e._onFileType(f)&&a.push(e._sniffSearch(d[c]))}else d[c].Location&&a.push(e._visitRecursively(d[c].ChildrenLocation));return i.all(a)})};e.prototype._hitOnceWithinFile=function(c){c=this._searchParams.caseSensitive?c:c.toLowerCase();return this.searchHelper.inFileQuery.wildCard?f.searchOnelineRegEx(this.searchHelper.inFileQuery,c,!0):f.searchOnelineLiteral(this.searchHelper.inFileQuery,
c,!0)};e.prototype._reportSingleHit=function(c){c.LastModified=c.LocalTimeStamp;this.fileLocations.push(c);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};e.prototype._sniffSearch=function(c){this._totalCounter++;var a=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(c),this.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(c.Location),"Reading file "+c.Location).then(function(e){a._hitOnceWithinFile(e)&&a._reportSingleHit(c);a.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};e.prototype._buildSingleSkeleton=function(c){this._totalCounter++;
this.fileSkeleton.push(c);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();c=new i;c.resolve(this._totalCounter);return c};e.prototype.constructor=e;return{SearchCrawler:e}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,k,g,f){function b(){}b.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 b=
document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var e=document.createRange();e.selectNode(b);e=e.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(e);this.$frame=b.lastChild;this.title&&g.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=g.$("#closeDialog",this.$frame);var c=this;this.$close.addEventListener("click",function(){c.hide()},!1);this.$parent=g.$(".dialogContent",this.$frame);e=document.createRange();e.selectNode(this.$parent);
b=e.createContextualFragment(this.TEMPLATE);this.messages&&g.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=g.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE?c.hide():a.keyCode===g.KEY.ENTER&&typeof c._defaultCallback==="function"&&c._defaultCallback()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);this.modal&&this._makeModal()},
_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var b=this;this.buttons.forEach(function(e){var c=f.createButton(e.text,e.callback);if(e.id)c.id=e.id,b["$"+c.id]=c;if(e.isDefault)b._defaultCallback=e.callback,b._defaultButton=c;b.$buttonContainer.appendChild(c)})}},_makeModal:function(){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var c=!g.contains(b.$frame,a.target);if(c)for(var e=0;e<
b.$$modalExclusions.length;e++)if(g.contains(b.$$modalExclusions[e],a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),g.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var e=this.$frameParent.childNodes,c=!1;this._addedBackdrop=[];for(var a=0;a<e.length;a++){for(var f=0;f<this.$$modalExclusions.length;f++)if(g.contains(this.$$modalExclusions[f],e[a])){c=
!0;break}!c&&e[a]!==b.$frame&&e[a].classList&&!e[a].classList.contains("tooltipContainer")&&(f=e[a],f.classList.contains("modalBackdrop")||(f.classList.add("modalBackdrop"),this._addedBackdrop.push(f)))}(e=g.lastTabbable(this.$buttonContainer)||g.lastTabbable(this.$parent))&&e.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();g.stop(a)}},!1)},_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},_bindElements:function(b){for(var e=
0;e<b.childNodes.length;e++){var c=b.childNodes[e];c.id&&(this["$"+c.id]=c);this._bindElements(c)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding==="function"&&this._afterHiding();var b=this;this.keepAlive||window.setTimeout(function(){b.destroy()},
0)},show:function(b){typeof this._beforeShowing==="function"&&this._beforeShowing();var e=g.bounds(this.$frame),c=g.bounds(document.documentElement),a;b?(a=g.bounds(b),b=a.top+a.height+4,a=a.left+4,b+e.height>c.height&&(b=Math.max(0,c.height-e.height-4)),a+e.width>c.width&&(a=Math.max(0,c.width-e.width-4))):(a=Math.max(0,(c.width-e.width)/2),b=Math.max(0,(c.height-e.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=b+"px";this.$frame.style.left=a+"px";this.$frame.classList.add("dialogShowing");
typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return g.firstTabbable(this.$parent)||this._defaultButton||g.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(b){b.classList.remove("modalBackdrop")});this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",
this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};b.prototype.constructor=b;return{Dialog:b}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/util,orion/webui/dialog".split(","),function(h,k,g,f,b,i,e){function c(a){this._init(a)}c.prototype=new e.Dialog;c.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="'+f.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';c.prototype._init=function(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 g.ContentTypeService(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._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()};c.prototype._bindToDom=function(a){var c=this;c.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){c._time=+new Date;c._timeoutId&&clearTimeout(c._timeoutId);
c._timeoutId=setTimeout(c.checkSearch.bind(c),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===b.KEY.ENTER){var e=b.$("a",c.$results);e&&(b.stop(a),window.open(e.href),c.hide())}},!1);a.addEventListener("keydown",function(a){var e,f,g,h,i;if(a.keyCode===b.KEY.DOWN||a.keyCode===b.KEY.UP)f=b.$$array("a",c.$results),e=b.$$array("a",c.$favresults),g=document.activeElement,i=f.indexOf(g),h=e.indexOf(g),a.keyCode===b.KEY.DOWN?h>=0?(h<e.length-1?e[h+1]:f.length>0?f[0]:e[0]).focus():
i>=0?(i<f.length-1?f[i+1]:e.length>0?e[0]:f[0]).focus():(f.length>0||e.length>0)&&(-1<e.length-1?e[0]:f[0]).focus():h>=0?(g=c.$fileName,(h>0?e[h-1]:g).focus()):i>=0?(g=c.$fileName,(i>0?f[i-1]:e.length>0?e[e.length-1]:g).focus()):f.length>0?f[f.length-1].focus():e.length>0&&e[e.length-1].focus(),b.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(c._forceUseCrawler||!c._fileService.getService(c._searcher.getSearchLocation()).search){var a=
c._searchOnRoot?c._searcher.getSearchRootLocation():c._searcher.getChildrenLocation(),a=new k.SearchCrawler(c._searcher.registry,c._fileService,"",{searchOnName:!0,location:a});c._searcher.setCrawler(a);a.buildSkeleton(function(){c.$crawlingProgress.style.display="inline";c.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){c.$crawlingProgress.style.display="none";c.$progress.removeChild(c.$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()};c.prototype.populateFavorites=function(){var a=document.createElement("div");a.appendChild(document.createTextNode(h["Populating favorites&#x2026;"]));b.empty(this.$favresults);this.$favresults.appendChild(a);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());
this._favService.addEventListener("favoritesChanged",this.showFavorites())};c.prototype.showFavorites=function(){var a=this;return function(c){if(c.navigator)c=c.navigator;a._searchRenderer.makeRenderFunction(a._contentTypeService,a.$favresults,!1,a.decorateResult.bind(a),a.showFavoritesImage)(c);if(c&&c.length>0)c=document.createElement("div"),c.style.borderBottom="1px dashed #BBBBBB",c.style.padding="5px",a.$favresults.appendChild(c)}};c.prototype.showFavoritesImage=function(a){var c=new Image;
c.classList.add("modelDecorationSprite");c.classList.add("core-sprite-favorite");c.src=f.toUrl("images/none.png");c.title=h.Favorite;a.appendChild(c);c.style.verticalAlign="middle"};c.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)};c.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var c=this._searcher.createSearchParams(a,
this._nameSearch,this._searchOnRoot),d=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=d;var e=document.createElement("div");e.appendChild(document.createTextNode(this._nameSearch?h["Searching..."]:i.formatMessage(h["Searching for occurrences of"],a)));b.empty(this.$results);this.$results.appendChild(e);this._searcher.search(c,!1,function(){d===this.currentSearch&&d.apply(null,arguments)}.bind(this))}};c.prototype.decorateResult=
function(a){for(var c=this,a=b.$$array("a",a),d=0;d<a.length;d++){var e=a[d];e.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&c.hide()},!1);e.addEventListener("keyup",function(a){a.keyCode===b.KEY.ENTER&&c.hide()},!1)}};c.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};c.prototype._afterHiding=function(){this._onHide&&this._onHide()};c.prototype.constructor=c;return{OpenResourceDialog:c}});define("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(k){for(var g=Object.keys(k),f=0;f<g.length;f++){var b=g[f];h[b]=k[b]}})}}});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,k){function g(f,b,g){this.CLEAR_PANEL=g!==null?g:!0;this.OPEN="false";g="";f.nodeType?this.node=f:(g=f+"_",f=document.getElementById(f),this.node=f.nodeType?f:document.createElement("span"));this.node.innerHTML=this.templateString;this.navLabelId=g+"navigationlabel";document.getElementById("navigationlabel").id=this.navLabelId;this.arrowId=g+"dropDownArrow";document.getElementById("dropDownArrow").id=this.arrowId;
this.navDropDownId=g+"navdropdown";document.getElementById("navdropdown").id=this.navDropDownId;if(b.icon)this.node.className=this.node.className+" "+b.icon,this.node.onclick=this.click.bind(this);else{if(b.label)f=document.getElementById(this.navLabelId),f.textContent=b.label,f.onclick=this.click.bind(this);if(b.caret)document.getElementById(this.arrowId).className=b.caret}this._dropdownNode=k.node(this.navDropDownId);this._triggerNode=k.node(this.navLabelId)}h.mixin(g.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 f=document.getElementById(this.navDropDownId);f.style.display==="none"?this.updateContent(this.getContentNode(),function(){f.style.display="";this._positionDropdown();this.handle=k.addAutoDismiss([this.node,f],this.clearPanel.bind(this))}.bind(this)):this.CLEAR_PANEL&&this.clearPanel()},clearPanel:function(){document.getElementById(this.navDropDownId).style.display="none"},addContent:function(f){document.getElementById(this.navDropDownId).innerHTML=f},getContentNode:function(){return document.getElementById(this.navDropDownId)},
updateContent:function(f,b){b()},toggleLabel:function(f){document.getElementById(this.navLabelId).style.display=f?"":"none";document.getElementById(this.arrowId).style.display=f?"":"none"},_positionDropdown:function(){this._dropdownNode.style.left="";var f=k.bounds(this._dropdownNode),b=k.bounds(this._boundingNode(this._triggerNode));if(f.left+f.width>b.left+b.width)this._dropdownNode.style.right=0},_boundingNode:function(f){return f.style.right!==""||f.style.position==="absolute"||!f.parentNode||
!f.parentNode.style?f:this._boundingNode(f.parentNode)},destroy:function(){if(this.node)k.empty(this.node),this.node=this.select=null}});return g});
define("orion/widgets/input/GroupedContent",["orion/objects","orion/webui/littlelib"],function(h){function k(){}h.mixin(k.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 k});define("orion/customGlobalCommands",[],function(){return{}});
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,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,k,g){function f(e,c,a){if(!e[c])throw c+h[" is not supported in this file system"];return e[c].apply(e,a)}function b(e,c,a,j){if(!e.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(c[c.length-1]!=="/")return f(e,"readBlob",[c]).then(function(c){return f(a,"writeBlob",[j,c])});var d=j.substring(0,
j.length-1),l=decodeURIComponent(d.substring(d.lastIndexOf("/")+1)),d=d.substring(0,d.lastIndexOf("/")+1);return f(a,"createFolder",[d,l]).then(function(){},function(){}).then(function(){return f(e,"fetchChildren",[c]).then(function(c){for(var d=[],f=0;f<c.length;++f){var l=c[f].Location,g=l;c[f].Directory&&(g=l.substring(0,l.length-1));g=decodeURIComponent(g.substring(g.lastIndexOf("/")+1));g=j+encodeURIComponent(g);c[f].Directory&&(g+="/");d[f]=b(e,l,a,g)}return k.all(d)})})}function i(e,c){function a(a){var c=
new k;c.reject(h["No Matching FileService for location:"]+a);return c}var b=e.getServiceReferences("orion.core.file"),d=b;if(c)for(var d=[],f=0;f<b.length;++f)c(b[f])&&d.push(b[f]);for(var i=[],p=[],u=[],o=[],n={fetchChildren:function(){var a=new k;a.resolve(o);return a},createWorkspace:function(){var a=new k;a.reject(h["no file service"]);return a},loadWorkspaces:function(){var a=new k;a.reject(h["no file service"]);return a},loadWorkspace:function(){var a=new k;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},b=0;b<d.length;++b)o[b]={Directory:!0,Length:0,LocalTimeStamp:0,Location:d[b].getProperty("top"),ChildrenLocation:d[b].getProperty("top"),Name:d[b].getProperty("Name")},f=d[b].getProperty("pattern")||".*",f[0]!=="^"&&(f="^"+f),i[b]=RegExp(f),p[b]=e.getService(d[b]),u[b]=d[b].getProperty("Name"),
d[b].getProperty("NameKey")&&d[b].getProperty("nls")&&g.getMessageBundle(d[b].getProperty("nls")).then(function(a,c){o[a].Name=c[d[a].getProperty("NameKey")];u[a]=c[d[a].getProperty("NameKey")]}.bind(this,b));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return p[0]?0:-1;for(var c=0;c<i.length;++c)if(i[c].test(a))return c;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:u[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?n.Location:o[a].Location}}i.prototype={getService:function(e){return this._getService(e)},fileServiceName:function(e){return this._getServiceName(e)},fileServiceRootURL:function(e){return this._getServiceRootURL(e)},fetchChildren:function(e){return f(this._getService(e),"fetchChildren",arguments)},createWorkspace:function(e){return f(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return f(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(e){return f(this._getService(e),"loadWorkspace",arguments)},createProject:function(e,c,a,b){return f(this._getService(e),"createProject",arguments)},createFolder:function(e,c){return f(this._getService(e),"createFolder",arguments)},createFile:function(e,c){return f(this._getService(e),"createFile",arguments)},deleteFile:function(e){return f(this._getService(e),"deleteFile",arguments)},
moveFile:function(e,c,a){var j=this._getService(e),d=this._getService(c);if(j===d)return f(j,"moveFile",arguments);var l=e[e.length-1]==="/",g=c;g[g.length-1]!=="/"&&(g+="/");if(a)g+=encodeURIComponent(a);else{var h=e;l&&(h=h.substring(0,h.length-1));g+=h.substring(h.lastIndexOf("/")+1)}l&&g[g.length-1]!=="/"&&(g+="/");return b(j,e,d,g).then(function(){return f(j,"deleteFile",[e])})},copyFile:function(e,c,a){var j=this._getService(e),d=this._getService(c);if(j===d)return f(j,"copyFile",arguments);
var l=e[e.length-1]==="/",g=c;g[g.length-1]!=="/"&&(g+="/");if(a)g+=encodeURIComponent(a);else{var h=e;l&&(h=h.substring(0,h.length-1));g+=h.substring(h.lastIndexOf("/")+1)}l&&g[g.length-1]!=="/"&&(g+="/");return b(j,e,d,g)},read:function(e,c){return f(this._getService(e),"read",arguments)},write:function(e,c,a){return f(this._getService(e),"write",arguments)},remoteImport:function(e,c){return f(this._getService(e),"remoteImport",arguments)},remoteExport:function(e,c){return f(this._getService(e),
"remoteExport",arguments)},search:function(e){return f(this._getService(e.resource),"search",arguments)}};i.prototype.constructor=i;return{FileClient:i}});
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,
k,g,f,b,i,e,c,a,j,d,l,m,p,u,o,n,r,v,w,y,q,x,s,z,B,A,t,C,D,E,G,H){function J(a,c){if(a.getLabel)return a.getLabel();else{var d=new q;d.resolve(c.properties.name);return d}}function S(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,c){var d=a.getServiceReferences("orion.core.auth");Q=[];for(var e=I.createMenuGenerator.apply(this,arguments),b=0;b<d.length;b++){var f=
d[b],l=a.getService(f);J(l,f).then(function(a){l.getKey().then(function(c){Q.push(c);l.getUser().then(function(d){e.addUserItem(c,l,a,d)},function(d,b){e.addUserItem(c,l,a,b)});window.addEventListener("storage",function(){P[c]!==localStorage.getItem(c)&&(P[c]=localStorage.getItem(c),l.getUser().then(function(d){e.addUserItem(c,l,a,d)},function(){e.addUserItem(c,l,a)}))},!1)})})}}function M(a,d,e,b,f){var l=arguments,j,g=a&&a.getServiceReferences("orion.page.link.related");g&&g.length!==0&&q.when(function(){if(j)return j;
var c=a.getService("orion.core.contenttypes");c||(c=new n.ContentTypeService(a),c=a.getService("orion.core.contenttypes"));return c.getContentTypes().then(function(a){return j=a})}(),function(){var h;if(I.beforeGenerateRelatedLinks.apply(this,l)){for(var m=[],k=0;k<g.length;k++){var p={},o,r=g[k].getPropertyKeys();for(o=0;o<r.length;o++)p[r[o]]=g[k].getProperty(r[o]);if(p.id){var u=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(d)){var c=new i.CommandInvocation(d,d,null,a,b);I.addRelatedLinkCommand(a,
c)}else typeof f==="function"&&(h||(h=f()),q.when(h,function(c){c&&d===R&&(!a.visibleWhen||a.visibleWhen(c))&&I.addRelatedLinkCommand(a,new i.CommandInvocation(c,c,null,a,b))}))},n=null;o=null;if(e.indexOf(p.id)<0)if((p.nls&&p.nameKey||p.name)&&p.uriTemplate)o=c._createCommandOptions(p,g[k],a,j,!0),m.push(o),o.then(function(a){a=new i.Command(a);u(a)});else{if(!n&&(n=b.findCommand(p.id))){u(n);continue}if(!n){var v=a.getServiceReferences("orion.navigate.command");for(o=0;o<v.length;o++)if(v[o].getProperty("id")===
p.id){for(var p={},r=v[o].getPropertyKeys(),w=0;w<r.length;w++)p[r[w]]=v[o].getProperty(r[w]);o=c._createCommandOptions(p,v[o],a,j,!0);m.push(o);o.then(function(a){n=new i.Command(a);u(n)});break}}}}}q.all(m,function(a){return a}).then(function(){I.afterGenerateRelatedLinks.apply(this,l)})}})}function U(a){var c=l.node("globalActions");c&&(a.destroy(c),a.renderCommands(c.id,c,{},{},"tool"))}function N(a){var c={},d=null;typeof a==="string"&&(a=l.node(a));a||(a=l.node("pageActions"));for(var e=a;e&&
e.classList;){if(e.classList.contains("toolComposite")){d=e;break}e=e.parentNode}if(a.classList.contains("commandMarker"))c.commandNode=a;if(d&&(c.slideContainer=l.$(".slideParameters",d),c.parameterArea=l.$(".parameters",d),c.dismissArea=l.$(".parametersDismiss",d),c.notifications=l.$("#notificationArea",d),d.parentNode&&(c.toolbarTarget=l.$(".toolbarTarget",d.parentNode),c.toolbarTarget)))a=l.bounds(d),c.toolbarTargetY=a.height+1;return c}function O(a){if(a.toolbarTarget&&a.toolbarTargetY){var c=
0,d;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(d=l.bounds(a.notifications),c+=d.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(d=l.bounds(a.slideContainer),c+=d.height);c>0&&(c+=8);a.toolbarTarget.style.top=a.toolbarTargetY+c+"px";a.toolbarTarget.style.bottom=0}}var b=function(a){var c=document.createElement("a");c.href=a;return c.href}(k.toUrl("auth/NotifyAuthentication.html")),P={},I={createMenuGenerator:G.createMenuGenerator||
function(a,c){if(l.node("userMenu")){var d=l.node("userDropdown"),e=new p.Dropdown({dropdown:d}),d=new x.UserMenu({dropdownNode:d,dropdown:e,serviceRegistry:a}),e=l.node("userTrigger");new u.Tooltip({node:e,text:h.Options,position:["below","left"]});var e=document.getElementById("userTrigger"),b=e.className;b+=" imageSprite core-sprite-silhouette";e.className=b;d.setKeyAssist(c);return d}},beforeGenerateRelatedLinks:G.beforeGenerateRelatedLinks||function(){var a=l.node("relatedLinks");l.empty(a);
return!0},addRelatedLinkCommand:G.addRelatedLinkCommand||function(a,c){var d=l.node("relatedLinks");i.createCommandMenuItem(d,a,c).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:G.afterGenerateRelatedLinks||function(){},afterSetPageTarget:G.afterSetPageTarget||function(){},generateNavigationMenu:G.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new u.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new C("centralNavigation",{label:"Develop",
icon:"commandSprite core-sprite-hamburger"}),c=new D;a.addContent(c.getContentPane())},afterGenerateBanner:G.afterGenerateBanner||function(){}},Q=[],R,L=[],F,K=null;return{addSettings:function(a){(new C("settingsTab",{label:"Develop",icon:"imageSprite core-sprite-wrench"},!1)).updateContent=a.updateContent.bind(a)},generateBanner:function(c,d,b,j,p,r,n){function u(){this.create();this._filterString=""}function v(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?"_blank":"_self":"_self",c=l.$$array(".targetSelector"),d=0;d<c.length;d++)c[d].target=a}},{pid:"nav.config"})}(new w.ThemePreferences(j,new y.ThemeData)).apply();var q=l.node(c);if(!q)throw h["could not find banner parent, id was "]+c;var x=document.createRange();x.selectNode(q);x=x.createContextualFragment(B);l.processTextNodes(x,h);q.firstChild?q.insertBefore(x,q.firstChild):q.appendChild(x);q=l.node("home");q.href=k.toUrl("navigate/table.html");q.setAttribute("aria-label",
h["Orion Home"]);l.node("progressPane").src=k.toUrl("images/none.png");if(q=l.node("pageToolbar"))q.classList.add("toolbarLayout"),q.innerHTML=t+g.slideoutHTMLFragment("mainToolbar");(q=l.node("closeNotifications"))&&q.setAttribute("aria-label",h["Close notification"]);if(q=l.node("footer"))q.innerHTML=A,l.processTextNodes(q,h);b.setParameterCollector(new e.CommandParameterCollector(N,O));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&
a.setProgressMessage("")},!1);I.generateNavigationMenu.apply(this,arguments);var C=l.node("navigationlinks");C&&s.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){var c=document.createElement("li");c.appendChild(a);C.appendChild(c)})});if(q=l.$(".split")){var x=l.$(".sidePanelLayout"),G=l.$(".mainPanelLayout");if(x&&G)K={side:x,main:G},K.splitter=new m.Splitter({node:q,sidePanel:x,mainPanel:G,toggle:!0,closeByDefault:q.style&&q.style.left==="0%"}),q=new i.Command({name:h["Toggle side panel"],
tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),b.addCommand(q),b.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new f.KeyBinding("o",!0)),n&&K.splitter.addResizeListener(function(a){n&&a===G&&(a=n.getTextView())&&a.resize()})}q=new i.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 c=0;c<a.length;c++)if(!a[c].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],c=d.getService("orion.core.favorite"),b=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):b.progress(c.makeFavorites(a),"Making favorite "+a.Name)}},f=0;f<a.length;f++){var l=a[f];b.progress(c.hasFavorite(l.ChildrenLocation||l.Location),
"Checking favorite "+l.Name).then(e(l))}}});b.addCommand(q);var D=!1,F=function(a,c,d){if(!D){var e=c.getService("orion.core.favorite"),b=c.getService("orion.page.progress");e||(e=new o.FavoritesService({serviceRegistry:c}),e=c.getService("orion.core.favorite"));var f=new z.OpenResourceDialog({searcher:a,progress:b,searchRenderer:a.defaultRenderer,favoriteService:e,onHide:function(){D=!1;d&&d.getTextView()&&d.getTextView().focus()}});window.setTimeout(function(){D=!0;f.show()},0)}},q=new i.Command({name:h["Find File Named..."],
tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){F(p,d,n)}});b.addCommand(q);b.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new f.KeyBinding("f",!0,!0));q=new i.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"),c=l.node("footer"),d=l.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility=
"visible",c.style.visibility="visible",d.classList.remove("content-fixedHeight-maximized")):(a.style.visibility="hidden",c.style.visibility="hidden",d.classList.add("content-fixedHeight-maximized"));n&&n.getTextView()&&n.getTextView().resize();return!0}});b.addCommand(q);b.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new f.KeyBinding("m",!0,!0));q=new i.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});
b.addCommand(q);b.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new f.KeyBinding(112,!0,!0));q=new i.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});b.addCommand(q);b.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new f.KeyBinding("o",!0,!0));u.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 c=this._keyAssistInput=document.createElement("input");c.classList.add("keyAssistInput");c.type="text";c.placeholder=h["Filter bindings"];a.appendChild(c);var d=this._keyAssistContents=document.createElement("div");d.classList.add("keyAssistContents");if(E.isIOS||E.isAndroid)d.style.overflowY="auto";a.appendChild(d);var e=this._keyAssistTable=document.createElement("table");
e.tabIndex=0;e.classList.add("keyAssistList");d.appendChild(e);document.body.appendChild(a);c.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));e.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));c.addEventListener("input",function(){this.filterChanged()}.bind(this));d.addEventListener(E.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(n&&n.getTextView()){var c=n.getTextView(),d=c.getActions(!0).filter(function(a){return(a=c.getActionDescription(a))&&a.name});d.sort(function(a,d){return c.getActionDescription(a).name.localeCompare(c.getActionDescription(d).name)});this.createHeader(h.Editor);for(var e=function(a){return function(){c.focus();
return c.invokeAction(a)}},f={},j,g=0;g<d.length;g++)for(var i=d[g],m=c.getActionDescription(i),k=c.getKeyBindings(i),p=0;p<k.length;p++){j=k[p];var o=a.getUserKeyString(j);j.scopeName?(f[j.scopeName]||(f[j.scopeName]=[]),f[j.scopeName].push({bindingString:o,name:m.name,execute:e(i)})):this.createItem(o,m.name,e(i))}for(var r in f)if(f[r].length){this.createHeader(r);for(d=0;d<f[r].length;d++)j=f[r][d],this.createItem(j.bindingString,j.name,j.execute)}}this.createHeader(h.Global);b.showKeyBindings(this)},
createItem:function(a,c,d){if(this._filterString){var e=this._filterString.toLowerCase(),b;e!==this._filterString?(e=this._filterString,b=function(a){return a}):b=function(a){return a.toLowerCase()};if(b(c).indexOf(e)===-1&&b(a).indexOf(e)===-1&&b(this._lastHeader).indexOf(e)===-1)return}var f=this._keyAssistTable.insertRow(-1);f.id="keyAssist-keyBinding-"+this._idCount++;f.setAttribute("role","menuitem");f._execute=d;f.classList.add("keyAssistItem");f.addEventListener("click",function(a){this._selectedRow=
f;this.execute();a.preventDefault()}.bind(this));d=f.insertCell(-1);d.classList.add("keyAssistName");d.appendChild(document.createTextNode(c));d=f.insertCell(-1);d.classList.add("keyAssistAccel");d.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var c=this._keyAssistTable.insertRow(-1);c.classList.add("keyAssistSection");var c=c.insertCell(-1),d=document.createElement("h2");d.appendChild(document.createTextNode(a));c.appendChild(d)},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,c=this._keyAssistDiv,a=c===a||(c.compareDocumentPosition(a)&16)!==0;c.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 c=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(c.length===0)this._selectedIndex=-1;else{var d=this._selectedIndex;d+=a?1:-1;d%=c.length;d<0&&(d=c.length-1);if(this._selectedIndex!==-1)a=c[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=d;if(this._selectedIndex!==-1){this._selectedRow=
a=c[this._selectedIndex];a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var c=a.getBoundingClientRect(),e=this._keyAssistContents,b=e.getBoundingClientRect();a.offsetTop<e.scrollTop?d===0?e.scrollTop=0:a.scrollIntoView(!0):c.bottom>b.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 c=0,c=E.isIE||E.isOpera?-a.wheelDelta:E.isFirefox?a.detail*40:-a.wheelDeltaY,d=this._keyAssistContents,e=d.scrollTop;d.scrollTop+=c;if(e!==d.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var J=new u,H=new i.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){J.isVisible()?J.hide():J.show();return!0}});b.addCommand(H);b.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new f.KeyBinding(191,!1,!0));q=function(){n.getTextView().setKeyBinding(new f.KeyBinding(191,!1,!0,!E.isMac,E.isMac),H.id);n.getTextView().setAction(H.id,H.callback,H)};n&&(n.getTextView()?
q():n.addEventListener("TextViewInstalled",q));U(b);T(d,H.callback);S(d);window.addEventListener("hashchange",function(){b.processURL(window.location.href)},!1);window.setTimeout(function(){v(d)},0);I.afterGenerateBanner.apply(this,arguments)},getToolbarElements:N,getMainSplitter:function(){return K},layoutToolbarElements:O,setPageTarget:function(a){var c,e,b=a.breadcrumbRootName,f=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&
(e=b?b+" ":"",e+=a.fileService.fileServiceName(a.target.Location),b=null),c=a.name||a.target.Name,R=a.target,M(f,a.target,L,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(b=b||a.task||a.name),c=a.name,M(f,{NoTarget:""},L,a.commandService,a.makeAlternate));(F=a.title)||(F=c?c+" - "+a.task:a.task);window.document.title=F;I.afterSetPageTarget.apply(this,arguments);if(c=l.node("location")){l.empty(c);var j=f&&new H.FileClient(f),f=a.breadcrumbTarget||a.target,j=j&&f&&f.Location?j.fileServiceRootURL(f.Location):
null;new d.BreadCrumbs({container:c,resource:f,rootSegmentName:b,workspaceRootSegmentName:e,workspaceRootURL:j,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(F)F.charAt(0)==="*"&&!a&&(F=F.substring(1)),a&&F.charAt(0)!=="*"&&(F="*"+F),window.document.title=F;var c=l.node("dirty");if(c)c.textContent=a?"*":""},setPageCommandExclusions:function(a){L=a},notifyAuthenticationSite:b}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(k){for(var g=/\[([^\]]*)\]\(([^\)]+)\)/g,f=g.exec(k),b=[],i=0;f;){if(f.length===3&&f[2].length>0){var e=new URL(f[2]);e.protocol!==":"&&h.validateURLScheme(e.href)&&(f.index>i&&b.push({segmentStr:k.substring(i,f.index)}),b.push({segmentStr:f[1].length>0?f[1]:f[2],urlStr:f[2]}),i=f.index+f[0].length)}f=g.exec(k)}if(i===0)return null;i<k.length-1&&b.push({segmentStr:k.substring(i)});return b},processURLSegments:function(h,
g){g.forEach(function(f){if(f.urlStr){var b=document.createElement("a");b.href=f.urlStr;b.appendChild(document.createTextNode(f.segmentStr))}else b=document.createElement("span"),b.textContent=f.segmentStr;h.appendChild(b)})}}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands","orion/PageUtil","orion/urlUtils"],function(h,k,g,f,b){function i(c,a,e,d,b){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=a;this.notificationContainerDomId=b;this.domId=e;this.progressDomId=d||e;this._hookedClose=!1;this._timer=null}var e;i.prototype={_init:function(){var c=k.node("closeNotifications");if(c&&!this._hookedClose)this._hookedClose=!0,
c.addEventListener("click",function(){window.clearTimeout(this._timer);this.setProgressMessage("")}.bind(this))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=g.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(c,a,e){this._init();this.currentMessage=c;var d=k.node(this.domId);if(typeof e==="boolean"){var b=d.getAttribute("aria-live");d.setAttribute("aria-live",e?"polite":"off");window.setTimeout(function(){c===
this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode(c)),window.setTimeout(function(){d.setAttribute("aria-live",b)},100))}.bind(this),100)}else k.empty(d),d.appendChild(document.createTextNode(c));typeof a==="number"&&window.setTimeout(function(){c===this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),a)},setErrorMessage:function(c){this.currentMessage=c;this._init();var a=c.responseText||c.message||c;if(typeof a==="string")try{a=JSON.parse(a)}catch(e){}var c=
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(c));c=k.node(this.domId);k.empty(c);c.appendChild(a)},setProgressMessage:function(c){this._init();this.currentMessage=c;var a=document.createElement("span");a.classList.add("imageSprite");a.classList.add("progressIcon");a.classList.add("core-sprite-progress");var e=k.node(this.progressDomId);
k.empty(e);e.appendChild(a);e.appendChild(document.createTextNode(c));a=k.node(this.notificationContainerDomId);a.classList.remove("notificationHide");if(c&&c.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(c){this.currentMessage=c;var a=c.responseText||c;if(typeof a===
"string")try{a=JSON.parse(a)}catch(e){}this._init();var d=a.Message||a,f="core-sprite-information",g="progressInfo",h=document.createElement("span");h.classList.add("imageSprite");h.classList.add("progressIcon");c=[];if(a.Severity)switch(a.Severity){case "Warning":f="core-sprite-warning";g="progressWarning";c.push("progressInfo");c.push("progressError");c.push("progressNormal");break;case "Error":f="core-sprite-error";g="progressError";c.push("progressWarning");c.push("progressInfo");c.push("progressNormal");
break;default:c.push("progressWarning"),c.push("progressError"),c.push("progressNormal")}c.push("notificationHide");h.classList.add(f);var i=k.node(this.progressDomId),f=k.node(this.notificationContainerDomId);k.empty(i);i.appendChild(h);if(a.HTML)a=document.createElement("span"),a.innerHTML=d,i.appendChild(a);else{if(h=b.detectValidURL(d))d=document.createDocumentFragment(),b.processURLSegments(d,h),Array.prototype.forEach.call(k.$$("a",d),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);d=document.createTextNode(d)}i.appendChild(d)}if(g&&this.progressDomId!==this.domId){f.classList.add(g);for(g=0;g<c.length;g++)f.classList.remove(c[g])}f.classList.add("notificationShow")},showWhile:function(c,a){var e=this;if(a){e.setProgressMessage(a);var d=function(){a===e.currentMessage&&e.setProgressMessage("")};c.then(d,d)}return c},
_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,a){return new e(this,++this._lastProgressId,c,a)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var c="",a=!0,e;for(e in this._progressMonitors)this._progressMonitors[e].status&&(a||(c+=", "),c+=this._progressMonitors[e].status,a=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};i.prototype.constructor=i;e=function(c,a,e,d){this.statusService=c;this.progressId=a;if(e){this.deferred=e;this.begin(d);var b=this;e.then(function(){b.done.bind(b)()},function(){b.done.bind(b)()})}};
e.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};e.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};e.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};e.prototype.constructor=e;return{StatusReportingService:i,ProgressMonitor:e}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(h,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,k,g,f){function b(){}b.prototype={_initialize:function(b,e,c,a,j){this._tooltip=new f.Tooltip({node:b,hideDelay:j||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:c,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";b=document.createRange();b.selectNode(this.$parent);b=b.createContextualFragment(this.TEMPLATE);
this.messages&&g.processTextNodes(b,h);this.$parent.appendChild(b);var d=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&d.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(b){for(var e=0;e<b.childNodes.length;e++){var c=b.childNodes[e];c.id&&(this["$"+c.id]=c);this._bindElements(c)}},_afterShowingFunction:function(b){return function(){b&&b.bind(this)();if(!this.customFocus){var e=
g.firstTabbable(this.$parent);e&&e.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};b.prototype.constructor=b;return{PopupDialog:b}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,k,g,f){var b={};(function(){var i=!1;b.updateNavTools=function(e,c,a,b,d,f){var m=g.node(b);if(m)c.destroy(m);else throw h["could not find toolbar "]+b;c.renderCommands(b,m,f,a,"button");if(d&&(b=g.node(d)))c.destroy(b),c.renderCommands(d,b,null,a,"button");i||(i=!0,e.getService("orion.page.selection").addEventListener("selectionChanged",function(e){var b=g.node(d);
b&&(c.destroy(b),c.renderCommands(d,b,e.selections,a,"button"))}))};b.createOperationsCommands=function(e,c,a){function b(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var d=new f.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){c.loadOperations.bind(c)()})},visibleWhen:function(){return!0}});e.addCommand(d);
d=new f.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(d){for(var d=Array.isArray(d.items)?d.items:[d.items],b=0;b<d.length;b++){var e=d[b];a.removeOperation.bind(a)(e.Location).then(function(){c.loadOperations.bind(c)()},function(){c.loadOperations.bind(c)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!b(a);for(var c in a)if(b(a[c]))return!1;return!0}});e.addCommand(d);
d=new f.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],c=0;c<a.length;c++){var d=a[c];d.deferred&&d.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return b(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var c in a)if(!b(a[c])||!a[c].operation||!a[c].operation.cancelable)return!1;return!0}});e.addCommand(d)}})();
return b});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,k,g,f,b){function i(b){this._options=b}i.prototype=new f.PopupDialog;i.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>';i.prototype._init=
function(e){this._myOperations=[];this._operationsDeferreds=[];this._commandService=e.commandRegistry;b.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(e.triggerNode)};i.prototype._bindToDom=function(){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};i.prototype.setOperations=function(b,c){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(c[a]);this._renderOperations()};i.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}var a={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==a.Message)a.DetailedMessage=b.DetailedMessage;return a};i.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};i.prototype._renderOperationsTable=function(b,c,a){g.empty(b);for(var f=0;f<c.length;f++){var d=c[f],l=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px";i.style.paddingRight="5px";i.textContent=d.Name;l.appendChild(i);var k=document.createElement("div");i.appendChild(k);i=document.createElement("span");i.style.paddingRight="5px";i.classList.add("imageSprite");switch(d.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.")}k.appendChild(i);
i=document.createElement("span");i.classList.add("operationStatus");i.textContent=d.Name;k.appendChild(i);if(d.error){var u=d.error.Message||d.error;d.error.DetailedMessage&&d.error.DetailedMessage!==""&&(u+=": "+d.error.DetailedMessage);i.textContent=u;i.classList.remove("operationStatus");i.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",k,{operation:d,deferred:a[f]},this,"tool");b.appendChild(l)}this._setOperationsVisibility()};i.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"};i.prototype.constructor=i;return{OperationsDialog:i}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,k,g,f,b){function i(c,a){if(!this._progressPane){this._progressPane=f.node(c);this._operationsDialog=new b.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var e=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===f.KEY.ENTER)&&e._operationsDialog.show()})}}function e(c,a,b,d){this._serviceRegistry=
c;this._serviceRegistration=c.registerService("orion.page.progress",this);this._commandRegistry=b;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}i.prototype={_switchIconTo:function(c){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=c;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(c,a){var b=
{},d;for(d in c)c[d].progressMonitor||(b[d]=c[d]);if(this._isEmpty(b))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 b){var f=b[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(b,a)},_isEmpty:function(c){for(var a in c)return!1;return!0}};
i.prototype.constructon=i;e.prototype={init:function(c){if(!this._progressMonitorClass)this._progressMonitorTool=new i(c,this._commandRegistry)},progress:function(c,a,b){var d=this,e=this._operationsIndex++;!b&&this._progressMonitorClass&&(b=new this._progressMonitorClass,b.begin(a));c.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(b)f.progressMonitor=b;d.writeOperation.bind(d)(e,f,c);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var g=d._operations[e];if(a)g.Name=a;if(b)g.progressMonitor=b;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,c);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(b)f.progressMonitor=b;d.writeOperation.bind(d)(e,f,c)});return c},removeOperation:function(c){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===c){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(c)},_removeOperationFromTheList:function(c){var a=this._operations[c].progressMonitor;delete this._operations[c];delete this._operationDeferrds[c];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var c in this._operations){var a=this._operations[c];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[c].progressMonitor)&&
a.done(),delete this._operations[c],delete this._operationDeferrds[c]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(c){this._serviceRegistry.getService("orion.page.message").setProgressResult(c)},showWhile:function(c,a){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var b=this;c.then(function(){b._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){b.setProgressResult.bind(b)(a);
return a});return this.progress(c,a)},writeOperation:function(c,a,b){this._operations[c]=a;this._operationDeferrds[c]=b;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(c){c.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,k){function g(b,c,a){return b[c].apply(b,a)}function f(b){this._location=b}function b(){var b=new k;b.reject(h["No Matching OperationService for location:"]+this._location);return b}function i(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var c=b.getServiceReferences("orion.core.operation"),
a=0;a<c.length;a++){var j=b.getService(c[a]);this._services[a]=j;j=c[a].getProperty("pattern")||".*";j[0]!=="^"&&(j="^"+j);this._patterns[a]=RegExp(j)}this._getService=function(a){if(!a)return this._services[0];for(var c=0;c<this._patterns.length;++c)if(this._patterns[c].test(a))return this._services[c];return new f(a)}}f.prototype={getOperation:b,getOperations:b,removeCompletedOperations:b,removeOperation:b,cancelOperation:b};f.prototype.constructor=f;i.prototype={getOperations:function(){var b=
new k;if(this._operations)return b.resolve(this._operations),b;var c=this;this._preferenceService.getPreferences("/operations").then(function(a){c._operations=a;b.resolve(c._operations)});return b},getOperation:function(b){return g(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],c=this,a=0;a<this._services.length;a++){var f=this._patterns[a],d=new k;b[a]=d.promise;g(this._services[a],"removeCompletedOperations").then(function(a){return function(d){Array.isArray(d)&&
c.getOperations.bind(c)().then(function(c){for(var b=c.keys(),e=0;e<b.length;e++){var g=b[e];f.test(g)&&d.indexOf(g)<0&&c.remove(g)}a.resolve()})}}(d),function(a){return function(c){a.reject(c)}}(d))}return k.all(b)},removeOperation:function(b){var c=this;return g(this._getService(b),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};i.prototype.constructor=i;return{OperationsClient:i}});
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,k){var g={root:k};Object.keys(h).forEach(function(f){typeof g[f]==="undefined"&&(g[f]=h[f])});return g});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,k){function g(f){this._init(f)}g.prototype={_init:function(f){var b=f.parent,g=this,b=k.node(b);if(!b)throw h["no parent"];if(!f.model)throw h["no tree model"];if(!f.renderer)throw h["no renderer"];this._parent=b;this._treeModel=f.model;this._renderer=f.renderer;this._showRoot=f.showRoot===void 0?!1:f.showRoot;this._indent=f.indent===void 0?16:f.indent;this._onCollapse=f.onCollapse;this._labelColumnIndex=
f.labelColumnIndex===void 0?0:f.labelColumnIndex;this._id=f.id===void 0?"treetable":f.id;this._tableStyle=f.tableStyle;this._tableElement=f.tableElement||"table";this._tableBodyElement=f.tableBodyElement||"tbody";this._tableRowElement=f.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){g._showRoot?(b._depth=0,g._generate([b],0)):g._treeModel.getChildren(b,function(c){g._generate(c,0)})})},_generate:function(f,b){k.empty(this._parent);var g=document.createElement("div");this._renderer.wrapperCallback&&
this._renderer.wrapperCallback(g);var e=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(e);e.id=this._id;this._tableStyle&&e.classList.add(this._tableStyle);this._renderer.initTable(e,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(f,b);e.appendChild(this._bodyElement);g.appendChild(e);
this._parent.appendChild(g);this._rowsChanged()},_generateChildren:function(f,b,g){for(var e=0;e<f.length;e++){var c=document.createElement(this._tableRowElement);c.id=this._treeModel.getId(f[e]);this._renderer.rowCallback&&this._renderer.rowCallback(c);c._depth=b;c._item=f[e];this._renderer.render(f[e],c);c.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*b+"px";g?(this._bodyElement.insertBefore(c,g.nextSibling),g&&(g=c)):this._bodyElement.appendChild(c)}},_rowsChanged:function(){this._renderer.rowsChanged&&
this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(f,b,g){var e=this._treeModel.getId(f),c;if(e===this._id)this._removeChildRows(e),this._generateChildren(b,0),this._rowsChanged();else{var a=k.node(e);a?(a._item=f,a&&(g||a._expanded)?(a._expanded=!0,this._removeChildRows(e),this._renderer.updateExpandVisuals(a,!0),b?(this._generateChildren(b,a._depth+1,a),this._rowsChanged()):(c=this,b=this._treeModel.getChildren(a._item,function(b){c._generateChildren(b,
a._depth+1,a);c._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(h["could not find table row "]+e)}},getItem:function(f){var b=k.node(f);return b&&b._item?b._item:f},toggle:function(f){var b=k.node(f);b&&(b._expanded?(this.collapse(f),this._renderer.updateExpandVisuals(b,!1)):(this.expand(f),this._renderer.updateExpandVisuals(b,!0)))},isExpanded:function(f){return(f=k.node(f))?f._expanded:!1},expand:function(f,b,g){var f=typeof f==="string"?f:this._treeModel.getId(f),e=k.node(f);
if(e&&!e._expanded){e._expanded=!0;var c=this;this._renderer.updateExpandVisuals(e,!0);this._treeModel.getChildren(e._item,function(a){c._generateChildren(a,e._depth+1,e);c._rowsChanged();b&&b.apply(c,g)})}},_removeChildRows:function(f){for(var b=f===this._id,g=!1,e=-1,c=[],a=k.$$array(".treeTableRow",this._parent),j=0;j<a.length;j++){var d=a[j];if(g)break;if(b)d._depth>e?c.push(d):g=!0;else if(d.id===f)b=!0,e=d._depth}for(f=0;f<c.length;f++)b=c[f],b.parentNode.removeChild(b)},collapse:function(f){var f=
typeof f==="string"?f:this._treeModel.getId(f),b=k.node(f);if(b){if(!b._expanded)return;b._expanded=!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(f);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)}};g.prototype.constructor=g;return{TableTree:g}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(g,f){this.firstLevelChildren=g;this.reset();this._init(f)}h.prototype={_init:function(g){if(g)this.isExpanded=g.isExpanded,this.isExpandable=g.isExpandable,this.forceExpandFunc=g.forceExpandFunc,this.getChildrenFunc=g.getChildrenFunc},topLevel:function(g){return g.parent?g.parent===this.root:!0},_getChildren:function(g){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(g):g?g.children:
null},_expanded:function(g){if(!g)return!0;var f=this._getChildren(g),f=f&&f.length>0;this.isExpanded&&f&&(f=this.isExpanded(g));return f},_expandable:function(g){return!g?!0:this.isExpandable?this.isExpandable(g):!1},_diveIn:function(g){return this._expanded(g)?(this.setCursor(this._getChildren(g)[0]),this.cursor()):null},_drillToLast:function(g){return this._expanded(g)?(g=this._getChildren(g),this._drillToLast(g[g.length-1])):g},_forward:function(g){if(!this._cursor)return null;var f=this._diveIn(this._cursor);
if(!f){if(g&&this._expandable(this._cursor)&&this.forceExpandFunc){var b=this;return this.forceExpandFunc(this._cursor,"first",function(f){f&&b.setCursor(f)})}(f=this._findSibling(this._cursor,!0))&&this.setCursor(f)}return f},_backward:function(g){if(!this._cursor)return null;var f=this._findSibling(this._cursor,!1);f&&f!==this._cursor.parent&&(f=this._drillToLast(f));if(g&&f&&this._expandable(f)&&this.forceExpandFunc&&f!==this._cursor.parent){var b=this;return this.forceExpandFunc(f,"last",function(f){f&&
b.setCursor(f)})}f&&this.setCursor(f);return f},_findSibling:function(g,f){for(var b=this.topLevel(g),h=this._getChildren(g.parent),h=b?this.firstLevelChildren:h,e=0;e<h.length;e++)if(h[e]===g)return e===0&&!f?b?null:g.parent:e===h.length-1&&f?b?null:this._findSibling(g.parent,f):f?h[e+1]:h[e-1];return null},_inParentChain:function(g,f){for(var b=g.parent;b;){if(b===f)return!0;b=b.parent}return!1},_getTopLevelParent:function(g){if(this.topLevel(g))return g;for(g=g.parent;g;){if(this.topLevel(g))return g;
g=g.parent}return null},_onCollapse:function(g){return this._expanded(g.parent)?g:this._onCollapse(g.parent)},_scan:function(g,f,b){this.setCursor(f);var h=[];for(h.push(f);;){if(this.iterate(g))h.push(this.cursor());else break;if(b===this.cursor())return h}return null},setCursor:function(g){this._prevCursor=this._cursor;this._cursor=g},setTree:function(g){this.firstLevelChildren=g;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(g,f){var b=this.cursor(),
h=this._scan(!0,g,f);h||(h=this._scan(!1,g,f));this.setCursor(b);return h},iterate:function(g,f){return g?this._forward(f):this._backward(f)},iterateOnTop:function(g,f){var b=this._findSibling(this._getTopLevelParent(this.cursor()),g);b?this.setCursor(b):f&&this.firstLevelChildren.length>0&&this.setCursor(g?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(g){if(!this._cursor)return null;return this._inParentChain(this._cursor,g)?(this.setCursor(g),
this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent},cursorMoved:function(){return this._cursor!==this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return h}();return h});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(h,k,g){var h={},f=navigator.userAgent.indexOf("iPad")!==-1,b=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function h(b,c,a){this.explorer=b;this.model=this.explorer.model;this._navDict=c;this._listeners=[];this._selections=[];this._currentColumn=0;var f=this._getEventListeningDiv();f.tabIndex=0;f.classList.add("selectionModelContainer");
var d=this;this._modelIterator=new g.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:a.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return d.explorer.renderer.isExpandable(a)}:function(a){return d.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,c,b){return d.explorer.forceExpandFunc(a,c,b)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&f.focus();b=function(a){if(a.target===f){if(d.explorer.preventDefaultFunc&&d.explorer.preventDefaultFunc(a,
d._modelIterator.cursor()))return!0;if(a.keyCode===k.KEY.DOWN)return d.onDownArrow(a);else if(a.keyCode===k.KEY.UP)return d.onUpArrow(a);else if(a.keyCode===k.KEY.RIGHT)return d.onRightArrow(a);else if(a.keyCode===k.KEY.LEFT)return d.onLeftArrow(a);else if(a.keyCode===k.KEY.SPACE)return d.onSpace(a);else if(a.keyCode===k.KEY.ENTER)return d.onEnter(a)}};f.addEventListener("keydown",b,!1);this._listeners.push({type:"keydown",listener:b});b=function(){if(d.explorer.onFocus)d.explorer.onFocus(!1);else d.toggleCursor(null,
!1)};f.addEventListener("blur",b,!1);this._listeners.push({type:"blur",listener:b});b=function(){if(d.explorer.onFocus)d.explorer.onFocus(!0);else d.toggleCursor(null,!0)};f.addEventListener("focus",b,!1);this._listeners.push({type:"focus",listener:b});this._parentDiv=f}h.prototype={_init:function(b){this._linearGridMove=!1;if(b)this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=b.gridClickSelectionPolicy||"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=
b.postDefaultFunc},_ctrlKeyOn:function(e){return b?e.metaKey:e.ctrlKey},removeListeners:function(){if(this._listeners)for(var b=0;b<this._listeners.length;b++)this._parentDiv.removeEventListener(this._listeners[b].type,this._listeners[b].listener,!1)},focus:function(){var b=this._getEventListeningDiv();b&&b.focus()},_getEventListeningDiv:function(b){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(b):k.node(this.explorer._parentId)},
isExpandable:function(b){return!b?!1:k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)))?!0:!1},isExpanded:function(b){return!b?!1:this.explorer.myTree.isExpanded(this.model.getId(b))},refreshSelection:function(b){var c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){c._clearSelection();for(var f=0;f<a.length;f++)c._selections.push(a[f]);c._selections.length>0&&c.cursorOn(c._selections[0],!0,!1,b)})},refreshModel:function(b,c,a,f){this._currentColumn=
0;this.topIterationNodes=[];this.model=c;this._navDict=b;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!f&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){for(var b=this.model.getId(b),c=0;c<this._selections.length;c++)if(b===this.model.getId(this._selections[c]))return c;
return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},setSelection:function(b,c){if(this._selectionPolicy==="cursorOnly")c&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0);else if(this._isRowSelectable(b)){if(!c||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b;else{var a=this._inSelection(b);a>=0?(this._checkRow(b,
!0),this._selections.splice(a,1)):(this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b)}this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(b,c){b||(b=this.currentModel());var a=this._getGridChildren(b);if(a&&a.length>1||c===0&&a){c!==0&&this.toggleCursor(b,!1);var f=this._currentColumn,d=!0;f+=c;f<0?(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!1)?b=this.currentModel():d=!1),
f=d?a.length-1:this._currentColumn):f>=a.length&&(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!0)?b=this.currentModel():d=!1),f=d?0:this._currentColumn);this._currentColumn=f;c!==0&&this.toggleCursor(b,!0);return!0}return!1},_getGridChildren:function(b){return this._navDict?this._navDict.getGridNavHolder(b):null},getCurrentGrid:function(b){b||(b=this.currentModel());return(b=this._getGridChildren(b))&&b.length>0?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var c=
this._parentDiv,a;b&&b!==c&&(a=b.getAttribute("role"))!=="grid"&&a!=="tree"&&a!=="treegrid";)b=b.parentNode;return b===c?null:b},toggleCursor:function(b,c){var a=this.getRowDiv(b),f=this.getCurrentGrid(b);f?(a&&(c?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),f.domNode&&(a=this.getAriaContainerElement(f.domNode),c?(f.domNode.classList.add("treeIterationCursor"),a&&a.setAttribute("aria-activedescendant",f.domNode.id)):f.domNode.classList.remove("treeIterationCursor"))):
a&&(c?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,c,a,f){var a=a===void 0?!1:a,d,g;if(b||c){if(g===this._modelIterator.cursor())return;d=this._modelIterator.cursor();g=b;this._modelIterator.setCursor(g)}else d=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();if(d!==g||c)if(this.toggleCursor(d,!1),!c||g)if(this.moveColumn(null,0),this.toggleCursor(g,
!0),(b=this.getRowDiv())&&!f&&!this._visible(b)&&b.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(d,g)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=[],c=0;c<this._selections.length;c++)b.push(this.model.getId(this._selections[c]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;var b=this.model.getId(b),c=this._navDict.getValue(b);return c&&c.rowDomNode?c.rowDomNode:k.node(b)},iterate:function(b,
c,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(b,c)&&(this.cursorOn(null,!1,b),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(b,c){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(b);if(a){var f=k.node(this.explorer.renderer.getCheckBoxId(a.id)),d=c?!f.checked:!0;if(d!==f.checked)this.explorer.renderer.onCheck(a,f,d,!0)}}else this._select(b,c)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(b){return(b=k.node(b))?k.bounds(b).height:0},_visible:function(b){if(b.offsetWidth===0||b.offsetHeight===0)return!1;var c=0;c+=this._getToolBarHeight("staticBanner");c+=this._getToolBarHeight("titleArea");c+=this._getToolBarHeight("pageToolbar");var a=this._getEventListeningDiv(!0).getClientRects()[0],f=this._vpHeight();this._vpWidth();for(var c=a.top>c?a.top:
c,a=a.bottom<f?a.bottom:f,b=b.getClientRects(),f=0,d=b.length;f<d;f++){var g=b[f];if(g.top>=c&&g.top<=a&&g.bottom>=c&&g.bottom<=a)return!0}return!1},_select:function(b){b||(b=this._modelIterator.cursor());var c=this.getRowDiv(b);c&&(this._inSelection(b)<0?c.classList.add("checkedRow"):c.classList.remove("checkedRow"))},_onModelGrid:function(b,c){var a=this._getGridChildren(b);if(a)for(var f=0;f<a.length;f++)if(c.target===a[f].domNode)return!0;return!1},onClick:function(b,c){var a=k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));
if(c.target!==a&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(b,c)))if(this.cursorOn(b,!0,!1,!0),f)this.setSelection(b,!0);else if(this._ctrlKeyOn(c))this.setSelection(b,!0);else if(c.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,b)){this._clearSelection(!0);for(var g=0;g<a.length;g++)this.setSelection(a[g],!0)}}else this.setSelection(b,!1)},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,
!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1);b.preventDefault();return!1},_shouldMoveColumn:function(b){var c=this.currentModel(),a=this._getGridChildren(c);return a&&a.length>1?this.isExpandable(c)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,
-1),b.preventDefault(),!0;var c=this._modelIterator.cursor();if(!c)return!1;if(this.isExpandable(c)&&this.isExpanded(c))return this.explorer.myTree.collapse(c),b.preventDefault(),!0;this._modelIterator.topLevel(c)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(c.parent),this.setSelection(c.parent,!1))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var c=this._modelIterator.cursor();
if(!c)return!1;if(this.isExpandable(c)&&!this.isExpanded(c))return this.explorer.myTree.expand(c),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),!0);b.preventDefault()},onEnter:function(b){var c=this.getCurrentGrid(this._modelIterator.cursor());if(c)if(c.widget)if(typeof c.onClick==="function")c.onClick();else typeof c.widget.focus==="function"&&c.widget.focus();
else{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);c.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(c=this._modelIterator.cursor()))if(c=this.explorer.renderer.getRowActionElement(this.model.getId(c)),c.href)this._ctrlKeyOn(b)?window.open(c.href):window.location.href=c.href}};return h}();h.ExplorerNavDict=function(){function b(e){this._dict={};this._model=e}b.prototype={addRow:function(b,
c){this._dict[this._model.getId(b)]={model:b,rowDomNode:c}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,c){if(!b)return null;var a=this._model.getId(b);if(this._dict[a]){if(!this._dict[a].gridChildren&&c)this._dict[a].gridChildren=[];return this._dict[a].gridChildren}return null},initGridNavHolder:function(b){if(!b)return null;b=this._model.getId(b);if(this._dict[b])this._dict[b].gridChildren=null}};return b}();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,k,g,f,b,i){var e={};e.Explorer=function(){function c(a,b,c,e){this.registry=a;this.renderer=c;this.selection=b;this.commandService=e;this.myTree=null}c.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 e=document.createElement("td");e.id=b+"placeHolderCol";c.appendChild(e);a.appendChild(c);c=g.node(b+"placeHolderRow");a=g.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return g.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===
void 0||a===null))for(var c=a.length,e=0;e<c;e++)b._expandRecursively(a[e])})})}},createTree:function(a,c,d){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var e=a+"innerTree",h=g.node(e);h&&g.empty(h);if(c)c.rootId=e;this.model=c;this._parentId=a;this._treeOptions=d;if(!d||d&&!d.noSelection)this.selectionPolicy=d?d.selectionPolicy:"",this._navDict=new b.ExplorerNavDict(this.model);this.myTree=new f.TableTree({id:e,
model:c,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:d?!!d.showRoot:!1,indent:d?d.indent:void 0,onCollapse:d?d.onCollapse:void 0,navHandlerFactory:d?d.navHandlerFactory:void 0,tableElement:d?d.tableElement:void 0,tableBodyElement:d?d.tableBodyElement:void 0,tableRowElement:d?d.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(),e=0;e<c.length;e++){var f=a.getRowDiv(c[e]);f&&f.parentNode&&(f=this.getNavDict().getValue(this.model.getId(c[e])),f.model&&b.push(f.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 b.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var c=this;this.model.getRoot(function(b){b instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,b):b.children&&b.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,
b.children);a&&a.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return c}();e.createExplorerCommands=function(b,a){function e(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=new i.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return e(a)},callback:function(a){a.items.expandAll()}}),f=new i.Command({tooltip:h["Collapse all"],
imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return e(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(f)};e.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}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}();e.ExplorerFlatModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.root=d}b.prototype=new e.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}();e.ExplorerRenderer=function(){function b(a,c){this.explorer=c;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;g.empty(a);this._treeTableClass&&
a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,e,f){var c=c||"tool",g=document.createElement("td");g.id=b.id+"actionswrapper";e&&g.classList.add(e);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,g,a,this.explorer,c,null,f&&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 g},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(b.id);e.classList.add("core-sprite-check");e.classList.add("selectionCheckmarkSprite");e.rowId=b.id;if(this.getCheckedFunc)e.checked=this.getCheckedFunc(a),e.checked?(this._highlightSelection&&b.classList.add("checkedRow"),e.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),e.classList.remove("core-sprite-check_on"));c.appendChild(e);var f=this;e.addEventListener("click",function(a){f.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,e,f){(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,e);this.explorer.getNavHandler()&&f&&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 e=this.explorer.getNavDict().getValue(a[b]);if(e&&e.rowDomNode&&
e.model&&(c.push(e.model),this._highlightSelection&&e.rowDomNode.classList.add("checkedRow"),e=g.node(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,e.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 e;if(c)for(e=0;e<c.length;e++)if(g.node(c[e])){this._expanded.push(c[e]);var f=this;this.tableTree.expand(c[e],function(){f._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,
b){var c=g.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,e){var f=document.createElement("span");f.id=this.expandCollapseImageId(a.id);b.appendChild(f);f.classList.add(this._twistieSpriteClass);f.classList.add(this._collapseImageClass);if(c){var g=document.createElement("span");b.appendChild(g);g.classList.add(e||"imageSprite");g.classList.add(c)}var h=
this;f.onclick=function(){h.tableTree.toggle(a.id);if(h.tableTree.isExpanded(a.id))h._expanded.push(a.id);else for(var b in h._expanded)if(h._expanded[b]===a.id){h._expanded.splice(b,1);break}(b=h._getUIStatePreferencePath())&&window.sessionStorage&&h._storeExpansions(b)};return f},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=
g.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],e=g.node(c.id+"actionswrapper");this.commandService.destroy(e);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,e,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();e.SelectionRenderer=function(){function b(a,c){this._init(a);this.explorer=c}b.prototype=new e.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 e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>0&&f.classList.add("navColumn"),c.appendChild(f),f=this.getCellHeaderElement(++e);b.appendChild(c);e>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 e=this;b.addEventListener("click",function(b){if(e.explorer.getNavHandler())e.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,f=this.getCellElement(c,a,b);f;)b.appendChild(f),c===0?this.getPrimColumnStyle?f.classList.add(this.getPrimColumnStyle()):f.classList.add("navColumn"):this.getSecondaryColumnStyle?f.classList.add(this.getSecondaryColumnStyle()):f.classList.add("secondaryColumn"),
f=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();e.SimpleFlatModel=function(){function b(a,c,d){this.items=a;this.getKey=d;this.idPrefix=c;this.root={children:a}}b.prototype=new e.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 e});
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,k,g,f,b,i){function e(a,b,c,e,f,g,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{f||(f=i.getOpenWithCommands(c));if(!g)for(a=0;a<f.length;a++)f[a].isEditor===
"default"&&(g=f[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,r=!1,a=0;a<f.length;a++)if(c=f[a],c.visibleWhen(b)){n=c.hrefCallback({items:b});r=!0;break}k.when(e.getFileContentType(b),function(a){var c;if(c=!r)if(c=g){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=g.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 c(a,b,c,e){this.explorer=b;this.commandService=c;this.contentTypeService=e;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}c.prototype=new f.SelectionRenderer;c.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};c.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};c.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};
c.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"}};c.prototype.setTarget=function(a){this.target=a};c.prototype.createFolderNode=function(a){var b;this.showFolderLinks?b=e(this.folderLink||"",a,this.commandService,this.contentTypeService):(b=document.createElement("span"),b.textContent=a.Name);return b};c.prototype.showFolderLinks=!0;c.prototype.getCellElement=function(a,c,d){switch(a){case 0:var a=
document.createElement("td"),f=document.createElement("span");f.id=d.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var g;if(c.Directory)this.getExpandImage(d,f),g=this.createFolderNode(c),f.appendChild(g),this.explorer._makeDropTarget(c,g),this.explorer._makeDropTarget(c,d);else{if(!this.openWithCommands){this.openWithCommands=i.getOpenWithCommands(this.commandService);for(g=0;g<this.openWithCommands.length;g++)if(this.openWithCommands[g].isEditor===
"default")this.defaultEditor=this.openWithCommands[g]}g=e("",c,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,{target:this.target});f.appendChild(g)}if(g)g.id=d.id+"NameLink",g.nodeType===1&&(b.addNavGrid(this.explorer.getNavDict(),c,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,c,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;d=document.createElement("td");
if(c.LocalTimeStamp)d.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return d;case 2:if(this.oneColumn)return null;d=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,d.textContent=Math.ceil(c).toLocaleString()+" KB";d.style.textAlign="right";return d}};c.prototype.constructor=c;return{NavigatorRenderer:c,createLink:e}});
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,k,g,f,b,i,e,c,a){function j(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function d(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new j(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}j.prototype.makeRenderFunction=function(b,d,i,j,o){var n=this.serviceRegistry,r=this.commandRegistry;this.openWithCommands=this.openWithCommands||c.createOpenWithCommands(n,b,r);var v=this;return function(c,n,q){a.when(v.openWithCommands,function(a){if(q)g.empty(d),a=document.createElement("div"),a.appendChild(document.createTextNode(h["Search failed."])),d.appendChild(a),typeof j==="function"&&j(d);else{var v=
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;g.empty(d);if(c&&c.length>0){var B=document.createElement("table");B.setAttribute("role","presentation");for(var A=0;A<c.length;A++){var t=
c[A],C;if(!z&&(z=!0,i))C=B.insertRow(0).insertCell(0),C.textContent=i;C=B.insertRow(-1).insertCell(0);C.colspan=2;o&&o(C);var D={Name:t.name,Directory:t.directory,Location:t.path||t.location},D=e.createLink(k.toUrl("navigate/table.html"),D,r,b,a,null,{"aria-describedby":(t.folderName?t.folderName:t.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}});t.LineNumber&&D.appendChild(document.createTextNode(" (Line "+t.LineNumber+")"));C.appendChild(D);v(C,t)}d.appendChild(B);typeof j===
"function"&&j(d)}!z&&n&&(a=f.formatMessage(h["No matches found for ${0}"],n),g.empty(d),d.appendChild(document.createTextNode(a)),typeof j==="function"&&j(d))}})}};d.prototype={search:function(a,c,d){var e=function(a){for(var c=[],d=0;d<a.response.docs.length;d++){var e=a.response.docs[d];c.push({name:e.Name,path:e.Location,folderName:b.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return c};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,
function(a){d(e(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var c=a.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(b),c)},function(a){d(null,null,a)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(a){d(e(a),null)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new i.SearchCrawler(this.registry,this._fileService,
a,{childrenLocation:this.getChildrenLocation()})).search(function(a){d(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);g.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=g.node("search");c||(c="");if(d&&d.placeholder){d.value="";var e=f.formatMessage(h["Search ${0}"],c);d.placeholder=e.length>30?e.substring(0,27)+"...":f.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}}};d.prototype.constructor=d;return{Searcher:d}});
define("orion/dialogs",[],function(){function h(h){this._serviceRegistry=h;this._serviceRegistration=h.registerService("orion.page.dialog",this)}h.prototype={confirm:function(h,g){g(window.confirm(h))},openFiles:function(){}};h.prototype.constructor=h;return{DialogService:h}});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(h,k,g,f){function b(a,b,c){var e=a[b],f=new g;if(typeof e!=="function")throw h["Service method missing: "]+b;e.apply(a,c).then(function(a){f.resolve(a)},function(a){f.reject(a)});return f}function i(a,b){return new f.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function e(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._sitePattern=c.getProperty("sitePattern");this._filePattern=c.getProperty("filePattern");this._name=c.getProperty("name");this._id=c.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return i(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function c(a,c){a[c]=function(){return b(this._getService(),c,Array.prototype.slice.call(arguments))}}
function a(a,b,c){for(var f=a.getServiceReferences("orion.site"),g=[],i=[],k=[],n=0;n<f.length;n++){var r=f[n].getProperty(b),r=r[0]!=="^"?"^"+r:r;g.push(f[n]);i.push(RegExp(r));k.push(a.getService(f[n]))}c=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<i.length;c++)if(i[c].test(a))return c;throw h["No Matching SiteService for "]+b+": "+a;}(c);return new e(a,k[c],g[c])}e.prototype={isFileMapped:function(a,b){if(!a){var c=new g;c.resolve(!1);return c}return this.getURLOnSite(a,
b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,c){function e(c,h,i){return f.isFileMapped(a,b).then(function(a){a||i.push({Source:c,Target:h,FriendlyPath:c});a=new g;a.resolve();return a})}var f=this,h="/"+b.Name,i;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";i=f.toInternalForm(b.Location).then(function(b){return e(h,b,a.Mappings).then(function(){return f.updateSiteConfiguration(a.Location,a).then(function(a){return f.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var k=b.Name+" site";i=f.toInternalForm(b.Location).then(function(a){var b=[];return e(h,a,b).then(function(){return f.createSiteConfiguration(k,c,b,null,{Status:"started"}).then(function(a){return a})})})}return i.then(function(a){return f.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(a){c(e.prototype,
a)});e.prototype.constructor=e;return{forLocation:function(b,c){return a(b,"pattern",c)},forFileLocation:function(b,c){return a(b,"filePattern",c)},getFileClient:i,SiteClient:e}});define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(h,k,g){return{generateEditSiteHref:function(f){var b=h.toUrl("sites/site.html");return(new g(b+"#{,resource,params*}")).expand({resource:k.makeRelative(f.Location)})}}});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commandRegistry,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(h,k,g,f,b,i,e,c){function a(a){return a instanceof Array?a:[a]}function j(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var d=f.Command,l=c.formatMessage;return{createSiteServiceCommands:function(a,c,d){var d=d||{},e=new f.Command({name:h.Create,tooltip:h["Create a new site configuration"],
id:"orion.site.create",parameters:new g.ParametersDescription([new g.CommandParameter("name","text",h.Name)]),visibleWhen:function(){return!0},callback:function(c){var e=c.items,f=a.getService(e),e=i.getFileClient(a,e.getProperty("filePattern")),g=c.parameters&&c.parameters.valueFor("name"),c=a.getService("orion.page.progress");(c?c.progress(e.loadWorkspaces(),"Loading workspaces"):e.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&g&&f.createSiteConfiguration(g,a).then(function(a){d.createCallback(b.generateEditSiteHref(a),
a)},d.errorCallback)})}});c.addCommand(e)},createSiteCommands:function(c,f){var g=c.getService("orion.page.dialog"),k=c.getService("orion.page.progress"),n=new d({name:h.Edit,tooltip:h["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return b.generateEditSiteHref(a.items instanceof Array?a.items[0]:a.items)}});f.addCommand(n);n=new d({name:h.Start,tooltip:h["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(b){var d=a(b.items),f=b.userData;if(f.site&&d.length>1)throw Error("userData.site requires a single site configuration to act upon");d=d.map(function(a){var b=f.site||{};b.HostingStatus={Status:"started"};a=a.Location;return i.forLocation(c,a).updateSiteConfiguration(a,b)});k.showWhile(e.all(d)).then(j(b.items)).then(f.startCallback,
f.errorCallback)}});f.addCommand(n);n=new d({name:h.Stop,tooltip:h["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(b){var d=a(b.items),f=b.userData;if(f.site&&d.length>1)throw Error("userData.site requires a single site configuration to act upon");d=d.map(function(a){var b=f.site||{};b.HostingStatus={Status:"stopped"};a=a.Location;return i.forLocation(c,
a).updateSiteConfiguration(a,b)});k.showWhile(e.all(d)).then(j(b.items)).then(f.stopCallback,f.errorCallback)}});f.addCommand(n);n=new d({name:h.Delete,tooltip:h["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){b=a(b);return b.length>0?b.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(b){var d=a(b.items),f=b.userData,k=d.length===1?l(h.ConfirmDeleteSingle,d[0].Name):l(h.ConfirmDeleteMultiple,
d.length);g.confirm(k,function(a){a&&(a=d.map(function(a){a=a.Location;return i.forLocation(c,a).deleteSiteConfiguration(a)}),e.all(a).then(j(b.items)).then(f.deleteCallback,f.errorCallback))})}});f.addCommand(n)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new d({name:h["Add to site"],tooltip:h["Add the file to this site"],id:"orion.site.add-to",imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},callback:function(b){var d=
b.userData.file,e=b.items.SiteConfiguration,f=a.getService("orion.page.progress");return(f?f.progress(c.loadWorkspaces(),"Loading workspaces"):c.loadWorkspaces()).then(function(b){return i.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new d({name:h.View,tooltip:h["View the file on the site"],id:"orion.site.view-on-link",visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(b){var c=b.userData.file,
b=b.items.SiteConfiguration;return i.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(h){function k(g,f){f||(f="orion.page.selection");this._serviceRegistry=g;h.attach(this);this._serviceRegistration=g.registerService(f,this);this._selections=null}k.prototype={getSelection:function(g){var f=this._getSingleSelection();typeof g==="function"&&g(f);return f},getSelections:function(g){var f=Array.isArray(this._selections)?this._selections.slice():[];typeof g==="function"&&g(f);return f},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(g){var f=this._selections;this._selections=Array.isArray(g)?g.length>0?g.slice():null:g?[g]:null;f!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};k.prototype.constructor=k;return{Selection:k}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(h,k,g,f){function b(b,c){var a=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!c.id)throw Error("Missing required argument: id");this.id=c.id;if(!c.title)throw Error("Missing required argument: title");var g=c.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");b.appendChild(this.domNode);for(var d=0;d<g.length;d++)this.domNode.classList.add(g[d]);this.domNode.id=c.id;if(c.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(c.iconClass){var i=document.createElement("span");i.classList.add("sectionIcon");this.domNode.appendChild(i);(Array.isArray(c.iconClass)?c.iconClass:[c.iconClass]).forEach(function(a){i.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=c.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=c.title;if(typeof c.getItemCount==="function")g=document.createElement("div"),g.classList.add("layoutLeft"),g.classList.add("sectionItemCount"),this.domNode.appendChild(g),g.textContent=c.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
c.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);g=document.createElement("div");g.id=c.id+"FilterSearchBox";this.domNode.appendChild(g);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=c.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=c.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=c.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);c.slideout&&(g=f.slideoutHTMLFragment(c.id),d=document.createRange(),d.selectNode(this.domNode),g=d.createContextualFragment(g),this.domNode.appendChild(g));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);b.appendChild(this._contentParent);c.content&&this.setContent(c.content);
this.hidden=c.hidden;if(typeof c.onExpandCollapse==="function")this._onExpandCollapse=c.onExpandCollapse;this._preferenceService=c.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var k=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(k.id);if(a!==void 0)k.hidden=!a;if(!k.hidden)k._contentParent.style.display="block";k._updateExpandedState(!k.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=c.commandService;this._lastMonitor=0;this._loading={}}function i(b){this._section=b;this._id=++b._lastMonitor}b.prototype={setTitle:function(b){this.titleNode.textContent=b},setContent:function(b){typeof b==="string"?this._contentParent.innerHTML=b:(this._contentParent.innerHTML="",this._contentParent.appendChild(b))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new i(this)},_setMonitorMessage:function(b,c){this._progressNode.style.visibility=
"visible";this._loading[b]=c;var a="",f;for(f in this._loading)a!==""&&(a+="\n"),a+=this._loading[f];this._progressNode.title=a},_monitorDone:function(b){delete this._loading[b];var b="",c;for(c in this._loading)b!==""&&(b+="\n"),b+=this._loading[c];this._progressNode.title=b;if(b==="")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(b,c){var a=this.twistie,f=this.id;a&&(a.classList.add(b?this._expandImageClass:this._collapseImageClass),a.classList.remove(b?this._collapseImageClass:this._expandImageClass));this._preferenceService&&c&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(f,b)});this._onExpandCollapse&&this._onExpandCollapse(b,this)}};b.prototype.constructor=b;i.prototype={begin:function(b){this.status=b;this._section._setMonitorMessage(this.id,b)},worked:function(b){this.status=
b;this._section._setMonitorMessage(this.id,b)},done:function(b){this.status=b;this._section._monitorDone(this.id)}};i.prototype.constructor=i;return{Section:b}});
define("orion/sites/siteMappingsTable","i18n!orion/sites/nls/messages,orion/commands,orion/explorers/explorer,orion/i18nUtil,orion/Deferred,orion/webui/littlelib,orion/EventTarget".split(","),function(h,k,g,f,b,i,e){function c(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function a(a){return a.replace(/[\r\n\t]/g,"")}var j={};j.Model=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.items=d}a.prototype=new g.ExplorerFlatModel;c(a.prototype,{getId:function(a){return a===this.root?
this.rootId:"mapping_"+this.items.indexOf(a)}});return a}();j.Renderer=function(){function a(b,c){this._init(b);this.options=b;this.explorer=c;this.commandService=b.commandService}a.prototype=new g.SelectionRenderer;c(a.prototype,{getCellHeaderElement:function(a){switch(a){case 0:return a=document.createElement("th"),a.textContent=" ",a.classList.add("isValidColumn"),a;case 1:return a=document.createElement("th"),a.textContent=h.Path,a;case 2:return a=document.createElement("th"),a.textContent=h["Mount at (server path)"],
a;case 3:return a=document.createElement("th"),a.textContent=h.Actions,a}},getCellElement:function(a,b,c){var d;switch(a){case 0:return this.getIsValidCell(a,b,c);case 1:return a=document.createElement("td"),c=document.createElement("input"),c.classList.add("pathInput"),c.value=typeof b.FriendlyPath!=="undefined"?b.FriendlyPath:b.Target,d=function(a){this.options.onchange(b,"FriendlyPath",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 2:return a=document.createElement("td"),
c=document.createElement("input"),c.classList.add("serverPathInput"),c.value=b.Source,d=function(a){this.options.onchange(b,"Source",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 3:return this.getActionsColumn(b,c)}},getIsValidCell:function(a,b){var c=b.Target,d=document.createElement("td"),e,g;if(/^\//.test(c)){var j=this;this.options.siteClient.toFileLocation(c).then(function(a){e=a;var b=document.createElement("span");b.classList.add("validating");i.empty(d);d.appendChild(b);
b.textContent="\u2026";b=j.options.fileClient._getService(a).read(a,!0);j.options.progress&&j.options.progress.progress(b,"Reading metadata of "+a);b.then(function(a){var b=a&&a.Directory,a=b?"core-sprite-folder":"core-sprite-file",b=b?h.WorkspaceFolder:h.WorkspaceFile;g=document.createElement("a");g.href=e;g.target="_new";var c=document.createElement("span");c.className+="imageSprite "+a;c.title=f.formatMessage(b,e);g.appendChild(c);i.empty(d);d.appendChild(g)},function(){g=document.createElement("a");
g.href=e;g.target="_new";var a=document.createElement("span");a.className+="imageSprite core-sprite-error";a.title=f.formatMessage(h.WorkspaceResourceNotFound,e);g.appendChild(a);i.empty(d);d.appendChild(g)})})}else e=c,g=document.createElement("a"),g.href=e,g.target="_new",i.empty(d),c=document.createElement("span"),c.className+="imageSprite core-sprite-link",c.title=f.formatMessage(h.ExternalLinkTo,e),g.appendChild(c),d.appendChild(g);d.classList.add("isValidCell");return d}});return a}();j.MappingsTable=
function(){function d(a){this.registry=a.serviceRegistry;this.commandService=a.commandRegistry;this.registerCommands();this.siteClient=a.siteClient;this.parentId=a.parentId;this.selection=a.selection;this.renderer=new j.Renderer({checkbox:!1,onchange:this.fieldChanged.bind(this),siteConfiguration:a.siteConfiguration,siteClient:a.siteClient,fileClient:a.fileClient,commandService:this.commandService,progress:a.serviceRegistry.getService("orion.page.progress"),actionScopeId:"siteMappingCommand"},this);
this.myTree=null;this._setSiteConfiguration(a.siteConfiguration);this.setDirty(!1)}d.prototype=Object.create(g.Explorer.prototype);e.attach(d.prototype);c(d.prototype,{_setSiteConfiguration:function(a){this.siteConfiguration=a;this.refresh()},refresh:function(){var a=function(){return(new b).resolve(this.siteConfiguration.Mappings)}.bind(this),c=this;this.siteClient.updateMappingsDisplayStrings(this.siteConfiguration).then(function(b){c.siteConfiguration.Mappings=b.Mappings;c.createTree(c.parentId,
new j.Model(null,a,c.siteConfiguration.Mappings))})},render:function(){this.changedItem(this.siteConfiguration.Mappings,this.siteConfiguration.Mappings)},renderItemRow:function(a,b){if(b==="FriendlyPath"){var c=document.getElementById(this.myTree._treeModel.getId(a)),d=i.$(".isValidCell",c),c=this.renderer.getIsValidCell(i.$$array("td",c).indexOf(d),a,c);d.parentNode.replaceChild(c,d)}},registerCommands:function(){this.commandService.addCommand(new k.Command({name:h.Delete,imageClass:"core-sprite-delete",
id:"orion.site.mappings.remove",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in a},callback:function(a){this.deleteMapping(a.items);this.render();this.setDirty(!0)}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.remove",0);this.commandService.addCommand(new k.Command({name:h["Move Up"],imageClass:"core-sprite-move_up",id:"orion.site.mappings.moveUp",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in
a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==0){var c=this.siteConfiguration.Mappings[b-1];this.siteConfiguration.Mappings[b-1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveUp",1);this.commandService.addCommand(new k.Command({name:h["Move Down"],imageClass:"core-sprite-move_down",id:"orion.site.mappings.moveDown",visibleWhen:function(a){return"Source"in
a||"Target"in a||"FriendlyPath"in a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==this.siteConfiguration.Mappings.length-1){var c=this.siteConfiguration.Mappings[b+1];this.siteConfiguration.Mappings[b+1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveDown",2)},getItemIndex:function(a){return this.siteConfiguration.Mappings.indexOf(a)},
_addMapping:function(b){var c=b.Source,d=b.Target,e=b.FriendlyPath;b.Source=a(typeof c==="string"?c:this.getNextMountPoint(e));b.Target=a(typeof d==="string"?d:"/");this.mappingExists(c,d)||this.siteConfiguration.Mappings.push(b)},addMapping:function(a){this._addMapping(a);this.render();this.setDirty(!0)},addMappings:function(a){for(var b=0;b<a.length;b++)this.addMapping(a[b]);this.render();this.setDirty(!0)},mappingExists:function(a,b){if(typeof a==="object"&&typeof b==="undefined")b=a.Target,a=
a.Source;for(var c=this.siteConfiguration.Mappings,d=0;d<c.length;d++)if(c[d].Source===a&&c[d].Target===b)return!0;return!1},getNextMountPoint:function(a){for(var b=this.siteConfiguration.Mappings,c=!1,d=0;d<b.length;d++)if(b[d].Source==="/"){c=!0;break}if(!c)return"/";if(!a)return"/web/somePath";a=a.split("/");for(d=a.length-1;d>=0;d--)if(!/\s+/.test(a[d]))return"/"+a[d];return"/web/somePath"},deleteMapping:function(a){a=this.siteConfiguration.Mappings.indexOf(a);a!==-1&&this.siteConfiguration.Mappings.splice(a,
1)},deleteAllMappings:function(){this.siteConfiguration.Mappings.splice(0,this.siteConfiguration.Mappings.length)},fieldChanged:function(b,c,d){d=a(d);if(b[c]!==d&&(b[c]=d,c==="FriendlyPath")){var e=d,f=this;this.siteClient.parseInternalForm(this.siteConfiguration,e).then(function(a){b.Target=a||e;f.renderItemRow(b,c);f.setDirty(!0)})}},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty}});return d}();return j});
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,k,g,f,b,i,e,c){function a(a,b,c,e,f,g){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=e||"";this.excludeFiles=!!f;this.excludeFolders=!!g}function j(a){c.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 b=this.modelEventDispatcher=new c,e=this;"copy,copyMultiple,create,delete,deleteMultiple,import,move,moveMultiple".split(",").forEach(function(a){b.addEventListener(a,e.modelHandler[a].bind(e))});var f=this.renderer;
this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){f.setTarget(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self")}},{pid:"nav.config"})}a.prototype=new e.ExplorerModel;a.prototype.getRoot=function(a){a(this.root)};a.prototype.processParent=function(a,b){if(this.excludeFiles||this.excludeFolders){var c=[],e;for(e in b)if(!(b[e].Directory?this.excludeFolders:this.excludeFiles))c.push(b[e]),b[e].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(e){b(c.processParent(a,
e))}):b([])};a.prototype.hasChildren=function(){var a=!1;this.root.Children&&(a=this.root.Children.length>0);return a};a.prototype.constructor=a;j.prototype=Object.create(e.Explorer.prototype);j.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 e={};a.forEach(function(a){a=a.parent;e[a.Location]=a});Object.keys(e).forEach(function(a){b.changedItem(e[a],!0)})}},"import":function(a){this.changedItem(a.target,!0)},move:function(a){var b=a.oldValue,c=a.newValue,a=a.parent,e=this,f=null;if(a.Projects)if(e.treeRoot.Location===b.Location){var h=e.treeRoot,b=c.ChildrenLocation?
c:this.fileClient.read(c.ContentLocation,!0);g.when(b,function(a){e.dispatchEvent({type:"rootMoved",oldValue:h,newValue:a});e.loadResourceList(a)})}else f=e.isExpanded(b)&&b;else b.Directory&&(f=e.isExpanded(b)&&c);e.changedItem(a,!0);f&&e.changedItem(f,!0)},moveMultiple:function(){this.changedItem(this.treeRoot,!0)}};j.prototype._makeDropTarget=function(a,c,e){function g(a,c,d,e,f,j){c=c||"";if(a.isFile)i.isAtRoot(d.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){f(d,a,e,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(b.formatMessage(h["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var k=a.createReader(),l=function(b){k.readEntries(function(d){for(var h=0;h<d.length;h++)g(d[h],c+a.name+"/",b,e,f,j)})},o=e.registry.getService("orion.page.progress");i.isAtRoot(d.Location)?o.progress(j.createProject(d.ChildrenLocation,a.name),"Initializing project "+
a.name).then(function(a){e.loadResourceList(e.treeRoot.Path,!0);o.progress(j.read(a.ContentLocation,!0),"Loading project info "+a.name).then(function(a){l(a)})}):o.progress(j.createFolder(d.Location,a.name),"Creating folder "+a.name).then(function(a){e.changedItem(d,!0);l(a)})}}if(this.dragAndDrop){var j=this,k=this.dragAndDrop,n=function(a){c.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(e)this._oldDragLeave&&c.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=
n;c.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";c.classList.add("dragOver");f.stop(a)};if(e)this._oldDragEnter&&c.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=n;c.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";f.stop(a)};if(e&&!this._oldDragOver)c.addEventListener("dragover",n,!1),this._oldDragOver=n;n=function(e){c.classList.remove("dragOver");if(e.dataTransfer.items&&e.dataTransfer.items.length>0)for(var m=0;m<e.dataTransfer.items.length;m++){var n=null;typeof e.dataTransfer.items[m].getAsEntry==="function"?n=e.dataTransfer.items[m].getAsEntry():typeof e.dataTransfer.items[m].webkitGetAsEntry==="function"&&(n=e.dataTransfer.items[m].webkitGetAsEntry());
n&&g(n,null,a,j,k,j.fileClient)}else if(e.dataTransfer.files&&e.dataTransfer.files.length>0)for(m=0;m<e.dataTransfer.files.length;m++)n=e.dataTransfer.files[m],!n.length&&(!n.type||n.type==="")?j.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:b.formatMessage(h["Did not drop ${0}.  Folder drop is not supported in this browser."],n.name)}):i.isAtRoot(a.Location)?j.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,j,n.name.indexOf(".zip")===n.name.length-4&&window.confirm(b.formatMessage(h["Unzip ${0}?"],n.name)));f.stop(e)};if(e)this._oldDrop&&c.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=n;c.addEventListener("drop",n,!1)}};j.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(e){e=c.model.processParent(a,e);c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,e,b);return(new g).resolve(e)})};j.prototype.isExpanded=function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};j.prototype.getNameNode=function(a){if(a=this.model.getId(a))return f.node(a+"NameLink")};j.prototype.scopeUp=function(){};j.prototype.loadResourceList=function(a,b,c){a&&typeof a==="object"&&(a=a.ChildrenLocation||a.ContentLocation);a=i.makeRelative(a);if(!b&&a===
this._lastPath)return(new g).resolve(this.treeRoot);this._lastPath=a;var e=this;return b||a!==this.treeRoot.Path?this.load(this.fileClient.loadWorkspace(a),"Loading "+a).then(function(){e.treeRoot.Path=a;typeof c==="function"&&c();e.dispatchEvent({type:"rootChanged",root:e.treeRoot});return(new g).resolve(e.treeRoot)},function(a){e.treeRoot.Path=null;e.dispatchEvent({type:"rootChanged",root:e.treeRoot});return(new g).reject(a)}):(new g).resolve(e.treeRoot)};j.prototype.load=function(b,c,e){var i=
f.node(this.parentId),j=f.node("progress");if(!j)j=document.createElement("div"),j.id="progress",f.empty(i),i.appendChild(j);f.empty(j);var k=setTimeout(function(){f.empty(j);j.appendChild(document.createTextNode(c))},500),n=this;return g.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,
i,!0):(b=(b=i&&("draggable"in i||"ondragstart"in i&&"ondrop"in i))&&!(!window.File||!window.FileList||!window.FileReader),n._hookedDrag=!0,b?n._makeDropTarget(n.treeRoot,i,!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)}}):
(f.empty(i),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"),f.processDOMNodes(b,[c]),i.appendChild(b));if(typeof e==="function")try{e()}catch(d){n.registry&&n.registry.getService("orion.page.message").setErrorMessage(d)}if(typeof n.onchange==="function")n.onchange(n.treeRoot);return(new g).resolve(n.treeRoot)},function(a){clearTimeout(k);
n.registry.getService("orion.page.message").setProgressResult(a);return(new g).reject(a)})};j.prototype.onchange=function(){};j.prototype.constructor=j;return{FileExplorer:j,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,k,g,f,b,i,e,c){function a(a,b){this.explorer=b;this._init(a)}function j(a){this._init(a)}a.prototype=new e.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 e=document.createElement("span");e.id=c.id+"navSpan";a.appendChild(e);e.className="mainNavColumn singleNavColumn";this.getExpandImage(c,e);e.appendChild(document.createTextNode(b.Name))};j.prototype=new g.Dialog;j.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
j.prototype._init=function(a){this.title=a.title||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()};j.prototype._bindToDom=function(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
j.prototype.loadFolderList=function(d){d=f.makeRelative(d);this.selection=new b.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new c.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(d,!0,null)};j.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};j.prototype.constructor=j;return{DirectoryPrompterDialog:j}});define("text!orion/sites/templates/SiteEditor.html",[],function(){return'<div class="siteEditor">\n\t<div class="sectionTable" role="region">\n\t\t<div>\n\t\t\t<div class="sectionTableItem ">\n\t\t\t\t\n\t\t\t\t<form id="siteForm" class="siteForm">\n\t\t\t\t\t<table class="siteEditorTable">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="siteConfigNameLabel">${Name:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class="siteConfigName" required="required" pattern="\\s*\\S+\\s*" value="">\n\t\t\t\t\t\t\t\t<div class="nameInvalid">${Not a valid name}</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="hostHintLabel">${Hostname hint:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class="hostHint" required="required" pattern="^(?:\\s*|[A-Za-z0-9-_]+)$" value="">\n\t\t\t\t\t\t\t\t<em>${Optional; used to determine the URL where a started site can be accessed.}</em>\n\t\t\t\t\t\t\t\t<div class="hostInvalid">${Not a valid hostname}</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="hostingStatusLabel">${Status:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class="hostingStatusArea">\n\t\t\t\t\t\t\t\t<span class="hostingStatus"></span>\n\t\t\t\t\t\t\t\t<span class="siteStartedWarning">\n\t\t\t\t\t\t\t\t\t<em>${Changes you make here won\'t affect the running site.}</em>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<table class="siteEditorTable">\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div class="mappingsGridTable"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div class="convertToolbar"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t</table>\n\n</div>'});
define("text!orion/sites/templates/ConvertToSelfHostingDialog.html",[],function(){return'<div>\n\t<style>\n\t.form {\n\t\twidth: auto;\n\t\tlist-style-type: none; \n\t\tpadding: 0; \n\t\tmargin: 0;\n\t\t-webkit-padding-start: 0;\n\t\t-webkit-margin-before: 0;\n\t}\n\t.form li {\n\t\tmargin: 0;\n\t}\n\t.msg {\n\t\tclear: both;\n\t\twidth: 25em;\n\t}\n\t.pad1 { padding: 8px 0 0 0; }\n\t.pad2 { padding: 20px 0 0 0; }\n\t.field {\n\t\tfloat: left;\n\t\twidth: 6em;\n\t}\n\t.col { float: left; }\n\t.okButton {\n\t\tfloat: right;\n\t\tclear: both;\n\t}\n\t</style>\n\t<div>\n\t\t<ul class="form">\n\t\t\t<li class="msg">\n\t\t\t\t<div>${SelectRepoSourceFolder}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<div class="col">\n\t\t\t\t\t<button class="browseButton commandButton" id="browseButton">${Browse...}</button>\n\t\t\t\t\t<span class="folderText" id="folderText"></span>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t<li class="msg pad2">\n\t\t\t\t<div>${EnterPortNumber}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<input class="field port" id="port" type="number" />\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>'});
define("orion/sites/SiteEditor","i18n!orion/sites/nls/messages,orion/commands,orion/Deferred,orion/section,orion/objects,orion/sites/siteMappingsTable,orion/i18nUtil,orion/webui/littlelib,orion/EventTarget,orion/webui/dialogs/DirectoryPrompterDialog,orion/webui/dialog,text!orion/sites/templates/SiteEditor.html,text!orion/sites/templates/ConvertToSelfHostingDialog.html".split(","),function(h,k,g,f,b,i,e,c,a,j,d,l,m){var p=function(a){this.options=a=a||{};b.mixin(this,a);this._init(a)};p.prototype=
new d.Dialog;b.mixin(p.prototype,{DEFAULT_PORT:8080,TEMPLATE:m,_init:function(a){this.title=a.title||h["Convert to Self-Hosting"];this.buttons=[{text:h.OK,callback:this.okButtonClicked.bind(this)}];this.modal=!0;this.messages={};b.mixin(this.messages,h);this.messages.SelectRepoSourceFolder=e.formatMessage(h.SelectRepoSourceFolder,["org.eclipse.orion.client"]);this.messages.EnterPortNumber=e.formatMessage(h.EnterPortNumber,this.DEFAULT_PORT);this._initialize()},_bindToDom:function(){var a=this;this.$okButton=
this.$buttonContainer.firstChild;this.$okButton.classList.add("disabled");this.$browseButton.addEventListener("click",function(){var b=new j.DirectoryPrompterDialog({title:h["Choose Orion Source Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:this.onFolderChosen.bind(this)});a._addChildDialog(b);b.show()}.bind(this));this.$port.addEventListener("change",function(){this.portNumber=parseInt(this.$port.value,10);this.updateValidity()}.bind(this));this.portNumber=this.$port.value=
this.DEFAULT_PORT;this.updateValidity()},onFolderChosen:function(a){this.folder=a;this.$folderText.textContent=a?a.Name:"";this.updateValidity()},isValid:function(){return this.folder&&!isNaN(this.portNumber)&&this.portNumber>0},updateValidity:function(){this.isValid()?this.$okButton.classList.remove("disabled"):this.$okButton.classList.add("disabled")},okButtonClicked:function(){this.isValid()&&(this.hide(),typeof this.options.func==="function"&&this.options.func(this.folder,this.portNumber))}});
var u="/",d=function(a,c){a=a||{};b.mixin(this,a);this.options=a;this.checkOptions(this.options,"serviceRegistry,fileClient,siteClient,commandService,statusService,progressService".split(","));this._fileClient=this.options.fileClient;this._siteClient=this.options.siteClient;this._commandService=this.options.commandService;this._statusService=this.options.statusService;this._progressService=this.options.progressService;this._commandsContainer=this.options.commandsContainer;this.options.location&&this.load(this.options.location);
this.node=c||document.createElement("div")};a.attach(d.prototype);b.mixin(d.prototype,{_siteConfiguration:null,_modelListeners:null,mappings:null,_mappingProposals:null,_isSelfHostingSite:!1,_isDirty:!1,_autoSaveTimer:null,show:function(){this.createElements();this.postCreate()},createElements:function(){this.node.innerHTML=l;c.processTextNodes(this.node,h);this.siteForm=c.$(".siteForm",this.node);this.name=c.$(".siteConfigName",this.node);this.name.id=this.id+"_name";this.nameInvalid=c.$(".nameInvalid",
this.node);this.hostHint=c.$(".hostHint",this.node);this.hostHint.id=this.id+"_hostHint";this.hostInvalid=c.$(".hostInvalid",this.node);this.hostingStatus=c.$(".hostingStatus",this.node);this.siteStartedWarning=c.$(".siteStartedWarning",this.node);this.mappingsPlaceholder=c.$(".mappingsGridTable");this.mappingsPlaceholder.id=this.id+"_mappingsPlaceholder";this.convertToolbar=c.$(".convertToolbar");this.convertToolbar.id=this.id+"_convertToolbar";c.$(".siteConfigNameLabel",this.node).htmlFor=name.id;
c.$(".hostHintLabel",this.node).htmlFor=this.hostHint.id},postCreate:function(){var a=this;this.name.addEventListener("input",function(){a.name.checkValidity()?(a.name.classList.remove("invalid"),a.nameInvalid.classList.remove("visible")):(a.name.classList.add("invalid"),a.nameInvalid.classList.add("visible"))});this.hostHint.addEventListener("change",function(){a.hostHint.checkValidity()?(a.hostHint.classList.remove("invalid"),a.hostInvalid.classList.remove("visible")):(a.hostHint.classList.add("invalid"),
a.hostInvalid.classList.add("visible"))});var b=this;g.when(this.siteClient._canSelfHost(),function(a){var c=new k.Command({name:h["Convert to Self-Hosting"],tooltip:h["Enable the site configuration to launch an Orion server running your local client code"],imageClass:"core-sprite-add",id:"orion.site.convert",visibleWhen:function(c){return!!c.Location&&a&&!b._isSelfHostingSite},callback:b.convertToSelfHostedSite.bind(b)});b._commandService.addCommand(c)});this._autoSaveTimer=setTimeout(this.autoSave.bind(this),
8E3)},checkOptions:function(a,b){for(var c=0;c<b.length;c++)if(typeof a[b[c]]==="undefined")throw Error("options."+b[c]+" is required");},_makeAddMenuChoices:function(a,b){function c(a){if(!d.getSiteConfiguration().Mappings.some(function(a){return a.Source===u}))a.Source=u;d.mappings.addMapping(a)}var b=Array.isArray(b)?b[0]:b,a=a.sort(function(a,b){return a.FriendlyPath.toLowerCase().localeCompare(b.FriendlyPath.toLowerCase())}),d=this,e=function(){c(this.mapping)},f=a.map(function(a){return{name:a.FriendlyPath,
imageClass:"core-sprite-folder",mapping:a,callback:e}});a.length>0&&f.push({});f.push({name:h["Choose folder..."],imageClass:"core-sprite-folder",callback:function(){(new j.DirectoryPrompterDialog({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(a){a&&this._siteClient.getMappingObject(this.getSiteConfiguration(),a.Location,a.Name).then(function(a){e.call({mapping:a})})}.bind(this)})).show()}.bind(this)});f.push({name:"URL",imageClass:"core-sprite-link",callback:function(){c({Source:"/web/somePath",
Target:"http://",FriendlyPath:"http://"})}});return f},convertToSelfHostedSite:function(){var a=this;(new p({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,siteClient:this._siteClient,func:function(b,c){a._siteClient.convertToSelfHosting(a.getSiteConfiguration(),b.Location,c).then(function(b){a.mappings.deleteAllMappings();a.mappings.addMappings(b.Mappings);a.save()})}})).show()},load:function(a){var b=new g;this._busyWhile(b,"Loading...");this._siteClient.loadSiteConfiguration(a).then(function(a){this._setSiteConfiguration(a);
this.setDirty(!1);b.resolve(a)}.bind(this),function(a){b.reject(a)});return b},_setSiteConfiguration:function(a){this._detachListeners();this._siteConfiguration=a;if(!this._mappingProposals){var b=this._commandService;this._mappingProposals=this._siteClient.getMappingProposals(a).then(function(a){a=new k.Command({name:h.Add,tooltip:h["Add a directory mapping to the site configuration"],id:"orion.site.mappings.add",visibleWhen:function(){return!0},choiceCallback:this._makeAddMenuChoices.bind(this,
a)});b.addCommand(a);a=this.titleWrapper.actionsNode;b.registerCommandContribution(a.id,"orion.site.mappings.add",1);b.renderCommands(a.id,a,this.mappings,this,"button")}.bind(this))}this._refreshCommands();this._refreshFields()},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty},_refreshCommands:function(){function a(b){c._onError(b)}function b(a){c._setSiteConfiguration(a);c.setDirty(!1)}var c=this;this._siteClient.isSelfHostingSite(this.getSiteConfiguration()).then(function(d){c._isSelfHostingSite=
d;c._commandService.destroy(c._commandsContainer);c._commandService.renderCommands(c._commandsContainer.id,c._commandsContainer,c._siteConfiguration,{},"button",{site:c._siteConfiguration,startCallback:b,stopCallback:b,errorCallback:a})})},_refreshFields:function(){this.name.setAttribute("value",this._siteConfiguration.Name);this.hostHint.setAttribute("value",this._siteConfiguration.HostHint);this.mappings?this.mappings._setSiteConfiguration(this._siteConfiguration):(this.titleWrapper=new f.Section(document.getElementById(this.mappingsPlaceholder.id),
{id:"workingDirectorySection",title:"Mappings",content:'<div id="mappingsNode"/>',canHide:!0}),this.mappings=new i.MappingsTable({serviceRegistry:this.serviceRegistry,siteClient:this._siteClient,fileClient:this._fileClient,commandRegistry:this._commandService,selection:null,parentId:"mappingsNode",siteConfiguration:this._siteConfiguration}));var a=this._siteConfiguration.HostingStatus;if(a&&a.Status==="started"){this.siteStartedWarning.style.display="block";this.hostingStatus.textContent=h["Started at "];
var b=document.createElement("a");b.href=a.URL;b.target="_new";this.hostingStatus.appendChild(b);b.textContent=a.URL}else if(a&&a.Status==="stopped")this.siteStartedWarning.style.display="none",this.hostingStatus.textContent=h.Stopped;setTimeout(function(){this._attachListeners(this._siteConfiguration)}.bind(this),0)},_attachListeners:function(a){function b(d,e){function f(){var b=d.value,g=a[e];a[e]=b;c.setDirty(g!==b||c.isDirty())}d.addEventListener("input",f);c._modelListeners.push({target:d,type:"input",
listener:f})}this._detachListeners();this._modelListeners=this._modelListeners||[];var c=this;b(this.name,h.Name);b(this.hostHint,h.HostHint);var d=function(a){c.setDirty(a.value)};this.mappings.addEventListener("dirty",d);this._modelListeners.push({target:this.mappings,type:"dirty",listener:d})},_detachListeners:function(){if(this._modelListeners){for(var a=0;a<this._modelListeners.length;a++){var b=this._modelListeners[a];b.target.removeEventListener(b.type,b.listener)}this._modelListeners.splice(0)}},
getSiteConfiguration:function(){return this._siteConfiguration},getResource:function(){return this._siteConfiguration&&this._siteConfiguration.Location},save:function(a){var a=typeof a==="undefined"?!0:a,b=this._siteConfiguration,c=b.HostingStatus;delete b.HostingStatus;var d=this;this._busyWhile(this._siteClient.updateSiteConfiguration(b.Location,b).then(function(e){d.setDirty(!1);return a?(d._setSiteConfiguration(e),e):(b.HostingStatus=c,d._refreshCommands(),b)}));return!0},autoSave:function(){this.isDirty()&&
this.save(!1);setTimeout(this.autoSave.bind(this),8E3)},_busyWhile:function(a,b){a.then(this._onSuccess.bind(this),this._onError.bind(this));this.progressService.showWhile(a,b)},_onSuccess:function(a){this.onSuccess(a)},_onError:function(a){this._statusService.setErrorMessage(a);this.onError(a)},onSuccess:function(a){this.dispatchEvent({type:"success",deferred:a})},onError:function(a){this.dispatchEvent({type:"error",deferred:a})}});return d});
define('built-site.js',"require,i18n!orion/sites/nls/messages,orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/fileClient,orion/operationsClient,orion/searchClient,orion/dialogs,orion/globalCommands,orion/sites/siteClient,orion/sites/siteCommands,orion/PageUtil,orion/sites/SiteEditor".split(","),function(h,k,g,f,b,i,e,c,a,j,d,l,m,p,u){g.startup().then(function(e){var g=e.serviceRegistry,r=e.preferences;new j.DialogService(g);var v=new c.OperationsClient(g),e=new f.StatusReportingService(g,
v,"statusPane","notifications","notificationArea"),w=new i.CommandRegistry({}),v=new b.ProgressService(g,v,w),y=p.matchResourceParameters().resource,y=l.forLocation(g,y),q=y._getFileClient(),x=new a.Searcher({serviceRegistry:g,commandService:w,fileService:q});d.generateBanner("orion-site",g,w,r,x);var s,z=function(){var a=s&&s.getSiteConfiguration();if(s&&a){var b={Parents:[]};b.Name=a.Name;b.Parents[0]={};b.Parents[0].Name="Sites";b.Parents[0].Location="";d.setPageTarget({task:"Edit Site",target:a,
breadcrumbTarget:b,makeBreadcrumbLink:function(a){a.href=h.toUrl("sites/sites.html")},serviceRegistry:g,searchService:x,fileService:q,commandService:w});d.setDirtyIndicator(s.isDirty())}},r=function(){var a=p.matchResourceParameters().resource;a&&a!==s.getResource()&&(!s.isDirty()||confirm(k["There are unsaved changes. Do you still want to navigate away?"]))&&s.load(a).then(function(){z()})};window.addEventListener("hashchange",r);s=new u({serviceRegistry:g,fileClient:q,siteClient:y,commandService:w,
statusService:e,progressService:v,commandsContainer:document.getElementById("pageActions"),id:"site-editor"});document.getElementById("site").appendChild(s.node);s.show();s.addEventListener("success",z);s.addEventListener("dirty",z);r();window.onbeforeunload=function(){if(s.isDirty())return k["There are unsaved changes."]};m.createSiteCommands(g,w);w.registerCommandContribution("pageActions","orion.site.start",1);w.registerCommandContribution("pageActions","orion.site.stop",2);w.registerCommandContribution("pageActions",
"orion.site.convert",3)})});