<commit_before>/*
 * chatbot.js - Chatbot made using markov chains.
 *
 * Contributed by Ovyerus
 */

/* eslint-env node */

const Markov = require('markov-strings');
const fs = require('fs');

try {
    require.resolve(`${__dirname}/lines.txt`);
} catch(err) {
    logger.custom('yellow', 'commands/chatbot', 'Markov line file not found. Generating pre-seeded one.');
    fs.writeFileSync(`${__dirname}/lines.txt`, fs.readFileSync(`${__dirname}/sample.txt`).toString());
}

exports.commands = [
    'chat'
];

exports.chat = {
    desc: 'Chat with the bot.',
    longDesc: 'Uses an algorithm to simulate chatting with a human. May be extremely dumb and offtopic at times.',
    usage: '<message>',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            if (!ctx.suffix) {
                ctx.createMessage(localeManager.t('chatbot-noArgs', ctx.settings.locale)).then(resolve).catch(reject);
            } else if (/how (dumb|smart) are you\??/i.test(ctx.suffix.toLowerCase())) {
                readLines().then(lines => {
                    return ctx.createMessage(`I currently know **${lines.length}** things.`);
                }).then(resolve).catch(reject);
            } else {
                let chat;
                readLines().then(lines => {
                    chat = new Markov(lines, {stateSize: 3});
                    return chat.buildCorpus();
                }).then(() => {
                    return appendLines(ctx.suffix);
                }).then(() => {
                    return chat.generateSentence({maxLength: 420});
                }).then(sent => {
                    return ctx.createMessage(sent.string);
                }).then(resolve).catch(reject);
            }
        });
    }
};

function readLines() {
    return new Promise((resolve, reject) => {
        fs.readFile(`${__dirname}/lines.txt`, 'utf8', (err, lines) => {
            if (err) {
                reject(err);
            } else {
                resolve(lines.split('\n'));
            }
        });
    });
}

function appendLines(msg) {
    return new Promise((resolve, reject) => {
        fs.appendFile(`${__dirname}/lines.txt`, msg.replace(/\n+/g, ' ').trim() + '\n', err => {
            if (err) {
                reject(err);
            } else {
                resolve();
            }
        });
    });
}<commit_msg>move functions up<commit_after>/*
 * chatbot.js - Chatbot made using markov chains.
 *
 * Contributed by Ovyerus
 */

/* eslint-env node */

const Markov = require('markov-strings');
const fs = require('fs');

try {
    require.resolve(`${__dirname}/lines.txt`);
} catch(err) {
    logger.custom('yellow', 'commands/chatbot', 'Markov line file not found. Generating pre-seeded one.');
    fs.writeFileSync(`${__dirname}/lines.txt`, fs.readFileSync(`${__dirname}/sample.txt`).toString());
}

exports.commands = [
    'chat'
];

function readLines() {
    return new Promise((resolve, reject) => {
        fs.readFile(`${__dirname}/lines.txt`, 'utf8', (err, lines) => {
            if (err) {
                reject(err);
            } else {
                resolve(lines.split('\n'));
            }
        });
    });
}

function appendLines(msg) {
    return new Promise((resolve, reject) => {
        fs.appendFile(`${__dirname}/lines.txt`, msg.replace(/\n+/g, ' ').trim() + '\n', err => {
            if (err) {
                reject(err);
            } else {
                resolve();
            }
        });
    });
}

exports.chat = {
    desc: 'Chat with the bot.',
    longDesc: 'Uses an algorithm to simulate chatting with a human. May be extremely dumb and offtopic at times.',
    usage: '<message>',
    main(bot, ctx) {
        return new Promise((resolve, reject) => {
            if (!ctx.suffix) {
                ctx.createMessage(localeManager.t('chatbot-noArgs', ctx.settings.locale)).then(resolve).catch(reject);
            } else if (/how (dumb|smart) are you\??/i.test(ctx.suffix.toLowerCase())) {
                readLines().then(lines => {
                    return ctx.createMessage(`I currently know **${lines.length}** things.`);
                }).then(resolve).catch(reject);
            } else {
                let chat;
                readLines().then(lines => {
                    chat = new Markov(lines, {stateSize: 3});
                    return chat.buildCorpus();
                }).then(() => {
                    return appendLines(ctx.suffix);
                }).then(() => {
                    return chat.generateSentence({maxLength: 420});
                }).then(sent => {
                    return ctx.createMessage(sent.string);
                }).then(resolve).catch(reject);
            }
        });
    }
};<|endoftext|>


<commit_before>// ==UserScript==
// @name         festify.us vote script
// @namespace    https://einbaum.org/
// @version      1.0
// @description  Adds fake votes to festify.us songs
// @author       https://github.com/EinBaum
// @include      http://festify.us/*
// @include      https://festify.us/*
// ==/UserScript==

function FVS_AddVoteSingle(songName, songID) {
    'use strict';

    document.cookie = "connect.sid=";
    console.log("Voting: " + songName);

    var listID = window.location.pathname.split("&")[0].substring(1);

    var http = new XMLHttpRequest();
    var url = "/api/parties/" + listID + "/queue";
    var params = JSON.stringify({name: songName, spotifyID: songID});

    http.open("POST", url, true);
    http.withCredentials = false;
    http.setRequestHeader("Content-type", "application/json;charset=UTF-8");
    http.onreadystatechange = function() {
        if(http.readyState == 4 && http.status == 200) {
            console.log("Voted!");
        }
    };
    http.send(params);
}

function FVS_AddVoteMultiple(songName, songID, num) {
    'use strict';

    for (var i = 0; i < num; i++) {
        FVS_AddVoteSingle(songName, songID);
    }
}

function FVS_CreateButton(parent, songName, songID) {
    'use strict';

    var inp = document.createElement("input");
    inp.value = "1";
    inp.setAttribute("style", "position: absolute; z-index: 999; width: 70px; margin-left: 410px; margin-top: -65px; padding: 0");
    parent.appendChild(inp);

    var btn = document.createElement("div");
    btn.setAttribute("style", "position: absolute; z-index: 999; margin-left: 500px; margin-top: -55px; width: 30px; font-size: 30px");
    btn.onclick = function() {
        FVS_AddVoteMultiple(songName, songID, inp.value);
    };

    var btnicon = document.createElement("i");
    btnicon.className = "fa fa-tree";
    btn.appendChild(btnicon);

    parent.appendChild(btn);
}

var FVS_regex = /^([^\(]*) \((.*?)\)$/;

function FVS_CheckElement(node) {
    'use strict';

    if (node && node.tagName && node.tagName.toLowerCase() == "div") {
        var label = node.getAttribute("analytics-label");
        if (label) {
            var result = FVS_regex.exec(label);
            FVS_CreateButton(node.parentElement, result[2], result[1]);
        }
    }
}

(function() {
    'use strict';

    var config = { childList: true, subtree: true };
    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            for (var i = 0; i < mutation.addedNodes.length; i++) {
                FVS_CheckElement(mutation.addedNodes[i]);
            }
        });
    });
    observer.observe(document.body, config);
})();<commit_msg>Add homepage/support URL to description<commit_after>// ==UserScript==
// @name         festify.us vote script
// @namespace    https://einbaum.org/
// @version      1.0.1
// @description  Adds fake votes to festify.us songs.
// @author       https://github.com/EinBaum
// @include      http://festify.us/*
// @include      https://festify.us/*

// @supportURL   https://github.com/EinBaum/festify.us-vote-script/issues
// @homepageURL  https://github.com/EinBaum/festify.us-vote-script

// ==/UserScript==

function FVS_AddVoteSingle(songName, songID) {
    'use strict';

    document.cookie = "connect.sid=";
    console.log("Voting: " + songName);

    var listID = window.location.pathname.split("&")[0].substring(1);

    var http = new XMLHttpRequest();
    var url = "/api/parties/" + listID + "/queue";
    var params = JSON.stringify({name: songName, spotifyID: songID});

    http.open("POST", url, true);
    http.withCredentials = false;
    http.setRequestHeader("Content-type", "application/json;charset=UTF-8");
    http.onreadystatechange = function() {
        if(http.readyState == 4 && http.status == 200) {
            console.log("Voted!");
        }
    };
    http.send(params);
}

function FVS_AddVoteMultiple(songName, songID, num) {
    'use strict';

    for (var i = 0; i < num; i++) {
        FVS_AddVoteSingle(songName, songID);
    }
}

function FVS_CreateButton(parent, songName, songID) {
    'use strict';

    var inp = document.createElement("input");
    inp.value = "1";
    inp.setAttribute("style", "position: absolute; z-index: 999; width: 70px; margin-left: 410px; margin-top: -65px; padding: 0");
    parent.appendChild(inp);

    var btn = document.createElement("div");
    btn.setAttribute("style", "position: absolute; z-index: 999; margin-left: 500px; margin-top: -55px; width: 30px; font-size: 30px");
    btn.onclick = function() {
        FVS_AddVoteMultiple(songName, songID, inp.value);
    };

    var btnicon = document.createElement("i");
    btnicon.className = "fa fa-tree";
    btn.appendChild(btnicon);

    parent.appendChild(btn);
}

var FVS_regex = /^([^\(]*) \((.*?)\)$/;

function FVS_CheckElement(node) {
    'use strict';

    if (node && node.tagName && node.tagName.toLowerCase() == "div") {
        var label = node.getAttribute("analytics-label");
        if (label) {
            var result = FVS_regex.exec(label);
            FVS_CreateButton(node.parentElement, result[2], result[1]);
        }
    }
}

(function() {
    'use strict';

    var config = { childList: true, subtree: true };
    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            for (var i = 0; i < mutation.addedNodes.length; i++) {
                FVS_CheckElement(mutation.addedNodes[i]);
            }
        });
    });
    observer.observe(document.body, config);
})();
<|endoftext|>


<commit_before><commit_msg>File no longer needed<commit_after><|endoftext|>


<commit_before>import React, { Component, PropTypes } from 'react';
import $ from 'jquery';

export default class Carcas extends Component {

  static propTypes = {
    children: PropTypes.any,
    full: PropTypes.bool
  };

  constructor(props) {
    super(props);
    this.styles = require('./Carcas.less');
    this.backgroundClass = this.styles.c0;
    this.wrapClass = this.styles.containerLeft;
  }

  componentWillReceiveProps() {
    setTimeout(() => {
      $(this.container).scrollTop(0);
    }, 500);
  }

  // Animations
  setBackgroundClass(className) {
    $(this.refs.bgLayer1).css({
      opacity: 0
    }).attr('class', [this.styles.background,
                      this.styles['c' + className]].join(' ')
    ).animate({
      opacity: 1
    }, 300, () => {
      $(this.refs.bgLayer0)
        .attr('class', [this.styles.background,
                        this.styles['c' + className]].join(' '));
    });
  }

  setLineColor(color, timeout) {
    setTimeout(() => {
      $(this.refs.line).css({
        background: color
      });
    }, timeout);
  }

  setContainerClass(className, timeout = false) {
    if (timeout) {
      setTimeout(() => {
        $(this.container).attr('class', [this.wrapClass,
                                         className].join(' '));
      }, timeout);
    } else {
      $(this.container).attr('class', [this.wrapClass,
                                       className].join(' '));
    }
  }

  animateToTop(callback, timeout = 300) {
    this.showTopOfLine();
    this.setContainerClass(this.styles.animateToTop);
    setTimeout(callback, timeout);
  }

  animateToBottom(callback, timeout = 300) {
    this.showBottomOfLine();
    this.setContainerClass(this.styles.animateToBottom);
    setTimeout(callback, timeout);
  }

  bottomToCenter(timeout = 10) {
    this.setContainerClass(this.styles.moveToBottom);
    this.setContainerClass(this.styles.animateFromBottom, timeout);
  }

  topToCenter(timeout = 10) {
    this.setContainerClass(this.styles.moveToTop);
    this.setContainerClass(this.styles.animateFromTop, timeout);
  }

  // Left line animations
  showLine() {
    setTimeout(() => {
      $(this.refs.line).addClass(this.styles.activeLine);
    }, 200);
  }

  hideTopOfLine() {
    $(this.refs.line).addClass(this.styles.htol);
  }

  showTopOfLine() {
    $(this.refs.line).removeClass(this.styles.htol);
  }

  hideBottomOfLine() {
    $(this.refs.line).addClass(this.styles.hbol);
  }

  showBottomOfLine() {
    $(this.refs.line).removeClass(this.styles.hbol);
  }

  renderBackgrounds(styles) {
    return (

    );
  }

  renderCell(styles, icons, children) {
    return (

 this.container = ref}
          className={this.wrapClass}
        >
          {children}

    );
  }

  render() {
    const { styles } = this;
    const icons = require('../Styles/icons.less');
    const { children } = this.props;
    return (

        {this.renderBackgrounds(styles)}

            {this.renderCell(styles, icons, children)}

    );
  }

}
<commit_msg>fix scroll position<commit_after>import React, { Component, PropTypes } from 'react';
import $ from 'jquery';

export default class Carcas extends Component {

  static propTypes = {
    children: PropTypes.any,
    full: PropTypes.bool
  };

  constructor(props) {
    super(props);
    this.styles = require('./Carcas.less');
    this.backgroundClass = this.styles.c0;
    this.wrapClass = this.styles.containerLeft;
  }

  componentWillReceiveProps() {
    setTimeout(() => {
      $(document).scrollTo(0);
    }, 500);
  }

  // Animations
  setBackgroundClass(className) {
    $(this.refs.bgLayer1).css({
      opacity: 0
    }).attr('class', [this.styles.background,
                      this.styles['c' + className]].join(' ')
    ).animate({
      opacity: 1
    }, 300, () => {
      $(this.refs.bgLayer0)
        .attr('class', [this.styles.background,
                        this.styles['c' + className]].join(' '));
    });
  }

  setLineColor(color, timeout) {
    setTimeout(() => {
      $(this.refs.line).css({
        background: color
      });
    }, timeout);
  }

  setContainerClass(className, timeout = false) {
    if (timeout) {
      setTimeout(() => {
        $(this.container).attr('class', [this.wrapClass,
                                         className].join(' '));
      }, timeout);
    } else {
      $(this.container).attr('class', [this.wrapClass,
                                       className].join(' '));
    }
  }

  animateToTop(callback, timeout = 300) {
    this.showTopOfLine();
    this.setContainerClass(this.styles.animateToTop);
    setTimeout(callback, timeout);
  }

  animateToBottom(callback, timeout = 300) {
    this.showBottomOfLine();
    this.setContainerClass(this.styles.animateToBottom);
    setTimeout(callback, timeout);
  }

  bottomToCenter(timeout = 10) {
    this.setContainerClass(this.styles.moveToBottom);
    this.setContainerClass(this.styles.animateFromBottom, timeout);
  }

  topToCenter(timeout = 10) {
    this.setContainerClass(this.styles.moveToTop);
    this.setContainerClass(this.styles.animateFromTop, timeout);
  }

  // Left line animations
  showLine() {
    setTimeout(() => {
      $(this.refs.line).addClass(this.styles.activeLine);
    }, 200);
  }

  hideTopOfLine() {
    $(this.refs.line).addClass(this.styles.htol);
  }

  showTopOfLine() {
    $(this.refs.line).removeClass(this.styles.htol);
  }

  hideBottomOfLine() {
    $(this.refs.line).addClass(this.styles.hbol);
  }

  showBottomOfLine() {
    $(this.refs.line).removeClass(this.styles.hbol);
  }

  renderBackgrounds(styles) {
    return (

    );
  }

  renderCell(styles, icons, children) {
    return (

 this.container = ref}
          className={this.wrapClass}
        >
          {children}

    );
  }

  render() {
    const { styles } = this;
    const icons = require('../Styles/icons.less');
    const { children } = this.props;
    return (

        {this.renderBackgrounds(styles)}

            {this.renderCell(styles, icons, children)}

    );
  }

}
<|endoftext|>


<commit_before>// @flow strict

import React from 'react';
import getNotDeclaredProps from 'react-get-not-declared-props';

import createSheet from '../../styles/create-sheet';
import { type Theme } from '../../theme/types';

type Props = {
  vertical: boolean,
  className: string,
};
type Data = { vertical: boolean };

const Sheet = createSheet('Divider', (theme: Theme) => {
  return {
    divider: {
      backgroundColor: theme.divider,
      height: (data: Data) => (data.vertical ? '100%' : 1),
      width: (data: Data) => (data.vertical ? 1 : '100%'),
    },
  };
});

function Divider(props: Props) {
  const data: Data = { vertical: props.vertical };

  return (
    <Sheet data={data}>
      {({ classes }) => (
        <div
          className={`${classes.divider} ${props.className}`}
          {...getNotDeclaredProps(props, Divider)}
        />
      )}
    </Sheet>
  );
}

Divider.propTypes = {};

Divider.defaultProps = {
  className: '',
  vertical: false,
};

export default Divider;
<commit_msg>Added propTypes to Divider<commit_after>// @flow strict

import React from 'react';
import PropTypes from 'prop-types';
import getNotDeclaredProps from 'react-get-not-declared-props';

import createSheet from '../../styles/create-sheet';
import { type Theme } from '../../theme/types';

type Props = {
  vertical: boolean,
  className: string,
};
type Data = { vertical: boolean };

const Sheet = createSheet('Divider', (theme: Theme) => {
  return {
    divider: {
      backgroundColor: theme.divider,
      height: (data: Data) => (data.vertical ? '100%' : 1),
      width: (data: Data) => (data.vertical ? 1 : '100%'),
    },
  };
});

function Divider(props: Props) {
  const data: Data = { vertical: props.vertical };

  return (
    <Sheet data={data}>
      {({ classes }) => (
        <div
          className={`${classes.divider} ${props.className}`}
          {...getNotDeclaredProps(props, Divider)}
        />
      )}
    </Sheet>
  );
}

Divider.propTypes = {
  vertical: PropTypes.bool,
  className: PropTypes.string,
};

Divider.defaultProps = {
  className: '',
  vertical: false,
};

export default Divider;
<|endoftext|>


<commit_before>import React from 'react'
import Button from 'react-bootstrap/lib/Button'
import DropdownButton from 'react-bootstrap/lib/DropdownButton'
import MenuItem from 'react-bootstrap/lib/MenuItem'
import Input from 'react-bootstrap/lib/Input'
import Glyphicon from 'react-bootstrap/lib/Glyphicon'

class RouteControls extends React.Component {
    constructor(props) {
        super(props)
    }

    handleSelect = (event, id) => {
        this.props.ParkingLotActions.setActiveParkingLot(id)
    }

    componentWillUnmount() {
        this.props.ParkingLotActions.setActiveParkingLot()
        this.props.ReportActions.setReportRouteDistance()
    }

    render() {
        var parkingLotItems = []
        if (this.props.ParkingLots.parkinglots) {
            parkingLotItems = this.props.ParkingLots
                .parkinglots.map(parkinglot => {
                    return <MenuItem key={parkinglot.id} eventKey={parkinglot.id}
                                >{parkinglot.name}</MenuItem>
                })
        }

        let distance = this.props.Reports.reportRouteDistance ?
                        (this.props.Reports.reportRouteDistance / 1000)
                        .toFixed(1) : 0

        return (

            <Input>
                <DropdownButton title={'Starting Parking Lot'}
                    onSelect={this.handleSelect}
                    id={'parkingSelect'}>
                    {parkingLotItems}
                </DropdownButton>
                <Button><Glyphicon glyph='refresh'/> Reset Route</Button>
                {distance + ' KM'}
            </Input>

        )
    }
}
export default RouteControls
<commit_msg>Added handling for reset route button.<commit_after>import React from 'react'
import Button from 'react-bootstrap/lib/Button'
import DropdownButton from 'react-bootstrap/lib/DropdownButton'
import MenuItem from 'react-bootstrap/lib/MenuItem'
import Input from 'react-bootstrap/lib/Input'
import Glyphicon from 'react-bootstrap/lib/Glyphicon'

class RouteControls extends React.Component {
    constructor(props) {
        super(props)
    }

    handleSelect = (event, id) => {
        this.props.ParkingLotActions.setActiveParkingLot(id)
    }

    handleRouteReset = () => {
        this.props.ParkingLotActions.setActiveParkingLot()
        this.props.ReportActions.setReportRouteDistance()
    }

    componentWillUnmount() {
        this.props.ParkingLotActions.setActiveParkingLot()
        this.props.ReportActions.setReportRouteDistance()
    }

    render() {
        var parkingLotItems = []
        if (this.props.ParkingLots.parkinglots) {
            parkingLotItems = this.props.ParkingLots
                .parkinglots.map(parkinglot => {
                    return <MenuItem key={parkinglot.id} eventKey={parkinglot.id}
                                >{parkinglot.name}</MenuItem>
                })
        }

        let distance = this.props.Reports.reportRouteDistance ?
                        (this.props.Reports.reportRouteDistance / 1000)
                        .toFixed(1) : 0

        return (

            <Input>
                <DropdownButton title={'Starting Parking Lot'}
                    onSelect={this.handleSelect}
                    id={'parkingSelect'}>
                    {parkingLotItems}
                </DropdownButton>
                <Button onClick={this.handleRouteReset}>
                    <Glyphicon glyph='refresh'/> Start Again</Button>
                {distance + ' KM'}
            </Input>

        )
    }
}
export default RouteControls
<|endoftext|>


<commit_before>'use strict';

import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import NotificationSync from 'material-ui/svg-icons/notification/sync';
import Dialog from 'material-ui/Dialog';
import Formsy from 'formsy-react';
import { FormsyText, FormsySelect, FormsyToggle } from 'formsy-material-ui/lib';
import MenuItem from 'material-ui/MenuItem';
import Snackbar from 'material-ui/Snackbar';
import { defineMessages, injectIntl } from 'react-intl';

require('styles//Sync.scss');

const messages = defineMessages({
  title: {
    id: 'sync.title',
    defaultMessage: 'Remote database sync settings'
  },
  reboothint: {
    id: 'sync.message.reboothint',
    defaultMessage: 'Sync settings have been changed and thus junkan needs to reboot now!'
  },
  buttonupdate: {
    id: 'sync.buttons.update',
    defaultMessage: 'Update'
  },
  buttonclose: {
    id: 'sync.buttons.close',
    defaultMessage: 'Close'
  },
  labeldburl: {
    id: 'sync.form.labels.dburl',
    defaultMessage: 'Url of the remote database (pouch db compatible)'
  },
  errordburl: {
    id: 'sync.form.validationerrors.dburl',
    defaultMessage: 'Please enter a valid url!'
  },
  labelsyncmode: {
    id: 'sync.form.labels.snycmode',
    defaultMessage: 'Sync mode'
  },
  syncmodeoptionread: {
    id: 'sync.form.options.read',
    defaultMessage: 'read'
  },
  syncmodeoptionwrite: {
    id: 'sync.form.options.write',
    defaultMessage: 'write'
  },
  syncmodeoptionreadwrite: {
    id: 'sync.form.options.readwrite',
    defaultMessage: 'read & write'
  },
  labelactive: {
    id: 'sync.form.labels.enable',
    defaultMessage: 'Enable sync'
  }
});

class SyncComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      openForm: false,
      openRebootHint: false
    }

    const remoteDbUrl = this.getURLParameter('remoteDbUrl');
    const syncMode = parseInt(this.getURLParameter('syncMode'));
    let enabled = false;
    if (typeof remoteDbUrl !== 'undefined' && typeof syncMode !== 'undefined') {
      enabled = true;
    }
  }

  componentWillReceiveProps(nextProps) {
    if (this.props.settings.lastChanged !== nextProps.settings.lastChanged) {
      // Sync settings have been changed and thus junkan needs to reboot in order to have the changes taking place
      this.rebootWithNewDbSyncSettings();
    }
  }

  getURLParameter(name) {
    return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || undefined;
  }

  rebootWithNewDbSyncSettings = () => {
    this.setState({openForm: false});
    this.setState({openRebootHint: true})
  }

  openDialogForm = () => {
    this.setState({openForm: true})
  }

  closeDialogForm = () => {
    this.setState({openForm: false})
  }

  openDialogRebootHint = () => {
    this.setState({openRebootHint: true})
  }

  saveSettings = () => {
    const nextSettings = {
      remoteDbUrl: this.refs.remoteDb.getValue(),
      syncMode: this.refs.syncMode.getValue(),
      enabled: !!this.refs.enabled.getValue()
    };

    this.props.actionEditSettings(nextSettings);
  }

  reboot = () => {
    location.reload();
  }

  render() {
    const {formatMessage} = this.props.intl;

    const dialogFormActions = [
      <FlatButton
        label={formatMessage(messages.buttonupdate)}
        primary={false}
        onTouchTap={this.saveSettings}
      />,
      <FlatButton
        label={formatMessage(messages.buttonclose)}
        primary={true}
        onTouchTap={this.closeDialog}
      />
    ];

    const styles = {
      block: {
        maxWidth: 250
      },
      toggle: {
        marginBottom: 16
      }
    };

    return (

        <FloatingActionButton
          secondary={true}
          mini={true}
          onTouchTap={this.openDialogForm}
        >
          <NotificationSync />
        </FloatingActionButton>

        <Snackbar
          open={this.state.openRebootHint}
          message={formatMessage(messages.reboothint)}
          autoHideDuration={this.props.snackbarDuration}
          onRequestClose={this.reboot}
        />

        <Dialog
          title={formatMessage(messages.title)}
          actions={dialogFormActions}
          open={this.state.openForm}
          onRequestClose={this.closeDialogForm}
        >
          <Formsy.Form
            onValid={this.enableImportButton}
            onInvalid={this.disableImportButton}
            onValidSubmit={this.import}
          >
            <FormsyText
              name='remote-db'
              ref='remoteDb'
              validations='isUrl'
              required
              validationError={formatMessage(messages.errordburl)}
              hintText='http://mypouchdb.com:5984/remote-slides'
              floatingLabelText={formatMessage(messages.labeldburl)}
              fullWidth={true}
              value={this.props.settings.remoteDbUrl}
              onInput={this.changeRemoteDbUrl}
            />

            <FormsySelect
              name='syncMode'
              ref='syncMode'
              value={this.props.settings.syncMode}
              floatingLabelText={formatMessage(messages.labelsyncmode)}
              onChange={() => {}}
            >
              <MenuItem
                value={1}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionread)} />
              <MenuItem
                value={2}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionwrite)} />
              <MenuItem
                value={3}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionreadwrite)} />
            </FormsySelect>

              <FormsyToggle
                name='enabled'
                ref='enabled'
                label={formatMessage(messages.labelactive)}
                style={styles.toggle}
                defaultToggled={this.props.settings.enabled}
              />

          </Formsy.Form>
        </Dialog>

    );
  }
}

SyncComponent.displayName = 'SyncComponent';

SyncComponent.propTypes = {
  settings: React.PropTypes.object.isRequired,
  actionEditSettings: React.PropTypes.func.isRequired
};

SyncComponent.defaultProps = {
  snackbarDuration: 5000
};

export default injectIntl(SyncComponent);
<commit_msg>Fixes wrong bound trigger<commit_after>'use strict';

import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import NotificationSync from 'material-ui/svg-icons/notification/sync';
import Dialog from 'material-ui/Dialog';
import Formsy from 'formsy-react';
import { FormsyText, FormsySelect, FormsyToggle } from 'formsy-material-ui/lib';
import MenuItem from 'material-ui/MenuItem';
import Snackbar from 'material-ui/Snackbar';
import { defineMessages, injectIntl } from 'react-intl';

require('styles//Sync.scss');

const messages = defineMessages({
  title: {
    id: 'sync.title',
    defaultMessage: 'Remote database sync settings'
  },
  reboothint: {
    id: 'sync.message.reboothint',
    defaultMessage: 'Sync settings have been changed and thus junkan needs to reboot now!'
  },
  buttonupdate: {
    id: 'sync.buttons.update',
    defaultMessage: 'Update'
  },
  buttonclose: {
    id: 'sync.buttons.close',
    defaultMessage: 'Close'
  },
  labeldburl: {
    id: 'sync.form.labels.dburl',
    defaultMessage: 'Url of the remote database (pouch db compatible)'
  },
  errordburl: {
    id: 'sync.form.validationerrors.dburl',
    defaultMessage: 'Please enter a valid url!'
  },
  labelsyncmode: {
    id: 'sync.form.labels.snycmode',
    defaultMessage: 'Sync mode'
  },
  syncmodeoptionread: {
    id: 'sync.form.options.read',
    defaultMessage: 'read'
  },
  syncmodeoptionwrite: {
    id: 'sync.form.options.write',
    defaultMessage: 'write'
  },
  syncmodeoptionreadwrite: {
    id: 'sync.form.options.readwrite',
    defaultMessage: 'read & write'
  },
  labelactive: {
    id: 'sync.form.labels.enable',
    defaultMessage: 'Enable sync'
  }
});

class SyncComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      openForm: false,
      openRebootHint: false
    }

    const remoteDbUrl = this.getURLParameter('remoteDbUrl');
    const syncMode = parseInt(this.getURLParameter('syncMode'));
    let enabled = false;
    if (typeof remoteDbUrl !== 'undefined' && typeof syncMode !== 'undefined') {
      enabled = true;
    }
  }

  componentWillReceiveProps(nextProps) {
    if (this.props.settings.lastChanged !== nextProps.settings.lastChanged) {
      // Sync settings have been changed and thus junkan needs to reboot in order to have the changes taking place
      this.rebootWithNewDbSyncSettings();
    }
  }

  getURLParameter(name) {
    return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || undefined;
  }

  rebootWithNewDbSyncSettings = () => {
    this.setState({openForm: false});
    this.setState({openRebootHint: true})
  }

  openDialogForm = () => {
    this.setState({openForm: true})
  }

  closeDialogForm = () => {
    this.setState({openForm: false})
  }

  openDialogRebootHint = () => {
    this.setState({openRebootHint: true})
  }

  saveSettings = () => {
    const nextSettings = {
      remoteDbUrl: this.refs.remoteDb.getValue(),
      syncMode: this.refs.syncMode.getValue(),
      enabled: !!this.refs.enabled.getValue()
    };

    this.props.actionEditSettings(nextSettings);
  }

  reboot = () => {
    location.reload();
  }

  render() {
    const {formatMessage} = this.props.intl;

    const dialogFormActions = [
      <FlatButton
        label={formatMessage(messages.buttonupdate)}
        primary={false}
        onTouchTap={this.saveSettings}
      />,
      <FlatButton
        label={formatMessage(messages.buttonclose)}
        primary={true}
        onTouchTap={this.closeDialogForm}
      />
    ];

    const styles = {
      block: {
        maxWidth: 250
      },
      toggle: {
        marginBottom: 16
      }
    };

    return (

        <FloatingActionButton
          secondary={true}
          mini={true}
          onTouchTap={this.openDialogForm}
        >
          <NotificationSync />
        </FloatingActionButton>

        <Snackbar
          open={this.state.openRebootHint}
          message={formatMessage(messages.reboothint)}
          autoHideDuration={this.props.snackbarDuration}
          onRequestClose={this.reboot}
        />

        <Dialog
          title={formatMessage(messages.title)}
          actions={dialogFormActions}
          open={this.state.openForm}
          onRequestClose={this.closeDialogForm}
        >
          <Formsy.Form
            onValid={this.enableImportButton}
            onInvalid={this.disableImportButton}
            onValidSubmit={this.import}
          >
            <FormsyText
              name='remote-db'
              ref='remoteDb'
              validations='isUrl'
              required
              validationError={formatMessage(messages.errordburl)}
              hintText='http://mypouchdb.com:5984/remote-slides'
              floatingLabelText={formatMessage(messages.labeldburl)}
              fullWidth={true}
              value={this.props.settings.remoteDbUrl}
              onInput={this.changeRemoteDbUrl}
            />

            <FormsySelect
              name='syncMode'
              ref='syncMode'
              value={this.props.settings.syncMode}
              floatingLabelText={formatMessage(messages.labelsyncmode)}
              onChange={() => {}}
            >
              <MenuItem
                value={1}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionread)} />
              <MenuItem
                value={2}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionwrite)} />
              <MenuItem
                value={3}
                /* @TODO: https://github.com/callemall/material-ui/issues/4008 */
                style={{'WebkitAppearance': 'none'}}
                primaryText={formatMessage(messages.syncmodeoptionreadwrite)} />
            </FormsySelect>

              <FormsyToggle
                name='enabled'
                ref='enabled'
                label={formatMessage(messages.labelactive)}
                style={styles.toggle}
                defaultToggled={this.props.settings.enabled}
              />

          </Formsy.Form>
        </Dialog>

    );
  }
}

SyncComponent.displayName = 'SyncComponent';

SyncComponent.propTypes = {
  settings: React.PropTypes.object.isRequired,
  actionEditSettings: React.PropTypes.func.isRequired
};

SyncComponent.defaultProps = {
  snackbarDuration: 5000
};

export default injectIntl(SyncComponent);
<|endoftext|>


<commit_before>var core_services = [
	{
		"name": "urac",
		"extKeyRequired": true,
		"port": 4001,
		"apis": [
			{
				"l": "Change Email",
				"group": "My Account",
				'v': "/account/changeEmail"
			},
			{
				"l": "Change Password",
				"group": "My Account",
				'v': "/account/changePassword"
			},
			{
				"l": "Edit Profile",
				"group": "My Account",
				'v': "/account/editProfile"
			},
			{
				"l": "Get User Info",
				"group": "My Account",
				"groupMain": true,
				'v': "/account/getUser"
			},
			{
				"l": "Add new User",
				"group": "Administration",
				'v': "/admin/addUser"
			},
			{
				"l": "Change User Status",
				"group": "Administration",
				'v': "/admin/changeUserStatus"
			},
			{
				"l": "Edit User Record",
				"group": "Administration",
				'v': "/admin/editUser"
			},
			{
				"l": "Add new Group",
				"group": "Administration",
				'v': "/admin/group/add"
			},
			{
				"l": "Add Users to Group",
				"group": "Administration",
				'v': "/admin/group/addUsers"
			},
			{
				"l": "Delete Group",
				"group": "Administration",
				'v': "/admin/group/delete"
			},
			{
				"l": "Edit Group",
				"group": "Administration",
				'v': "/admin/group/edit"
			},
			{
				"l": "List Groups",
				"group": "Administration",
				'v': "/admin/group/list"
			},
			{
				"l": "List Users",
				"group": "Administration",
				"groupMain": true,
				'v': "/admin/listUsers"
			},
			{
				"l": "Edit Multiple Groups",
				"group": "Administration",
				'v': "/admin/user/editGroups"
			},
			{
				"l": "Validate Change Email",
				"group": "Guest",
				'v': "/changeEmail/validate"
			},
			{
				"l": "Forgot Password",
				"group": "Guest",
				'v': "/forgotPassword"
			},
			{
				"l": "Register",
				"group": "Guest",
				'v': "/join"
			},
			{
				"l": "Validate Register",
				"group": "Guest",
				'v': "/join/validate"
			},
			{
				"l": "Login",
				"group": "Guest",
				"groupMain": true,
				'v': "/login"
			},
			{
				"l": "Logout",
				"group": "Guest",
				'v': "/logout"
			},
			{
				"l": "Reset Password",
				"group": "Guest",
				'v': "/resetPassword"
			}
		]
	},
	{
		"name": "oauth",
		"extKeyRequired": true,
		"port": 4002,
		"apis": [
			{
				"l": "Create Token",
				'v': "/token"
			},
			{
				"l": "Kill Token",
				'v': "/kill"
			}
		]

	},
	{
		"name": "dashboard",
		"extKeyRequired": true,
		"port": 4003,
		"apis": [
			{
				'l': "List Environments",
				'v': "/environment/list",
				"group": "Environment",
				"groupMain": true
			},
			{
				'l': "Add Environment",
				'v': "/environment/add",
				"group": "Environment"
			},
			{
				'l': "Delete Environment",
				'v': "/environment/delete",
				"group": "Environment"
			},
			{
				'l': "Update Environment",
				'v': "/environment/update",
				"group": "Environment"
			},
			{
				'l': "Update Product",
				'v': "/product/update",
				"group": "Product"
			},
			{
				'l': "Add Product",
				'v': "/product/add",
				"group": "Product"
			},
			{
				'l': "Delete Product",
				'v': "/product/delete",
				"group": "Product"
			},
			{
				'l': "List Products",
				'v': "/product/list",
				"group": "Product",
				"groupMain": true
			},
			{
				'l': "Get Product",
				'v': "/product/get",
				"group": "Product"
			},

			{
				'l': "Add Product Package",
				'v': "/product/packages/add",
				"group": "Product"
			},
			{
				"l": "Delete Product Package",
				"group": "Product",
				'v': "/product/packages/delete"
			},

			{
				"l": "List Product Packages",
				"group": "Product",
				'v': "/product/packages/list"
			},
			{
				"l": "Update Product Package",
				"group": "Product",
				'v': "/product/packages/update"
			},
			{
				"l": "List Tenants",
				"group": "Tenant",
				"groupMain": true,
				'v': "/tenant/list"
			},
			{
				"l": "Get Tenant Info",
				"group": "Tenant",
				'v': "/tenant/get"
			},

			{
				"l": "Add Tenant",
				"group": "Tenant",
				'v': "/tenant/add"
			},
			{
				"l": "Update Tenant",
				"group": "Tenant",
				'v': "/tenant/update"
			},
			{
				"l": "List Tenant Applications",
				"group": "Tenant Application",
				'v': "/tenant/application/list",
				"groupMain": true
			},
			{
				"l": "Add Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/add"
			},

			{
				"l": "Update Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/update"
			},
			{
				"l": "Delete Tenant",
				"group": "Tenant",
				'v': "/tenant/delete"
			},
			{
				"l": "Delete Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/delete"
			},

			{
				"l": "Add Tenant Application Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/add"
			},
			{
				"l": "List Application Key Configuration",
				"group": "Tenant Application",
				'v': "/tenant/application/key/config/list"
			},

			{
				"l": "Update Application Key Configuration",
				"group": "Tenant Application",
				'v': "/tenant/application/key/config/update"
			},

			{
				"l": "Delete Application Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/delete"
			},
			{
				"l": "Add Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/add"
			},
			{
				"l": "Delete Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/delete"
			},
			{
				"l": "List Application External Keys",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/list"
			},
			{
				"l": "Update Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/update"
			},
			{
				"l": "List Application Keys",
				"group": "Tenant Application",
				'v': "/tenant/application/key/list"
			},
			{
				"l": "List Tenant oAuth Users",
				"group": "Tenant oAuth",
				"groupMain": true,
				'v': "/tenant/oauth/users/list"
			},
			{
				"l": "Add Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/add"
			},
			{
				"l": "Delete Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/delete"
			},
			{
				"l": "Get Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/list"
			},
			{
				"l": "Update Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/update"
			},
			{
				"l": "Add Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/add"
			},
			{
				"l": "Delete Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/delete"
			},
			{
				"l": "Update Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/update"
			},
			{
				"l": "List Hosts",
				"group": "Hosts",
				'v': "/hosts/list",
				"groupMain": true
			},
			{
				"l": "List Services",
				"group": "Services",
				'v': "/services/list",
				"groupMain": true
			}
		]
	},
	{
		"name": "example01",
		"extKeyRequired": false,
		"port": 4010,
		"apis": []
	},
	{
		"name": "example02",
		"extKeyRequired": true,
		"port": 4011,
		"apis": []
	},
	{
		"name": "example03",
		"extKeyRequired": true,
		"port": 4012,
		"apis": []
	},
	{
		"name": "example04",
		"extKeyRequired": true,
		"port": 4013,
		"apis": []
	}
];

var core_hosts = [
	{
		"env": "dev",
		"name": "tony",
		"ip": "127.0.0.1"
	}
];<commit_msg>updated apisList in core_services sample data for examples.<commit_after>var core_services = [
	{
		"name": "urac",
		"extKeyRequired": true,
		"port": 4001,
		"apis": [
			{
				"l": "Change Email",
				"group": "My Account",
				'v': "/account/changeEmail"
			},
			{
				"l": "Change Password",
				"group": "My Account",
				'v': "/account/changePassword"
			},
			{
				"l": "Edit Profile",
				"group": "My Account",
				'v': "/account/editProfile"
			},
			{
				"l": "Get User Info",
				"group": "My Account",
				"groupMain": true,
				'v': "/account/getUser"
			},
			{
				"l": "Add new User",
				"group": "Administration",
				'v': "/admin/addUser"
			},
			{
				"l": "Change User Status",
				"group": "Administration",
				'v': "/admin/changeUserStatus"
			},
			{
				"l": "Edit User Record",
				"group": "Administration",
				'v': "/admin/editUser"
			},
			{
				"l": "Add new Group",
				"group": "Administration",
				'v': "/admin/group/add"
			},
			{
				"l": "Add Users to Group",
				"group": "Administration",
				'v': "/admin/group/addUsers"
			},
			{
				"l": "Delete Group",
				"group": "Administration",
				'v': "/admin/group/delete"
			},
			{
				"l": "Edit Group",
				"group": "Administration",
				'v': "/admin/group/edit"
			},
			{
				"l": "List Groups",
				"group": "Administration",
				'v': "/admin/group/list"
			},
			{
				"l": "List Users",
				"group": "Administration",
				"groupMain": true,
				'v': "/admin/listUsers"
			},
			{
				"l": "Edit Multiple Groups",
				"group": "Administration",
				'v': "/admin/user/editGroups"
			},
			{
				"l": "Validate Change Email",
				"group": "Guest",
				'v': "/changeEmail/validate"
			},
			{
				"l": "Forgot Password",
				"group": "Guest",
				'v': "/forgotPassword"
			},
			{
				"l": "Register",
				"group": "Guest",
				'v': "/join"
			},
			{
				"l": "Validate Register",
				"group": "Guest",
				'v': "/join/validate"
			},
			{
				"l": "Login",
				"group": "Guest",
				"groupMain": true,
				'v': "/login"
			},
			{
				"l": "Logout",
				"group": "Guest",
				'v': "/logout"
			},
			{
				"l": "Reset Password",
				"group": "Guest",
				'v': "/resetPassword"
			}
		]
	},
	{
		"name": "oauth",
		"extKeyRequired": true,
		"port": 4002,
		"apis": [
			{
				"l": "Create Token",
				'v': "/token"
			},
			{
				"l": "Kill Token",
				'v': "/kill"
			}
		]

	},
	{
		"name": "dashboard",
		"extKeyRequired": true,
		"port": 4003,
		"apis": [
			{
				'l': "List Environments",
				'v': "/environment/list",
				"group": "Environment",
				"groupMain": true
			},
			{
				'l': "Add Environment",
				'v': "/environment/add",
				"group": "Environment"
			},
			{
				'l': "Delete Environment",
				'v': "/environment/delete",
				"group": "Environment"
			},
			{
				'l': "Update Environment",
				'v': "/environment/update",
				"group": "Environment"
			},
			{
				'l': "Update Product",
				'v': "/product/update",
				"group": "Product"
			},
			{
				'l': "Add Product",
				'v': "/product/add",
				"group": "Product"
			},
			{
				'l': "Delete Product",
				'v': "/product/delete",
				"group": "Product"
			},
			{
				'l': "List Products",
				'v': "/product/list",
				"group": "Product",
				"groupMain": true
			},
			{
				'l': "Get Product",
				'v': "/product/get",
				"group": "Product"
			},

			{
				'l': "Add Product Package",
				'v': "/product/packages/add",
				"group": "Product"
			},
			{
				"l": "Delete Product Package",
				"group": "Product",
				'v': "/product/packages/delete"
			},

			{
				"l": "List Product Packages",
				"group": "Product",
				'v': "/product/packages/list"
			},
			{
				"l": "Update Product Package",
				"group": "Product",
				'v': "/product/packages/update"
			},
			{
				"l": "List Tenants",
				"group": "Tenant",
				"groupMain": true,
				'v': "/tenant/list"
			},
			{
				"l": "Get Tenant Info",
				"group": "Tenant",
				'v': "/tenant/get"
			},

			{
				"l": "Add Tenant",
				"group": "Tenant",
				'v': "/tenant/add"
			},
			{
				"l": "Update Tenant",
				"group": "Tenant",
				'v': "/tenant/update"
			},
			{
				"l": "List Tenant Applications",
				"group": "Tenant Application",
				'v': "/tenant/application/list",
				"groupMain": true
			},
			{
				"l": "Add Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/add"
			},

			{
				"l": "Update Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/update"
			},
			{
				"l": "Delete Tenant",
				"group": "Tenant",
				'v': "/tenant/delete"
			},
			{
				"l": "Delete Tenant Application",
				"group": "Tenant Application",
				'v': "/tenant/application/delete"
			},

			{
				"l": "Add Tenant Application Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/add"
			},
			{
				"l": "List Application Key Configuration",
				"group": "Tenant Application",
				'v': "/tenant/application/key/config/list"
			},

			{
				"l": "Update Application Key Configuration",
				"group": "Tenant Application",
				'v': "/tenant/application/key/config/update"
			},

			{
				"l": "Delete Application Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/delete"
			},
			{
				"l": "Add Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/add"
			},
			{
				"l": "Delete Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/delete"
			},
			{
				"l": "List Application External Keys",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/list"
			},
			{
				"l": "Update Application External Key",
				"group": "Tenant Application",
				'v': "/tenant/application/key/ext/update"
			},
			{
				"l": "List Application Keys",
				"group": "Tenant Application",
				'v': "/tenant/application/key/list"
			},
			{
				"l": "List Tenant oAuth Users",
				"group": "Tenant oAuth",
				"groupMain": true,
				'v': "/tenant/oauth/users/list"
			},
			{
				"l": "Add Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/add"
			},
			{
				"l": "Delete Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/delete"
			},
			{
				"l": "Get Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/list"
			},
			{
				"l": "Update Tenant oAuth Configuration",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/update"
			},
			{
				"l": "Add Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/add"
			},
			{
				"l": "Delete Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/delete"
			},
			{
				"l": "Update Tenant oAuth User",
				"group": "Tenant oAuth",
				'v': "/tenant/oauth/users/update"
			},
			{
				"l": "List Hosts",
				"group": "Hosts",
				'v': "/hosts/list",
				"groupMain": true
			},
			{
				"l": "List Services",
				"group": "Services",
				'v': "/services/list",
				"groupMain": true
			}
		]
	},
	{
		"name": "example01",
		"extKeyRequired": false,
		"port": 4010,
		"apis": [
			{
				"l": "Test Get",
				'v': "/testGet"
			},
			{
				"l": "Test Delete",
				'v': "/testDel"
			},
			{
				'l': 'Build Name',
				'v': '/buildName'
			},
			{
				'l': 'Test Post',
				'v': '/testPost'
			},
			{
				'l': 'Test Put',
				'v': '/testPut'
			}
		]
	},
	{
		"name": "example02",
		"extKeyRequired": true,
		"port": 4011,
		"apis": [
			{
				'l': 'Build Name',
				'v': '/buildName'
			}
		]
	},
	{
		"name": "example03",
		"extKeyRequired": true,
		"port": 4012,
		"apis": [
			{
				"l": "Test Get",
				'v': "/testGet"
			},
			{
				'l': 'Build Name',
				'v': '/buildName'
			}
		]
	},
	{
		"name": "example04",
		"extKeyRequired": true,
		"port": 4013,
		"apis": [
			{
				'l': 'Build Name',
				'v': '/buildName'
			},
			{
				"l": "Build Name Gold",
				'v': "/buildNameGold"
			},
			{
				"l": "Test Get",
				'v': "/testGet"
			}
		]
	}
];

var core_hosts = [
	{
		"env": "dev",
		"name": "tony",
		"ip": "127.0.0.1"
	}
];<|endoftext|>


<commit_before>/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/*
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );

// MAIN //

/**
* Top-level namespace.
*
* @namespace random
*/
var random = {};

/**
* @name arcsine
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/arcsine}
*/
setReadOnly( random, 'arcsine', require( '@stdlib/random/base/arcsine' ) );

/**
* @name bernoulli
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/bernoulli}
*/
setReadOnly( random, 'bernoulli', require( '@stdlib/random/base/bernoulli' ) );

/**
* @name beta
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/beta}
*/
setReadOnly( random, 'beta', require( '@stdlib/random/base/beta' ) );

/**
* @name betaprime
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/betaprime}
*/
setReadOnly( random, 'betaprime', require( '@stdlib/random/base/betaprime' ) );

/**
* @name binomial
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/binomial}
*/
setReadOnly( random, 'binomial', require( '@stdlib/random/base/binomial' ) );

/**
* @name boxMuller
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/box-muller}
*/
setReadOnly( random, 'boxMuller', require( '@stdlib/random/base/box-muller' ) );

/**
* @name cauchy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/cauchy}
*/
setReadOnly( random, 'cauchy', require( '@stdlib/random/base/cauchy' ) );

/**
* @name chi
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/chi}
*/
setReadOnly( random, 'chi', require( '@stdlib/random/base/chi' ) );

/**
* @name chisquare
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/chisquare}
*/
setReadOnly( random, 'chisquare', require( '@stdlib/random/base/chisquare' ) );

/**
* @name cosine
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/cosine}
*/
setReadOnly( random, 'cosine', require( '@stdlib/random/base/cosine' ) );

/**
* @name discreteUniform
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/discrete-uniform}
*/
setReadOnly( random, 'discreteUniform', require( '@stdlib/random/base/discrete-uniform' ) );

/**
* @name erlang
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/erlang}
*/
setReadOnly( random, 'erlang', require( '@stdlib/random/base/erlang' ) );

/**
* @name exponential
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/exponential}
*/
setReadOnly( random, 'exponential', require( '@stdlib/random/base/exponential' ) );

/**
* @name f
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/f}
*/
setReadOnly( random, 'f', require( '@stdlib/random/base/f' ) );

/**
* @name frechet
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/frechet}
*/
setReadOnly( random, 'frechet', require( '@stdlib/random/base/frechet' ) );

/**
* @name gamma
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/gamma}
*/
setReadOnly( random, 'gamma', require( '@stdlib/random/base/gamma' ) );

/**
* @name geometric
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/geometric}
*/
setReadOnly( random, 'geometric', require( '@stdlib/random/base/geometric' ) );

/**
* @name gumbel
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/gumbel}
*/
setReadOnly( random, 'gumbel', require( '@stdlib/random/base/gumbel' ) );

/**
* @name hypergeometric
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/hypergeometric}
*/

setReadOnly( random, 'hypergeometric', require( '@stdlib/random/base/hypergeometric' ) );

/**
* @name improvedZiggurat
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/improved-ziggurat}
*/
setReadOnly( random, 'improvedZiggurat', require( '@stdlib/random/base/improved-ziggurat' ) );

/**
* @name invgamma
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/invgamma}
*/
setReadOnly( random, 'invgamma', require( '@stdlib/random/base/invgamma' ) );

/**
* @name kumaraswamy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/kumaraswamy}
*/
setReadOnly( random, 'kumaraswamy', require( '@stdlib/random/base/kumaraswamy' ) );

/**
* @name laplace
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/laplace}
*/
setReadOnly( random, 'laplace', require( '@stdlib/random/base/laplace' ) );

/**
* @name levy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/levy}
*/
setReadOnly( random, 'levy', require( '@stdlib/random/base/levy' ) );

/**
* @name logistic
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/logistic}
*/
setReadOnly( random, 'logistic', require( '@stdlib/random/base/logistic' ) );

/**
* @name lognormal
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/lognormal}
*/
setReadOnly( random, 'lognormal', require( '@stdlib/random/base/lognormal' ) );

/**
* @name minstd
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/minstd}
*/
setReadOnly( random, 'minstd', require( '@stdlib/random/base/minstd' ) );

/**
* @name minstdShuffle
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/minstd-shuffle}
*/
setReadOnly( random, 'minstdShuffle', require( '@stdlib/random/base/minstd-shuffle' ) );

/**
* @name negativeBinomial
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/negative-binomial}
*/
setReadOnly( random, 'negativeBinomial', require( '@stdlib/random/base/negative-binomial' ) );

/**
* @name normal
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/normal}
*/
setReadOnly( random, 'normal', require( '@stdlib/random/base/normal' ) );

/**
* @name pareto1
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/pareto-type1}
*/
setReadOnly( random, 'pareto1', require( '@stdlib/random/base/pareto-type1' ) );

/**
* @name poisson
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/poisson}
*/
setReadOnly( random, 'poisson', require( '@stdlib/random/base/poisson' ) );

/**
* @name randi
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randi}
*/
setReadOnly( random, 'randi', require( '@stdlib/random/base/randi' ) );

/**
* @name randn
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randn}
*/
setReadOnly( random, 'randn', require( '@stdlib/random/base/randn' ) );

/**
* @name randu
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randu}
*/
setReadOnly( random, 'randu', require( '@stdlib/random/base/randu' ) );

/**
* @name rayleigh
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/rayleigh}
*/
setReadOnly( random, 'rayleigh', require( '@stdlib/random/base/rayleigh' ) );

/**
* @name t
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/t}
*/
setReadOnly( random, 't', require( '@stdlib/random/base/t' ) );

/**
* @name triangular
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/triangular}
*/
setReadOnly( random, 'triangular', require( '@stdlib/random/base/triangular' ) );

/**
* @name uniform
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/uniform}
*/
setReadOnly( random, 'uniform', require( '@stdlib/random/base/uniform' ) );

/**
* @name weibull
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/weibull}
*/
setReadOnly( random, 'weibull', require( '@stdlib/random/base/weibull' ) );

// EXPORTS //

module.exports = random;
<commit_msg>Update namespace<commit_after>/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

/*
* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );

// MAIN //

/**
* Top-level namespace.
*
* @namespace random
*/
var random = {};

/**
* @name arcsine
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/arcsine}
*/
setReadOnly( random, 'arcsine', require( '@stdlib/random/base/arcsine' ) );

/**
* @name bernoulli
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/bernoulli}
*/
setReadOnly( random, 'bernoulli', require( '@stdlib/random/base/bernoulli' ) );

/**
* @name beta
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/beta}
*/
setReadOnly( random, 'beta', require( '@stdlib/random/base/beta' ) );

/**
* @name betaprime
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/betaprime}
*/
setReadOnly( random, 'betaprime', require( '@stdlib/random/base/betaprime' ) );

/**
* @name binomial
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/binomial}
*/
setReadOnly( random, 'binomial', require( '@stdlib/random/base/binomial' ) );

/**
* @name boxMuller
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/box-muller}
*/
setReadOnly( random, 'boxMuller', require( '@stdlib/random/base/box-muller' ) );

/**
* @name cauchy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/cauchy}
*/
setReadOnly( random, 'cauchy', require( '@stdlib/random/base/cauchy' ) );

/**
* @name chi
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/chi}
*/
setReadOnly( random, 'chi', require( '@stdlib/random/base/chi' ) );

/**
* @name chisquare
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/chisquare}
*/
setReadOnly( random, 'chisquare', require( '@stdlib/random/base/chisquare' ) );

/**
* @name cosine
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/cosine}
*/
setReadOnly( random, 'cosine', require( '@stdlib/random/base/cosine' ) );

/**
* @name discreteUniform
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/discrete-uniform}
*/
setReadOnly( random, 'discreteUniform', require( '@stdlib/random/base/discrete-uniform' ) );

/**
* @name erlang
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/erlang}
*/
setReadOnly( random, 'erlang', require( '@stdlib/random/base/erlang' ) );

/**
* @name exponential
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/exponential}
*/
setReadOnly( random, 'exponential', require( '@stdlib/random/base/exponential' ) );

/**
* @name f
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/f}
*/
setReadOnly( random, 'f', require( '@stdlib/random/base/f' ) );

/**
* @name frechet
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/frechet}
*/
setReadOnly( random, 'frechet', require( '@stdlib/random/base/frechet' ) );

/**
* @name gamma
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/gamma}
*/
setReadOnly( random, 'gamma', require( '@stdlib/random/base/gamma' ) );

/**
* @name geometric
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/geometric}
*/
setReadOnly( random, 'geometric', require( '@stdlib/random/base/geometric' ) );

/**
* @name gumbel
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/gumbel}
*/
setReadOnly( random, 'gumbel', require( '@stdlib/random/base/gumbel' ) );

/**
* @name hypergeometric
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/hypergeometric}
*/

setReadOnly( random, 'hypergeometric', require( '@stdlib/random/base/hypergeometric' ) );

/**
* @name improvedZiggurat
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/improved-ziggurat}
*/
setReadOnly( random, 'improvedZiggurat', require( '@stdlib/random/base/improved-ziggurat' ) );

/**
* @name invgamma
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/invgamma}
*/
setReadOnly( random, 'invgamma', require( '@stdlib/random/base/invgamma' ) );

/**
* @name kumaraswamy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/kumaraswamy}
*/
setReadOnly( random, 'kumaraswamy', require( '@stdlib/random/base/kumaraswamy' ) );

/**
* @name laplace
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/laplace}
*/
setReadOnly( random, 'laplace', require( '@stdlib/random/base/laplace' ) );

/**
* @name levy
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/levy}
*/
setReadOnly( random, 'levy', require( '@stdlib/random/base/levy' ) );

/**
* @name logistic
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/logistic}
*/
setReadOnly( random, 'logistic', require( '@stdlib/random/base/logistic' ) );

/**
* @name lognormal
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/lognormal}
*/
setReadOnly( random, 'lognormal', require( '@stdlib/random/base/lognormal' ) );

/**
* @name minstd
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/minstd}
*/
setReadOnly( random, 'minstd', require( '@stdlib/random/base/minstd' ) );

/**
* @name minstdShuffle
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/minstd-shuffle}
*/
setReadOnly( random, 'minstdShuffle', require( '@stdlib/random/base/minstd-shuffle' ) );

/**
* @name mt19937
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/mt19937}
*/
setReadOnly( random, 'mt19937', require( '@stdlib/random/base/mt19937' ) );

/**
* @name negativeBinomial
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/negative-binomial}
*/
setReadOnly( random, 'negativeBinomial', require( '@stdlib/random/base/negative-binomial' ) );

/**
* @name normal
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/normal}
*/
setReadOnly( random, 'normal', require( '@stdlib/random/base/normal' ) );

/**
* @name pareto1
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/pareto-type1}
*/
setReadOnly( random, 'pareto1', require( '@stdlib/random/base/pareto-type1' ) );

/**
* @name poisson
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/poisson}
*/
setReadOnly( random, 'poisson', require( '@stdlib/random/base/poisson' ) );

/**
* @name randi
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randi}
*/
setReadOnly( random, 'randi', require( '@stdlib/random/base/randi' ) );

/**
* @name randn
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randn}
*/
setReadOnly( random, 'randn', require( '@stdlib/random/base/randn' ) );

/**
* @name randu
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/randu}
*/
setReadOnly( random, 'randu', require( '@stdlib/random/base/randu' ) );

/**
* @name rayleigh
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/rayleigh}
*/
setReadOnly( random, 'rayleigh', require( '@stdlib/random/base/rayleigh' ) );

/**
* @name t
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/t}
*/
setReadOnly( random, 't', require( '@stdlib/random/base/t' ) );

/**
* @name triangular
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/triangular}
*/
setReadOnly( random, 'triangular', require( '@stdlib/random/base/triangular' ) );

/**
* @name uniform
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/uniform}
*/
setReadOnly( random, 'uniform', require( '@stdlib/random/base/uniform' ) );

/**
* @name weibull
* @memberof random
* @readonly
* @type {Function}
* @see {@link module:@stdlib/random/base/weibull}
*/
setReadOnly( random, 'weibull', require( '@stdlib/random/base/weibull' ) );

// EXPORTS //

module.exports = random;
<|endoftext|>


<commit_before>/*
	Phantom by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

(function($) {

	skel.breakpoints({
		xlarge:	'(max-width: 1680px)',
		large:	'(max-width: 1280px)',
		medium:	'(max-width: 980px)',
		small:	'(max-width: 736px)',
		xsmall:	'(max-width: 480px)'
	});

	$(function() {

		var	$window = $(window),
			$body = $('body');

		// Disable animations/transitions until the page has loaded.
			$body.addClass('is-loading');

			$window.on('load', function() {
				window.setTimeout(function() {
					$body.removeClass('is-loading');
				}, 100);
			});

		// Touch?
			if (skel.vars.touch)
				$body.addClass('is-touch');

		// Forms.
			var $form = $('form');

			// Auto-resizing textareas.
				$form.find('textarea').each(function() {

					var $this = $(this),
						$wrapper = $('

'),
						$submits = $this.find('input[type="submit"]');

					$this
						.wrap($wrapper)
						.attr('rows', 1)
						.css('overflow', 'hidden')
						.css('resize', 'none')
						.on('keydown', function(event) {

							if (event.keyCode == 13
							&&	event.ctrlKey) {

								event.preventDefault();
								event.stopPropagation();

								$(this).blur();

							}

						})
						.on('blur focus', function() {
							$this.val($.trim($this.val()));
						})
						.on('input blur focus --init', function() {

							$wrapper
								.css('height', $this.height());

							$this
								.css('height', 'auto')
								.css('height', $this.prop('scrollHeight') + 'px');

						})
						.on('keyup', function(event) {

							if (event.keyCode == 9)
								$this
									.select();

						})
						.triggerHandler('--init');

					// Fix.
						if (skel.vars.browser == 'ie'
						||	skel.vars.mobile)
							$this
								.css('max-height', '10em')
								.css('overflow-y', 'auto');

				});

			// Fix: Placeholder polyfill.
				$form.placeholder();

		// Prioritize "important" elements on medium.
			skel.on('+medium -medium', function() {
				$.prioritize(
					'.important\\28 medium\\29',
					skel.breakpoint('medium').active
				);
			});

		// Menu.
			var $menu = $('#menu');

			$menu.wrapInner('

');

			$menu._locked = false;

			$menu._lock = function() {

				if ($menu._locked)
					return false;

				$menu._locked = true;

				window.setTimeout(function() {
					$menu._locked = false;
				}, 350);

				return true;

			};

			$menu._show = function() {

				if ($menu._lock())
					$body.addClass('is-menu-visible');

			};

			$menu._hide = function() {

				if ($menu._lock())
					$body.removeClass('is-menu-visible');

			};

			$menu._toggle = function() {

				if ($menu._lock())
					$body.toggleClass('is-menu-visible');

			};

			$menu
				.appendTo($body)
				.on('click', function(event) {
					event.stopPropagation();
				})
				.on('click', 'a', function(event) {

					var href = $(this).attr('href');

					event.preventDefault();
					event.stopPropagation();

					// Hide.
						$menu._hide();

					// Redirect.
						if (href == '#menu')
							return;

						window.setTimeout(function() {
							window.location.href = href;
						}, 350);

				})
				.append('Close');

			$body
				.on('click', 'a[href="#menu"]', function(event) {

					event.stopPropagation();
					event.preventDefault();

					// Toggle.
						$menu._toggle();

				})
				.on('click', function(event) {

					// Hide.
						$menu._hide();

				})
				.on('keydown', function(event) {

					// Hide on escape.
						if (event.keyCode == 27)
							$menu._hide();

				});

	});

})(jQuery);

// Function for crossing out list elements
$(document).ready(function(){
  $("li").on("click", function(){
  	if(document.getElementsByTagName("body")[0].className != "is-menu-visible"){
      $(this).toggleClass("checked");
  	};
  });
});

// Function and variables for capturing search input (courtesy of stackoverflow)

//creates a listener for when you press a key
window.onkeyup = keyup;
//creates a global Javascript variable
var inputTextValue;

function keyup(e) {
	//setting your input text to the global Javascript Variable for every key press
	inputTextValue = e.target.value;
	//listens for you to press the ENTER key, at which point your web address will change to the one you have input in the search box
	if (e.keyCode == 13) {
	    window.location = "https://cse.google.com/cse/publicurl?cx=009416170567840886498:vfkolqafpew&q=" + inputTextValue;
	}
}

// Search button for redirect
function enterKeyRedirect() {
	inputTextValue = $("#searchTxt")[0].value;
	window.location = "https://cse.google.com/cse/publicurl?cx=009416170567840886498:vfkolqafpew&q=" + inputTextValue;
}
<commit_msg>Update js to hopefully fix category menu crossing out bug<commit_after>/*
	Phantom by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

(function($) {

	skel.breakpoints({
		xlarge:	'(max-width: 1680px)',
		large:	'(max-width: 1280px)',
		medium:	'(max-width: 980px)',
		small:	'(max-width: 736px)',
		xsmall:	'(max-width: 480px)'
	});

	$(function() {

		var	$window = $(window),
			$body = $('body');

		// Disable animations/transitions until the page has loaded.
			$body.addClass('is-loading');

			$window.on('load', function() {
				window.setTimeout(function() {
					$body.removeClass('is-loading');
				}, 100);
			});

		// Touch?
			if (skel.vars.touch)
				$body.addClass('is-touch');

		// Forms.
			var $form = $('form');

			// Auto-resizing textareas.
				$form.find('textarea').each(function() {

					var $this = $(this),
						$wrapper = $('

'),
						$submits = $this.find('input[type="submit"]');

					$this
						.wrap($wrapper)
						.attr('rows', 1)
						.css('overflow', 'hidden')
						.css('resize', 'none')
						.on('keydown', function(event) {

							if (event.keyCode == 13
							&&	event.ctrlKey) {

								event.preventDefault();
								event.stopPropagation();

								$(this).blur();

							}

						})
						.on('blur focus', function() {
							$this.val($.trim($this.val()));
						})
						.on('input blur focus --init', function() {

							$wrapper
								.css('height', $this.height());

							$this
								.css('height', 'auto')
								.css('height', $this.prop('scrollHeight') + 'px');

						})
						.on('keyup', function(event) {

							if (event.keyCode == 9)
								$this
									.select();

						})
						.triggerHandler('--init');

					// Fix.
						if (skel.vars.browser == 'ie'
						||	skel.vars.mobile)
							$this
								.css('max-height', '10em')
								.css('overflow-y', 'auto');

				});

			// Fix: Placeholder polyfill.
				$form.placeholder();

		// Prioritize "important" elements on medium.
			skel.on('+medium -medium', function() {
				$.prioritize(
					'.important\\28 medium\\29',
					skel.breakpoint('medium').active
				);
			});

		// Menu.
			var $menu = $('#menu');

			$menu.wrapInner('

');

			$menu._locked = false;

			$menu._lock = function() {

				if ($menu._locked)
					return false;

				$menu._locked = true;

				window.setTimeout(function() {
					$menu._locked = false;
				}, 350);

				return true;

			};

			$menu._show = function() {

				if ($menu._lock())
					$body.addClass('is-menu-visible');

			};

			$menu._hide = function() {

				if ($menu._lock())
					$body.removeClass('is-menu-visible');

			};

			$menu._toggle = function() {

				if ($menu._lock())
					$body.toggleClass('is-menu-visible');

			};

			$menu
				.appendTo($body)
				.on('click', function(event) {
					event.stopPropagation();
				})
				.on('click', 'a', function(event) {

					var href = $(this).attr('href');

					event.preventDefault();
					event.stopPropagation();

					// Hide.
						$menu._hide();

					// Redirect.
						if (href == '#menu')
							return;

						window.setTimeout(function() {
							window.location.href = href;
						}, 350);

				})
				.append('Close');

			$body
				.on('click', 'a[href="#menu"]', function(event) {

					event.stopPropagation();
					event.preventDefault();

					// Toggle.
						$menu._toggle();

				})
				.on('click', function(event) {

					// Hide.
						$menu._hide();

				})
				.on('keydown', function(event) {

					// Hide on escape.
						if (event.keyCode == 27)
							$menu._hide();

				});

	});

})(jQuery);

// Function for crossing out list elements
$(document).ready(function(){
  $("li").on("click", function(){
  	if(!$(document.getElementsByTagName("body")).hasClass("is-menu-visible")){
      $(this).toggleClass("checked");
  	};
  });
});

// Function and variables for capturing search input (courtesy of stackoverflow)

//creates a listener for when you press a key
window.onkeyup = keyup;
//creates a global Javascript variable
var inputTextValue;

function keyup(e) {
	//setting your input text to the global Javascript Variable for every key press
	inputTextValue = e.target.value;
	//listens for you to press the ENTER key, at which point your web address will change to the one you have input in the search box
	if (e.keyCode == 13) {
	    window.location = "https://cse.google.com/cse/publicurl?cx=009416170567840886498:vfkolqafpew&q=" + inputTextValue;
	}
}

// Search button for redirect
function enterKeyRedirect() {
	inputTextValue = $("#searchTxt")[0].value;
	window.location = "https://cse.google.com/cse/publicurl?cx=009416170567840886498:vfkolqafpew&q=" + inputTextValue;
}
<|endoftext|>


<commit_before>function getDocUrl(filename) {
  return `https://raw.githubusercontent.com/uber/deck.gl/5.1-release/docs/${filename}`;
}
function getCodeUrl(pathname) {
  return `https://github.com/uber/deck.gl/tree/5.1-release/${pathname}`;
}

// mapping from file path in source to generated page url
export const markdownFiles = {};

function generatePath(tree, parentPath = '') {
  if (Array.isArray(tree)) {
    tree.forEach(branch => generatePath(branch, parentPath));
  }
  if (tree.name) {
    tree.path = tree.name.match(/(GeoJson|3D|API|([A-Z]|^)[a-z'0-9]+|\d+)/g)
      .join('-').toLowerCase().replace(/[^\w-]/g, '');
  }
  if (tree.children) {
    generatePath(tree.children, `${parentPath}/${tree.path}`);
  }
  if (typeof tree.content === 'string') {
    markdownFiles[tree.content] = `${parentPath}/${tree.path}`;
  }

  return tree;
}

export const examplePages = generatePath([
  {
    name: 'Overview',
    content: 'markdown/examples.md'
  },
  {
    name: 'Core Layers',
    expanded: true,
    children: [
      {
        name: 'LineLayer',
        content: {
          demo: 'LineDemo',
          code: getCodeUrl('examples/line')
        }
      },
      {
        name: 'HexagonLayer',
        content: {
          demo: 'HeatmapDemo',
          code: getCodeUrl('examples/3d-heatmap')
        }
      },
      {
        name: 'IconLayer',
        content: {
          demo: 'IconDemo',
          code: getCodeUrl('examples/icon')
        }
      },
      {
        name: 'GeoJsonLayer',
        content: {
          demo: 'GeoJsonDemo',
          code: getCodeUrl('examples/geojson')
        }
      },
      {
        name: 'ScreenGridLayer',
        content: {
          demo: 'ScreenGridDemo',
          code: getCodeUrl('examples/screen-grid')
        }
      },
      {
        name: 'ArcLayer',
        content: {
          demo: 'ArcDemo',
          code: getCodeUrl('examples/arc')
        }
      },
      {
        name: 'ScatterplotLayer',
        content: {
          demo: 'ScatterplotDemo',
          code: getCodeUrl('examples/scatterplot')
        }
      }
    ]
  },
  {
    name: 'Custom Layers',
    expanded: true,
    children: [
      {
        name: 'Brushing Layer',
        content: {
          demo: 'BrushingDemo',
          code: getCodeUrl('examples/brushing')
        }
      },
      {
        name: 'Trip Routes',
        content: {
          demo: 'TripsDemo',
          code: getCodeUrl('examples/trips')
        }
      },
      {
        name: 'Wind Map',
        external: 'http://uber.github.io/deck.gl/examples/wind'
      }
    ]
  },
  {
    name: 'Beyond Maps',
    expanded: true,
    children: [
      {
        name: '3D Surface Explorer',
        content: {
          demo: 'PlotDemo',
          code: getCodeUrl('examples/plot')
        }
      },
      {
        name: '3D Indoor Scan',
        external: 'http://uber.github.io/deck.gl/examples/point-cloud-laz'
      },
      {
        name: '3D Model (Point Cloud)',
        external: 'http://uber.github.io/deck.gl/examples/point-cloud-ply'
      }
    ]
  }
]);

export const docPages = generatePath([
  {
    name: 'Overview',
    children: [
      {
        name: 'Introduction',
        content: getDocUrl('README.md')
      },
      {
        name: 'What\'s New',
        content: getDocUrl('whats-new.md')
      },
      {
        name: 'Upgrade Guide',
        content: getDocUrl('upgrade-guide.md')
      },
      {
        name: 'Roadmap',
        content: getDocUrl('roadmap.md')
      }
    ]
  },
  {
    name: 'Getting Started',
    children: [
      {
        name: 'Installation',
        content: getDocUrl('get-started/getting-started.md')
      },
      {
        name: 'Using With React',
        content: getDocUrl('get-started/using-with-react.md')
      },
      {
        name: 'Using With Mapbox GL',
        content: getDocUrl('get-started/using-with-mapbox-gl.md')
      },
      {
        name: 'Using Layers',
        content: getDocUrl('get-started/using-layers.md')
      },
      {
        name: 'Adding Interactivity',
        content: getDocUrl('get-started/interactivity.md')
      }
    ]
  },
  {
    name: 'Custom Layers',
    children: [
      {
        name: 'Writing Your Own Layer',
        content: getDocUrl('advanced/custom-layers.md')
      },
      {
        name: 'Layer Lifecycle',
        content: getDocUrl('advanced/layer-lifecycle.md')
      },
      {
        name: 'Picking',
        content: getDocUrl('advanced/picking.md')
      },
      {
        name: 'Composite Layers',
        content: getDocUrl('advanced/composite-layers.md')
      },
      {
        name: 'Subclassed Layers',
        content: getDocUrl('advanced/subclassed-layers.md')
      },
      {
        name: 'Primitive Layers',
        content: getDocUrl('advanced/primitive-layers.md')
      },
      {
        name: 'Attribute Management',
        content: getDocUrl('advanced/attribute-management.md')
      },
      {
        name: 'Writing Shaders',
        content: getDocUrl('advanced/writing-shaders.md')
      }
    ]
  },
  {
    name: 'Advanced Topics',
    children: [
      {
        name: 'Coordinate Systems',
        content: getDocUrl('advanced/coordinate-systems.md')
      },
      {
        name: 'Views',
        content: getDocUrl('advanced/views.md')
      },
      {
        name: 'Viewports',
        content: getDocUrl('advanced/viewports.md')
      },
      {
        name: 'Updates',
        content: getDocUrl('advanced/updates.md')
      },
      {
        name: 'Performance',
        content: getDocUrl('advanced/performance.md')
      },
      {
        name: '64 bit Layers',
        content: getDocUrl('advanced/64-bits.md')
      },
      {
        name: 'Using Standalone',
        content: getDocUrl('advanced/using-standalone.md')
      },
      {
        name: 'Tips and Tricks',
        content: getDocUrl('advanced/tips-and-tricks.md')
      }
    ]
  },
  {
    name: 'Layer Catalog',
    children: [
      {
        name: 'Layer',
        content: getDocUrl('api-reference/layer.md')
      },
      {
        name: 'CompositeLayer',
        content: getDocUrl('api-reference/composite-layer.md')
      },
      {
        name: 'ArcLayer',
        content: getDocUrl('layers/arc-layer.md')
      },
      {
        name: 'GeoJsonLayer',
        content: getDocUrl('layers/geojson-layer.md')
      },
      {
        name: 'GridLayer',
        content: getDocUrl('layers/grid-layer.md')
      },
      {
        name: 'HexagonLayer',
        content: getDocUrl('layers/hexagon-layer.md')
      },
      {
        name: 'IconLayer',
        content: getDocUrl('layers/icon-layer.md')
      },
      {
        name: 'LineLayer',
        content: getDocUrl('layers/line-layer.md')
      },
      {
        name: 'PathLayer',
        content: getDocUrl('layers/path-layer.md')
      },
      {
        name: 'PointCloudLayer',
        content: getDocUrl('layers/point-cloud-layer.md')
      },
      {
        name: 'PolygonLayer',
        content: getDocUrl('layers/polygon-layer.md')
      },
      {
        name: 'ScatterplotLayer',
        content: getDocUrl('layers/scatterplot-layer.md')
      },
      {
        name: 'ScreenGridLayer',
        content: getDocUrl('layers/screen-grid-layer.md')
      }
    ]
  },
  {
    name: 'API Reference',
    children: [
      {
        name: 'AttributeManager (Advanced)',
        content: getDocUrl('api-reference/attribute-manager.md')
      },
      {
        name: 'Deck',
        content: getDocUrl('api-reference/deck.md')
      },
      {
        name: 'View',
        content: getDocUrl('api-reference/view.md')
      },
      {
        name: 'MapView',
        content: getDocUrl('api-reference/map-view.md')
      },
      {
        name: 'FirstPersonView',
        content: getDocUrl('api-reference/first-person-view.md')
      },
      {
        name: 'ThirdPersonView',
        content: getDocUrl('api-reference/third-person-view.md')
      },
      {
        name: 'OrthographicView',
        content: getDocUrl('api-reference/orthographic-view.md')
      },
      {
        name: 'PerspectiveView',
        content: getDocUrl('api-reference/perspective-view.md')
      },
      {
        name: 'Viewport',
        content: getDocUrl('api-reference/viewport.md')
      },
      {
        name: 'WebMercatorViewport',
        content: getDocUrl('api-reference/web-mercator-viewport.md')
      },
      {
        name: 'project (Shader Module)',
        content: getDocUrl('shader-modules/project.md')
      },
      {
        name: 'project64 (Shader Module)',
        content: getDocUrl('shader-modules/project64.md')
      },
      {
        name: 'lighting (Shader Module)',
        content: getDocUrl('shader-modules/lighting.md')
      }
    ]
  },
  {
    name: 'React Reference',
    children: [
      {
        name: 'DeckGL',
        content: getDocUrl('api-reference/react/deckgl.md')
      }
    ]
  },
  {
    name: 'API Reference (Experimental)',
    children: [
      {
        name: 'FirstPersonViewport',
        content: getDocUrl('api-reference/first-person-viewport.md')
      },
      {
        name: 'ThirdPersonViewport',
        content: getDocUrl('api-reference/third-person-viewport.md')
      }
    ]
  },
  {
    name: 'Test Utils Reference (Experimental)',
    children: [
      {
        name: 'Overview',
        content: getDocUrl('api-reference/test-utils/README.md')
      }
    ]
  }
]);
<commit_msg>fix link rewrite in website (#1469)<commit_after>function getDocUrl(filename) {
  return `https://raw.githubusercontent.com/uber/deck.gl/5.1-release/docs/${filename}`;
}
function getCodeUrl(pathname) {
  return `https://github.com/uber/deck.gl/tree/5.1-release/${pathname}`;
}

// mapping from file path in source to generated page url
export const markdownFiles = {};

function generatePath(tree, parentPath = '') {
  if (Array.isArray(tree)) {
    tree.forEach(branch => generatePath(branch, parentPath));
  }
  if (tree.name) {
    tree.path = tree.name.match(/(GeoJson|3D|API|([A-Z]|^)[a-z'0-9]+|\d+)/g)
      .join('-').toLowerCase().replace(/[^\w-]/g, '');
  }
  if (tree.children) {
    generatePath(tree.children, `${parentPath}/${tree.path}`);
  }
  if (typeof tree.content === 'string') {
    const i = tree.content.indexOf('docs/');
    if (i >= 0) {
      markdownFiles[tree.content.slice(i)] = `${parentPath}/${tree.path}`;
    }
  }

  return tree;
}

export const examplePages = generatePath([
  {
    name: 'Overview',
    content: 'markdown/examples.md'
  },
  {
    name: 'Core Layers',
    expanded: true,
    children: [
      {
        name: 'LineLayer',
        content: {
          demo: 'LineDemo',
          code: getCodeUrl('examples/line')
        }
      },
      {
        name: 'HexagonLayer',
        content: {
          demo: 'HeatmapDemo',
          code: getCodeUrl('examples/3d-heatmap')
        }
      },
      {
        name: 'IconLayer',
        content: {
          demo: 'IconDemo',
          code: getCodeUrl('examples/icon')
        }
      },
      {
        name: 'GeoJsonLayer',
        content: {
          demo: 'GeoJsonDemo',
          code: getCodeUrl('examples/geojson')
        }
      },
      {
        name: 'ScreenGridLayer',
        content: {
          demo: 'ScreenGridDemo',
          code: getCodeUrl('examples/screen-grid')
        }
      },
      {
        name: 'ArcLayer',
        content: {
          demo: 'ArcDemo',
          code: getCodeUrl('examples/arc')
        }
      },
      {
        name: 'ScatterplotLayer',
        content: {
          demo: 'ScatterplotDemo',
          code: getCodeUrl('examples/scatterplot')
        }
      }
    ]
  },
  {
    name: 'Custom Layers',
    expanded: true,
    children: [
      {
        name: 'Brushing Layer',
        content: {
          demo: 'BrushingDemo',
          code: getCodeUrl('examples/brushing')
        }
      },
      {
        name: 'Trip Routes',
        content: {
          demo: 'TripsDemo',
          code: getCodeUrl('examples/trips')
        }
      },
      {
        name: 'Wind Map',
        external: 'http://uber.github.io/deck.gl/examples/wind'
      }
    ]
  },
  {
    name: 'Beyond Maps',
    expanded: true,
    children: [
      {
        name: '3D Surface Explorer',
        content: {
          demo: 'PlotDemo',
          code: getCodeUrl('examples/plot')
        }
      },
      {
        name: '3D Indoor Scan',
        external: 'http://uber.github.io/deck.gl/examples/point-cloud-laz'
      },
      {
        name: '3D Model (Point Cloud)',
        external: 'http://uber.github.io/deck.gl/examples/point-cloud-ply'
      }
    ]
  }
]);

export const docPages = generatePath([
  {
    name: 'Overview',
    children: [
      {
        name: 'Introduction',
        content: getDocUrl('README.md')
      },
      {
        name: 'What\'s New',
        content: getDocUrl('whats-new.md')
      },
      {
        name: 'Upgrade Guide',
        content: getDocUrl('upgrade-guide.md')
      },
      {
        name: 'Roadmap',
        content: getDocUrl('roadmap.md')
      }
    ]
  },
  {
    name: 'Getting Started',
    children: [
      {
        name: 'Installation',
        content: getDocUrl('get-started/getting-started.md')
      },
      {
        name: 'Using With React',
        content: getDocUrl('get-started/using-with-react.md')
      },
      {
        name: 'Using With Mapbox GL',
        content: getDocUrl('get-started/using-with-mapbox-gl.md')
      },
      {
        name: 'Using Layers',
        content: getDocUrl('get-started/using-layers.md')
      },
      {
        name: 'Adding Interactivity',
        content: getDocUrl('get-started/interactivity.md')
      }
    ]
  },
  {
    name: 'Custom Layers',
    children: [
      {
        name: 'Writing Your Own Layer',
        content: getDocUrl('advanced/custom-layers.md')
      },
      {
        name: 'Layer Lifecycle',
        content: getDocUrl('advanced/layer-lifecycle.md')
      },
      {
        name: 'Picking',
        content: getDocUrl('advanced/picking.md')
      },
      {
        name: 'Composite Layers',
        content: getDocUrl('advanced/composite-layers.md')
      },
      {
        name: 'Subclassed Layers',
        content: getDocUrl('advanced/subclassed-layers.md')
      },
      {
        name: 'Primitive Layers',
        content: getDocUrl('advanced/primitive-layers.md')
      },
      {
        name: 'Attribute Management',
        content: getDocUrl('advanced/attribute-management.md')
      },
      {
        name: 'Writing Shaders',
        content: getDocUrl('advanced/writing-shaders.md')
      }
    ]
  },
  {
    name: 'Advanced Topics',
    children: [
      {
        name: 'Coordinate Systems',
        content: getDocUrl('advanced/coordinate-systems.md')
      },
      {
        name: 'Views',
        content: getDocUrl('advanced/views.md')
      },
      {
        name: 'Viewports',
        content: getDocUrl('advanced/viewports.md')
      },
      {
        name: 'Updates',
        content: getDocUrl('advanced/updates.md')
      },
      {
        name: 'Performance',
        content: getDocUrl('advanced/performance.md')
      },
      {
        name: '64 bit Layers',
        content: getDocUrl('advanced/64-bits.md')
      },
      {
        name: 'Using Standalone',
        content: getDocUrl('advanced/using-standalone.md')
      },
      {
        name: 'Tips and Tricks',
        content: getDocUrl('advanced/tips-and-tricks.md')
      }
    ]
  },
  {
    name: 'Layer Catalog',
    children: [
      {
        name: 'Layer',
        content: getDocUrl('api-reference/layer.md')
      },
      {
        name: 'CompositeLayer',
        content: getDocUrl('api-reference/composite-layer.md')
      },
      {
        name: 'ArcLayer',
        content: getDocUrl('layers/arc-layer.md')
      },
      {
        name: 'GeoJsonLayer',
        content: getDocUrl('layers/geojson-layer.md')
      },
      {
        name: 'GridLayer',
        content: getDocUrl('layers/grid-layer.md')
      },
      {
        name: 'HexagonLayer',
        content: getDocUrl('layers/hexagon-layer.md')
      },
      {
        name: 'IconLayer',
        content: getDocUrl('layers/icon-layer.md')
      },
      {
        name: 'LineLayer',
        content: getDocUrl('layers/line-layer.md')
      },
      {
        name: 'PathLayer',
        content: getDocUrl('layers/path-layer.md')
      },
      {
        name: 'PointCloudLayer',
        content: getDocUrl('layers/point-cloud-layer.md')
      },
      {
        name: 'PolygonLayer',
        content: getDocUrl('layers/polygon-layer.md')
      },
      {
        name: 'ScatterplotLayer',
        content: getDocUrl('layers/scatterplot-layer.md')
      },
      {
        name: 'ScreenGridLayer',
        content: getDocUrl('layers/screen-grid-layer.md')
      }
    ]
  },
  {
    name: 'API Reference',
    children: [
      {
        name: 'AttributeManager (Advanced)',
        content: getDocUrl('api-reference/attribute-manager.md')
      },
      {
        name: 'Deck',
        content: getDocUrl('api-reference/deck.md')
      },
      {
        name: 'View',
        content: getDocUrl('api-reference/view.md')
      },
      {
        name: 'MapView',
        content: getDocUrl('api-reference/map-view.md')
      },
      {
        name: 'FirstPersonView',
        content: getDocUrl('api-reference/first-person-view.md')
      },
      {
        name: 'ThirdPersonView',
        content: getDocUrl('api-reference/third-person-view.md')
      },
      {
        name: 'OrthographicView',
        content: getDocUrl('api-reference/orthographic-view.md')
      },
      {
        name: 'PerspectiveView',
        content: getDocUrl('api-reference/perspective-view.md')
      },
      {
        name: 'Viewport',
        content: getDocUrl('api-reference/viewport.md')
      },
      {
        name: 'WebMercatorViewport',
        content: getDocUrl('api-reference/web-mercator-viewport.md')
      },
      {
        name: 'project (Shader Module)',
        content: getDocUrl('shader-modules/project.md')
      },
      {
        name: 'project64 (Shader Module)',
        content: getDocUrl('shader-modules/project64.md')
      },
      {
        name: 'lighting (Shader Module)',
        content: getDocUrl('shader-modules/lighting.md')
      }
    ]
  },
  {
    name: 'React Reference',
    children: [
      {
        name: 'DeckGL',
        content: getDocUrl('api-reference/react/deckgl.md')
      }
    ]
  },
  {
    name: 'API Reference (Experimental)',
    children: [
      {
        name: 'FirstPersonViewport',
        content: getDocUrl('api-reference/first-person-viewport.md')
      },
      {
        name: 'ThirdPersonViewport',
        content: getDocUrl('api-reference/third-person-viewport.md')
      }
    ]
  },
  {
    name: 'Test Utils Reference (Experimental)',
    children: [
      {
        name: 'Overview',
        content: getDocUrl('api-reference/test-utils/README.md')
      }
    ]
  }
]);
<|endoftext|>