target stringlengths 5 300 | feat_repo_name stringlengths 6 76 | text stringlengths 26 1.05M |
|---|---|---|
src/components/about/AboutPage.js | kennethrithvik/react_redux | import React from 'react';
class AboutPage extends React.Component {
render() {
return (
<div>
<h1>About</h1>
<p>This application uses React, Redux, React Router and a variety of other helpful libraries.</p>
</div>
);
}
}
export default AboutPage; |
client/modules/core/components/.stories/postlist.js | luki21213/tripIdeas | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import PostList from '../postlist';
storiesOf('core.PostList', module)
.add('default view', () => {
const posts = [
{_id: 'one', title: 'React is Superb'},
{_id: 'two', title: 'Meteor is Great'},
{_id: 'three', title: 'Mantra is Amazing'},
];
return (
<PostList posts={posts} />
);
});
|
test/app/components/MainSection.spec.js | meth-makers/dolphin | import { expect } from 'chai';
import sinon from 'sinon';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import MainSection from '../../../app/components/MainSection';
import style from '../../../app/components/MainSection.css';
import TodoItem from '../../../app/components/TodoItem';
import Footer from '../../../app/components/Footer';
import { SHOW_ALL, SHOW_COMPLETED } from '../../../app/constants/TodoFilters';
function setup(propOverrides) {
const props = {
todos: [{
text: 'Use Redux',
completed: false,
id: 0
}, {
text: 'Run the tests',
completed: true,
id: 1
}],
actions: {
editTodo: sinon.spy(),
deleteTodo: sinon.spy(),
completeTodo: sinon.spy(),
completeAll: sinon.spy(),
clearCompleted: sinon.spy()
},
...propOverrides
};
const renderer = TestUtils.createRenderer();
renderer.render(<MainSection {...props} />);
const output = renderer.getRenderOutput();
return { props, output, renderer };
}
describe('todoapp MainSection component', () => {
it('should render correctly', () => {
const { output } = setup();
expect(output.type).to.equal('section');
expect(output.props.className).to.equal(style.main);
});
describe('toggle all input', () => {
it('should render', () => {
const { output } = setup();
const [toggle] = output.props.children;
expect(toggle.type).to.equal('input');
expect(toggle.props.type).to.equal('checkbox');
expect(toggle.props.checked).to.equal(false);
});
it('should be checked if all todos completed', () => {
const { output } = setup({
todos: [{
text: 'Use Redux',
completed: true,
id: 0
}]
});
const [toggle] = output.props.children;
expect(toggle.props.checked).to.equal(true);
});
it('should call completeAll on change', () => {
const { output, props } = setup();
const [toggle] = output.props.children;
toggle.props.onChange({});
expect(props.actions.completeAll.called).to.equal(true);
});
});
describe('footer', () => {
it('should render', () => {
const { output } = setup();
const [,, footer] = output.props.children;
expect(footer.type).to.equal(Footer);
expect(footer.props.completedCount).to.equal(1);
expect(footer.props.activeCount).to.equal(1);
expect(footer.props.filter).to.equal(SHOW_ALL);
});
it('onShow should set the filter', () => {
const { output, renderer } = setup();
const [,, footer] = output.props.children;
footer.props.onShow(SHOW_COMPLETED);
const updated = renderer.getRenderOutput();
const [,, updatedFooter] = updated.props.children;
expect(updatedFooter.props.filter).to.equal(SHOW_COMPLETED);
});
it('onClearCompleted should call clearCompleted', () => {
const { output, props } = setup();
const [,, footer] = output.props.children;
footer.props.onClearCompleted();
expect(props.actions.clearCompleted.called).to.equal(true);
});
it('onClearCompleted shouldnt call clearCompleted if no todos completed', () => {
const { output, props } = setup({
todos: [{
text: 'Use Redux',
completed: false,
id: 0
}]
});
const [,, footer] = output.props.children;
footer.props.onClearCompleted();
expect(props.actions.clearCompleted.callCount).to.equal(0);
});
});
describe('todo list', () => {
it('should render', () => {
const { output, props } = setup();
const [, list] = output.props.children;
expect(list.type).to.equal('ul');
expect(list.props.children.length).to.equal(2);
list.props.children.forEach((item, index) => {
expect(item.type).to.equal(TodoItem);
expect(item.props.todo).to.equal(props.todos[index]);
});
});
it('should filter items', () => {
const { output, renderer, props } = setup();
const [,, footer] = output.props.children;
footer.props.onShow(SHOW_COMPLETED);
const updated = renderer.getRenderOutput();
const [, updatedList] = updated.props.children;
expect(updatedList.props.children.length).to.equal(1);
expect(updatedList.props.children[0].props.todo).to.equal(props.todos[1]);
});
});
});
|
ajax/libs/react-native-web/0.11.4/cjs/exports/SectionList/index.js | cdnjs/cdnjs | "use strict";
exports.__esModule = true;
exports.default = void 0;
var _SectionList = _interopRequireDefault(require("../../vendor/react-native/SectionList"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
var _default = _SectionList.default;
exports.default = _default;
module.exports = exports.default; |
node_modules/grunt-react/node_modules/react-tools/src/utils/__tests__/quoteAttributeValueForBrowser-test.js | rpolishetti/mindm | /**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails react-core
*/
'use strict';
describe('quoteAttributeValueForBrowser', function() {
var quoteAttributeValueForBrowser = require('quoteAttributeValueForBrowser');
it('should escape boolean to string', function() {
expect(quoteAttributeValueForBrowser(true)).toBe('"true"');
expect(quoteAttributeValueForBrowser(false)).toBe('"false"');
});
it('should escape object to string', function() {
var escaped = quoteAttributeValueForBrowser({
toString: function() {
return 'ponys';
}
});
expect(escaped).toBe('"ponys"');
});
it('should escape number to string', function() {
expect(quoteAttributeValueForBrowser(42)).toBe('"42"');
});
it('should escape string', function() {
var escaped = quoteAttributeValueForBrowser('<script type=\'\' src=""></script>');
expect(escaped).not.toContain('<');
expect(escaped).not.toContain('>');
expect(escaped).not.toContain('\'');
expect(escaped.substr(1, -1)).not.toContain('\"');
escaped = quoteAttributeValueForBrowser('&');
expect(escaped).toBe('"&"');
});
});
|
src/client/components/EditButtonToolbar.js | gearz-lab/gearz | import React from 'react';
import { ButtonToolbar, Button }from 'react-bootstrap'
var Layout = React.createClass({
render: function () {
let { submitting } = this.props;
return (
<ButtonToolbar className="button-toolbar">
<Button className="pull-right" bsStyle="success" bsSize="large" type="submit" disabled={submitting}>Submit</Button>
</ButtonToolbar>
);
}
});
export default Layout; |
ajax/libs/react-redux/4.4.1/react-redux.min.js | hare1039/cdnjs | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("redux")):"function"==typeof define&&define.amd?define(["react","redux"],e):"object"==typeof exports?exports.ReactRedux=e(require("react"),require("redux")):t.ReactRedux=e(t.React,t.Redux)}(this,function(t,e){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.connect=e.Provider=void 0;var n=r(3),s=o(n),i=r(4),a=o(i);e.Provider=s["default"],e.connect=a["default"]},function(e,r){e.exports=t},function(t,e,r){"use strict";e.__esModule=!0;var o=r(1);e["default"]=o.PropTypes.shape({subscribe:o.PropTypes.func.isRequired,dispatch:o.PropTypes.func.isRequired,getState:o.PropTypes.func.isRequired})},function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0,e["default"]=void 0;var a=r(1),p=r(2),u=o(p),c=function(t){function e(r,o){n(this,e);var i=s(this,t.call(this,r,o));return i.store=r.store,i}return i(e,t),e.prototype.getChildContext=function(){return{store:this.store}},e.prototype.render=function(){var t=this.props.children;return a.Children.only(t)},e}(a.Component);e["default"]=c,c.propTypes={store:u["default"].isRequired,children:a.PropTypes.element.isRequired},c.childContextTypes={store:u["default"].isRequired}},function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){return t.displayName||t.name||"Component"}function p(t,e){return(0,w["default"])((0,m["default"])(t),"`%sToProps` must return an object. Instead received %s.",e?"mapDispatch":"mapState",t),t}function u(t,e,r){function o(t,e,r){var o=v(t,e,r);return(0,w["default"])((0,m["default"])(o),"`mergeProps` must return an object. Instead received %s.",o),o}var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},h=!!t,l=t||x,P=(0,m["default"])(e)?(0,b["default"])(e):e||C,v=r||T,g=v!==T,O=u.pure,_=void 0===O?!0:O,j=u.withRef,D=void 0===j?!1:j,R=M++;return function(t){var e=function(e){function r(t,o){n(this,r);var i=s(this,e.call(this,t,o));i.version=R,i.store=t.store||o.store,(0,w["default"])(i.store,'Could not find "store" in either the context or '+('props of "'+i.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+i.constructor.displayName+'".'));var a=i.store.getState();return i.state={storeState:a},i.clearCache(),i}return i(r,e),r.prototype.shouldComponentUpdate=function(){return!_||this.haveOwnPropsChanged||this.hasStoreStateChanged},r.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var r=t.getState(),o=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(r,e):this.finalMapStateToProps(r);return p(o)},r.prototype.configureFinalMapState=function(t,e){var r=l(t.getState(),e),o="function"==typeof r;return this.finalMapStateToProps=o?r:l,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,o?this.computeStateProps(t,e):p(r)},r.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var r=t.dispatch,o=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(r,e):this.finalMapDispatchToProps(r);return p(o,!0)},r.prototype.configureFinalMapDispatch=function(t,e){var r=P(t.dispatch,e),o="function"==typeof r;return this.finalMapDispatchToProps=o?r:P,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,o?this.computeDispatchProps(t,e):p(r,!0)},r.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,y["default"])(t,this.stateProps)?!1:(this.stateProps=t,!0)},r.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,y["default"])(t,this.dispatchProps)?!1:(this.dispatchProps=t,!0)},r.prototype.updateMergedPropsIfNeeded=function(){var t=o(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&g&&(0,y["default"])(t,this.mergedProps)?!1:(this.mergedProps=t,!0)},r.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},r.prototype.trySubscribe=function(){h&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},r.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},r.prototype.componentDidMount=function(){this.trySubscribe()},r.prototype.componentWillReceiveProps=function(t){_&&(0,y["default"])(t,this.props)||(this.haveOwnPropsChanged=!0)},r.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},r.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},r.prototype.handleChange=function(){if(this.unsubscribe){var t=this.state.storeState,e=this.store.getState();_&&t===e||(this.hasStoreStateChanged=!0,this.setState({storeState:e}))}},r.prototype.getWrappedInstance=function(){return(0,w["default"])(D,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},r.prototype.render=function(){var e=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,o=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var n=!0,s=!0;_&&o&&(n=r||e&&this.doStatePropsDependOnOwnProps,s=e&&this.doDispatchPropsDependOnOwnProps);var i=!1,a=!1;n&&(i=this.updateStatePropsIfNeeded()),s&&(a=this.updateDispatchPropsIfNeeded());var p=!0;return p=i||a||e?this.updateMergedPropsIfNeeded():!1,!p&&o?o:this.renderedElement=D?(0,f.createElement)(t,c({},this.mergedProps,{ref:"wrappedInstance"})):(0,f.createElement)(t,this.mergedProps)},r}(f.Component);return e.displayName="Connect("+a(t)+")",e.WrappedComponent=t,e.contextTypes={store:d["default"]},e.propTypes={store:d["default"]},(0,S["default"])(e,t)}}var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t};e.__esModule=!0,e["default"]=u;var f=r(1),h=r(2),d=o(h),l=r(5),y=o(l),P=r(6),b=o(P),v=r(11),m=o(v),g=r(7),S=o(g),O=r(8),w=o(O),x=function(t){return{}},C=function(t){return{dispatch:t}},T=function(t,e,r){return c({},r,t,e)},M=0},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(var n=Object.prototype.hasOwnProperty,s=0;r.length>s;s++)if(!n.call(e,r[s])||t[r[s]]!==e[r[s]])return!1;return!0}e.__esModule=!0,e["default"]=r},function(t,e,r){"use strict";function o(t){return function(e){return(0,n.bindActionCreators)(t,e)}}e.__esModule=!0,e["default"]=o;var n=r(12)},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};t.exports=function(t,e){for(var n=Object.getOwnPropertyNames(e),s=0;n.length>s;++s)r[n[s]]||o[n[s]]||(t[n[s]]=e[n[s]]);return t}},function(t,e,r){"use strict";var o=function(t,e,r,o,n,s,i,a){if(!t){var p;if(void 0===e)p=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,o,n,s,i,a],c=0;p=Error(e.replace(/%s/g,function(){return u[c++]})),p.name="Invariant Violation"}throw p.framesToPop=1,p}};t.exports=o},function(t,e){function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}t.exports=r},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e,r){function o(t){if(!s(t)||c.call(t)!=i||n(t))return!1;var e=a;if("function"==typeof t.constructor&&(e=f(t)),null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&p.call(r)==u}var n=r(9),s=r(10),i="[object Object]",a=Object.prototype,p=Function.prototype.toString,u=p.call(Object),c=a.toString,f=Object.getPrototypeOf;t.exports=o},function(t,r){t.exports=e}])}); |
src/svg-icons/av/subscriptions.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSubscriptions = (props) => (
<SvgIcon {...props}>
<path d="M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z"/>
</SvgIcon>
);
AvSubscriptions = pure(AvSubscriptions);
AvSubscriptions.displayName = 'AvSubscriptions';
AvSubscriptions.muiName = 'SvgIcon';
export default AvSubscriptions;
|
__tests__/components/MiniListLoading.js | swashcap/LookieHere | import 'react-native';
import flatten from 'flat';
import React from 'react';
import renderer from 'react-test-renderer';
import MiniListLoading from '../../src/components/MiniListLoading';
test('renders component', () => {
const tree = renderer.create(<MiniListLoading />);
expect(Object.values(flatten(tree.toJSON()))).toContain('Loading...');
});
|
frontend/src/routes/Maps/MapCard.js | metamaps/metamaps_gen002 | import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
import { find, values } from 'lodash'
const IN_CONVERSATION = 1 // shared with /realtime/reducer.js
const MapperList = (props) => {
return <ul className='mapperList'>
<li className='live'>LIVE</li>
{ props.mappers.map(mapper => <li key={ mapper.id } ><img src={ mapper.avatar } /><span>{ mapper.username }</span></li>) }
</ul>
}
class Menu extends Component {
constructor(props) {
super(props)
this.state = { open: false }
}
toggle = () => {
this.setState({ open: !this.state.open })
return true
}
render = () => {
const { currentUser, map, onStar, onRequest, onMapFollow } = this.props
const isFollowing = map.isFollowedBy(currentUser)
const style = { display: this.state.open ? 'block' : 'none' }
return <div className='dropdownMenu'>
<div className='menuToggle' onClick={ this.toggle }>
<div className='circle'></div>
<div className='circle'></div>
<div className='circle'></div>
</div>
<ul className='menuItems' style={ style }>
<li className='star' onClick={ () => { this.toggle() && onStar(map) }}>Star Map</li>
{ !map.authorizeToEdit(currentUser) && <li className='request' onClick={ () => { this.toggle() && onRequest(map) }}>Request Access</li> }
<li className='follow' onClick={ () => { this.toggle() && onMapFollow(map) }}>{isFollowing ? 'Unfollow' : 'Follow'}</li>
</ul>
</div>
}
}
Menu.propTypes = {
currentUser: PropTypes.object.isRequired,
map: PropTypes.object.isRequired,
onStar: PropTypes.func.isRequired,
onRequest: PropTypes.func.isRequired,
onMapFollow: PropTypes.func.isRequired
}
const Metadata = (props) => {
const { map } = props
return (<div>
<div className="metadataSection numTopics">
<div className="numTopicsIcon"></div>
{ map.get('topic_count') }<br/>
{ map.get('topic_count') === 1 ? 'topic' : 'topics' }
</div>
<div className="metadataSection numStars">
<div className="numStarsIcon"></div>
{ map.get('star_count') }<br/>
{ map.get('star_count') === 1 ? 'star' : 'stars' }
</div>
<div className="metadataSection numSynapses">
<div className="numSynapsesIcon"></div>
{ map.get('synapse_count') }<br/>
{ map.get('synapse_count') === 1 ? 'synapse' : 'synapses' }
</div>
<div className="metadataSection numContributors">
<div className="numContributorsIcon"></div>
{ map.get('contributor_count') }<br/>
{ map.get('contributor_count') === 1 ? 'contributor' : 'contributors' }
</div>
<div className="clearfloat"></div>
</div>)
}
const checkAndWrapInA = (shouldWrap, classString, mapId, element) => {
if (shouldWrap) return <Link className={ classString } to={ `/maps/${mapId}` } >{ element }</Link>
else return element
}
class MapCard extends Component {
render = () => {
const { map, mobile, juntoState, currentUser, onRequest, onStar, onMapFollow } = this.props
const hasMap = (juntoState.liveMaps[map.id] && values(juntoState.liveMaps[map.id]).length) || null
const realtimeMap = juntoState.liveMaps[map.id]
const hasConversation = hasMap && find(values(realtimeMap), v => v === IN_CONVERSATION)
const hasMapper = hasMap && !hasConversation
const mapperList = hasMap && Object.keys(realtimeMap).map(id => juntoState.connectedPeople[id])
const n = map.get('name')
const d = map.get('desc')
const maxNameLength = 32
const maxDescLength = 180
const truncatedName = n ? (n.length > maxNameLength ? n.substring(0, maxNameLength) + '...' : n) : ''
const truncatedDesc = d ? (d.length > maxDescLength ? d.substring(0, maxDescLength) + '...' : d) : ''
const editPermission = map.authorizeToEdit(currentUser) ? 'canEdit' : 'cannotEdit'
return (
<div className="map" id={ map.id }>
{ checkAndWrapInA(mobile, '', map.id,
<div className={ 'permission ' + editPermission }>
<div className='mapCard'>
<div className='mainContent'>
{ !mobile && <div className='mapScreenshot'>
<img src={ map.get('screenshot_url') } />
</div> }
<div className='title' title={ map.get('name') }>
<div className='innerTitle'>{ truncatedName }</div>
</div>
{ mobile && hasMapper && <div className='mobileHasMapper'><MapperList mappers={ mapperList } /></div> }
{ mobile && hasConversation && <div className='mobileHasConversation'><MapperList mappers={ mapperList } /></div> }
{ mobile && d && <div className="desc">{ d }</div> }
{ mobile && <div className='mobileMetadata'><Metadata map={ map } /></div> }
<div className={`creatorAndPerm ${map.authorizeToEdit(currentUser) ? '' : 'cardHasViewOnly'}`}>
<img className='creatorImage' src={ map.get('user_image') } />
<span className='creatorName'>{ map.get('user_name') }</span>
{ !map.authorizeToEdit(currentUser) && <div className='cardViewOnly'>View Only</div> }
</div>
</div>
{ !mobile && checkAndWrapInA(true, 'mapMetadata', map.id,
<div>
<Metadata map={ map } />
<div className="scroll">
<div className="desc">
{ truncatedDesc }
<div className="clearfloat"></div>
</div>
</div>
</div>) }
{ !mobile && hasMapper && <div className='mapHasMapper'><MapperList mappers={ mapperList } /></div> }
{ !mobile && hasConversation && <div className='mapHasConversation'><MapperList mappers={ mapperList } /></div> }
{ !mobile && currentUser && <Menu currentUser={ currentUser } map={ map } onStar= { onStar } onRequest={ onRequest } onMapFollow={ onMapFollow } /> }
</div>
</div>) }
</div>
)
}
}
MapCard.propTypes = {
map: PropTypes.object.isRequired,
mobile: PropTypes.bool.isRequired,
juntoState: PropTypes.object,
currentUser: PropTypes.object,
onStar: PropTypes.func.isRequired,
onRequest: PropTypes.func.isRequired,
onMapFollow: PropTypes.func.isRequired
}
export default MapCard
|
src/parser/rogue/assassination/modules/talents/Subterfuge.js | sMteX/WoWAnalyzer | import React from 'react';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import STATISTIC_ORDER from 'interface/others/STATISTIC_ORDER';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import GarroteSnapshot from '../features/GarroteSnapshot';
import StealthCasts from './StealthCasts';
class Subterfuge extends StealthCasts {
static dependencies = {
garroteSnapshot: GarroteSnapshot,
};
constructor(...args) {
super(...args);
this.active = this.selectedCombatant.hasTalent(SPELLS.SUBTERFUGE_TALENT.id);
}
get bonusDamage() {
return this.garroteSnapshot.bonusDamage;
}
get stealthsWithAtleastOneGarrote() {
let stealthsWithGarrote = 0;
this.stealthSequences.forEach(sequence => {
const firstGarroteCast = sequence.find(e => e.ability.guid === SPELLS.GARROTE.id);
if (firstGarroteCast) {
stealthsWithGarrote += 1;
}
});
return stealthsWithGarrote;
}
get stealthCasts() {
return this.stealthSequences.length;
}
get percentGoodStealthCasts() {
return (this.stealthsWithAtleastOneGarrote / this.stealthCasts) || 0;
}
get suggestionThresholds() {
return {
actual: this.percentGoodStealthCasts,
isLessThan: {
minor: 0.95,
average: 0.9,
major: 0.8,
},
style: 'percentage',
};
}
suggestions(when) {
when(this.suggestionThresholds).addSuggestion((suggest, actual, recommended) => {
return suggest(<>Your failed to cast atleast one <SpellLink id={SPELLS.GARROTE.id} /> during <SpellLink id={SPELLS.SUBTERFUGE_BUFF.id} /> {this.stealthCasts - this.stealthsWithAtleastOneGarrote} time(s). Make sure to prioritize snapshotting <SpellLink id={SPELLS.GARROTE.id} /> during <SpellLink id={SPELLS.SUBTERFUGE_BUFF.id} />.</>)
.icon(SPELLS.GARROTE.icon)
.actual(`${formatPercentage(actual)}% of Subterfuges with atleast one Garrote cast`)
.recommended(`>${formatPercentage(recommended)}% is recommended`);
});
}
statistic() {
return (
<TalentStatisticBox
talent={SPELLS.SUBTERFUGE_TALENT.id}
position={STATISTIC_ORDER.OPTIONAL(2)}
value={<ItemDamageDone amount={this.bonusDamage} />}
tooltip={`You casted atleast one Garrote during Subterfuge ${this.stealthsWithAtleastOneGarrote} times out of ${this.stealthCasts}.`}
/>
);
}
}
export default Subterfuge;
|
docs/app/Examples/elements/Divider/index.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import Types from './Types'
import Variations from './Variations'
const DividerExamples = () => (
<div>
<Types />
<Variations />
</div>
)
export default DividerExamples
|
src/index.js | soyguijarro/magic-web | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import './styles/index.css';
const router = (
<Router history={browserHistory}>
{routes}
</Router>
);
ReactDOM.render(
router,
document.getElementById('root')
);
|
node_modules/react-router/modules/RouterContext.js | FrancoCotter/ReactWeatherApp | import invariant from 'invariant'
import React from 'react'
import deprecateObjectProperties from './deprecateObjectProperties'
import getRouteParams from './getRouteParams'
import { isReactChildren } from './RouteUtils'
import warning from './routerWarning'
const { array, func, object } = React.PropTypes
/**
* A <RouterContext> renders the component tree for a given router state
* and sets the history object and the current location in context.
*/
const RouterContext = React.createClass({
propTypes: {
history: object,
router: object.isRequired,
location: object.isRequired,
routes: array.isRequired,
params: object.isRequired,
components: array.isRequired,
createElement: func.isRequired
},
getDefaultProps() {
return {
createElement: React.createElement
}
},
childContextTypes: {
history: object,
location: object.isRequired,
router: object.isRequired
},
getChildContext() {
let { router, history, location } = this.props
if (!router) {
warning(false, '`<RouterContext>` expects a `router` rather than a `history`')
router = {
...history,
setRouteLeaveHook: history.listenBeforeLeavingRoute
}
delete router.listenBeforeLeavingRoute
}
if (__DEV__) {
location = deprecateObjectProperties(location, '`context.location` is deprecated, please use a route component\'s `props.location` instead. http://tiny.cc/router-accessinglocation')
}
return { history, location, router }
},
createElement(component, props) {
return component == null ? null : this.props.createElement(component, props)
},
render() {
const { history, location, routes, params, components } = this.props
let element = null
if (components) {
element = components.reduceRight((element, components, index) => {
if (components == null)
return element // Don't create new children; use the grandchildren.
const route = routes[index]
const routeParams = getRouteParams(route, params)
const props = {
history,
location,
params,
route,
routeParams,
routes
}
if (isReactChildren(element)) {
props.children = element
} else if (element) {
for (let prop in element)
if (element.hasOwnProperty(prop))
props[prop] = element[prop]
}
if (typeof components === 'object') {
const elements = {}
for (const key in components) {
if (components.hasOwnProperty(key)) {
// Pass through the key as a prop to createElement to allow
// custom createElement functions to know which named component
// they're rendering, for e.g. matching up to fetched data.
elements[key] = this.createElement(components[key], {
key, ...props
})
}
}
return elements
}
return this.createElement(components, props)
}, element)
}
invariant(
element === null || element === false || React.isValidElement(element),
'The root route must render a single element'
)
return element
}
})
export default RouterContext
|
examples/todos/components/Footer.js | Aweary/redux | import React from 'react'
import FilterLink from '../containers/FilterLink'
const Footer = () => (
<p>
Show:
{" "}
<FilterLink filter="SHOW_ALL">
All
</FilterLink>
{", "}
<FilterLink filter="SHOW_ACTIVE">
Active
</FilterLink>
{", "}
<FilterLink filter="SHOW_COMPLETED">
Completed
</FilterLink>
</p>
)
export default Footer
|
src/components/FooterBar/UserFooterContent.js | u-wave/web | import cx from 'clsx';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import useCurrentUser from '../../hooks/useCurrentUser';
import { skipSelf } from '../../actions/BoothActionCreators';
import { skipCurrentDJ as modSkipCurrentDJ } from '../../actions/ModerationActionCreators';
import { togglePlaylistManager, toggleSettings } from '../../actions/OverlayActionCreators';
import { joinWaitlist, leaveWaitlist } from '../../actions/WaitlistActionCreators';
import { openFavoriteMenu, doUpvote, doDownvote } from '../../actions/VoteActionCreators';
import {
djSelector,
isCurrentDJSelector,
canSkipSelector,
endTimeSelector,
} from '../../selectors/boothSelectors';
import {
activePlaylistSelector,
nextMediaSelector,
} from '../../selectors/playlistSelectors';
import { currentVoteStatsSelector } from '../../selectors/voteSelectors';
import {
baseEtaSelector,
userInWaitlistSelector,
isLockedSelector,
} from '../../selectors/waitlistSelectors';
import NextMedia from './NextMedia';
import UserInfo from './UserInfo';
import SkipButton from './SkipButton';
import WaitlistButton from './WaitlistButton';
import ResponseBar from './Responses/Bar';
const {
useCallback,
} = React;
function UserFooterContent() {
const currentUser = useCurrentUser();
const baseEta = useSelector(baseEtaSelector);
const mediaEndTime = useSelector(endTimeSelector);
const playlist = useSelector(activePlaylistSelector);
const nextMedia = useSelector(nextMediaSelector);
const userInWaitlist = useSelector(userInWaitlistSelector);
const userIsDJ = useSelector(isCurrentDJSelector);
const currentDJ = useSelector(djSelector);
const showSkip = useSelector(canSkipSelector);
const waitlistIsLocked = useSelector(isLockedSelector);
const voteStats = useSelector(currentVoteStatsSelector);
const dispatch = useDispatch();
const handleTogglePlaylistManager = useCallback(() => {
dispatch(togglePlaylistManager());
}, [dispatch]);
const handleToggleSettings = useCallback(() => {
dispatch(toggleSettings());
}, [dispatch]);
const handleFavorite = useCallback((position) => {
dispatch(openFavoriteMenu(position));
}, [dispatch]);
const handleUpvote = useCallback(() => {
dispatch(doUpvote());
}, [dispatch]);
const handleDownvote = useCallback(() => {
dispatch(doDownvote());
}, [dispatch]);
const handleSkipTurn = useCallback((reason) => {
if (!userIsDJ) {
return dispatch(modSkipCurrentDJ(reason));
}
return dispatch(skipSelf({ remove: false }));
}, [userIsDJ, dispatch]);
const handleJoinWaitlist = useCallback(() => {
dispatch(joinWaitlist(currentUser)).catch(() => {
// error is already reported
});
}, [dispatch, currentUser]);
const handleLeaveWaitlist = useCallback(() => {
if (userIsDJ) {
return dispatch(skipSelf({ remove: true }));
}
return dispatch(leaveWaitlist(currentUser));
}, [userIsDJ, dispatch, currentUser]);
const canVote = !userIsDJ && !!currentDJ;
return (
<>
<div className="FooterBar-user">
<UserInfo
user={currentUser}
onClick={handleToggleSettings}
/>
</div>
<button
type="button"
className="FooterBar-next"
onClick={handleTogglePlaylistManager}
>
<NextMedia
playlist={playlist}
nextMedia={nextMedia}
userInWaitlist={userInWaitlist}
userIsDJ={userIsDJ}
baseEta={baseEta}
mediaEndTime={mediaEndTime}
/>
</button>
<div
className={cx(
'FooterBar-responses',
!showSkip && 'FooterBar-responses--spaced',
)}
>
<ResponseBar
disabled={!canVote}
onFavorite={handleFavorite}
onUpvote={handleUpvote}
onDownvote={handleDownvote}
{...voteStats}
/>
</div>
{showSkip && (
<div className="FooterBar-skip">
<SkipButton
userIsDJ={userIsDJ}
currentDJ={currentDJ}
onSkip={handleSkipTurn}
/>
</div>
)}
<div className="FooterBar-join">
<WaitlistButton
isLocked={waitlistIsLocked}
userInWaitlist={userInWaitlist}
onClick={userInWaitlist ? handleLeaveWaitlist : handleJoinWaitlist}
/>
</div>
</>
);
}
export default UserFooterContent;
|
ajax/libs/js-data/1.5.12/js-data-debug.js | mscharl/cdnjs | /*!
* js-data
* @version 1.5.12 - Homepage <http://www.js-data.io/>
* @author Jason Dobry <jason.dobry@gmail.com>
* @copyright (c) 2014-2015 Jason Dobry
* @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>
*
* @overview Robust framework-agnostic data store.
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("bluebird"), (function webpackLoadOptionalExternalModule() { try { return require("js-data-schema"); } catch(e) {} }()));
else if(typeof define === 'function' && define.amd)
define(["bluebird", "js-data-schema"], factory);
else if(typeof exports === 'object')
exports["JSData"] = factory(require("bluebird"), (function webpackLoadOptionalExternalModule() { try { return require("js-data-schema"); } catch(e) {} }()));
else
root["JSData"] = factory(root["bluebird"], root["Schemator"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var DSUtils = _interopRequire(__webpack_require__(1));
var DSErrors = _interopRequire(__webpack_require__(2));
var DS = _interopRequire(__webpack_require__(3));
module.exports = {
DS: DS,
createStore: function createStore(options) {
return new DS(options);
},
DSUtils: DSUtils,
DSErrors: DSErrors,
version: {
full: "1.5.12",
major: parseInt("1", 10),
minor: parseInt("5", 10),
patch: parseInt("12", 10),
alpha: true ? "false" : false,
beta: true ? "false" : false
}
};
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
/* jshint eqeqeq:false */
var DSErrors = _interopRequire(__webpack_require__(2));
var forEach = _interopRequire(__webpack_require__(10));
var slice = _interopRequire(__webpack_require__(11));
var forOwn = _interopRequire(__webpack_require__(15));
var contains = _interopRequire(__webpack_require__(12));
var deepMixIn = _interopRequire(__webpack_require__(16));
var pascalCase = _interopRequire(__webpack_require__(20));
var remove = _interopRequire(__webpack_require__(13));
var pick = _interopRequire(__webpack_require__(17));
var sort = _interopRequire(__webpack_require__(14));
var upperCase = _interopRequire(__webpack_require__(21));
var observe = _interopRequire(__webpack_require__(6));
var es6Promise = _interopRequire(__webpack_require__(9));
var BinaryHeap = _interopRequire(__webpack_require__(22));
var w = undefined,
_Promise = undefined;
var DSUtils = undefined;
var objectProto = Object.prototype;
var toString = objectProto.toString;
es6Promise.polyfill();
var isArray = Array.isArray || function isArray(value) {
return toString.call(value) == "[object Array]" || false;
};
var isRegExp = function (value) {
return toString.call(value) == "[object RegExp]" || false;
};
// adapted from lodash.isBoolean
var isBoolean = function (value) {
return value === true || value === false || value && typeof value == "object" && toString.call(value) == "[object Boolean]" || false;
};
// adapted from lodash.isString
var isString = function (value) {
return typeof value == "string" || value && typeof value == "object" && toString.call(value) == "[object String]" || false;
};
var isObject = function (value) {
return toString.call(value) == "[object Object]" || false;
};
// adapted from lodash.isDate
var isDate = function (value) {
return value && typeof value == "object" && toString.call(value) == "[object Date]" || false;
};
// adapted from lodash.isNumber
var isNumber = function (value) {
var type = typeof value;
return type == "number" || value && type == "object" && toString.call(value) == "[object Number]" || false;
};
// adapted from lodash.isFunction
var isFunction = function (value) {
return typeof value == "function" || value && toString.call(value) === "[object Function]" || false;
};
// shorthand argument checking functions, using these shaves 1.18 kb off of the minified build
var isStringOrNumber = function (value) {
return isString(value) || isNumber(value);
};
var isStringOrNumberErr = function (field) {
return new DSErrors.IA("\"" + field + "\" must be a string or a number!");
};
var isObjectErr = function (field) {
return new DSErrors.IA("\"" + field + "\" must be an object!");
};
var isArrayErr = function (field) {
return new DSErrors.IA("\"" + field + "\" must be an array!");
};
// adapted from mout.isEmpty
var isEmpty = function (val) {
if (val == null) {
// jshint ignore:line
// typeof null == 'object' so we check it first
return true;
} else if (typeof val === "string" || isArray(val)) {
return !val.length;
} else if (typeof val === "object") {
var _ret = (function () {
var result = true;
forOwn(val, function () {
result = false;
return false; // break loop
});
return {
v: result
};
})();
if (typeof _ret === "object") return _ret.v;
} else {
return true;
}
};
var intersection = function (array1, array2) {
if (!array1 || !array2) {
return [];
}
var result = [];
var item = undefined;
for (var i = 0, _length = array1.length; i < _length; i++) {
item = array1[i];
if (DSUtils.contains(result, item)) {
continue;
}
if (DSUtils.contains(array2, item)) {
result.push(item);
}
}
return result;
};
var filter = function (array, cb, thisObj) {
var results = [];
forEach(array, function (value, key, arr) {
if (cb(value, key, arr)) {
results.push(value);
}
}, thisObj);
return results;
};
function finallyPolyfill(cb) {
var constructor = this.constructor;
return this.then(function (value) {
return constructor.resolve(cb()).then(function () {
return value;
});
}, function (reason) {
return constructor.resolve(cb()).then(function () {
throw reason;
});
});
}
try {
w = window;
if (!w.Promise.prototype["finally"]) {
w.Promise.prototype["finally"] = finallyPolyfill;
}
_Promise = w.Promise;
w = {};
} catch (e) {
w = null;
_Promise = __webpack_require__(4);
}
function Events(target) {
var events = {};
target = target || this;
target.on = function (type, func, ctx) {
events[type] = events[type] || [];
events[type].push({
f: func,
c: ctx
});
};
target.off = function (type, func) {
var listeners = events[type];
if (!listeners) {
events = {};
} else if (func) {
for (var i = 0; i < listeners.length; i++) {
if (listeners[i] === func) {
listeners.splice(i, 1);
break;
}
}
} else {
listeners.splice(0, listeners.length);
}
};
target.emit = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var listeners = events[args.shift()] || [];
if (listeners) {
for (var i = 0; i < listeners.length; i++) {
listeners[i].f.apply(listeners[i].c, args);
}
}
};
}
var toPromisify = ["beforeValidate", "validate", "afterValidate", "beforeCreate", "afterCreate", "beforeUpdate", "afterUpdate", "beforeDestroy", "afterDestroy"];
var isBlacklisted = function (prop, bl) {
var i = undefined;
if (!bl || !bl.length) {
return false;
}
for (i = 0; i < bl.length; i++) {
if (bl[i] === prop) {
return true;
}
}
return false;
};
// adapted from angular.copy
var copy = function (source, destination, stackSource, stackDest, blacklist) {
if (!destination) {
destination = source;
if (source) {
if (isArray(source)) {
destination = copy(source, [], stackSource, stackDest, blacklist);
} else if (isDate(source)) {
destination = new Date(source.getTime());
} else if (isRegExp(source)) {
destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
destination.lastIndex = source.lastIndex;
} else if (isObject(source)) {
destination = copy(source, Object.create(Object.getPrototypeOf(source)), stackSource, stackDest, blacklist);
}
}
} else {
if (source === destination) {
throw new Error("Cannot copy! Source and destination are identical.");
}
stackSource = stackSource || [];
stackDest = stackDest || [];
if (isObject(source)) {
var index = stackSource.indexOf(source);
if (index !== -1) {
return stackDest[index];
}
stackSource.push(source);
stackDest.push(destination);
}
var result = undefined;
if (isArray(source)) {
var i = undefined;
destination.length = 0;
for (i = 0; i < source.length; i++) {
result = copy(source[i], null, stackSource, stackDest, blacklist);
if (isObject(source[i])) {
stackSource.push(source[i]);
stackDest.push(result);
}
destination.push(result);
}
} else {
if (isArray(destination)) {
destination.length = 0;
} else {
forEach(destination, function (value, key) {
delete destination[key];
});
}
for (var key in source) {
if (source.hasOwnProperty(key)) {
if (isBlacklisted(key, blacklist)) {
continue;
}
result = copy(source[key], null, stackSource, stackDest, blacklist);
if (isObject(source[key])) {
stackSource.push(source[key]);
stackDest.push(result);
}
destination[key] = result;
}
}
}
}
return destination;
};
// adapted from angular.equals
var equals = function (o1, o2) {
if (o1 === o2) {
return true;
}
if (o1 === null || o2 === null) {
return false;
}
if (o1 !== o1 && o2 !== o2) {
return true;
} // NaN === NaN
var t1 = typeof o1,
t2 = typeof o2,
length,
key,
keySet;
if (t1 == t2) {
if (t1 == "object") {
if (isArray(o1)) {
if (!isArray(o2)) {
return false;
}
if ((length = o1.length) == o2.length) {
// jshint ignore:line
for (key = 0; key < length; key++) {
if (!equals(o1[key], o2[key])) {
return false;
}
}
return true;
}
} else if (isDate(o1)) {
if (!isDate(o2)) {
return false;
}
return equals(o1.getTime(), o2.getTime());
} else if (isRegExp(o1) && isRegExp(o2)) {
return o1.toString() == o2.toString();
} else {
if (isArray(o2)) {
return false;
}
keySet = {};
for (key in o1) {
if (key.charAt(0) === "$" || isFunction(o1[key])) {
continue;
}
if (!equals(o1[key], o2[key])) {
return false;
}
keySet[key] = true;
}
for (key in o2) {
if (!keySet.hasOwnProperty(key) && key.charAt(0) !== "$" && o2[key] !== undefined && !isFunction(o2[key])) {
return false;
}
}
return true;
}
}
}
return false;
};
var resolveId = function (definition, idOrInstance) {
if (isString(idOrInstance) || isNumber(idOrInstance)) {
return idOrInstance;
} else if (idOrInstance && definition) {
return idOrInstance[definition.idAttribute] || idOrInstance;
} else {
return idOrInstance;
}
};
var resolveItem = function (resource, idOrInstance) {
if (resource && (isString(idOrInstance) || isNumber(idOrInstance))) {
return resource.index[idOrInstance] || idOrInstance;
} else {
return idOrInstance;
}
};
var isValidString = function (val) {
return val != null && val !== ""; // jshint ignore:line
};
var join = function (items, separator) {
separator = separator || "";
return filter(items, isValidString).join(separator);
};
var makePath = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var result = join(args, "/");
return result.replace(/([^:\/]|^)\/{2,}/g, "$1/");
};
DSUtils = {
// Options that inherit from defaults
_: function _(parent, options) {
var _this = this;
options = options || {};
if (options && options.constructor === parent.constructor) {
return options;
} else if (!isObject(options)) {
throw new DSErrors.IA("\"options\" must be an object!");
}
forEach(toPromisify, function (name) {
if (typeof options[name] === "function" && options[name].toString().indexOf("for (var _len = arg") === -1) {
options[name] = _this.promisify(options[name]);
}
});
var O = function Options(attrs) {
var self = this;
forOwn(attrs, function (value, key) {
self[key] = value;
});
};
O.prototype = parent;
O.prototype.orig = function () {
var orig = {};
forOwn(this, function (value, key) {
orig[key] = value;
});
return orig;
};
return new O(options);
},
_n: isNumber,
_s: isString,
_sn: isStringOrNumber,
_snErr: isStringOrNumberErr,
_o: isObject,
_oErr: isObjectErr,
_a: isArray,
_aErr: isArrayErr,
compute: function compute(fn, field) {
var _this = this;
var args = [];
forEach(fn.deps, function (dep) {
args.push(_this[dep]);
});
// compute property
_this[field] = fn[fn.length - 1].apply(_this, args);
},
contains: contains,
copy: copy,
deepMixIn: deepMixIn,
diffObjectFromOldObject: observe.diffObjectFromOldObject,
BinaryHeap: BinaryHeap,
equals: equals,
Events: Events,
filter: filter,
forEach: forEach,
forOwn: forOwn,
fromJson: function fromJson(json) {
return isString(json) ? JSON.parse(json) : json;
},
get: __webpack_require__(18),
intersection: intersection,
isArray: isArray,
isBoolean: isBoolean,
isDate: isDate,
isEmpty: isEmpty,
isFunction: isFunction,
isObject: isObject,
isNumber: isNumber,
isRegExp: isRegExp,
isString: isString,
makePath: makePath,
observe: observe,
pascalCase: pascalCase,
pick: pick,
Promise: _Promise,
promisify: function promisify(fn, target) {
var _this = this;
if (!fn) {
return;
} else if (typeof fn !== "function") {
throw new Error("Can only promisify functions!");
}
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return new _this.Promise(function (resolve, reject) {
args.push(function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
try {
var promise = fn.apply(target || this, args);
if (promise && promise.then) {
promise.then(resolve, reject);
}
} catch (err) {
reject(err);
}
});
};
},
remove: remove,
set: __webpack_require__(19),
slice: slice,
sort: sort,
toJson: JSON.stringify,
updateTimestamp: function updateTimestamp(timestamp) {
var newTimestamp = typeof Date.now === "function" ? Date.now() : new Date().getTime();
if (timestamp && newTimestamp <= timestamp) {
return timestamp + 1;
} else {
return newTimestamp;
}
},
upperCase: upperCase,
removeCircular: function removeCircular(object) {
var objects = [];
return (function rmCirc(value) {
var i = undefined;
var nu = undefined;
if (typeof value === "object" && value !== null && !(value instanceof Boolean) && !(value instanceof Date) && !(value instanceof Number) && !(value instanceof RegExp) && !(value instanceof String)) {
for (i = 0; i < objects.length; i += 1) {
if (objects[i] === value) {
return undefined;
}
}
objects.push(value);
if (DSUtils.isArray(value)) {
nu = [];
for (i = 0; i < value.length; i += 1) {
nu[i] = rmCirc(value[i]);
}
} else {
nu = {};
forOwn(value, function (v, k) {
nu[k] = rmCirc(value[k]);
});
}
return nu;
}
return value;
})(object);
},
resolveItem: resolveItem,
resolveId: resolveId,
w: w
};
module.exports = DSUtils;
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
var IllegalArgumentError = (function (_Error) {
function IllegalArgumentError(message) {
_classCallCheck(this, IllegalArgumentError);
_get(Object.getPrototypeOf(IllegalArgumentError.prototype), "constructor", this).call(this, this);
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, this.constructor);
}
this.type = this.constructor.name;
this.message = message || "Illegal Argument!";
}
_inherits(IllegalArgumentError, _Error);
return IllegalArgumentError;
})(Error);
var RuntimeError = (function (_Error2) {
function RuntimeError(message) {
_classCallCheck(this, RuntimeError);
_get(Object.getPrototypeOf(RuntimeError.prototype), "constructor", this).call(this, this);
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, this.constructor);
}
this.type = this.constructor.name;
this.message = message || "RuntimeError Error!";
}
_inherits(RuntimeError, _Error2);
return RuntimeError;
})(Error);
var NonexistentResourceError = (function (_Error3) {
function NonexistentResourceError(resourceName) {
_classCallCheck(this, NonexistentResourceError);
_get(Object.getPrototypeOf(NonexistentResourceError.prototype), "constructor", this).call(this, this);
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, this.constructor);
}
this.type = this.constructor.name;
this.message = "" + resourceName + " is not a registered resource!";
}
_inherits(NonexistentResourceError, _Error3);
return NonexistentResourceError;
})(Error);
module.exports = {
IllegalArgumentError: IllegalArgumentError,
IA: IllegalArgumentError,
RuntimeError: RuntimeError,
R: RuntimeError,
NonexistentResourceError: NonexistentResourceError,
NER: NonexistentResourceError
};
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
/* jshint eqeqeq:false */
var DSUtils = _interopRequire(__webpack_require__(1));
var DSErrors = _interopRequire(__webpack_require__(2));
var syncMethods = _interopRequire(__webpack_require__(7));
var asyncMethods = _interopRequire(__webpack_require__(8));
var Schemator = undefined;
function lifecycleNoopCb(resource, attrs, cb) {
cb(null, attrs);
}
function lifecycleNoop(resource, attrs) {
return attrs;
}
function compare(_x, _x2, _x3, _x4) {
var _again = true;
_function: while (_again) {
_again = false;
var orderBy = _x,
index = _x2,
a = _x3,
b = _x4;
def = cA = cB = undefined;
var def = orderBy[index];
var cA = DSUtils.get(a, def[0]),
cB = DSUtils.get(b, def[0]);
if (DSUtils._s(cA)) {
cA = DSUtils.upperCase(cA);
}
if (DSUtils._s(cB)) {
cB = DSUtils.upperCase(cB);
}
if (def[1] === "DESC") {
if (cB < cA) {
return -1;
} else if (cB > cA) {
return 1;
} else {
if (index < orderBy.length - 1) {
_x = orderBy;
_x2 = index + 1;
_x3 = a;
_x4 = b;
_again = true;
continue _function;
} else {
return 0;
}
}
} else {
if (cA < cB) {
return -1;
} else if (cA > cB) {
return 1;
} else {
if (index < orderBy.length - 1) {
_x = orderBy;
_x2 = index + 1;
_x3 = a;
_x4 = b;
_again = true;
continue _function;
} else {
return 0;
}
}
}
}
}
var Defaults = (function () {
function Defaults() {
_classCallCheck(this, Defaults);
}
_createClass(Defaults, {
errorFn: {
value: function errorFn(a, b) {
if (this.error && typeof this.error === "function") {
try {
if (typeof a === "string") {
throw new Error(a);
} else {
throw a;
}
} catch (err) {
a = err;
}
this.error(this.name || null, a || null, b || null);
}
}
}
});
return Defaults;
})();
var defaultsPrototype = Defaults.prototype;
defaultsPrototype.actions = {};
defaultsPrototype.afterCreate = lifecycleNoopCb;
defaultsPrototype.afterCreateInstance = lifecycleNoop;
defaultsPrototype.afterDestroy = lifecycleNoopCb;
defaultsPrototype.afterEject = lifecycleNoop;
defaultsPrototype.afterInject = lifecycleNoop;
defaultsPrototype.afterReap = lifecycleNoop;
defaultsPrototype.afterUpdate = lifecycleNoopCb;
defaultsPrototype.afterValidate = lifecycleNoopCb;
defaultsPrototype.allowSimpleWhere = true;
defaultsPrototype.basePath = "";
defaultsPrototype.beforeCreate = lifecycleNoopCb;
defaultsPrototype.beforeCreateInstance = lifecycleNoop;
defaultsPrototype.beforeDestroy = lifecycleNoopCb;
defaultsPrototype.beforeEject = lifecycleNoop;
defaultsPrototype.beforeInject = lifecycleNoop;
defaultsPrototype.beforeReap = lifecycleNoop;
defaultsPrototype.beforeUpdate = lifecycleNoopCb;
defaultsPrototype.beforeValidate = lifecycleNoopCb;
defaultsPrototype.bypassCache = false;
defaultsPrototype.cacheResponse = !!DSUtils.w;
defaultsPrototype.defaultAdapter = "http";
defaultsPrototype.debug = true;
defaultsPrototype.eagerEject = false;
// TODO: Implement eagerInject in DS#create
defaultsPrototype.eagerInject = false;
defaultsPrototype.endpoint = "";
defaultsPrototype.error = console ? function (a, b, c) {
return console[typeof console.error === "function" ? "error" : "log"](a, b, c);
} : false;
defaultsPrototype.fallbackAdapters = ["http"];
defaultsPrototype.findBelongsTo = true;
defaultsPrototype.findHasOne = true;
defaultsPrototype.findHasMany = true;
defaultsPrototype.findInverseLinks = true;
defaultsPrototype.idAttribute = "id";
defaultsPrototype.ignoredChanges = [/\$/];
defaultsPrototype.ignoreMissing = false;
defaultsPrototype.keepChangeHistory = false;
defaultsPrototype.loadFromServer = false;
defaultsPrototype.log = console ? function (a, b, c, d, e) {
return console[typeof console.info === "function" ? "info" : "log"](a, b, c, d, e);
} : false;
defaultsPrototype.logFn = function (a, b, c, d) {
var _this = this;
if (_this.debug && _this.log && typeof _this.log === "function") {
_this.log(_this.name || null, a || null, b || null, c || null, d || null);
}
};
defaultsPrototype.maxAge = false;
defaultsPrototype.notify = !!DSUtils.w;
defaultsPrototype.reapAction = !!DSUtils.w ? "inject" : "none";
defaultsPrototype.reapInterval = !!DSUtils.w ? 30000 : false;
defaultsPrototype.resetHistoryOnInject = true;
defaultsPrototype.strategy = "single";
defaultsPrototype.upsert = !!DSUtils.w;
defaultsPrototype.useClass = true;
defaultsPrototype.useFilter = false;
defaultsPrototype.validate = lifecycleNoopCb;
defaultsPrototype.defaultFilter = function (collection, resourceName, params, options) {
var filtered = collection;
var where = null;
var reserved = {
skip: "",
offset: "",
where: "",
limit: "",
orderBy: "",
sort: ""
};
params = params || {};
options = options || {};
if (DSUtils._o(params.where)) {
where = params.where;
} else {
where = {};
}
if (options.allowSimpleWhere) {
DSUtils.forOwn(params, function (value, key) {
if (!(key in reserved) && !(key in where)) {
where[key] = {
"==": value
};
}
});
}
if (DSUtils.isEmpty(where)) {
where = null;
}
if (where) {
filtered = DSUtils.filter(filtered, function (attrs) {
var first = true;
var keep = true;
DSUtils.forOwn(where, function (clause, field) {
if (DSUtils._s(clause)) {
clause = {
"===": clause
};
} else if (DSUtils._n(clause) || DSUtils.isBoolean(clause)) {
clause = {
"==": clause
};
}
if (DSUtils._o(clause)) {
DSUtils.forOwn(clause, function (term, op) {
var expr = undefined;
var isOr = op[0] === "|";
var val = attrs[field];
op = isOr ? op.substr(1) : op;
if (op === "==") {
expr = val == term;
} else if (op === "===") {
expr = val === term;
} else if (op === "!=") {
expr = val != term;
} else if (op === "!==") {
expr = val !== term;
} else if (op === ">") {
expr = val > term;
} else if (op === ">=") {
expr = val >= term;
} else if (op === "<") {
expr = val < term;
} else if (op === "<=") {
expr = val <= term;
} else if (op === "isectEmpty") {
expr = !DSUtils.intersection(val || [], term || []).length;
} else if (op === "isectNotEmpty") {
expr = DSUtils.intersection(val || [], term || []).length;
} else if (op === "in") {
if (DSUtils._s(term)) {
expr = term.indexOf(val) !== -1;
} else {
expr = DSUtils.contains(term, val);
}
} else if (op === "notIn") {
if (DSUtils._s(term)) {
expr = term.indexOf(val) === -1;
} else {
expr = !DSUtils.contains(term, val);
}
} else if (op === "contains") {
if (DSUtils._s(val)) {
expr = val.indexOf(term) !== -1;
} else {
expr = DSUtils.contains(val, term);
}
} else if (op === "notContains") {
if (DSUtils._s(val)) {
expr = val.indexOf(term) === -1;
} else {
expr = !DSUtils.contains(val, term);
}
}
if (expr !== undefined) {
keep = first ? expr : isOr ? keep || expr : keep && expr;
}
first = false;
});
}
});
return keep;
});
}
var orderBy = null;
if (DSUtils._s(params.orderBy)) {
orderBy = [[params.orderBy, "ASC"]];
} else if (DSUtils._a(params.orderBy)) {
orderBy = params.orderBy;
}
if (!orderBy && DSUtils._s(params.sort)) {
orderBy = [[params.sort, "ASC"]];
} else if (!orderBy && DSUtils._a(params.sort)) {
orderBy = params.sort;
}
// Apply 'orderBy'
if (orderBy) {
(function () {
var index = 0;
DSUtils.forEach(orderBy, function (def, i) {
if (DSUtils._s(def)) {
orderBy[i] = [def, "ASC"];
} else if (!DSUtils._a(def)) {
throw new DSErrors.IA("DS.filter(\"" + resourceName + "\"[, params][, options]): " + DSUtils.toJson(def) + ": Must be a string or an array!", {
params: {
"orderBy[i]": {
actual: typeof def,
expected: "string|array"
}
}
});
}
});
filtered = DSUtils.sort(filtered, function (a, b) {
return compare(orderBy, index, a, b);
});
})();
}
var limit = DSUtils._n(params.limit) ? params.limit : null;
var skip = null;
if (DSUtils._n(params.skip)) {
skip = params.skip;
} else if (DSUtils._n(params.offset)) {
skip = params.offset;
}
// Apply 'limit' and 'skip'
if (limit && skip) {
filtered = DSUtils.slice(filtered, skip, Math.min(filtered.length, skip + limit));
} else if (DSUtils._n(limit)) {
filtered = DSUtils.slice(filtered, 0, Math.min(filtered.length, limit));
} else if (DSUtils._n(skip)) {
if (skip < filtered.length) {
filtered = DSUtils.slice(filtered, skip);
} else {
filtered = [];
}
}
return filtered;
};
var DS = (function () {
function DS(options) {
_classCallCheck(this, DS);
var _this = this;
options = options || {};
try {
Schemator = __webpack_require__(5);
} catch (e) {}
if (!Schemator || DSUtils.isEmpty(Schemator)) {
try {
Schemator = window.Schemator;
} catch (e) {}
}
Schemator = Schemator || options.schemator;
if (typeof Schemator === "function") {
_this.schemator = new Schemator();
}
_this.store = {};
// alias store, shaves 0.1 kb off the minified build
_this.s = _this.store;
_this.definitions = {};
// alias definitions, shaves 0.3 kb off the minified build
_this.defs = _this.definitions;
_this.adapters = {};
_this.defaults = new Defaults();
_this.observe = DSUtils.observe;
DSUtils.forOwn(options, function (v, k) {
_this.defaults[k] = v;
});
_this.defaults.logFn("new data store created", _this.defaults);
}
_createClass(DS, {
getAdapter: {
value: function getAdapter(options) {
var errorIfNotExist = false;
options = options || {};
this.defaults.logFn("getAdapter", options);
if (DSUtils._s(options)) {
errorIfNotExist = true;
options = {
adapter: options
};
}
var adapter = this.adapters[options.adapter];
if (adapter) {
return adapter;
} else if (errorIfNotExist) {
throw new Error("" + options.adapter + " is not a registered adapter!");
} else {
return this.adapters[options.defaultAdapter];
}
}
},
registerAdapter: {
value: function registerAdapter(name, Adapter, options) {
var _this = this;
options = options || {};
_this.defaults.logFn("registerAdapter", name, Adapter, options);
if (DSUtils.isFunction(Adapter)) {
_this.adapters[name] = new Adapter(options);
} else {
_this.adapters[name] = Adapter;
}
if (options["default"]) {
_this.defaults.defaultAdapter = name;
}
_this.defaults.logFn("default adapter is " + _this.defaults.defaultAdapter);
}
},
is: {
value: function is(resourceName, instance) {
var definition = this.defs[resourceName];
if (!definition) {
throw new DSErrors.NER(resourceName);
}
return instance instanceof definition[definition["class"]];
}
}
});
return DS;
})();
var dsPrototype = DS.prototype;
dsPrototype.getAdapter.shorthand = false;
dsPrototype.registerAdapter.shorthand = false;
dsPrototype.errors = DSErrors;
dsPrototype.utils = DSUtils;
DSUtils.deepMixIn(dsPrototype, syncMethods);
DSUtils.deepMixIn(dsPrototype, asyncMethods);
module.exports = DS;
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
if(typeof __WEBPACK_EXTERNAL_MODULE_5__ === 'undefined') {var e = new Error("Cannot find module \"undefined\""); e.code = 'MODULE_NOT_FOUND'; throw e;}
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
/*
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// Modifications
// Copyright 2014-2015 Jason Dobry
//
// Summary of modifications:
// Fixed use of "delete" keyword for IE8 compatibility
// Exposed diffObjectFromOldObject on the exported object
// Added the "equals" argument to diffObjectFromOldObject to be used to check equality
// Added a way in diffObjectFromOldObject to ignore changes to certain properties
// Removed all code related to:
// - ArrayObserver
// - ArraySplice
// - PathObserver
// - CompoundObserver
// - Path
// - ObserverTransform
(function(global) {
var testingExposeCycleCount = global.testingExposeCycleCount;
// Detect and do basic sanity checking on Object/Array.observe.
function detectObjectObserve() {
if (typeof Object.observe !== 'function' ||
typeof Array.observe !== 'function') {
return false;
}
var records = [];
function callback(recs) {
records = recs;
}
var test = {};
var arr = [];
Object.observe(test, callback);
Array.observe(arr, callback);
test.id = 1;
test.id = 2;
delete test.id;
arr.push(1, 2);
arr.length = 0;
Object.deliverChangeRecords(callback);
if (records.length !== 5)
return false;
if (records[0].type != 'add' ||
records[1].type != 'update' ||
records[2].type != 'delete' ||
records[3].type != 'splice' ||
records[4].type != 'splice') {
return false;
}
Object.unobserve(test, callback);
Array.unobserve(arr, callback);
return true;
}
var hasObserve = detectObjectObserve();
var createObject = ('__proto__' in {}) ?
function(obj) { return obj; } :
function(obj) {
var proto = obj.__proto__;
if (!proto)
return obj;
var newObject = Object.create(proto);
Object.getOwnPropertyNames(obj).forEach(function(name) {
Object.defineProperty(newObject, name,
Object.getOwnPropertyDescriptor(obj, name));
});
return newObject;
};
var MAX_DIRTY_CHECK_CYCLES = 1000;
function dirtyCheck(observer) {
var cycles = 0;
while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {
cycles++;
}
if (testingExposeCycleCount)
global.dirtyCheckCycleCount = cycles;
return cycles > 0;
}
function objectIsEmpty(object) {
for (var prop in object)
return false;
return true;
}
function diffIsEmpty(diff) {
return objectIsEmpty(diff.added) &&
objectIsEmpty(diff.removed) &&
objectIsEmpty(diff.changed);
}
function isBlacklisted(prop, bl) {
if (!bl || !bl.length) {
return false;
}
var matches;
for (var i = 0; i < bl.length; i++) {
if ((Object.prototype.toString.call(bl[i]) === '[object RegExp]' && bl[i].test(prop)) || bl[i] === prop) {
return matches = prop;
}
}
return !!matches;
}
function diffObjectFromOldObject(object, oldObject, equals, bl) {
var added = {};
var removed = {};
var changed = {};
for (var prop in oldObject) {
var newValue = object[prop];
if (isBlacklisted(prop, bl))
continue;
if (newValue !== undefined && (equals ? equals(newValue, oldObject[prop]) : newValue === oldObject[prop]))
continue;
if (!(prop in object)) {
removed[prop] = undefined;
continue;
}
if (equals ? !equals(newValue, oldObject[prop]) : newValue !== oldObject[prop])
changed[prop] = newValue;
}
for (var prop in object) {
if (prop in oldObject)
continue;
if (isBlacklisted(prop, bl))
continue;
added[prop] = object[prop];
}
if (Array.isArray(object) && object.length !== oldObject.length)
changed.length = object.length;
return {
added: added,
removed: removed,
changed: changed
};
}
var eomTasks = [];
function runEOMTasks() {
if (!eomTasks.length)
return false;
for (var i = 0; i < eomTasks.length; i++) {
eomTasks[i]();
}
eomTasks.length = 0;
return true;
}
var runEOM = hasObserve ? (function(){
return function(fn) {
return Promise.resolve().then(fn);
}
})() :
(function() {
return function(fn) {
eomTasks.push(fn);
};
})();
var observedObjectCache = [];
function newObservedObject() {
var observer;
var object;
var discardRecords = false;
var first = true;
function callback(records) {
if (observer && observer.state_ === OPENED && !discardRecords)
observer.check_(records);
}
return {
open: function(obs) {
if (observer)
throw Error('ObservedObject in use');
if (!first)
Object.deliverChangeRecords(callback);
observer = obs;
first = false;
},
observe: function(obj, arrayObserve) {
object = obj;
if (arrayObserve)
Array.observe(object, callback);
else
Object.observe(object, callback);
},
deliver: function(discard) {
discardRecords = discard;
Object.deliverChangeRecords(callback);
discardRecords = false;
},
close: function() {
observer = undefined;
Object.unobserve(object, callback);
observedObjectCache.push(this);
}
};
}
function getObservedObject(observer, object, arrayObserve) {
var dir = observedObjectCache.pop() || newObservedObject();
dir.open(observer);
dir.observe(object, arrayObserve);
return dir;
}
var UNOPENED = 0;
var OPENED = 1;
var CLOSED = 2;
var nextObserverId = 1;
function Observer() {
this.state_ = UNOPENED;
this.callback_ = undefined;
this.target_ = undefined; // TODO(rafaelw): Should be WeakRef
this.directObserver_ = undefined;
this.value_ = undefined;
this.id_ = nextObserverId++;
}
Observer.prototype = {
open: function(callback, target) {
if (this.state_ != UNOPENED)
throw Error('Observer has already been opened.');
addToAll(this);
this.callback_ = callback;
this.target_ = target;
this.connect_();
this.state_ = OPENED;
return this.value_;
},
close: function() {
if (this.state_ != OPENED)
return;
removeFromAll(this);
this.disconnect_();
this.value_ = undefined;
this.callback_ = undefined;
this.target_ = undefined;
this.state_ = CLOSED;
},
deliver: function() {
if (this.state_ != OPENED)
return;
dirtyCheck(this);
},
report_: function(changes) {
try {
this.callback_.apply(this.target_, changes);
} catch (ex) {
Observer._errorThrownDuringCallback = true;
console.error('Exception caught during observer callback: ' +
(ex.stack || ex));
}
},
discardChanges: function() {
this.check_(undefined, true);
return this.value_;
}
}
var collectObservers = !hasObserve;
var allObservers;
Observer._allObserversCount = 0;
if (collectObservers) {
allObservers = [];
}
function addToAll(observer) {
Observer._allObserversCount++;
if (!collectObservers)
return;
allObservers.push(observer);
}
function removeFromAll(observer) {
Observer._allObserversCount--;
}
var runningMicrotaskCheckpoint = false;
global.Platform = global.Platform || {};
global.Platform.performMicrotaskCheckpoint = function() {
if (runningMicrotaskCheckpoint)
return;
if (!collectObservers)
return;
runningMicrotaskCheckpoint = true;
var cycles = 0;
var anyChanged, toCheck;
do {
cycles++;
toCheck = allObservers;
allObservers = [];
anyChanged = false;
for (var i = 0; i < toCheck.length; i++) {
var observer = toCheck[i];
if (observer.state_ != OPENED)
continue;
if (observer.check_())
anyChanged = true;
allObservers.push(observer);
}
if (runEOMTasks())
anyChanged = true;
} while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);
if (testingExposeCycleCount)
global.dirtyCheckCycleCount = cycles;
runningMicrotaskCheckpoint = false;
};
if (collectObservers) {
global.Platform.clearObservers = function() {
allObservers = [];
};
}
function ObjectObserver(object) {
Observer.call(this);
this.value_ = object;
this.oldObject_ = undefined;
}
ObjectObserver.prototype = createObject({
__proto__: Observer.prototype,
arrayObserve: false,
connect_: function(callback, target) {
if (hasObserve) {
this.directObserver_ = getObservedObject(this, this.value_,
this.arrayObserve);
} else {
this.oldObject_ = this.copyObject(this.value_);
}
},
copyObject: function(object) {
var copy = Array.isArray(object) ? [] : {};
for (var prop in object) {
copy[prop] = object[prop];
};
if (Array.isArray(object))
copy.length = object.length;
return copy;
},
check_: function(changeRecords, skipChanges) {
var diff;
var oldValues;
if (hasObserve) {
if (!changeRecords)
return false;
oldValues = {};
diff = diffObjectFromChangeRecords(this.value_, changeRecords,
oldValues);
} else {
oldValues = this.oldObject_;
diff = diffObjectFromOldObject(this.value_, this.oldObject_);
}
if (diffIsEmpty(diff))
return false;
if (!hasObserve)
this.oldObject_ = this.copyObject(this.value_);
this.report_([
diff.added || {},
diff.removed || {},
diff.changed || {},
function(property) {
return oldValues[property];
}
]);
return true;
},
disconnect_: function() {
if (hasObserve) {
this.directObserver_.close();
this.directObserver_ = undefined;
} else {
this.oldObject_ = undefined;
}
},
deliver: function() {
if (this.state_ != OPENED)
return;
if (hasObserve)
this.directObserver_.deliver(false);
else
dirtyCheck(this);
},
discardChanges: function() {
if (this.directObserver_)
this.directObserver_.deliver(true);
else
this.oldObject_ = this.copyObject(this.value_);
return this.value_;
}
});
var observerSentinel = {};
var expectedRecordTypes = {
add: true,
update: true,
'delete': true
};
function diffObjectFromChangeRecords(object, changeRecords, oldValues) {
var added = {};
var removed = {};
for (var i = 0; i < changeRecords.length; i++) {
var record = changeRecords[i];
if (!expectedRecordTypes[record.type]) {
console.error('Unknown changeRecord type: ' + record.type);
console.error(record);
continue;
}
if (!(record.name in oldValues))
oldValues[record.name] = record.oldValue;
if (record.type == 'update')
continue;
if (record.type == 'add') {
if (record.name in removed)
delete removed[record.name];
else
added[record.name] = true;
continue;
}
// type = 'delete'
if (record.name in added) {
delete added[record.name];
delete oldValues[record.name];
} else {
removed[record.name] = true;
}
}
for (var prop in added)
added[prop] = object[prop];
for (var prop in removed)
removed[prop] = undefined;
var changed = {};
for (var prop in oldValues) {
if (prop in added || prop in removed)
continue;
var newValue = object[prop];
if (oldValues[prop] !== newValue)
changed[prop] = newValue;
}
return {
added: added,
removed: removed,
changed: changed
};
}
// Export the observe-js object for **Node.js**, with backwards-compatibility
// for the old `require()` API. Also ensure `exports` is not a DOM Element.
// If we're in the browser, export as a global object.
global.Observer = Observer;
global.Observer.runEOM_ = runEOM;
global.Observer.observerSentinel_ = observerSentinel; // for testing.
global.Observer.hasObjectObserve = hasObserve;
global.diffObjectFromOldObject = diffObjectFromOldObject;
global.ObjectObserver = ObjectObserver;
})(exports);
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var DSUtils = _interopRequire(__webpack_require__(1));
var DSErrors = _interopRequire(__webpack_require__(2));
var defineResource = _interopRequire(__webpack_require__(31));
var eject = _interopRequire(__webpack_require__(32));
var ejectAll = _interopRequire(__webpack_require__(33));
var filter = _interopRequire(__webpack_require__(34));
var inject = _interopRequire(__webpack_require__(35));
var link = _interopRequire(__webpack_require__(36));
var linkAll = _interopRequire(__webpack_require__(37));
var linkInverse = _interopRequire(__webpack_require__(38));
var unlinkInverse = _interopRequire(__webpack_require__(39));
var NER = DSErrors.NER;
var IA = DSErrors.IA;
var R = DSErrors.R;
function diffIsEmpty(diff) {
return !(DSUtils.isEmpty(diff.added) && DSUtils.isEmpty(diff.removed) && DSUtils.isEmpty(diff.changed));
}
module.exports = {
changes: function changes(resourceName, id, options) {
var _this = this;
var definition = _this.defs[resourceName];
options = options || {};
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
options = DSUtils._(definition, options);
options.logFn("changes", id, options);
var item = _this.get(resourceName, id);
if (item) {
var _ret = (function () {
if (DSUtils.w) {
_this.s[resourceName].observers[id].deliver();
}
var ignoredChanges = options.ignoredChanges || [];
DSUtils.forEach(definition.relationFields, function (field) {
return ignoredChanges.push(field);
});
var diff = DSUtils.diffObjectFromOldObject(item, _this.s[resourceName].previousAttributes[id], DSUtils.equals, ignoredChanges);
DSUtils.forOwn(diff, function (changeset, name) {
var toKeep = [];
DSUtils.forOwn(changeset, function (value, field) {
if (!DSUtils.isFunction(value)) {
toKeep.push(field);
}
});
diff[name] = DSUtils.pick(diff[name], toKeep);
});
DSUtils.forEach(definition.relationFields, function (field) {
delete diff.added[field];
delete diff.removed[field];
delete diff.changed[field];
});
return {
v: diff
};
})();
if (typeof _ret === "object") {
return _ret.v;
}
}
},
changeHistory: function changeHistory(resourceName, id) {
var _this = this;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
id = DSUtils.resolveId(definition, id);
if (resourceName && !_this.defs[resourceName]) {
throw new NER(resourceName);
} else if (id && !DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
definition.logFn("changeHistory", id);
if (!definition.keepChangeHistory) {
definition.errorFn("changeHistory is disabled for this resource!");
} else {
if (resourceName) {
var item = _this.get(resourceName, id);
if (item) {
return resource.changeHistories[id];
}
} else {
return resource.changeHistory;
}
}
},
compute: function compute(resourceName, instance) {
var _this = this;
var definition = _this.defs[resourceName];
instance = DSUtils.resolveItem(_this.s[resourceName], instance);
if (!definition) {
throw new NER(resourceName);
} else if (!instance) {
throw new R("Item not in the store!");
} else if (!DSUtils._o(instance) && !DSUtils._sn(instance)) {
throw new IA("\"instance\" must be an object, string or number!");
}
definition.logFn("compute", instance);
DSUtils.forOwn(definition.computed, function (fn, field) {
DSUtils.compute.call(instance, fn, field);
});
return instance;
},
createInstance: function createInstance(resourceName, attrs, options) {
var definition = this.defs[resourceName];
var item = undefined;
attrs = attrs || {};
if (!definition) {
throw new NER(resourceName);
} else if (attrs && !DSUtils.isObject(attrs)) {
throw new IA("\"attrs\" must be an object!");
}
options = DSUtils._(definition, options);
options.logFn("createInstance", attrs, options);
if (options.notify) {
options.beforeCreateInstance(options, attrs);
}
if (options.useClass) {
var Constructor = definition[definition["class"]];
item = new Constructor();
} else {
item = {};
}
DSUtils.deepMixIn(item, attrs);
if (options.notify) {
options.afterCreateInstance(options, attrs);
}
return item;
},
defineResource: defineResource,
digest: function digest() {
this.observe.Platform.performMicrotaskCheckpoint();
},
eject: eject,
ejectAll: ejectAll,
filter: filter,
get: function get(resourceName, id, options) {
var _this = this;
var definition = _this.defs[resourceName];
if (!definition) {
throw new NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
options = DSUtils._(definition, options);
options.logFn("get", id, options);
// cache miss, request resource from server
var item = _this.s[resourceName].index[id];
if (!item && options.loadFromServer) {
_this.find(resourceName, id, options);
}
// return resource from cache
return item;
},
getAll: function getAll(resourceName, ids) {
var _this = this;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
var collection = [];
if (!definition) {
throw new NER(resourceName);
} else if (ids && !DSUtils._a(ids)) {
throw DSUtils._aErr("ids");
}
definition.logFn("getAll", ids);
if (DSUtils._a(ids)) {
var _length = ids.length;
for (var i = 0; i < _length; i++) {
if (resource.index[ids[i]]) {
collection.push(resource.index[ids[i]]);
}
}
} else {
collection = resource.collection.slice();
}
return collection;
},
hasChanges: function hasChanges(resourceName, id) {
var _this = this;
var definition = _this.defs[resourceName];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
definition.logFn("hasChanges", id);
// return resource from cache
if (_this.get(resourceName, id)) {
return diffIsEmpty(_this.changes(resourceName, id));
} else {
return false;
}
},
inject: inject,
lastModified: function lastModified(resourceName, id) {
var definition = this.defs[resourceName];
var resource = this.s[resourceName];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new NER(resourceName);
}
definition.logFn("lastModified", id);
if (id) {
if (!(id in resource.modified)) {
resource.modified[id] = 0;
}
return resource.modified[id];
}
return resource.collectionModified;
},
lastSaved: function lastSaved(resourceName, id) {
var definition = this.defs[resourceName];
var resource = this.s[resourceName];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new NER(resourceName);
}
definition.logFn("lastSaved", id);
if (!(id in resource.saved)) {
resource.saved[id] = 0;
}
return resource.saved[id];
},
link: link,
linkAll: linkAll,
linkInverse: linkInverse,
previous: function previous(resourceName, id) {
var _this = this;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
definition.logFn("previous", id);
// return resource from cache
return resource.previousAttributes[id] ? DSUtils.copy(resource.previousAttributes[id]) : undefined;
},
unlinkInverse: unlinkInverse
};
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var create = _interopRequire(__webpack_require__(40));
var destroy = _interopRequire(__webpack_require__(41));
var destroyAll = _interopRequire(__webpack_require__(42));
var find = _interopRequire(__webpack_require__(43));
var findAll = _interopRequire(__webpack_require__(44));
var loadRelations = _interopRequire(__webpack_require__(45));
var reap = _interopRequire(__webpack_require__(46));
var save = _interopRequire(__webpack_require__(47));
var update = _interopRequire(__webpack_require__(48));
var updateAll = _interopRequire(__webpack_require__(49));
module.exports = {
create: create,
destroy: destroy,
destroyAll: destroyAll,
find: find,
findAll: findAll,
loadRelations: loadRelations,
reap: reap,
refresh: function refresh(resourceName, id, options) {
var _this = this;
var DSUtils = _this.utils;
return new DSUtils.Promise(function (resolve, reject) {
var definition = _this.defs[resourceName];
id = DSUtils.resolveId(_this.defs[resourceName], id);
if (!definition) {
reject(new _this.errors.NER(resourceName));
} else if (!DSUtils._sn(id)) {
reject(DSUtils._snErr("id"));
} else {
options = DSUtils._(definition, options);
options.bypassCache = true;
options.logFn("refresh", id, options);
resolve(_this.get(resourceName, id));
}
}).then(function (item) {
return item ? _this.find(resourceName, id, options) : item;
});
},
save: save,
update: update,
updateAll: updateAll
};
/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process, global, module) {/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
* @version 2.0.1
*/
(function() {
"use strict";
function $$utils$$objectOrFunction(x) {
return typeof x === 'function' || (typeof x === 'object' && x !== null);
}
function $$utils$$isFunction(x) {
return typeof x === 'function';
}
function $$utils$$isMaybeThenable(x) {
return typeof x === 'object' && x !== null;
}
var $$utils$$_isArray;
if (!Array.isArray) {
$$utils$$_isArray = function (x) {
return Object.prototype.toString.call(x) === '[object Array]';
};
} else {
$$utils$$_isArray = Array.isArray;
}
var $$utils$$isArray = $$utils$$_isArray;
var $$utils$$now = Date.now || function() { return new Date().getTime(); };
function $$utils$$F() { }
var $$utils$$o_create = (Object.create || function (o) {
if (arguments.length > 1) {
throw new Error('Second argument not supported');
}
if (typeof o !== 'object') {
throw new TypeError('Argument must be an object');
}
$$utils$$F.prototype = o;
return new $$utils$$F();
});
var $$asap$$len = 0;
var $$asap$$default = function asap(callback, arg) {
$$asap$$queue[$$asap$$len] = callback;
$$asap$$queue[$$asap$$len + 1] = arg;
$$asap$$len += 2;
if ($$asap$$len === 2) {
// If len is 1, that means that we need to schedule an async flush.
// If additional callbacks are queued before the queue is flushed, they
// will be processed by this flush that we are scheduling.
$$asap$$scheduleFlush();
}
};
var $$asap$$browserGlobal = (typeof window !== 'undefined') ? window : {};
var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver;
// test for web worker but not in IE10
var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
typeof importScripts !== 'undefined' &&
typeof MessageChannel !== 'undefined';
// node
function $$asap$$useNextTick() {
return function() {
process.nextTick($$asap$$flush);
};
}
function $$asap$$useMutationObserver() {
var iterations = 0;
var observer = new $$asap$$BrowserMutationObserver($$asap$$flush);
var node = document.createTextNode('');
observer.observe(node, { characterData: true });
return function() {
node.data = (iterations = ++iterations % 2);
};
}
// web worker
function $$asap$$useMessageChannel() {
var channel = new MessageChannel();
channel.port1.onmessage = $$asap$$flush;
return function () {
channel.port2.postMessage(0);
};
}
function $$asap$$useSetTimeout() {
return function() {
setTimeout($$asap$$flush, 1);
};
}
var $$asap$$queue = new Array(1000);
function $$asap$$flush() {
for (var i = 0; i < $$asap$$len; i+=2) {
var callback = $$asap$$queue[i];
var arg = $$asap$$queue[i+1];
callback(arg);
$$asap$$queue[i] = undefined;
$$asap$$queue[i+1] = undefined;
}
$$asap$$len = 0;
}
var $$asap$$scheduleFlush;
// Decide what async method to use to triggering processing of queued callbacks:
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
$$asap$$scheduleFlush = $$asap$$useNextTick();
} else if ($$asap$$BrowserMutationObserver) {
$$asap$$scheduleFlush = $$asap$$useMutationObserver();
} else if ($$asap$$isWorker) {
$$asap$$scheduleFlush = $$asap$$useMessageChannel();
} else {
$$asap$$scheduleFlush = $$asap$$useSetTimeout();
}
function $$$internal$$noop() {}
var $$$internal$$PENDING = void 0;
var $$$internal$$FULFILLED = 1;
var $$$internal$$REJECTED = 2;
var $$$internal$$GET_THEN_ERROR = new $$$internal$$ErrorObject();
function $$$internal$$selfFullfillment() {
return new TypeError("You cannot resolve a promise with itself");
}
function $$$internal$$cannotReturnOwn() {
return new TypeError('A promises callback cannot return that same promise.')
}
function $$$internal$$getThen(promise) {
try {
return promise.then;
} catch(error) {
$$$internal$$GET_THEN_ERROR.error = error;
return $$$internal$$GET_THEN_ERROR;
}
}
function $$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) {
try {
then.call(value, fulfillmentHandler, rejectionHandler);
} catch(e) {
return e;
}
}
function $$$internal$$handleForeignThenable(promise, thenable, then) {
$$asap$$default(function(promise) {
var sealed = false;
var error = $$$internal$$tryThen(then, thenable, function(value) {
if (sealed) { return; }
sealed = true;
if (thenable !== value) {
$$$internal$$resolve(promise, value);
} else {
$$$internal$$fulfill(promise, value);
}
}, function(reason) {
if (sealed) { return; }
sealed = true;
$$$internal$$reject(promise, reason);
}, 'Settle: ' + (promise._label || ' unknown promise'));
if (!sealed && error) {
sealed = true;
$$$internal$$reject(promise, error);
}
}, promise);
}
function $$$internal$$handleOwnThenable(promise, thenable) {
if (thenable._state === $$$internal$$FULFILLED) {
$$$internal$$fulfill(promise, thenable._result);
} else if (promise._state === $$$internal$$REJECTED) {
$$$internal$$reject(promise, thenable._result);
} else {
$$$internal$$subscribe(thenable, undefined, function(value) {
$$$internal$$resolve(promise, value);
}, function(reason) {
$$$internal$$reject(promise, reason);
});
}
}
function $$$internal$$handleMaybeThenable(promise, maybeThenable) {
if (maybeThenable.constructor === promise.constructor) {
$$$internal$$handleOwnThenable(promise, maybeThenable);
} else {
var then = $$$internal$$getThen(maybeThenable);
if (then === $$$internal$$GET_THEN_ERROR) {
$$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error);
} else if (then === undefined) {
$$$internal$$fulfill(promise, maybeThenable);
} else if ($$utils$$isFunction(then)) {
$$$internal$$handleForeignThenable(promise, maybeThenable, then);
} else {
$$$internal$$fulfill(promise, maybeThenable);
}
}
}
function $$$internal$$resolve(promise, value) {
if (promise === value) {
$$$internal$$reject(promise, $$$internal$$selfFullfillment());
} else if ($$utils$$objectOrFunction(value)) {
$$$internal$$handleMaybeThenable(promise, value);
} else {
$$$internal$$fulfill(promise, value);
}
}
function $$$internal$$publishRejection(promise) {
if (promise._onerror) {
promise._onerror(promise._result);
}
$$$internal$$publish(promise);
}
function $$$internal$$fulfill(promise, value) {
if (promise._state !== $$$internal$$PENDING) { return; }
promise._result = value;
promise._state = $$$internal$$FULFILLED;
if (promise._subscribers.length === 0) {
} else {
$$asap$$default($$$internal$$publish, promise);
}
}
function $$$internal$$reject(promise, reason) {
if (promise._state !== $$$internal$$PENDING) { return; }
promise._state = $$$internal$$REJECTED;
promise._result = reason;
$$asap$$default($$$internal$$publishRejection, promise);
}
function $$$internal$$subscribe(parent, child, onFulfillment, onRejection) {
var subscribers = parent._subscribers;
var length = subscribers.length;
parent._onerror = null;
subscribers[length] = child;
subscribers[length + $$$internal$$FULFILLED] = onFulfillment;
subscribers[length + $$$internal$$REJECTED] = onRejection;
if (length === 0 && parent._state) {
$$asap$$default($$$internal$$publish, parent);
}
}
function $$$internal$$publish(promise) {
var subscribers = promise._subscribers;
var settled = promise._state;
if (subscribers.length === 0) { return; }
var child, callback, detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
child = subscribers[i];
callback = subscribers[i + settled];
if (child) {
$$$internal$$invokeCallback(settled, child, callback, detail);
} else {
callback(detail);
}
}
promise._subscribers.length = 0;
}
function $$$internal$$ErrorObject() {
this.error = null;
}
var $$$internal$$TRY_CATCH_ERROR = new $$$internal$$ErrorObject();
function $$$internal$$tryCatch(callback, detail) {
try {
return callback(detail);
} catch(e) {
$$$internal$$TRY_CATCH_ERROR.error = e;
return $$$internal$$TRY_CATCH_ERROR;
}
}
function $$$internal$$invokeCallback(settled, promise, callback, detail) {
var hasCallback = $$utils$$isFunction(callback),
value, error, succeeded, failed;
if (hasCallback) {
value = $$$internal$$tryCatch(callback, detail);
if (value === $$$internal$$TRY_CATCH_ERROR) {
failed = true;
error = value.error;
value = null;
} else {
succeeded = true;
}
if (promise === value) {
$$$internal$$reject(promise, $$$internal$$cannotReturnOwn());
return;
}
} else {
value = detail;
succeeded = true;
}
if (promise._state !== $$$internal$$PENDING) {
// noop
} else if (hasCallback && succeeded) {
$$$internal$$resolve(promise, value);
} else if (failed) {
$$$internal$$reject(promise, error);
} else if (settled === $$$internal$$FULFILLED) {
$$$internal$$fulfill(promise, value);
} else if (settled === $$$internal$$REJECTED) {
$$$internal$$reject(promise, value);
}
}
function $$$internal$$initializePromise(promise, resolver) {
try {
resolver(function resolvePromise(value){
$$$internal$$resolve(promise, value);
}, function rejectPromise(reason) {
$$$internal$$reject(promise, reason);
});
} catch(e) {
$$$internal$$reject(promise, e);
}
}
function $$$enumerator$$makeSettledResult(state, position, value) {
if (state === $$$internal$$FULFILLED) {
return {
state: 'fulfilled',
value: value
};
} else {
return {
state: 'rejected',
reason: value
};
}
}
function $$$enumerator$$Enumerator(Constructor, input, abortOnReject, label) {
this._instanceConstructor = Constructor;
this.promise = new Constructor($$$internal$$noop, label);
this._abortOnReject = abortOnReject;
if (this._validateInput(input)) {
this._input = input;
this.length = input.length;
this._remaining = input.length;
this._init();
if (this.length === 0) {
$$$internal$$fulfill(this.promise, this._result);
} else {
this.length = this.length || 0;
this._enumerate();
if (this._remaining === 0) {
$$$internal$$fulfill(this.promise, this._result);
}
}
} else {
$$$internal$$reject(this.promise, this._validationError());
}
}
$$$enumerator$$Enumerator.prototype._validateInput = function(input) {
return $$utils$$isArray(input);
};
$$$enumerator$$Enumerator.prototype._validationError = function() {
return new Error('Array Methods must be provided an Array');
};
$$$enumerator$$Enumerator.prototype._init = function() {
this._result = new Array(this.length);
};
var $$$enumerator$$default = $$$enumerator$$Enumerator;
$$$enumerator$$Enumerator.prototype._enumerate = function() {
var length = this.length;
var promise = this.promise;
var input = this._input;
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
this._eachEntry(input[i], i);
}
};
$$$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) {
var c = this._instanceConstructor;
if ($$utils$$isMaybeThenable(entry)) {
if (entry.constructor === c && entry._state !== $$$internal$$PENDING) {
entry._onerror = null;
this._settledAt(entry._state, i, entry._result);
} else {
this._willSettleAt(c.resolve(entry), i);
}
} else {
this._remaining--;
this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry);
}
};
$$$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) {
var promise = this.promise;
if (promise._state === $$$internal$$PENDING) {
this._remaining--;
if (this._abortOnReject && state === $$$internal$$REJECTED) {
$$$internal$$reject(promise, value);
} else {
this._result[i] = this._makeResult(state, i, value);
}
}
if (this._remaining === 0) {
$$$internal$$fulfill(promise, this._result);
}
};
$$$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) {
return value;
};
$$$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) {
var enumerator = this;
$$$internal$$subscribe(promise, undefined, function(value) {
enumerator._settledAt($$$internal$$FULFILLED, i, value);
}, function(reason) {
enumerator._settledAt($$$internal$$REJECTED, i, reason);
});
};
var $$promise$all$$default = function all(entries, label) {
return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise;
};
var $$promise$race$$default = function race(entries, label) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor($$$internal$$noop, label);
if (!$$utils$$isArray(entries)) {
$$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
return promise;
}
var length = entries.length;
function onFulfillment(value) {
$$$internal$$resolve(promise, value);
}
function onRejection(reason) {
$$$internal$$reject(promise, reason);
}
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
$$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
}
return promise;
};
var $$promise$resolve$$default = function resolve(object, label) {
/*jshint validthis:true */
var Constructor = this;
if (object && typeof object === 'object' && object.constructor === Constructor) {
return object;
}
var promise = new Constructor($$$internal$$noop, label);
$$$internal$$resolve(promise, object);
return promise;
};
var $$promise$reject$$default = function reject(reason, label) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor($$$internal$$noop, label);
$$$internal$$reject(promise, reason);
return promise;
};
var $$es6$promise$promise$$counter = 0;
function $$es6$promise$promise$$needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
function $$es6$promise$promise$$needsNew() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}
var $$es6$promise$promise$$default = $$es6$promise$promise$$Promise;
/**
Promise objects represent the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its `then` method, which
registers callbacks to receive either a promise’s eventual value or the reason
why the promise cannot be fulfilled.
Terminology
-----------
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
- `thenable` is an object or function that defines a `then` method.
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
- `exception` is a value that is thrown using the throw statement.
- `reason` is a value that indicates why a promise was rejected.
- `settled` the final resting state of a promise, fulfilled or rejected.
A promise can be in one of three states: pending, fulfilled, or rejected.
Promises that are fulfilled have a fulfillment value and are in the fulfilled
state. Promises that are rejected have a rejection reason and are in the
rejected state. A fulfillment value is never a thenable.
Promises can also be said to *resolve* a value. If this value is also a
promise, then the original promise's settled state will match the value's
settled state. So a promise that *resolves* a promise that rejects will
itself reject, and a promise that *resolves* a promise that fulfills will
itself fulfill.
Basic Usage:
------------
```js
var promise = new Promise(function(resolve, reject) {
// on success
resolve(value);
// on failure
reject(reason);
});
promise.then(function(value) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Advanced Usage:
---------------
Promises shine when abstracting away asynchronous interactions such as
`XMLHttpRequest`s.
```js
function getJSON(url) {
return new Promise(function(resolve, reject){
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onreadystatechange = handler;
xhr.responseType = 'json';
xhr.setRequestHeader('Accept', 'application/json');
xhr.send();
function handler() {
if (this.readyState === this.DONE) {
if (this.status === 200) {
resolve(this.response);
} else {
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
}
}
};
});
}
getJSON('/posts.json').then(function(json) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Unlike callbacks, promises are great composable primitives.
```js
Promise.all([
getJSON('/posts'),
getJSON('/comments')
]).then(function(values){
values[0] // => postsJSON
values[1] // => commentsJSON
return values;
});
```
@class Promise
@param {function} resolver
Useful for tooling.
@constructor
*/
function $$es6$promise$promise$$Promise(resolver) {
this._id = $$es6$promise$promise$$counter++;
this._state = undefined;
this._result = undefined;
this._subscribers = [];
if ($$$internal$$noop !== resolver) {
if (!$$utils$$isFunction(resolver)) {
$$es6$promise$promise$$needsResolver();
}
if (!(this instanceof $$es6$promise$promise$$Promise)) {
$$es6$promise$promise$$needsNew();
}
$$$internal$$initializePromise(this, resolver);
}
}
$$es6$promise$promise$$Promise.all = $$promise$all$$default;
$$es6$promise$promise$$Promise.race = $$promise$race$$default;
$$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default;
$$es6$promise$promise$$Promise.reject = $$promise$reject$$default;
$$es6$promise$promise$$Promise.prototype = {
constructor: $$es6$promise$promise$$Promise,
/**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
```js
findUser().then(function(user){
// user is available
}, function(reason){
// user is unavailable, and you are given the reason why
});
```
Chaining
--------
The return value of `then` is itself a promise. This second, 'downstream'
promise is resolved with the return value of the first promise's fulfillment
or rejection handler, or rejected if the handler throws an exception.
```js
findUser().then(function (user) {
return user.name;
}, function (reason) {
return 'default name';
}).then(function (userName) {
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
// will be `'default name'`
});
findUser().then(function (user) {
throw new Error('Found user, but still unhappy');
}, function (reason) {
throw new Error('`findUser` rejected and we're unhappy');
}).then(function (value) {
// never reached
}, function (reason) {
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
});
```
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
```js
findUser().then(function (user) {
throw new PedagogicalException('Upstream error');
}).then(function (value) {
// never reached
}).then(function (value) {
// never reached
}, function (reason) {
// The `PedgagocialException` is propagated all the way down to here
});
```
Assimilation
------------
Sometimes the value you want to propagate to a downstream promise can only be
retrieved asynchronously. This can be achieved by returning a promise in the
fulfillment or rejection handler. The downstream promise will then be pending
until the returned promise is settled. This is called *assimilation*.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// The user's comments are now available
});
```
If the assimliated promise rejects, then the downstream promise will also reject.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// If `findCommentsByAuthor` fulfills, we'll have the value here
}, function (reason) {
// If `findCommentsByAuthor` rejects, we'll have the reason here
});
```
Simple Example
--------------
Synchronous Example
```javascript
var result;
try {
result = findResult();
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
findResult(function(result, err){
if (err) {
// failure
} else {
// success
}
});
```
Promise Example;
```javascript
findResult().then(function(result){
// success
}, function(reason){
// failure
});
```
Advanced Example
--------------
Synchronous Example
```javascript
var author, books;
try {
author = findAuthor();
books = findBooksByAuthor(author);
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
function foundBooks(books) {
}
function failure(reason) {
}
findAuthor(function(author, err){
if (err) {
failure(err);
// failure
} else {
try {
findBoooksByAuthor(author, function(books, err) {
if (err) {
failure(err);
} else {
try {
foundBooks(books);
} catch(reason) {
failure(reason);
}
}
});
} catch(error) {
failure(err);
}
// success
}
});
```
Promise Example;
```javascript
findAuthor().
then(findBooksByAuthor).
then(function(books){
// found books
}).catch(function(reason){
// something went wrong
});
```
@method then
@param {Function} onFulfilled
@param {Function} onRejected
Useful for tooling.
@return {Promise}
*/
then: function(onFulfillment, onRejection) {
var parent = this;
var state = parent._state;
if (state === $$$internal$$FULFILLED && !onFulfillment || state === $$$internal$$REJECTED && !onRejection) {
return this;
}
var child = new this.constructor($$$internal$$noop);
var result = parent._result;
if (state) {
var callback = arguments[state - 1];
$$asap$$default(function(){
$$$internal$$invokeCallback(state, child, callback, result);
});
} else {
$$$internal$$subscribe(parent, child, onFulfillment, onRejection);
}
return child;
},
/**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
```js
function findAuthor(){
throw new Error('couldn't find that author');
}
// synchronous
try {
findAuthor();
} catch(reason) {
// something went wrong
}
// async with promises
findAuthor().catch(function(reason){
// something went wrong
});
```
@method catch
@param {Function} onRejection
Useful for tooling.
@return {Promise}
*/
'catch': function(onRejection) {
return this.then(null, onRejection);
}
};
var $$es6$promise$polyfill$$default = function polyfill() {
var local;
if (typeof global !== 'undefined') {
local = global;
} else if (typeof window !== 'undefined' && window.document) {
local = window;
} else {
local = self;
}
var es6PromiseSupport =
"Promise" in local &&
// Some of these methods are missing from
// Firefox/Chrome experimental implementations
"resolve" in local.Promise &&
"reject" in local.Promise &&
"all" in local.Promise &&
"race" in local.Promise &&
// Older version of the spec had a resolver object
// as the arg rather than a function
(function() {
var resolve;
new local.Promise(function(r) { resolve = r; });
return $$utils$$isFunction(resolve);
}());
if (!es6PromiseSupport) {
local.Promise = $$es6$promise$promise$$default;
}
};
var es6$promise$umd$$ES6Promise = {
'Promise': $$es6$promise$promise$$default,
'polyfill': $$es6$promise$polyfill$$default
};
/* global define:true module:true window: true */
if ("function" === 'function' && __webpack_require__(51)['amd']) {
!(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return es6$promise$umd$$ES6Promise; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof module !== 'undefined' && module['exports']) {
module['exports'] = es6$promise$umd$$ES6Promise;
} else if (typeof this !== 'undefined') {
this['ES6Promise'] = es6$promise$umd$$ES6Promise;
}
}).call(this);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(50), (function() { return this; }()), __webpack_require__(52)(module)))
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
/**
* Array forEach
*/
function forEach(arr, callback, thisObj) {
if (arr == null) {
return;
}
var i = -1,
len = arr.length;
while (++i < len) {
// we iterate over sparse items since there is no way to make it
// work properly on IE 7-8. see #64
if ( callback.call(thisObj, arr[i], i, arr) === false ) {
break;
}
}
}
module.exports = forEach;
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
/**
* Create slice of source array or array-like object
*/
function slice(arr, start, end){
var len = arr.length;
if (start == null) {
start = 0;
} else if (start < 0) {
start = Math.max(len + start, 0);
} else {
start = Math.min(start, len);
}
if (end == null) {
end = len;
} else if (end < 0) {
end = Math.max(len + end, 0);
} else {
end = Math.min(end, len);
}
var result = [];
while (start < end) {
result.push(arr[start++]);
}
return result;
}
module.exports = slice;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
var indexOf = __webpack_require__(23);
/**
* If array contains values.
*/
function contains(arr, val) {
return indexOf(arr, val) !== -1;
}
module.exports = contains;
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
var indexOf = __webpack_require__(23);
/**
* Remove a single item from the array.
* (it won't remove duplicates, just a single item)
*/
function remove(arr, item){
var idx = indexOf(arr, item);
if (idx !== -1) arr.splice(idx, 1);
}
module.exports = remove;
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
/**
* Merge sort (http://en.wikipedia.org/wiki/Merge_sort)
*/
function mergeSort(arr, compareFn) {
if (arr == null) {
return [];
} else if (arr.length < 2) {
return arr;
}
if (compareFn == null) {
compareFn = defaultCompare;
}
var mid, left, right;
mid = ~~(arr.length / 2);
left = mergeSort( arr.slice(0, mid), compareFn );
right = mergeSort( arr.slice(mid, arr.length), compareFn );
return merge(left, right, compareFn);
}
function defaultCompare(a, b) {
return a < b ? -1 : (a > b? 1 : 0);
}
function merge(left, right, compareFn) {
var result = [];
while (left.length && right.length) {
if (compareFn(left[0], right[0]) <= 0) {
// if 0 it should preserve same order (stable)
result.push(left.shift());
} else {
result.push(right.shift());
}
}
if (left.length) {
result.push.apply(result, left);
}
if (right.length) {
result.push.apply(result, right);
}
return result;
}
module.exports = mergeSort;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
var hasOwn = __webpack_require__(24);
var forIn = __webpack_require__(25);
/**
* Similar to Array/forEach but works over object properties and fixes Don't
* Enum bug on IE.
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
*/
function forOwn(obj, fn, thisObj){
forIn(obj, function(val, key){
if (hasOwn(obj, key)) {
return fn.call(thisObj, obj[key], key, obj);
}
});
}
module.exports = forOwn;
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
var forOwn = __webpack_require__(15);
var isPlainObject = __webpack_require__(26);
/**
* Mixes objects into the target object, recursively mixing existing child
* objects.
*/
function deepMixIn(target, objects) {
var i = 0,
n = arguments.length,
obj;
while(++i < n){
obj = arguments[i];
if (obj) {
forOwn(obj, copyProp, target);
}
}
return target;
}
function copyProp(val, key) {
var existing = this[key];
if (isPlainObject(val) && isPlainObject(existing)) {
deepMixIn(existing, val);
} else {
this[key] = val;
}
}
module.exports = deepMixIn;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
var slice = __webpack_require__(11);
/**
* Return a copy of the object, filtered to only have values for the whitelisted keys.
*/
function pick(obj, var_keys){
var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1),
out = {},
i = 0, key;
while (key = keys[i++]) {
out[key] = obj[key];
}
return out;
}
module.exports = pick;
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
var isPrimitive = __webpack_require__(27);
/**
* get "nested" object property
*/
function get(obj, prop){
var parts = prop.split('.'),
last = parts.pop();
while (prop = parts.shift()) {
obj = obj[prop];
if (obj == null) return;
}
return obj[last];
}
module.exports = get;
/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {
var namespace = __webpack_require__(30);
/**
* set "nested" object property
*/
function set(obj, prop, val){
var parts = (/^(.+)\.(.+)$/).exec(prop);
if (parts){
namespace(obj, parts[1])[parts[2]] = val;
} else {
obj[prop] = val;
}
}
module.exports = set;
/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
var camelCase = __webpack_require__(29);
var upperCase = __webpack_require__(21);
/**
* camelCase + UPPERCASE first char
*/
function pascalCase(str){
str = toString(str);
return camelCase(str).replace(/^[a-z]/, upperCase);
}
module.exports = pascalCase;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
/**
* "Safer" String.toUpperCase()
*/
function upperCase(str){
str = toString(str);
return str.toUpperCase();
}
module.exports = upperCase;
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
/*!
* yabh
* @version 1.0.0 - Homepage <http://jmdobry.github.io/yabh/>
* @author Jason Dobry <jason.dobry@gmail.com>
* @copyright (c) 2015 Jason Dobry
* @license MIT <https://github.com/jmdobry/yabh/blob/master/LICENSE>
*
* @overview Yet another Binary Heap.
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(true)
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define(factory);
else if(typeof exports === 'object')
exports["BinaryHeap"] = factory();
else
root["BinaryHeap"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
/**
* @method bubbleUp
* @param {array} heap The heap.
* @param {function} weightFunc The weight function.
* @param {number} n The index of the element to bubble up.
*/
function bubbleUp(heap, weightFunc, n) {
var element = heap[n];
var weight = weightFunc(element);
// When at 0, an element can not go up any further.
while (n > 0) {
// Compute the parent element's index, and fetch it.
var parentN = Math.floor((n + 1) / 2) - 1;
var _parent = heap[parentN];
// If the parent has a lesser weight, things are in order and we
// are done.
if (weight >= weightFunc(_parent)) {
break;
} else {
heap[parentN] = element;
heap[n] = _parent;
n = parentN;
}
}
}
/**
* @method bubbleDown
* @param {array} heap The heap.
* @param {function} weightFunc The weight function.
* @param {number} n The index of the element to sink down.
*/
var bubbleDown = function (heap, weightFunc, n) {
var length = heap.length;
var node = heap[n];
var nodeWeight = weightFunc(node);
while (true) {
var child2N = (n + 1) * 2,
child1N = child2N - 1;
var swap = null;
if (child1N < length) {
var child1 = heap[child1N],
child1Weight = weightFunc(child1);
// If the score is less than our node's, we need to swap.
if (child1Weight < nodeWeight) {
swap = child1N;
}
}
// Do the same checks for the other child.
if (child2N < length) {
var child2 = heap[child2N],
child2Weight = weightFunc(child2);
if (child2Weight < (swap === null ? nodeWeight : weightFunc(heap[child1N]))) {
swap = child2N;
}
}
if (swap === null) {
break;
} else {
heap[n] = heap[swap];
heap[swap] = node;
n = swap;
}
}
};
var BinaryHeap = (function () {
function BinaryHeap(weightFunc, compareFunc) {
_classCallCheck(this, BinaryHeap);
if (!weightFunc) {
weightFunc = function (x) {
return x;
};
}
if (!compareFunc) {
compareFunc = function (x, y) {
return x === y;
};
}
if (typeof weightFunc !== "function") {
throw new Error("BinaryHeap([weightFunc][, compareFunc]): \"weightFunc\" must be a function!");
}
if (typeof compareFunc !== "function") {
throw new Error("BinaryHeap([weightFunc][, compareFunc]): \"compareFunc\" must be a function!");
}
this.weightFunc = weightFunc;
this.compareFunc = compareFunc;
this.heap = [];
}
_createClass(BinaryHeap, {
push: {
value: function push(node) {
this.heap.push(node);
bubbleUp(this.heap, this.weightFunc, this.heap.length - 1);
}
},
peek: {
value: function peek() {
return this.heap[0];
}
},
pop: {
value: function pop() {
var front = this.heap[0];
var end = this.heap.pop();
if (this.heap.length > 0) {
this.heap[0] = end;
bubbleDown(this.heap, this.weightFunc, 0);
}
return front;
}
},
remove: {
value: function remove(node) {
var length = this.heap.length;
for (var i = 0; i < length; i++) {
if (this.compareFunc(this.heap[i], node)) {
var removed = this.heap[i];
var end = this.heap.pop();
if (i !== length - 1) {
this.heap[i] = end;
bubbleUp(this.heap, this.weightFunc, i);
bubbleDown(this.heap, this.weightFunc, i);
}
return removed;
}
}
return null;
}
},
removeAll: {
value: function removeAll() {
this.heap = [];
}
},
size: {
value: function size() {
return this.heap.length;
}
}
});
return BinaryHeap;
})();
module.exports = BinaryHeap;
/***/ }
/******/ ])
});
;
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
/**
* Array.indexOf
*/
function indexOf(arr, item, fromIndex) {
fromIndex = fromIndex || 0;
if (arr == null) {
return -1;
}
var len = arr.length,
i = fromIndex < 0 ? len + fromIndex : fromIndex;
while (i < len) {
// we iterate over sparse items since there is no way to make it
// work properly on IE 7-8. see #64
if (arr[i] === item) {
return i;
}
i++;
}
return -1;
}
module.exports = indexOf;
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
/**
* Safer Object.hasOwnProperty
*/
function hasOwn(obj, prop){
return Object.prototype.hasOwnProperty.call(obj, prop);
}
module.exports = hasOwn;
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
var hasOwn = __webpack_require__(24);
var _hasDontEnumBug,
_dontEnums;
function checkDontEnum(){
_dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
_hasDontEnumBug = true;
for (var key in {'toString': null}) {
_hasDontEnumBug = false;
}
}
/**
* Similar to Array/forEach but works over object properties and fixes Don't
* Enum bug on IE.
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
*/
function forIn(obj, fn, thisObj){
var key, i = 0;
// no need to check if argument is a real object that way we can use
// it for arrays, functions, date, etc.
//post-pone check till needed
if (_hasDontEnumBug == null) checkDontEnum();
for (key in obj) {
if (exec(fn, obj, key, thisObj) === false) {
break;
}
}
if (_hasDontEnumBug) {
var ctor = obj.constructor,
isProto = !!ctor && obj === ctor.prototype;
while (key = _dontEnums[i++]) {
// For constructor, if it is a prototype object the constructor
// is always non-enumerable unless defined otherwise (and
// enumerated above). For non-prototype objects, it will have
// to be defined on this object, since it cannot be defined on
// any prototype objects.
//
// For other [[DontEnum]] properties, check if the value is
// different than Object prototype value.
if (
(key !== 'constructor' ||
(!isProto && hasOwn(obj, key))) &&
obj[key] !== Object.prototype[key]
) {
if (exec(fn, obj, key, thisObj) === false) {
break;
}
}
}
}
}
function exec(fn, obj, key, thisObj){
return fn.call(thisObj, obj[key], key, obj);
}
module.exports = forIn;
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
/**
* Checks if the value is created by the `Object` constructor.
*/
function isPlainObject(value) {
return (!!value && typeof value === 'object' &&
value.constructor === Object);
}
module.exports = isPlainObject;
/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {
/**
* Checks if the object is a primitive
*/
function isPrimitive(value) {
// Using switch fallthrough because it's simple to read and is
// generally fast: http://jsperf.com/testing-value-is-primitive/5
switch (typeof value) {
case "string":
case "number":
case "boolean":
return true;
}
return value == null;
}
module.exports = isPrimitive;
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
/**
* Typecast a value to a String, using an empty string value for null or
* undefined.
*/
function toString(val){
return val == null ? '' : val.toString();
}
module.exports = toString;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
var replaceAccents = __webpack_require__(53);
var removeNonWord = __webpack_require__(54);
var upperCase = __webpack_require__(21);
var lowerCase = __webpack_require__(55);
/**
* Convert string to camelCase text.
*/
function camelCase(str){
str = toString(str);
str = replaceAccents(str);
str = removeNonWord(str)
.replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces
.replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE
.replace(/\s+/g, '') //remove spaces
.replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase
return str;
}
module.exports = camelCase;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
var forEach = __webpack_require__(10);
/**
* Create nested object if non-existent
*/
function namespace(obj, path){
if (!path) return obj;
forEach(path.split('.'), function(key){
if (!obj[key]) {
obj[key] = {};
}
obj = obj[key];
});
return obj;
}
module.exports = namespace;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
module.exports = defineResource;
/*jshint evil:true, loopfunc:true*/
var DSUtils = _interopRequire(__webpack_require__(1));
var DSErrors = _interopRequire(__webpack_require__(2));
var Resource = function Resource(options) {
_classCallCheck(this, Resource);
DSUtils.deepMixIn(this, options);
if ("endpoint" in options) {
this.endpoint = options.endpoint;
} else {
this.endpoint = this.name;
}
};
var instanceMethods = ["compute", "refresh", "save", "update", "destroy", "loadRelations", "changeHistory", "changes", "hasChanges", "lastModified", "lastSaved", "link", "linkInverse", "previous", "unlinkInverse"];
function defineResource(definition) {
var _this = this;
var definitions = _this.defs;
if (DSUtils._s(definition)) {
definition = {
name: definition.replace(/\s/gi, "")
};
}
if (!DSUtils._o(definition)) {
throw DSUtils._oErr("definition");
} else if (!DSUtils._s(definition.name)) {
throw new DSErrors.IA("\"name\" must be a string!");
} else if (_this.s[definition.name]) {
throw new DSErrors.R("" + definition.name + " is already registered!");
}
try {
// Inherit from global defaults
Resource.prototype = _this.defaults;
definitions[definition.name] = new Resource(definition);
var def = definitions[definition.name];
// alias name, shaves 0.08 kb off the minified build
def.n = def.name;
def.logFn("Preparing resource.");
if (!DSUtils._s(def.idAttribute)) {
throw new DSErrors.IA("\"idAttribute\" must be a string!");
}
// Setup nested parent configuration
if (def.relations) {
def.relationList = [];
def.relationFields = [];
DSUtils.forOwn(def.relations, function (relatedModels, type) {
DSUtils.forOwn(relatedModels, function (defs, relationName) {
if (!DSUtils._a(defs)) {
relatedModels[relationName] = [defs];
}
DSUtils.forEach(relatedModels[relationName], function (d) {
d.type = type;
d.relation = relationName;
d.name = def.n;
def.relationList.push(d);
def.relationFields.push(d.localField);
});
});
});
if (def.relations.belongsTo) {
DSUtils.forOwn(def.relations.belongsTo, function (relatedModel, modelName) {
DSUtils.forEach(relatedModel, function (relation) {
if (relation.parent) {
def.parent = modelName;
def.parentKey = relation.localKey;
def.parentField = relation.localField;
}
});
});
}
if (typeof Object.freeze === "function") {
Object.freeze(def.relations);
Object.freeze(def.relationList);
}
}
def.getResource = function (resourceName) {
return _this.defs[resourceName];
};
def.getEndpoint = function (id, options) {
options.params = options.params || {};
var item = undefined;
var parentKey = def.parentKey;
var endpoint = options.hasOwnProperty("endpoint") ? options.endpoint : def.endpoint;
var parentField = def.parentField;
var parentDef = definitions[def.parent];
var parentId = options.params[parentKey];
if (parentId === false || !parentKey || !parentDef) {
if (parentId === false) {
delete options.params[parentKey];
}
return endpoint;
} else {
delete options.params[parentKey];
if (DSUtils._sn(id)) {
item = def.get(id);
} else if (DSUtils._o(id)) {
item = id;
}
if (item) {
parentId = parentId || item[parentKey] || (item[parentField] ? item[parentField][parentDef.idAttribute] : null);
}
if (parentId) {
var _ret = (function () {
delete options.endpoint;
var _options = {};
DSUtils.forOwn(options, function (value, key) {
_options[key] = value;
});
return {
v: DSUtils.makePath(parentDef.getEndpoint(parentId, DSUtils._(parentDef, _options)), parentId, endpoint)
};
})();
if (typeof _ret === "object") return _ret.v;
} else {
return endpoint;
}
}
};
// Remove this in v0.11.0 and make a breaking change notice
// the the `filter` option has been renamed to `defaultFilter`
if (def.filter) {
def.defaultFilter = def.filter;
delete def.filter;
}
// Create the wrapper class for the new resource
var _class = def["class"] = DSUtils.pascalCase(def.name);
try {
if (typeof def.useClass === "function") {
eval("function " + _class + "() { def.useClass.call(this); }");
def[_class] = eval(_class);
def[_class].prototype = (function (proto) {
function Ctor() {}
Ctor.prototype = proto;
return new Ctor();
})(def.useClass.prototype);
} else {
eval("function " + _class + "() {}");
def[_class] = eval(_class);
}
} catch (e) {
def[_class] = function () {};
}
// Apply developer-defined methods
if (def.methods) {
DSUtils.deepMixIn(def[_class].prototype, def.methods);
}
def[_class].prototype.set = function (key, value) {
DSUtils.set(this, key, value);
var observer = _this.s[def.n].observers[this[def.idAttribute]];
if (observer && !DSUtils.observe.hasObjectObserve) {
observer.deliver();
} else {
_this.compute(def.n, this);
}
return this;
};
def[_class].prototype.get = function (key) {
return DSUtils.get(this, key);
};
// Prepare for computed properties
if (def.computed) {
DSUtils.forOwn(def.computed, function (fn, field) {
if (DSUtils.isFunction(fn)) {
def.computed[field] = [fn];
fn = def.computed[field];
}
if (def.methods && field in def.methods) {
def.errorFn("Computed property \"" + field + "\" conflicts with previously defined prototype method!");
}
var deps;
if (fn.length === 1) {
var match = fn[0].toString().match(/function.*?\(([\s\S]*?)\)/);
deps = match[1].split(",");
def.computed[field] = deps.concat(fn);
fn = def.computed[field];
if (deps.length) {
def.errorFn("Use the computed property array syntax for compatibility with minified code!");
}
}
deps = fn.slice(0, fn.length - 1);
DSUtils.forEach(deps, function (val, index) {
deps[index] = val.trim();
});
fn.deps = DSUtils.filter(deps, function (dep) {
return !!dep;
});
});
}
if (definition.schema && _this.schemator) {
def.schema = _this.schemator.defineSchema(def.n, definition.schema);
if (!definition.hasOwnProperty("validate")) {
def.validate = function (resourceName, attrs, cb) {
def.schema.validate(attrs, {
ignoreMissing: def.ignoreMissing
}, function (err) {
if (err) {
return cb(err);
} else {
return cb(null, attrs);
}
});
};
}
}
DSUtils.forEach(instanceMethods, function (name) {
def[_class].prototype["DS" + DSUtils.pascalCase(name)] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
args.unshift(this[def.idAttribute] || this);
args.unshift(def.n);
return _this[name].apply(_this, args);
};
});
def[_class].prototype.DSCreate = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
args.unshift(this);
args.unshift(def.n);
return _this.create.apply(_this, args);
};
// Initialize store data for the new resource
_this.s[def.n] = {
collection: [],
expiresHeap: new DSUtils.BinaryHeap(function (x) {
return x.expires;
}, function (x, y) {
return x.item === y;
}),
completedQueries: {},
queryData: {},
pendingQueries: {},
index: {},
modified: {},
saved: {},
previousAttributes: {},
observers: {},
changeHistories: {},
changeHistory: [],
collectionModified: 0
};
if (def.reapInterval) {
setInterval(function () {
return _this.reap(def.n, { isInterval: true });
}, def.reapInterval);
}
// Proxy DS methods with shorthand ones
var fns = ["registerAdapter", "getAdapter", "is"];
for (var key in _this) {
if (typeof _this[key] === "function") {
fns.push(key);
}
}
DSUtils.forEach(fns, function (key) {
var k = key;
if (_this[k].shorthand !== false) {
def[k] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
args.unshift(def.n);
return _this[k].apply(_this, args);
};
} else {
def[k] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _this[k].apply(_this, args);
};
}
});
def.beforeValidate = DSUtils.promisify(def.beforeValidate);
def.validate = DSUtils.promisify(def.validate);
def.afterValidate = DSUtils.promisify(def.afterValidate);
def.beforeCreate = DSUtils.promisify(def.beforeCreate);
def.afterCreate = DSUtils.promisify(def.afterCreate);
def.beforeUpdate = DSUtils.promisify(def.beforeUpdate);
def.afterUpdate = DSUtils.promisify(def.afterUpdate);
def.beforeDestroy = DSUtils.promisify(def.beforeDestroy);
def.afterDestroy = DSUtils.promisify(def.afterDestroy);
DSUtils.forOwn(def.actions, function (action, name) {
if (def[name] && !def.actions[name]) {
throw new Error("Cannot override existing method \"" + name + "\"!");
}
def[name] = function (options) {
options = options || {};
var adapter = _this.getAdapter(action.adapter || "http");
var config = DSUtils.deepMixIn({}, action);
if (!options.hasOwnProperty("endpoint") && config.endpoint) {
options.endpoint = config.endpoint;
}
if (typeof options.getEndpoint === "function") {
config.url = options.getEndpoint(def, options);
} else {
config.url = DSUtils.makePath(options.basePath || adapter.defaults.basePath || def.basePath, def.getEndpoint(null, options), name);
}
config.method = config.method || "GET";
DSUtils.deepMixIn(config, options);
return adapter.HTTP(config);
};
});
// Mix-in events
DSUtils.Events(def);
def.logFn("Done preparing resource.");
return def;
} catch (err) {
delete definitions[definition.name];
delete _this.s[definition.name];
throw err;
}
}
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
module.exports = eject;
function eject(resourceName, id, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
var item = undefined;
var found = false;
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
}
options = DSUtils._(definition, options);
options.logFn("eject", id, options);
for (var i = 0; i < resource.collection.length; i++) {
if (resource.collection[i][definition.idAttribute] == id) {
// jshint ignore:line
item = resource.collection[i];
resource.expiresHeap.remove(item);
found = true;
break;
}
}
if (found) {
var _ret = (function () {
if (options.notify) {
definition.beforeEject(options, item);
definition.emit("DS.beforeEject", definition, item);
}
_this.unlinkInverse(definition.n, id);
resource.collection.splice(i, 1);
if (DSUtils.w) {
resource.observers[id].close();
}
delete resource.observers[id];
delete resource.index[id];
delete resource.previousAttributes[id];
delete resource.completedQueries[id];
delete resource.pendingQueries[id];
DSUtils.forEach(resource.changeHistories[id], function (changeRecord) {
DSUtils.remove(resource.changeHistory, changeRecord);
});
var toRemove = [];
DSUtils.forOwn(resource.queryData, function (items, queryHash) {
if (items.$$injected) {
DSUtils.remove(items, item);
}
if (!items.length) {
toRemove.push(queryHash);
}
});
DSUtils.forEach(toRemove, function (queryHash) {
delete resource.completedQueries[queryHash];
delete resource.queryData[queryHash];
});
delete resource.changeHistories[id];
delete resource.modified[id];
delete resource.saved[id];
resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified);
if (options.notify) {
definition.afterEject(options, item);
definition.emit("DS.afterEject", definition, item);
}
return {
v: item
};
})();
if (typeof _ret === "object") {
return _ret.v;
}
}
}
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
module.exports = ejectAll;
function ejectAll(resourceName, params, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
params = params || {};
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._o(params)) {
throw DSUtils._oErr("params");
}
definition.logFn("ejectAll", params, options);
var resource = _this.s[resourceName];
var queryHash = DSUtils.toJson(params);
var items = _this.filter(definition.n, params);
var ids = [];
if (DSUtils.isEmpty(params)) {
resource.completedQueries = {};
} else {
delete resource.completedQueries[queryHash];
}
DSUtils.forEach(items, function (item) {
if (item && item[definition.idAttribute]) {
ids.push(item[definition.idAttribute]);
}
});
DSUtils.forEach(ids, function (id) {
_this.eject(definition.n, id, options);
});
resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified);
return items;
}
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
module.exports = filter;
function filter(resourceName, params, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (params && !DSUtils._o(params)) {
throw DSUtils._oErr("params");
}
// Protect against null
params = params || {};
options = DSUtils._(definition, options);
options.logFn("filter", params, options);
var queryHash = DSUtils.toJson(params);
if (!(queryHash in resource.completedQueries) && options.loadFromServer) {
// This particular query has never been completed
if (!resource.pendingQueries[queryHash]) {
// This particular query has never even been started
_this.findAll(resourceName, params, options);
}
}
return definition.defaultFilter.call(_this, resource.collection, resourceName, params, options);
}
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
module.exports = inject;
var DSUtils = _interopRequire(__webpack_require__(1));
var DSErrors = _interopRequire(__webpack_require__(2));
function _getReactFunction(DS, definition, resource) {
var name = definition.n;
return function _react(added, removed, changed, oldValueFn, firstTime) {
var target = this;
var item = undefined;
var innerId = oldValueFn && oldValueFn(definition.idAttribute) ? oldValueFn(definition.idAttribute) : target[definition.idAttribute];
DSUtils.forEach(definition.relationFields, function (field) {
delete added[field];
delete removed[field];
delete changed[field];
});
if (!DSUtils.isEmpty(added) || !DSUtils.isEmpty(removed) || !DSUtils.isEmpty(changed) || firstTime) {
item = DS.get(name, innerId);
resource.modified[innerId] = DSUtils.updateTimestamp(resource.modified[innerId]);
resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified);
if (definition.keepChangeHistory) {
var changeRecord = {
resourceName: name,
target: item,
added: added,
removed: removed,
changed: changed,
timestamp: resource.modified[innerId]
};
resource.changeHistories[innerId].push(changeRecord);
resource.changeHistory.push(changeRecord);
}
}
if (definition.computed) {
item = item || DS.get(name, innerId);
DSUtils.forOwn(definition.computed, function (fn, field) {
var compute = false;
// check if required fields changed
DSUtils.forEach(fn.deps, function (dep) {
if (dep in added || dep in removed || dep in changed || !(field in item)) {
compute = true;
}
});
compute = compute || !fn.deps.length;
if (compute) {
DSUtils.compute.call(item, fn, field);
}
});
}
if (definition.relations) {
item = item || DS.get(name, innerId);
DSUtils.forEach(definition.relationList, function (def) {
if (item[def.localField] && (def.localKey in added || def.localKey in removed || def.localKey in changed)) {
DS.link(name, item[definition.idAttribute], [def.relation]);
}
});
}
if (definition.idAttribute in changed) {
definition.errorFn("Doh! You just changed the primary key of an object! Your data for the \"" + name + "\" resource is now in an undefined (probably broken) state.");
}
};
}
function _inject(definition, resource, attrs, options) {
var _this = this;
var _react = _getReactFunction(_this, definition, resource, attrs, options);
var injected = undefined;
if (DSUtils._a(attrs)) {
injected = [];
for (var i = 0; i < attrs.length; i++) {
injected.push(_inject.call(_this, definition, resource, attrs[i], options));
}
} else {
// check if "idAttribute" is a computed property
var c = definition.computed;
var idA = definition.idAttribute;
if (c && c[idA]) {
(function () {
var args = [];
DSUtils.forEach(c[idA].deps, function (dep) {
args.push(attrs[dep]);
});
attrs[idA] = c[idA][c[idA].length - 1].apply(attrs, args);
})();
}
if (!(idA in attrs)) {
var error = new DSErrors.R("" + definition.n + ".inject: \"attrs\" must contain the property specified by \"idAttribute\"!");
options.errorFn(error);
throw error;
} else {
try {
DSUtils.forEach(definition.relationList, function (def) {
var relationName = def.relation;
var relationDef = _this.defs[relationName];
var toInject = attrs[def.localField];
if (toInject) {
if (!relationDef) {
throw new DSErrors.R("" + definition.n + " relation is defined but the resource is not!");
}
if (DSUtils._a(toInject)) {
(function () {
var items = [];
DSUtils.forEach(toInject, function (toInjectItem) {
if (toInjectItem !== _this.s[relationName].index[toInjectItem[relationDef.idAttribute]]) {
try {
var injectedItem = _this.inject(relationName, toInjectItem, options.orig());
if (def.foreignKey) {
injectedItem[def.foreignKey] = attrs[definition.idAttribute];
}
items.push(injectedItem);
} catch (err) {
options.errorFn(err, "Failed to inject " + def.type + " relation: \"" + relationName + "\"!");
}
}
});
attrs[def.localField] = items;
})();
} else {
if (toInject !== _this.s[relationName].index[toInject[relationDef.idAttribute]]) {
try {
attrs[def.localField] = _this.inject(relationName, attrs[def.localField], options.orig());
if (def.foreignKey) {
attrs[def.localField][def.foreignKey] = attrs[definition.idAttribute];
}
} catch (err) {
options.errorFn(err, "Failed to inject " + def.type + " relation: \"" + relationName + "\"!");
}
}
}
}
});
var id = attrs[idA];
var item = _this.get(definition.n, id);
var initialLastModified = item ? resource.modified[id] : 0;
if (!item) {
if (options.useClass) {
if (attrs instanceof definition[definition["class"]]) {
item = attrs;
} else {
item = new definition[definition["class"]]();
}
} else {
item = {};
}
DSUtils.deepMixIn(item, attrs);
resource.collection.push(item);
resource.changeHistories[id] = [];
if (DSUtils.w) {
resource.observers[id] = new _this.observe.ObjectObserver(item);
resource.observers[id].open(_react, item);
}
resource.index[id] = item;
_react.call(item, {}, {}, {}, null, true);
resource.previousAttributes[id] = DSUtils.copy(item, null, null, null, definition.relationFields);
} else {
DSUtils.deepMixIn(item, attrs);
if (definition.resetHistoryOnInject) {
resource.previousAttributes[id] = DSUtils.copy(item, null, null, null, definition.relationFields);
if (resource.changeHistories[id].length) {
DSUtils.forEach(resource.changeHistories[id], function (changeRecord) {
DSUtils.remove(resource.changeHistory, changeRecord);
});
resource.changeHistories[id].splice(0, resource.changeHistories[id].length);
}
}
if (DSUtils.w) {
resource.observers[id].deliver();
}
}
resource.modified[id] = initialLastModified && resource.modified[id] === initialLastModified ? DSUtils.updateTimestamp(resource.modified[id]) : resource.modified[id];
resource.expiresHeap.remove(item);
var timestamp = new Date().getTime();
resource.expiresHeap.push({
item: item,
timestamp: timestamp,
expires: definition.maxAge ? timestamp + definition.maxAge : Number.MAX_VALUE
});
injected = item;
} catch (err) {
options.errorFn(err, attrs);
}
}
}
return injected;
}
function _link(definition, injected, options) {
var _this = this;
DSUtils.forEach(definition.relationList, function (def) {
if (options.findBelongsTo && def.type === "belongsTo" && injected[definition.idAttribute]) {
_this.link(definition.n, injected[definition.idAttribute], [def.relation]);
} else if (options.findHasMany && def.type === "hasMany" || options.findHasOne && def.type === "hasOne") {
_this.link(definition.n, injected[definition.idAttribute], [def.relation]);
}
});
}
function inject(resourceName, attrs, options) {
var _this = this;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
var injected = undefined;
if (!definition) {
throw new DSErrors.NER(resourceName);
} else if (!DSUtils._o(attrs) && !DSUtils._a(attrs)) {
throw new DSErrors.IA("" + resourceName + ".inject: \"attrs\" must be an object or an array!");
}
var name = definition.n;
options = DSUtils._(definition, options);
options.logFn("inject", attrs, options);
if (options.notify) {
options.beforeInject(options, attrs);
definition.emit("DS.beforeInject", definition, attrs);
}
injected = _inject.call(_this, definition, resource, attrs, options);
resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified);
if (options.findInverseLinks) {
if (DSUtils._a(injected)) {
if (injected.length) {
_this.linkInverse(name, injected[0][definition.idAttribute]);
}
} else {
_this.linkInverse(name, injected[definition.idAttribute]);
}
}
if (DSUtils._a(injected)) {
DSUtils.forEach(injected, function (injectedI) {
_link.call(_this, definition, injectedI, options);
});
} else {
_link.call(_this, definition, injected, options);
}
if (options.notify) {
options.afterInject(options, injected);
definition.emit("DS.afterInject", definition, injected);
}
return injected;
}
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
module.exports = link;
function link(resourceName, id, relations) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
relations = relations || [];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
} else if (!DSUtils._a(relations)) {
throw DSUtils._aErr("relations");
}
definition.logFn("link", id, relations);
var linked = _this.get(resourceName, id);
if (linked) {
DSUtils.forEach(definition.relationList, function (def) {
var relationName = def.relation;
if (relations.length && !DSUtils.contains(relations, relationName)) {
return;
}
var params = {};
if (def.type === "belongsTo") {
var _parent = linked[def.localKey] ? _this.get(relationName, linked[def.localKey]) : null;
if (_parent) {
linked[def.localField] = _parent;
}
} else if (def.type === "hasMany") {
params[def.foreignKey] = linked[definition.idAttribute];
linked[def.localField] = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true });
} else if (def.type === "hasOne") {
params[def.foreignKey] = linked[definition.idAttribute];
var children = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true });
if (children.length) {
linked[def.localField] = children[0];
}
}
});
}
return linked;
}
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
module.exports = linkAll;
function linkAll(resourceName, params, relations) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
relations = relations || [];
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._a(relations)) {
throw DSUtils._aErr("relations");
}
definition.logFn("linkAll", params, relations);
var linked = _this.filter(resourceName, params);
if (linked) {
DSUtils.forEach(definition.relationList, function (def) {
var relationName = def.relation;
if (relations.length && !DSUtils.contains(relations, relationName)) {
return;
}
if (def.type === "belongsTo") {
DSUtils.forEach(linked, function (injectedItem) {
var parent = injectedItem[def.localKey] ? _this.get(relationName, injectedItem[def.localKey]) : null;
if (parent) {
injectedItem[def.localField] = parent;
}
});
} else if (def.type === "hasMany") {
DSUtils.forEach(linked, function (injectedItem) {
var params = {};
params[def.foreignKey] = injectedItem[definition.idAttribute];
injectedItem[def.localField] = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true });
});
} else if (def.type === "hasOne") {
DSUtils.forEach(linked, function (injectedItem) {
var params = {};
params[def.foreignKey] = injectedItem[definition.idAttribute];
var children = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true });
if (children.length) {
injectedItem[def.localField] = children[0];
}
});
}
});
}
return linked;
}
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
module.exports = linkInverse;
function linkInverse(resourceName, id, relations) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
relations = relations || [];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
} else if (!DSUtils._a(relations)) {
throw DSUtils._aErr("relations");
}
definition.logFn("linkInverse", id, relations);
var linked = _this.get(resourceName, id);
if (linked) {
DSUtils.forOwn(_this.defs, function (d) {
DSUtils.forOwn(d.relations, function (relatedModels) {
DSUtils.forOwn(relatedModels, function (defs, relationName) {
if (relations.length && !DSUtils.contains(relations, d.n)) {
return;
}
if (definition.n === relationName) {
_this.linkAll(d.n, {}, [definition.n]);
}
});
});
});
}
return linked;
}
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
module.exports = unlinkInverse;
function unlinkInverse(resourceName, id, relations) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
relations = relations || [];
id = DSUtils.resolveId(definition, id);
if (!definition) {
throw new _this.errors.NER(resourceName);
} else if (!DSUtils._sn(id)) {
throw DSUtils._snErr("id");
} else if (!DSUtils._a(relations)) {
throw DSUtils._aErr("relations");
}
definition.logFn("unlinkInverse", id, relations);
var linked = _this.get(resourceName, id);
if (linked) {
DSUtils.forOwn(_this.defs, function (d) {
DSUtils.forOwn(d.relations, function (relatedModels) {
DSUtils.forOwn(relatedModels, function (defs, relationName) {
if (definition.n === relationName) {
DSUtils.forEach(defs, function (def) {
DSUtils.forEach(_this.s[def.name].collection, function (item) {
if (def.type === "hasMany" && item[def.localField]) {
(function () {
var index = undefined;
DSUtils.forEach(item[def.localField], function (subItem, i) {
if (subItem === linked) {
index = i;
}
});
if (index !== undefined) {
item[def.localField].splice(index, 1);
}
})();
} else if (item[def.localField] === linked) {
delete item[def.localField];
}
});
});
}
});
});
});
}
return linked;
}
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
module.exports = create;
function create(resourceName, attrs, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
options = options || {};
attrs = attrs || {};
var rejectionError = undefined;
if (!definition) {
rejectionError = new _this.errors.NER(resourceName);
} else if (!DSUtils._o(attrs)) {
rejectionError = DSUtils._oErr("attrs");
} else {
options = DSUtils._(definition, options);
if (options.upsert && DSUtils._sn(attrs[definition.idAttribute])) {
return _this.update(resourceName, attrs[definition.idAttribute], attrs, options);
}
options.logFn("create", attrs, options);
}
return new DSUtils.Promise(function (resolve, reject) {
if (rejectionError) {
reject(rejectionError);
} else {
resolve(attrs);
}
}).then(function (attrs) {
return options.beforeValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.validate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.afterValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.beforeCreate.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.beforeCreate", definition, attrs);
}
return _this.getAdapter(options).create(definition, attrs, options);
}).then(function (attrs) {
return options.afterCreate.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.afterCreate", definition, attrs);
}
if (options.cacheResponse) {
var created = _this.inject(definition.n, attrs, options.orig());
var id = created[definition.idAttribute];
var resource = _this.s[resourceName];
resource.completedQueries[id] = new Date().getTime();
resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]);
return created;
} else {
return _this.createInstance(resourceName, attrs, options);
}
});
}
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
module.exports = destroy;
function destroy(resourceName, id, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var item = undefined;
return new DSUtils.Promise(function (resolve, reject) {
id = DSUtils.resolveId(definition, id);
if (!definition) {
reject(new _this.errors.NER(resourceName));
} else if (!DSUtils._sn(id)) {
reject(DSUtils._snErr("id"));
} else {
item = _this.get(resourceName, id) || { id: id };
options = DSUtils._(definition, options);
options.logFn("destroy", id, options);
resolve(item);
}
}).then(function (attrs) {
return options.beforeDestroy.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.beforeDestroy", definition, attrs);
}
if (options.eagerEject) {
_this.eject(resourceName, id);
}
return _this.getAdapter(options).destroy(definition, id, options);
}).then(function () {
return options.afterDestroy.call(item, options, item);
}).then(function (item) {
if (options.notify) {
definition.emit("DS.afterDestroy", definition, item);
}
_this.eject(resourceName, id);
return id;
})["catch"](function (err) {
if (options && options.eagerEject && item) {
_this.inject(resourceName, item, { notify: false });
}
throw err;
});
}
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
module.exports = destroyAll;
function destroyAll(resourceName, params, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var ejected = undefined,
toEject = undefined;
params = params || {};
return new DSUtils.Promise(function (resolve, reject) {
if (!definition) {
reject(new _this.errors.NER(resourceName));
} else if (!DSUtils._o(params)) {
reject(DSUtils._oErr("attrs"));
} else {
options = DSUtils._(definition, options);
options.logFn("destroyAll", params, options);
resolve();
}
}).then(function () {
toEject = _this.defaults.defaultFilter.call(_this, resourceName, params);
return options.beforeDestroy(options, toEject);
}).then(function () {
if (options.notify) {
definition.emit("DS.beforeDestroy", definition, toEject);
}
if (options.eagerEject) {
ejected = _this.ejectAll(resourceName, params);
}
return _this.getAdapter(options).destroyAll(definition, params, options);
}).then(function () {
return options.afterDestroy(options, toEject);
}).then(function () {
if (options.notify) {
definition.emit("DS.afterDestroy", definition, toEject);
}
return ejected || _this.ejectAll(resourceName, params);
})["catch"](function (err) {
if (options && options.eagerEject && ejected) {
_this.inject(resourceName, ejected, { notify: false });
}
throw err;
});
}
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
/* jshint -W082 */
module.exports = find;
function find(resourceName, id, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
return new DSUtils.Promise(function (resolve, reject) {
if (!definition) {
reject(new _this.errors.NER(resourceName));
} else if (!DSUtils._sn(id)) {
reject(DSUtils._snErr("id"));
} else {
options = DSUtils._(definition, options);
options.logFn("find", id, options);
if (options.params) {
options.params = DSUtils.copy(options.params);
}
if (options.bypassCache || !options.cacheResponse) {
delete resource.completedQueries[id];
}
if (id in resource.completedQueries && _this.get(resourceName, id)) {
resolve(_this.get(resourceName, id));
} else {
delete resource.completedQueries[id];
resolve();
}
}
}).then(function (item) {
if (!item) {
if (!(id in resource.pendingQueries)) {
var promise = undefined;
var strategy = options.findStrategy || options.strategy;
if (strategy === "fallback") {
(function () {
var makeFallbackCall = function (index) {
return _this.getAdapter((options.findFallbackAdapters || options.fallbackAdapters)[index]).find(definition, id, options)["catch"](function (err) {
index++;
if (index < options.fallbackAdapters.length) {
return makeFallbackCall(index);
} else {
return DSUtils.Promise.reject(err);
}
});
};
promise = makeFallbackCall(0);
})();
} else {
promise = _this.getAdapter(options).find(definition, id, options);
}
resource.pendingQueries[id] = promise.then(function (data) {
// Query is no longer pending
delete resource.pendingQueries[id];
if (options.cacheResponse) {
var injected = _this.inject(resourceName, data, options.orig());
resource.completedQueries[id] = new Date().getTime();
resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]);
return injected;
} else {
return _this.createInstance(resourceName, data, options.orig());
}
});
}
return resource.pendingQueries[id];
} else {
return item;
}
})["catch"](function (err) {
if (resource) {
delete resource.pendingQueries[id];
}
throw err;
});
}
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
module.exports = findAll;
/* jshint -W082 */
function processResults(data, resourceName, queryHash, options) {
var _this = this;
var DSUtils = _this.utils;
var resource = _this.s[resourceName];
var idAttribute = _this.defs[resourceName].idAttribute;
var date = new Date().getTime();
data = data || [];
// Query is no longer pending
delete resource.pendingQueries[queryHash];
resource.completedQueries[queryHash] = date;
// Update modified timestamp of collection
resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified);
// Merge the new values into the cache
var injected = _this.inject(resourceName, data, options.orig());
// Make sure each object is added to completedQueries
if (DSUtils._a(injected)) {
DSUtils.forEach(injected, function (item) {
if (item) {
var id = item[idAttribute];
if (id) {
resource.completedQueries[id] = date;
resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]);
}
}
});
} else {
options.errorFn("response is expected to be an array!");
resource.completedQueries[injected[idAttribute]] = date;
}
return injected;
}
function findAll(resourceName, params, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
var queryHash = undefined;
return new DSUtils.Promise(function (resolve, reject) {
params = params || {};
if (!_this.defs[resourceName]) {
reject(new _this.errors.NER(resourceName));
} else if (!DSUtils._o(params)) {
reject(DSUtils._oErr("params"));
} else {
options = DSUtils._(definition, options);
queryHash = DSUtils.toJson(params);
options.logFn("findAll", params, options);
if (options.params) {
options.params = DSUtils.copy(options.params);
}
if (options.bypassCache || !options.cacheResponse) {
delete resource.completedQueries[queryHash];
delete resource.queryData[queryHash];
}
if (queryHash in resource.completedQueries) {
if (options.useFilter) {
resolve(_this.filter(resourceName, params, options.orig()));
} else {
resolve(resource.queryData[queryHash]);
}
} else {
resolve();
}
}
}).then(function (items) {
if (!(queryHash in resource.completedQueries)) {
if (!(queryHash in resource.pendingQueries)) {
var promise = undefined;
var strategy = options.findAllStrategy || options.strategy;
if (strategy === "fallback") {
(function () {
var makeFallbackCall = function (index) {
return _this.getAdapter((options.findAllFallbackAdapters || options.fallbackAdapters)[index]).findAll(definition, params, options)["catch"](function (err) {
index++;
if (index < options.fallbackAdapters.length) {
return makeFallbackCall(index);
} else {
return Promise.reject(err);
}
});
};
promise = makeFallbackCall(0);
})();
} else {
promise = _this.getAdapter(options).findAll(definition, params, options);
}
resource.pendingQueries[queryHash] = promise.then(function (data) {
delete resource.pendingQueries[queryHash];
if (options.cacheResponse) {
resource.queryData[queryHash] = processResults.call(_this, data, resourceName, queryHash, options);
resource.queryData[queryHash].$$injected = true;
return resource.queryData[queryHash];
} else {
DSUtils.forEach(data, function (item, i) {
data[i] = _this.createInstance(resourceName, item, options.orig());
});
return data;
}
});
}
return resource.pendingQueries[queryHash];
} else {
return items;
}
})["catch"](function (err) {
if (resource) {
delete resource.pendingQueries[queryHash];
}
throw err;
});
}
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
module.exports = loadRelations;
function loadRelations(resourceName, instance, relations, options) {
var _this = this;
var DSUtils = _this.utils;
var DSErrors = _this.errors;
var definition = _this.defs[resourceName];
var fields = [];
return new DSUtils.Promise(function (resolve, reject) {
if (DSUtils._sn(instance)) {
instance = _this.get(resourceName, instance);
}
if (DSUtils._s(relations)) {
relations = [relations];
}
if (!definition) {
reject(new DSErrors.NER(resourceName));
} else if (!DSUtils._o(instance)) {
reject(new DSErrors.IA("\"instance(id)\" must be a string, number or object!"));
} else if (!DSUtils._a(relations)) {
reject(new DSErrors.IA("\"relations\" must be a string or an array!"));
} else {
(function () {
var _options = DSUtils._(definition, options);
if (!_options.hasOwnProperty("findBelongsTo")) {
_options.findBelongsTo = true;
}
if (!_options.hasOwnProperty("findHasMany")) {
_options.findHasMany = true;
}
_options.logFn("loadRelations", instance, relations, _options);
var tasks = [];
DSUtils.forEach(definition.relationList, function (def) {
var relationName = def.relation;
var relationDef = definition.getResource(relationName);
var __options = DSUtils._(relationDef, options);
if (DSUtils.contains(relations, relationName) || DSUtils.contains(relations, def.localField)) {
var task = undefined;
var params = {};
if (__options.allowSimpleWhere) {
params[def.foreignKey] = instance[definition.idAttribute];
} else {
params.where = {};
params.where[def.foreignKey] = {
"==": instance[definition.idAttribute]
};
}
if (def.type === "hasMany" && params[def.foreignKey]) {
task = _this.findAll(relationName, params, __options.orig());
} else if (def.type === "hasOne") {
if (def.localKey && instance[def.localKey]) {
task = _this.find(relationName, instance[def.localKey], __options.orig());
} else if (def.foreignKey && params[def.foreignKey]) {
task = _this.findAll(relationName, params, __options.orig()).then(function (hasOnes) {
return hasOnes.length ? hasOnes[0] : null;
});
}
} else if (instance[def.localKey]) {
task = _this.find(relationName, instance[def.localKey], options);
}
if (task) {
tasks.push(task);
fields.push(def.localField);
}
}
});
resolve(tasks);
})();
}
}).then(function (tasks) {
return DSUtils.Promise.all(tasks);
}).then(function (loadedRelations) {
DSUtils.forEach(fields, function (field, index) {
instance[field] = loadedRelations[index];
});
return instance;
});
}
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
module.exports = reap;
function reap(resourceName, options) {
var _this = this;
var DSUtils = _this.utils;
var definition = _this.defs[resourceName];
var resource = _this.s[resourceName];
return new DSUtils.Promise(function (resolve, reject) {
if (!definition) {
reject(new _this.errors.NER(resourceName));
} else {
options = DSUtils._(definition, options);
if (!options.hasOwnProperty("notify")) {
options.notify = false;
}
options.logFn("reap", options);
var items = [];
var now = new Date().getTime();
var expiredItem = undefined;
while ((expiredItem = resource.expiresHeap.peek()) && expiredItem.expires < now) {
items.push(expiredItem.item);
delete expiredItem.item;
resource.expiresHeap.pop();
}
resolve(items);
}
}).then(function (items) {
if (options.isInterval || options.notify) {
definition.beforeReap(options, items);
definition.emit("DS.beforeReap", definition, items);
}
if (options.reapAction === "inject") {
(function () {
var timestamp = new Date().getTime();
DSUtils.forEach(items, function (item) {
resource.expiresHeap.push({
item: item,
timestamp: timestamp,
expires: definition.maxAge ? timestamp + definition.maxAge : Number.MAX_VALUE
});
});
})();
} else if (options.reapAction === "eject") {
DSUtils.forEach(items, function (item) {
_this.eject(resourceName, item[definition.idAttribute]);
});
} else if (options.reapAction === "refresh") {
var _ret2 = (function () {
var tasks = [];
DSUtils.forEach(items, function (item) {
tasks.push(_this.refresh(resourceName, item[definition.idAttribute]));
});
return {
v: DSUtils.Promise.all(tasks)
};
})();
if (typeof _ret2 === "object") return _ret2.v;
}
return items;
}).then(function (items) {
if (options.isInterval || options.notify) {
definition.afterReap(options, items);
definition.emit("DS.afterReap", definition, items);
}
return items;
});
}
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
module.exports = save;
function save(resourceName, id, options) {
var _this = this;
var DSUtils = _this.utils;
var DSErrors = _this.errors;
var definition = _this.defs[resourceName];
var item = undefined;
var noChanges = undefined;
return new DSUtils.Promise(function (resolve, reject) {
id = DSUtils.resolveId(definition, id);
if (!definition) {
reject(new DSErrors.NER(resourceName));
} else if (!DSUtils._sn(id)) {
reject(DSUtils._snErr("id"));
} else if (!_this.get(resourceName, id)) {
reject(new DSErrors.R("id \"" + id + "\" not found in cache!"));
} else {
item = _this.get(resourceName, id);
options = DSUtils._(definition, options);
options.logFn("save", id, options);
resolve(item);
}
}).then(function (attrs) {
return options.beforeValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.validate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.afterValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.beforeUpdate.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.beforeUpdate", definition, attrs);
}
if (options.changesOnly) {
var resource = _this.s[resourceName];
if (DSUtils.w) {
resource.observers[id].deliver();
}
var toKeep = [];
var changes = _this.changes(resourceName, id);
for (var key in changes.added) {
toKeep.push(key);
}
for (key in changes.changed) {
toKeep.push(key);
}
changes = DSUtils.pick(attrs, toKeep);
if (DSUtils.isEmpty(changes)) {
// no changes, return
options.logFn("save - no changes", id, options);
noChanges = true;
return attrs;
} else {
attrs = changes;
}
}
return _this.getAdapter(options).update(definition, id, attrs, options);
}).then(function (data) {
return options.afterUpdate.call(data, options, data);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.afterUpdate", definition, attrs);
}
if (noChanges) {
return attrs;
} else if (options.cacheResponse) {
var injected = _this.inject(definition.n, attrs, options.orig());
var resource = _this.s[resourceName];
var _id = injected[definition.idAttribute];
resource.saved[_id] = DSUtils.updateTimestamp(resource.saved[_id]);
if (!definition.resetHistoryOnInject) {
resource.previousAttributes[_id] = DSUtils.copy(injected, null, null, null, definition.relationFields);
}
return injected;
} else {
return _this.createInstance(resourceName, attrs, options.orig());
}
});
}
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
module.exports = update;
function update(resourceName, id, attrs, options) {
var _this = this;
var DSUtils = _this.utils;
var DSErrors = _this.errors;
var definition = _this.defs[resourceName];
return new DSUtils.Promise(function (resolve, reject) {
id = DSUtils.resolveId(definition, id);
if (!definition) {
reject(new DSErrors.NER(resourceName));
} else if (!DSUtils._sn(id)) {
reject(DSUtils._snErr("id"));
} else {
options = DSUtils._(definition, options);
options.logFn("update", id, attrs, options);
resolve(attrs);
}
}).then(function (attrs) {
return options.beforeValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.validate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.afterValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.beforeUpdate.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.beforeUpdate", definition, attrs);
}
return _this.getAdapter(options).update(definition, id, attrs, options);
}).then(function (data) {
return options.afterUpdate.call(data, options, data);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.afterUpdate", definition, attrs);
}
if (options.cacheResponse) {
var injected = _this.inject(definition.n, attrs, options.orig());
var resource = _this.s[resourceName];
var _id = injected[definition.idAttribute];
resource.saved[_id] = DSUtils.updateTimestamp(resource.saved[_id]);
if (!definition.resetHistoryOnInject) {
resource.previousAttributes[_id] = DSUtils.copy(injected, null, null, null, definition.relationFields);
}
return injected;
} else {
return _this.createInstance(resourceName, attrs, options.orig());
}
});
}
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
module.exports = updateAll;
function updateAll(resourceName, attrs, params, options) {
var _this = this;
var DSUtils = _this.utils;
var DSErrors = _this.errors;
var definition = _this.defs[resourceName];
return new DSUtils.Promise(function (resolve, reject) {
if (!definition) {
reject(new DSErrors.NER(resourceName));
} else {
options = DSUtils._(definition, options);
options.logFn("updateAll", attrs, params, options);
resolve(attrs);
}
}).then(function (attrs) {
return options.beforeValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.validate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.afterValidate.call(attrs, options, attrs);
}).then(function (attrs) {
return options.beforeUpdate.call(attrs, options, attrs);
}).then(function (attrs) {
if (options.notify) {
definition.emit("DS.beforeUpdate", definition, attrs);
}
return _this.getAdapter(options).updateAll(definition, attrs, params, options);
}).then(function (data) {
return options.afterUpdate.call(data, options, data);
}).then(function (data) {
if (options.notify) {
definition.emit("DS.afterUpdate", definition, attrs);
}
var origOptions = options.orig();
if (options.cacheResponse) {
var _ret = (function () {
var injected = _this.inject(definition.n, data, origOptions);
var resource = _this.s[resourceName];
DSUtils.forEach(injected, function (i) {
var id = i[definition.idAttribute];
resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]);
if (!definition.resetHistoryOnInject) {
resource.previousAttributes[id] = DSUtils.copy(i, null, null, null, definition.relationFields);
}
});
return {
v: injected
};
})();
if (typeof _ret === "object") return _ret.v;
} else {
var _ret2 = (function () {
var instances = [];
DSUtils.forEach(data, function (item) {
instances.push(_this.createInstance(resourceName, item, origOptions));
});
return {
v: instances
};
})();
if (typeof _ret2 === "object") return _ret2.v;
}
});
}
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
// shim for using process in browser
var process = module.exports = {};
process.nextTick = (function () {
var canSetImmediate = typeof window !== 'undefined'
&& window.setImmediate;
var canMutationObserver = typeof window !== 'undefined'
&& window.MutationObserver;
var canPost = typeof window !== 'undefined'
&& window.postMessage && window.addEventListener
;
if (canSetImmediate) {
return function (f) { return window.setImmediate(f) };
}
var queue = [];
if (canMutationObserver) {
var hiddenDiv = document.createElement("div");
var observer = new MutationObserver(function () {
var queueList = queue.slice();
queue.length = 0;
queueList.forEach(function (fn) {
fn();
});
});
observer.observe(hiddenDiv, { attributes: true });
return function nextTick(fn) {
if (!queue.length) {
hiddenDiv.setAttribute('yes', 'no');
}
queue.push(fn);
};
}
if (canPost) {
window.addEventListener('message', function (ev) {
var source = ev.source;
if ((source === window || source === null) && ev.data === 'process-tick') {
ev.stopPropagation();
if (queue.length > 0) {
var fn = queue.shift();
fn();
}
}
}, true);
return function nextTick(fn) {
queue.push(fn);
window.postMessage('process-tick', '*');
};
}
return function nextTick(fn) {
setTimeout(fn, 0);
};
})();
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
module.exports = function() { throw new Error("define cannot be used indirect"); };
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
/**
* Replaces all accented chars with regular ones
*/
function replaceAccents(str){
str = toString(str);
// verifies if the String has accents and replace them
if (str.search(/[\xC0-\xFF]/g) > -1) {
str = str
.replace(/[\xC0-\xC5]/g, "A")
.replace(/[\xC6]/g, "AE")
.replace(/[\xC7]/g, "C")
.replace(/[\xC8-\xCB]/g, "E")
.replace(/[\xCC-\xCF]/g, "I")
.replace(/[\xD0]/g, "D")
.replace(/[\xD1]/g, "N")
.replace(/[\xD2-\xD6\xD8]/g, "O")
.replace(/[\xD9-\xDC]/g, "U")
.replace(/[\xDD]/g, "Y")
.replace(/[\xDE]/g, "P")
.replace(/[\xE0-\xE5]/g, "a")
.replace(/[\xE6]/g, "ae")
.replace(/[\xE7]/g, "c")
.replace(/[\xE8-\xEB]/g, "e")
.replace(/[\xEC-\xEF]/g, "i")
.replace(/[\xF1]/g, "n")
.replace(/[\xF2-\xF6\xF8]/g, "o")
.replace(/[\xF9-\xFC]/g, "u")
.replace(/[\xFE]/g, "p")
.replace(/[\xFD\xFF]/g, "y");
}
return str;
}
module.exports = replaceAccents;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
// This pattern is generated by the _build/pattern-removeNonWord.js script
var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;
/**
* Remove non-word chars.
*/
function removeNonWord(str){
str = toString(str);
return str.replace(PATTERN, '');
}
module.exports = removeNonWord;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
var toString = __webpack_require__(28);
/**
* "Safer" String.toLowerCase()
*/
function lowerCase(str){
str = toString(str);
return str.toLowerCase();
}
module.exports = lowerCase;
/***/ }
/******/ ])
});
|
UI/src/pages/mine/index.js | sunzy0212/local-event | import React, { Component } from 'react';
export default class Mine extends Component {
render() {
return (
<div className="page3"> Page3 </div>
);
}
} |
react-components/src/library/components/portal-classes/register-student-modal.js | concord-consortium/rigse | import React from 'react'
import ModalDialog from '../shared/modal-dialog'
import modalDialogCSS from '../shared/modal-dialog.scss'
export default class RegisterStudentModal extends React.Component {
constructor (props) {
super(props)
this.handleCancel = this.handleCancel.bind(this)
this.handleSubmit = this.handleSubmit.bind(this)
this.firstNameRef = React.createRef()
this.lastNameRef = React.createRef()
this.passwordRef = React.createRef()
this.passwordConfirmationRef = React.createRef()
}
getInputValue (ref) {
return ref.current ? ref.current.value.trim() : ''
}
handleSubmit (e) {
e.preventDefault()
e.stopPropagation()
const firstName = this.getInputValue(this.firstNameRef)
const lastName = this.getInputValue(this.lastNameRef)
const password = this.getInputValue(this.passwordRef)
const passwordConfirmation = this.getInputValue(this.passwordConfirmationRef)
if ((firstName.length === 0) || (lastName.length === 0) || (password.length === 0) || (passwordConfirmation.length === 0)) {
return window.alert('Please fill in all the fields')
}
if (password !== passwordConfirmation) {
return window.alert('Passwords do not match!')
}
this.props.onSubmit({ firstName, lastName, password, passwordConfirmation })
}
handleCancel () {
this.props.onCancel()
}
render () {
return (
<ModalDialog title='Register & Add New Student'>
<form onSubmit={this.handleSubmit}>
<table>
<tbody>
<tr>
<td><label htmlFor='firstName'>First Name</label></td>
<td><input name='firstName' ref={this.firstNameRef} /></td>
</tr>
<tr>
<td><label htmlFor='lastName'>Last Name</label></td>
<td><input name='lastName' ref={this.lastNameRef} /></td>
</tr>
<tr>
<td><label htmlFor='password'>Password</label></td>
<td><input type='password' name='password' ref={this.passwordRef} /></td>
</tr>
<tr>
<td><label htmlFor='passwordConfirmation'>Password Again</label></td>
<td><input type='password' name='passwordConfirmation' ref={this.passwordConfirmationRef} /></td>
</tr>
<tr>
<td colSpan='2' className={modalDialogCSS.buttons}>
<input type='submit' value='Submit' />
<button onClick={this.handleCancel}>Cancel</button>
</td>
</tr>
</tbody>
</table>
</form>
</ModalDialog>
)
}
}
|
package.js | raix/reactive | Package.describe({
summary: "Reactive objects implementation"
});
Package.on_use(function (api) {
"use strict";
api.export && api.export('Reactive');
api.add_files('reactive.objects.js', ['client']);
});
|
packages/material-ui-icons/src/DirectionsCar.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let DirectionsCar = props =>
<SvgIcon {...props}>
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z" />
</SvgIcon>;
DirectionsCar = pure(DirectionsCar);
DirectionsCar.muiName = 'SvgIcon';
export default DirectionsCar;
|
index.ios.js | react-native-projects/stopwatch | import React, { Component } from 'react';
import { AppRegistry,
Text,
View,
ScrollView,
TouchableHighlight } from 'react-native';
import formatTime from 'minutes-seconds-milliseconds';
import { styles } from './src/styles';
class Stopwatch extends Component {
constructor(props) {
super(props);
this.state = {
timeElasped: null,
timerRunning: false,
startTime: null,
laps: [],
};
this.onStartPress = this.onStartPress.bind(this);
this.onLapPress = this.onLapPress.bind(this);
}
// pressing start/stop button
onStartPress() {
// check if clock is running, then stop
if (this.state.timerRunning) {
clearInterval(this.interval);
this.setState({
timerRunning: false,
});
return;
}
this.setState({
startTime: new Date(),
});
this.interval = setInterval(() => {
this.setState({
timeElasped: new Date() - this.state.startTime,
timerRunning: true,
});
}, 30);
}
// pressing lap/restart button
onLapPress() {
// Reset timer
if (!this.state.timerRunning) {
this.setState({
timeElasped: new Date(),
laps: [],
});
return;
}
const lap = this.state.timeElasped;
this.setState({
startTime: new Date(),
laps: this.state.laps.concat(lap),
});
}
// create laps list
createLaps() {
return this.state.laps.map((time, idx) => (
<View key={idx} style={styles.lap}>
<Text style={styles.lapText}>
Lap #{idx + 1}: {formatTime(time)}
</Text>
</View>
));
}
// create start/stop buttons
startStopButton() {
const style = this.state.timerRunning ? styles.stopButton : styles.startButton;
return (
<TouchableHighlight
onPress={this.onStartPress}
underlayColor="#e6e6fa"
style={[styles.button, style]}
>
<Text>
{this.state.timerRunning ? 'Stop' : 'Start'}
</Text>
</TouchableHighlight>
);
}
// create the lap button
lapButton() {
return (
<TouchableHighlight
onPress={this.onLapPress}
underlayColor="#e6e6fa"
style={styles.button}
>
<Text>
{this.state.timerRunning ? 'Lap' : 'Reset'}
</Text>
</TouchableHighlight>
);
}
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
<View style={styles.timerWrapper}>
<Text style={styles.time}>{formatTime(this.state.timeElasped)}</Text>
</View>
<View style={styles.buttonWrapper}>
{this.startStopButton()}
{this.lapButton()}
</View>
</View>
<ScrollView style={styles.footer}>
{this.createLaps()}
</ScrollView>
</View>
);
}
}
AppRegistry.registerComponent('stopwatch', () => Stopwatch);
|
__tests__/react-solr-connector-test.js | SerendpityZOEY/Fixr-RelevantCodeSearch | jest.disableAutomock();
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import SolrConnector from '../demo/react-solr-connector';
import fetchMock from 'fetch-mock';
if (window.Headers === undefined) {
console.log("setting mock window.Headers");
window.Headers = () => null;
}
describe("react-solr-connector", () => {
it("injects props.solrConnector", () => {
const Child = props => <div className="child">
{props.solrConnector ? "exists" : ""}</div>;
const sc = <SolrConnector><Child/></SolrConnector>;
const comp = TestUtils.renderIntoDocument(sc);
const child = TestUtils.findRenderedDOMComponentWithClass(comp, "child");
expect(child.textContent).toBe("exists");
});
it("is not busy at first", () => {
const Child = props => <div className="child">
{props.solrConnector.busy === false ? "yes": "no"}</div>;
const sc = <SolrConnector><Child/></SolrConnector>;
const comp = TestUtils.renderIntoDocument(sc);
const child = TestUtils.findRenderedDOMComponentWithClass(comp, "child");
expect(child.textContent).toBe("yes");
});
it("has valid search results", () => {
// use a Promise so we can check the Child props asynchronously
let Child = null;
let prom = new Promise(resolve => {
Child = props => {
if (props.solrConnector.response) {
expect(props.solrConnector.busy).toBe(false);
expect(props.solrConnector.error).toBeNull();
resolve(props.solrConnector.response);
}
return <div className="child"></div>;
};
});
const searchParams = {
solrSearchUrl: "http://fetch.mock/response",
query: "banana"
};
const sc = <SolrConnector searchParams={searchParams}>
<Child/></SolrConnector>;
const comp = TestUtils.renderIntoDocument(sc);
// wait for the response
return prom.then(response => {
expect(response.response.numFound).toBe(5);
expect(response.response.docs.length).toBe(2);
expect(response.response.docs[0].id).toBe("VS1GB400C3");
});
});
it("doesn't search if query is empty", () => {
// use a Promise so we can check the Child props asynchronously
let Child = null;
let prom = new Promise(resolve => {
Child = props => {
expect(props.solrConnector.response).toBe(null);
if (props.solrConnector.busy === false) {
resolve(null);
}
return <div className="child"></div>;
};
});
const searchParams = {
solrSearchUrl: "http://fetch.mock/response",
query: ""
};
const sc = <SolrConnector searchParams={searchParams}>
<Child/></SolrConnector>;
const comp = TestUtils.renderIntoDocument(sc);
// wait for the response
return prom.then(response => {});
});
it("has handles error from server", () => {
// use a Promise so we can check the Child props asynchronously
let Child = null;
let prom = new Promise(resolve => {
Child = props => {
if (props.solrConnector.error) {
expect(props.solrConnector.busy).toBe(false);
expect(props.solrConnector.response).toBeNull();
resolve(props.solrConnector.error);
}
return <div className="child" onClick={() => {
props.solrConnector.doSearch();
}}></div>;
};
});
const searchParams = {
solrSearchUrl: "http://fetch.mock/badRequest",
query: "banana"
};
const sc = <SolrConnector searchParams={searchParams}>
<Child/></SolrConnector>;
const comp = TestUtils.renderIntoDocument(sc);
// wait for the response
return prom.then(error => {
expect(error).toBe("400 Bad Request");
});
});
});
// set up fetch mocks
const mockSolrResponse = {
"responseHeader":{
"status":0,
"QTime":3,
"params":{
"json":"{ query:memory, limit:2, facet:{manu_id_s:{field:manu_id_s}}, params:{wt:json, indent:true, hl:true, hl.fl:name, hl.snippets:1, hl.fragsize:500 } }"}},
"response":{"numFound":5,"start":0,"docs":[
{
"id":"VS1GB400C3",
"name":"CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - Retail"},
{
"id":"VDBDB1A16",
"name":"A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System Memory - OEM"}]
},
"facets":{
"count":5,
"manu_id_s":{
"buckets":[{
"val":"corsair",
"count":3},
{
"val":"asus",
"count":1},
{
"val":"canon",
"count":1}]}},
"highlighting":{
"VS1GB400C3":{
"name":["CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System <em>Memory</em> - Retail"]},
"VDBDB1A16":{
"name":["A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System <em>Memory</em> - OEM"]}}};
// this is required to stop jest trying to hoist fetchMock.mock calls
const mok = fetchMock.mock.bind(fetchMock);
mok("http://fetch.mock/response", mockSolrResponse);
mok("http://fetch.mock/badRequest", 400);
|
react-native/local-cli/templates/HelloWorld/__tests__/index.ios.js | react-component/rn-packager | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
lib/clearfix.js | Cerebri/material-ui | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var React = require('react');
var BeforeAfterWrapper = require('./before-after-wrapper');
var StylePropable = require('./mixins/style-propable');
var DefaultRawTheme = require('./styles/raw-themes/light-raw-theme');
var ThemeManager = require('./styles/theme-manager');
var ClearFix = React.createClass({
displayName: 'ClearFix',
mixins: [StylePropable],
contextTypes: {
muiTheme: React.PropTypes.object
},
propTypes: {
style: React.PropTypes.object
},
//for passing default theme context to children
childContextTypes: {
muiTheme: React.PropTypes.object
},
getChildContext: function getChildContext() {
return {
muiTheme: this.state.muiTheme
};
},
getInitialState: function getInitialState() {
return {
muiTheme: this.context.muiTheme ? this.context.muiTheme : ThemeManager.getMuiTheme(DefaultRawTheme)
};
},
//to update theme inside state whenever a new theme is passed down
//from the parent / owner using context
componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) {
var newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme;
this.setState({ muiTheme: newMuiTheme });
},
render: function render() {
var _props = this.props;
var style = _props.style;
var other = _objectWithoutProperties(_props, ['style']);
var before = function before() {
return {
content: "' '",
display: 'table'
};
};
var after = before();
after.clear = 'both';
return React.createElement(
BeforeAfterWrapper,
_extends({}, other, {
beforeStyle: before(),
afterStyle: after,
style: style }),
this.props.children
);
}
});
module.exports = ClearFix; |
src/routes/login/index.js | jessiepullaro414/kiwi | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../components/Layout';
import Login from './Login';
const title = 'Log In';
function action() {
return {
chunks: ['login'],
title,
component: <Layout><Login title={title} /></Layout>,
};
}
export default action;
|
Front-End/components/solutionexplorer.component.js | brandonrninefive/prIDE | import React from 'react';
import ReactDOM from 'react-dom';
import {Grid, Row, Col, Button, FormGroup, FormControl} from 'react-bootstrap';
import ResponsiveFixedDataTable from 'responsive-fixed-data-table';
import {Column, Cell} from 'fixed-data-table';
import ExplorerCell from './explorercell.component';
class SolutionExplorer extends React.Component {
constructor(props){
super(props);
this.state = {
path:"/"
};
this.renderCounter = 0;
this.goBack = this.goBack.bind(this);
this.appendToPath = this.appendToPath.bind(this);
this.generateExplorerCell = this.generateExplorerCell.bind(this);
this.header = <Cell>Solution Explorer<br/><FormControl readOnly type="text" className="solutionExplorerInput" value={this.state.path} placeholder="Current Path"/><br/><a href="#" onClick={this.goBack}><span className="glyphicon glyphicon-arrow-up"></span>Back</a></Cell>;
this.openFile = this.openFile.bind(this);
}
openFile(curfile)
{
this.props.readFile(curfile);
}
goBack(){
if(this.state.path != "/")
{
var backPath = this.state.path;
backPath = backPath.substring(0, backPath.length - 1);
var lastSlashIndex = backPath.lastIndexOf("/");
backPath = backPath.substring(0, lastSlashIndex + 1);
this.setState({path:backPath});
this.props.sendPath(backPath);
}
}
appendToPath(item){
var newPath = this.state.path + item;
console.log("New Path: " + newPath);
this.setState({path:newPath});
this.props.sendPath(newPath);
console.log("sendPath should be done");
}
generateExplorerCell(props){
var cell = null;
var type = "file";
var cellItem = this.props.files[this.state.path][props.rowIndex];
if(cellItem != null)
{
if(cellItem.charAt(cellItem.length - 1) == "/")
type = "dir";
cell = <ExplorerCell contents={cellItem} type={type} path={this.state.path} appendToPath={this.appendToPath} openFile={this.openFile}></ExplorerCell>;
}
return cell;
}
componentWillUpdate(nextProps, nextState){
if(this.renderCounter == 0) //We pass a changing dummy prop to the data table Column so that it always re-render when we re-render
this.renderCounter = 1;
else
this.renderCounter = 0;
this.header = <Cell>Solution Explorer<br/><FormControl readOnly type="text" value={nextState.path} placeholder="Current Path"/><br/><a href="#" onClick={this.goBack}><span className="glyphicon glyphicon-arrow-up"></span>Back</a></Cell>;
}
render(){
return(
<ResponsiveFixedDataTable counter={this.renderCounter} headerHeight={100} rowsCount={10} rowHeight={50}>
<Column allowCellsRecycling={true} header={this.header} cell={this.generateExplorerCell} width={200}/>
</ResponsiveFixedDataTable>
);
}
}
export default SolutionExplorer
|
plugins/system/t3/base/bootstrap/js/tests/vendor/jquery.js | ForAEdesWeb/AEW2 | /*! jQuery v1.7.2 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); |
ajax/libs/reactive-coffee/0.0.3/reactive-coffee.js | svenanders/cdnjs | (function() {
var DepArray, DepCell, DepMgr, Depmap, Ev, MappedDepArray, ObsArray, ObsCell, ObsMap, RawHtml, Recorder, SrcArray, SrcCell, SrcMap, bind, depMgr, ev, events, firstWhere, lagBind, maybe, mkMap, mktag, mkuid, nextUid, nthWhere, popKey, prop, propSet, props, recorder, rx, rxt, setProp, specialAttrs, tag, tags, _fn, _i, _len, _ref, _ref1, _ref2, _ref3,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__slice = [].slice,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
_this = this;
if (typeof exports === 'undefined') {
this.rx = rx = {};
} else {
rx = exports;
}
nextUid = 0;
mkuid = function() {
return nextUid += 1;
};
popKey = function(x, k) {
var v;
if (!k in x) {
throw 'object has no key ' + k;
}
v = x[k];
delete x[k];
return v;
};
nthWhere = function(xs, n, f) {
var i, x, _i, _len;
for (i = _i = 0, _len = xs.length; _i < _len; i = ++_i) {
x = xs[i];
if (f(x) && (n -= 1) < 0) {
return [x, i];
}
}
return [null, -1];
};
maybe = function(f, x) {
if (x != null) {
return f(x);
} else {
return x;
}
};
firstWhere = function(xs, f) {
return nthWhere(xs, 0, f);
};
mkMap = function() {
return Object.create(null);
};
Recorder = rx.Recorder = (function() {
function Recorder() {
this.stack = [];
}
Recorder.prototype.start = function(dep) {
return this.stack.push(dep);
};
Recorder.prototype.stop = function() {
return this.stack.pop();
};
Recorder.prototype.sub = function(sub) {
var handle, topCell;
if (this.stack.length > 0) {
topCell = _(this.stack).last();
handle = sub(topCell);
return topCell.addSub(handle);
}
};
Recorder.prototype.warnMutate = function() {
if (this.stack.length > 0) {
return console.warn('Mutation to observable detected during a bind context');
}
};
return Recorder;
})();
recorder = new Recorder();
rx.bind = bind = function(f) {
var dep;
dep = rx.depCell(f);
dep.refresh();
return dep;
};
rx.lagBind = lagBind = function(init, f) {
var dep;
dep = rx.lagDepCell(f, init);
dep.refresh();
return dep;
};
DepMgr = rx.DepMgr = (function() {
function DepMgr() {
this.uid2src = {};
}
DepMgr.prototype.sub = function(uid, src) {
return this.uid2src[uid] = src;
};
DepMgr.prototype.unsub = function(uid) {
this.uid2src[uid].unsub(uid);
return popKey(this.uid2src, uid);
};
return DepMgr;
})();
depMgr = new DepMgr();
Ev = rx.Ev = (function() {
function Ev(inits) {
this.inits = inits;
this.subs = [];
}
Ev.prototype.sub = function(listener) {
var init, uid, _i, _len, _ref;
uid = mkuid();
if (this.inits != null) {
_ref = this.inits();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
init = _ref[_i];
listener(init);
}
}
this.subs[uid] = listener;
depMgr.sub(uid, this);
return uid;
};
Ev.prototype.pub = function(data) {
var listener, uid, _ref, _results;
_ref = this.subs;
_results = [];
for (uid in _ref) {
listener = _ref[uid];
_results.push(listener(data));
}
return _results;
};
Ev.prototype.unsub = function(uid) {
return popKey(this.subs, uid);
};
return Ev;
})();
ObsCell = rx.ObsCell = (function() {
function ObsCell(x) {
var _ref,
_this = this;
this.x = x;
this.x = (_ref = this.x) != null ? _ref : null;
this.onSet = new Ev(function() {
return [[null, _this.x]];
});
}
ObsCell.prototype.get = function() {
var _this = this;
recorder.sub(function(target) {
return _this.onSet.sub(function() {
return target.refresh();
});
});
return this.x;
};
return ObsCell;
})();
SrcCell = rx.SrcCell = (function(_super) {
__extends(SrcCell, _super);
function SrcCell() {
_ref = SrcCell.__super__.constructor.apply(this, arguments);
return _ref;
}
SrcCell.prototype.set = function(x) {
var old;
recorder.warnMutate();
old = this.x;
this.x = x;
this.onSet.pub([old, x]);
return old;
};
return SrcCell;
})(ObsCell);
DepCell = rx.DepCell = (function(_super) {
__extends(DepCell, _super);
function DepCell(body, init, lag) {
this.body = body;
DepCell.__super__.constructor.call(this, init != null ? init : null);
this.subs = [];
this.refreshing = false;
this.lag = lag != null ? lag : false;
this.timeout = null;
}
DepCell.prototype.refresh = function() {
var realRefresh,
_this = this;
realRefresh = function() {
var old, subUid, _i, _len, _ref1;
if (!_this.refreshing) {
old = _this.x;
_ref1 = _this.subs;
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
subUid = _ref1[_i];
depMgr.unsub(subUid);
}
_this.subs = [];
recorder.start(_this);
_this.refreshing = true;
try {
_this.x = _this.body();
} finally {
_this.refreshing = false;
recorder.stop();
}
return _this.onSet.pub([old, _this.x]);
}
};
if (!this.refreshing) {
if (this.lag) {
if (this.timeout != null) {
clearTimeout(this.timeout);
}
console.log('setting timeout');
return this.timeout = setTimeout(realRefresh, 500);
} else {
return realRefresh();
}
}
};
DepCell.prototype.addSub = function(subUid) {
return this.subs.push(subUid);
};
return DepCell;
})(ObsCell);
ObsArray = rx.ObsArray = (function() {
function ObsArray(xs) {
var _ref1,
_this = this;
this.xs = xs;
this.xs = (_ref1 = this.xs) != null ? _ref1 : [];
this.onChange = new Ev(function() {
return [[0, [], _this.xs]];
});
}
ObsArray.prototype.all = function() {
var _this = this;
recorder.sub(function(target) {
return _this.onChange.sub(function() {
return target.refresh();
});
});
return this.xs;
};
ObsArray.prototype.at = function(i) {
var _this = this;
recorder.sub(function(target) {
return _this.onChange.sub(function(_arg) {
var added, index, removed;
index = _arg[0], removed = _arg[1], added = _arg[2];
if (index === i) {
return target.refresh();
}
});
});
return this.xs[i];
};
ObsArray.prototype.length = function() {
var _this = this;
recorder.sub(function(target) {
return _this.onChange.sub(function(_arg) {
var added, index, removed;
index = _arg[0], removed = _arg[1], added = _arg[2];
if (removed.length !== added.length) {
return target.refresh();
}
});
});
return this.xs.length;
};
ObsArray.prototype.map = function(f) {
var ys;
ys = new MappedDepArray();
this.onChange.sub(function(_arg) {
var added, index, removed;
index = _arg[0], removed = _arg[1], added = _arg[2];
return ys.realSplice(index, removed.length, added.map(f));
});
return ys;
};
ObsArray.prototype.realSplice = function(index, count, additions) {
var removed;
removed = this.xs.splice.apply(this.xs, [index, count].concat(additions));
return this.onChange.pub([index, removed, additions]);
};
return ObsArray;
})();
SrcArray = rx.SrcArray = (function(_super) {
__extends(SrcArray, _super);
function SrcArray() {
_ref1 = SrcArray.__super__.constructor.apply(this, arguments);
return _ref1;
}
SrcArray.prototype.spliceArray = function(index, count, additions) {
recorder.warnMutate();
return this.realSplice(index, count, additions);
};
SrcArray.prototype.splice = function() {
var additions, count, index;
index = arguments[0], count = arguments[1], additions = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
return this.spliceArray(index, count, additions);
};
SrcArray.prototype.insert = function(x, index) {
return this.splice(index, 0, x);
};
SrcArray.prototype.remove = function(x) {
return this.removeAt(_(this.all()).indexOf(x));
};
SrcArray.prototype.removeAt = function(index) {
return this.splice(index, 1);
};
SrcArray.prototype.push = function(x) {
return this.splice(this.length(), 0, x);
};
SrcArray.prototype.put = function(i, x) {
return this.splice(i, 1, x);
};
SrcArray.prototype.replace = function(xs) {
return this.spliceArray(0, this.length(), xs);
};
return SrcArray;
})(ObsArray);
MappedDepArray = rx.MappedDepArray = (function(_super) {
__extends(MappedDepArray, _super);
function MappedDepArray() {
_ref2 = MappedDepArray.__super__.constructor.apply(this, arguments);
return _ref2;
}
return MappedDepArray;
})(ObsArray);
DepArray = rx.DepArray = (function(_super) {
__extends(DepArray, _super);
function DepArray(f) {
var _this = this;
this.f = f;
DepArray.__super__.constructor.call(this);
(bind(function() {
return _this.f();
})).onSet.sub(function(_arg) {
var additions, count, index, old, val, _i, _ref3, _ref4, _results;
old = _arg[0], val = _arg[1];
if (old != null) {
_ref4 = firstWhere((function() {
_results = [];
for (var _i = 0, _ref3 = Math.min(old.length, val.length); 0 <= _ref3 ? _i <= _ref3 : _i >= _ref3; 0 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
return _results;
}).apply(this), function(i) {
return old[i] !== val[i];
}), index = _ref4[0], index = _ref4[1];
} else {
index = 0;
}
if (index > -1) {
count = old != null ? old.length - index : 0;
additions = val.slice(index);
return _this.realSplice(index, count, additions);
}
});
}
return DepArray;
})(ObsArray);
ObsMap = rx.ObsMap = (function() {
function ObsMap(x) {
var _this = this;
this.x = x != null ? x : {};
this.onAdd = new Ev(function() {
var k, v, _results;
_results = [];
for (k in x) {
v = x[k];
_results.push([k, v]);
}
return _results;
});
this.onRemove = new Ev();
this.onChange = new Ev();
}
ObsMap.prototype.get = function(key) {
var _this = this;
recorder.sub(function(target) {
return _this.onChange.sub(function(_arg) {
var old, subkey, val;
subkey = _arg[0], old = _arg[1], val = _arg[2];
if (key === subkey) {
return target.refresh();
}
});
});
return this.x[key];
};
ObsMap.prototype.all = function() {
var _this = this;
recorder.sub(function(target) {
return _this.onChange.sub(function() {
return target.refresh();
});
});
return _.clone(this.x);
};
ObsMap.prototype.realPut = function(key, val) {
var old;
if (__indexOf.call(this.x, key) >= 0) {
old = this.x[key];
this.x[key] = val;
this.onChange.pub([key, old, val]);
return old;
} else {
this.x[key] = val;
this.onAdd.pub([key, val]);
return void 0;
}
};
ObsMap.prototype.realRemove = function(key) {
var val;
val = popKey(this.x, key);
this.onRemove.pub([key, val]);
return val;
};
return ObsMap;
})();
SrcMap = rx.SrcMap = (function(_super) {
__extends(SrcMap, _super);
function SrcMap() {
_ref3 = SrcMap.__super__.constructor.apply(this, arguments);
return _ref3;
}
SrcMap.prototype.put = function(key, val) {
recorder.warnMutate();
return this.realPut(key, val);
};
SrcMap.prototype.remove = function(key) {
recorder.warnMutate();
return this.realRemove(key);
};
return SrcMap;
})(ObsMap);
Depmap = rx.DepMap = (function(_super) {
__extends(DepMap, _super);
function DepMap(f) {
this.f = f;
DepMap.__super__.constructor.call(this);
new DepCell(this.f).onSet.sub(function(_arg) {
var k, old, v, val, _results;
old = _arg[0], val = _arg[1];
for (k in old) {
v = old[k];
if (!k in val) {
this.realRemove(k);
}
}
_results = [];
for (k in val) {
v = val[k];
if (this.x[k] !== v) {
_results.push(this.realPut(k, v));
} else {
_results.push(void 0);
}
}
return _results;
});
}
return DepMap;
})(ObsMap);
_.extend(rx, {
cell: function(x) {
return new SrcCell(x);
},
array: function(xs) {
return new SrcArray(xs);
},
map: function(x) {
return new SrcMap(x);
},
depCell: function(f) {
return new DepCell(f);
},
lagDepCell: function(f, init) {
return new DepCell(f, init, true);
},
depMap: function(f) {
return new DepMap(f);
},
depArray: function(f) {
return new DepArray(f);
}
});
$.fn.rx = function(prop) {
var checked, focused, map, val;
map = this.data('rx-map');
if (map == null) {
this.data('rx-map', map = mkMap());
}
if (prop in map) {
return map[prop];
}
return map[prop] = (function() {
var _this = this;
switch (prop) {
case 'focused':
focused = rx.cell(this.is(':focus'));
this.focus(function() {
return focused.set(true);
});
this.blur(function() {
return focused.set(false);
});
return focused;
case 'val':
val = rx.cell(this.val());
this.change(function() {
return val.set(_this.val());
});
this.on('input', function() {
return val.set(_this.val());
});
return val;
case 'checked':
checked = rx.cell(this.is(':checked'));
this.change(function() {
return checked.set(_this.is(':checked'));
});
return checked;
default:
throw 'Unknown reactive property type';
}
}).call(this);
};
if (typeof exports === 'undefined') {
this.rxt = rxt = {};
} else {
rxt = exports;
}
RawHtml = rxt.RawHtml = (function() {
function RawHtml(html) {
this.html = html;
}
return RawHtml;
})();
events = ["blur", "change", "click", "dblclick", "error", "focus", "focusin", "focusout", "hover", "keydown", "keypress", "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "ready", "resize", "scroll", "select", "submit", "toggle", "unload"];
specialAttrs = rxt.specialAttrs = {
init: function(elt, fn) {
return fn.call(elt);
}
};
_fn = function(ev) {
return specialAttrs[ev] = function(elt, fn) {
return elt[ev](function(e) {
return fn.call(elt, e);
});
};
};
for (_i = 0, _len = events.length; _i < _len; _i++) {
ev = events[_i];
_fn(ev);
}
props = ['async', 'autofocus', 'checked', 'location', 'multiple', 'readOnly', 'selected', 'selectedIndex', 'tagName', 'nodeName', 'nodeType', 'ownerDocument', 'defaultChecked', 'defaultSelected'];
propSet = _.object((function() {
var _j, _len1, _results;
_results = [];
for (_j = 0, _len1 = props.length; _j < _len1; _j++) {
prop = props[_j];
_results.push([prop, null]);
}
return _results;
})());
setProp = function(elt, prop, val) {
if (prop === 'value') {
return elt.val(val);
} else if (prop in propSet) {
return elt.prop(prop, val);
} else {
return elt.attr(prop, val);
}
};
rxt.mktag = mktag = function(tag) {
return function(arg1, arg2) {
var attrs, contents, elt, key, name, toNodes, updateContents, value, _ref4, _ref5;
_ref4 = (arg1 == null) && (arg2 == null) ? [{}, null] : arg2 != null ? [arg1, arg2] : _.isString(arg1) || arg1 instanceof RawHtml || _.isArray(arg1) || arg1 instanceof ObsCell || arg1 instanceof ObsArray ? [{}, arg1] : [arg1, null], attrs = _ref4[0], contents = _ref4[1];
elt = $("<" + tag + "/>");
_ref5 = _.omit(attrs, _.keys(specialAttrs));
for (name in _ref5) {
value = _ref5[name];
if (value instanceof ObsCell) {
(function(name) {
return value.onSet.sub(function(_arg) {
var old, val;
old = _arg[0], val = _arg[1];
return setProp(elt, name, val);
});
})(name);
} else {
setProp(elt, name, value);
}
}
if (contents != null) {
toNodes = function(contents) {
var child, parsed, _j, _len1, _results;
_results = [];
for (_j = 0, _len1 = contents.length; _j < _len1; _j++) {
child = contents[_j];
if (_.isString(child)) {
_results.push(document.createTextNode(child));
} else if (child instanceof RawHtml) {
parsed = $(child.html);
if (parsed.length) {
throw 'Cannot insert RawHtml of multiple elements';
}
_results.push(parsed[0]);
} else if (child instanceof $) {
_results.push(child[0]);
} else {
throw 'Unknown element type in array: ' + child.constructor.name;
}
}
return _results;
};
updateContents = function(contents) {
elt.html('');
if (_.isArray(contents)) {
return elt.append(toNodes(contents));
} else if (_.isString(contents) || contents instanceof RawHtml) {
return updateContents([contents]);
} else {
throw 'Unknown type for contents: ' + contents.constructor.name;
}
};
if (contents instanceof ObsArray) {
contents.onChange.sub(function(_arg) {
var added, index, removed, toAdd;
index = _arg[0], removed = _arg[1], added = _arg[2];
elt.contents().slice(index, index + removed.length).remove();
toAdd = toNodes(added);
if (index === elt.contents().length) {
return elt.append(toAdd);
} else {
return elt.contents().eq(index).before(toAdd);
}
});
} else if (contents instanceof ObsCell) {
contents.onSet.sub(function(_arg) {
var old, val;
old = _arg[0], val = _arg[1];
return updateContents(val);
});
} else {
updateContents(contents);
}
}
for (key in attrs) {
if (key in specialAttrs) {
specialAttrs[key](elt, attrs[key], attrs, contents);
}
}
return elt;
};
};
tags = ['html', 'head', 'title', 'base', 'link', 'meta', 'style', 'script', 'noscript', 'body', 'body', 'section', 'nav', 'article', 'aside', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h1', 'h6', 'header', 'footer', 'address', 'main', 'main', 'p', 'hr', 'pre', 'blockquote', 'ol', 'ul', 'li', 'dl', 'dt', 'dd', 'dd', 'figure', 'figcaption', 'div', 'a', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'data', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'span', 'br', 'wbr', 'ins', 'del', 'img', 'iframe', 'embed', 'object', 'param', 'object', 'video', 'audio', 'source', 'video', 'audio', 'track', 'video', 'audio', 'canvas', 'map', 'area', 'area', 'map', 'svg', 'math', 'table', 'caption', 'colgroup', 'col', 'tbody', 'thead', 'tfoot', 'tr', 'td', 'th', 'form', 'fieldset', 'legend', 'fieldset', 'label', 'input', 'button', 'select', 'datalist', 'optgroup', 'option', 'select', 'datalist', 'textarea', 'keygen', 'output', 'progress', 'meter', 'details', 'summary', 'details', 'menuitem', 'menu'];
rxt.tags = _.object((function() {
var _j, _len1, _results;
_results = [];
for (_j = 0, _len1 = tags.length; _j < _len1; _j++) {
tag = tags[_j];
_results.push([tag, rxt.mktag(tag)]);
}
return _results;
})());
rxt.rawHtml = function(html) {
return new RawHtml(html);
};
rxt.importTags = function(x) {
return _(x != null ? x : _this).extend(rxt.tags);
};
}).call(this);
|
admin/client/App/elemental/GlyphField/index.js | matthewstyers/keystone | /* eslint quote-props: ["error", "as-needed"] */
import React, { PropTypes } from 'react';
import { StyleSheet } from 'aphrodite/no-important';
import Field from '../FormField';
import Glyph from '../Glyph';
function GlyphField ({
children,
glyph,
glyphColor,
glyphSize,
position,
...props
}) {
const isLeft = position === 'left';
const isRight = position === 'right';
const glyphStyles = {};
if (isLeft) glyphStyles.marginRight = '0.5em';
if (isRight) glyphStyles.marginLeft = '0.5em';
const icon = (
<Glyph
cssStyles={classes.glyph}
color={glyphColor}
name={glyph}
size={glyphSize}
style={glyphStyles}
/>
);
return (
<Field cssStyles={classes.wrapper} {...props}>
{isLeft && icon}
{children}
{isRight && icon}
</Field>
);
};
// For props "glyph", "glyphColor", and "glyphSize":
// prop type validation will occur within the Glyph component, no need to
// duplicate, just pass it through.
GlyphField.propTypes = {
glyph: PropTypes.string,
glyphColor: PropTypes.string,
glyphSize: PropTypes.string,
position: PropTypes.oneOf(['left', 'right']),
};
GlyphField.defaultProps = {
position: 'left',
};
const classes = StyleSheet.create({
wrapper: {
alignItems: 'center',
display: 'flex',
},
glyph: {
display: 'inline-block',
marginTop: '-0.125em', // fix icon alignment
verticalAlign: 'middle',
},
});
module.exports = GlyphField;
|
admin/client/App/screens/Item/components/RelatedItemsList.js | Adam14Four/keystone | import React from 'react';
import { Link } from 'react-router';
import { Columns } from 'FieldTypes';
import { Alert, Spinner } from 'elemental';
const RelatedItemsList = React.createClass({
propTypes: {
list: React.PropTypes.object.isRequired,
refList: React.PropTypes.object.isRequired,
relatedItemId: React.PropTypes.string.isRequired,
relationship: React.PropTypes.object.isRequired,
},
getInitialState () {
return {
columns: this.getColumns(),
err: null,
items: null,
};
},
componentDidMount () {
this.loadItems();
},
getColumns () {
const { relationship, refList } = this.props;
const columns = refList.expandColumns(refList.defaultColumns);
return columns.filter(i => i.path !== relationship.refPath);
},
loadItems () {
const { refList, relatedItemId, relationship } = this.props;
if (!refList.fields[relationship.refPath]) {
const err = (
<Alert type="danger">
<strong>Error:</strong> Related List <strong>{refList.label}</strong> has no field <strong>{relationship.refPath}</strong>
</Alert>
);
return this.setState({ err });
}
refList.loadItems({
columns: this.state.columns,
filters: [{
field: refList.fields[relationship.refPath],
value: { value: relatedItemId },
}],
}, (err, items) => {
// TODO: indicate pagination & link to main list view
this.setState({ items });
});
},
renderItems () {
return this.state.items.results.length ? (
<div className="ItemList-wrapper">
<table cellPadding="0" cellSpacing="0" className="Table ItemList">
{this.renderTableCols()}
{this.renderTableHeaders()}
<tbody>
{this.state.items.results.map(this.renderTableRow)}
</tbody>
</table>
</div>
) : (
<h4 className="Relationship__noresults">No related {this.props.refList.plural}</h4>
);
},
renderTableCols () {
const cols = this.state.columns.map((col) => <col width={col.width} key={col.path} />);
return <colgroup>{cols}</colgroup>;
},
renderTableHeaders () {
const cells = this.state.columns.map((col) => {
return <th key={col.path}>{col.label}</th>;
});
return <thead><tr>{cells}</tr></thead>;
},
renderTableRow (item) {
const cells = this.state.columns.map((col, i) => {
const ColumnType = Columns[col.type] || Columns.__unrecognised__;
const linkTo = !i ? `${Keystone.adminPath}/${this.props.refList.path}/${item.id}` : undefined;
return <ColumnType key={col.path} list={this.props.refList} col={col} data={item} linkTo={linkTo} />;
});
return <tr key={'i' + item.id}>{cells}</tr>;
},
render () {
if (this.state.err) {
return <div className="Relationship">{this.state.err}</div>;
}
const listHref = `${Keystone.adminPath}/${this.props.refList.path}`;
return (
<div className="Relationship">
<h3 className="Relationship__link"><Link to={listHref}>{this.props.refList.label}</Link></h3>
{this.state.items ? this.renderItems() : <Spinner size="sm" />}
</div>
);
},
});
module.exports = RelatedItemsList;
|
public/assets/application-6b60bc7c572c734ba56e148a6327fbf150240d703a8a1557ac4c1379b444ccc5.js | EDalSanto/GustiLogistics | if(function(t,e){"object"==typeof module&&module.exports?module.exports=t.document?e(t):e:t.Highcharts=e(t)}("undefined"!=typeof window?window:this,function(t){return t=function(){var t=window,e=t.document,i=t.navigator&&t.navigator.userAgent||"",n=e&&e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o=/(edge|msie|trident)/i.test(i)&&!window.opera,r=!n,s=/Firefox/.test(i),a=s&&4>parseInt(i.split("Firefox/")[1],10);return t.Highcharts?t.Highcharts.error(16,!0):{product:"Highcharts",version:"5.0.6",deg2rad:2*Math.PI/360,doc:e,hasBidiBug:a,hasTouch:e&&void 0!==e.documentElement.ontouchstart,isMS:o,isWebKit:/AppleWebKit/.test(i),isFirefox:s,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(i),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:n,vml:r,win:t,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}(),function(t){var e=[],i=t.charts,n=t.doc,o=t.win;t.error=function(e,i){if(e=t.isNumber(e)?"Highcharts error #"+e+": www.highcharts.com/errors/"+e:e,i)throw Error(e);o.console&&console.log(e)},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],n=[],o=this.now,r=e.length;if(1===o)n=this.toD;else if(r===i.length&&1>o)for(;r--;)t=parseFloat(e[r]),n[r]=isNaN(t)?e[r]:o*parseFloat(i[r]-t)+t;else n=i;this.elem.attr("d",n,null,!0)},update:function(){var t=this.elem,e=this.prop,i=this.now,n=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,n&&n.call(t,i,this)},run:function(t,i,n){var o,r=this,s=function(t){return!s.stopped&&r.step(t)};this.startTime=+new Date,this.start=t,this.end=i,this.unit=n,this.now=this.start,this.pos=0,s.elem=this.elem,s.prop=this.prop,s()&&1===e.push(s)&&(s.timerId=setInterval(function(){for(o=0;o<e.length;o++)e[o]()||e.splice(o--,1);e.length||clearInterval(s.timerId)},13))},step:function(t){var e,i=+new Date,n=this.options;e=this.elem;var o,r=n.complete,s=n.duration,a=n.curAnim;if(e.attr&&!e.element)e=!1;else if(t||i>=s+this.startTime){this.now=this.end,this.pos=1,this.update(),t=a[this.prop]=!0;for(o in a)!0!==a[o]&&(t=!1);t&&r&&r.call(e),e=!1}else this.pos=n.easing((i-this.startTime)/s),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e},initPath:function(e,i,n){function o(t){var e,i;for(c=t.length;c--;)e="M"===t[c]||"L"===t[c],i=/[a-zA-Z]/.test(t[c+3]),e&&i&&t.splice(c+1,0,t[c+1],t[c+2],t[c+1],t[c+2])}function r(t,e){for(;t.length<l;){t[0]=e[l-t.length];var i=t.slice(0,f);[].splice.apply(t,[0,0].concat(i)),m&&(i=t.slice(t.length-f),[].splice.apply(t,[t.length,0].concat(i)),c--)}t[0]="M"}function s(t,e){for(var i=(l-t.length)/f;0<i&&i--;)h=t.slice().splice(t.length/v-f,f*v),h[0]=e[l-f-i*f],p&&(h[f-6]=h[f-2],h[f-5]=h[f-1]),[].splice.apply(t,[t.length/v,0].concat(h)),m&&i--}i=i||"";var a,l,h,c,d=e.startX,u=e.endX,p=-1<i.indexOf("C"),f=p?7:3;i=i.split(" "),n=n.slice();var g,m=e.isArea,v=m?2:1;if(p&&(o(i),o(n)),d&&u){for(c=0;c<d.length;c++){if(d[c]===u[0]){a=c;break}if(d[0]===u[u.length-d.length+c]){a=c,g=!0;break}}void 0===a&&(i=[])}return i.length&&t.isNumber(a)&&(l=n.length+a*v*f,g?(r(i,n),s(n,i)):(r(n,i),s(i,n))),[i,n]}},t.extend=function(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t},t.merge=function(){var e,i,n=arguments,o={},r=function(e,i){var n,o;"object"!=typeof e&&(e={});for(o in i)i.hasOwnProperty(o)&&(n=i[o],t.isObject(n,!0)&&"renderTo"!==o&&"number"!=typeof n.nodeType?e[o]=r(e[o]||{},n):e[o]=i[o]);return e};for(!0===n[0]&&(o=n[1],n=Array.prototype.slice.call(n,2)),i=n.length,e=0;e<i;e++)o=r(o,n[e]);return o},t.pInt=function(t,e){return parseInt(t,e||10)},t.isString=function(t){return"string"==typeof t},t.isArray=function(t){return t=Object.prototype.toString.call(t),"[object Array]"===t||"[object Array Iterator]"===t},t.isObject=function(e,i){return e&&"object"==typeof e&&(!i||!t.isArray(e))},t.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.erase=function(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}},t.defined=function(t){return void 0!==t&&null!==t},t.attr=function(e,i,n){var o,r;if(t.isString(i))t.defined(n)?e.setAttribute(i,n):e&&e.getAttribute&&(r=e.getAttribute(i));else if(t.defined(i)&&t.isObject(i))for(o in i)e.setAttribute(o,i[o]);return r},t.splat=function(e){return t.isArray(e)?e:[e]},t.syncTimeout=function(t,e,i){return e?setTimeout(t,e,i):void t.call(0,i)},t.pick=function(){var t,e,i=arguments,n=i.length;for(t=0;t<n;t++)if(e=i[t],void 0!==e&&null!==e)return e},t.css=function(e,i){t.isMS&&!t.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),t.extend(e.style,i)},t.createElement=function(e,i,o,r,s){e=n.createElement(e);var a=t.css;return i&&t.extend(e,i),s&&a(e,{padding:0,border:"none",margin:0}),o&&a(e,o),r&&r.appendChild(e),e},t.extendClass=function(e,i){var n=function(){};return n.prototype=new e,t.extend(n.prototype,i),n},t.pad=function(t,e,i){return Array((e||2)+1-String(t).length).join(i||0)+t},t.relativeLength=function(t,e){return/%$/.test(t)?e*parseFloat(t)/100:parseFloat(t)},t.wrap=function(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments),e=arguments,o=this;return o.proceed=function(){n.apply(o,arguments.length?arguments:e)},t.unshift(n),t=i.apply(this,t),o.proceed=null,t}},t.getTZOffset=function(e){var i=t.Date;return 6e4*(i.hcGetTimezoneOffset&&i.hcGetTimezoneOffset(e)||i.hcTimezoneOffset||0)},t.dateFormat=function(e,i,n){if(!t.defined(i)||isNaN(i))return t.defaultOptions.lang.invalidDate||"";e=t.pick(e,"%Y-%m-%d %H:%M:%S");var o,r=t.Date,s=new r(i-t.getTZOffset(i)),a=s[r.hcGetHours](),l=s[r.hcGetDay](),h=s[r.hcGetDate](),c=s[r.hcGetMonth](),d=s[r.hcGetFullYear](),u=t.defaultOptions.lang,p=u.weekdays,f=u.shortWeekdays,g=t.pad,r=t.extend({a:f?f[l]:p[l].substr(0,3),A:p[l],d:g(h),e:g(h,2," "),w:l,b:u.shortMonths[c],B:u.months[c],m:g(c+1),y:d.toString().substr(2,2),Y:d,H:g(a),k:a,I:g(a%12||12),l:a%12||12,M:g(s[r.hcGetMinutes]()),p:12>a?"AM":"PM",P:12>a?"am":"pm",S:g(s.getSeconds()),L:g(Math.round(i%1e3),3)},t.dateFormats);for(o in r)for(;-1!==e.indexOf("%"+o);)e=e.replace("%"+o,"function"==typeof r[o]?r[o](i):r[o]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},t.formatSingle=function(e,i){var n=/\.([0-9])/,o=t.defaultOptions.lang;return/f$/.test(e)?(n=(n=e.match(n))?n[1]:-1,null!==i&&(i=t.numberFormat(i,n,o.decimalPoint,-1<e.indexOf(",")?o.thousandsSep:""))):i=t.dateFormat(e,i),i},t.format=function(e,i){for(var n,o,r,s,a,l="{",h=!1,c=[];e&&(l=e.indexOf(l),-1!==l);){if(n=e.slice(0,l),h){for(n=n.split(":"),o=n.shift().split("."),s=o.length,a=i,r=0;r<s;r++)a=a[o[r]];n.length&&(a=t.formatSingle(n.join(":"),a)),c.push(a)}else c.push(n);e=e.slice(l+1),l=(h=!h)?"}":"{"}return c.push(e),c.join("")},t.getMagnitude=function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},t.normalizeTickInterval=function(e,i,n,o,r){var s,a=e;for(n=t.pick(n,1),s=e/n,i||(i=r?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===o&&(1===n?i=t.grep(i,function(t){return 0===t%1}):.1>=n&&(i=[1/n]))),o=0;o<i.length&&(a=i[o],!(r&&a*n>=e||!r&&s<=(i[o]+(i[o+1]||i[o]))/2));o++);return a*n},t.stableSort=function(t,e){var i,n,o=t.length;for(n=0;n<o;n++)t[n].safeI=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.safeI-n.safeI:i}),n=0;n<o;n++)delete t[n].safeI},t.arrayMin=function(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i},t.arrayMax=function(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i},t.destroyObjectProperties=function(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]},t.discardElement=function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.setAnimation=function(e,i){i.renderer.globalAnimation=t.pick(e,i.options.chart.animation,!0)},t.animObject=function(e){return t.isObject(e)?t.merge(e):{duration:e?500:0}},t.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},t.numberFormat=function(e,i,n,o){e=+e||0,i=+i;var r,s,a=t.defaultOptions.lang,l=(e.toString().split(".")[1]||"").length,h=Math.abs(e);return-1===i?i=Math.min(l,20):t.isNumber(i)||(i=2),r=String(t.pInt(h.toFixed(i))),s=3<r.length?r.length%3:0,n=t.pick(n,a.decimalPoint),o=t.pick(o,a.thousandsSep),e=(0>e?"-":"")+(s?r.substr(0,s)+o:""),e+=r.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+o),i&&(o=Math.abs(h-r+Math.pow(10,-Math.max(i,l)-1)),e+=n+o.toFixed(i).slice(2)),e},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(e,i){return"width"===i?Math.min(e.offsetWidth,e.scrollWidth)-t.getStyle(e,"padding-left")-t.getStyle(e,"padding-right"):"height"===i?Math.min(e.offsetHeight,e.scrollHeight)-t.getStyle(e,"padding-top")-t.getStyle(e,"padding-bottom"):(e=o.getComputedStyle(e,void 0))&&t.pInt(e.getPropertyValue(i))},t.inArray=function(t,e){return e.indexOf?e.indexOf(t):[].indexOf.call(e,t)},t.grep=function(t,e){return[].filter.call(t,e)},t.find=function(t,e){return[].find.call(t,e)},t.map=function(t,e){for(var i=[],n=0,o=t.length;n<o;n++)i[n]=e.call(t[n],t[n],n,t);return i},t.offset=function(t){var e=n.documentElement;return t=t.getBoundingClientRect(),{top:t.top+(o.pageYOffset||e.scrollTop)-(e.clientTop||0),left:t.left+(o.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},t.stop=function(t,i){for(var n=e.length;n--;)e[n].elem!==t||i&&i!==e[n].prop||(e[n].stopped=!0)},t.each=function(t,e,i){return Array.prototype.forEach.call(t,e,i)},t.addEvent=function(e,i,n){function r(t){t.target=t.srcElement||o,n.call(e,t)}var s=e.hcEvents=e.hcEvents||{};return e.addEventListener?e.addEventListener(i,n,!1):e.attachEvent&&(e.hcEventsIE||(e.hcEventsIE={}),e.hcEventsIE[n.toString()]=r,e.attachEvent("on"+i,r)),s[i]||(s[i]=[]),s[i].push(n),function(){t.removeEvent(e,i,n)}},t.removeEvent=function(e,i,n){function o(t,i){e.removeEventListener?e.removeEventListener(t,i,!1):e.attachEvent&&(i=e.hcEventsIE[i.toString()],e.detachEvent("on"+t,i))}function r(){var t,n;if(e.nodeName)for(n in i?(t={},t[i]=!0):t=l,t)if(l[n])for(t=l[n].length;t--;)o(n,l[n][t])}var s,a,l=e.hcEvents;l&&(i?(s=l[i]||[],n?(a=t.inArray(n,s),-1<a&&(s.splice(a,1),l[i]=s),o(i,n)):(r(),l[i]=[])):(r(),e.hcEvents={}))},t.fireEvent=function(e,i,o,r){var s;s=e.hcEvents;var a,l;if(o=o||{},n.createEvent&&(e.dispatchEvent||e.fireEvent))s=n.createEvent("Events"),s.initEvent(i,!0,!0),t.extend(s,o),e.dispatchEvent?e.dispatchEvent(s):e.fireEvent(i,s);else if(s)for(s=s[i]||[],a=s.length,o.target||t.extend(o,{preventDefault:function(){o.defaultPrevented=!0},target:e,type:i}),i=0;i<a;i++)(l=s[i])&&!1===l.call(e,o)&&o.preventDefault();r&&!o.defaultPrevented&&r(o)},t.animate=function(e,i,n){var o,r,s,a,l="";t.isObject(n)||(o=arguments,n={duration:o[2],easing:o[3],complete:o[4]}),t.isNumber(n.duration)||(n.duration=400),n.easing="function"==typeof n.easing?n.easing:Math[n.easing]||Math.easeInOutSine,n.curAnim=t.merge(i);for(a in i)t.stop(e,a),s=new t.Fx(e,n,a),r=null,"d"===a?(s.paths=s.initPath(e,e.d,i.d),s.toD=i.d,o=0,r=1):e.attr?o=e.attr(a):(o=parseFloat(t.getStyle(e,a))||0,"opacity"!==a&&(l="px")),r||(r=i[a]),r.match&&r.match("px")&&(r=r.replace(/px/g,"")),s.run(o,r,l)},t.seriesType=function(e,i,n,o,r){var s=t.getOptions(),a=t.seriesTypes;return s.plotOptions[e]=t.merge(s.plotOptions[i],n),a[e]=t.extendClass(a[i]||function(){},o),a[e].prototype.type=e,r&&(a[e].prototype.pointClass=t.extendClass(t.Point,r)),a[e]},t.uniqueKey=function(){var t=Math.random().toString(36).substring(2,9),e=0;return function(){return"highcharts-"+t+"-"+e++}}(),o.jQuery&&(o.jQuery.fn.highcharts=function(){var e=[].slice.call(arguments);if(this[0])return e[0]?(new(t[t.isString(e[0])?e.shift():"Chart"])(this[0],e[0],e[1]),this):i[t.attr(this[0],"data-highcharts-chart")]}),n&&!n.defaultView&&(t.getStyle=function(e,i){var n={width:"clientWidth",height:"clientHeight"}[i];return e.style[i]?t.pInt(e.style[i]):("opacity"===i&&(i="filter"),n?(e.style.zoom=1,Math.max(e[n]-2*t.getStyle(e,"padding"),0)):(e=e.currentStyle[i.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()})],"filter"===i&&(e=e.replace(/alpha\(opacity=([0-9]+)\)/,function(t,e){return e/100})),""===e?1:t.pInt(e)))}),Array.prototype.forEach||(t.each=function(t,e,i){for(var n=0,o=t.length;n<o;n++)if(!1===e.call(i,t[n],n,t))return n}),Array.prototype.indexOf||(t.inArray=function(t,e){var i,n=0;if(e)for(i=e.length;n<i;n++)if(e[n]===t)return n;return-1}),Array.prototype.filter||(t.grep=function(t,e){for(var i=[],n=0,o=t.length;n<o;n++)e(t[n],n)&&i.push(t[n]);return i}),Array.prototype.find||(t.find=function(t,e){var i,n=t.length;for(i=0;i<n;i++)if(e(t[i],i))return t[i]})}(t),function(t){var e=t.each,i=t.isNumber,n=t.map,o=t.merge,r=t.pInt;t.Color=function(e){return this instanceof t.Color?void this.init(e):new t.Color(e)},t.Color.prototype={parsers:[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(t){return[r(t[1],16),r(t[2],16),r(t[3],16),1]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],names:{white:"#ffffff",black:"#000000"},init:function(e){var i,o,r,s;if((this.input=e=this.names[e]||e)&&e.stops)this.stops=n(e.stops,function(e){return new t.Color(e[1])});else for(r=this.parsers.length;r--&&!o;)s=this.parsers[r],(i=s.regex.exec(e))&&(o=s.parse(i));this.rgba=o||[]},get:function(t){var n,r=this.input,s=this.rgba;return this.stops?(n=o(r),n.stops=[].concat(n.stops),e(this.stops,function(e,i){n.stops[i]=[n.stops[i][0],e.get(t)]})):n=s&&i(s[0])?"rgb"===t||!t&&1===s[3]?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===t?s[3]:"rgba("+s.join(",")+")":r,n},brighten:function(t){var n,o=this.rgba;if(this.stops)e(this.stops,function(e){e.brighten(t)});else if(i(t)&&0!==t)for(n=0;3>n;n++)o[n]+=r(255*t),0>o[n]&&(o[n]=0),255<o[n]&&(o[n]=255);return this},setOpacity:function(t){return this.rgba[3]=t,this}},t.color=function(e){return new t.Color(e)}}(t),function(t){var e,i,n=t.addEvent,o=t.animate,r=t.attr,s=t.charts,a=t.color,l=t.css,h=t.createElement,c=t.defined,d=t.deg2rad,u=t.destroyObjectProperties,p=t.doc,f=t.each,g=t.extend,m=t.erase,v=t.grep,y=t.hasTouch,b=t.isArray,x=t.isFirefox,w=t.isMS,T=t.isObject,k=t.isString,C=t.isWebKit,S=t.merge,M=t.noop,A=t.pick,E=t.pInt,L=t.removeEvent,P=t.stop,D=t.svg,I=t.SVG_NS,O=t.symbolSizes,N=t.win;e=t.SVGElement=function(){return this},e.prototype={opacity:1,SVG_NS:I,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textDecoration textOverflow textOutline".split(" "),init:function(t,e){this.element="span"===e?h(e):p.createElementNS(this.SVG_NS,e),this.renderer=t},animate:function(e,i,n){return i=t.animObject(A(i,this.renderer.globalAnimation,!0)),0!==i.duration?(n&&(i.complete=n),o(this,e,i)):this.attr(e,null,n),this},colorGradient:function(e,i,n){var o,r,s,a,l,h,d,u,p,g,m,v,y=this.renderer,x=[];if(e.linearGradient?r="linearGradient":e.radialGradient&&(r="radialGradient"),r){s=e[r],l=y.gradients,d=e.stops,g=n.radialReference,b(s)&&(e[r]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===r&&g&&!c(s.gradientUnits)&&(a=s,s=S(s,y.getRadialAttr(g,a),{gradientUnits:"userSpaceOnUse"}));for(m in s)"id"!==m&&x.push(m,s[m]);for(m in d)x.push(d[m]);x=x.join(","),l[x]?g=l[x].attr("id"):(s.id=g=t.uniqueKey(),l[x]=h=y.createElement(r).attr(s).add(y.defs),h.radAttr=a,h.stops=[],f(d,function(e){0===e[1].indexOf("rgba")?(o=t.color(e[1]),u=o.get("rgb"),p=o.get("a")):(u=e[1],p=1),e=y.createElement("stop").attr({offset:e[0],"stop-color":u,"stop-opacity":p}).add(h),h.stops.push(e)})),v="url("+y.url+"#"+g+")",n.setAttribute(i,v),n.gradient=x,e.toString=function(){return v}}},applyTextOutline:function(t){var e,i,n,o,s=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(s.style.fill))),this.fakeTS=!0,this.ySetter=this.xSetter,e=[].slice.call(s.getElementsByTagName("tspan")),t=t.split(" "),i=t[t.length-1],(n=t[0])&&"none"!==n&&(n=n.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*e+i}),f(e,function(t){"highcharts-text-outline"===t.getAttribute("class")&&m(e,s.removeChild(t))}),o=s.firstChild,f(e,function(t,e){0===e&&(t.setAttribute("x",s.getAttribute("x")),e=s.getAttribute("y"),t.setAttribute("y",e||0),null===e&&s.setAttribute("y",0)),t=t.cloneNode(1),r(t,{"class":"highcharts-text-outline",fill:i,stroke:i,"stroke-width":n,"stroke-linejoin":"round"}),s.insertBefore(t,o)}))},attr:function(t,e,i,n){var o,r,s,a=this.element,l=this;if("string"==typeof t&&void 0!==e&&(o=t,t={},t[o]=e),"string"==typeof t)l=(this[t+"Getter"]||this._defaultGetter).call(this,t,a);else{for(o in t)e=t[o],s=!1,n||P(this,o),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(o)&&(r||(this.symbolAttr(t),r=!0),s=!0),!this.rotation||"x"!==o&&"y"!==o||(this.doTransform=!0),s||(s=this[o+"Setter"]||this._defaultSetter,s.call(this,e,o,a),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(o)&&this.updateShadows(o,e,s));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}return i&&i(),l},updateShadows:function(t,e,i){for(var n=this.shadows,o=n.length;o--;)i.call(n[o],"height"===t?Math.max(e-(n[o].cutHeight||0),0):"d"===t?this.d:e,t,n[o])},addClass:function(t,e){var i=this.attr("class")||"";return-1===i.indexOf(t)&&(e||(t=(i+(i?" ":"")+t).replace(" "," ")),this.attr("class",t)),this},hasClass:function(t){return-1!==r(this.element,"class").indexOf(t)},removeClass:function(t){return r(this.element,"class",(r(this.element,"class")||"").replace(t,"")),this},symbolAttr:function(t){var e=this;f("x y r start end width height innerR anchorX anchorY".split(" "),function(i){e[i]=A(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},crisp:function(t,e){var i,n,o={};e=e||t.strokeWidth||0,n=Math.round(e)%2/2,t.x=Math.floor(t.x||this.x||0)+n,t.y=Math.floor(t.y||this.y||0)+n,t.width=Math.floor((t.width||this.width||0)-2*n),t.height=Math.floor((t.height||this.height||0)-2*n),c(t.strokeWidth)&&(t.strokeWidth=e);for(i in t)this[i]!==t[i]&&(this[i]=o[i]=t[i]);return o},css:function(t){var e,i,n=this.styles,o={},s=this.element,a="";if(e=!n,t&&t.color&&(t.fill=t.color),n)for(i in t)t[i]!==n[i]&&(o[i]=t[i],e=!0);if(e){if(e=this.textWidth=t&&t.width&&"text"===s.nodeName.toLowerCase()&&E(t.width)||this.textWidth,n&&(t=g(n,o)),this.styles=t,e&&!D&&this.renderer.forExport&&delete t.width,w&&!D)l(this.element,t);else{n=function(t,e){return"-"+e.toLowerCase()};for(i in t)a+=i.replace(/([A-Z])/g,n)+":"+t[i]+";";r(s,"style",a)}this.added&&(e&&this.renderer.buildText(this),t&&t.textOutline&&this.applyTextOutline(t.textOutline))}return this},strokeWidth:function(){return this["stroke-width"]||0},on:function(t,e){var i=this,n=i.element;return y&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===N.navigator.userAgent.indexOf("Android")||1100<Date.now()-(i.touchEventFired||0))&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){var e=this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(t){return this.inverted=t,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,o=this.inverted,r=this.rotation,s=this.element;o&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],o?t.push("rotate(90) scale(-1,1)"):r&&t.push("rotate("+r+" "+(s.getAttribute("x")||0)+" "+(s.getAttribute("y")||0)+")"),(c(i)||c(n))&&t.push("scale("+A(i,1)+" "+A(n,1)+")"),t.length&&s.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var n,o,r,s,a={};o=this.renderer,r=o.alignedObjects;var l,h;return t?(this.alignOptions=t,this.alignByTranslate=e,(!i||k(i))&&(this.alignTo=n=i||"renderer",m(r,this),r.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,n=this.alignTo),i=A(i,o[n],o),n=t.align,o=t.verticalAlign,r=(i.x||0)+(t.x||0),s=(i.y||0)+(t.y||0),"right"===n?l=1:"center"===n&&(l=2),l&&(r+=(i.width-(t.width||0))/l),a[e?"translateX":"x"]=Math.round(r),"bottom"===o?h=1:"middle"===o&&(h=2),h&&(s+=(i.height-(t.height||0))/h),a[e?"translateY":"y"]=Math.round(s),this[this.placed?"animate":"attr"](a),this.placed=!0,this.alignAttr=a,this},getBBox:function(t,e){var i,n,o,r,s,a=this.renderer,l=this.element,h=this.styles,c=this.textStr,u=a.cache,p=a.cacheKeys;if(e=A(e,this.rotation),n=e*d,o=h&&h.fontSize,void 0!==c&&(s=c.toString(),-1===s.indexOf("<")&&(s=s.replace(/[0-9]/g,"0")),s+=["",e||0,o,l.style.width,l.style["text-overflow"]].join()),s&&!t&&(i=u[s]),!i){if(l.namespaceURI===this.SVG_NS||a.forExport){try{(r=this.fakeTS&&function(t){f(l.querySelectorAll(".highcharts-text-outline"),function(e){e.style.display=t})})&&r("none"),i=l.getBBox?g({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},r&&r("")}catch(t){}(!i||0>i.width)&&(i={width:0,height:0})}else i=this.htmlGetBBox();if(a.isSVG&&(t=i.width,a=i.height,w&&h&&"11px"===h.fontSize&&"16.9"===a.toPrecision(3)&&(i.height=a=14),e&&(i.width=Math.abs(a*Math.sin(n))+Math.abs(t*Math.cos(n)),i.height=Math.abs(a*Math.cos(n))+Math.abs(t*Math.sin(n)))),s&&0<i.height){for(;250<p.length;)delete u[p.shift()];u[s]||p.push(s),u[s]=i}}return i},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,i=this.renderer,n=this.element;return t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(n),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this.element||{},n=this.renderer.isSVG&&"SPAN"===i.nodeName&&this.parentGroup;if(i.onclick=i.onmouseout=i.onmouseover=i.onmousemove=i.point=null,P(this),this.clipPath&&(this.clipPath=this.clipPath.destroy()),this.stops){for(e=0;e<this.stops.length;e++)this.stops[e]=this.stops[e].destroy();this.stops=null}for(this.safeRemoveChild(i),this.destroyShadows();n&&n.div&&0===n.div.childNodes.length;)i=n.parentGroup,this.safeRemoveChild(n.div),delete n.div,n=i;this.alignTo&&m(this.renderer.alignedObjects,this);for(t in this)delete this[t];return null},shadow:function(t,e,i){var n,o,s,a,l,h,c=[],d=this.element;if(t){if(!this.shadows){for(a=A(t.width,3),l=(t.opacity||.15)/a,h=this.parentInverted?"(-1,-1)":"("+A(t.offsetX,1)+", "+A(t.offsetY,1)+")",n=1;n<=a;n++)o=d.cloneNode(0),s=2*a+1-2*n,r(o,{isShadow:"true",stroke:t.color||"#000000","stroke-opacity":l*n,"stroke-width":s,transform:"translate"+h,fill:"none"}),i&&(r(o,"height",Math.max(r(o,"height")-s,0)),o.cutHeight=s),e?e.element.appendChild(o):d.parentNode.insertBefore(o,d),c.push(o);this.shadows=c}}else this.destroyShadows();return this},destroyShadows:function(){f(this.shadows||[],function(t){this.safeRemoveChild(t)},this),this.shadows=void 0},xGetter:function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},_defaultGetter:function(t){return t=A(this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),i.setAttribute(e,t),this[e]=t},dashstyleSetter:function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=E(t[e])*i;t=t.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[t])},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=p.createElementNS(this.SVG_NS,"title"),this.element.appendChild(e)),e.firstChild&&e.removeChild(e.firstChild),e.appendChild(p.createTextNode(String(A(t),"").replace(/<[^>]*>/g,"")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.colorGradient(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):i.setAttribute(e,t)},zIndexSetter:function(t,e){var i,n,o=this.renderer,r=this.parentGroup,s=(r||o).element||o.box,a=this.element;i=this.added;var l;if(c(t)&&(a.zIndex=t,t=+t,this[e]===t&&(i=!1),this[e]=t),i){for((t=this.zIndex)&&r&&(r.handleZ=!0),e=s.childNodes,l=0;l<e.length&&!n;l++)r=e[l],i=r.zIndex,r!==a&&(E(i)>t||!c(t)&&c(i)||0>t&&!c(i)&&s!==o.box)&&(s.insertBefore(a,r),n=!0);n||s.appendChild(a)}return n},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}},e.prototype.yGetter=e.prototype.xGetter,e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.rotationSetter=e.prototype.verticalAlignSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=function(t,e){this[e]=t,this.doTransform=!0},e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter=function(t,i,n){this[i]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",n),n.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===t&&this.hasStroke&&(n.removeAttribute("stroke"),this.hasStroke=!1)},i=t.SVGRenderer=function(){this.init.apply(this,arguments)},i.prototype={Element:e,SVG_NS:I,init:function(t,e,i,o,s,a){var h;o=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(o)),h=o.element,t.appendChild(h),-1===t.innerHTML.indexOf("xmlns")&&r(h,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=h,this.boxWrapper=o,this.alignedObjects=[],this.url=(x||C)&&p.getElementsByTagName("base").length?N.location.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highcharts 5.0.6")),this.defs=this.createElement("defs").add(),this.allowHTML=a,this.forExport=s,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1);var c;x&&t.getBoundingClientRect&&(e=function(){l(t,{left:0,top:0}),c=t.getBoundingClientRect(),l(t,{left:Math.ceil(c.left)-c.left+"px",top:Math.ceil(c.top)-c.top+"px"})},e(),this.unSubPixelFix=n(N,"resize",e))},getStyle:function(t){return this.style=g({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},setStyle:function(t){this.boxWrapper.css(this.getStyle(t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),u(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:M,getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},buildText:function(t){for(var e,i,n,o,s=t.element,a=this,h=a.forExport,c=A(t.textStr,"").toString(),d=-1!==c.indexOf("<"),u=s.childNodes,g=r(s,"x"),m=t.styles,y=t.textWidth,b=m&&m.lineHeight,x=m&&m.textOutline,w=m&&"ellipsis"===m.textOverflow,T=u.length,k=y&&!t.added&&this.box,C=function(t){var e;return e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:m&&m.fontSize||a.style.fontSize||12,b?E(b):a.fontMetrics(e,t.getAttribute("style")?t:s).h};T--;)s.removeChild(u[T]);d||x||w||y||-1!==c.indexOf(" ")?(e=/<.*class="([^"]+)".*>/,i=/<.*style="([^"]+)".*>/,n=/<.*href="(http[^"]+)".*>/,k&&k.appendChild(s),c=d?c.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[c],c=v(c,function(t){return""!==t}),f(c,function(c,d){var u,v=0;c=c.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),u=c.split("|||"),f(u,function(c){if(""!==c||1===u.length){var f,b,x={},T=p.createElementNS(a.SVG_NS,"tspan");if(e.test(c)&&(f=c.match(e)[1],r(T,"class",f)),i.test(c)&&(b=c.match(i)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),r(T,"style",b)),n.test(c)&&!h&&(r(T,"onclick",'location.href="'+c.match(n)[1]+'"'),l(T,{cursor:"pointer"})),c=(c.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==c){if(T.appendChild(p.createTextNode(c)),v?x.dx=0:d&&null!==g&&(x.x=g),r(T,x),s.appendChild(T),!v&&d&&(!D&&h&&l(T,{display:"block"}),r(T,"dy",C(T))),y){x=c.replace(/([^\^])-/g,"$1- ").split(" "),f="nowrap"===m.whiteSpace;for(var k,S,M=1<u.length||d||1<x.length&&!f,A=[],E=C(T),L=t.rotation,P=c,O=P.length;(M||w)&&(x.length||A.length);)t.rotation=0,k=t.getBBox(!0),S=k.width,!D&&a.forExport&&(S=a.measureSpanWidth(T.firstChild.data,t.styles)),k=S>y,void 0===o&&(o=k),w&&o?(O/=2,""===P||!k&&.5>O?x=[]:(P=c.substring(0,P.length+(k?-1:1)*Math.ceil(O)),x=[P+(3<y?"\u2026":"")],T.removeChild(T.firstChild))):k&&1!==x.length?(T.removeChild(T.firstChild),A.unshift(x.pop())):(x=A,A=[],x.length&&!f&&(T=p.createElementNS(I,"tspan"),r(T,{dy:E,x:g}),b&&r(T,"style",b),s.appendChild(T)),S>y&&(y=S)),x.length&&T.appendChild(p.createTextNode(x.join(" ").replace(/- /g,"-")));t.rotation=L}v++}}})}),o&&t.attr("title",t.textStr),k&&k.removeChild(s),x&&t.applyTextOutline&&t.applyTextOutline(x)):s.appendChild(p.createTextNode(c.replace(/</g,"<").replace(/>/g,">")))},getContrast:function(t){return t=a(t).rgba,510<t[0]+t[1]+t[2]?"#000000":"#FFFFFF"},button:function(t,e,i,o,r,s,a,l,h){var c=this.label(t,e,i,h,null,null,null,null,"button"),d=0;c.attr(S({padding:8,r:2},r));var u,p,f,m;return r=S({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},r),u=r.style,delete r.style,s=S(r,{fill:"#e6e6e6"},s),p=s.style,delete s.style,a=S(r,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},a),f=a.style,delete a.style,l=S(r,{style:{color:"#cccccc"}},l),m=l.style,delete l.style,n(c.element,w?"mouseover":"mouseenter",function(){3!==d&&c.setState(1)}),n(c.element,w?"mouseout":"mouseleave",function(){3!==d&&c.setState(d)}),c.setState=function(t){1!==t&&(c.state=d=t),c.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),c.attr([r,s,a,l][t||0]).css([u,p,f,m][t||0])},c.attr(r).css(g({cursor:"default"},u)),c.on("click",function(t){3!==d&&o.call(c,t)})},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=Math.round(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=Math.round(t[2])+e%2/2),t},path:function(t){var e={fill:"none"};return b(t)?e.d=t:T(t)&&g(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=T(t)?t:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=e.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},e.attr(t)},arc:function(t,e,i,n,o,r){return T(t)&&(e=t.y,i=t.r,n=t.innerR,o=t.start,r=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:o||0,end:r||0}),t.r=i,t},rect:function(t,e,i,n,o,s){o=T(t)?t.r:o;var a=this.createElement("rect");return t=T(t)?t:void 0===t?{}:{x:t,y:e,width:Math.max(i,0),height:Math.max(n,0)},void 0!==s&&(t.strokeWidth=s,t=a.crisp(t)),t.fill="none",o&&(t.r=o),a.rSetter=function(t,e,i){r(i,{rx:t,ry:t})},a.attr(t)},setSize:function(t,e,i){var n=this.alignedObjects,o=n.length;for(this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:A(i,!0)?void 0:0});o--;)n[o].align()},g:function(t){var e=this.createElement("g");return t?e.attr({"class":"highcharts-"+t}):e},image:function(t,e,i,n,o){var r={preserveAspectRatio:"none"};return 1<arguments.length&&g(r,{
x:e,y:i,width:n,height:o}),r=this.createElement("image").attr(r),r.element.setAttributeNS?r.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):r.element.setAttribute("hc-svg-href",t),r},symbol:function(t,e,i,n,o,r){var a,d,u,m=this,v=this.symbols[t],y=c(e)&&v&&v(Math.round(e),Math.round(i),n,o,r),b=/^url\((.*?)\)$/;return v?(a=this.path(y),a.attr("fill","none"),g(a,{symbolName:t,x:e,y:i,width:n,height:o}),r&&g(a,r)):b.test(t)&&(d=t.match(b)[1],a=this.image(d),a.imgwidth=A(O[d]&&O[d].width,r&&r.width),a.imgheight=A(O[d]&&O[d].height,r&&r.height),u=function(){a.attr({width:a.width,height:a.height})},f(["width","height"],function(t){a[t+"Setter"]=function(t,e){var i={},n=this["img"+e],o="width"===e?"translateX":"translateY";this[e]=t,c(n)&&(this.element&&this.element.setAttribute(e,n),this.alignByTranslate||(i[o]=((this[e]||0)-n)/2,this.attr(i)))}}),c(e)&&a.attr({x:e,y:i}),a.isImg=!0,c(a.imgwidth)&&c(a.imgheight)?u():(a.attr({width:0,height:0}),h("img",{onload:function(){var t=s[m.chartIndex];0===this.width&&(l(this,{position:"absolute",top:"-999em"}),p.body.appendChild(this)),O[d]={width:this.width,height:this.height},a.imgwidth=this.width,a.imgheight=this.height,a.element&&u(),this.parentNode&&this.parentNode.removeChild(this),m.imgCount--,!m.imgCount&&t&&t.onload&&t.onload()},src:d}),this.imgCount++)),a},symbols:{circle:function(t,e,i,n){var o=.166*i;return["M",t+i/2,e,"C",t+i+o,e,t+i+o,e+n,t+i/2,e+n,"C",t-o,e+n,t-o,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,o){var r=o.start;i=o.r||i||n;var s=o.end-.001;n=o.innerR;var a=o.open,l=Math.cos(r),h=Math.sin(r),c=Math.cos(s),s=Math.sin(s);return o=o.end-r<Math.PI?0:1,["M",t+i*l,e+i*h,"A",i,i,0,o,1,t+i*c,e+i*s,a?"M":"L",t+n*c,e+n*s,"A",n,n,0,o,0,t+n*l,e+n*h,a?"":"Z"]},callout:function(t,e,i,n,o){var r=Math.min(o&&o.r||0,i,n),s=r+6,a=o&&o.anchorX;o=o&&o.anchorY;var l;return l=["M",t+r,e,"L",t+i-r,e,"C",t+i,e,t+i,e,t+i,e+r,"L",t+i,e+n-r,"C",t+i,e+n,t+i,e+n,t+i-r,e+n,"L",t+r,e+n,"C",t,e+n,t,e+n,t,e+n-r,"L",t,e+r,"C",t,e,t,e,t+r,e],a&&a>i?o>e+s&&o<e+n-s?l.splice(13,3,"L",t+i,o-6,t+i+6,o,t+i,o+6,t+i,e+n-r):l.splice(13,3,"L",t+i,n/2,a,o,t+i,n/2,t+i,e+n-r):a&&0>a?o>e+s&&o<e+n-s?l.splice(33,3,"L",t,o+6,t-6,o,t,o-6,t,e+r):l.splice(33,3,"L",t,n/2,a,o,t,n/2,t,e+r):o&&o>n&&a>t+s&&a<t+i-s?l.splice(23,3,"L",a+6,e+n,a,e+n+6,a-6,e+n,t+r,e+n):o&&0>o&&a>t+s&&a<t+i-s&&l.splice(3,3,"L",a-6,e,a,e-6,a+6,e,i-r,e),l}},clipRect:function(e,i,n,o){var r=t.uniqueKey(),s=this.createElement("clipPath").attr({id:r}).add(this.defs);return e=this.rect(e,i,n,o,0).add(s),e.id=r,e.clipPath=s,e.count=0,e},text:function(t,e,i,n){var o=!D&&this.forExport,r={};return!n||!this.allowHTML&&this.forExport?(r.x=Math.round(e||0),i&&(r.y=Math.round(i)),(t||0===t)&&(r.text=t),t=this.createElement("text").attr(r),o&&t.css({position:"absolute"}),n||(t.xSetter=function(t,e,i){var n,o,r=i.getElementsByTagName("tspan"),s=i.getAttribute(e);for(o=0;o<r.length;o++)n=r[o],n.getAttribute(e)===s&&n.setAttribute(e,t);i.setAttribute(e,t)}),t):this.html(t,e,i)},fontMetrics:function(t,e){return t=t||e&&e.style&&e.style.fontSize||this.style&&this.style.fontSize,t=/px/.test(t)?E(t):/em/.test(t)?parseFloat(t)*(e?this.fontMetrics(null,e.parentNode).f:16):12,e=24>t?t+3:Math.round(1.2*t),{h:e,b:Math.round(.8*e),f:t}},rotCorr:function(t,e,i){var n=t;return e&&i&&(n=Math.max(n*Math.cos(e*d),4)),{x:-t/3*Math.sin(e*d),y:n}},label:function(t,i,n,o,r,s,a,l,h){var d,u,p,m,v,y,b,x,w,T,k,C,M,A=this,E=A.g("button"!==h&&"label"),P=E.text=A.text("",0,0,a).attr({zIndex:1}),D=0,I=3,O=0,N={},R=/^url\((.*?)\)$/.test(o),z=R;h&&E.addClass("highcharts-"+h),z=R,T=function(){return(x||0)%2/2},k=function(){var t=P.element.style,e={};u=(void 0===p||void 0===m||b)&&c(P.textStr)&&P.getBBox(),E.width=(p||u.width||0)+2*I+O,E.height=(m||u.height||0)+2*I,w=I+A.fontMetrics(t&&t.fontSize,P).b,z&&(d||(E.box=d=A.symbols[o]||R?A.symbol(o):A.rect(),d.addClass(("button"===h?"":"highcharts-label-box")+(h?" highcharts-"+h+"-box":"")),d.add(E),t=T(),e.x=t,e.y=(l?-w:0)+t),e.width=Math.round(E.width),e.height=Math.round(E.height),d.attr(g(e,N)),N={})},C=function(){var t,e=O+I;t=l?0:w,c(p)&&u&&("center"===b||"right"===b)&&(e+={center:.5,right:1}[b]*(p-u.width)),e===P.x&&t===P.y||(P.attr("x",e),void 0!==t&&P.attr("y",t)),P.x=e,P.y=t},M=function(t,e){d?d.attr(t,e):N[t]=e},E.onAdd=function(){P.add(E),E.attr({text:t||0===t?t:"",x:i,y:n}),d&&c(r)&&E.attr({anchorX:r,anchorY:s})},E.widthSetter=function(t){p=t},E.heightSetter=function(t){m=t},E["text-alignSetter"]=function(t){b=t},E.paddingSetter=function(t){c(t)&&t!==I&&(I=E.padding=t,C())},E.paddingLeftSetter=function(t){c(t)&&t!==O&&(O=t,C())},E.alignSetter=function(t){t={left:0,center:.5,right:1}[t],t!==D&&(D=t,u&&E.attr({x:v}))},E.textSetter=function(t){void 0!==t&&P.textSetter(t),k(),C()},E["stroke-widthSetter"]=function(t,e){t&&(z=!0),x=this["stroke-width"]=t,M(e,t)},E.strokeSetter=E.fillSetter=E.rSetter=function(t,e){"fill"===e&&t&&(z=!0),M(e,t)},E.anchorXSetter=function(t,e){r=t,M(e,Math.round(t)-T()-v)},E.anchorYSetter=function(t,e){s=t,M(e,t-y)},E.xSetter=function(t){E.x=t,D&&(t-=D*((p||u.width)+2*I)),v=Math.round(t),E.attr("translateX",v)},E.ySetter=function(t){y=E.y=Math.round(t),E.attr("translateY",y)};var $=E.css;return g(E,{css:function(t){if(t){var e={};t=S(t),f(E.textProps,function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),P.css(e)}return $.call(E,t)},getBBox:function(){return{width:u.width+2*I,height:u.height+2*I,x:u.x-I,y:u.y-I}},shadow:function(t){return t&&(k(),d&&d.shadow(t)),E},destroy:function(){L(E.element,"mouseenter"),L(E.element,"mouseleave"),P&&(P=P.destroy()),d&&(d=d.destroy()),e.prototype.destroy.call(E),E=A=k=C=M=null}})}},t.Renderer=i}(t),function(t){var e=t.attr,i=t.createElement,n=t.css,o=t.defined,r=t.each,s=t.extend,a=t.isFirefox,l=t.isMS,h=t.isWebKit,c=t.pInt,d=t.SVGRenderer,u=t.win,p=t.wrap;s(t.SVGElement.prototype,{htmlCss:function(t){var e=this.element;return(e=t&&"SPAN"===e.tagName&&t.width)&&(delete t.width,this.textWidth=e,this.updateTransform()),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=s(this.styles,t),n(this.element,t),this},htmlGetBBox:function(){var t=this.element;return"text"===t.nodeName&&(t.style.position="absolute"),{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,s=this.translateY||0,a=this.x||0,l=this.y||0,d=this.textAlign||"left",u={left:0,center:.5,right:1}[d],p=this.styles;if(n(e,{marginLeft:i,marginTop:s}),this.shadows&&r(this.shadows,function(t){n(t,{marginLeft:i+1,marginTop:s+1})}),this.inverted&&r(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var f=this.rotation,g=c(this.textWidth),m=p&&p.whiteSpace,v=[f,d,e.innerHTML,this.textWidth,this.textAlign].join();v!==this.cTT&&(p=t.fontMetrics(e.style.fontSize).b,o(f)&&this.setSpanRotation(f,u,p),n(e,{width:"",whiteSpace:m||"nowrap"}),e.offsetWidth>g&&/[ \-]/.test(e.textContent||e.innerText)&&n(e,{width:g+"px",display:"block",whiteSpace:m||"normal"}),this.getSpanCorrection(e.offsetWidth,p,u,f,d)),n(e,{left:a+(this.xCorr||0)+"px",top:l+(this.yCorr||0)+"px"}),h&&(p=e.offsetHeight),this.cTT=v}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var o={},r=l?"-ms-transform":h?"-webkit-transform":a?"MozTransform":u.opera?"-o-transform":"";o[r]=o.transform="rotate("+t+"deg)",o[r+(a?"Origin":"-origin")]=o.transformOrigin=100*e+"% "+i+"px",n(this.element,o)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),s(d.prototype,{html:function(t,n,o){var a=this.createElement("span"),l=a.element,h=a.renderer,c=h.isSVG,d=function(t,e){r(["opacity","visibility"],function(i){p(t,i+"Setter",function(t,i,n,o){t.call(this,i,n,o),e[n]=i})})};return a.textSetter=function(t){t!==l.innerHTML&&delete this.bBox,l.innerHTML=this.textStr=t,a.htmlUpdateTransform()},c&&d(a,a.element.style),a.xSetter=a.ySetter=a.alignSetter=a.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),a[e]=t,a.htmlUpdateTransform()},a.attr({text:t,x:Math.round(n),y:Math.round(o)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"}),l.style.whiteSpace="nowrap",a.css=a.htmlCss,c&&(a.add=function(t){var n,o=h.box.parentNode,c=[];if(this.parentGroup=t){if(n=t.div,!n){for(;t;)c.push(t),t=t.parentGroup;r(c.reverse(),function(t){var r,l=e(t.element,"class");l&&(l={className:l}),n=t.div=t.div||i("div",l,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},n||o),r=n.style,s(t,{on:function(){return a.on.apply({element:c[0].div},arguments),t},translateXSetter:function(e,i){r.left=e+"px",t[i]=e,t.doTransform=!0},translateYSetter:function(e,i){r.top=e+"px",t[i]=e,t.doTransform=!0}}),d(t,r)})}}else n=o;return n.appendChild(l),a.added=!0,a.alignOnAdd&&a.htmlUpdateTransform(),a}),a}})}(t),function(t){var e,i,n=t.createElement,o=t.css,r=t.defined,s=t.deg2rad,a=t.discardElement,l=t.doc,h=t.each,c=t.erase,d=t.extend;e=t.extendClass;var u=t.isArray,p=t.isNumber,f=t.isObject,g=t.merge;i=t.noop;var m=t.pick,v=t.pInt,y=t.SVGElement,b=t.SVGRenderer,x=t.win;t.svg||(i={docMode8:l&&8===l.documentMode,init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],o=["position: ","absolute",";"],r="div"===e;("shape"===e||r)&&o.push("left:0;top:0;width:1px;height:1px;"),o.push("visibility: ",r?"hidden":"visible"),i.push(' style="',o.join(""),'"/>'),e&&(i=r||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=n(i)),this.renderer=t},add:function(t){var e=this.renderer,i=this.element,n=e.box,o=t&&t.inverted,n=t?t.element||t:n;return t&&(this.parentGroup=t),o&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this.className&&this.attr("class",this.className),this},updateTransform:y.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=Math.cos(t*s),i=Math.sin(t*s);o(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):"none"})},getSpanCorrection:function(t,e,i,n,r){var a,l=n?Math.cos(n*s):1,h=n?Math.sin(n*s):0,c=m(this.elemHeight,this.element.offsetHeight);this.xCorr=0>l&&-t,this.yCorr=0>h&&-c,a=0>l*h,this.xCorr+=h*e*(a?1-i:i),this.yCorr-=l*e*(n?a?i:1-i:1),r&&"left"!==r&&(this.xCorr-=t*i*(0>l?-1:1),n&&(this.yCorr-=c*i*(0>h?-1:1)),o(this.element,{textAlign:r}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)p(t[e])?i[e]=Math.round(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},clip:function(t){var e,i=this;return t?(e=t.members,c(e,i),e.push(i),i.destroyClip=function(){c(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:i.docMode8?"inherit":"rect(auto)"}),i.css(t)},css:y.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&a(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),y.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=x.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var i;return t=t.split(/[ ,]/),i=t.length,9!==i&&11!==i||(t[i-4]=t[i-2]=v(t[i-2])-10*e),t.join(" ")},shadow:function(t,e,i){var o,r,s,a,l,h,c,d=[],u=this.element,p=this.renderer,f=u.style,g=u.path;if(g&&"string"!=typeof g.value&&(g="x"),l=g,t){for(h=m(t.width,3),c=(t.opacity||.15)/h,o=1;3>=o;o++)a=2*h+1-2*o,i&&(l=this.cutOffPath(g.value,a+.5)),s=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',u.style.cssText,'" />'],r=n(p.prepVML(s),null,{left:v(f.left)+m(t.offsetX,1),top:v(f.top)+m(t.offsetY,1)}),i&&(r.cutOff=a+1),s=['<stroke color="',t.color||"#000000",'" opacity="',c*o,'"/>'],n(p.prepVML(s),null,null,r),e?e.element.appendChild(r):u.parentNode.insertBefore(r,u),d.push(r);this.shadows=d}return this},updateShadows:i,setAttr:function(t,e){this.docMode8?this.element[t]=e:this.element.setAttribute(t,e)},classSetter:function(t){(this.added?this.element:this).className=t},dashstyleSetter:function(t,e,i){(i.getElementsByTagName("stroke")[0]||n(this.renderer.prepVML(["<stroke/>"]),null,null,i))[e]=t||"solid",this[e]=t},dSetter:function(t,e,i){var n=this.shadows;if(t=t||[],this.d=t.join&&t.join(" "),i.path=t=this.pathToVML(t),n)for(i=n.length;i--;)n[i].path=n[i].cutOff?this.cutOffPath(t,n[i].cutOff):t;this.setAttr(e,t)},fillSetter:function(t,e,i){var n=i.nodeName;"SPAN"===n?i.style.color=t:"IMG"!==n&&(i.filled="none"!==t,this.setAttr("fillcolor",this.renderer.color(t,i,e,this)))},"fill-opacitySetter":function(t,e,i){n(this.renderer.prepVML(["<",e.split("-")[0],' opacity="',t,'"/>']),null,null,i)},opacitySetter:i,rotationSetter:function(t,e,i){i=i.style,this[e]=i[e]=t,i.left=-Math.round(Math.sin(t*s)+1)+"px",i.top=Math.round(Math.cos(t*s))+"px"},strokeSetter:function(t,e,i){this.setAttr("strokecolor",this.renderer.color(t,i,e,this))},"stroke-widthSetter":function(t,e,i){i.stroked=!!t,this[e]=t,p(t)&&(t+="px"),this.setAttr("strokeweight",t)},titleSetter:function(t,e){this.setAttr(e,t)},visibilitySetter:function(t,e,i){"inherit"===t&&(t="visible"),this.shadows&&h(this.shadows,function(i){i.style[e]=t}),"DIV"===i.nodeName&&(t="hidden"===t?"-999em":0,this.docMode8||(i.style[e]=t?"visible":"hidden"),e="top"),i.style[e]=t},xSetter:function(t,e,i){this[e]=t,"x"===e?e="left":"y"===e&&(e="top"),this.updateClipping?(this[e]=t,this.updateClipping()):i.style[e]=t},zIndexSetter:function(t,e,i){i.style[e]=t}},i["stroke-opacitySetter"]=i["fill-opacitySetter"],t.VMLElement=i=e(y,i),i.prototype.ySetter=i.prototype.widthSetter=i.prototype.heightSetter=i.prototype.xSetter,i={Element:i,isIE8:-1<x.navigator.userAgent.indexOf("MSIE 8.0"),init:function(t,e,i){var n,o;if(this.alignedObjects=[],n=this.createElement("div").css({position:"relative"}),o=n.element,t.appendChild(n.element),this.isVML=!0,this.box=o,this.boxWrapper=n,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1),!l.namespaces.hcv){l.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{l.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(t){l.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(t,e,i,n){var o=this.createElement(),r=f(t);return d(o,{members:[],count:0,left:(r?t.x:t)+1,top:(r?t.y:e)+1,width:(r?t.width:i)-1,height:(r?t.height:n)-1,getCSS:function(t){var e=t.element,i=e.nodeName,n=t.inverted,o=this.top-("shape"===i?e.offsetTop:0),r=this.left,e=r+this.width,s=o+this.height,o={clip:"rect("+Math.round(n?r:o)+"px,"+Math.round(n?s:e)+"px,"+Math.round(n?e:s)+"px,"+Math.round(n?o:r)+"px)"};return!n&&t.docMode8&&"DIV"===i&&d(o,{width:e+"px",height:s+"px"}),o},updateClipping:function(){h(o.members,function(t){t.element&&t.css(o.getCSS(t))})}})},color:function(e,i,o,r){var s,a,l,c=this,d=/^rgba/,u="none";if(e&&e.linearGradient?l="gradient":e&&e.radialGradient&&(l="pattern"),l){var p,f,g,m,v,y,b,x=e.linearGradient||e.radialGradient,w="";e=e.stops;var T,k=[],C=function(){a=['<fill colors="'+k.join(",")+'" opacity="',v,'" o:opacity2="',m,'" type="',l,'" ',w,'focus="100%" method="any" />'],n(c.prepVML(a),null,null,i)};if(g=e[0],T=e[e.length-1],0<g[0]&&e.unshift([0,g[1]]),1>T[0]&&e.push([1,T[1]]),h(e,function(e,i){d.test(e[1])?(s=t.color(e[1]),p=s.get("rgb"),f=s.get("a")):(p=e[1],f=1),k.push(100*e[0]+"% "+p),i?(v=f,y=p):(m=f,b=p)}),"fill"===o)if("gradient"===l)o=x.x1||x[0]||0,e=x.y1||x[1]||0,g=x.x2||x[2]||0,x=x.y2||x[3]||0,w='angle="'+(90-180*Math.atan((x-e)/(g-o))/Math.PI)+'"',C();else{var S,u=x.r,M=2*u,A=2*u,E=x.cx,L=x.cy,P=i.radialReference,u=function(){P&&(S=r.getBBox(),E+=(P[0]-S.x)/S.width-.5,L+=(P[1]-S.y)/S.height-.5,M*=P[2]/S.width,A*=P[2]/S.height),w='src="'+t.getOptions().global.VMLRadialGradientURL+'" size="'+M+","+A+'" origin="0.5,0.5" position="'+E+","+L+'" color2="'+b+'" ',C()};r.added?u():r.onAdd=u,u=y}else u=p}else d.test(e)&&"IMG"!==i.tagName?(s=t.color(e),r[o+"-opacitySetter"](s.get("a"),o,i),u=s.get("rgb")):(u=i.getElementsByTagName(o),u.length&&(u[0].opacity=1,u[0].type="solid"),u=e);return u},prepVML:function(t){var e=this.isIE8;return t=t.join(""),e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:b.prototype.html,path:function(t){var e={coordsize:"10 10"};return u(t)?e.d=t:f(t)&&d(e,t),this.createElement("shape").attr(e)},circle:function(t,e,i){var n=this.symbol("circle");return f(t)&&(i=t.r,e=t.y,t=t.x),n.isCircle=!0,n.r=i,n.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement("div").attr(e)},image:function(t,e,i,n,o){var r=this.createElement("img").attr({src:t});return 1<arguments.length&&r.attr({x:e,y:i,width:n,height:o}),r},createElement:function(t){return"rect"===t?this.symbol(t):b.prototype.createElement.call(this,t)},invertChild:function(t,e){var i=this;e=e.style;var n="IMG"===t.tagName&&t.style;o(t,{flip:"x",left:v(e.width)-(n?v(n.top):1),top:v(e.height)-(n?v(n.left):1),rotation:-90}),h(t.childNodes,function(e){i.invertChild(e,t)})},symbols:{arc:function(t,e,i,n,o){var r=o.start,s=o.end,a=o.r||i||n;i=o.innerR,n=Math.cos(r);var l=Math.sin(r),h=Math.cos(s),c=Math.sin(s);return 0===s-r?["x"]:(r=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*l,t+a*h,e+a*c],o.open&&!i&&r.push("e","M",t,e),r.push("at",t-i,e-i,t+i,e+i,t+i*h,e+i*c,t+i*n,e+i*l,"x","e"),r.isArc=!0,r)},circle:function(t,e,i,n,o){return o&&r(o.r)&&(i=n=2*o.r),o&&o.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,o){return b.prototype.symbols[r(o)&&o.r?"callout":"square"].call(0,t,e,i,n,o)}}},t.VMLRenderer=e=function(){this.init.apply(this,arguments)},e.prototype=g(b.prototype,i),t.Renderer=e),b.prototype.measureSpanWidth=function(t,e){var i=l.createElement("span");return t=l.createTextNode(t),i.appendChild(t),o(i,e),this.box.appendChild(i),e=i.offsetWidth,a(i),e}}(t),function(t){function e(){var e,i=t.defaultOptions.global,r=i.useUTC,l=r?"getUTC":"get",h=r?"setUTC":"set";t.Date=e=i.Date||a.Date,e.hcTimezoneOffset=r&&i.timezoneOffset,e.hcGetTimezoneOffset=r&&i.getTimezoneOffset,e.hcMakeTime=function(t,i,n,a,l,h){var c;return r?(c=e.UTC.apply(0,arguments),c+=o(c)):c=new e(t,i,s(n,1),s(a,0),s(l,0),s(h,0)).getTime(),c},n("Minutes Hours Day Date Month FullYear".split(" "),function(t){e["hcGet"+t]=l+t}),n("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(t){e["hcSet"+t]=h+t})}var i=t.color,n=t.each,o=t.getTZOffset,r=t.merge,s=t.pick,a=t.win;t.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,VMLRadialGradientURL:"http://code.highcharts.com/5.0.6/gfx/vml-radial-gradient.png"},chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:t.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:t.isTouchDevice?25:10,backgroundColor:i("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},t.setOptions=function(i){return t.defaultOptions=r(!0,t.defaultOptions,i),e(),t.defaultOptions},t.getOptions=function(){return t.defaultOptions},t.defaultPlotOptions=t.defaultOptions.plotOptions,e()}(t),function(t){var e=t.arrayMax,i=t.arrayMin,n=t.defined,o=t.destroyObjectProperties,r=t.each,s=t.erase,a=t.merge,l=t.pick;t.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},t.PlotLineOrBand.prototype={render:function(){var t,e=this,i=e.axis,o=i.horiz,r=e.options,s=r.label,h=e.label,c=r.to,d=r.from,u=r.value,p=n(d)&&n(c),f=n(u),g=e.svgElem,m=!g,v=[],y=r.color,b=l(r.zIndex,0),x=r.events,v={"class":"highcharts-plot-"+(p?"band ":"line ")+(r.className||"")},w={},T=i.chart.renderer,k=p?"bands":"lines",C=i.log2lin;if(i.isLog&&(d=C(d),c=C(c),u=C(u)),f?(v={stroke:y,"stroke-width":r.width},r.dashStyle&&(v.dashstyle=r.dashStyle)):p&&(y&&(v.fill=y),r.borderWidth&&(v.stroke=r.borderColor,v["stroke-width"]=r.borderWidth)),w.zIndex=b,k+="-"+b,(y=i[k])||(i[k]=y=T.g("plot-"+k).attr(w).add()),m&&(e.svgElem=g=T.path().attr(v).add(y)),f)v=i.getPlotLinePath(u,g.strokeWidth());else{if(!p)return;v=i.getPlotBandPath(d,c,r)}if(m&&v&&v.length){if(g.attr({d:v}),x)for(t in r=function(t){g.on(t,function(i){x[t].apply(e,[i])})},x)r(t)}else g&&(v?(g.show(),g.animate({d:v})):(g.hide(),h&&(e.label=h=h.destroy())));return s&&n(s.text)&&v&&v.length&&0<i.width&&0<i.height&&!v.flat?(s=a({align:o&&p&&"center",x:o?!p&&4:10,verticalAlign:!o&&p&&"middle",y:o?p?16:10:p?6:-4,rotation:o&&!p&&90},s),this.renderLabel(s,v,p,b)):h&&h.hide(),e},renderLabel:function(t,n,o,r){var s=this.label,a=this.axis.chart.renderer;s||(s={align:t.textAlign||t.align,rotation:t.rotation,"class":"highcharts-plot-"+(o?"band":"line")+"-label "+(t.className||"")},s.zIndex=r,this.label=s=a.text(t.text,0,0,t.useHTML).attr(s).add(),s.css(t.style)),r=[n[1],n[4],o?n[6]:n[1]],n=[n[2],n[5],o?n[7]:n[2]],o=i(r),a=i(n),s.align(t,!1,{x:o,y:a,width:e(r)-o,height:e(n)-a}),s.show()},destroy:function(){s(this.axis.plotLinesAndBands,this),delete this.axis,o(this)}},t.AxisPlotLineOrBandExtension={getPlotBandPath:function(t,e){return e=this.getPlotLinePath(e,null,null,!0),(t=this.getPlotLinePath(t,null,null,!0))&&e?(t.flat=t.toString()===e.toString(),t.push(e[4],e[5],e[1],e[2],"z")):t=null,t},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(e,i){var n=new t.PlotLineOrBand(this,e).render(),o=this.userOptions;return n&&(i&&(o[i]=o[i]||[],o[i].push(e)),this.plotLinesAndBands.push(n)),n},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,o=e.length;o--;)e[o].id===t&&e[o].destroy();r([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(e){for(o=e.length;o--;)e[o].id===t&&s(e,e[o])})}}}(t),function(t){var e=t.correctFloat,i=t.defined,n=t.destroyObjectProperties,o=t.isNumber,r=t.merge,s=t.pick,a=t.deg2rad;t.Tick=function(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,i||n||this.addLabel()},t.Tick.prototype={addLabel:function(){var t,n=this.axis,o=n.options,a=n.chart,l=n.categories,h=n.names,c=this.pos,d=o.labels,u=n.tickPositions,p=c===u[0],f=c===u[u.length-1],h=l?s(l[c],h[c],c):c,l=this.label,u=u.info;n.isDatetimeAxis&&u&&(t=o.dateTimeLabelFormats[u.higherRanks[c]||u.unitName]),this.isFirst=p,this.isLast=f,o=n.labelFormatter.call({axis:n,chart:a,isFirst:p,isLast:f,dateTimeLabelFormat:t,value:n.isLog?e(n.lin2log(h)):h}),i(l)?l&&l.attr({text:o}):(this.labelLength=(this.label=l=i(o)&&d.enabled?a.renderer.text(o,0,0,d.useHTML).css(r(d.style)).add(n.labelGroup):null)&&l.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e,i=this.axis,n=t.x,o=i.chart.chartWidth,r=i.chart.spacing,l=s(i.labelLeft,Math.min(i.pos,r[3])),r=s(i.labelRight,Math.max(i.pos+i.len,o-r[1])),h=this.label,c=this.rotation,d={left:0,center:.5,right:1}[i.labelAlign],u=h.getBBox().width,p=i.getSlotWidth(),f=p,g=1,m={};c?0>c&&n-d*u<l?e=Math.round(n/Math.cos(c*a)-l):0<c&&n+d*u>r&&(e=Math.round((o-n)/Math.cos(c*a))):(o=n+(1-d)*u,n-d*u<l?f=t.x+f*(1-d)-l:o>r&&(f=r-t.x+f*d,g=-1),f=Math.min(p,f),f<p&&"center"===i.labelAlign&&(t.x+=g*(p-f-d*(p-Math.min(u,f)))),(u>f||i.autoRotation&&(h.styles||{}).width)&&(e=f)),e&&(m.width=e,(i.options.labels.style||{}).textOverflow||(m.textOverflow="ellipsis"),h.css(m))},getPosition:function(t,e,i,n){var o=this.axis,r=o.chart,s=n&&r.oldChartHeight||r.chartHeight;return{x:t?o.translate(e+i,null,null,n)+o.transB:o.left+o.offset+(o.opposite?(n&&r.oldChartWidth||r.chartWidth)-o.right-o.left:0),y:t?s-o.bottom+o.offset-(o.opposite?o.height:0):s-o.translate(e+i,null,null,n)-o.transB}},getLabelPosition:function(t,e,n,o,r,s,l,h){var c=this.axis,d=c.transA,u=c.reversed,p=c.staggerLines,f=c.tickRotCorr||{x:0,y:0},g=r.y;return i(g)||(g=0===c.side?n.rotation?-8:-n.getBBox().height:2===c.side?f.y+8:Math.cos(n.rotation*a)*(f.y-n.getBBox(!1,0).height/2)),t=t+r.x+f.x-(s&&o?s*d*(u?-1:1):0),e=e+g-(s&&!o?s*d*(u?1:-1):0),p&&(n=l/(h||1)%p,c.opposite&&(n=p-n-1),e+=c.labelOffset/p*n),{x:t,y:Math.round(e)}},getMarkPath:function(t,e,i,n,o,r){return r.crispLine(["M",t,e,"L",t+(o?0:-i),e+(o?i:0)],n)},render:function(t,e,i){var n=this.axis,r=n.options,a=n.chart.renderer,l=n.horiz,h=this.type,c=this.label,d=this.pos,u=r.labels,p=this.gridLine,f=h?h+"Tick":"tick",g=n.tickSize(f),m=this.mark,v=!m,y=u.step,b={},x=!0,w=n.tickmarkOffset,T=this.getPosition(l,d,w,e),k=T.x,T=T.y,C=l&&k===n.pos+n.len||!l&&T===n.pos?-1:1,S=h?h+"Grid":"grid",M=r[S+"LineWidth"],A=r[S+"LineColor"],E=r[S+"LineDashStyle"],S=s(r[f+"Width"],!h&&n.isXAxis?1:0),f=r[f+"Color"];i=s(i,1),this.isActive=!0,p||(b.stroke=A,b["stroke-width"]=M,E&&(b.dashstyle=E),h||(b.zIndex=1),e&&(b.opacity=0),this.gridLine=p=a.path().attr(b).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(n.gridGroup)),!e&&p&&(d=n.getPlotLinePath(d+w,p.strokeWidth()*C,e,!0))&&p[this.isNew?"attr":"animate"]({d:d,opacity:i}),g&&(n.opposite&&(g[0]=-g[0]),v&&(this.mark=m=a.path().addClass("highcharts-"+(h?h+"-":"")+"tick").add(n.axisGroup),m.attr({stroke:f,"stroke-width":S})),m[v?"attr":"animate"]({d:this.getMarkPath(k,T,g[0],m.strokeWidth()*C,l,a),opacity:i})),c&&o(k)&&(c.xy=T=this.getLabelPosition(k,T,c,l,u,w,t,y),this.isFirst&&!this.isLast&&!s(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!s(r.showLastLabel,1)?x=!1:!l||n.isRadial||u.step||u.rotation||e||0===i||this.handleOverflow(T),y&&t%y&&(x=!1),x&&o(T.y)?(T.opacity=i,c[this.isNew?"attr":"animate"](T)):c.attr("y",-9999),this.isNew=!1)},destroy:function(){n(this,this.axis)}}}(t),function(t){var e=t.addEvent,i=t.animObject,n=t.arrayMax,o=t.arrayMin,r=t.AxisPlotLineOrBandExtension,s=t.color,a=t.correctFloat,l=t.defaultOptions,h=t.defined,c=t.deg2rad,d=t.destroyObjectProperties,u=t.each,p=t.extend,f=t.fireEvent,g=t.format,m=t.getMagnitude,v=t.grep,y=t.inArray,b=t.isArray,x=t.isNumber,w=t.isString,T=t.merge,k=t.normalizeTickInterval,C=t.pick,S=t.PlotLineOrBand,M=t.removeEvent,A=t.splat,E=t.syncTimeout,L=t.Tick;t.Axis=function(){this.init.apply(this,arguments)},t.Axis.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return t.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(t,i){var n=i.isX;this.chart=t,this.horiz=t.inverted?!n:n,this.isXAxis=n,this.coll=this.coll||(n?"xAxis":"yAxis"),this.opposite=i.opposite,this.side=i.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(i);var o=this.options,r=o.type;this.labelFormatter=o.labels.formatter||this.defaultLabelFormatter,this.userOptions=i,this.minPixelPadding=0,this.reversed=o.reversed,this.visible=!1!==o.visible,this.zoomEnabled=!1!==o.zoomEnabled,this.hasNames="category"===r||!0===o.categories,this.categories=o.categories||this.hasNames,this.names=this.names||[],this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=h(o.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=o.minRange||o.maxZoom,this.range=o.range,this.offset=o.offset||0,this.stacks={},this.oldStacks={},this.stacksTouched=0,this.min=this.max=null,this.crosshair=C(o.crosshair,A(t.options.tooltip.crosshairs)[n?0:1],!1);var s;i=this.options.events,-1===y(this,t.axes)&&(n?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&n&&void 0===this.reversed&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(s in i)e(this,s,i[s]);this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(t){this.options=T(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],T(l[this.coll],t))},defaultLabelFormatter:function(){var e,i=this.axis,n=this.value,o=i.categories,r=this.dateTimeLabelFormat,s=l.lang,a=s.numericSymbols,s=s.numericSymbolMagnitude||1e3,h=a&&a.length,c=i.options.labels.format,i=i.isLog?n:i.tickInterval;if(c)e=g(c,this);else if(o)e=n;else if(r)e=t.dateFormat(r,n);else if(h&&1e3<=i)for(;h--&&void 0===e;)o=Math.pow(s,h+1),i>=o&&0===10*n%o&&null!==a[h]&&0!==n&&(e=t.numberFormat(n/o,-1)+a[h]);return void 0===e&&(e=1e4<=Math.abs(n)?t.numberFormat(n,-1):t.numberFormat(n,-1,void 0,"")),e},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,
t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.buildStacks&&t.buildStacks(),u(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var r,s=i.options,a=s.threshold;t.hasVisibleSeries=!0,t.isLog&&0>=a&&(a=null),t.isXAxis?(s=i.xData,s.length&&(i=o(s),x(i)||i instanceof Date||(s=v(s,function(t){return x(t)}),i=o(s)),t.dataMin=Math.min(C(t.dataMin,s[0]),i),t.dataMax=Math.max(C(t.dataMax,s[0]),n(s)))):(i.getExtremes(),r=i.dataMax,i=i.dataMin,h(i)&&h(r)&&(t.dataMin=Math.min(C(t.dataMin,i),i),t.dataMax=Math.max(C(t.dataMax,r),r)),h(a)&&(t.threshold=a),(!s.softThreshold||t.isLog)&&(t.softThreshold=!1))}})},translate:function(t,e,i,n,o,r){var s=this.linkedParent||this,a=1,l=0,h=n?s.oldTransA:s.transA;n=n?s.oldMin:s.min;var c=s.minPixelPadding;return o=(s.isOrdinal||s.isBroken||s.isLog&&o)&&s.lin2val,h||(h=s.transA),i&&(a*=-1,l=s.len),s.reversed&&(a*=-1,l-=a*(s.sector||s.len)),e?(t=(t*a+l-c)/h+n,o&&(t=s.lin2val(t))):(o&&(t=s.val2lin(t)),t=a*(t-n)*h+l+a*c+(x(r)?h*r:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,n,o){var r,s,a,l=this.chart,h=this.left,c=this.top,d=i&&l.oldChartHeight||l.chartHeight,u=i&&l.oldChartWidth||l.chartWidth;r=this.transB;var p=function(t,e,i){return(t<e||t>i)&&(n?t=Math.min(Math.max(e,t),i):a=!0),t};return o=C(o,this.translate(t,null,null,i)),t=i=Math.round(o+r),r=s=Math.round(d-o-r),x(o)?this.horiz?(r=c,s=d-this.bottom,t=i=p(t,h,h+this.width)):(t=h,i=u-this.right,r=s=p(r,c,c+this.height)):a=!0,a&&!n?null:l.renderer.crispLine(["M",t,r,"L",i,s],e||1)},getLinearTickPositions:function(t,e,i){var n,o=a(Math.floor(e/t)*t),r=a(Math.ceil(i/t)*t),s=[];if(e===i&&x(e))return[e];for(e=o;e<=r&&(s.push(e),e=a(e+t),e!==n);)n=e;return s},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,o=[],r=this.pointRangePadding||0;t=this.min-r;var r=this.max+r,s=r-t;if(s&&s/n<this.len/3)if(this.isLog)for(r=i.length,t=1;t<r;t++)o=o.concat(this.getLogTickPositions(n,i[t-1],i[t],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)o=o.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),t,r,e.startOfWeek));else for(i=t+(i[0]-t)%n;i<=r&&i!==o[0];i+=n)o.push(i);return 0!==o.length&&this.trimTicks(o,e.startOnTick,e.endOnTick),o},adjustForMinRange:function(){var t,e,i,r,s,a,l,c=this.options,d=this.min,p=this.max,f=this.dataMax-this.dataMin>=this.minRange;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(h(c.min)||h(c.max)?this.minRange=null:(u(this.series,function(t){for(s=t.xData,i=a=t.xIncrement?1:s.length-1;0<i;i--)r=s[i]-s[i-1],(void 0===e||r<e)&&(e=r)}),this.minRange=Math.min(5*e,this.dataMax-this.dataMin))),p-d<this.minRange&&(l=this.minRange,t=(l-p+d)/2,t=[d-t,C(c.min,d-t)],f&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),d=n(t),p=[d+l,C(c.max,d+l)],f&&(p[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),p=o(p),p-d<l&&(t[0]=p-l,t[1]=C(c.min,p-l),d=n(t))),this.min=d,this.max=p},getClosest:function(){var t;return this.categories?t=1:u(this.series,function(e){var i=e.closestPointRange,n=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&h(i)&&n&&(t=h(t)?Math.min(t,i):i)}),t},nameToX:function(t){var e,i=b(this.categories),n=i?this.categories:this.names,o=t.options.x;return t.series.requireSorting=!1,h(o)||(o=!1===this.options.uniqueNames?t.series.autoIncrement():y(t.name,n)),-1===o?i||(e=n.length):e=o,this.names[e]=t.name,e},updateNames:function(){var t=this;0<this.names.length&&(this.names.length=0,this.minRange=void 0,u(this.series||[],function(e){e.xIncrement=null,e.points&&!e.isDirtyData||(e.processData(),e.generatePoints()),u(e.points,function(i,n){var o;i.options&&void 0===i.options.x&&(o=t.nameToX(i),o!==i.x&&(i.x=o,e.xData[n]=o))})}))},setAxisTranslation:function(t){var e,i=this,n=i.max-i.min,o=i.axisPointRange||0,r=0,s=0,a=i.linkedParent,l=!!i.categories,h=i.transA,c=i.isXAxis;(c||l||o)&&(e=i.getClosest(),a?(r=a.minPointOffset,s=a.pointRangePadding):u(i.series,function(t){var n=l?1:c?C(t.options.pointRange,e,0):i.axisPointRange||0;t=t.options.pointPlacement,o=Math.max(o,n),i.single||(r=Math.max(r,w(t)?0:n/2),s=Math.max(s,"on"===t?0:n))}),a=i.ordinalSlope&&e?i.ordinalSlope/e:1,i.minPointOffset=r*=a,i.pointRangePadding=s*=a,i.pointRange=Math.min(o,n),c&&(i.closestPointRange=e)),t&&(i.oldTransA=h),i.translationSlope=i.transA=h=i.len/(n+s||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=h*r},minFromRange:function(){return this.max-this.range},setTickInterval:function(e){var i,n,o,r,s=this,l=s.chart,c=s.options,d=s.isLog,p=s.log2lin,g=s.isDatetimeAxis,v=s.isXAxis,y=s.isLinked,b=c.maxPadding,w=c.minPadding,T=c.tickInterval,S=c.tickPixelInterval,M=s.categories,A=s.threshold,E=s.softThreshold;g||M||y||this.getTickAmount(),o=C(s.userMin,c.min),r=C(s.userMax,c.max),y?(s.linkedParent=l[s.coll][c.linkedTo],l=s.linkedParent.getExtremes(),s.min=C(l.min,l.dataMin),s.max=C(l.max,l.dataMax),c.type!==s.linkedParent.options.type&&t.error(11,1)):(!E&&h(A)&&(s.dataMin>=A?(i=A,w=0):s.dataMax<=A&&(n=A,b=0)),s.min=C(o,i,s.dataMin),s.max=C(r,n,s.dataMax)),d&&(!e&&0>=Math.min(s.min,C(s.dataMin,s.min))&&t.error(10,1),s.min=a(p(s.min),15),s.max=a(p(s.max),15)),s.range&&h(s.max)&&(s.userMin=s.min=o=Math.max(s.min,s.minFromRange()),s.userMax=r=s.max,s.range=null),f(s,"foundExtremes"),s.beforePadding&&s.beforePadding(),s.adjustForMinRange(),!(M||s.axisPointRange||s.usePercentage||y)&&h(s.min)&&h(s.max)&&(p=s.max-s.min)&&(!h(o)&&w&&(s.min-=p*w),!h(r)&&b&&(s.max+=p*b)),x(c.floor)?s.min=Math.max(s.min,c.floor):x(c.softMin)&&(s.min=Math.min(s.min,c.softMin)),x(c.ceiling)?s.max=Math.min(s.max,c.ceiling):x(c.softMax)&&(s.max=Math.max(s.max,c.softMax)),E&&h(s.dataMin)&&(A=A||0,!h(o)&&s.min<A&&s.dataMin>=A?s.min=A:!h(r)&&s.max>A&&s.dataMax<=A&&(s.max=A)),s.tickInterval=s.min===s.max||void 0===s.min||void 0===s.max?1:y&&!T&&S===s.linkedParent.options.tickPixelInterval?T=s.linkedParent.tickInterval:C(T,this.tickAmount?(s.max-s.min)/Math.max(this.tickAmount-1,1):void 0,M?1:(s.max-s.min)*S/Math.max(s.len,S)),v&&!e&&u(s.series,function(t){t.processData(s.min!==s.oldMin||s.max!==s.oldMax)}),s.setAxisTranslation(!0),s.beforeSetTickPositions&&s.beforeSetTickPositions(),s.postProcessTickInterval&&(s.tickInterval=s.postProcessTickInterval(s.tickInterval)),s.pointRange&&!T&&(s.tickInterval=Math.max(s.pointRange,s.tickInterval)),e=C(c.minTickInterval,s.isDatetimeAxis&&s.closestPointRange),!T&&s.tickInterval<e&&(s.tickInterval=e),g||d||T||(s.tickInterval=k(s.tickInterval,null,m(s.tickInterval),C(c.allowDecimals,!(.5<s.tickInterval&&5>s.tickInterval&&1e3<s.max&&9999>s.max)),!!this.tickAmount)),this.tickAmount||(s.tickInterval=s.unsquish()),this.setTickPositions()},setTickPositions:function(){var t,e,i=this.options,n=i.tickPositions,o=i.tickPositioner,r=i.startOnTick,s=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===i.minorTickInterval&&this.tickInterval?this.tickInterval/5:i.minorTickInterval,this.tickPositions=t=n&&n.slice(),!t&&(t=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),t.length>this.len&&(t=[t[0],t.pop()]),this.tickPositions=t,o&&(o=o.apply(this,[this.min,this.max])))&&(this.tickPositions=t=o),this.isLinked||(this.trimTicks(t,r,s),this.min===this.max&&h(this.min)&&!this.tickAmount&&(e=!0,this.min-=.5,this.max+=.5),this.single=e,n||o||this.adjustTickAmount())},trimTicks:function(t,e,i){var n=t[0],o=t[t.length-1],r=this.minPointOffset||0;if(e)this.min=n;else for(;this.min-r>t[0];)t.shift();if(i)this.max=o;else for(;this.max+r<t[t.length-1];)t.pop();0===t.length&&h(n)&&t.push((o+n)/2)},alignToOthers:function(){var t,e={},i=this.options;return!1===this.chart.options.chart.alignTicks||!1===i.alignTicks||this.isLog||u(this.chart[this.coll],function(i){var n=i.options,n=[i.horiz?n.left:n.top,n.width,n.height,n.pane].join();i.series.length&&(e[n]?t=!0:e[n]=1)}),t},getTickAmount:function(){var t=this.options,e=t.tickAmount,i=t.tickPixelInterval;!h(t.tickInterval)&&this.len<i&&!this.isRadial&&!this.isLog&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=Math.ceil(this.len/i)+1),4>e&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t=this.tickInterval,e=this.tickPositions,i=this.tickAmount,n=this.finalTickAmt,o=e&&e.length;if(o<i){for(;e.length<i;)e.push(a(e[e.length-1]+t));this.transA*=(o-1)/(i-1),this.max=e[e.length-1]}else o>i&&(this.tickInterval*=2,this.setTickPositions());if(h(n)){for(t=i=e.length;t--;)(3===n&&1===t%2||2>=n&&0<t&&t<i-1)&&e.splice(t,1);this.finalTickAmt=void 0}},setScale:function(){var t,e;this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,u(this.series,function(e){(e.isDirtyData||e.isDirty||e.xAxis.isDirty)&&(t=!0)}),e||t||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(t,e,i,n,o){var r=this,s=r.chart;i=C(i,!0),u(r.series,function(t){delete t.kdTree}),o=p(o,{min:t,max:e}),f(r,"setExtremes",o,function(){r.userMin=t,r.userMax=e,r.eventArgs=o,i&&s.redraw(n)})},zoom:function(t,e){var i=this.dataMin,n=this.dataMax,o=this.options,r=Math.min(i,C(o.min,i)),o=Math.max(n,C(o.max,n));return t===this.min&&e===this.max||(this.allowZoomOutside||(h(i)&&(t<r&&(t=r),t>o&&(t=o)),h(n)&&(e<r&&(e=r),e>o&&(e=o))),this.displayBtn=void 0!==t||void 0!==e,this.setExtremes(t,e,!1,void 0,{trigger:"zoom"})),!0},setAxisSize:function(){var t=this.chart,e=this.options,i=e.offsetLeft||0,n=this.horiz,o=C(e.width,t.plotWidth-i+(e.offsetRight||0)),r=C(e.height,t.plotHeight),s=C(e.top,t.plotTop),e=C(e.left,t.plotLeft+i),i=/%$/;i.test(r)&&(r=Math.round(parseFloat(r)/100*t.plotHeight)),i.test(s)&&(s=Math.round(parseFloat(s)/100*t.plotHeight+t.plotTop)),this.left=e,this.top=s,this.width=o,this.height=r,this.bottom=t.chartHeight-r-s,this.right=t.chartWidth-o-e,this.len=Math.max(n?o:r,0),this.pos=n?e:s},getExtremes:function(){var t=this.isLog,e=this.lin2log;return{min:t?a(e(this.min)):this.min,max:t?a(e(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=this.lin2log,n=e?i(this.min):this.min,e=e?i(this.max):this.max;return null===t?t=n:n>t?t=n:e<t&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(C(t,0)-90*this.side+720)%360,15<t&&165>t?"right":195<t&&345>t?"left":"center"},tickSize:function(t){var e=this.options,i=e[t+"Length"],n=C(e[t+"Width"],"tick"===t&&this.isXAxis?1:0);if(n&&i)return"inside"===e[t+"Position"]&&(i=-i),[i,n]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var t,e,i,n=this.options.labels,o=this.horiz,r=this.tickInterval,s=r,a=this.len/(((this.categories?1:0)+this.max-this.min)/r),l=n.rotation,d=this.labelMetrics(),p=Number.MAX_VALUE,f=function(t){return t/=a||1,t=1<t?Math.ceil(t):1,t*r};return o?(i=!n.staggerLines&&!n.step&&(h(l)?[l]:a<C(n.autoRotationLimit,80)&&n.autoRotation))&&u(i,function(i){var n;(i===l||i&&-90<=i&&90>=i)&&(e=f(Math.abs(d.h/Math.sin(c*i))),n=e+Math.abs(i/360),n<p&&(p=n,t=i,s=e))}):n.step||(s=f(d.h)),this.autoRotation=i,this.labelRotation=C(t,l),s},getSlotWidth:function(){var t=this.chart,e=this.horiz,i=this.options.labels,n=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=t.margin[3];return e&&2>(i.step||0)&&!i.rotation&&(this.staggerLines||1)*t.plotWidth/n||!e&&(o&&o-t.spacing[3]||.33*t.chartWidth)},renderUnsquish:function(){var t,e,i,n=this.chart,o=n.renderer,r=this.tickPositions,s=this.ticks,a=this.options.labels,l=this.horiz,h=this.getSlotWidth(),c=Math.max(1,Math.round(h-2*(a.padding||5))),d={},p=this.labelMetrics(),f=a.style&&a.style.textOverflow,g=0;if(w(a.rotation)||(d.rotation=a.rotation||0),u(r,function(t){(t=s[t])&&t.labelLength>g&&(g=t.labelLength)}),this.maxLabelLength=g,this.autoRotation)g>c&&g>p.h?d.rotation=this.labelRotation:this.labelRotation=0;else if(h&&(t={width:c+"px"},!f))for(t.textOverflow="clip",e=r.length;!l&&e--;)i=r[e],(c=s[i].label)&&(c.styles&&"ellipsis"===c.styles.textOverflow?c.css({textOverflow:"clip"}):s[i].labelLength>h&&c.css({width:h+"px"}),c.getBBox().height>this.len/r.length-(p.h-p.f)&&(c.specCss={textOverflow:"ellipsis"}));d.rotation&&(t={width:(g>.5*n.chartHeight?.33*n.chartHeight:n.chartHeight)+"px"},f||(t.textOverflow="ellipsis")),(this.labelAlign=a.align||this.autoLabelAlign(this.labelRotation))&&(d.align=this.labelAlign),u(r,function(e){var i=(e=s[e])&&e.label;i&&(i.attr(d),t&&i.css(T(t,i.specCss)),delete i.specCss,e.rotation=d.rotation)}),this.tickRotCorr=o.rotCorr(p.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||h(this.min)&&h(this.max)&&!!this.tickPositions},addTitle:function(t){var e,i=this.chart.renderer,n=this.horiz,o=this.opposite,r=this.options.title;this.axisTitle||((e=r.textAlign)||(e=(n?{low:"left",middle:"center",high:"right"}:{low:o?"right":"left",middle:"center",high:o?"left":"right"})[r.align]),this.axisTitle=i.text(r.text,0,0,r.useHTML).attr({zIndex:7,rotation:r.rotation||0,align:e}).addClass("highcharts-axis-title").css(r.style).add(this.axisGroup),this.axisTitle.isNew=!0),this.axisTitle[t?"show":"hide"](!0)},getOffset:function(){var t,e,i,n,o=this,r=o.chart,s=r.renderer,a=o.options,l=o.tickPositions,c=o.ticks,d=o.horiz,p=o.side,f=r.inverted?[1,0,3,2][p]:p,g=0,m=0,v=a.title,y=a.labels,b=0,x=r.axisOffset,r=r.clipOffset,w=[-1,1,1,-1][p],T=a.className,k=o.axisParent,S=this.tickSize("tick");if(t=o.hasData(),o.showAxis=e=t||C(a.showEmpty,!0),o.staggerLines=o.horiz&&y.staggerLines,o.axisGroup||(o.gridGroup=s.g("grid").attr({zIndex:a.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(T||"")).add(k),o.axisGroup=s.g("axis").attr({zIndex:a.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(T||"")).add(k),o.labelGroup=s.g("axis-labels").attr({zIndex:y.zIndex||7}).addClass("highcharts-"+o.coll.toLowerCase()+"-labels "+(T||"")).add(k)),t||o.isLinked)u(l,function(t){c[t]?c[t].addLabel():c[t]=new L(o,t)}),o.renderUnsquish(),!1===y.reserveSpace||0!==p&&2!==p&&{1:"left",3:"right"}[p]!==o.labelAlign&&"center"!==o.labelAlign||u(l,function(t){b=Math.max(c[t].getLabelSize(),b)}),o.staggerLines&&(b*=o.staggerLines,o.labelOffset=b*(o.opposite?-1:1));else for(n in c)c[n].destroy(),delete c[n];v&&v.text&&!1!==v.enabled&&(o.addTitle(e),e&&(g=o.axisTitle.getBBox()[d?"height":"width"],i=v.offset,m=h(i)?0:C(v.margin,d?5:10))),o.renderLine(),o.offset=w*C(a.offset,x[p]),o.tickRotCorr=o.tickRotCorr||{x:0,y:0},s=0===p?-o.labelMetrics().h:2===p?o.tickRotCorr.y:0,m=Math.abs(b)+m,b&&(m=m-s+w*(d?C(y.y,o.tickRotCorr.y+8*w):y.x)),o.axisTitleMargin=C(i,m),x[p]=Math.max(x[p],o.axisTitleMargin+g+w*o.offset,m,t&&l.length&&S?S[0]:0),a=a.offset?0:2*Math.floor(o.axisLine.strokeWidth()/2),r[f]=Math.max(r[f],a)},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,o=this.horiz,r=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",o?this.left:r,o?n:this.top,"L",o?e.chartWidth-this.right:r,o?n:e.chartHeight-this.bottom],t)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,n=this.len,o=this.options.title,r=t?e:i,s=this.opposite,a=this.offset,l=o.x||0,h=o.y||0,c=this.chart.renderer.fontMetrics(o.style&&o.style.fontSize,this.axisTitle).f,n={low:r+(t?0:n),middle:r+n/2,high:r+(t?n:0)}[o.align],e=(t?i+this.height:e)+(t?1:-1)*(s?-1:1)*this.axisTitleMargin+(2===this.side?c:0);return{x:t?n+l:e+(s?this.width:0)+a+l,y:t?e+h-(s?this.height:0)+a:n+h}},render:function(){var t,e,n=this,o=n.chart,r=o.renderer,s=n.options,a=n.isLog,l=n.lin2log,h=n.isLinked,c=n.tickPositions,d=n.axisTitle,p=n.ticks,f=n.minorTicks,g=n.alternateBands,m=s.stackLabels,v=s.alternateGridColor,y=n.tickmarkOffset,b=n.axisLine,w=o.hasRendered&&x(n.oldMin),T=n.showAxis,k=i(r.globalAnimation);n.labelEdge.length=0,n.overlap=!1,u([p,f,g],function(t){for(var e in t)t[e].isActive=!1}),(n.hasData()||h)&&(n.minorTickInterval&&!n.categories&&u(n.getMinorTickPositions(),function(t){f[t]||(f[t]=new L(n,t,"minor")),w&&f[t].isNew&&f[t].render(null,!0),f[t].render(null,!1,1)}),c.length&&(u(c,function(t,e){(!h||t>=n.min&&t<=n.max)&&(p[t]||(p[t]=new L(n,t)),w&&p[t].isNew&&p[t].render(e,!0,.1),p[t].render(e))}),y&&(0===n.min||n.single)&&(p[-1]||(p[-1]=new L(n,-1,null,!0)),p[-1].render(-1))),v&&u(c,function(i,r){e=void 0!==c[r+1]?c[r+1]+y:n.max-y,0===r%2&&i<n.max&&e<=n.max+(o.polar?-y:y)&&(g[i]||(g[i]=new S(n)),t=i+y,g[i].options={from:a?l(t):t,to:a?l(e):e,color:v},g[i].render(),g[i].isActive=!0)}),n._addedPlotLB||(u((s.plotLines||[]).concat(s.plotBands||[]),function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),u([p,f,g],function(t){var e,i,n=[],r=k.duration;for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,n.push(e));E(function(){for(i=n.length;i--;)t[n[i]]&&!t[n[i]].isActive&&(t[n[i]].destroy(),delete t[n[i]])},t!==g&&o.hasRendered&&r?r:0)}),b&&(b[b.isPlaced?"animate":"attr"]({d:this.getLinePath(b.strokeWidth())}),b.isPlaced=!0,b[T?"show":"hide"](!0)),d&&T&&(d[d.isNew?"attr":"animate"](n.getTitlePosition()),d.isNew=!1),m&&m.enabled&&n.renderStackTotals(),n.isDirty=!1},redraw:function(){this.visible&&(this.render(),u(this.plotLinesAndBands,function(t){t.render()})),u(this.series,function(t){t.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(t){var e,i,n=this,o=n.stacks,r=n.plotLinesAndBands;t||M(n);for(e in o)d(o[e]),o[e]=null;if(u([n.ticks,n.minorTicks,n.alternateBands],function(t){d(t)}),r)for(t=r.length;t--;)r[t].destroy();u("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(t){n[t]&&(n[t]=n[t].destroy())});for(i in n)n.hasOwnProperty(i)&&-1===y(i,n.keepProps)&&delete n[i]},drawCrosshair:function(t,e){var i,n,o=this.crosshair,r=C(o.snap,!0),a=this.cross;t||(t=this.cross&&this.cross.e),this.crosshair&&!1!==(h(e)||!r)?(r?h(e)&&(n=this.isXAxis?e.plotX:this.len-e.plotY):n=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),h(n)&&(i=this.getPlotLinePath(e&&(this.isXAxis?e.x:C(e.stackY,e.y)),null,null,null,n)||null),h(i)?(e=this.categories&&!this.isRadial,a||(this.cross=a=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(e?"category ":"thin ")+o.className).attr({zIndex:C(o.zIndex,2)}).add(),a.attr({stroke:o.color||(e?s("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":C(o.width,1)}),o.dashStyle&&a.attr({dashstyle:o.dashStyle})),a.show().attr({d:i}),e&&!o.width&&a.attr({"stroke-width":this.transA}),this.cross.e=t):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}},p(t.Axis.prototype,r)}(t),function(t){var e=t.Axis,i=t.Date,n=t.dateFormat,o=t.defaultOptions,r=t.defined,s=t.each,a=t.extend,l=t.getMagnitude,h=t.getTZOffset,c=t.normalizeTickInterval,d=t.pick,u=t.timeUnits;e.prototype.getTimeTicks=function(t,e,l,c){var p,f,g=[],m={},v=o.global.useUTC,y=new i(e-h(e)),b=i.hcMakeTime,x=t.unitRange,w=t.count;if(r(e)){y[i.hcSetMilliseconds](x>=u.second?0:w*Math.floor(y.getMilliseconds()/w)),x>=u.second&&y[i.hcSetSeconds](x>=u.minute?0:w*Math.floor(y.getSeconds()/w)),x>=u.minute&&y[i.hcSetMinutes](x>=u.hour?0:w*Math.floor(y[i.hcGetMinutes]()/w)),x>=u.hour&&y[i.hcSetHours](x>=u.day?0:w*Math.floor(y[i.hcGetHours]()/w)),x>=u.day&&y[i.hcSetDate](x>=u.month?1:w*Math.floor(y[i.hcGetDate]()/w)),x>=u.month&&(y[i.hcSetMonth](x>=u.year?0:w*Math.floor(y[i.hcGetMonth]()/w)),p=y[i.hcGetFullYear]()),x>=u.year&&y[i.hcSetFullYear](p-p%w),x===u.week&&y[i.hcSetDate](y[i.hcGetDate]()-y[i.hcGetDay]()+d(c,1)),p=y[i.hcGetFullYear](),c=y[i.hcGetMonth]();var T=y[i.hcGetDate](),k=y[i.hcGetHours]();for((i.hcTimezoneOffset||i.hcGetTimezoneOffset)&&(f=(!v||!!i.hcGetTimezoneOffset)&&(l-e>4*u.month||h(e)!==h(l)),y=y.getTime(),y=new i(y+h(y))),v=y.getTime(),e=1;v<l;)g.push(v),v=x===u.year?b(p+e*w,0):x===u.month?b(p,c+e*w):!f||x!==u.day&&x!==u.week?f&&x===u.hour?b(p,c,T,k+e*w):v+x*w:b(p,c,T+e*w*(x===u.day?1:7)),e++;g.push(v),x<=u.hour&&s(g,function(t){"000000000"===n("%H%M%S%L",t)&&(m[t]="day")})}return g.info=a(t,{higherRanks:m,totalRange:x*w}),g},e.prototype.normalizeTimeTickInterval=function(t,e){var i=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=i[i.length-1];var n,o=u[e[0]],r=e[1];for(n=0;n<i.length&&(e=i[n],o=u[e[0]],r=e[1],!(i[n+1]&&t<=(o*r[r.length-1]+u[i[n+1][0]])/2));n++);return o===u.year&&t<5*o&&(r=[1,2,5]),t=c(t/o,r,"year"===e[0]?Math.max(l(t/o),1):1),{unitRange:o,count:t,unitName:e[0]}}}(t),function(t){var e=t.Axis,i=t.getMagnitude,n=t.map,o=t.normalizeTickInterval,r=t.pick;e.prototype.getLogTickPositions=function(t,e,s,a){var l=this.options,h=this.len,c=this.lin2log,d=this.log2lin,u=[];if(a||(this._minorAutoInterval=null),.5<=t)t=Math.round(t),u=this.getLinearTickPositions(t,e,s);else if(.08<=t)for(var p,f,g,m,v,h=Math.floor(e),l=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<s+1&&!v;h++)for(f=l.length,p=0;p<f&&!v;p++)g=d(c(h)*l[p]),g>e&&(!a||m<=s)&&void 0!==m&&u.push(m),m>s&&(v=!0),m=g;else e=c(e),s=c(s),t=l[a?"minorTickInterval":"tickInterval"],t=r("auto"===t?null:t,this._minorAutoInterval,l.tickPixelInterval/(a?5:1)*(s-e)/((a?h/this.tickPositions.length:h)||1)),t=o(t,null,i(t)),u=n(this.getLinearTickPositions(t,e,s),d),a||(this._minorAutoInterval=t/5);return a||(this.tickInterval=t),u},e.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},e.prototype.lin2log=function(t){return Math.pow(10,t)}}(t),function(t){var e=t.dateFormat,i=t.each,n=t.extend,o=t.format,r=t.isNumber,s=t.map,a=t.merge,l=t.pick,h=t.splat,c=t.syncTimeout,d=t.timeUnits;t.Tooltip=function(){this.init.apply(this,arguments)},t.Tooltip.prototype={init:function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted,this.shared=e.shared||this.split},cleanSplit:function(t){i(this.chart.series,function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})},getLabel:function(){var t=this.chart.renderer,e=this.options;return this.label||(this.split?this.label=t.g("tooltip"):(this.label=t.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:e.padding,r:e.borderRadius}),this.label.attr({fill:e.backgroundColor,"stroke-width":e.borderWidth}).css(e.style).shadow(e.shadow)),this.label.attr({zIndex:8}).add()),this.label},update:function(t){this.destroy(),this.init(this.chart,a(!0,this.options,t))},destroy:function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(t,e,i,o){var r=this,s=r.now,a=!1!==r.options.animation&&!r.isHidden&&(1<Math.abs(t-s.x)||1<Math.abs(e-s.y)),l=r.followPointer||1<r.len;n(s,{x:a?(2*s.x+t)/3:t,y:a?(s.y+e)/2:e,anchorX:l?void 0:a?(2*s.anchorX+i)/3:i,anchorY:l?void 0:a?(s.anchorY+o)/2:o}),r.getLabel().attr(s),a&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){r&&r.move(t,e,i,o)},32))},hide:function(t){var e=this;clearTimeout(this.hideTimer),t=l(t,this.options.hideDelay,500),this.isHidden||(this.hideTimer=c(function(){e.getLabel()[t?"fadeOut":"hide"](),e.isHidden=!0},t))},getAnchor:function(t,e){var n,o,r,a=this.chart,l=a.inverted,c=a.plotTop,d=a.plotLeft,u=0,p=0;return t=h(t),n=t[0].tooltipPos,this.followPointer&&e&&(void 0===e.chartX&&(e=a.pointer.normalize(e)),n=[e.chartX-a.plotLeft,e.chartY-c]),n||(i(t,function(t){o=t.series.yAxis,r=t.series.xAxis,u+=t.plotX+(!l&&r?r.left-d:0),p+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!l&&o?o.top-c:0)}),u/=t.length,p/=t.length,n=[l?a.plotWidth-p:u,this.shared&&!l&&1<t.length&&e?e.chartY-c:l?a.plotHeight-u:p]),s(n,Math.round)},getPosition:function(t,e,i){var n,o=this.chart,r=this.distance,s={},a=i.h||0,h=["y",o.chartHeight,e,i.plotY+o.plotTop,o.plotTop,o.plotTop+o.plotHeight],c=["x",o.chartWidth,t,i.plotX+o.plotLeft,o.plotLeft,o.plotLeft+o.plotWidth],d=!this.followPointer&&l(i.ttBelow,!o.inverted==!!i.negative),u=function(t,e,i,n,o,l){var h=i<n-r,c=n+r+i<e,u=n-r-i;if(n+=r,d&&c)s[t]=n;else if(!d&&h)s[t]=u;else if(h)s[t]=Math.min(l-i,0>u-a?u:u-a);else{if(!c)return!1;s[t]=Math.max(o,n+a+i>e?n:n+a)}},p=function(t,e,i,n){var o;return n<r||n>e-r?o=!1:s[t]=n<i/2?1:n>e-i/2?e-i-2:n-i/2,o},f=function(t){var e=h;h=c,c=e,n=t},g=function(){!1!==u.apply(0,h)?!1!==p.apply(0,c)||n||(f(!0),g()):n?s.x=s.y=0:(f(!0),g())};return(o.inverted||1<this.len)&&f(),g(),s},defaultFormatter:function(t){var e,i=this.points||h(this);return e=[t.tooltipFooterHeaderFormatter(i[0])],e=e.concat(t.bodyFormatter(i)),e.push(t.tooltipFooterHeaderFormatter(i[0],!0)),e},refresh:function(t,e){var n,o,r,s=this.chart,a=this.options,c={},d=[];n=a.formatter||this.defaultFormatter;var c=s.hoverPoints,u=this.shared;clearTimeout(this.hideTimer),this.followPointer=h(t)[0].series.tooltipOptions.followPointer,r=this.getAnchor(t,e),e=r[0],o=r[1],!u||t.series&&t.series.noSharedTooltip?c=t.getLabelConfig():(s.hoverPoints=t,c&&i(c,function(t){t.setState()}),i(t,function(t){t.setState("hover"),d.push(t.getLabelConfig())}),c={x:t[0].category,y:t[0].y},c.points=d,this.len=d.length,t=t[0]),c=n.call(c,this),u=t.series,this.distance=l(u.tooltipOptions.distance,16),!1===c?this.hide():(n=this.getLabel(),this.isHidden&&n.attr({opacity:1}).show(),this.split?this.renderSplit(c,s.hoverPoints):(n.attr({text:c&&c.join?c.join(""):c}),n.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+l(t.colorIndex,u.colorIndex)),n.attr({stroke:a.borderColor||t.color||u.color||"#666666"}),this.updatePosition({plotX:e,plotY:o,negative:t.negative,ttBelow:t.ttBelow,h:r[2]||0})),this.isHidden=!1)},renderSplit:function(e,n){var o,r=this,s=[],a=this.chart,h=a.renderer,c=!0,d=this.options,u=this.getLabel();i(e.slice(0,e.length-1),function(t,e){e=n[e-1]||{isHeader:!0,plotX:n[0].plotX};var i=e.series||r,p=i.tt,f=e.series||{},g="highcharts-color-"+l(e.colorIndex,f.colorIndex,"none");p||(i.tt=p=h.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+g).attr({padding:d.padding,r:d.borderRadius,fill:d.backgroundColor,stroke:e.color||f.color||"#333333","stroke-width":d.borderWidth}).add(u)),p.isActive=!0,p.attr({text:t}),p.css(d.style),t=p.getBBox(),f=t.width+p.strokeWidth(),e.isHeader?(o=t.height,f=Math.max(0,Math.min(e.plotX+a.plotLeft-f/2,a.chartWidth-f))):f=e.plotX+a.plotLeft-l(d.distance,16)-f,0>f&&(c=!1),t=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0),t-=a.plotTop,s.push({target:e.isHeader?a.plotHeight+o:t,rank:e.isHeader?1:0,size:i.tt.getBBox().height+1,point:e,x:f,tt:p})}),this.cleanSplit(),t.distribute(s,a.plotHeight+o),i(s,function(t){var e=t.point,i=e.series;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:c||e.isHeader?t.x:e.plotX+a.plotLeft+l(d.distance,16),y:t.pos+a.plotTop,anchorX:e.isHeader?e.plotX+a.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?t.pos+a.plotTop-15:e.plotY+i.yAxis.pos})})},updatePosition:function(t){var e=this.chart,i=this.getLabel(),i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(Math.round(i.x),Math.round(i.y||0),t.plotX+e.plotLeft,t.plotY+e.plotTop)},getXDateFormat:function(t,i,n){var o;i=i.dateTimeLabelFormats;var r,s,a=n&&n.closestPointRange,l={millisecond:15,second:12,minute:9,hour:6,day:3},h="millisecond";if(a){s=e("%m-%d %H:%M:%S.%L",t.x);for(r in d){if(a===d.week&&+e("%w",t.x)===n.options.startOfWeek&&"00:00:00.000"===s.substr(6)){r="week";break}if(d[r]>a){r=h;break}if(l[r]&&s.substr(l[r])!=="01-01 00:00:00.000".substr(l[r]))break;"week"!==r&&(h=r)}r&&(o=i[r])}else o=i.day;return o||i.year},tooltipFooterHeaderFormatter:function(t,e){var i=e?"footer":"header";e=t.series;var n=e.tooltipOptions,s=n.xDateFormat,a=e.xAxis,l=a&&"datetime"===a.options.type&&r(t.key),i=n[i+"Format"];return l&&!s&&(s=this.getXDateFormat(t,n,a)),l&&s&&(i=i.replace("{point.key}","{point.key:"+s+"}")),o(i,{point:t,series:e})},bodyFormatter:function(t){return s(t,function(t){var e=t.series.tooltipOptions;return(e.pointFormatter||t.point.tooltipFormatter).call(t.point,e.pointFormat)})}}}(t),function(t){var e=t.addEvent,i=t.attr,n=t.charts,o=t.color,r=t.css,s=t.defined,a=t.doc,l=t.each,h=t.extend,c=t.fireEvent,d=t.offset,u=t.pick,p=t.removeEvent,f=t.splat,g=t.Tooltip,m=t.win;t.Pointer=function(t,e){this.init(t,e)},t.Pointer.prototype={init:function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},g&&e.tooltip.enabled&&(t.tooltip=new g(t,e.tooltip),this.followTouchMove=u(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(t){var e=this.chart,i=e.options.chart,n=i.zoomType||"",e=e.inverted;/touch/.test(t.type)&&(n=u(i.pinchType,n)),this.zoomX=t=/x/.test(n),this.zoomY=n=/y/.test(n),this.zoomHor=t&&!e||n&&e,this.zoomVert=n&&!e||t&&e,this.hasZoom=t||n},normalize:function(t,e){var i,n;return t=t||m.event,t.target||(t.target=t.srcElement),n=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=d(this.chart.container)),void 0===n.pageX?(i=Math.max(t.x,t.clientX-e.left),e=t.y):(i=n.pageX-e.left,e=n.pageY-e.top),h(t,{chartX:Math.round(i),chartY:Math.round(e)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return l(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},runPointActions:function(i){var o,r,s,h,c=this.chart,d=c.series,p=c.tooltip,f=!!p&&p.shared,g=!0,m=c.hoverPoint,v=c.hoverSeries,y=[];if(!f&&!v)for(o=0;o<d.length;o++)!d[o].directTouch&&d[o].options.stickyTracking||(d=[]);if(v&&(f?v.noSharedTooltip:v.directTouch)&&m?y=[m]:(f||!v||v.options.stickyTracking||(d=[v]),l(d,function(t){r=t.noSharedTooltip&&f,s=!f&&t.directTouch,t.visible&&!r&&!s&&u(t.options.enableMouseTracking,!0)&&(h=t.searchPoint(i,!r&&1===t.kdDimensions))&&h.series&&y.push(h)}),y.sort(function(t,e){var i=t.distX-e.distX,n=t.dist-e.dist,o=e.series.group.zIndex-t.series.group.zIndex;return 0!==i&&f?i:0!==n?n:0!==o?o:t.series.index>e.series.index?-1:1})),f)for(o=y.length;o--;)(y[o].x!==y[0].x||y[o].series.noSharedTooltip)&&y.splice(o,1);if(y[0]&&(y[0]!==this.prevKDPoint||p&&p.isHidden)){if(f&&!y[0].series.noSharedTooltip){for(o=0;o<y.length;o++)y[o].onMouseOver(i,y[o]!==(v&&v.directTouch&&m||y[0]));y.length&&p&&p.refresh(y.sort(function(t,e){return t.series.index-e.series.index}),i)}else p&&p.refresh(y[0],i),v&&v.directTouch||y[0].onMouseOver(i);this.prevKDPoint=y[0],g=!1}g&&(d=v&&v.tooltipOptions.followPointer,p&&d&&!p.isHidden&&(d=p.getAnchor([{}],i),p.updatePosition({plotX:d[0],plotY:d[1]}))),this.unDocMouseMove||(this.unDocMouseMove=e(a,"mousemove",function(e){n[t.hoverChartIndex]&&n[t.hoverChartIndex].pointer.onDocumentMouseMove(e)})),l(f?y:[u(m,y[0])],function(t){l(c.axes,function(e){(!t||t.series&&t.series[e.coll]===e)&&e.drawCrosshair(i,t)})})},reset:function(t,e){var i=this.chart,n=i.hoverSeries,o=i.hoverPoint,r=i.hoverPoints,s=i.tooltip,a=s&&s.shared?r:o;t&&a&&l(f(a),function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?s&&a&&(s.refresh(a),o&&(o.setState(o.state,!0),l(i.axes,function(t){t.crosshair&&t.drawCrosshair(null,o)}))):(o&&o.onMouseOut(),r&&l(r,function(t){t.setState()}),n&&n.onMouseOut(),s&&s.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),l(i.axes,function(t){t.hideCrosshair()}),this.hoverX=this.prevKDPoint=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,n=this.chart;l(n.series,function(o){i=t||o.getPlotBox(),o.xAxis&&o.xAxis.zoomEnabled&&o.group&&(o.group.attr(i),
o.markerGroup&&(o.markerGroup.attr(i),o.markerGroup.clip(e?n.clipRect:null)),o.dataLabelsGroup&&o.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,r=t.chartX,s=t.chartY,a=this.zoomHor,l=this.zoomVert,h=i.plotLeft,c=i.plotTop,d=i.plotWidth,u=i.plotHeight,p=this.selectionMarker,f=this.mouseDownX,g=this.mouseDownY,m=n.panKey&&t[n.panKey+"Key"];p&&p.touch||(r<h?r=h:r>h+d&&(r=h+d),s<c?s=c:s>c+u&&(s=c+u),this.hasDragged=Math.sqrt(Math.pow(f-r,2)+Math.pow(g-s,2)),10<this.hasDragged&&(e=i.isInsidePlot(f-h,g-c),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!m&&!p&&(this.selectionMarker=p=i.renderer.rect(h,c,a?1:d,l?1:u,0).attr({fill:n.selectionMarkerFill||o("#335cad").setOpacity(.25).get(),"class":"highcharts-selection-marker",zIndex:7}).add()),p&&a&&(r-=f,p.attr({width:Math.abs(r),x:(0<r?0:r)+f})),p&&l&&(r=s-g,p.attr({height:Math.abs(r),y:(0<r?0:r)+g})),e&&!p&&n.panning&&i.pan(t,n.panning)))},drop:function(t){var e=this,i=this.chart,n=this.hasPinched;if(this.selectionMarker){var o,a={originalEvent:t,xAxis:[],yAxis:[]},d=this.selectionMarker,u=d.attr?d.attr("x"):d.x,p=d.attr?d.attr("y"):d.y,f=d.attr?d.attr("width"):d.width,g=d.attr?d.attr("height"):d.height;(this.hasDragged||n)&&(l(i.axes,function(i){if(i.zoomEnabled&&s(i.min)&&(n||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var r=i.horiz,l="touchend"===t.type?i.minPixelPadding:0,h=i.toValue((r?u:p)+l),r=i.toValue((r?u+f:p+g)-l);a[i.coll].push({axis:i,min:Math.min(h,r),max:Math.max(h,r)}),o=!0}}),o&&c(i,"selection",a,function(t){i.zoom(h(t,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(r(i.container,{cursor:i._cursor}),i.cancelClick=10<this.hasDragged,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),this.zoomOption(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(e){n[t.hoverChartIndex]&&n[t.hoverChartIndex].pointer.drop(e)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition;t=this.normalize(t,i),!i||this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||this.reset()},onContainerMouseLeave:function(e){var i=n[t.hoverChartIndex];i&&(e.relatedTarget||e.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=null)},onContainerMouseMove:function(e){var i=this.chart;s(t.hoverChartIndex)&&n[t.hoverChartIndex]&&n[t.hoverChartIndex].mouseIsDown||(t.hoverChartIndex=i.index),e=this.normalize(e),e.returnValue=!1,"mousedown"===i.mouseIsDown&&this.drag(e),!this.inClass(e.target,"highcharts-tracker")&&!i.isInsidePlot(e.chartX-i.plotLeft,e.chartY-i.plotTop)||i.openMenu||this.runPointActions(e)},inClass:function(t,e){for(var n;t;){if(n=i(t,"class")){if(-1!==n.indexOf(e))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;t=t.relatedTarget||t.toElement,!e||!t||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)&&this.inClass(t,"highcharts-tracker")||e.onMouseOut()},onContainerClick:function(t){var e=this.chart,i=e.hoverPoint,n=e.plotLeft,o=e.plotTop;t=this.normalize(t),e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(c(i.series,"click",h(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(h(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-n,t.chartY-o)&&c(e,"click",t)))},setDOMEvents:function(){var i=this,n=i.chart.container;n.onmousedown=function(t){i.onContainerMouseDown(t)},n.onmousemove=function(t){i.onContainerMouseMove(t)},n.onclick=function(t){i.onContainerClick(t)},e(n,"mouseleave",i.onContainerMouseLeave),1===t.chartCount&&e(a,"mouseup",i.onDocumentMouseUp),t.hasTouch&&(n.ontouchstart=function(t){i.onContainerTouchStart(t)},n.ontouchmove=function(t){i.onContainerTouchMove(t)},1===t.chartCount&&e(a,"touchend",i.onDocumentTouchEnd))},destroy:function(){var e;p(this.chart.container,"mouseleave",this.onContainerMouseLeave),t.chartCount||(p(a,"mouseup",this.onDocumentMouseUp),p(a,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(e in this)this[e]=null}}}(t),function(t){var e=t.charts,i=t.each,n=t.extend,o=t.map,r=t.noop,s=t.pick;n(t.Pointer.prototype,{pinchTranslate:function(t,e,i,n,o,r){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,n,o,r),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,n,o,r)},pinchTranslateDirection:function(t,e,i,n,o,r,s,a){var l,h,c,d=this.chart,u=t?"x":"y",p=t?"X":"Y",f="chart"+p,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],v=a||1,y=d.inverted,b=d.bounds[t?"h":"v"],x=1===e.length,w=e[0][f],T=i[0][f],k=!x&&e[1][f],C=!x&&i[1][f];i=function(){!x&&20<Math.abs(w-k)&&(v=a||Math.abs(T-C)/Math.abs(w-k)),h=(m-T)/v+w,l=d["plot"+(t?"Width":"Height")]/v},i(),e=h,e<b.min?(e=b.min,c=!0):e+l>b.max&&(e=b.max-l,c=!0),c?(T-=.8*(T-s[u][0]),x||(C-=.8*(C-s[u][1])),i()):s[u]=[T,C],y||(r[u]=h-m,r[g]=l),r=y?1/v:v,o[g]=l,o[u]=e,n[y?t?"scaleY":"scaleX":"scale"+p]=v,n["translate"+p]=r*m+(T-r*w)},pinch:function(t){var e=this,a=e.chart,l=e.pinchDown,h=t.touches,c=h.length,d=e.lastValidTouch,u=e.hasZoom,p=e.selectionMarker,f={},g=1===c&&(e.inClass(t.target,"highcharts-tracker")&&a.runTrackerClick||e.runChartClick),m={};1<c&&(e.initiated=!0),u&&e.initiated&&!g&&t.preventDefault(),o(h,function(t){return e.normalize(t)}),"touchstart"===t.type?(i(h,function(t,e){l[e]={chartX:t.chartX,chartY:t.chartY}}),d.x=[l[0].chartX,l[1]&&l[1].chartX],d.y=[l[0].chartY,l[1]&&l[1].chartY],i(a.axes,function(t){if(t.zoomEnabled){var e=a.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,n=t.toPixels(s(t.options.min,t.dataMin)),o=t.toPixels(s(t.options.max,t.dataMax)),r=Math.max(n,o);e.min=Math.min(t.pos,Math.min(n,o)-i),e.max=Math.max(t.pos+t.len,r+i)}}),e.res=!0):e.followTouchMove&&1===c?this.runPointActions(e.normalize(t)):l.length&&(p||(e.selectionMarker=p=n({destroy:r,touch:!0},a.plotBox)),e.pinchTranslate(l,h,f,p,m,d),e.hasPinched=u,e.scaleGroups(f,m),e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(e,i){var n,o,r=this.chart;r.index!==t.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),t.hoverChartIndex=r.index,1===e.touches.length?(e=this.normalize(e),(o=r.isInsidePlot(e.chartX-r.plotLeft,e.chartY-r.plotTop))&&!r.openMenu?(i&&this.runPointActions(e),"touchmove"===e.type&&(i=this.pinchDown,n=!!i[0]&&4<=Math.sqrt(Math.pow(i[0].chartX-e.chartX,2)+Math.pow(i[0].chartY-e.chartY,2))),s(n,!0)&&this.pinch(e)):i&&this.reset()):2===e.touches.length&&this.pinch(e)},onContainerTouchStart:function(t){this.zoomOption(t),this.touch(t,!0)},onContainerTouchMove:function(t){this.touch(t)},onDocumentTouchEnd:function(i){e[t.hoverChartIndex]&&e[t.hoverChartIndex].pointer.drop(i)}})}(t),function(t){var e=t.addEvent,i=t.charts,n=t.css,o=t.doc,r=t.extend,s=t.noop,a=t.Pointer,l=t.removeEvent,h=t.win,c=t.wrap;if(h.PointerEvent||h.MSPointerEvent){var d={},u=!!h.PointerEvent,p=function(){var t,e=[];e.item=function(t){return this[t]};for(t in d)d.hasOwnProperty(t)&&e.push({pageX:d[t].pageX,pageY:d[t].pageY,target:d[t].target});return e},f=function(e,n,o,r){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!i[t.hoverChartIndex]||(r(e),r=i[t.hoverChartIndex].pointer,r[n]({type:o,target:e.currentTarget,preventDefault:s,touches:p()}))};r(a.prototype,{onContainerPointerDown:function(t){f(t,"onContainerTouchStart","touchstart",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){f(t,"onContainerTouchMove","touchmove",function(t){d[t.pointerId]={pageX:t.pageX,pageY:t.pageY},d[t.pointerId].target||(d[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){f(t,"onDocumentTouchEnd","touchend",function(t){delete d[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,u?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,u?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(o,u?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),c(a.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&n(e.container,{"-ms-touch-action":"none","touch-action":"none"})}),c(a.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(e)}),c(a.prototype,"destroy",function(t){this.batchMSEvents(l),t.call(this)})}}(t),function(t){var e,i=t.addEvent,n=t.css,o=t.discardElement,r=t.defined,s=t.each,a=t.extend,l=t.isFirefox,h=t.marginNames,c=t.merge,d=t.pick,u=t.setAnimation,p=t.stableSort,f=t.win,g=t.wrap;e=t.Legend=function(t,e){this.init(t,e)},e.prototype={init:function(t,e){this.chart=t,this.setOptions(e),e.enabled&&(this.render(),i(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(t){var e=d(t.padding,8);this.options=t,this.itemStyle=t.itemStyle,this.itemHiddenStyle=c(this.itemStyle,t.itemHiddenStyle),this.itemMarginTop=t.itemMarginTop||0,this.initialItemX=this.padding=e,this.initialItemY=e-5,this.itemHeight=this.maxItemWidth=0,this.symbolWidth=d(t.symbolWidth,16),this.pages=[]},update:function(t,e){var i=this.chart;this.setOptions(c(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,d(e,!0)&&i.redraw()},colorizeItem:function(t,e){t.legendGroup[e?"removeClass":"addClass"]("highcharts-legend-item-hidden");var i,n=this.options,o=t.legendItem,r=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color,n=e?n.itemStyle.color:a,l=e?t.color||a:a,h=t.options&&t.options.marker,c={fill:l};if(o&&o.css({fill:n,color:n}),r&&r.attr({stroke:l}),s){if(h&&s.isMarker&&(c=t.pointAttribs(),!e))for(i in c)c[i]=a;s.attr(c)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,n=t._legendItemPos,o=n[0],n=n[1],r=t.checkbox;(t=t.legendGroup)&&t.element&&t.translate(e?o:this.legendWidth-o-2*i-4,n),r&&(r.x=o,r.y=n)},destroyItem:function(t){var e=t.checkbox;s(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&o(t.checkbox)},destroy:function(){function t(t){this[t]&&(this[t]=this[t].destroy())}s(this.getAllItems(),function(e){s(["legendItem","legendGroup"],t,e)}),s(["box","title","group"],t,this),this.display=null},positionCheckboxes:function(t){var e,i=this.group&&this.group.alignAttr,o=this.clipHeight||this.legendHeight,r=this.titleHeight;i&&(e=i.translateY,s(this.allItems,function(s){var a,l=s.checkbox;l&&(a=e+r+l.y+(t||0)+3,n(l,{left:i.translateX+s.checkboxOffset+l.x-20+"px",top:a+"px",display:a>e-6&&a<e+o-6?"":"none"}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},setText:function(e){var i=this.options;e.legendItem.attr({text:i.labelFormat?t.format(i.labelFormat,e):i.labelFormatter.call(e)})},renderItem:function(t){var e=this.chart,i=e.renderer,n=this.options,o="horizontal"===n.layout,r=this.symbolWidth,s=n.symbolPadding,a=this.itemStyle,l=this.itemHiddenStyle,h=this.padding,u=o?d(n.itemDistance,20):0,p=!n.rtl,f=n.width,g=n.itemMarginBottom||0,m=this.itemMarginTop,v=this.initialItemX,y=t.legendItem,b=!t.series,x=!b&&t.series.drawLegendSymbol?t.series:t,w=x.options,w=this.createCheckboxForItem&&w&&w.showCheckbox,T=n.useHTML;y||(t.legendGroup=i.g("legend-item").addClass("highcharts-"+x.type+"-series highcharts-color-"+t.colorIndex+(t.options.className?" "+t.options.className:"")+(b?" highcharts-series-"+t.index:"")).attr({zIndex:1}).add(this.scrollGroup),t.legendItem=y=i.text("",p?r+s:-s,this.baseline||0,T).css(c(t.visible?a:l)).attr({align:p?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(a=a.fontSize,this.fontMetrics=i.fontMetrics(a,y),this.baseline=this.fontMetrics.f+3+m,y.attr("y",this.baseline)),x.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,y,T),w&&this.createCheckboxForItem(t)),this.colorizeItem(t,t.visible),this.setText(t),i=y.getBBox(),r=t.checkboxOffset=n.itemWidth||t.legendItemWidth||r+s+i.width+u+(w?20:0),this.itemHeight=s=Math.round(t.legendItemHeight||i.height),o&&this.itemX-v+r>(f||e.chartWidth-2*h-v-n.x)&&(this.itemX=v,this.itemY+=m+this.lastLineHeight+g,this.lastLineHeight=0),this.maxItemWidth=Math.max(this.maxItemWidth,r),this.lastItemY=m+this.itemY+g,this.lastLineHeight=Math.max(s,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],o?this.itemX+=r:(this.itemY+=m+s+g,this.lastLineHeight=s),this.offsetWidth=f||Math.max((o?this.itemX-v-u:r)+h,this.offsetWidth)},getAllItems:function(){var t=[];return s(this.chart.series,function(e){var i=e&&e.options;e&&d(i.showInLegend,!r(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},adjustMargins:function(t,e){var i=this.chart,n=this.options,o=n.align.charAt(0)+n.verticalAlign.charAt(0)+n.layout.charAt(0);n.floating||s([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(s,a){s.test(o)&&!r(t[a])&&(i[h[a]]=Math.max(i[h[a]],i.legend[(a+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][a]*n[a%2?"x":"y"]+d(n.margin,12)+e[a]))})},render:function(){var t,e,i,n,o=this,r=o.chart,l=r.renderer,h=o.group,c=o.box,d=o.options,u=o.padding;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,h||(o.group=h=l.g("legend").attr({zIndex:7}).add(),o.contentGroup=l.g().attr({zIndex:1}).add(h),o.scrollGroup=l.g().add(o.contentGroup)),o.renderTitle(),t=o.getAllItems(),p(t,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),d.reversed&&t.reverse(),o.allItems=t,o.display=e=!!t.length,o.lastLineHeight=0,s(t,function(t){o.renderItem(t)}),i=(d.width||o.offsetWidth)+u,n=o.lastItemY+o.lastLineHeight+o.titleHeight,n=o.handleOverflow(n),n+=u,c||(o.box=c=l.rect().addClass("highcharts-legend-box").attr({r:d.borderRadius}).add(h),c.isNew=!0),c.attr({stroke:d.borderColor,"stroke-width":d.borderWidth||0,fill:d.backgroundColor||"none"}).shadow(d.shadow),0<i&&0<n&&(c[c.isNew?"attr":"animate"](c.crisp({x:0,y:0,width:i,height:n},c.strokeWidth())),c.isNew=!1),c[e?"show":"hide"](),o.legendWidth=i,o.legendHeight=n,s(t,function(t){o.positionItem(t)}),e&&h.align(a({width:i,height:n},d),!0,"spacingBox"),r.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,o=this.chart,r=o.renderer,a=this.options,l=a.y,o=o.spacingBox.height+("top"===a.verticalAlign?-l:l)-this.padding,l=a.maxHeight,h=this.clipRect,c=a.navigation,u=d(c.animation,!0),p=c.arrowSize||12,f=this.nav,g=this.pages,m=this.padding,v=this.allItems,y=function(t){t?h.attr({height:t}):h&&(n.clipRect=h.destroy(),n.contentGroup.clip()),n.contentGroup.div&&(n.contentGroup.div.style.clip=t?"rect("+m+"px,9999px,"+(m+t)+"px,0)":"auto")};return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(o/=2),l&&(o=Math.min(o,l)),g.length=0,t>o&&!1!==c.enabled?(this.clipHeight=e=Math.max(o-20-this.titleHeight-m,0),this.currentPage=d(this.currentPage,1),this.fullHeight=t,s(v,function(t,n){var o=t._legendItemPos[1];t=Math.round(t.legendItem.getBBox().height);var r=g.length;(!r||o-g[r-1]>e&&(i||o)!==g[r-1])&&(g.push(i||o),r++),n===v.length-1&&o+t-g[r-1]>e&&g.push(o),o!==i&&(i=o)}),h||(h=n.clipRect=r.clipRect(0,m,9999,0),n.contentGroup.clip(h)),y(e),f||(this.nav=f=r.g().attr({zIndex:1}).add(this.group),this.up=r.symbol("triangle",0,0,p,p).on("click",function(){n.scroll(-1,u)}).add(f),this.pager=r.text("",15,10).addClass("highcharts-legend-navigation").css(c.style).add(f),this.down=r.symbol("triangle-down",0,0,p,p).on("click",function(){n.scroll(1,u)}).add(f)),n.scroll(0),t=o):f&&(y(),f.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length;t=this.currentPage+t;var o=this.clipHeight,r=this.options.navigation,s=this.pager,a=this.padding;t>n&&(t=n),0<t&&(void 0!==e&&u(e,this.chart),this.nav.attr({translateX:a,translateY:o+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===t?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),s.attr({text:t+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,"class":t===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===t?r.inactiveColor:r.activeColor}).css({cursor:1===t?"default":"pointer"}),this.down.attr({fill:t===n?r.inactiveColor:r.activeColor}).css({cursor:t===n?"default":"pointer"}),e=-i[t-1]+this.initialItemY,this.scrollGroup.animate({translateY:e}),this.currentPage=t,this.positionCheckboxes(e))}},t.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options,n=i.symbolHeight||t.fontMetrics.f,i=i.squareSymbol;e.legendSymbol=this.chart.renderer.rect(i?(t.symbolWidth-n)/2:0,t.baseline-n+1,i?n:t.symbolWidth,n,d(t.options.symbolRadius,n/2)).addClass("highcharts-point").attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e=this.options,i=e.marker,n=t.symbolWidth,o=this.chart.renderer,r=this.legendGroup;t=t.baseline-Math.round(.3*t.fontMetrics.b);var s;s={"stroke-width":e.lineWidth||0},e.dashStyle&&(s.dashstyle=e.dashStyle),this.legendLine=o.path(["M",0,t,"L",n,t]).addClass("highcharts-graph").attr(s).add(r),i&&!1!==i.enabled&&(e=0===this.symbol.indexOf("url")?0:i.radius,this.legendSymbol=i=o.symbol(this.symbol,n/2-e,t-e,2*e,2*e,i).addClass("highcharts-point").add(r),i.isMarker=!0)}},(/Trident\/7\.0/.test(f.navigator.userAgent)||l)&&g(e.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};n(),setTimeout(n)})}(t),function(t){var e=t.addEvent,i=t.animate,n=t.animObject,o=t.attr,r=t.doc,s=t.Axis,a=t.createElement,l=t.defaultOptions,h=t.discardElement,c=t.charts,d=t.css,u=t.defined,p=t.each,f=t.extend,g=t.find,m=t.fireEvent,v=t.getStyle,y=t.grep,b=t.isNumber,x=t.isObject,w=t.isString,T=t.Legend,k=t.marginNames,C=t.merge,S=t.Pointer,M=t.pick,A=t.pInt,E=t.removeEvent,L=t.seriesTypes,P=t.splat,D=t.svg,I=t.syncTimeout,O=t.win,N=t.Renderer,R=t.Chart=function(){this.getArgs.apply(this,arguments)};t.chart=function(t,e,i){return new R(t,e,i)},R.prototype={callbacks:[],getArgs:function(){var t=[].slice.call(arguments);(w(t[0])||t[0].nodeName)&&(this.renderTo=t.shift()),this.init(t[0],t[1])},init:function(i,n){var o,r=i.series;i.series=null,o=C(l,i),o.series=i.series=r,this.userOptions=i,this.respRules=[],i=o.chart,r=i.events,this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.callback=n,this.isResizing=0,this.options=o,this.axes=[],this.series=[],this.hasCartesianSeries=i.showAxes;var s;if(this.index=c.length,c.push(this),t.chartCount++,r)for(s in r)e(this,s,r[s]);this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.firstRender()},initSeries:function(e){var i=this.options.chart;return(i=L[e.type||i.type||i.defaultSeriesType])||t.error(17,!0),i=new i,i.init(this,e),i},isInsidePlot:function(t,e,i){var n=i?e:t;return t=i?t:e,0<=n&&n<=this.plotWidth&&0<=t&&t<=this.plotHeight},redraw:function(e){var i,n,o=this.axes,r=this.series,s=this.pointer,a=this.legend,l=this.isDirtyLegend,h=this.hasCartesianSeries,c=this.isDirtyBox,d=r.length,u=d,g=this.renderer,v=g.isHidden(),y=[];for(t.setAnimation(e,this),v&&this.cloneRenderTo(),this.layOutTitles();u--;)if(e=r[u],e.options.stacking&&(i=!0,e.isDirty)){n=!0;break}if(n)for(u=d;u--;)e=r[u],e.options.stacking&&(e.isDirty=!0);p(r,function(t){t.isDirty&&"point"===t.options.legendType&&(t.updateTotals&&t.updateTotals(),l=!0),t.isDirtyData&&m(t,"updatedData")}),l&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),i&&this.getStacks(),h&&p(o,function(t){t.updateNames(),t.setScale()}),this.getMargins(),h&&(p(o,function(t){t.isDirty&&(c=!0)}),p(o,function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,y.push(function(){m(t,"afterSetExtremes",f(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(c||i)&&t.redraw()})),c&&this.drawChartBox(),p(r,function(t){(c||t.isDirty)&&t.visible&&t.redraw()}),s&&s.reset(!0),g.draw(),m(this,"redraw"),v&&this.cloneRenderTo(!0),p(y,function(t){t.call()})},get:function(t){function e(e){return e.id===t||e.options.id===t}var i,n,o=this.series;for(i=g(this.axes,e)||g(this.series,e),n=0;!i&&n<o.length;n++)i=g(o[n].points||[],e);return i},getAxes:function(){var t=this,e=this.options,i=e.xAxis=P(e.xAxis||{}),e=e.yAxis=P(e.yAxis||{});p(i,function(t,e){t.index=e,t.isX=!0}),p(e,function(t,e){t.index=e}),i=i.concat(e),p(i,function(e){new s(t,e)})},getSelectedPoints:function(){var t=[];return p(this.series,function(e){t=t.concat(y(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return y(this.series,function(t){return t.selected})},setTitle:function(t,e,i){var n,o=this,r=o.options;n=r.title=C({style:{color:"#333333",fontSize:r.isStock?"16px":"18px"}},r.title,t),r=r.subtitle=C({style:{color:"#666666"}},r.subtitle,e),p([["title",t,n],["subtitle",e,r]],function(t,e){var i=t[0],n=o[i],r=t[1];t=t[2],n&&r&&(o[i]=n=n.destroy()),t&&t.text&&!n&&(o[i]=o.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+i,zIndex:t.zIndex||4}).add(),o[i].update=function(t){o.setTitle(!e&&t,e&&t)},o[i].css(t.style))}),o.layOutTitles(i)},layOutTitles:function(t){var e,i=0,n=this.renderer,o=this.spacingBox;p(["title","subtitle"],function(t){var e,r=this[t],s=this.options[t];r&&(e=s.style.fontSize,e=n.fontMetrics(e,r).b,r.css({width:(s.width||o.width+s.widthAdjust)+"px"}).align(f({y:i+e+("title"===t?-3:2)},s),!1,"spacingBox"),s.floating||s.verticalAlign||(i=Math.ceil(i+r.getBBox().height)))},this),e=this.titleOffset!==i,this.titleOffset=i,!this.isDirtyBox&&e&&(this.isDirtyBox=e,this.hasRendered&&M(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,e=t.width,t=t.height,i=this.renderToClone||this.renderTo;u(e)||(this.containerWidth=v(i,"width")),u(t)||(this.containerHeight=v(i,"height")),this.chartWidth=Math.max(0,e||this.containerWidth||600),this.chartHeight=Math.max(0,M(t,19<this.containerHeight?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;if(t){if(e){for(;e.childNodes.length;)this.renderTo.appendChild(e.firstChild);h(e),delete this.renderToClone}}else i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),d(e,{position:"absolute",top:"-9999px",display:"block"}),e.style.setProperty&&e.style.setProperty("display","block","important"),r.body.appendChild(e),i&&e.appendChild(i)},setClassName:function(t){this.container.className="highcharts-container "+(t||"")},getContainer:function(){var e,i,n,s=this.options,l=s.chart;e=this.renderTo;var h,d=t.uniqueKey();e||(this.renderTo=e=l.renderTo),w(e)&&(this.renderTo=e=r.getElementById(e)),e||t.error(13,!0),i=A(o(e,"data-highcharts-chart")),b(i)&&c[i]&&c[i].hasRendered&&c[i].destroy(),o(e,"data-highcharts-chart",this.index),e.innerHTML="",l.skipClone||e.offsetWidth||this.cloneRenderTo(),this.getChartSize(),i=this.chartWidth,n=this.chartHeight,h=f({position:"relative",overflow:"hidden",width:i+"px",height:n+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},l.style),this.container=e=a("div",{id:d},h,this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=new(t[l.renderer]||N)(e,i,n,null,l.forExport,s.exporting&&s.exporting.allowHTML),this.setClassName(l.className),this.renderer.setStyle(l.style),this.renderer.chartIndex=this.index},getMargins:function(t){var e=this.spacing,i=this.margin,n=this.titleOffset;this.resetMargins(),n&&!u(i[0])&&(this.plotTop=Math.max(this.plotTop,n+this.options.title.margin+e[0])),this.legend.display&&this.legend.adjustMargins(i,e),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.margin;t.hasCartesianSeries&&p(t.axes,function(t){t.visible&&t.getOffset()}),p(k,function(n,o){u(i[o])||(t[n]+=e[o])}),t.setChartSize()},reflow:function(t){var e=this,i=e.options.chart,n=e.renderTo,o=u(i.width),s=i.width||v(n,"width"),i=i.height||v(n,"height"),n=t?t.target:O;o||e.isPrinting||!s||!i||n!==O&&n!==r||(s===e.containerWidth&&i===e.containerHeight||(clearTimeout(e.reflowTimeout),e.reflowTimeout=I(function(){e.container&&e.setSize(void 0,void 0,!1)},t?100:0)),e.containerWidth=s,e.containerHeight=i)},initReflow:function(){var t,i=this;t=e(O,"resize",function(t){i.reflow(t)}),e(i,"destroy",t)},setSize:function(e,o,r){var s=this,a=s.renderer;s.isResizing+=1,t.setAnimation(r,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,void 0!==e&&(s.options.chart.width=e),void 0!==o&&(s.options.chart.height=o),s.getChartSize(),e=a.globalAnimation,(e?i:d)(s.container,{width:s.chartWidth+"px",height:s.chartHeight+"px"},e),s.setChartSize(!0),a.setSize(s.chartWidth,s.chartHeight,r),p(s.axes,function(t){t.isDirty=!0,t.setScale()}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.setResponsive&&s.setResponsive(!1),s.redraw(r),s.oldChartHeight=null,m(s,"resize"),I(function(){s&&m(s,"endResize",null,function(){--s.isResizing})},n(e).duration)},setChartSize:function(t){var e,i,n,o,r=this.inverted,s=this.renderer,a=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=n=Math.max(0,Math.round(a-e-this.marginRight)),this.plotHeight=o=Math.max(0,Math.round(l-i-this.marginBottom)),this.plotSizeX=r?o:n,this.plotSizeY=r?n:o,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=s.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=s.plotBox={x:e,y:i,width:n,height:o},a=2*Math.floor(this.plotBorderWidth/2),r=Math.ceil(Math.max(a,d[3])/2),s=Math.ceil(Math.max(a,d[0])/2),this.clipBox={x:r,y:s,width:Math.floor(this.plotSizeX-Math.max(a,d[1])/2-r),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(a,d[2])/2-s))},t||p(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this,e=t.options.chart;p(["margin","spacing"],function(i){var n=e[i],o=x(n)?n:[n,n,n,n];p(["Top","Right","Bottom","Left"],function(n,r){t[i][r]=M(e[i+n],o[r])})}),p(k,function(e,i){t[e]=M(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e,i=this.options.chart,n=this.renderer,o=this.chartWidth,r=this.chartHeight,s=this.chartBackground,a=this.plotBackground,l=this.plotBorder,h=this.plotBGImage,c=i.backgroundColor,d=i.plotBackgroundColor,u=i.plotBackgroundImage,p=this.plotLeft,f=this.plotTop,g=this.plotWidth,m=this.plotHeight,v=this.plotBox,y=this.clipRect,b=this.clipBox,x="animate";s||(this.chartBackground=s=n.rect().addClass("highcharts-background").add(),x="attr"),t=i.borderWidth||0,e=t+(i.shadow?8:0),c={fill:c||"none"},(t||s["stroke-width"])&&(c.stroke=i.borderColor,c["stroke-width"]=t),s.attr(c).shadow(i.shadow),s[x]({x:e/2,y:e/2,width:o-e-t%2,height:r-e-t%2,r:i.borderRadius}),x="animate",a||(x="attr",this.plotBackground=a=n.rect().addClass("highcharts-plot-background").add()),a[x](v),a.attr({fill:d||"none"}).shadow(i.plotShadow),u&&(h?h.animate(v):this.plotBGImage=n.image(u,p,f,g,m).add()),y?y.animate({width:b.width,height:b.height}):this.clipRect=n.clipRect(b),x="animate",l||(x="attr",this.plotBorder=l=n.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),l.attr({stroke:i.plotBorderColor,"stroke-width":i.plotBorderWidth||0,fill:"none"}),l[x](l.crisp({x:p,y:f,width:g,height:m},-l.strokeWidth())),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,o=n.options.chart,r=n.options.series;p(["inverted","angular","polar"],function(s){for(t=L[o.type||o.defaultSeriesType],i=o[s]||t&&t.prototype[s],e=r&&r.length;!i&&e--;)(t=L[r[e].type])&&t.prototype[s]&&(i=!0);n[s]=i})},linkSeries:function(){var t=this,e=t.series;p(e,function(t){t.linkedSeries.length=0}),p(e,function(e){var i=e.options.linkedTo;w(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&i.linkedParent!==e&&(i.linkedSeries.push(e),e.linkedParent=i,e.visible=M(e.options.visible,i.options.visible,e.visible))})},renderSeries:function(){p(this.series,function(t){t.translate(),t.render()})},renderLabels:function(){var t=this,e=t.options.labels;e.items&&p(e.items,function(i){var n=f(e.style,i.style),o=A(n.left)+t.plotLeft,r=A(n.top)+t.plotTop+12;delete n.left,delete n.top,t.renderer.text(i.html,o,r).attr({zIndex:2}).css(n).add()})},render:function(){var t,e,i,n=this.axes,o=this.renderer,r=this.options;this.setTitle(),this.legend=new T(this,r.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),r=this.plotWidth,t=this.plotHeight-=21,p(n,function(t){t.setScale()}),this.getAxisMargins(),e=1.1<r/this.plotWidth,i=1.05<t/this.plotHeight,(e||i)&&(p(n,function(t){(t.horiz&&e||!t.horiz&&i)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&p(n,function(t){t.visible&&t.render()}),this.seriesGroup||(this.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},addCredits:function(t){var e=this;t=C(!0,this.options.credits,t),t.enabled&&!this.credits&&(this.credits=this.renderer.text(t.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){t.href&&(O.location.href=t.href)}).attr({align:t.position.align,zIndex:8}).css(t.style).add().align(t.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},destroy:function(){var e,i=this,n=i.axes,o=i.series,r=i.container,s=r&&r.parentNode;for(m(i,"destroy"),c[i.index]=void 0,t.chartCount--,i.renderTo.removeAttribute("data-highcharts-chart"),E(i),e=n.length;e--;)n[e]=n[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=o.length;e--;)o[e]=o[e].destroy();p("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(t){var e=i[t];e&&e.destroy&&(i[t]=e.destroy())}),r&&(r.innerHTML="",E(r),s&&h(r));for(e in i)delete i[e]},isReadyToRender:function(){var t=this;return!(!D&&O==O.top&&"complete"!==r.readyState)||(r.attachEvent("onreadystatechange",function(){r.detachEvent("onreadystatechange",t.firstRender),"complete"===r.readyState&&t.firstRender()}),!1)},firstRender:function(){var t=this,e=t.options;t.isReadyToRender()&&(t.getContainer(),m(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),p(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),m(t,"beforeRender"),S&&(t.pointer=new S(t,e)),t.render(),t.renderer.draw(),!t.renderer.imgCount&&t.onload&&t.onload(),t.cloneRenderTo(!0))},onload:function(){p([this.callback].concat(this.callbacks),function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),m(this,"load"),u(this.index)&&!1!==this.options.chart.reflow&&this.initReflow(),this.onload=null}}}(t),function(t){var e,i=t.each,n=t.extend,o=t.erase,r=t.fireEvent,s=t.format,a=t.isArray,l=t.isNumber,h=t.pick,c=t.removeEvent;e=t.Point=function(){},e.prototype={init:function(t,e,i){return this.series=t,this.color=t.color,this.applyOptions(e,i),t.options.colorByPoint?(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter],e=e.length,i=t.colorCounter,t.colorCounter++,t.colorCounter===e&&(t.colorCounter=0)):i=t.colorIndex,this.colorIndex=h(this.colorIndex,i),t.chart.pointCount++,this},applyOptions:function(t,i){var o=this.series,r=o.options.pointValKey||o.pointValKey;return t=e.prototype.optionsToObject.call(this,t),n(this,t),this.options=this.options?n(this.options,t):t,t.group&&delete this.group,r&&(this.y=this[r]),this.isNull=h(this.isValid&&!this.isValid(),null===this.x||!l(this.y,!0)),this.selected&&(this.state="select"),"name"in this&&void 0===i&&o.xAxis&&o.xAxis.hasNames&&(this.x=o.xAxis.nameToX(this)),void 0===this.x&&o&&(this.x=void 0===i?o.autoIncrement(this):i),this},optionsToObject:function(t){var e={},i=this.series,n=i.options.keys,o=n||i.pointArrayMap||["y"],r=o.length,s=0,h=0;if(l(t)||null===t)e[o[0]]=t;else if(a(t))for(!n&&t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),s++);h<r;)n&&void 0===t[s]||(e[o[h]]=t[s]),s++,h++;else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},getClassName:function(){
return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className:"")},getZone:function(){var t,e=this.series,i=e.zones,e=e.zoneAxis||"y",n=0;for(t=i[n];this[e]>=t.value;)t=i[++n];return t&&t.color&&!this.options.color&&(this.color=t.color),t},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),o(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(c(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,n=e.tooltipOptions,o=h(n.valueDecimals,""),r=n.valuePrefix||"",a=n.valueSuffix||"";return i(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||a)&&(t=t.replace(e+"}",r+e+"}"+a)),t=t.replace(e+"}",e+":,."+o+"f}")}),s(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,o=this.series.options;(o.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&o.allowPointSelect&&(i=function(t){n.select&&n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),r(this,t,e,i)},visible:!0}}(t),function(t){var e=t.addEvent,i=t.animObject,n=t.arrayMax,o=t.arrayMin,r=t.correctFloat,s=t.Date,a=t.defaultOptions,l=t.defaultPlotOptions,h=t.defined,c=t.each,d=t.erase,u=t.extend,p=t.fireEvent,f=t.grep,g=t.isArray,m=t.isNumber,v=t.isString,y=t.merge,b=t.pick,x=t.removeEvent,w=t.splat,T=t.SVGElement,k=t.syncTimeout,C=t.win;t.Series=t.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":t.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3},{isCartesian:!0,pointClass:t.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(t,i){var n,o,r,s=this,a=t.series;s.chart=t,s.options=i=s.setOptions(i),s.linkedSeries=[],s.bindAxes(),u(s,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),o=i.events;for(n in o)e(s,n,o[n]);for((o&&o.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(t.runTrackerClick=!0),s.getColor(),s.getSymbol(),c(s.parallelArrays,function(t){s[t+"Data"]=[]}),s.setData(i.data,!1),s.isCartesian&&(t.hasCartesianSeries=!0),a.length&&(r=a[a.length-1]),s._i=b(r&&r._i,-1)+1,t=this.insert(a);t<a.length;t++)a[t].index=t,a[t].name=a[t].name||"Series "+(a[t].index+1)},insert:function(t){var e,i=this.options.index;if(m(i)){for(e=t.length;e--;)if(i>=b(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return b(e,t.length-1)},bindAxes:function(){var e,i=this,n=i.options,o=i.chart;c(i.axisTypes||[],function(r){c(o[r],function(t){e=t.options,(n[r]===e.index||void 0!==n[r]&&n[r]===e.id||void 0===n[r]&&0===e.index)&&(i.insert(t.series),i[r]=t,t.isDirty=!0)}),i[r]||i.optionalAxis===r||t.error(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments,o=m(e)?function(n){var o="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=o}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))};c(i.parallelArrays,o)},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,n=e.pointIntervalUnit,i=b(i,e.pointStart,0);return this.pointInterval=t=b(this.pointInterval,e.pointInterval,1),n&&(e=new s(i),"day"===n?e=+e[s.hcSetDate](e[s.hcGetDate]()+t):"month"===n?e=+e[s.hcSetMonth](e[s.hcGetMonth]()+t):"year"===n&&(e=+e[s.hcSetFullYear](e[s.hcGetFullYear]()+t)),t=e-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options.plotOptions,e=e.userOptions||{},n=e.plotOptions||{},o=i[this.type];return this.userOptions=t,i=y(o,i.series,t),this.tooltipOptions=y(a.tooltip,a.plotOptions[this.type].tooltip,e.tooltip,n.series&&n.series.tooltip,n[this.type]&&n[this.type].tooltip,t.tooltip),null===o.marker&&delete i.marker,this.zoneAxis=i.zoneAxis,t=this.zones=(i.zones||[]).slice(),!i.negativeColor&&!i.negativeFillColor||i.zones||t.push({value:i[this.zoneAxis+"Threshold"]||i.threshold||0,className:"highcharts-negative",color:i.negativeColor,fillColor:i.negativeFillColor}),t.length&&h(t[t.length-1].value)&&t.push({color:this.color,fillColor:this.fillColor}),i},getCyclic:function(t,e,i){var n,o=this.userOptions,r=t+"Index",s=t+"Counter",a=i?i.length:b(this.chart.options.chart[t+"Count"],this.chart[t+"Count"]);e||(n=b(o[r],o["_"+r]),h(n)||(o["_"+r]=n=this.chart[s]%a,this.chart[s]+=1),i&&(e=i[n])),void 0!==n&&(this[r]=n),this[t]=e},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||l[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:t.LegendSymbolMixin.drawLineMarker,setData:function(e,i,n,o){var r,s=this,a=s.points,l=a&&a.length||0,h=s.options,d=s.chart,u=null,p=s.xAxis,f=h.turboThreshold,y=this.xData,x=this.yData,w=(r=s.pointArrayMap)&&r.length;if(e=e||[],r=e.length,i=b(i,!0),!1!==o&&r&&l===r&&!s.cropped&&!s.hasGroupedData&&s.visible)c(e,function(t,e){a[e].update&&t!==h.data[e]&&a[e].update(t,!1,null,!1)});else{if(s.xIncrement=null,s.colorCounter=0,c(this.parallelArrays,function(t){s[t+"Data"].length=0}),f&&r>f){for(n=0;null===u&&n<r;)u=e[n],n++;if(m(u))for(n=0;n<r;n++)y[n]=this.autoIncrement(),x[n]=e[n];else if(g(u))if(w)for(n=0;n<r;n++)u=e[n],y[n]=u[0],x[n]=u.slice(1,w+1);else for(n=0;n<r;n++)u=e[n],y[n]=u[0],x[n]=u[1];else t.error(12)}else for(n=0;n<r;n++)void 0!==e[n]&&(u={series:s},s.pointClass.prototype.applyOptions.apply(u,[e[n]]),s.updateParallelArrays(u,n));for(v(x[0])&&t.error(14,!0),s.data=[],s.options.data=s.userOptions.data=e,n=l;n--;)a[n]&&a[n].destroy&&a[n].destroy();p&&(p.minRange=p.userMinRange),s.isDirty=d.isDirtyBox=!0,s.isDirtyData=!!a,n=!1}"point"===h.legendType&&(this.processData(),this.generatePoints()),i&&d.redraw(n)},processData:function(e){var i,n=this.xData,o=this.yData,r=n.length;i=0;var s,a,l,h=this.xAxis,c=this.options;l=c.cropThreshold;var d,u,p=this.getExtremesFromAll||c.getExtremesFromAll,f=this.isCartesian,c=h&&h.val2lin,g=h&&h.isLog;if(f&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!e)return!1;for(h&&(e=h.getExtremes(),d=e.min,u=e.max),f&&this.sorted&&!p&&(!l||r>l||this.forceCrop)&&(n[r-1]<d||n[0]>u?(n=[],o=[]):(n[0]<d||n[r-1]>u)&&(i=this.cropData(this.xData,this.yData,d,u),n=i.xData,o=i.yData,i=i.start,s=!0)),l=n.length||1;--l;)r=g?c(n[l])-c(n[l-1]):n[l]-n[l-1],0<r&&(void 0===a||r<a)?a=r:0>r&&this.requireSorting&&t.error(15);this.cropped=s,this.cropStart=i,this.processedXData=n,this.processedYData=o,this.closestPointRange=a},cropData:function(t,e,i,n){var o,r=t.length,s=0,a=r,l=b(this.cropShoulder,1);for(o=0;o<r;o++)if(t[o]>=i){s=Math.max(0,o-l);break}for(i=o;i<r;i++)if(t[i]>n){a=i+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,i,n,o=this.options.data,r=this.data,s=this.processedXData,a=this.processedYData,l=this.pointClass,h=s.length,c=this.cropStart||0,d=this.hasGroupedData,u=[];for(r||d||(r=[],r.length=o.length,r=this.data=r),n=0;n<h;n++)e=c+n,d?(i=(new l).init(this,[s[n]].concat(w(a[n]))),i.dataGroup=this.groupMap[n]):(i=r[e])||void 0===o[e]||(r[e]=i=(new l).init(this,o[e],s[n])),i.index=e,u[n]=i;if(r&&(h!==(t=r.length)||d))for(n=0;n<t;n++)n!==c||d||(n+=h),r[n]&&(r[n].destroyElements(),r[n].plotX=void 0);this.data=r,this.points=u},getExtremes:function(t){var e,i=this.yAxis,r=this.processedXData,s=[],a=0;e=this.xAxis.getExtremes();var l,h,c,d,u=e.min,p=e.max;for(t=t||this.stackedYData||this.processedYData||[],e=t.length,d=0;d<e;d++)if(h=r[d],c=t[d],l=(m(c,!0)||g(c))&&(!i.isLog||c.length||0<c),h=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(r[d+1]||h)>=u&&(r[d-1]||h)<=p,l&&h)if(l=c.length)for(;l--;)null!==c[l]&&(s[a++]=c[l]);else s[a++]=c;this.dataMin=o(s),this.dataMax=n(s)},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,n,o=this.options,s=o.stacking,a=this.xAxis,l=a.categories,c=this.yAxis,d=this.points,u=d.length,p=!!this.modifyValue,f=o.pointPlacement,g="between"===f||m(f),v=o.threshold,y=o.startFromThreshold?v:0,x=Number.MAX_VALUE;for("between"===f&&(f=.5),m(f)&&(f*=b(o.pointRange||a.pointRange)),o=0;o<u;o++){var w=d[o],T=w.x,k=w.y;e=w.low;var C,S=s&&c.stacks[(this.negStacks&&k<(y?0:v)?"-":"")+this.stackKey];c.isLog&&null!==k&&0>=k&&(w.isNull=!0),w.plotX=t=r(Math.min(Math.max(-1e5,a.translate(T,0,0,0,1,f,"flags"===this.type)),1e5)),s&&this.visible&&!w.isNull&&S&&S[T]&&(n=this.getStackIndicator(n,T,this.index),C=S[T],k=C.points[n.key],e=k[0],k=k[1],e===y&&n.key===S[T].base&&(e=b(v,c.min)),c.isLog&&0>=e&&(e=null),w.total=w.stackTotal=C.total,w.percentage=C.total&&w.y/C.total*100,w.stackY=k,C.setOffset(this.pointXOffset||0,this.barW||0)),w.yBottom=h(e)?c.translate(e,0,1,0,1):null,p&&(k=this.modifyValue(k,w)),w.plotY=e="number"==typeof k&&1/0!==k?Math.min(Math.max(-1e5,c.translate(k,0,1,0,1)),1e5):void 0,w.isInside=void 0!==e&&0<=e&&e<=c.len&&0<=t&&t<=a.len,w.clientX=g?r(a.translate(T,0,0,0,1,f)):t,w.negative=w.y<(v||0),w.category=l&&void 0!==l[w.x]?l[w.x]:w.x,w.isNull||(void 0!==i&&(x=Math.min(x,Math.abs(t-i))),i=t),w.zone=this.zones.length&&w.getZone()}this.closestPointRangePx=x},getValidPoints:function(t,e){var i=this.chart;return f(t||this.points||[],function(t){return!(e&&!i.isInsidePlot(t.plotX,t.plotY,i.inverted))&&!t.isNull})},setClip:function(t){var e=this.chart,i=this.options,n=e.renderer,o=e.inverted,r=this.clipBox,s=r||e.clipBox,a=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,s.height,i.xAxis,i.yAxis].join(),l=e[a],h=e[a+"m"];l||(t&&(s.width=0,e[a+"m"]=h=n.clipRect(-99,o?-e.plotLeft:-e.plotTop,99,o?e.chartWidth:e.chartHeight)),e[a]=l=n.clipRect(s),l.count={length:0}),t&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1),!1!==i.clip&&(this.group.clip(t||r?l:e.clipRect),this.markerGroup.clip(h),this.sharedClipKey=a),t||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&a&&e[a]&&(r||(e[a]=e[a].destroy()),e[a+"m"]&&(e[a+"m"]=e[a+"m"].destroy())))},animate:function(t){var e,n=this.chart,o=i(this.options.animation);t?this.setClip(o):(e=this.sharedClipKey,(t=n[e])&&t.animate({width:n.plotSizeX},o),n[e+"m"]&&n[e+"m"].animate({width:n.plotSizeX+99},o),this.animate=null)},afterAnimate:function(){this.setClip(),p(this,"afterAnimate")},drawPoints:function(){var t,e,i,n,o,r,s,a,l=this.points,h=this.chart,c=this.options.marker,d=this.markerGroup,u=b(c.enabled,!!this.xAxis.isRadial||null,this.closestPointRangePx>2*c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(e=l.length;e--;)i=l[e],t=i.plotY,n=i.graphic,o=i.marker||{},r=!!i.marker,s=u&&void 0===o.enabled||o.enabled,a=i.isInside,s&&m(t)&&null!==i.y?(t=b(o.symbol,this.symbol),i.hasImage=0===t.indexOf("url"),s=this.markerAttribs(i,i.selected&&"select"),n?n[a?"show":"hide"](!0).animate(s):a&&(0<s.width||i.hasImage)&&(i.graphic=n=h.renderer.symbol(t,s.x,s.y,s.width,s.height,r?o:c).add(d)),n&&n.attr(this.pointAttribs(i,i.selected&&"select")),n&&n.addClass(i.getClassName(),!0)):n&&(i.graphic=n.destroy())},markerAttribs:function(t,e){var i=this.options.marker,n=t&&t.options,o=n&&n.marker||{},n=b(o.radius,i.radius);return e&&(i=i.states[e],e=o.states&&o.states[e],n=b(e&&e.radius,i&&i.radius,n+(i&&i.radiusPlus||0))),t.hasImage&&(n=0),t={x:Math.floor(t.plotX)-n,y:t.plotY-n},n&&(t.width=t.height=2*n),t},pointAttribs:function(t,e){var i=this.options.marker,n=t&&t.options,o=n&&n.marker||{},r=this.color,s=n&&n.color,a=t&&t.color,n=b(o.lineWidth,i.lineWidth);return t=t&&t.zone&&t.zone.color,r=s||t||a||r,t=o.fillColor||i.fillColor||r,r=o.lineColor||i.lineColor||r,e&&(i=i.states[e],e=o.states&&o.states[e]||{},n=b(e.lineWidth,i.lineWidth,n+b(e.lineWidthPlus,i.lineWidthPlus,0)),t=e.fillColor||i.fillColor||t,r=e.lineColor||i.lineColor||r),{stroke:r,"stroke-width":n,fill:t}},destroy:function(){var t,e,i,n,o=this,r=o.chart,s=/AppleWebKit\/533/.test(C.navigator.userAgent),a=o.data||[];for(p(o,"destroy"),x(o),c(o.axisTypes||[],function(t){(n=o[t])&&n.series&&(d(n.series,o),n.isDirty=n.forceRedraw=!0)}),o.legendItem&&o.chart.legend.destroyItem(o),t=a.length;t--;)(e=a[t])&&e.destroy&&e.destroy();o.points=null,clearTimeout(o.animationTimeout);for(i in o)o[i]instanceof T&&!o[i].survive&&(t=s&&"group"===i?"hide":"destroy",o[i][t]());r.hoverSeries===o&&(r.hoverSeries=null),d(r.series,o);for(i in o)delete o[i]},getGraphPath:function(t,e,i){var n,o,r=this,s=r.options,a=s.step,l=[],d=[];return t=t||r.points,(n=t.reversed)&&t.reverse(),(a={right:1,center:2}[a]||a&&3)&&n&&(a=4-a),!s.connectNulls||e||i||(t=this.getValidPoints(t)),c(t,function(n,c){var u=n.plotX,p=n.plotY,f=t[c-1];(n.leftCliff||f&&f.rightCliff)&&!i&&(o=!0),n.isNull&&!h(e)&&0<c?o=!s.connectNulls:n.isNull&&!e?o=!0:(0===c||o?c=["M",n.plotX,n.plotY]:r.getPointSpline?c=r.getPointSpline(t,n,c):a?(c=1===a?["L",f.plotX,p]:2===a?["L",(f.plotX+u)/2,f.plotY,"L",(f.plotX+u)/2,p]:["L",u,f.plotY],c.push("L",u,p)):c=["L",u,p],d.push(n.x),a&&d.push(n.x),l.push.apply(l,c),o=!1)}),l.xMap=d,r.graphPath=l},drawGraph:function(){var t=this,e=this.options,i=(this.gappedPath||this.getGraphPath).call(this),n=[["graph","highcharts-graph",e.lineColor||this.color,e.dashStyle]];c(this.zones,function(i,o){n.push(["zone-graph-"+o,"highcharts-graph highcharts-zone-graph-"+o+" "+(i.className||""),i.color||t.color,i.dashStyle||e.dashStyle])}),c(n,function(n,o){var r=n[0],s=t[r];s?(s.endX=i.xMap,s.animate({d:i})):i.length&&(t[r]=t.chart.renderer.path(i).addClass(n[1]).attr({zIndex:1}).add(t.group),s={stroke:n[2],"stroke-width":e.lineWidth,fill:t.fillGraph&&t.color||"none"},n[3]?s.dashstyle=n[3]:"square"!==e.linecap&&(s["stroke-linecap"]=s["stroke-linejoin"]="round"),s=t[r].attr(s).shadow(2>o&&e.shadow)),s&&(s.startX=i.xMap,s.isArea=i.isArea)})},applyZones:function(){var t,e,i,n,o,r,s,a,l,h=this,d=this.chart,u=d.renderer,p=this.zones,f=this.clips||[],g=this.graph,m=this.area,v=Math.max(d.chartWidth,d.chartHeight),y=this[(this.zoneAxis||"y")+"Axis"],x=d.inverted,w=!1;p.length&&(g||m)&&y&&void 0!==y.min&&(o=y.reversed,r=y.horiz,g&&g.hide(),m&&m.hide(),n=y.getExtremes(),c(p,function(c,p){t=o?r?d.plotWidth:0:r?0:y.toPixels(n.min),t=Math.min(Math.max(b(e,t),0),v),e=Math.min(Math.max(Math.round(y.toPixels(b(c.value,n.max),!0)),0),v),w&&(t=e=y.toPixels(n.max)),s=Math.abs(t-e),a=Math.min(t,e),l=Math.max(t,e),y.isXAxis?(i={x:x?l:a,y:0,width:s,height:v},r||(i.x=d.plotHeight-i.x)):(i={x:0,y:x?l:a,width:v,height:s},r&&(i.y=d.plotWidth-i.y)),x&&u.isVML&&(i=y.isXAxis?{x:0,y:o?a:l,height:i.width,width:d.chartWidth}:{x:i.y-d.plotLeft-d.spacingBox.x,y:0,width:i.height,height:d.chartHeight}),f[p]?f[p].animate(i):(f[p]=u.clipRect(i),g&&h["zone-graph-"+p].clip(f[p]),m&&h["zone-area-"+p].clip(f[p])),w=c.value>n.max}),this.clips=f)},invertGroups:function(t){function i(){var e={width:o.yAxis.len,height:o.xAxis.len};c(["group","markerGroup"],function(i){o[i]&&o[i].attr(e).invert(t)})}var n,o=this;o.xAxis&&(n=e(o.chart,"resize",i),e(o,"destroy",n),i(t),o.invertGroups=i)},plotGroup:function(t,e,i,n,o){var r=this[t],s=!r;return s&&(this[t]=r=this.chart.renderer.g(e).attr({zIndex:n||.1}).add(o),r.addClass("highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""))),r.attr({visibility:i})[s?"attr":"animate"](this.getPlotBox()),r},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,n=e.chart,o=e.options,r=!!e.animate&&n.renderer.isSVG&&i(o.animation).duration,s=e.visible?"inherit":"hidden",a=o.zIndex,l=e.hasRendered,h=n.seriesGroup,c=n.inverted;t=e.plotGroup("group","series",s,a,h),e.markerGroup=e.plotGroup("markerGroup","markers",s,a,h),r&&e.animate(!0),t.inverted=!!e.isCartesian&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===o.clip||e.sharedClipKey||l||t.clip(n.clipRect),r&&e.animate(),l||(e.animationTimeout=k(function(){e.afterAnimate()},r)),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,n=this.xAxis,o=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:b(n&&n.left,t.plotLeft),translateY:b(o&&o.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,n=this.yAxis,o=this.chart.inverted;return this.searchKDTree({clientX:o?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:o?n.len-t.chartX+n.pos:t.chartY-n.pos},e)},buildKDTree:function(){function t(i,n,o){var r,s;if(s=i&&i.length)return r=e.kdAxisArray[n%o],i.sort(function(t,e){return t[r]-e[r]}),s=Math.floor(s/2),{point:i[s],left:t(i.slice(0,s),n+1,o),right:t(i.slice(s+1),n+1,o)}}var e=this,i=e.kdDimensions;delete e.kdTree,k(function(){e.kdTree=t(e.getValidPoints(null,!e.directTouch),i,i)},e.options.kdNow?0:1)},searchKDTree:function(t,e){function i(t,e,a,l){var c,d,u=e.point,p=n.kdAxisArray[a%l],f=u;return d=h(t[o])&&h(u[o])?Math.pow(t[o]-u[o],2):null,c=h(t[r])&&h(u[r])?Math.pow(t[r]-u[r],2):null,c=(d||0)+(c||0),u.dist=h(c)?Math.sqrt(c):Number.MAX_VALUE,u.distX=h(d)?Math.sqrt(d):Number.MAX_VALUE,p=t[p]-u[p],c=0>p?"left":"right",d=0>p?"right":"left",e[c]&&(c=i(t,e[c],a+1,l),f=c[s]<f[s]?c:u),e[d]&&Math.sqrt(p*p)<f[s]&&(t=i(t,e[d],a+1,l),f=t[s]<f[s]?t:f),f}var n=this,o=this.kdAxisArray[0],r=this.kdAxisArray[1],s=e?"distX":"dist";if(this.kdTree||this.buildKDTree(),this.kdTree)return i(t,this.kdTree,this.kdDimensions,this.kdDimensions)}})}(t),function(t){function e(t,e,i,n,o){var r=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=o,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(r?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(r?"middle":i?"bottom":"top"),y:h(e.y,r?4:i?14:-6),x:h(e.x,r?i?-6:6:0)},this.textAlign=e.textAlign||(r?i?"right":"left":"center")}var i=t.Axis,n=t.Chart,o=t.correctFloat,r=t.defined,s=t.destroyObjectProperties,a=t.each,l=t.format,h=t.pick;t=t.Series,e.prototype={destroy:function(){s(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?l(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,o=n.inverted,r=i.reversed,r=this.isNegative&&!r||!this.isNegative&&r,s=i.translate(i.usePercentage?100:this.total,0,0,0,1),i=i.translate(0),i=Math.abs(s-i);t=n.xAxis[0].translate(this.x)+t;var a=n.plotHeight,o={x:o?r?s:s-i:t,y:o?a-t-e:r?a-s-i:a-s,width:o?i:e,height:o?e:i};(e=this.label)&&(e.align(this.alignOptions,null,o),o=e.alignAttr,e[!1===this.options.crop||n.isInsidePlot(o.x,o.y)?"show":"hide"](!0))}},n.prototype.getStacks=function(){var t=this;a(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),a(t.series,function(e){!e.options.stacking||!0!==e.visible&&!1!==t.options.chart.ignoreHiddenSeries||(e.stackKey=e.type+h(e.options.stack,""))})},i.prototype.buildStacks=function(){var t,e,i=this.series,n=h(this.options.reversedStacks,!0),o=i.length;if(!this.isXAxis){for(this.usePercentage=!1,e=o;e--;)i[n?e:o-e-1].setStackedPoints();for(e=o;e--;)t=i[n?e:o-e-1],t.setStackCliffs&&t.setStackCliffs();if(this.usePercentage)for(e=0;e<o;e++)i[e].setPercentStacks()}},i.prototype.renderStackTotals=function(){var t,e,i=this.chart,n=i.renderer,o=this.stacks,r=this.stackTotalGroup;r||(this.stackTotalGroup=r=n.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),r.translate(i.plotLeft,i.plotTop);for(t in o)for(e in i=o[t])i[e].render(r)},i.prototype.resetStacks=function(){var t,e,i=this.stacks;if(!this.isXAxis)for(t in i)for(e in i[t])i[t][e].touched<this.stacksTouched?(i[t][e].destroy(),delete i[t][e]):(i[t][e].total=null,i[t][e].cum=null)},i.prototype.cleanStacks=function(){var t,e,i;if(!this.isXAxis)for(e in this.oldStacks&&(t=this.stacks=this.oldStacks),t)for(i in t[e])t[e][i].cum=t[e][i].total},t.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var t,i,n,s,a,l,c,d=this.processedXData,u=this.processedYData,p=[],f=u.length,g=this.options,m=g.threshold,v=g.startFromThreshold?m:0,y=g.stack,g=g.stacking,b=this.stackKey,x="-"+b,w=this.negStacks,T=this.yAxis,k=T.stacks,C=T.oldStacks;for(T.stacksTouched+=1,a=0;a<f;a++)l=d[a],c=u[a],t=this.getStackIndicator(t,l,this.index),s=t.key,n=(i=w&&c<(v?0:m))?x:b,k[n]||(k[n]={}),k[n][l]||(C[n]&&C[n][l]?(k[n][l]=C[n][l],k[n][l].total=null):k[n][l]=new e(T,T.options.stackLabels,i,l,y)),n=k[n][l],null!==c&&(n.points[s]=n.points[this.index]=[h(n.cum,v)],r(n.cum)||(n.base=s),n.touched=T.stacksTouched,0<t.index&&!1===this.singleStacks&&(n.points[s][0]=n.points[this.index+","+l+",0"][0])),"percent"===g?(i=i?b:x,w&&k[i]&&k[i][l]?(i=k[i][l],n.total=i.total=Math.max(i.total,n.total)+Math.abs(c)||0):n.total=o(n.total+(Math.abs(c)||0))):n.total=o(n.total+(c||0)),n.cum=h(n.cum,v)+(c||0),null!==c&&(n.points[s].push(n.cum),p[a]=n.cum);"percent"===g&&(T.usePercentage=!0),this.stackedYData=p,T.oldStacks={}}},t.prototype.setPercentStacks=function(){var t,e=this,i=e.stackKey,n=e.yAxis.stacks,r=e.processedXData;a([i,"-"+i],function(i){for(var s,a,l=r.length;l--;)s=r[l],t=e.getStackIndicator(t,s,e.index,i),(s=(a=n[i]&&n[i][s])&&a.points[t.key])&&(a=a.total?100/a.total:0,s[0]=o(s[0]*a),s[1]=o(s[1]*a),e.stackedYData[l]=s[1])})},t.prototype.getStackIndicator=function(t,e,i,n){return!r(t)||t.x!==e||n&&t.key!==n?t={x:e,index:0,key:n}:t.index++,t.key=[i,e,t.index].join(),t}}(t),function(t){var e=t.addEvent,i=t.animate,n=t.Axis,o=t.createElement,r=t.css,s=t.defined,a=t.each,l=t.erase,h=t.extend,c=t.fireEvent,d=t.inArray,u=t.isNumber,p=t.isObject,f=t.merge,g=t.pick,m=t.Point,v=t.Series,y=t.seriesTypes,b=t.setAnimation,x=t.splat;h(t.Chart.prototype,{addSeries:function(t,e,i){var n,o=this;return t&&(e=g(e,!0),c(o,"addSeries",{options:t},function(){n=o.initSeries(t),o.isDirtyLegend=!0,o.linkSeries(),e&&o.redraw(i)})),n},addAxis:function(t,e,i,o){var r=e?"xAxis":"yAxis",s=this.options;t=f(t,{index:this[r].length,isX:e}),new n(this,t),s[r]=x(s[r]||{}),s[r].push(t),g(i,!0)&&this.redraw(o)},showLoading:function(t){var n=this,s=n.options,a=n.loadingDiv,l=s.loading,c=function(){a&&r(a,{left:n.plotLeft+"px",top:n.plotTop+"px",width:n.plotWidth+"px",height:n.plotHeight+"px"})};a||(n.loadingDiv=a=o("div",{className:"highcharts-loading highcharts-loading-hidden"},null,n.container),n.loadingSpan=o("span",{className:"highcharts-loading-inner"},null,a),e(n,"redraw",c)),a.className="highcharts-loading",n.loadingSpan.innerHTML=t||s.lang.loading,r(a,h(l.style,{zIndex:10})),r(n.loadingSpan,l.labelStyle),n.loadingShown||(r(a,{opacity:0,display:""}),i(a,{opacity:l.style.opacity||.5},{duration:l.showDuration||0})),n.loadingShown=!0,c()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",i(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){r(e,{display:"none"})}})),this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions".split(" "),update:function(t,e){var i,n,o,r={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},l=t.chart;if(l){f(!0,this.options.chart,l),"className"in l&&this.setClassName(l.className),("inverted"in l||"polar"in l)&&(this.propFromSeries(),n=!0);for(i in l)l.hasOwnProperty(i)&&(-1!==d("chart."+i,this.propsRequireUpdateSeries)&&(o=!0),-1!==d(i,this.propsRequireDirtyBox)&&(this.isDirtyBox=!0));"style"in l&&this.renderer.setStyle(l.style)}for(i in t)this[i]&&"function"==typeof this[i].update?this[i].update(t[i],!1):"function"==typeof this[r[i]]&&this[r[i]](t[i]),"chart"!==i&&-1!==d(i,this.propsRequireUpdateSeries)&&(o=!0);t.colors&&(this.options.colors=t.colors),t.plotOptions&&f(!0,this.options.plotOptions,t.plotOptions),a(["xAxis","yAxis","series"],function(e){t[e]&&a(x(t[e]),function(t){var i=s(t.id)&&this.get(t.id)||this[e][0];i&&i.coll===e&&i.update(t,!1)},this)},this),n&&a(this.axes,function(t){t.update({},!1)}),o&&a(this.series,function(t){t.update({},!1)}),t.loading&&f(!0,this.options.loading,t.loading),i=l&&l.width,l=l&&l.height,u(i)&&i!==this.chartWidth||u(l)&&l!==this.chartHeight?this.setSize(i,l):g(e,!0)&&this.redraw()},setSubtitle:function(t){this.setTitle(void 0,t)}}),h(m.prototype,{update:function(t,e,i,n){function o(){s.applyOptions(t),null===s.y&&l&&(s.graphic=l.destroy()),p(t,!0)&&(l&&l.element&&t&&t.marker&&t.marker.symbol&&(s.graphic=l.destroy()),t&&t.dataLabels&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),r=s.index,a.updateParallelArrays(s,r),c.data[r]=p(c.data[r],!0)?s.options:t,a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===c.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}var r,s=this,a=s.series,l=s.graphic,h=a.chart,c=a.options;e=g(e,!0),!1===n?o():s.firePointEvent("update",{options:t},o)},remove:function(t,e){this.series.removePoint(d(this,this.series.data),t,e)}}),h(v.prototype,{addPoint:function(t,e,i,n){var o,r,s,a,l=this.options,h=this.data,c=this.chart,d=this.xAxis&&this.xAxis.names,u=l.data,p=this.xData;if(e=g(e,!0),o={series:this},this.pointClass.prototype.applyOptions.apply(o,[t]),a=o.x,s=p.length,this.requireSorting&&a<p[s-1])for(r=!0;s&&p[s-1]>a;)s--;this.updateParallelArrays(o,"splice",s,0,0),this.updateParallelArrays(o,s),d&&o.name&&(d[a]=o.name),u.splice(s,0,t),r&&(this.data.splice(s,0,null),this.processData()),"point"===l.legendType&&this.generatePoints(),i&&(h[0]&&h[0].remove?h[0].remove(!1):(h.shift(),this.updateParallelArrays(o,"shift"),u.shift())),this.isDirtyData=this.isDirty=!0,e&&c.redraw(n)},removePoint:function(t,e,i){var n=this,o=n.data,r=o[t],s=n.points,a=n.chart,l=function(){s&&s.length===o.length&&s.splice(t,1),o.splice(t,1),n.options.data.splice(t,1),n.updateParallelArrays(r||{series:n},"splice",t,1),r&&r.destroy(),n.isDirty=!0,n.isDirtyData=!0,e&&a.redraw()};b(i,a),e=g(e,!0),r?r.firePointEvent("remove",null,l):l()},remove:function(t,e,i){function n(){o.destroy(),r.isDirtyLegend=r.isDirtyBox=!0,r.linkSeries(),g(t,!0)&&r.redraw(e)}var o=this,r=o.chart;!1!==i?c(o,"remove",null,n):n()},update:function(t,e){var i,n=this,o=this.chart,r=this.userOptions,s=this.type,l=t.type||r.type||o.options.chart.type,c=y[s].prototype,d=["group","markerGroup","dataLabelsGroup"];(l&&l!==s||void 0!==t.zIndex)&&(d.length=0),a(d,function(t){d[t]=n[t],delete n[t]}),t=f(r,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},t),this.remove(!1,null,!1);for(i in c)this[i]=void 0;h(this,y[l||s].prototype),a(d,function(t){n[t]=d[t]}),this.init(o,t),o.linkSeries(),g(e,!0)&&o.redraw(!1)}}),h(n.prototype,{update:function(t,e){var i=this.chart;t=i.options[this.coll][this.options.index]=f(this.userOptions,t),this.destroy(!0),this.init(i,h(t,{events:void 0})),i.isDirtyBox=!0,g(e,!0)&&i.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,n=this.series,o=n.length;o--;)n[o]&&n[o].remove(!1);l(e.axes,this),l(e[i],this),e.options[i].splice(this.options.index,1),a(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,g(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}})}(t),function(t){var e=t.color,i=t.each,n=t.map,o=t.pick,r=t.Series,s=t.seriesType;s("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var t,e,r,s=[],a=[],l=this.xAxis,h=this.yAxis,c=h.stacks[this.stackKey],d={},u=this.points,p=this.index,f=h.series,g=f.length,m=o(h.options.reversedStacks,!0)?1:-1;if(this.options.stacking){for(e=0;e<u.length;e++)d[u[e].x]=u[e];for(r in c)null!==c[r].total&&a.push(r);a.sort(function(t,e){return t-e}),t=n(f,function(){return this.visible}),i(a,function(n,o){var r,u,f=0;if(d[n]&&!d[n].isNull)s.push(d[n]),i([-1,1],function(i){var s=1===i?"rightNull":"leftNull",l=0,h=c[a[o+i]];if(h)for(e=p;0<=e&&e<g;)r=h.points[e],r||(e===p?d[n][s]=!0:t[e]&&(u=c[n].points[e])&&(l-=u[1]-u[0])),e+=m;d[n][1===i?"rightCliff":"leftCliff"]=l});else{for(e=p;0<=e&&e<g;){if(r=c[n].points[e]){f=r[1];break}e+=m}f=h.toPixels(f,!0),s.push({isNull:!0,plotX:l.toPixels(n,!0),plotY:f,yBottom:f})}})}return s},getGraphPath:function(t){var e,i,n,s,a=r.prototype.getGraphPath,l=this.options,h=l.stacking,c=this.yAxis,d=[],u=[],p=this.index,f=c.stacks[this.stackKey],g=l.threshold,m=c.getThreshold(l.threshold),l=l.connectNulls||"percent"===h,v=function(e,i,o){var r=t[e];e=h&&f[r.x].points[p];var s=r[o+"Null"]||0;o=r[o+"Cliff"]||0;var a,l,r=!0;o||s?(a=(s?e[0]:e[1])+o,l=e[0]+o,r=!!s):!h&&t[i]&&t[i].isNull&&(a=l=g),void 0!==a&&(u.push({plotX:n,plotY:null===a?m:c.getThreshold(a),isNull:r}),d.push({plotX:n,plotY:null===l?m:c.getThreshold(l),doCurve:!1}))};for(t=t||this.points,h&&(t=this.getStackPoints()),e=0;e<t.length;e++)i=t[e].isNull,n=o(t[e].rectPlotX,t[e].plotX),s=o(t[e].yBottom,m),(!i||l)&&(l||v(e,e-1,"left"),i&&!h&&l||(u.push(t[e]),d.push({x:e,plotX:n,plotY:s})),l||v(e,e+1,"right"));return e=a.call(this,u,!0,!0),d.reversed=!0,i=a.call(this,d,!0,!0),i.length&&(i[0]="L"),i=e.concat(i),a=a.call(this,u,!1,l),i.xMap=e.xMap,this.areaPath=i,a},drawGraph:function(){this.areaPath=[],r.prototype.drawGraph.apply(this);var t=this,n=this.areaPath,s=this.options,a=[["area","highcharts-area",this.color,s.fillColor]];i(this.zones,function(e,i){a.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+e.className,e.color||t.color,e.fillColor||s.fillColor])}),i(a,function(i){var r=i[0],a=t[r];a?(a.endX=n.xMap,a.animate({d:n})):(a=t[r]=t.chart.renderer.path(n).addClass(i[1]).attr({fill:o(i[3],e(i[2]).setOpacity(o(s.fillOpacity,.75)).get()),zIndex:0}).add(t.group),a.isArea=!0),a.startX=n.xMap,a.shiftUnit=s.step?2:1})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}(t),function(t){var e=t.pick;(t=t.seriesType)("spline","line",{},{getPointSpline:function(t,i,n){var o=i.plotX,r=i.plotY,s=t[n-1];n=t[n+1];var a,l,h,c;if(s&&!s.isNull&&!1!==s.doCurve&&n&&!n.isNull&&!1!==n.doCurve){t=s.plotY,h=n.plotX,n=n.plotY;var d=0;a=(1.5*o+s.plotX)/2.5,l=(1.5*r+t)/2.5,h=(1.5*o+h)/2.5,c=(1.5*r+n)/2.5,h!==a&&(d=(c-l)*(h-o)/(h-a)+r-c),l+=d,c+=d,l>t&&l>r?(l=Math.max(t,r),c=2*r-l):l<t&&l<r&&(l=Math.min(t,r),c=2*r-l),c>n&&c>r?(c=Math.max(n,r),l=2*r-c):c<n&&c<r&&(c=Math.min(n,r),l=2*r-c),i.rightContX=h,i.rightContY=c}return i=["C",e(s.rightContX,s.plotX),e(s.rightContY,s.plotY),e(a,o),e(l,r),o,r],s.rightContX=s.rightContY=null,i}})}(t),function(t){var e=t.seriesTypes.area.prototype,i=t.seriesType;i("areaspline","spline",t.defaultPlotOptions.area,{getStackPoints:e.getStackPoints,getGraphPath:e.getGraphPath,setStackCliffs:e.setStackCliffs,drawGraph:e.drawGraph,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle})}(t),function(t){var e=t.animObject,i=t.color,n=t.each,o=t.extend,r=t.isNumber,s=t.merge,a=t.pick,l=t.Series,h=t.seriesType,c=t.svg;
h("column","line",{borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:"#cccccc",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){l.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&n(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e=this,i=e.options,o=e.xAxis,r=e.yAxis,s=o.reversed,l={},h=0;!1===i.grouping?h=1:n(e.chart.series,function(i){var n,o=i.options,s=i.yAxis;i.type===e.type&&i.visible&&r.len===s.len&&r.pos===s.pos&&(o.stacking?(t=i.stackKey,void 0===l[t]&&(l[t]=h++),n=l[t]):!1!==o.grouping&&(n=h++),i.columnIndex=n)});var c=Math.min(Math.abs(o.transA)*(o.ordinalSlope||i.pointRange||o.closestPointRange||o.tickInterval||1),o.len),d=c*i.groupPadding,u=(c-2*d)/h,i=Math.min(i.maxPointWidth||o.len,a(i.pointWidth,u*(1-2*i.pointPadding)));return e.columnMetrics={width:i,offset:(u-i)/2+(d+((e.columnIndex||0)+(s?1:0))*u-c/2)*(s?-1:1)},e.columnMetrics},crispCol:function(t,e,i,n){var o=this.chart,r=this.borderWidth,s=-(r%2?.5:0),r=r%2?.5:1;return o.inverted&&o.renderer.isVML&&(r+=1),i=Math.round(t+i)+s,t=Math.round(t)+s,n=Math.round(e+n)+r,s=.5>=Math.abs(e)&&.5<n,e=Math.round(e)+r,n-=e,s&&n&&(--e,n+=1),{x:t,y:e,width:i-t,height:n}},translate:function(){var t=this,e=t.chart,i=t.options,o=t.dense=2>t.closestPointRange*t.xAxis.transA,o=t.borderWidth=a(i.borderWidth,o?0:1),r=t.yAxis,s=t.translatedThreshold=r.getThreshold(i.threshold),h=a(i.minPointLength,5),c=t.getColumnMetrics(),d=c.width,u=t.barW=Math.max(d,1+2*o),p=t.pointXOffset=c.offset;e.inverted&&(s-=.5),i.pointPadding&&(u=Math.ceil(u)),l.prototype.translate.apply(t),n(t.points,function(i){var n,o=a(i.yBottom,s),l=999+Math.abs(o),l=Math.min(Math.max(-l,i.plotY),r.len+l),c=i.plotX+p,f=u,g=Math.min(l,o),m=Math.max(l,o)-g;Math.abs(m)<h&&h&&(m=h,n=!r.reversed&&!i.negative||r.reversed&&i.negative,g=Math.abs(g-s)>h?o-h:s-(n?h:0)),i.barX=c,i.pointWidth=d,i.tooltipPos=e.inverted?[r.len+r.pos-e.plotLeft-l,t.xAxis.len-c-f/2,m]:[c+f/2,l+r.pos-e.plotTop,m],i.shapeType="rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[i.plotX,r.len/2,0,0]:[c,g,f,m])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var n,o=this.options,r=this.pointAttrToOptions||{};n=r.stroke||"borderColor";var s=r["stroke-width"]||"borderWidth",a=t&&t.color||this.color,l=t[n]||o[n]||this.color||a,h=t[s]||o[s]||this[s]||0,r=o.dashStyle;return t&&this.zones.length&&(a=(a=t.getZone())&&a.color||t.options.color||this.color),e&&(t=o.states[e],e=t.brightness,a=t.color||void 0!==e&&i(a).brighten(t.brightness).get()||a,l=t[n]||l,h=t[s]||h,r=t.dashStyle||r),n={fill:a,stroke:l,"stroke-width":h},o.borderRadius&&(n.r=o.borderRadius),r&&(n.dashstyle=r),n},drawPoints:function(){var t,e=this,i=this.chart,o=e.options,a=i.renderer,l=o.animationLimit||250;n(e.points,function(n){var h=n.graphic;r(n.plotY)&&null!==n.y?(t=n.shapeArgs,h?h[i.pointCount<l?"animate":"attr"](s(t)):n.graphic=h=a[n.shapeType](t).attr({"class":n.getClassName()}).add(n.group||e.group),h.attr(e.pointAttribs(n,n.selected&&"select")).shadow(o.shadow,null,o.stacking&&!o.borderRadius)):h&&(n.graphic=h.destroy())})},animate:function(t){var i=this,n=this.yAxis,r=i.options,s=this.chart.inverted,a={};c&&(t?(a.scaleY=.001,t=Math.min(n.pos+n.len,Math.max(n.pos,n.toPixels(r.threshold))),s?a.translateX=t-n.len:a.translateY=t,i.group.attr(a)):(a[s?"translateX":"translateY"]=n.pos,i.group.animate(a,o(e(i.options.animation),{step:function(t,e){i.group.attr({scaleY:Math.max(.001,e.pos)})}})),i.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&n(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),l.prototype.remove.apply(t,arguments)}})}(t),function(t){(t=t.seriesType)("bar","column",null,{inverted:!0})}(t),function(t){var e=t.Series;(t=t.seriesType)("scatter","line",{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 0.85em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&e.prototype.drawGraph.call(this)}})}(t),function(t){var e=t.pick,i=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t,n,o=this.options,r=this.chart,s=2*(o.slicedOffset||0),a=r.plotWidth-2*s,r=r.plotHeight-2*s,l=o.center,l=[e(l[0],"50%"),e(l[1],"50%"),o.size||"100%",o.innerSize||0],h=Math.min(a,r);for(t=0;4>t;++t)n=l[t],o=2>t||2===t&&/%$/.test(n),l[t]=i(n,[a,r,h,l[2]][t])+(o?s:0);return l[3]>l[2]&&(l[3]=l[2]),l}}}(t),function(t){var e=t.addEvent,i=t.defined,n=t.each,o=t.extend,r=t.inArray,s=t.noop,a=t.pick,l=t.Point,h=t.Series,c=t.seriesType,d=t.setAnimation;c("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:t.seriesTypes.column.prototype.pointAttribs,animate:function(t){var e=this,i=e.points,o=e.startAngleRad;t||(n(i,function(t){var i=t.graphic,n=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:o,end:o}),i.animate({r:n.r,start:n.start,end:n.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var t,e,i=0,n=this.points,o=n.length,r=this.options.ignoreHiddenPoint;for(t=0;t<o;t++)e=n[t],0>e.y&&(e.y=null),i+=r&&!e.visible?0:e.y;for(this.total=i,t=0;t<o;t++)e=n[t],e.percentage=0<i&&(e.visible||!r)?e.y/i*100:0,e.total=i},generatePoints:function(){h.prototype.generatePoints.call(this),this.updateTotals()},translate:function(t){this.generatePoints();var e,i,n,o,r,s=0,l=this.options,h=l.slicedOffset,c=h+(l.borderWidth||0),d=l.startAngle||0,u=this.startAngleRad=Math.PI/180*(d-90),d=(this.endAngleRad=Math.PI/180*(a(l.endAngle,d+360)-90))-u,p=this.points,f=l.dataLabels.distance,l=l.ignoreHiddenPoint,g=p.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=Math.asin(Math.min((e-t[1])/(t[2]/2+f),1)),t[0]+(i?-1:1)*Math.cos(n)*(t[2]/2+f)},o=0;o<g;o++)r=p[o],e=u+s*d,l&&!r.visible||(s+=r.percentage/100),i=u+s*d,r.shapeType="arc",r.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:Math.round(1e3*e)/1e3,end:Math.round(1e3*i)/1e3},n=(i+e)/2,n>1.5*Math.PI?n-=2*Math.PI:n<-Math.PI/2&&(n+=2*Math.PI),r.slicedTranslation={translateX:Math.round(Math.cos(n)*h),translateY:Math.round(Math.sin(n)*h)},e=Math.cos(n)*t[2]/2,i=Math.sin(n)*t[2]/2,r.tooltipPos=[t[0]+.7*e,t[1]+.7*i],r.half=n<-Math.PI/2||n>Math.PI/2?1:0,r.angle=n,c=Math.min(c,f/5),r.labelPos=[t[0]+e+Math.cos(n)*f,t[1]+i+Math.sin(n)*f,t[0]+e+Math.cos(n)*c,t[1]+i+Math.sin(n)*c,t[0]+e,t[1]+i,0>f?"center":r.half?"right":"left",n]},drawGraph:null,drawPoints:function(){var t,e,i,r,s=this,a=s.chart.renderer,l=s.options.shadow;l&&!s.shadowGroup&&(s.shadowGroup=a.g("shadow").add(s.group)),n(s.points,function(n){if(null!==n.y){e=n.graphic,r=n.shapeArgs,t=n.sliced?n.slicedTranslation:{};var h=n.shadowGroup;l&&!h&&(h=n.shadowGroup=a.g("shadow").add(s.shadowGroup)),h&&h.attr(t),i=s.pointAttribs(n,n.selected&&"select"),e?e.setRadialReference(s.center).attr(i).animate(o(r,t)):(n.graphic=e=a[n.shapeType](r).addClass(n.getClassName()).setRadialReference(s.center).attr(t).add(s.group),n.visible||e.attr({visibility:"hidden"}),e.attr(i).attr({"stroke-linejoin":"round"}).shadow(l,h))}})},searchPoint:s,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:t.CenteredSeriesMixin.getCenter,getSymbol:s},{init:function(){l.prototype.init.apply(this,arguments);var t,i=this;return i.name=a(i.name,"Slice"),t=function(t){i.slice("select"===t.type)},e(i,"select",t),e(i,"unselect",t),i},setVisible:function(t,e){var i=this,o=i.series,s=o.chart,l=o.options.ignoreHiddenPoint;e=a(e,l),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,o.options.data[r(i,o.data)]=i.options,n(["graphic","dataLabel","connector","shadowGroup"],function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&s.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),l&&(o.isDirty=!0),e&&s.redraw())},slice:function(t,e,n){var o=this.series;d(n,o.chart),a(e,!0),this.sliced=this.options.sliced=t=i(t)?t:!this.sliced,o.options.data[r(this,o.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)},haloPath:function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}})}(t),function(t){var e=t.addEvent,i=t.arrayMax,n=t.defined,o=t.each,r=t.extend,s=t.format,a=t.map,l=t.merge,h=t.noop,c=t.pick,d=t.relativeLength,u=t.Series,p=t.seriesTypes,f=t.stableSort;t.distribute=function(t,e){function i(t,e){return t.target-e.target}var n,r,s=!0,l=t,h=[];for(r=0,n=t.length;n--;)r+=t[n].size;if(r>e){for(f(t,function(t,e){return(e.rank||0)-(t.rank||0)}),r=n=0;r<=e;)r+=t[n].size,n++;h=t.splice(n-1,t.length)}for(f(t,i),t=a(t,function(t){return{size:t.size,targets:[t.target]}});s;){for(n=t.length;n--;)s=t[n],r=(Math.min.apply(0,s.targets)+Math.max.apply(0,s.targets))/2,s.pos=Math.min(Math.max(0,r-s.size/2),e-s.size);for(n=t.length,s=!1;n--;)0<n&&t[n-1].pos+t[n-1].size>t[n].pos&&(t[n-1].size+=t[n].size,t[n-1].targets=t[n-1].targets.concat(t[n].targets),t[n-1].pos+t[n-1].size>e&&(t[n-1].pos=e-t[n-1].size),t.splice(n,1),s=!0)}n=0,o(t,function(t){var e=0;o(t.targets,function(){l[n].pos=t.pos+e,e+=l[n].size,n++})}),l.push.apply(l,h),f(l,i)},u.prototype.drawDataLabels=function(){var t,i,a,h,d=this,u=d.options,p=u.dataLabels,f=d.points,g=d.hasRendered||0,m=c(p.defer,!0),v=d.chart.renderer;(p.enabled||d._hasPointLabels)&&(d.dlProcessOptions&&d.dlProcessOptions(p),h=d.plotGroup("dataLabelsGroup","data-labels",m&&!g?"hidden":"visible",p.zIndex||6),m&&(h.attr({opacity:+g}),g||e(d,"afterAnimate",function(){d.visible&&h.show(!0),h[u.animation?"animate":"attr"]({opacity:1},{duration:200})})),i=p,o(f,function(e){var o,f,g,m,y=e.dataLabel,b=e.connector,x=!0,w={};if(t=e.dlOptions||e.options&&e.options.dataLabels,o=c(t&&t.enabled,i.enabled)&&null!==e.y,y&&!o)e.dataLabel=y.destroy();else if(o){if(p=l(i,t),m=p.style,o=p.rotation,f=e.getLabelConfig(),a=p.format?s(p.format,f):p.formatter.call(f,p),m.color=c(p.color,m.color,d.color,"#000000"),y)n(a)?(y.attr({text:a}),x=!1):(e.dataLabel=y=y.destroy(),b&&(e.connector=b.destroy()));else if(n(a)){y={fill:p.backgroundColor,stroke:p.borderColor,"stroke-width":p.borderWidth,r:p.borderRadius||0,rotation:o,padding:p.padding,zIndex:1},"contrast"===m.color&&(w.color=p.inside||0>p.distance||u.stacking?v.getContrast(e.color||d.color):"#000000"),u.cursor&&(w.cursor=u.cursor);for(g in y)void 0===y[g]&&delete y[g];y=e.dataLabel=v[o?"text":"label"](a,0,-9999,p.shape,null,null,p.useHTML,null,"data-label").attr(y),y.addClass("highcharts-data-label-color-"+e.colorIndex+" "+(p.className||"")+(p.useHTML?"highcharts-tracker":"")),y.css(r(m,w)),y.add(h),y.shadow(p.shadow)}y&&d.alignDataLabel(e,y,p,null,x)}}))},u.prototype.alignDataLabel=function(t,e,i,n,o){var s,a=this.chart,l=a.inverted,h=c(t.plotX,-9999),d=c(t.plotY,-9999),u=e.getBBox(),p=i.rotation,f=i.align,g=this.visible&&(t.series.forceDL||a.isInsidePlot(h,Math.round(d),l)||n&&a.isInsidePlot(h,l?n.x+1:n.y+n.height-1,l)),m="justify"===c(i.overflow,"justify");g&&(s=i.style.fontSize,s=a.renderer.fontMetrics(s,e).b,n=r({x:l?a.plotWidth-d:h,y:Math.round(l?a.plotHeight-h:d),width:0,height:0},n),r(i,{width:u.width,height:u.height}),p?(m=!1,l=a.renderer.rotCorr(s,p),l={x:n.x+i.x+n.width/2+l.x,y:n.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height},e[o?"attr":"animate"](l).attr({align:f}),h=(p+720)%360,h=180<h&&360>h,"left"===f?l.y-=h?u.height:0:"center"===f?(l.x-=u.width/2,l.y-=u.height/2):"right"===f&&(l.x-=u.width,l.y-=h?0:u.height)):(e.align(i,null,n),l=e.alignAttr),m?this.justifyDataLabel(e,i,l,u,n,o):c(i.crop,!0)&&(g=a.isInsidePlot(l.x,l.y)&&a.isInsidePlot(l.x+u.width,l.y+u.height)),i.shape&&!p&&e.attr({anchorX:t.plotX,anchorY:t.plotY})),g||(e.attr({y:-9999}),e.placed=!1)},u.prototype.justifyDataLabel=function(t,e,i,n,o,r){var s,a,l=this.chart,h=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;s=i.x+d,0>s&&("right"===h?e.align="left":e.x=-s,a=!0),s=i.x+n.width-d,s>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-s,a=!0),s=i.y+d,0>s&&("bottom"===c?e.verticalAlign="top":e.y=-s,a=!0),s=i.y+n.height-d,s>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!r,t.align(e,null,o))},p.pie&&(p.pie.prototype.drawDataLabels=function(){var e,n,r,s,l,h,d,p,f,g,m=this,v=m.data,y=m.chart,b=m.options.dataLabels,x=c(b.connectorPadding,10),w=c(b.connectorWidth,1),T=y.plotWidth,k=y.plotHeight,C=b.distance,S=m.center,M=S[2]/2,A=S[1],E=0<C,L=[[],[]],P=[0,0,0,0];m.visible&&(b.enabled||m._hasPointLabels)&&(u.prototype.drawDataLabels.apply(m),o(v,function(t){t.dataLabel&&t.visible&&(L[t.half].push(t),t.dataLabel._pos=null)}),o(L,function(i,n){var o,c,u,v,w,E=i.length;if(E)for(m.sortByAngle(i,n-.5),0<C&&(o=Math.max(0,A-M-C),c=Math.min(A+M+C,y.plotHeight),u=a(i,function(t){if(t.dataLabel)return w=t.dataLabel.getBBox().height||21,{target:t.labelPos[1]-o+w/2,size:w,rank:t.y}}),t.distribute(u,c+w-o)),g=0;g<E;g++)e=i[g],l=e.labelPos,r=e.dataLabel,f=!1===e.visible?"hidden":"inherit",v=l[1],u?void 0===u[g].pos?f="hidden":(h=u[g].size,p=o+u[g].pos):p=v,d=b.justify?S[0]+(n?-1:1)*(M+C):m.getX(p<o+2||p>c-2?v:p,n),r._attr={visibility:f,align:l[6]},r._pos={x:d+b.x+({left:x,right:-x}[l[6]]||0),y:p+b.y-10},l.x=d,l.y=p,null===m.options.size&&(s=r.width,d-s<x?P[3]=Math.max(Math.round(s-d+x),P[3]):d+s>T-x&&(P[1]=Math.max(Math.round(d+s-T+x),P[1])),0>p-h/2?P[0]=Math.max(Math.round(-p+h/2),P[0]):p+h/2>k&&(P[2]=Math.max(Math.round(p+h/2-k),P[2])))}),0===i(P)||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),E&&w&&o(this.points,function(t){var e;n=t.connector,(r=t.dataLabel)&&r._pos&&t.visible?(f=r._attr.visibility,(e=!n)&&(t.connector=n=y.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex).add(m.dataLabelsGroup),n.attr({"stroke-width":w,stroke:b.connectorColor||t.color||"#666666"})),n[e?"attr":"animate"]({d:m.connectorPath(t.labelPos)}),n.attr("visibility",f)):n&&(t.connector=n.destroy())}))},p.pie.prototype.connectorPath=function(t){var e=t.x,i=t.y;return c(this.options.dataLabels.softConnector,!0)?["M",e+("left"===t[6]?5:-5),i,"C",e,i,2*t[2]-t[4],2*t[3]-t[5],t[2],t[3],"L",t[4],t[5]]:["M",e+("left"===t[6]?5:-5),i,"L",t[2],t[3],"L",t[4],t[5]]},p.pie.prototype.placeDataLabels=function(){o(this.points,function(t){var e=t.dataLabel;e&&t.visible&&((t=e._pos)?(e.attr(e._attr),e[e.moved?"animate":"attr"](t),e.moved=!0):e&&e.attr({y:-9999}))})},p.pie.prototype.alignDataLabel=h,p.pie.prototype.verifyDataLabelOverflow=function(t){var e,i,n=this.center,o=this.options,r=o.center,s=o.minSize||80;return null!==r[0]?e=Math.max(n[2]-Math.max(t[1],t[3]),s):(e=Math.max(n[2]-t[1]-t[3],s),n[0]+=(t[3]-t[1])/2),null!==r[1]?e=Math.max(Math.min(e,n[2]-Math.max(t[0],t[2])),s):(e=Math.max(Math.min(e,n[2]-t[0]-t[2]),s),n[1]+=(t[0]-t[2])/2),e<n[2]?(n[2]=e,n[3]=Math.min(d(o.innerSize||0,e),e),this.translate(n),this.drawDataLabels&&this.drawDataLabels()):i=!0,i}),p.column&&(p.column.prototype.alignDataLabel=function(t,e,i,n,o){var r=this.chart.inverted,s=t.series,a=t.dlBox||t.shapeArgs,h=c(t.below,t.plotY>c(this.translatedThreshold,s.yAxis.len)),d=c(i.inside,!!this.options.stacking);a&&(n=l(a),0>n.y&&(n.height+=n.y,n.y=0),a=n.y+n.height-s.yAxis.len,0<a&&(n.height-=a),r&&(n={x:s.yAxis.len-n.y-n.height,y:s.xAxis.len-n.x-n.width,width:n.height,height:n.width}),d||(r?(n.x+=h?0:n.width,n.width=0):(n.y+=h?n.height:0,n.height=0))),i.align=c(i.align,!r||d?"center":h?"right":"left"),i.verticalAlign=c(i.verticalAlign,r||d?"middle":h?"top":"bottom"),u.prototype.alignDataLabel.call(this,t,e,i,n,o)})}(t),function(t){var e=t.Chart,i=t.each,n=t.pick,o=t.addEvent;e.prototype.callbacks.push(function(t){function e(){var e=[];i(t.series,function(t){var o=t.options.dataLabels,r=t.dataLabelCollections||["dataLabel"];(o.enabled||t._hasPointLabels)&&!o.allowOverlap&&t.visible&&i(r,function(o){i(t.points,function(t){t[o]&&(t[o].labelrank=n(t.labelrank,t.shapeArgs&&t.shapeArgs.height),e.push(t[o]))})})}),t.hideOverlappingLabels(e)}e(),o(t,"redraw",e)}),e.prototype.hideOverlappingLabels=function(t){var e,n,o,r,s,a,l,h,c,d=t.length,u=function(t,e,i,n,o,r,s,a){return!(o>t+i||o+s<t||r>e+n||r+a<e)};for(n=0;n<d;n++)(e=t[n])&&(e.oldOpacity=e.opacity,e.newOpacity=1);for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),n=0;n<d;n++)for(o=t[n],e=n+1;e<d;++e)r=t[e],o&&r&&o.placed&&r.placed&&0!==o.newOpacity&&0!==r.newOpacity&&(s=o.alignAttr,a=r.alignAttr,l=o.parentGroup,h=r.parentGroup,c=2*(o.box?0:o.padding),s=u(s.x+l.translateX,s.y+l.translateY,o.width-c,o.height-c,a.x+h.translateX,a.y+h.translateY,r.width-c,r.height-c))&&((o.labelrank<r.labelrank?o:r).newOpacity=0);i(t,function(t){var e,i;t&&(i=t.newOpacity,t.oldOpacity!==i&&t.placed&&(i?t.show(!0):e=function(){t.hide()},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e)),t.isOld=!0)})}}(t),function(t){var e=t.addEvent,i=t.Chart,n=t.createElement,o=t.css,r=t.defaultOptions,s=t.defaultPlotOptions,a=t.each,l=t.extend,h=t.fireEvent,c=t.hasTouch,d=t.inArray,u=t.isObject,p=t.Legend,f=t.merge,g=t.pick,m=t.Point,v=t.Series,y=t.seriesTypes,b=t.svg;t=t.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=function(t){for(var i,n=t.target;n&&!i;)i=n.point,n=n.parentNode;void 0!==i&&i!==e.hoverPoint&&i.onMouseOver(t)};a(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.div?t.dataLabel.div.point=t:t.dataLabel.element.point=t)}),t._hasTracking||(a(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(t){i.onTrackerMouseOut(t)}),c&&t[e].on("touchstart",n),t.options.cursor&&t[e].css(o).css({cursor:t.options.cursor}))}),t._hasTracking=!0)},drawTrackerGraph:function(){var t,e=this,i=e.options,n=i.trackByArea,o=[].concat(n?e.areaPath:e.graphPath),r=o.length,s=e.chart,l=s.pointer,h=s.renderer,d=s.options.tooltip.snap,u=e.tracker,p=function(){s.hoverSeries!==e&&e.onMouseOver()},f="rgba(192,192,192,"+(b?1e-4:.002)+")";if(r&&!n)for(t=r+1;t--;)"M"===o[t]&&o.splice(t+1,0,o[t+1]-d,o[t+2],"L"),(t&&"M"===o[t]||t===r)&&o.splice(t,0,"L",o[t-2]+d,o[t-1]);u?u.attr({d:o}):e.graph&&(e.tracker=h.path(o).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:f,fill:n?f:"none","stroke-width":e.graph.strokeWidth()+(n?0:2*d),zIndex:2}).add(e.group),a([e.tracker,e.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(t){l.onTrackerMouseOut(t)}),i.cursor&&t.css({cursor:i.cursor}),c&&t.on("touchstart",p)}))}},y.column&&(y.column.prototype.drawTracker=t.drawTrackerPoint),y.pie&&(y.pie.prototype.drawTracker=t.drawTrackerPoint),y.scatter&&(y.scatter.prototype.drawTracker=t.drawTrackerPoint),l(p.prototype,{setItemEvents:function(t,e,i){var n=this,o=n.chart,r="highcharts-legend-"+(t.series?"point":"series")+"-active";(i?e:t.legendGroup).on("mouseover",function(){t.setState("hover"),o.seriesGroup.addClass(r),e.css(n.options.itemHoverStyle)}).on("mouseout",function(){e.css(t.visible?n.itemStyle:n.itemHiddenStyle),o.seriesGroup.removeClass(r),t.setState()}).on("click",function(e){var i=function(){t.setVisible&&t.setVisible()};e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):h(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=n("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),e(t.checkbox,"click",function(e){h(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),r.legend.itemStyle.cursor="pointer",l(i.prototype,{showResetZoom:function(){var t=this,e=r.lang,i=t.options.chart.resetZoomButton,n=i.theme,o=n.states,s="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,o&&o.hover).attr({align:i.position.align,title:e.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(i.position,!1,s)},zoomOut:function(){var t=this;h(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,i,n=this.pointer,o=!1;!t||t.resetSelection?a(this.axes,function(t){e=t.zoom()}):a(t.xAxis.concat(t.yAxis),function(t){var i=t.axis;n[i.isXAxis?"zoomX":"zoomY"]&&(e=i.zoom(t.min,t.max),i.displayBtn&&(o=!0))}),i=this.resetZoomButton,o&&!i?this.showResetZoom():!o&&u(i)&&(this.resetZoomButton=i.destroy()),e&&this.redraw(g(this.options.chart.animation,t&&t.animation,100>this.pointCount))},pan:function(t,e){var i,n=this,r=n.hoverPoints;r&&a(r,function(t){t.setState()}),a("xy"===e?[1,0]:[1],function(e){e=n[e?"xAxis":"yAxis"][0];var o=e.horiz,r=t[o?"chartX":"chartY"],o=o?"mouseDownX":"mouseDownY",s=n[o],a=(e.pointRange||0)/2,l=e.getExtremes(),h=e.toValue(s-r,!0)+a,a=e.toValue(s+e.len-r,!0)-a,c=a<h,s=c?a:h,h=c?h:a,a=Math.min(l.dataMin,l.min)-s,l=h-Math.max(l.dataMax,l.max);e.series.length&&0>a&&0>l&&(e.setExtremes(s,h,!1,!1,{trigger:"pan"}),i=!0),n[o]=r}),i&&n.redraw(!1),o(n.container,{cursor:"move"})}}),l(m.prototype,{select:function(t,e){var i=this,n=i.series,o=n.chart;t=g(t,!i.selected),i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[d(i,n.data)]=i.options,i.setState(t&&"select"),e||a(o.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[d(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t,e){var i=this.series,n=i.chart,o=n.tooltip,r=n.hoverPoint;this.series&&(e||(r&&r!==this&&r.onMouseOut(),n.hoverSeries!==i&&i.onMouseOver(),n.hoverPoint=this),!o||o.shared&&!i.noSharedTooltip?o||this.setState("hover"):(this.setState("hover"),o.refresh(this,t)),this.firePointEvent("mouseOver"))},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;this.firePointEvent("mouseOut"),e&&-1!==d(this,e)||(this.setState(),t.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var t,i=f(this.series.options.point,this.options).events;this.events=i;for(t in i)e(this,t,i[t]);this.hasImportedEvents=!0}},setState:function(t,e){var i,n=Math.floor(this.plotX),o=this.plotY,r=this.series,a=r.options.states[t]||{},h=s[r.type].marker&&r.options.marker,c=h&&!1===h.enabled,d=h&&h.states&&h.states[t]||{},u=!1===d.enabled,p=r.stateMarkerGraphic,f=this.marker||{},m=r.chart,v=r.halo,y=h&&r.markerAttribs;t=t||"",t===this.state&&!e||this.selected&&"select"!==t||!1===a.enabled||t&&(u||c&&!1===d.enabled)||t&&f.states&&f.states[t]&&!1===f.states[t].enabled||(y&&(i=r.markerAttribs(this,t)),this.graphic?(this.state&&this.graphic.removeClass("highcharts-point-"+this.state),t&&this.graphic.addClass("highcharts-point-"+t),this.graphic.attr(r.pointAttribs(this,t)),i&&this.graphic.animate(i,g(m.options.chart.animation,d.animation,h.animation)),p&&p.hide()):(t&&d&&(h=f.symbol||r.symbol,p&&p.currentSymbol!==h&&(p=p.destroy()),p?p[e?"animate":"attr"]({x:i.x,y:i.y}):h&&(r.stateMarkerGraphic=p=m.renderer.symbol(h,i.x,i.y,i.width,i.height).add(r.markerGroup),p.currentSymbol=h),p&&p.attr(r.pointAttribs(this,t))),p&&(p[t&&m.isInsidePlot(n,o,m.inverted)?"show":"hide"](),p.element.point=this)),(n=a.halo)&&n.size?(v||(r.halo=v=m.renderer.path().add(y?r.markerGroup:r.group)),v[e?"animate":"attr"]({d:this.haloPath(n.size)}),v.attr({"class":"highcharts-halo highcharts-color-"+g(this.colorIndex,r.colorIndex)}),v.point=this,v.attr(l({fill:this.color||r.color,"fill-opacity":n.opacity,zIndex:-1},n.attributes))):v&&v.point&&v.point.haloPath&&v.animate({d:v.point.haloPath(0)}),this.state=t)},haloPath:function(t){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-t,this.plotY-t,2*t,2*t)}}),l(v.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&h(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;e.hoverSeries=null,n&&n.onMouseOut(),this&&t.events.mouseOut&&h(this,"mouseOut"),!i||t.stickyTracking||i.shared&&!this.noSharedTooltip||i.hide(),this.setState()},setState:function(t){var e=this,i=e.options,n=e.graph,o=i.states,r=i.lineWidth,i=0;if(t=t||"",e.state!==t&&(a([e.group,e.markerGroup],function(i){i&&(e.state&&i.removeClass("highcharts-series-"+e.state),t&&i.addClass("highcharts-series-"+t))}),e.state=t,!o[t]||!1!==o[t].enabled)&&(t&&(r=o[t].lineWidth||r+(o[t].lineWidthPlus||0)),n&&!n.dashstyle))for(o={"stroke-width":r},n.attr(o);e["zone-graph-"+i];)e["zone-graph-"+i].attr(o),i+=1},setVisible:function(t,e){var i,n=this,o=n.chart,r=n.legendItem,s=o.options.chart.ignoreHiddenSeries,l=n.visible;i=(n.visible=t=n.options.visible=n.userOptions.visible=void 0===t?!l:t)?"show":"hide",a(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(t){n[t]&&n[t][i]()}),o.hoverSeries!==n&&(o.hoverPoint&&o.hoverPoint.series)!==n||n.onMouseOut(),r&&o.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&a(o.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),a(n.linkedSeries,function(e){e.setVisible(t,!1)}),s&&(o.isDirtyBox=!0),!1!==e&&o.redraw(),h(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),h(this,t?"select":"unselect")},drawTracker:t.drawTrackerGraph})}(t),function(t){var e=t.Chart,i=t.each,n=t.inArray,o=t.isObject,r=t.pick,s=t.splat;e.prototype.setResponsive=function(t){var e=this.options.responsive;e&&e.rules&&i(e.rules,function(e){this.matchResponsiveRule(e,t)},this)},e.prototype.matchResponsiveRule=function(e,i){var n,o=this.respRules,s=e.condition;n=s.callback||function(){return this.chartWidth<=r(s.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=r(s.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=r(s.minWidth,0)&&this.chartHeight>=r(s.minHeight,0)},void 0===e._id&&(e._id=t.uniqueKey()),n=n.call(this),!o[e._id]&&n?e.chartOptions&&(o[e._id]=this.currentOptions(e.chartOptions),this.update(e.chartOptions,i)):o[e._id]&&!n&&(this.update(o[e._id],i),delete o[e._id])},e.prototype.currentOptions=function(t){function e(t,i,r){var a,l;for(a in t)if(-1<n(a,["series","xAxis","yAxis"]))for(t[a]=s(t[a]),r[a]=[],l=0;l<t[a].length;l++)r[a][l]={},e(t[a][l],i[a][l],r[a][l]);else o(t[a])?(r[a]={},e(t[a],i[a]||{},r[a])):r[a]=i[a]||null}var i={};return e(t,this.options,i),i}}(t),t}),function(t){"use strict";function e(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Function}function n(t){return!i(t)&&t instanceof Object}function o(t,i){var r;for(r in i)n(i[r])||e(i[r])?(n(i[r])&&!n(t[r])&&(t[r]={}),e(i[r])&&!e(t[r])&&(t[r]=[]),o(t[r],i[r])):void 0!==i[r]&&(t[r]=i[r])}function r(t,e){var i={};return o(i,t),o(i,e),i}function s(t){var e,i,n,o,r,s,a,l,h,c,d;return c=Object.prototype.toString.call(t),"[object Date]"===c?t:"[object String]"===c?(n=t.match(Q),n?(d=parseInt(n[1],10),s=parseInt(n[3],10)-1,e=parseInt(n[5],10),i=parseInt(n[7],10),r=n[9]?parseInt(n[9],10):0,h=n[11]?parseInt(n[11],10):0,o=n[12]?1e3*parseFloat(Z+n[12].slice(1)):0,l=Date.UTC(d,s,e,i,r,h,o),n[13]&&n[14]&&(a=60*n[15],n[17]&&(a+=parseInt(n[17],10)),a*="-"===n[14]?-1:1,l-=60*a*1e3),new Date(l)):void 0):void 0}function a(t){var e,i,n;for(e=0;e<t.length;e++)for(n=t[e].data,i=0;i<n.length;i++)if(n[i][1]<0)return!0;return!1}function l(t,e,i,n,o,s,l,h){return function(c,d,u){var p=c.data,f=r({},t);return f=r(f,u||{}),(c.hideLegend||"legend"in d)&&e(f,d.legend,c.hideLegend),d.title&&i(f,d.title),"min"in d?n(f,d.min):a(p)||n(f,0),d.max&&o(f,d.max),"stacked"in d&&s(f,d.stacked),d.colors&&(f.colors=d.colors),d.xtitle&&l(f,d.xtitle),d.ytitle&&h(f,d.ytitle),f=r(f,d.library||{})}}function h(t,e){document.body.innerText?t.innerText=e:t.textContent=e}function c(t,e){h(t,"Error Loading Chart: "+e),t.style.color="#ff0000"}function d(t,e,i){rt.push([t,e,i]),u()}function u(){if(st<at){var t=rt.shift();t&&(st++,f(t[0],t[1],t[2]),u())}}function p(){st--,u()}function f(t,e,i){g(e,i,function(e,i,n){var o="string"==typeof n?n:n.message;c(t,o)})}function g(e,i,n){var o=t.jQuery||t.Zepto||t.$;if(o)o.ajax({dataType:"json",url:e,success:i,error:n,complete:p});else{var r=new XMLHttpRequest;r.open("GET",e,!0),r.setRequestHeader("Content-Type","application/json"),r.onload=function(){p(),200===r.status?i(JSON.parse(r.responseText),r.statusText,r):n(r,"error",r.statusText)},r.send()}}function m(t,e){try{e(t)}catch(e){throw c(t.element,e.message),e}}function v(t,e,i){"string"==typeof i?d(t.element,i,function(i){t.rawData=i,m(t,e)}):(t.rawData=i,m(t,e))}function y(t){var e=t.element,i=document.createElement("a");i.download=t.options.download===!0?"chart.png":t.options.download,i.style.position="absolute",i.style.top="20px",i.style.right="20px",i.style.zIndex=1e3,i.style.lineHeight="20px",i.target="_blank";var n=document.createElement("img");n.alt="Download",n.style.border="none",n.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",i.appendChild(n),e.style.position="relative",t.downloadAttached=!0,b(e,"mouseover",function(n){var o=n.relatedTarget;(!o||o!==this&&!x(this,o)&&t.options.download)&&(i.href=t.toImage(),e.appendChild(i))}),b(e,"mouseout",function(t){var e=t.relatedTarget;e&&(e===this||x(this,e))||i.parentNode&&i.parentNode.removeChild(i)})}function b(e,i,n){e.addEventListener?e.addEventListener(i,n,!1):e.attachEvent("on"+i,function(){return n.call(e,t.event)})}function x(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}function w(t){return""+t}function T(t){return parseFloat(t)}function k(t){var e,i,n,o;if("object"!=typeof t)if("number"==typeof t)t=new Date(1e3*t);else{if(e=t.match(ot))return i=parseInt(e[1],10),n=parseInt(e[3],10)-1,o=parseInt(e[5],10),new Date(i,n,o);var r=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=s(r)||new Date(t)}return t}function C(t){if(!e(t)){var i,n=[];for(i in t)t.hasOwnProperty(i)&&n.push([i,t[i]]);t=n}return t}function S(t,e){return t[0].getTime()-e[0].getTime()}function M(t,e){return t[0]-e[0]}function A(t,e){return t-e}function E(){!tt&&"Highcharts"in t&&(tt=new function(){var e=t.Highcharts;this.name="highcharts";var i={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},series:{marker:{}}}},n=function(t,e,i){void 0!==e?(t.legend.enabled=!!e,e&&e!==!0&&("top"===e||"bottom"===e?t.legend.verticalAlign=e:(t.legend.layout="vertical",t.legend.verticalAlign="middle",t.legend.align=e))):i&&(t.legend.enabled=!1)},o=function(t,e){t.title.text=e},s=function(t,e){t.yAxis.min=e;
},a=function(t,e){t.yAxis.max=e},h=function(t,e){t.plotOptions.series.stacking=e?"normal":null},c=function(t,e){t.xAxis.title.text=e},d=function(t,e){t.yAxis.title.text=e},u=l(i,n,o,s,a,h,c,d);this.renderLineChart=function(t,i){i=i||"spline";var n={};"areaspline"===i&&(n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),t.options.curve===!1&&("areaspline"===i?i="area":"spline"===i&&(i="line"));var o,r,s,a=u(t,t.options,n);a.xAxis.type=t.discrete?"category":"datetime",a.chart.type||(a.chart.type=i),a.chart.renderTo=t.element.id;var l=t.data;for(r=0;r<l.length;r++){if(o=l[r].data,!t.discrete)for(s=0;s<o.length;s++)o[s][0]=o[s][0].getTime();l[r].marker={symbol:"circle"},t.options.points===!1&&(l[r].marker.enabled=!1)}a.series=l,t.chart=new e.Chart(a)},this.renderScatterChart=function(t){var i={},n=u(t,t.options,i);n.chart.type="scatter",n.chart.renderTo=t.element.id,n.series=t.data,t.chart=new e.Chart(n)},this.renderPieChart=function(t){var s=r(i,{});t.options.colors&&(s.colors=t.options.colors),t.options.donut&&(s.plotOptions={pie:{innerSize:"50%"}}),"legend"in t.options&&n(s,t.options.legend),t.options.title&&o(s,t.options.title);var a=r(s,t.options.library||{});a.chart.renderTo=t.element.id,a.series=[{type:"pie",name:t.options.label||"Value",data:t.data}],t.chart=new e.Chart(a)},this.renderColumnChart=function(t,i){i=i||"column";var n,o,r,s,a=t.data,l=u(t,t.options),h=[],c=[];for(l.chart.type=i,l.chart.renderTo=t.element.id,n=0;n<a.length;n++)for(r=a[n],o=0;o<r.data.length;o++)s=r.data[o],h[s[0]]||(h[s[0]]=new Array(a.length),c.push(s[0])),h[s[0]][n]=s[1];"number"===t.options.xtype&&c.sort(A),l.xAxis.categories=c;var d=[];for(n=0;n<a.length;n++){for(s=[],o=0;o<c.length;o++)s.push(h[c[o]][n]||0);d.push({name:a[n].name,data:s})}l.series=d,t.chart=new e.Chart(l)};var p=this;this.renderBarChart=function(t){p.renderColumnChart(t,"bar")},this.renderAreaChart=function(t){p.renderLineChart(t,"areaspline")}},nt.push(tt)),!J&&t.google&&(t.google.setOnLoadCallback||t.google.charts)&&(J=new function(){var e=t.google;this.name="google";var i={},n=[],o=function(){for(var t,i,o=0;o<n.length;o++)t=n[o],i=e.visualization&&("corechart"===t.pack&&e.visualization.LineChart||"timeline"===t.pack&&e.visualization.Timeline),i&&(t.callback(),n.splice(o,1),o--)},s=function(r,s){if(s||(s=r,r="corechart"),n.push({pack:r,callback:s}),i[r])o();else{i[r]=!0;var a={packages:[r],callback:o};it.language&&(a.language=it.language),"corechart"===r&&it.mapsApiKey&&(a.mapsApiKey=it.mapsApiKey),t.google.setOnLoadCallback?e.load("visualization","1",a):e.charts.load("current",a)}},a={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},h=function(t,e,i){if(void 0!==e){var n;n=e?e===!0?"right":e:"none",t.legend.position=n}else i&&(t.legend.position="none")},c=function(t,e){t.title=e,t.titleTextStyle={color:"#333",fontSize:"20px"}},d=function(t,e){t.vAxis.viewWindow.min=e},u=function(t,e){t.vAxis.viewWindow.max=e},p=function(t,e){t.hAxis.viewWindow.min=e},f=function(t,e){t.hAxis.viewWindow.max=e},g=function(t,e){t.isStacked=!!e},m=function(t,e){t.hAxis.title=e,t.hAxis.titleTextStyle.italic=!1},v=function(t,e){t.vAxis.title=e,t.vAxis.titleTextStyle.italic=!1},y=l(a,h,c,d,u,g,m,v),b=function(t,i,n){var o,r,s,a,l,h=[],c=[];for(o=0;o<t.length;o++)for(s=t[o],r=0;r<s.data.length;r++)a=s.data[r],l="datetime"===i?a[0].getTime():a[0],h[l]||(h[l]=new Array(t.length),c.push(l)),h[l][o]=T(a[1]);for(var d,u=[],p=!0,r=0;r<c.length;r++){var o=c[r];"datetime"===i?(d=new Date(T(o)),p=p&&O(d)):d="number"===i?T(o):o,u.push([d].concat(h[o]))}if("datetime"===i?u.sort(S):"number"===i&&u.sort(M),"number"===n){u.sort(M);for(var o=0;o<u.length;o++)u[o][0]=w(u[o][0])}var f=new e.visualization.DataTable;for(i="datetime"===i&&p?"date":i,f.addColumn(i,""),o=0;o<t.length;o++)f.addColumn("number",t[o].name);return f.addRows(u),f},x=function(e){t.attachEvent?t.attachEvent("onresize",e):t.addEventListener&&t.addEventListener("resize",e,!0),e()};this.renderLineChart=function(t){s(function(){var i={};t.options.curve===!1&&(i.curveType="none"),t.options.points===!1&&(i.pointSize=0);var n=y(t,t.options,i),o=t.discrete?"string":"datetime";"number"===t.options.xtype&&(o="number");var r=b(t.data,o);t.chart=new e.visualization.LineChart(t.element),x(function(){t.chart.draw(r,n)})})},this.renderPieChart=function(t){s(function(){var i={chartArea:{top:"10%",height:"80%"},legend:{}};t.options.colors&&(i.colors=t.options.colors),t.options.donut&&(i.pieHole=.5),"legend"in t.options&&h(i,t.options.legend),t.options.title&&c(i,t.options.title);var n=r(r(a,i),t.options.library||{}),o=new e.visualization.DataTable;o.addColumn("string",""),o.addColumn("number","Value"),o.addRows(t.data),t.chart=new e.visualization.PieChart(t.element),x(function(){t.chart.draw(o,n)})})},this.renderColumnChart=function(t){s(function(){var i=y(t,t.options),n=b(t.data,"string",t.options.xtype);t.chart=new e.visualization.ColumnChart(t.element),x(function(){t.chart.draw(n,i)})})},this.renderBarChart=function(t){s(function(){var i={hAxis:{gridlines:{color:"#ccc"}}},n=l(a,h,c,p,f,g,m,v)(t,t.options,i),o=b(t.data,"string",t.options.xtype);t.chart=new e.visualization.BarChart(t.element),x(function(){t.chart.draw(o,n)})})},this.renderAreaChart=function(t){s(function(){var i={isStacked:!0,pointSize:0,areaOpacity:.5},n=y(t,t.options,i),o=t.discrete?"string":"datetime";"number"===t.options.xtype&&(o="number");var r=b(t.data,o);t.chart=new e.visualization.AreaChart(t.element),x(function(){t.chart.draw(r,n)})})},this.renderGeoChart=function(t){s(function(){var i={legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}},n=r(r(a,i),t.options.library||{}),o=new e.visualization.DataTable;o.addColumn("string",""),o.addColumn("number",t.options.label||"Value"),o.addRows(t.data),t.chart=new e.visualization.GeoChart(t.element),x(function(){t.chart.draw(o,n)})})},this.renderScatterChart=function(t){s(function(){var i,n,o,r,s={},a=y(t,t.options,s),l=t.data,h=[];for(i=0;i<l.length;i++)for(r=l[i].data,n=0;n<r.length;n++){var c=new Array(l.length+1);c[0]=r[n][0],c[i+1]=r[n][1],h.push(c)}var o=new e.visualization.DataTable;for(o.addColumn("number",""),i=0;i<l.length;i++)o.addColumn("number",l[i].name);o.addRows(h),t.chart=new e.visualization.ScatterChart(t.element),x(function(){t.chart.draw(o,a)})})},this.renderTimeline=function(t){s("timeline",function(){var i={legend:"none"};t.options.colors&&(i.colors=t.options.colors);var n=r(r(a,i),t.options.library||{}),o=new e.visualization.DataTable;o.addColumn({type:"string",id:"Name"}),o.addColumn({type:"date",id:"Start"}),o.addColumn({type:"date",id:"End"}),o.addRows(t.data),t.element.style.lineHeight="normal",t.chart=new e.visualization.Timeline(t.element),x(function(){t.chart.draw(o,n)})})}},nt.push(J)),!et&&"Chart"in t&&(et=new function(){var e=t.Chart;this.name="chartjs";var i={maintainAspectRatio:!1,animation:!1,tooltips:{displayColors:!1},legend:{},title:{fontSize:20,fontColor:"#333"}},n={scales:{yAxes:[{ticks:{maxTicksLimit:4},scaleLabel:{fontSize:16,fontColor:"#333"}}],xAxes:[{gridLines:{drawOnChartArea:!1},scaleLabel:{fontSize:16,fontColor:"#333"},time:{},ticks:{}}]}},o=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],s=function(t,e,i){void 0!==e?(t.legend.display=!!e,e&&e!==!0&&(t.legend.position=e)):i&&(t.legend.display=!1)},a=function(t,e){t.title.display=!0,t.title.text=e},h=function(t,e){null!==e&&(t.scales.yAxes[0].ticks.min=T(e))},c=function(t,e){t.scales.yAxes[0].ticks.max=T(e)},d=function(t,e){null!==e&&(t.scales.xAxes[0].ticks.min=T(e))},u=function(t,e){t.scales.xAxes[0].ticks.max=T(e)},p=function(t,e){t.scales.xAxes[0].stacked=!!e,t.scales.yAxes[0].stacked=!!e},f=function(t,e){t.scales.xAxes[0].scaleLabel.display=!0,t.scales.xAxes[0].scaleLabel.labelString=e},g=function(t,e){t.scales.yAxes[0].scaleLabel.display=!0,t.scales.yAxes[0].scaleLabel.labelString=e},m=function(t,i,n,o){t.chart?t.chart.destroy():t.element.innerHTML="<canvas></canvas>";var r=t.element.getElementsByTagName("CANVAS")[0];t.chart=new e(r,{type:i,data:n,options:o})},v=function(t,e){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?"rgba("+parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16)+", "+e+")":t},y=function(t,e,i){var n=Math.ceil(t.element.offsetWidth/4/e.labels.length);n>25&&(n=25),i.scales.xAxes[0].ticks.callback=function(t){return t=w(t),t.length>n?t.substring(0,n-2)+"...":t}},b=l(r(i,n),s,a,h,c,p,f,g),x=function(t,e,i){var n,s,a,l,h,c,d=[],u=[],p=t.options.colors||o,f=!0,g=!0,m=!0,y=!0,b=!0,x=!0,w=("line"===i||"area"===i)&&!t.discrete,k=t.data,C=[],S=[];for(s=0;s<k.length;s++)for(l=k[s],a=0;a<l.data.length;a++)h=l.data[a],c=w?h[0].getTime():h[0],S[c]||(S[c]=new Array(k.length)),S[c][s]=T(h[1]),C.indexOf(c)===-1&&C.push(c);(w||"number"===t.options.xtype)&&C.sort(A);var M=[];for(a=0;a<k.length;a++)M.push([]);var E,L;for(L=0;L<C.length;L++)for(s=C[L],w?(E=new Date(T(s)),f=f&&O(E),n||(n=E.getDay()),g=g&&N(E,n),m=m&&R(E),y=y&&z(E),b=b&&I(E),x=x&&D(E)):E=s,u.push(E),a=0;a<k.length;a++)M[a].push(void 0===S[s][a]?null:S[s][a]);for(s=0;s<k.length;s++){l=k[s];var P=l.color||p[s],$="line"!==i?v(P,.5):P,H={label:l.name,data:M[s],fill:"area"===i,borderColor:P,backgroundColor:$,pointBackgroundColor:P,borderWidth:2};t.options.curve===!1&&(H.lineTension=0),t.options.points===!1&&(H.pointRadius=0,H.pointHitRadius=5),d.push(r(H,l.library||{}))}if(w&&u.length>0){var B=u[0].getTime(),j=u[0].getTime();for(s=1;s<u.length;s++)E=u[s].getTime(),E<B&&(B=E),E>j&&(j=E);var W=(j-B)/864e5;if(!e.scales.xAxes[0].time.unit){var F;if(y||W>3650?(e.scales.xAxes[0].time.unit="year",F=365):m||W>300?(e.scales.xAxes[0].time.unit="month",F=30):f||W>10?(e.scales.xAxes[0].time.unit="day",F=1):b||W>.5?(e.scales.xAxes[0].time.displayFormats={hour:"MMM D, h a"},e.scales.xAxes[0].time.unit="hour",F=1/24):x&&(e.scales.xAxes[0].time.displayFormats={minute:"h:mm a"},e.scales.xAxes[0].time.unit="minute",F=1/24/60),F&&W>0){var q=Math.ceil(W/F/(t.element.offsetWidth/100));g&&1===F&&(q=7*Math.ceil(q/7)),e.scales.xAxes[0].time.unitStepSize=q}}e.scales.xAxes[0].time.tooltipFormat||(f?e.scales.xAxes[0].time.tooltipFormat="ll":b?e.scales.xAxes[0].time.tooltipFormat="MMM D, h a":x&&(e.scales.xAxes[0].time.tooltipFormat="h:mm a"))}var G={labels:u,datasets:d};return G};this.renderLineChart=function(t,e){if("number"===t.options.xtype)return k.renderScatterChart(t,e,!0);var i={};!t.options.max&&H(t.data)&&(i.max=1);var n=b(t,r(i,t.options)),o=x(t,n,e||"line");n.scales.xAxes[0].type=t.discrete?"category":"time",m(t,"line",o,n)},this.renderPieChart=function(t){var e=r({},i);t.options.donut&&(e.cutoutPercentage=50),"legend"in t.options&&s(e,t.options.legend),t.options.title&&a(e,t.options.title),e=r(e,t.options.library||{});for(var n=[],l=[],h=0;h<t.data.length;h++){var c=t.data[h];n.push(c[0]),l.push(c[1])}var d={labels:n,datasets:[{data:l,backgroundColor:t.options.colors||o}]};m(t,"pie",d,e)},this.renderColumnChart=function(t,e){var o;o="bar"===e?l(r(i,n),s,a,d,u,p,f,g)(t,t.options):b(t,t.options);var h=x(t,o,"column");y(t,h,o),m(t,"bar"===e?"horizontalBar":"bar",h,o)};var k=this;this.renderAreaChart=function(t){k.renderLineChart(t,"area")},this.renderBarChart=function(t){k.renderColumnChart(t,"bar")},this.renderScatterChart=function(t,e,i){e=e||"line";for(var n=b(t,t.options),r=t.options.colors||o,s=[],a=t.data,l=0;l<a.length;l++){for(var h=a[l],c=[],d=0;d<h.data.length;d++){var u={x:T(h.data[d][0]),y:T(h.data[d][1])};"bubble"===e&&(u.r=T(h.data[d][2])),c.push(u)}var p=h.color||r[l],f="area"===e?v(p,.5):p;s.push({label:h.name,showLine:i||!1,data:c,borderColor:p,backgroundColor:f,pointBackgroundColor:p,fill:"area"===e})}"area"===e&&(e="line");var g={datasets:s};n.scales.xAxes[0].type="linear",n.scales.xAxes[0].position="bottom",m(t,e,g,n)},this.renderBubbleChart=function(t){this.renderScatterChart(t,"bubble")}},nt.unshift(et))}function L(t,e){P(t,e),e.options.download&&!e.downloadAttached&&"chartjs"===e.adapter&&y(e)}function P(t,e){var n,o,r,s;for(r="render"+t,s=e.options.adapter,E(),n=0;n<nt.length;n++)if(o=nt[n],(!s||s===o.name)&&i(o[r]))return e.adapter=o.name,o[r](e);throw new Error("No adapter found")}function D(t){return 0===t.getMilliseconds()&&0===t.getSeconds()}function I(t){return D(t)&&0===t.getMinutes()}function O(t){return I(t)&&0===t.getHours()}function N(t,e){return O(t)&&t.getDay()===e}function R(t){return O(t)&&1===t.getDate()}function z(t){return R(t)&&0===t.getMonth()}function $(t){return!isNaN(k(t))&&w(t).length>=6}function H(t){var e,i,n;for(e=0;e<t.length;e++)for(n=t[e].data,i=0;i<n.length;i++)if(0!=n[i][1])return!1;return!0}function B(t){var e,i,n;for(e=0;e<t.length;e++)for(n=C(t[e].data),i=0;i<n.length;i++)if(!$(n[i][0]))return!0;return!1}function j(t,i){var n,o=t.options,r=t.rawData;for(!e(r)||"object"!=typeof r[0]||e(r[0])?(r=[{name:o.label||"Value",data:r}],t.hideLegend=!0):t.hideLegend=!1,null!==o.discrete&&void 0!==o.discrete||"bubble"===i||"number"===i?t.discrete=o.discrete:t.discrete=B(r),t.discrete&&(i="string"),t.options.xtype&&(i=t.options.xtype),n=0;n<r.length;n++)r[n].data=ht(C(r[n].data),i);return r}function W(t){var e,i=C(t.rawData);for(e=0;e<i.length;e++)i[e]=[w(i[e][0]),T(i[e][1])];return i}function F(t){var e,i=t.rawData;for(e=0;e<i.length;e++)i[e][1]=k(i[e][1]),i[e][2]=k(i[e][2]);return i}function q(t){return j(t,"datetime")}function G(t){return j(t,"string")}function X(t){return j(t,"string")}function _(t){return j(t,"datetime")}function U(t){return j(t,"number")}function V(t){return j(t,"bubble")}function Y(t,e,i,n,o,s){var a;if("string"==typeof i&&(a=i,i=document.getElementById(i),!i))throw new Error("No element with id "+a);e.element=i,o=r(K.options,o||{}),e.options=o,e.dataSource=n,s||(s=function(t){return t.rawData}),e.getElement=function(){return i},e.getDataSource=function(){return e.dataSource},e.getData=function(){return e.data},e.getOptions=function(){return e.options},e.getChartObject=function(){return e.chart},e.getAdapter=function(){return e.adapter};var l=function(){e.data=s(e),L(t,e)};e.updateData=function(t,i){e.dataSource=t,i&&(e.options=r(K.options,i)),v(e,l,t)},e.setOptions=function(t){e.options=r(K.options,t),e.redraw()},e.redraw=function(){v(e,l,e.rawData)},e.refreshData=function(){if("string"==typeof n){var t=n.indexOf("?")===-1?"?":"&",i=n+t+"_="+(new Date).getTime();v(e,l,i)}},e.stopRefresh=function(){e.intervalId&&clearInterval(e.intervalId)},e.toImage=function(){return"chartjs"===e.adapter?e.chart.toBase64Image():null},K.charts[i.id]=e,v(e,l,n),o.refresh&&(e.intervalId=setInterval(function(){e.refreshData()},1e3*o.refresh))}var K,Q,Z,J,tt,et,it=t.Chartkick||{},nt=[],ot=/^(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)$/i,rt=[],st=0,at=4;Q=/(\d\d\d\d)(\-)?(\d\d)(\-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([\.,]\d+)?($|Z|([\+\-])(\d\d)(:)?(\d\d)?)/i,Z=String(1.5).charAt(1);var lt=function(t,e){return t="number"===e?T(t):"datetime"===e?k(t):w(t)},ht=function(t,e){var i,n,o=[];for(n=0;n<t.length;n++)"bubble"===e?o.push([T(t[n][0]),T(t[n][1]),T(t[n][2])]):(i=lt(t[n][0],e),o.push([i,T(t[n][1])]));return"datetime"===e?o.sort(S):"number"===e&&o.sort(M),o};K={LineChart:function(t,e,i){Y("LineChart",this,t,e,i,q)},PieChart:function(t,e,i){Y("PieChart",this,t,e,i,W)},ColumnChart:function(t,e,i){Y("ColumnChart",this,t,e,i,G)},BarChart:function(t,e,i){Y("BarChart",this,t,e,i,X)},AreaChart:function(t,e,i){Y("AreaChart",this,t,e,i,_)},GeoChart:function(t,e,i){Y("GeoChart",this,t,e,i,W)},ScatterChart:function(t,e,i){Y("ScatterChart",this,t,e,i,U)},BubbleChart:function(t,e,i){Y("BubbleChart",this,t,e,i,V)},Timeline:function(t,e,i){Y("Timeline",this,t,e,i,F)},charts:{},configure:function(t){for(var e in t)t.hasOwnProperty(e)&&(it[e]=t[e])},eachChart:function(t){for(var e in K.charts)K.charts.hasOwnProperty(e)&&t(K.charts[e])},options:{},adapters:nt,createChart:Y},"object"==typeof module&&"object"==typeof module.exports?module.exports=K:t.Chartkick=K}(window),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var s=t("#"===r?[]:r);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.7",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new i(this,r)),"number"==typeof e?o.to(e):s?o[s]():r.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(i+o)%this.$items.length;return this.$items.eq(r)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),s=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var h=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:h,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var u=t.Event("slid.bs.carousel",{relatedTarget:h,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(u)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(i){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),e.call(r,s),a&&r.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||i.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),s=r.data("bs.collapse"),a=s?"toggle":o.data();i.call(r,a)})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",r)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.7",s.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),s=r.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),s=o.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&h<l.length-1&&h++,~h||(h=0),l.eq(h).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,s.prototype.toggle).on("keydown.bs.dropdown.data-api",r,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data("bs.modal",r=new i(this,s)),"string"==typeof e?r[e](n):s.show&&r.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),o&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});o?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(r)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal");
},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),o=n.attr("href"),r=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),n.data());n.is("a")&&i.preventDefault(),r.one("show.bs.modal",function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(r,s,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tab");o||n.data("bs.tab",o=new i(this)),"string"==typeof e&&o[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=i.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(r),e.trigger(s),!s.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},i.prototype.activate=function(e,n,o){function r(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=n.find("> .active"),a=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(i.TRANSITION_DURATION):r(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.7",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return o<i&&"top";if("bottom"==this.affixed)return null!=i?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-n)&&"bottom";var a=null==this.affixed,l=a?o:r.top,h=a?s:e;return null!=i&&o<=i?"top":null!=n&&l+h>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),+function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof i&&o[i]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[i]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)s!=r[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tooltip"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.tooltip",o=new i(this,r)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue())return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(a);h&&(a=a.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=r[0].offsetWidth,u=r[0].offsetHeight;if(h){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+u>f.bottom?"top":"top"==a&&c.top-u<f.top?"bottom":"right"==a&&c.right+d>f.width?"left":"left"==a&&c.left-d<f.left?"right":a,r.removeClass(p).addClass(a)}var g=this.getCalculatedOffset(a,c,d,u);this.applyPlacement(g,a);var m=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(i.TRANSITION_DURATION):m()}},i.prototype.applyPlacement=function(e,i){var n=this.tip(),o=n[0].offsetWidth,r=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,h=n[0].offsetHeight;"top"==i&&h!=r&&(e.top=e.top+r-h);var c=this.getViewportAdjustedDelta(i,e,l,h);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(i),u=d?2*c.left-o+l:2*c.top-r+h,p=d?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(u,n[0][p],d)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function n(){"in"!=o.hoverState&&r.detach(),o.$element&&o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),e&&e()}var o=this,r=t(this.$tip),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n(),this.hoverState=null,this},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName,o=i.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&i instanceof window.SVGElement,s=n?{top:0,left:0}:r?null:e.offset(),a={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,s)},i.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,l=e.top+r-s.scroll+n;a<s.top?o.top=s.top-a:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var h=e.left-r,c=e.left+r+i;h<s.left?o.left=s.left-h:c>s.right&&(o.left=s.left+s.width-c)}return o},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new i(this,r)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.7",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e=!!t&&"length"in t&&t.length,i=pt.type(t);return"function"!==i&&!pt.isWindow(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t,e,i){if(pt.isFunction(e))return pt.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return pt.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(kt.test(e))return pt.filter(e,t,i);e=pt.filter(e,t)}return pt.grep(t,function(t){return pt.inArray(t,e)>-1!==i})}function o(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function r(t){var e={};return pt.each(t.match(Lt)||[],function(t,i){e[i]=!0}),e}function s(){nt.addEventListener?(nt.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(nt.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(nt.addEventListener||"load"===t.event.type||"complete"===nt.readyState)&&(s(),pt.ready())}function l(t,e,i){if(void 0===i&&1===t.nodeType){var n="data-"+e.replace(Nt,"-$1").toLowerCase();if(i=t.getAttribute(n),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Ot.test(i)?pt.parseJSON(i):i)}catch(t){}pt.data(t,e,i)}else i=void 0}return i}function h(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,i,n){if(It(t)){var o,r,s=pt.expando,a=t.nodeType,l=a?pt.cache:t,h=a?t[s]:t[s]&&s;if(h&&l[h]&&(n||l[h].data)||void 0!==i||"string"!=typeof e)return h||(h=a?t[s]=it.pop()||pt.guid++:s),l[h]||(l[h]=a?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(n?l[h]=pt.extend(l[h],e):l[h].data=pt.extend(l[h].data,e)),r=l[h],n||(r.data||(r.data={}),r=r.data),void 0!==i&&(r[pt.camelCase(e)]=i),"string"==typeof e?(o=r[e],null==o&&(o=r[pt.camelCase(e)])):o=r,o}}function d(t,e,i){if(It(t)){var n,o,r=t.nodeType,s=r?pt.cache:t,a=r?t[pt.expando]:pt.expando;if(s[a]){if(e&&(n=i?s[a]:s[a].data)){pt.isArray(e)?e=e.concat(pt.map(e,pt.camelCase)):e in n?e=[e]:(e=pt.camelCase(e),e=e in n?[e]:e.split(" ")),o=e.length;for(;o--;)delete n[e[o]];if(i?!h(n):!pt.isEmptyObject(n))return}(i||(delete s[a].data,h(s[a])))&&(r?pt.cleanData([t],!0):dt.deleteExpando||s!=s.window?delete s[a]:s[a]=void 0)}}}function u(t,e,i,n){var o,r=1,s=20,a=n?function(){return n.cur()}:function(){return pt.css(t,e,"")},l=a(),h=i&&i[3]||(pt.cssNumber[e]?"":"px"),c=(pt.cssNumber[e]||"px"!==h&&+l)&&zt.exec(pt.css(t,e));if(c&&c[3]!==h){h=h||c[3],i=i||[],c=+l||1;do r=r||".5",c/=r,pt.style(t,e,c+h);while(r!==(r=a()/l)&&1!==r&&--s)}return i&&(c=+c||+l||0,o=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=h,n.start=c,n.end=o)),o}function p(t){var e=Gt.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){var i,n,o=0,r="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!r)for(r=[],i=t.childNodes||t;null!=(n=i[o]);o++)!e||pt.nodeName(n,e)?r.push(n):pt.merge(r,f(n,e));return void 0===e||e&&pt.nodeName(t,e)?pt.merge([t],r):r}function g(t,e){for(var i,n=0;null!=(i=t[n]);n++)pt._data(i,"globalEval",!e||pt._data(e[n],"globalEval"))}function m(t){jt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,i,n,o){for(var r,s,a,l,h,c,d,u=t.length,v=p(e),y=[],b=0;b<u;b++)if(s=t[b],s||0===s)if("object"===pt.type(s))pt.merge(y,s.nodeType?[s]:s);else if(_t.test(s)){for(l=l||v.appendChild(e.createElement("div")),h=(Wt.exec(s)||["",""])[1].toLowerCase(),d=Xt[h]||Xt._default,l.innerHTML=d[1]+pt.htmlPrefilter(s)+d[2],r=d[0];r--;)l=l.lastChild;if(!dt.leadingWhitespace&&qt.test(s)&&y.push(e.createTextNode(qt.exec(s)[0])),!dt.tbody)for(s="table"!==h||Ut.test(s)?"<table>"!==d[1]||Ut.test(s)?0:l:l.firstChild,r=s&&s.childNodes.length;r--;)pt.nodeName(c=s.childNodes[r],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(pt.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(s));for(l&&v.removeChild(l),dt.appendChecked||pt.grep(f(y,"input"),m),b=0;s=y[b++];)if(n&&pt.inArray(s,n)>-1)o&&o.push(s);else if(a=pt.contains(s.ownerDocument,s),l=f(v.appendChild(s),"script"),a&&g(l),i)for(r=0;s=l[r++];)Ft.test(s.type||"")&&i.push(s);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return nt.activeElement}catch(t){}}function w(t,e,i,n,o,r){var s,a;if("object"==typeof e){"string"!=typeof i&&(n=n||i,i=void 0);for(a in e)w(t,a,i,n,e[a],r);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),o===!1)o=b;else if(!o)return t;return 1===r&&(s=o,o=function(t){return pt().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,o,n,i)})}function T(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function k(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function C(t){var e=oe.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function S(t,e){if(1===e.nodeType&&pt.hasData(t)){var i,n,o,r=pt._data(t),s=pt._data(e,r),a=r.events;if(a){delete s.handle,s.events={};for(i in a)for(n=0,o=a[i].length;n<o;n++)pt.event.add(e,i,a[i][n])}s.data&&(s.data=pt.extend({},s.data))}}function M(t,e){var i,n,o;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!dt.noCloneEvent&&e[pt.expando]){o=pt._data(e);for(n in o.events)pt.removeEvent(e,n,o.handle);e.removeAttribute(pt.expando)}"script"===i&&e.text!==t.text?(k(e).text=t.text,C(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),dt.html5Clone&&t.innerHTML&&!pt.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&jt.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}}function A(t,e,i,n){e=rt.apply([],e);var o,r,s,a,l,h,c=0,d=t.length,u=d-1,p=e[0],g=pt.isFunction(p);if(g||d>1&&"string"==typeof p&&!dt.checkClone&&ne.test(p))return t.each(function(o){var r=t.eq(o);g&&(e[0]=p.call(this,o,r.html())),A(r,e,i,n)});if(d&&(h=v(e,t[0].ownerDocument,!1,t,n),o=h.firstChild,1===h.childNodes.length&&(h=o),o||n)){for(a=pt.map(f(h,"script"),k),s=a.length;c<d;c++)r=h,c!==u&&(r=pt.clone(r,!0,!0),s&&pt.merge(a,f(r,"script"))),i.call(t[c],r,c);if(s)for(l=a[a.length-1].ownerDocument,pt.map(a,C),c=0;c<s;c++)r=a[c],Ft.test(r.type||"")&&!pt._data(r,"globalEval")&&pt.contains(l,r)&&(r.src?pt._evalUrl&&pt._evalUrl(r.src):pt.globalEval((r.text||r.textContent||r.innerHTML||"").replace(re,"")));h=o=null}return t}function E(t,e,i){for(var n,o=e?pt.filter(e,t):t,r=0;null!=(n=o[r]);r++)i||1!==n.nodeType||pt.cleanData(f(n)),n.parentNode&&(i&&pt.contains(n.ownerDocument,n)&&g(f(n,"script")),n.parentNode.removeChild(n));return t}function L(t,e){var i=pt(e.createElement(t)).appendTo(e.body),n=pt.css(i[0],"display");return i.detach(),n}function P(t){var e=nt,i=he[t];return i||(i=L(t,e),"none"!==i&&i||(le=(le||pt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(le[0].contentWindow||le[0].contentDocument).document,e.write(),e.close(),i=L(t,e),le.detach()),he[t]=i),i}function D(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function I(t){if(t in Ce)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),i=ke.length;i--;)if(t=ke[i]+e,t in Ce)return t}function O(t,e){for(var i,n,o,r=[],s=0,a=t.length;s<a;s++)n=t[s],n.style&&(r[s]=pt._data(n,"olddisplay"),i=n.style.display,e?(r[s]||"none"!==i||(n.style.display=""),""===n.style.display&&Ht(n)&&(r[s]=pt._data(n,"olddisplay",P(n.nodeName)))):(o=Ht(n),(i&&"none"!==i||!o)&&pt._data(n,"olddisplay",o?i:pt.css(n,"display"))));for(s=0;s<a;s++)n=t[s],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?r[s]||"":"none"));return t}function N(t,e,i){var n=xe.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function R(t,e,i,n,o){for(var r=i===(n?"border":"content")?4:"width"===e?1:0,s=0;r<4;r+=2)"margin"===i&&(s+=pt.css(t,i+$t[r],!0,o)),n?("content"===i&&(s-=pt.css(t,"padding"+$t[r],!0,o)),"margin"!==i&&(s-=pt.css(t,"border"+$t[r]+"Width",!0,o))):(s+=pt.css(t,"padding"+$t[r],!0,o),"padding"!==i&&(s+=pt.css(t,"border"+$t[r]+"Width",!0,o)));return s}function z(e,i,n){var o=!0,r="width"===i?e.offsetWidth:e.offsetHeight,s=fe(e),a=dt.boxSizing&&"border-box"===pt.css(e,"boxSizing",!1,s);if(nt.msFullscreenElement&&t.top!==t&&e.getClientRects().length&&(r=Math.round(100*e.getBoundingClientRect()[i])),r<=0||null==r){if(r=ge(e,i,s),(r<0||null==r)&&(r=e.style[i]),de.test(r))return r;o=a&&(dt.boxSizingReliable()||r===e.style[i]),r=parseFloat(r)||0}return r+R(e,i,n||(a?"border":"content"),o,s)+"px"}function $(t,e,i,n,o){return new $.prototype.init(t,e,i,n,o)}function H(){return t.setTimeout(function(){Se=void 0}),Se=pt.now()}function B(t,e){var i,n={height:t},o=0;for(e=e?1:0;o<4;o+=2-e)i=$t[o],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function j(t,e,i){for(var n,o=(q.tweeners[e]||[]).concat(q.tweeners["*"]),r=0,s=o.length;r<s;r++)if(n=o[r].call(i,e,t))return n}function W(t,e,i){var n,o,r,s,a,l,h,c,d=this,u={},p=t.style,f=t.nodeType&&Ht(t),g=pt._data(t,"fxshow");i.queue||(a=pt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,pt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],h=pt.css(t,"display"),c="none"===h?pt._data(t,"olddisplay")||P(t.nodeName):h,"inline"===c&&"none"===pt.css(t,"float")&&(dt.inlineBlockNeedsLayout&&"inline"!==P(t.nodeName)?p.zoom=1:p.display="inline-block")),i.overflow&&(p.overflow="hidden",dt.shrinkWrapBlocks()||d.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}));for(n in e)if(o=e[n],Ae.exec(o)){if(delete e[n],r=r||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!g||void 0===g[n])continue;f=!0}u[n]=g&&g[n]||pt.style(t,n)}else h=void 0;if(pt.isEmptyObject(u))"inline"===("none"===h?P(t.nodeName):h)&&(p.display=h);else{g?"hidden"in g&&(f=g.hidden):g=pt._data(t,"fxshow",{}),r&&(g.hidden=!f),f?pt(t).show():d.done(function(){pt(t).hide()}),d.done(function(){var e;pt._removeData(t,"fxshow");for(e in u)pt.style(t,e,u[e])});for(n in u)s=j(f?g[n]:0,n,d),n in g||(g[n]=s.start,f&&(s.end=s.start,s.start="width"===n||"height"===n?1:0))}}function F(t,e){var i,n,o,r,s;for(i in t)if(n=pt.camelCase(i),o=e[n],r=t[i],pt.isArray(r)&&(o=r[1],r=t[i]=r[0]),i!==n&&(t[n]=r,delete t[i]),s=pt.cssHooks[n],s&&"expand"in s){r=s.expand(r),delete t[n];for(i in r)i in t||(t[i]=r[i],e[i]=o)}else e[n]=o}function q(t,e,i){var n,o,r=0,s=q.prefilters.length,a=pt.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Se||H(),i=Math.max(0,h.startTime+h.duration-e),n=i/h.duration||0,r=1-n,s=0,l=h.tweens.length;s<l;s++)h.tweens[s].run(r);return a.notifyWith(t,[h,r,i]),r<1&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:pt.extend({},e),opts:pt.extend(!0,{specialEasing:{},easing:pt.easing._default},i),originalProperties:e,originalOptions:i,startTime:Se||H(),duration:i.duration,tweens:[],createTween:function(e,i){var n=pt.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)h.tweens[i].run(1);return e?(a.notifyWith(t,[h,1,0]),a.resolveWith(t,[h,e])):a.rejectWith(t,[h,e]),this}}),c=h.props;for(F(c,h.opts.specialEasing);r<s;r++)if(n=q.prefilters[r].call(h,t,c,h.opts))return pt.isFunction(n.stop)&&(pt._queueHooks(h.elem,h.opts.queue).stop=pt.proxy(n.stop,n)),n;return pt.map(c,j,h),pt.isFunction(h.opts.start)&&h.opts.start.call(t,h),pt.fx.timer(pt.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function G(t){return pt.attr(t,"class")||""}function X(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,r=e.toLowerCase().match(Lt)||[];
if(pt.isFunction(i))for(;n=r[o++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function _(t,e,i,n){function o(a){var l;return r[a]=!0,pt.each(t[a]||[],function(t,a){var h=a(e,i,n);return"string"!=typeof h||s||r[h]?s?!(l=h):void 0:(e.dataTypes.unshift(h),o(h),!1)}),l}var r={},s=t===Qe;return o(e.dataTypes[0])||!r["*"]&&o("*")}function U(t,e){var i,n,o=pt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&pt.extend(!0,t,i),t}function V(t,e,i){for(var n,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(s in a)if(a[s]&&a[s].test(o)){l.unshift(s);break}if(l[0]in i)r=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){r=s;break}n||(n=s)}r=r||n}if(r)return r!==l[0]&&l.unshift(r),i[r]}function Y(t,e,i,n){var o,r,s,a,l,h={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)h[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(i[t.responseFields[r]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(s=h[l+" "+r]||h["* "+r],!s)for(o in h)if(a=o.split(" "),a[1]===r&&(s=h[l+" "+a[0]]||h["* "+a[0]])){s===!0?s=h[o]:h[o]!==!0&&(r=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}function K(t){return t.style&&t.style.display||pt.css(t,"display")}function Q(t){for(;t&&1===t.nodeType;){if("none"===K(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function Z(t,e,i,n){var o;if(pt.isArray(e))pt.each(e,function(e,o){i||ii.test(t)?n(t,o):Z(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,i,n)});else if(i||"object"!==pt.type(e))n(t,e);else for(o in e)Z(t+"["+o+"]",e[o],i,n)}function J(){try{return new t.XMLHttpRequest}catch(t){}}function tt(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function et(t){return pt.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var it=[],nt=t.document,ot=it.slice,rt=it.concat,st=it.push,at=it.indexOf,lt={},ht=lt.toString,ct=lt.hasOwnProperty,dt={},ut="1.12.1",pt=function(t,e){return new pt.fn.init(t,e)},ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,gt=/^-ms-/,mt=/-([\da-z])/gi,vt=function(t,e){return e.toUpperCase()};pt.fn=pt.prototype={jquery:ut,constructor:pt,selector:"",length:0,toArray:function(){return ot.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:ot.call(this)},pushStack:function(t){var e=pt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return pt.each(this,t)},map:function(t){return this.pushStack(pt.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:it.sort,splice:it.splice},pt.extend=pt.fn.extend=function(){var t,e,i,n,o,r,s=arguments[0]||{},a=1,l=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[a]||{},a++),"object"==typeof s||pt.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(o=arguments[a]))for(n in o)t=s[n],i=o[n],s!==i&&(h&&i&&(pt.isPlainObject(i)||(e=pt.isArray(i)))?(e?(e=!1,r=t&&pt.isArray(t)?t:[]):r=t&&pt.isPlainObject(t)?t:{},s[n]=pt.extend(h,r,i)):void 0!==i&&(s[n]=i));return s},pt.extend({expando:"jQuery"+(ut+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===pt.type(t)},isArray:Array.isArray||function(t){return"array"===pt.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!pt.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ct.call(t,"constructor")&&!ct.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!dt.ownFirst)for(e in t)return ct.call(t,e);for(e in t);return void 0===e||ct.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ht.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(gt,"ms-").replace(mt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,o=0;if(i(t))for(n=t.length;o<n&&e.call(t[o],o,t[o])!==!1;o++);else for(o in t)if(e.call(t[o],o,t[o])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(ft,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?pt.merge(n,"string"==typeof t?[t]:t):st.call(n,t)),n},inArray:function(t,e,i){var n;if(e){if(at)return at.call(e,t,i);for(n=e.length,i=i?i<0?Math.max(0,n+i):i:0;i<n;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,e){for(var i=+e.length,n=0,o=t.length;n<i;)t[o++]=e[n++];if(i!==i)for(;void 0!==e[n];)t[o++]=e[n++];return t.length=o,t},grep:function(t,e,i){for(var n,o=[],r=0,s=t.length,a=!i;r<s;r++)n=!e(t[r],r),n!==a&&o.push(t[r]);return o},map:function(t,e,n){var o,r,s=0,a=[];if(i(t))for(o=t.length;s<o;s++)r=e(t[s],s,n),null!=r&&a.push(r);else for(s in t)r=e(t[s],s,n),null!=r&&a.push(r);return rt.apply([],a)},guid:1,proxy:function(t,e){var i,n,o;if("string"==typeof e&&(o=t[e],e=t,t=o),pt.isFunction(t))return i=ot.call(arguments,2),n=function(){return t.apply(e||this,i.concat(ot.call(arguments)))},n.guid=t.guid=t.guid||pt.guid++,n},now:function(){return+new Date},support:dt}),"function"==typeof Symbol&&(pt.fn[Symbol.iterator]=it[Symbol.iterator]),pt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){lt["[object "+e+"]"]=e.toLowerCase()});var yt=function(t){function e(t,e,i,n){var o,r,s,a,l,h,d,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:j)!==I&&D(e),e=e||I,N)){if(11!==g&&(h=vt.exec(t)))if(o=h[1]){if(9===g){if(!(s=e.getElementById(o)))return i;if(s.id===o)return i.push(s),i}else if(f&&(s=f.getElementById(o))&&H(e,s)&&s.id===o)return i.push(s),i}else{if(h[2])return Z.apply(i,e.getElementsByTagName(t)),i;if((o=h[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Z.apply(i,e.getElementsByClassName(o)),i}if(w.qsa&&!X[t+" "]&&(!R||!R.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=B),d=S(t),r=d.length,l=ut.test(a)?"#"+a:"[id='"+a+"']";r--;)d[r]=l+" "+u(d[r]);p=d.join(","),f=yt.test(t)&&c(e.parentNode)||e}if(p)try{return Z.apply(i,f.querySelectorAll(p)),i}catch(t){}finally{a===B&&e.removeAttribute("id")}}}return A(t.replace(at,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>T.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[B]=!0,t}function o(t){var e=I.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var i=t.split("|"),n=i.length;n--;)T.attrHandle[i[n]]=e}function s(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||U)-(~t.sourceIndex||U);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function l(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function h(t){return n(function(e){return e=+e,n(function(i,n){for(var o,r=t([],i.length,e),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function u(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function p(t,e,i){var n=e.dir,o=i&&"parentNode"===n,r=F++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||o)return t(e,i,r)}:function(e,i,s){var a,l,h,c=[W,r];if(s){for(;e=e[n];)if((1===e.nodeType||o)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||o){if(h=e[B]||(e[B]={}),l=h[e.uniqueID]||(h[e.uniqueID]={}),(a=l[n])&&a[0]===W&&a[1]===r)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,s))return!0}}}function f(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function g(t,i,n){for(var o=0,r=i.length;o<r;o++)e(t,i[o],n);return n}function m(t,e,i,n,o){for(var r,s=[],a=0,l=t.length,h=null!=e;a<l;a++)(r=t[a])&&(i&&!i(r,n,o)||(s.push(r),h&&e.push(a)));return s}function v(t,e,i,o,r,s){return o&&!o[B]&&(o=v(o)),r&&!r[B]&&(r=v(r,s)),n(function(n,s,a,l){var h,c,d,u=[],p=[],f=s.length,v=n||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!n&&e?v:m(v,u,t,a,l),b=i?r||(n?t:f||o)?[]:s:y;if(i&&i(y,b,a,l),o)for(h=m(b,p),o(h,[],a,l),c=h.length;c--;)(d=h[c])&&(b[p[c]]=!(y[p[c]]=d));if(n){if(r||t){if(r){for(h=[],c=b.length;c--;)(d=b[c])&&h.push(y[c]=d);r(null,b=[],h,l)}for(c=b.length;c--;)(d=b[c])&&(h=r?tt(n,d):u[c])>-1&&(n[h]=!(s[h]=d))}}else b=m(b===s?b.splice(f,b.length):b),r?r(null,s,b,l):Z.apply(s,b)})}function y(t){for(var e,i,n,o=t.length,r=T.relative[t[0].type],s=r||T.relative[" "],a=r?1:0,l=p(function(t){return t===e},s,!0),h=p(function(t){return tt(e,t)>-1},s,!0),c=[function(t,i,n){var o=!r&&(n||i!==E)||((e=i).nodeType?l(t,i,n):h(t,i,n));return e=null,o}];a<o;a++)if(i=T.relative[t[a].type])c=[p(f(c),i)];else{if(i=T.filter[t[a].type].apply(null,t[a].matches),i[B]){for(n=++a;n<o&&!T.relative[t[n].type];n++);return v(a>1&&f(c),a>1&&u(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),i,a<n&&y(t.slice(a,n)),n<o&&y(t=t.slice(n)),n<o&&u(t))}c.push(i)}return f(c)}function b(t,i){var o=i.length>0,r=t.length>0,s=function(n,s,a,l,h){var c,d,u,p=0,f="0",g=n&&[],v=[],y=E,b=n||r&&T.find.TAG("*",h),x=W+=null==y?1:Math.random()||.1,w=b.length;for(h&&(E=s===I||s||h);f!==w&&null!=(c=b[f]);f++){if(r&&c){for(d=0,s||c.ownerDocument===I||(D(c),a=!N);u=t[d++];)if(u(c,s||I,a)){l.push(c);break}h&&(W=x)}o&&((c=!u&&c)&&p--,n&&g.push(c))}if(p+=f,o&&f!==p){for(d=0;u=i[d++];)u(g,v,s,a);if(n){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=K.call(l));v=m(v)}Z.apply(l,v),h&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return h&&(W=x,E=y),g};return o?n(s):s}var x,w,T,k,C,S,M,A,E,L,P,D,I,O,N,R,z,$,H,B="sizzle"+1*new Date,j=t.document,W=0,F=0,q=i(),G=i(),X=i(),_=function(t,e){return t===e&&(P=!0),0},U=1<<31,V={}.hasOwnProperty,Y=[],K=Y.pop,Q=Y.push,Z=Y.push,J=Y.slice,tt=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",it="[\\x20\\t\\r\\n\\f]",nt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+it+"*("+nt+")(?:"+it+"*([*^$|!~]?=)"+it+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+nt+"))|)"+it+"*\\]",rt=":("+nt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(it+"+","g"),at=new RegExp("^"+it+"+|((?:^|[^\\\\])(?:\\\\.)*)"+it+"+$","g"),lt=new RegExp("^"+it+"*,"+it+"*"),ht=new RegExp("^"+it+"*([>+~]|"+it+")"+it+"*"),ct=new RegExp("="+it+"*([^\\]'\"]*?)"+it+"*\\]","g"),dt=new RegExp(rt),ut=new RegExp("^"+nt+"$"),pt={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+it+"*(even|odd|(([+-]|)(\\d*)n|)"+it+"*(?:([+-]|)"+it+"*(\\d+)|))"+it+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+it+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+it+"*((?:-\\d)?\\d*)"+it+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,xt=new RegExp("\\\\([\\da-f]{1,6}"+it+"?|("+it+")|.)","ig"),wt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},Tt=function(){D()};try{Z.apply(Y=J.call(j.childNodes),j.childNodes),Y[j.childNodes.length].nodeType}catch(t){Z={apply:Y.length?function(t,e){Q.apply(t,J.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}w=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},D=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:j;return n!==I&&9===n.nodeType&&n.documentElement?(I=n,O=I.documentElement,N=!C(I),(i=I.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",Tt,!1):i.attachEvent&&i.attachEvent("onunload",Tt)),w.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=o(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(I.getElementsByClassName),w.getById=o(function(t){return O.appendChild(t).id=B,!I.getElementsByName||!I.getElementsByName(B).length}),w.getById?(T.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var i=e.getElementById(t);return i?[i]:[]}},T.filter.ID=function(t){var e=t.replace(xt,wt);return function(t){return t.getAttribute("id")===e}}):(delete T.find.ID,T.filter.ID=function(t){var e=t.replace(xt,wt);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),T.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},T.find.CLASS=w.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&N)return e.getElementsByClassName(t)},z=[],R=[],(w.qsa=mt.test(I.querySelectorAll))&&(o(function(t){O.appendChild(t).innerHTML="<a id='"+B+"'></a><select id='"+B+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+it+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+it+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+B+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+B+"+*").length||R.push(".#.+[+~]")}),o(function(t){var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+it+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=mt.test($=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(t){w.disconnectedMatch=$.call(t,"div"),$.call(t,"[s!='']:x"),z.push("!=",rt)}),R=R.length&&new RegExp(R.join("|")),z=z.length&&new RegExp(z.join("|")),e=mt.test(O.compareDocumentPosition),H=e||mt.test(O.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},_=e?function(t,e){if(t===e)return P=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i?i:(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!w.sortDetached&&e.compareDocumentPosition(t)===i?t===I||t.ownerDocument===j&&H(j,t)?-1:e===I||e.ownerDocument===j&&H(j,e)?1:L?tt(L,t)-tt(L,e):0:4&i?-1:1)}:function(t,e){if(t===e)return P=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],l=[e];if(!o||!r)return t===I?-1:e===I?1:o?-1:r?1:L?tt(L,t)-tt(L,e):0;if(o===r)return s(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?s(a[n],l[n]):a[n]===j?-1:l[n]===j?1:0},I):I},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==I&&D(t),i=i.replace(ct,"='$1']"),w.matchesSelector&&N&&!X[i+" "]&&(!z||!z.test(i))&&(!R||!R.test(i)))try{var n=$.call(t,i);if(n||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&D(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&D(t);var i=T.attrHandle[e.toLowerCase()],n=i&&V.call(T.attrHandle,e.toLowerCase())?i(t,e,!N):void 0;return void 0!==n?n:w.attributes||!N?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,o=0;if(P=!w.detectDuplicates,L=!w.sortStable&&t.slice(0),t.sort(_),P){for(;e=t[o++];)e===t[o]&&(n=i.push(o));for(;n--;)t.splice(i[n],1)}return L=null,t},k=e.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=k(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=k(e);return i},T=e.selectors={cacheLength:50,createPseudo:n,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xt,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(xt,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&dt.test(i)&&(e=S(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xt,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+it+")"+t+"("+it+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(o){var r=e.attr(o,t);return null==r?"!="===i:!i||(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r.replace(st," ")+" ").indexOf(n)>-1:"|="===i&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var h,c,d,u,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(u=m,d=u[B]||(u[B]={}),c=d[u.uniqueID]||(d[u.uniqueID]={}),h=c[t]||[],p=h[0]===W&&h[1],b=p&&h[2],u=p&&m.childNodes[p];u=++p&&u&&u[g]||(b=p=0)||f.pop();)if(1===u.nodeType&&++b&&u===e){c[t]=[W,p,b];break}}else if(y&&(u=e,d=u[B]||(u[B]={}),c=d[u.uniqueID]||(d[u.uniqueID]={}),h=c[t]||[],p=h[0]===W&&h[1],b=p),b===!1)for(;(u=++p&&u&&u[g]||(b=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++b||(y&&(d=u[B]||(u[B]={}),c=d[u.uniqueID]||(d[u.uniqueID]={}),c[t]=[W,b]),u!==e)););return b-=o,b===n||b%n===0&&b/n>=0}}},PSEUDO:function(t,i){var o,r=T.pseudos[t]||T.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[B]?r(i):r.length>1?(o=[t,t,"",i],T.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,o=r(t,i),s=o.length;s--;)n=tt(t,o[s]),t[n]=!(e[n]=o[s])}):function(t){return r(t,0,o)}):r}},pseudos:{not:n(function(t){var e=[],i=[],o=M(t.replace(at,"$1"));return o[B]?n(function(t,e,i,n){for(var r,s=o(t,null,n,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))}):function(t,n,r){return e[0]=t,o(e,null,r,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(xt,wt),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:n(function(t){return ut.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xt,wt).toLowerCase(),function(e){var i;do if(i=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!T.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,i){return[i<0?i+e:i]}),even:h(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:h(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:h(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:h(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},T.pseudos.nth=T.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[x]=a(x);for(x in{submit:!0,reset:!0})T.pseudos[x]=l(x);return d.prototype=T.filters=T.pseudos,T.setFilters=new d,S=e.tokenize=function(t,i){var n,o,r,s,a,l,h,c=G[t+" "];if(c)return i?0:c.slice(0);for(a=t,l=[],h=T.preFilter;a;){n&&!(o=lt.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=ht.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(at," ")}),a=a.slice(n.length));for(s in T.filter)!(o=pt[s].exec(a))||h[s]&&!(o=h[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return i?a.length:a?e.error(t):G(t,l).slice(0)},M=e.compile=function(t,e){var i,n=[],o=[],r=X[t+" "];if(!r){for(e||(e=S(t)),i=e.length;i--;)r=y(e[i]),r[B]?n.push(r):o.push(r);r=X(t,b(o,n)),r.selector=t}return r},A=e.select=function(t,e,i,n){var o,r,s,a,l,h="function"==typeof t&&t,d=!n&&S(t=h.selector||t);if(i=i||[],1===d.length){if(r=d[0]=d[0].slice(0),r.length>2&&"ID"===(s=r[0]).type&&w.getById&&9===e.nodeType&&N&&T.relative[r[1].type]){if(e=(T.find.ID(s.matches[0].replace(xt,wt),e)||[])[0],!e)return i;h&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=pt.needsContext.test(t)?0:r.length;o--&&(s=r[o],!T.relative[a=s.type]);)if((l=T.find[a])&&(n=l(s.matches[0].replace(xt,wt),yt.test(r[0].type)&&c(e.parentNode)||e))){if(r.splice(o,1),t=n.length&&u(r),!t)return Z.apply(i,n),i;break}}return(h||M(t,d))(n,e,!N,i,!e||yt.test(t)&&c(e.parentNode)||e),i},w.sortStable=B.split("").sort(_).join("")===B,w.detectDuplicates=!!P,D(),w.sortDetached=o(function(t){return 1&t.compareDocumentPosition(I.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(et,function(t,e,i){var n;if(!i)return t[e]===!0?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains;var bt=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&pt(t).is(i))break;n.push(t)}return n},xt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},wt=pt.expr.match.needsContext,Tt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,kt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?pt.find.matchesSelector(n,t)?[n]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,i=[],n=this,o=n.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e<o;e++)if(pt.contains(n[e],this))return!0}));for(e=0;e<o;e++)pt.find(t,n[e],i);return i=this.pushStack(o>1?pt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(n(this,t||[],!1))},not:function(t){return this.pushStack(n(this,t||[],!0))},is:function(t){return!!n(this,"string"==typeof t&&wt.test(t)?pt(t):t||[],!1).length}});var Ct,St=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Mt=pt.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||Ct,"string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:St.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:nt,!0)),Tt.test(n[1])&&pt.isPlainObject(e))for(n in e)pt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(o=nt.getElementById(n[2]),o&&o.parentNode){if(o.id!==n[2])return Ct.find(t);this.length=1,this[0]=o}return this.context=nt,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof i.ready?i.ready(t):t(pt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))};Mt.prototype=pt.fn,Ct=pt(nt);var At=/^(?:parents|prev(?:Until|All))/,Et={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,i=pt(t,this),n=i.length;return this.filter(function(){for(e=0;e<n;e++)if(pt.contains(this,i[e]))return!0})},closest:function(t,e){for(var i,n=0,o=this.length,r=[],s=wt.test(t)||"string"!=typeof t?pt(t,e||this.context):0;n<o;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&pt.find.matchesSelector(i,t))){r.push(i);break}return this.pushStack(r.length>1?pt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,i){return bt(t,"parentNode",i)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,i){return bt(t,"nextSibling",i)},prevUntil:function(t,e,i){return bt(t,"previousSibling",i)},siblings:function(t){return xt((t.parentNode||{}).firstChild,t)},children:function(t){return xt(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},function(t,e){pt.fn[t]=function(i,n){var o=pt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=pt.filter(n,o)),this.length>1&&(Et[t]||(o=pt.uniqueSort(o)),At.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Lt=/\S+/g;pt.Callbacks=function(t){t="string"==typeof t?r(t):pt.extend({},t);var e,i,n,o,s=[],a=[],l=-1,h=function(){for(o=t.once,n=e=!0;a.length;l=-1)for(i=a.shift();++l<s.length;)s[l].apply(i[0],i[1])===!1&&t.stopOnFalse&&(l=s.length,i=!1);t.memory||(i=!1),e=!1,o&&(s=i?[]:"")},c={add:function(){return s&&(i&&!e&&(l=s.length-1,a.push(i)),function e(i){pt.each(i,function(i,n){pt.isFunction(n)?t.unique&&c.has(n)||s.push(n):n&&n.length&&"string"!==pt.type(n)&&e(n)})}(arguments),i&&!e&&h()),this},remove:function(){return pt.each(arguments,function(t,e){for(var i;(i=pt.inArray(e,s,i))>-1;)s.splice(i,1),i<=l&&l--}),this},has:function(t){return t?pt.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=!0,i||c.disable(),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=i||[],i=[t,i.slice?i.slice():i],a.push(i),e||h()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred(function(i){pt.each(e,function(e,r){var s=pt.isFunction(t[e])&&t[e];o[r[1]](function(){var t=s&&s.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+"With"](this===n?i.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?pt.extend(t,n):n}},o={};return n.pipe=n.then,pt.each(e,function(t,r){var s=r[2],a=r[3];n[r[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?n:this,arguments),this},o[r[0]+"With"]=s.fireWith}),n.promise(o),t&&t.call(o,o),o},when:function(t){var e,i,n,o=0,r=ot.call(arguments),s=r.length,a=1!==s||t&&pt.isFunction(t.promise)?s:0,l=1===a?t:pt.Deferred(),h=function(t,i,n){return function(o){i[t]=this,n[t]=arguments.length>1?ot.call(arguments):o,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=new Array(s),i=new Array(s),n=new Array(s);o<s;o++)r[o]&&pt.isFunction(r[o].promise)?r[o].promise().progress(h(o,i,e)).done(h(o,n,r)).fail(l.reject):--a;return a||l.resolveWith(n,r),l.promise()}});var Pt;pt.fn.ready=function(t){return pt.ready.promise().done(t),this},pt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?pt.readyWait++:pt.ready(!0)},ready:function(t){(t===!0?--pt.readyWait:pt.isReady)||(pt.isReady=!0,t!==!0&&--pt.readyWait>0||(Pt.resolveWith(nt,[pt]),pt.fn.triggerHandler&&(pt(nt).triggerHandler("ready"),pt(nt).off("ready"))))}}),pt.ready.promise=function(e){if(!Pt)if(Pt=pt.Deferred(),"complete"===nt.readyState||"loading"!==nt.readyState&&!nt.documentElement.doScroll)t.setTimeout(pt.ready);else if(nt.addEventListener)nt.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{nt.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var i=!1;try{i=null==t.frameElement&&nt.documentElement}catch(t){}i&&i.doScroll&&!function e(){if(!pt.isReady){try{i.doScroll("left")}catch(i){return t.setTimeout(e,50)}s(),pt.ready()}}()}return Pt.promise(e)},pt.ready.promise();var Dt;for(Dt in pt(dt))break;dt.ownFirst="0"===Dt,dt.inlineBlockNeedsLayout=!1,pt(function(){var t,e,i,n;i=nt.getElementsByTagName("body")[0],i&&i.style&&(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",dt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=nt.createElement("div");dt.deleteExpando=!0;try{delete t.test}catch(t){dt.deleteExpando=!1}t=null}();var It=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||e!==!0&&t.getAttribute("classid")===e);
},Ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Nt=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando],!!t&&!h(t)},data:function(t,e,i){return c(t,e,i)},removeData:function(t,e){return d(t,e)},_data:function(t,e,i){return c(t,e,i,!0)},_removeData:function(t,e){return d(t,e,!0)}}),pt.fn.extend({data:function(t,e){var i,n,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=pt.data(r),1===r.nodeType&&!pt._data(r,"parsedAttrs"))){for(i=s.length;i--;)s[i]&&(n=s[i].name,0===n.indexOf("data-")&&(n=pt.camelCase(n.slice(5)),l(r,n,o[n])));pt._data(r,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){pt.data(this,t)}):arguments.length>1?this.each(function(){pt.data(this,t,e)}):r?l(r,t,pt.data(r,t)):void 0},removeData:function(t){return this.each(function(){pt.removeData(this,t)})}}),pt.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=pt._data(t,e),i&&(!n||pt.isArray(i)?n=pt._data(t,e,pt.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=pt.queue(t,e),n=i.length,o=i.shift(),r=pt._queueHooks(t,e),s=function(){pt.dequeue(t,e)};"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete r.stop,o.call(t,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return pt._data(t,i)||pt._data(t,i,{empty:pt.Callbacks("once memory").add(function(){pt._removeData(t,e+"queue"),pt._removeData(t,i)})})}}),pt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?pt.queue(this[0],t):void 0===e?this:this.each(function(){var i=pt.queue(this,t,e);pt._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&pt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){pt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,o=pt.Deferred(),r=this,s=this.length,a=function(){--n||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)i=pt._data(r[s],t+"queueHooks"),i&&i.empty&&(n++,i.empty.add(a));return a(),o.promise(e)}}),function(){var t;dt.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,i,n;return i=nt.getElementsByTagName("body")[0],i&&i.style?(e=nt.createElement("div"),n=nt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(nt.createElement("div")).style.width="5px",t=3!==e.offsetWidth),i.removeChild(n),t):void 0}}();var Rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,zt=new RegExp("^(?:([+-])=|)("+Rt+")([a-z%]*)$","i"),$t=["Top","Right","Bottom","Left"],Ht=function(t,e){return t=e||t,"none"===pt.css(t,"display")||!pt.contains(t.ownerDocument,t)},Bt=function(t,e,i,n,o,r,s){var a=0,l=t.length,h=null==i;if("object"===pt.type(i)){o=!0;for(a in i)Bt(t,e,a,i[a],!0,r,s)}else if(void 0!==n&&(o=!0,pt.isFunction(n)||(s=!0),h&&(s?(e.call(t,n),e=null):(h=e,e=function(t,e,i){return h.call(pt(t),i)})),e))for(;a<l;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return o?t:h?e.call(t):l?e(t[0],i):r},jt=/^(?:checkbox|radio)$/i,Wt=/<([\w:-]+)/,Ft=/^$|\/(?:java|ecma)script/i,qt=/^\s+/,Gt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var t=nt.createElement("div"),e=nt.createDocumentFragment(),i=nt.createElement("input");t.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",dt.leadingWhitespace=3===t.firstChild.nodeType,dt.tbody=!t.getElementsByTagName("tbody").length,dt.htmlSerialize=!!t.getElementsByTagName("link").length,dt.html5Clone="<:nav></:nav>"!==nt.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),dt.appendChecked=i.checked,t.innerHTML="<textarea>x</textarea>",dt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=nt.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),dt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.noCloneEvent=!!t.addEventListener,t[pt.expando]=1,dt.attributes=!t.getAttribute(pt.expando)}();var Xt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:dt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Xt.optgroup=Xt.option,Xt.tbody=Xt.tfoot=Xt.colgroup=Xt.caption=Xt.thead,Xt.th=Xt.td;var _t=/<|&#?\w+;/,Ut=/<tbody/i;!function(){var e,i,n=nt.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})i="on"+e,(dt[e]=i in t)||(n.setAttribute(i,"t"),dt[e]=n.attributes[i].expando===!1);n=null}();var Vt=/^(?:input|select|textarea)$/i,Yt=/^key/,Kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qt=/^(?:focusinfocus|focusoutblur)$/,Zt=/^([^.]*)(?:\.(.+)|)/;pt.event={global:{},add:function(t,e,i,n,o){var r,s,a,l,h,c,d,u,p,f,g,m=pt._data(t);if(m){for(i.handler&&(l=i,i=l.handler,o=l.selector),i.guid||(i.guid=pt.guid++),(s=m.events)||(s=m.events={}),(c=m.handle)||(c=m.handle=function(t){return"undefined"==typeof pt||t&&pt.event.triggered===t.type?void 0:pt.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(Lt)||[""],a=e.length;a--;)r=Zt.exec(e[a])||[],p=g=r[1],f=(r[2]||"").split(".").sort(),p&&(h=pt.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=pt.event.special[p]||{},d=pt.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&pt.expr.match.needsContext.test(o),namespace:f.join(".")},l),(u=s[p])||(u=s[p]=[],u.delegateCount=0,h.setup&&h.setup.call(t,n,f,c)!==!1||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),h.add&&(h.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),o?u.splice(u.delegateCount++,0,d):u.push(d),pt.event.global[p]=!0);t=null}},remove:function(t,e,i,n,o){var r,s,a,l,h,c,d,u,p,f,g,m=pt.hasData(t)&&pt._data(t);if(m&&(c=m.events)){for(e=(e||"").match(Lt)||[""],h=e.length;h--;)if(a=Zt.exec(e[h])||[],p=g=a[1],f=(a[2]||"").split(".").sort(),p){for(d=pt.event.special[p]||{},p=(n?d.delegateType:d.bindType)||p,u=c[p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=u.length;r--;)s=u[r],!o&&g!==s.origType||i&&i.guid!==s.guid||a&&!a.test(s.namespace)||n&&n!==s.selector&&("**"!==n||!s.selector)||(u.splice(r,1),s.selector&&u.delegateCount--,d.remove&&d.remove.call(t,s));l&&!u.length&&(d.teardown&&d.teardown.call(t,f,m.handle)!==!1||pt.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)pt.event.remove(t,p+e[h],i,n,!0);pt.isEmptyObject(c)&&(delete m.handle,pt._removeData(t,"events"))}},trigger:function(e,i,n,o){var r,s,a,l,h,c,d,u=[n||nt],p=ct.call(e,"type")?e.type:e,f=ct.call(e,"namespace")?e.namespace.split("."):[];if(a=c=n=n||nt,3!==n.nodeType&&8!==n.nodeType&&!Qt.test(p+pt.event.triggered)&&(p.indexOf(".")>-1&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:pt.makeArray(i,[e]),h=pt.event.special[p]||{},o||!h.trigger||h.trigger.apply(n,i)!==!1)){if(!o&&!h.noBubble&&!pt.isWindow(n)){for(l=h.delegateType||p,Qt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)u.push(a),c=a;c===(n.ownerDocument||nt)&&u.push(c.defaultView||c.parentWindow||t)}for(d=0;(a=u[d++])&&!e.isPropagationStopped();)e.type=d>1?l:h.bindType||p,r=(pt._data(a,"events")||{})[e.type]&&pt._data(a,"handle"),r&&r.apply(a,i),r=s&&a[s],r&&r.apply&&It(a)&&(e.result=r.apply(a,i),e.result===!1&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!h._default||h._default.apply(u.pop(),i)===!1)&&It(n)&&s&&n[p]&&!pt.isWindow(n)){c=n[s],c&&(n[s]=null),pt.event.triggered=p;try{n[p]()}catch(t){}pt.event.triggered=void 0,c&&(n[s]=c)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,i,n,o,r,s=[],a=ot.call(arguments),l=(pt._data(this,"events")||{})[t.type]||[],h=pt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!h.preDispatch||h.preDispatch.call(this,t)!==!1){for(s=pt.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,n=((pt.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,o,r,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(n=[],i=0;i<a;i++)r=e[i],o=r.selector+" ",void 0===n[o]&&(n[o]=r.needsContext?pt(o,this).index(l)>-1:pt.find(o,this,null,[l]).length),n[o]&&n.push(r);n.length&&s.push({elem:l,handlers:n})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[pt.expando])return t;var e,i,n,o=t.type,r=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Kt.test(o)?this.mouseHooks:Yt.test(o)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,t=new pt.Event(r),e=n.length;e--;)i=n[e],t[i]=r[i];return t.target||(t.target=r.srcElement||nt),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,r):t},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var i,n,o,r=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||nt,o=n.documentElement,i=n.body,t.pageX=e.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),t.which||void 0===r||(t.which=1&r?1:2&r?3:4&r?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==x()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){if(this===x()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(pt.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(t){return pt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i){var n=pt.extend(new pt.Event,i,{type:t,isSimulated:!0});pt.event.trigger(n,null,e),n.isDefaultPrevented()&&i.preventDefault()}},pt.removeEvent=nt.removeEventListener?function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)}:function(t,e,i){var n="on"+e;t.detachEvent&&("undefined"==typeof t[n]&&(t[n]=null),t.detachEvent(n,i))},pt.Event=function(t,e){return this instanceof pt.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?y:b):this.type=t,e&&pt.extend(this,e),this.timeStamp=t&&t.timeStamp||pt.now(),void(this[pt.expando]=!0)):new pt.Event(t,e)},pt.Event.prototype={constructor:pt.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=y,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=y,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=y,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},pt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){pt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===n||pt.contains(n,o))||(t.type=r.origType,i=r.handler.apply(this,arguments),t.type=e),i}}}),dt.submit||(pt.event.special.submit={setup:function(){return!pt.nodeName(this,"form")&&void pt.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,i=pt.nodeName(e,"input")||pt.nodeName(e,"button")?pt.prop(e,"form"):void 0;i&&!pt._data(i,"submit")&&(pt.event.add(i,"submit._submit",function(t){t._submitBubble=!0}),pt._data(i,"submit",!0))})},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&pt.event.simulate("submit",this.parentNode,t))},teardown:function(){return!pt.nodeName(this,"form")&&void pt.event.remove(this,"._submit")}}),dt.change||(pt.event.special.change={setup:function(){return Vt.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(pt.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)}),pt.event.add(this,"click._change",function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),pt.event.simulate("change",this,t)})),!1):void pt.event.add(this,"beforeactivate._change",function(t){var e=t.target;Vt.test(e.nodeName)&&!pt._data(e,"change")&&(pt.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||pt.event.simulate("change",this.parentNode,t)}),pt._data(e,"change",!0))})},handle:function(t){var e=t.target;if(this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type)return t.handleObj.handler.apply(this,arguments)},teardown:function(){return pt.event.remove(this,"._change"),!Vt.test(this.nodeName)}}),dt.focusin||pt.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){pt.event.simulate(e,t.target,pt.event.fix(t))};pt.event.special[e]={setup:function(){var n=this.ownerDocument||this,o=pt._data(n,e);o||n.addEventListener(t,i,!0),pt._data(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=pt._data(n,e)-1;o?pt._data(n,e,o):(n.removeEventListener(t,i,!0),pt._removeData(n,e))}}}),pt.fn.extend({on:function(t,e,i,n){return w(this,t,e,i,n)},one:function(t,e,i,n){return w(this,t,e,i,n,1)},off:function(t,e,i){var n,o;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,pt(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return e!==!1&&"function"!=typeof e||(i=e,e=void 0),i===!1&&(i=b),this.each(function(){pt.event.remove(this,t,i,e)})},trigger:function(t,e){return this.each(function(){pt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return pt.event.trigger(t,e,i,!0)}});var Jt=/ jQuery\d+="(?:null|\d+)"/g,te=new RegExp("<(?:"+Gt+")[\\s/>]","i"),ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ie=/<script|<style|<link/i,ne=/checked\s*(?:[^=]|=\s*.checked.)/i,oe=/^true\/(.*)/,re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,se=p(nt),ae=se.appendChild(nt.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(ee,"<$1></$2>")},clone:function(t,e,i){var n,o,r,s,a,l=pt.contains(t.ownerDocument,t);if(dt.html5Clone||pt.isXMLDoc(t)||!te.test("<"+t.nodeName+">")?r=t.cloneNode(!0):(ae.innerHTML=t.outerHTML,ae.removeChild(r=ae.firstChild)),!(dt.noCloneEvent&&dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(n=f(r),a=f(t),s=0;null!=(o=a[s]);++s)n[s]&&M(o,n[s]);if(e)if(i)for(a=a||f(t),n=n||f(r),s=0;null!=(o=a[s]);s++)S(o,n[s]);else S(t,r);return n=f(r,"script"),n.length>0&&g(n,!l&&f(t,"script")),n=a=o=null,r},cleanData:function(t,e){for(var i,n,o,r,s=0,a=pt.expando,l=pt.cache,h=dt.attributes,c=pt.event.special;null!=(i=t[s]);s++)if((e||It(i))&&(o=i[a],r=o&&l[o])){if(r.events)for(n in r.events)c[n]?pt.event.remove(i,n):pt.removeEvent(i,n,r.handle);l[o]&&(delete l[o],h||"undefined"==typeof i.removeAttribute?i[a]=void 0:i.removeAttribute(a),it.push(o))}}}),pt.fn.extend({domManip:A,detach:function(t){return E(this,t,!0)},remove:function(t){return E(this,t)},text:function(t){return Bt(this,function(t){return void 0===t?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||nt).createTextNode(t))},null,t,arguments.length)},append:function(){return A(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.appendChild(t)}})},prepend:function(){return A(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return A(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return A(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Bt(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Jt,""):void 0;if("string"==typeof t&&!ie.test(t)&&(dt.htmlSerialize||!te.test(t))&&(dt.leadingWhitespace||!qt.test(t))&&!Xt[(Wt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;i<n;i++)e=this[i]||{},1===e.nodeType&&(pt.cleanData(f(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return A(this,arguments,function(e){var i=this.parentNode;pt.inArray(this,t)<0&&(pt.cleanData(f(this)),i&&i.replaceChild(e,this))},t)}}),pt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){pt.fn[t]=function(t){for(var i,n=0,o=[],r=pt(t),s=r.length-1;n<=s;n++)i=n===s?this:this.clone(!0),pt(r[n])[e](i),st.apply(o,i.get());return this.pushStack(o)}});var le,he={HTML:"block",BODY:"block"},ce=/^margin/,de=new RegExp("^("+Rt+")(?!px)[a-z%]+$","i"),ue=function(t,e,i,n){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];o=i.apply(t,n||[]);for(r in e)t.style[r]=s[r];return o},pe=nt.documentElement;!function(){function e(){var e,c,d=nt.documentElement;d.appendChild(l),h.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i=o=a=!1,n=s=!0,t.getComputedStyle&&(c=t.getComputedStyle(h),i="1%"!==(c||{}).top,a="2px"===(c||{}).marginLeft,o="4px"===(c||{width:"4px"}).width,h.style.marginRight="50%",n="4px"===(c||{marginRight:"4px"}).marginRight,e=h.appendChild(nt.createElement("div")),e.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",h.style.width="1px",s=!parseFloat((t.getComputedStyle(e)||{}).marginRight),h.removeChild(e)),h.style.display="none",r=0===h.getClientRects().length,r&&(h.style.display="",h.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=h.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",r=0===e[0].offsetHeight,r&&(e[0].style.display="",e[1].style.display="none",r=0===e[0].offsetHeight)),d.removeChild(l)}var i,n,o,r,s,a,l=nt.createElement("div"),h=nt.createElement("div");h.style&&(h.style.cssText="float:left;opacity:.5",dt.opacity="0.5"===h.style.opacity,dt.cssFloat=!!h.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",dt.clearCloneStyle="content-box"===h.style.backgroundClip,l=nt.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.innerHTML="",l.appendChild(h),dt.boxSizing=""===h.style.boxSizing||""===h.style.MozBoxSizing||""===h.style.WebkitBoxSizing,pt.extend(dt,{reliableHiddenOffsets:function(){return null==i&&e(),r},boxSizingReliable:function(){return null==i&&e(),o},pixelMarginRight:function(){return null==i&&e(),n},pixelPosition:function(){return null==i&&e(),i},reliableMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),a}}))}();var fe,ge,me=/^(top|right|bottom|left)$/;t.getComputedStyle?(fe=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},ge=function(t,e,i){var n,o,r,s,a=t.style;return i=i||fe(t),s=i?i.getPropertyValue(e)||i[e]:void 0,""!==s&&void 0!==s||pt.contains(t.ownerDocument,t)||(s=pt.style(t,e)),i&&!dt.pixelMarginRight()&&de.test(s)&&ce.test(e)&&(n=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=o,a.maxWidth=r),void 0===s?s:s+""}):pe.currentStyle&&(fe=function(t){return t.currentStyle},ge=function(t,e,i){var n,o,r,s,a=t.style;return i=i||fe(t),s=i?i[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),de.test(s)&&!me.test(e)&&(n=a.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=n,r&&(o.left=r)),void 0===s?s:s+""||"auto"});var ve=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/i,be=/^(none|table(?!-c[ea]).+)/,xe=new RegExp("^("+Rt+")(.*)$","i"),we={position:"absolute",visibility:"hidden",display:"block"},Te={letterSpacing:"0",fontWeight:"400"},ke=["Webkit","O","Moz","ms"],Ce=nt.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=ge(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":dt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=pt.camelCase(e),l=t.style;if(e=pt.cssProps[a]||(pt.cssProps[a]=I(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(o=s.get(t,!1,n))?o:l[e];if(r=typeof i,"string"===r&&(o=zt.exec(i))&&o[1]&&(i=u(t,e,o),r="number"),null!=i&&i===i&&("number"===r&&(i+=o&&o[3]||(pt.cssNumber[a]?"":"px")),dt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(i=s.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var o,r,s,a=pt.camelCase(e);return e=pt.cssProps[a]||(pt.cssProps[a]=I(a)||a),s=pt.cssHooks[e]||pt.cssHooks[a],s&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=ge(t,e,n)),"normal"===r&&e in Te&&(r=Te[e]),""===i||i?(o=parseFloat(r),i===!0||isFinite(o)?o||0:r):r}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,i,n){if(i)return be.test(pt.css(t,"display"))&&0===t.offsetWidth?ue(t,we,function(){return z(t,e,n)}):z(t,e,n)},set:function(t,i,n){var o=n&&fe(t);return N(t,i,n?R(t,e,n,dt.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,o),o):0)}}}),dt.opacity||(pt.cssHooks.opacity={get:function(t,e){return ye.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,o=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===pt.trim(r.replace(ve,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=ve.test(r)?r.replace(ve,o):r+" "+o)}}),pt.cssHooks.marginRight=D(dt.reliableMarginRight,function(t,e){if(e)return ue(t,{display:"inline-block"},ge,[t,"marginRight"])}),pt.cssHooks.marginLeft=D(dt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(ge(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-ue(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];n<4;n++)o[t+$t[n]+e]=r[n]||r[n-2]||r[0];return o}},ce.test(t)||(pt.cssHooks[t+e].set=N)}),pt.fn.extend({css:function(t,e){return Bt(this,function(t,e,i){var n,o,r={},s=0;if(pt.isArray(e)){for(n=fe(t),o=e.length;s<o;s++)r[e[s]]=pt.css(t,e[s],!1,n);return r}return void 0!==i?pt.style(t,e,i):pt.css(t,e)},t,e,arguments.length>1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ht(this)?pt(this).show():pt(this).hide()})}}),pt.Tween=$,$.prototype={constructor:$,init:function(t,e,i,n,o,r){this.elem=t,this.prop=i,this.easing=o||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(pt.cssNumber[i]?"":"px")},cur:function(){var t=$.propHooks[this.prop];return t&&t.get?t.get(this):$.propHooks._default.get(this)},run:function(t){var e,i=$.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=$.prototype.init,pt.fx.step={};var Se,Me,Ae=/^(?:toggle|show|hide)$/,Ee=/queueHooks$/;pt.Animation=pt.extend(q,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return u(i.elem,t,zt.exec(e),i),i}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(Lt);for(var i,n=0,o=t.length;n<o;n++)i=t[n],q.tweeners[i]=q.tweeners[i]||[],q.tweeners[i].unshift(e)},prefilters:[W],prefilter:function(t,e){e?q.prefilters.unshift(t):q.prefilters.push(t)}}),pt.speed=function(t,e,i){var n=t&&"object"==typeof t?pt.extend({},t):{complete:i||!i&&e||pt.isFunction(t)&&t,duration:t,easing:i&&e||e&&!pt.isFunction(e)&&e};return n.duration=pt.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in pt.fx.speeds?pt.fx.speeds[n.duration]:pt.fx.speeds._default,null!=n.queue&&n.queue!==!0||(n.queue="fx"),n.old=n.complete,n.complete=function(){pt.isFunction(n.old)&&n.old.call(this),n.queue&&pt.dequeue(this,n.queue)},n},pt.fn.extend({fadeTo:function(t,e,i,n){return this.filter(Ht).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=pt.isEmptyObject(t),r=pt.speed(e,i,n),s=function(){var e=q(this,pt.extend({},t),r);(o||pt._data(this,"finish"))&&e.stop(!0)};return s.finish=s,o||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",r=pt.timers,s=pt._data(this);if(o)s[o]&&s[o].stop&&n(s[o]);else for(o in s)s[o]&&s[o].stop&&Ee.test(o)&&n(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(i),e=!1,r.splice(o,1));!e&&i||pt.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=pt._data(this),n=i[t+"queue"],o=i[t+"queueHooks"],r=pt.timers,s=n?n.length:0;for(i.finish=!0,pt.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),pt.each(["toggle","show","hide"],function(t,e){var i=pt.fn[e];pt.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(B(e,!0),t,n,o)}}),pt.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){pt.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),pt.timers=[],pt.fx.tick=function(){var t,e=pt.timers,i=0;for(Se=pt.now();i<e.length;i++)t=e[i],t()||e[i]!==t||e.splice(i--,1);e.length||pt.fx.stop(),Se=void 0},pt.fx.timer=function(t){pt.timers.push(t),t()?pt.fx.start():pt.timers.pop()},pt.fx.interval=13,pt.fx.start=function(){Me||(Me=t.setInterval(pt.fx.tick,pt.fx.interval))},pt.fx.stop=function(){t.clearInterval(Me),Me=null},pt.fx.speeds={slow:600,fast:200,_default:400},pt.fn.delay=function(e,i){return e=pt.fx?pt.fx.speeds[e]||e:e,i=i||"fx",this.queue(i,function(i,n){var o=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(o)}})},function(){var t,e=nt.createElement("input"),i=nt.createElement("div"),n=nt.createElement("select"),o=n.appendChild(nt.createElement("option"));i=nt.createElement("div"),i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",dt.getSetAttribute="t"!==i.className,dt.style=/top/.test(t.getAttribute("style")),dt.hrefNormalized="/a"===t.getAttribute("href"),dt.checkOn=!!e.value,dt.optSelected=o.selected,dt.enctype=!!nt.createElement("form").enctype,n.disabled=!0,dt.optDisabled=!o.disabled,e=nt.createElement("input"),e.setAttribute("value",""),dt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),dt.radioValue="t"===e.value}();var Le=/\r/g;pt.fn.extend({val:function(t){var e,i,n,o=this[0];{if(arguments.length)return n=pt.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=n?t.call(this,i,pt(this).val()):t,null==o?o="":"number"==typeof o?o+="":pt.isArray(o)&&(o=pt.map(o,function(t){return null==t?"":t+""})),e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return e=pt.valHooks[o.type]||pt.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(Le,""):null==i?"":i)}}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t))}},select:{get:function(t){for(var e,i,n=t.options,o=t.selectedIndex,r="select-one"===t.type||o<0,s=r?null:[],a=r?o+1:n.length,l=o<0?a:r?o:0;l<a;l++)if(i=n[l],(i.selected||l===o)&&(dt.optDisabled?!i.disabled:null===i.getAttribute("disabled"))&&(!i.parentNode.disabled||!pt.nodeName(i.parentNode,"optgroup"))){if(e=pt(i).val(),r)return e;s.push(e)}return s},set:function(t,e){for(var i,n,o=t.options,r=pt.makeArray(e),s=o.length;s--;)if(n=o[s],pt.inArray(pt.valHooks.option.get(n),r)>=0)try{n.selected=i=!0}catch(t){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(pt.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},dt.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Pe,De,Ie=pt.expr.attrHandle,Oe=/^(?:checked|selected)$/i,Ne=dt.getSetAttribute,Re=dt.input;pt.fn.extend({attr:function(t,e){return Bt(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?pt.prop(t,e,i):(1===r&&pt.isXMLDoc(t)||(e=e.toLowerCase(),o=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?De:Pe)),
void 0!==i?null===i?void pt.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:(n=pt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!dt.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,o=0,r=e&&e.match(Lt);if(r&&1===t.nodeType)for(;i=r[o++];)n=pt.propFix[i]||i,pt.expr.match.bool.test(i)?Re&&Ne||!Oe.test(i)?t[n]=!1:t[pt.camelCase("default-"+i)]=t[n]=!1:pt.attr(t,i,""),t.removeAttribute(Ne?i:n)}}),De={set:function(t,e,i){return e===!1?pt.removeAttr(t,i):Re&&Ne||!Oe.test(i)?t.setAttribute(!Ne&&pt.propFix[i]||i,i):t[pt.camelCase("default-"+i)]=t[i]=!0,i}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Ie[e]||pt.find.attr;Re&&Ne||!Oe.test(e)?Ie[e]=function(t,e,n){var o,r;return n||(r=Ie[e],Ie[e]=o,o=null!=i(t,e,n)?e.toLowerCase():null,Ie[e]=r),o}:Ie[e]=function(t,e,i){if(!i)return t[pt.camelCase("default-"+e)]?e.toLowerCase():null}}),Re&&Ne||(pt.attrHooks.value={set:function(t,e,i){return pt.nodeName(t,"input")?void(t.defaultValue=e):Pe&&Pe.set(t,e,i)}}),Ne||(Pe={set:function(t,e,i){var n=t.getAttributeNode(i);if(n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i))return e}},Ie.id=Ie.name=Ie.coords=function(t,e,i){var n;if(!i)return(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},pt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);if(i&&i.specified)return i.value},set:Pe.set},pt.attrHooks.contenteditable={set:function(t,e,i){Pe.set(t,""!==e&&e,i)}},pt.each(["width","height"],function(t,e){pt.attrHooks[e]={set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}}})),dt.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var ze=/^(?:input|select|textarea|button|object)$/i,$e=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Bt(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),pt.extend({prop:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,o=pt.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):ze.test(t.nodeName)||$e.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),dt.hrefNormalized||pt.each(["href","src"],function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),dt.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),dt.enctype||(pt.propFix.enctype="encoding");var He=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,i,n,o,r,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,G(this)))});if("string"==typeof t&&t)for(e=t.match(Lt)||[];i=this[l++];)if(o=G(i),n=1===i.nodeType&&(" "+o+" ").replace(He," ")){for(s=0;r=e[s++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");a=pt.trim(n),o!==a&&pt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,o,r,s,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,G(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Lt)||[];i=this[l++];)if(o=G(i),n=1===i.nodeType&&(" "+o+" ").replace(He," ")){for(s=0;r=e[s++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");a=pt.trim(n),o!==a&&pt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(i){pt(this).toggleClass(t.call(this,i,G(this),e),e)}):this.each(function(){var e,n,o,r;if("string"===i)for(n=0,o=pt(this),r=t.match(Lt)||[];e=r[n++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||(e=G(this),e&&pt._data(this,"__className__",e),pt.attr(this,"class",e||t===!1?"":pt._data(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+G(i)+" ").replace(He," ").indexOf(e)>-1)return!0;return!1}}),pt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){pt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Be=t.location,je=pt.now(),We=/\?/,Fe=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var i,n=null,o=pt.trim(e+"");return o&&!pt.trim(o.replace(Fe,function(t,e,o,r){return i&&e&&(n=0),0===n?t:(i=o||e,n+=!r-!o,"")}))?Function("return "+o)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(n=new t.DOMParser,i=n.parseFromString(e,"text/xml")):(i=new t.ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(e))}catch(t){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),i};var qe=/#.*$/,Ge=/([?&])_=[^&]*/,Xe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,_e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ue=/^(?:GET|HEAD)$/,Ve=/^\/\//,Ye=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ke={},Qe={},Ze="*/".concat("*"),Je=Be.href,ti=Ye.exec(Je.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Je,type:"GET",isLocal:_e.test(ti[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?U(U(t,pt.ajaxSettings),e):U(pt.ajaxSettings,t)},ajaxPrefilter:X(Ke),ajaxTransport:X(Qe),ajax:function(e,i){function n(e,i,n,o){var r,d,y,b,w,k=i;2!==x&&(x=2,l&&t.clearTimeout(l),c=void 0,a=o||"",T.readyState=e>0?4:0,r=e>=200&&e<300||304===e,n&&(b=V(u,T,n)),b=Y(u,b,T,r),r?(u.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pt.lastModified[s]=w),w=T.getResponseHeader("etag"),w&&(pt.etag[s]=w)),204===e||"HEAD"===u.type?k="nocontent":304===e?k="notmodified":(k=b.state,d=b.data,y=b.error,r=!y)):(y=k,!e&&k||(k="error",e<0&&(e=0))),T.status=e,T.statusText=(i||k)+"",r?g.resolveWith(p,[d,k,T]):g.rejectWith(p,[T,k,y]),T.statusCode(v),v=void 0,h&&f.trigger(r?"ajaxSuccess":"ajaxError",[T,u,r?d:y]),m.fireWith(p,[T,k]),h&&(f.trigger("ajaxComplete",[T,u]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(i=e,e=void 0),i=i||{};var o,r,s,a,l,h,c,d,u=pt.ajaxSetup({},i),p=u.context||u,f=u.context&&(p.nodeType||p.jquery)?pt(p):pt.event,g=pt.Deferred(),m=pt.Callbacks("once memory"),v=u.statusCode||{},y={},b={},x=0,w="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(2===x){if(!d)for(d={};e=Xe.exec(a);)d[e[1].toLowerCase()]=e[2];e=d[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return x||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return x||(u.mimeType=t),this},statusCode:function(t){var e;if(t)if(x<2)for(e in t)v[e]=[v[e],t[e]];else T.always(t[T.status]);return this},abort:function(t){var e=t||w;return c&&c.abort(e),n(0,e),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,u.url=((e||u.url||Je)+"").replace(qe,"").replace(Ve,ti[1]+"//"),u.type=i.method||i.type||u.method||u.type,u.dataTypes=pt.trim(u.dataType||"*").toLowerCase().match(Lt)||[""],null==u.crossDomain&&(o=Ye.exec(u.url.toLowerCase()),u.crossDomain=!(!o||o[1]===ti[1]&&o[2]===ti[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(ti[3]||("http:"===ti[1]?"80":"443")))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=pt.param(u.data,u.traditional)),_(Ke,u,i,T),2===x)return T;h=pt.event&&u.global,h&&0===pt.active++&&pt.event.trigger("ajaxStart"),u.type=u.type.toUpperCase(),u.hasContent=!Ue.test(u.type),s=u.url,u.hasContent||(u.data&&(s=u.url+=(We.test(s)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=Ge.test(s)?s.replace(Ge,"$1_="+je++):s+(We.test(s)?"&":"?")+"_="+je++)),u.ifModified&&(pt.lastModified[s]&&T.setRequestHeader("If-Modified-Since",pt.lastModified[s]),pt.etag[s]&&T.setRequestHeader("If-None-Match",pt.etag[s])),(u.data&&u.hasContent&&u.contentType!==!1||i.contentType)&&T.setRequestHeader("Content-Type",u.contentType),T.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+Ze+"; q=0.01":""):u.accepts["*"]);for(r in u.headers)T.setRequestHeader(r,u.headers[r]);if(u.beforeSend&&(u.beforeSend.call(p,T,u)===!1||2===x))return T.abort();w="abort";for(r in{success:1,error:1,complete:1})T[r](u[r]);if(c=_(Qe,u,i,T)){if(T.readyState=1,h&&f.trigger("ajaxSend",[T,u]),2===x)return T;u.async&&u.timeout>0&&(l=t.setTimeout(function(){T.abort("timeout")},u.timeout));try{x=1,c.send(y,n)}catch(t){if(!(x<2))throw t;n(-1,t)}}else n(-1,"No Transport");return T},getJSON:function(t,e,i){return pt.get(t,e,i,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,i,n,o){return pt.isFunction(i)&&(o=o||n,n=i,i=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:o,data:i,success:n},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each(function(e){pt(this).wrapAll(t.call(this,e))});if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(i){pt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)}).end()}}),pt.expr.filters.hidden=function(t){return dt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:Q(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var ei=/%20/g,ii=/\[\]$/,ni=/\r?\n/g,oi=/^(?:submit|button|image|reset|file)$/i,ri=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var i,n=[],o=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){o(this.name,this.value)});else for(i in t)Z(i,t[i],e,o);return n.join("&").replace(ei,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&ri.test(this.nodeName)&&!oi.test(t)&&(this.checked||!jt.test(t))}).map(function(t,e){var i=pt(this).val();return null==i?null:pt.isArray(i)?pt.map(i,function(t){return{name:e.name,value:t.replace(ni,"\r\n")}}):{name:e.name,value:i.replace(ni,"\r\n")}}).get()}}),pt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():nt.documentMode>8?J():/^(get|post|head|put|delete|options)$/i.test(this.type)&&J()||tt()}:J;var si=0,ai={},li=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in ai)ai[t](void 0,!0)}),dt.cors=!!li&&"withCredentials"in li,li=dt.ajax=!!li,li&&pt.ajaxTransport(function(e){if(!e.crossDomain||dt.cors){var i;return{send:function(n,o){var r,s=e.xhr(),a=++si;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)s[r]=e.xhrFields[r];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&s.setRequestHeader(r,n[r]+"");s.send(e.hasContent&&e.data||null),i=function(t,n){var r,l,h;if(i&&(n||4===s.readyState))if(delete ai[a],i=void 0,s.onreadystatechange=pt.noop,n)4!==s.readyState&&s.abort();else{h={},r=s.status,"string"==typeof s.responseText&&(h.text=s.responseText);try{l=s.statusText}catch(t){l=""}r||!e.isLocal||e.crossDomain?1223===r&&(r=204):r=h.text?200:404}h&&o(r,l,h,s.getAllResponseHeaders())},e.async?4===s.readyState?t.setTimeout(i):s.onreadystatechange=ai[a]=i:i()},abort:function(){i&&i(void 0,!0)}}}}),pt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=nt.head||pt("head")[0]||nt.documentElement;return{send:function(n,o){e=nt.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||o(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var hi=[],ci=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=hi.pop()||pt.expando+"_"+je++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,i,n){var o,r,s,a=e.jsonp!==!1&&(ci.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ci.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ci,"$1"+o):e.jsonp!==!1&&(e.url+=(We.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||pt.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},n.always(function(){void 0===r?pt(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=i.jsonpCallback,hi.push(o)),s&&pt.isFunction(r)&&r(s[0]),s=r=void 0}),"script"}),dt.createHTMLDocument=function(){if(!nt.implementation.createHTMLDocument)return!1;var t=nt.implementation.createHTMLDocument("");return t.body.innerHTML="<form></form><form></form>",2===t.body.childNodes.length}(),pt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||(dt.createHTMLDocument?nt.implementation.createHTMLDocument(""):nt);var n=Tt.exec(t),o=!i&&[];return n?[e.createElement(n[1])]:(n=v([t],e,o),o&&o.length&&pt(o).remove(),pt.merge([],n.childNodes))};var di=pt.fn.load;pt.fn.load=function(t,e,i){if("string"!=typeof t&&di)return di.apply(this,arguments);var n,o,r,s=this,a=t.indexOf(" ");return a>-1&&(n=pt.trim(t.slice(a,t.length)),t=t.slice(0,a)),pt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&pt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){r=arguments,s.html(n?pt("<div>").append(pt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(s,r||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,i){var n,o,r,s,a,l,h,c=pt.css(t,"position"),d=pt(t),u={};"static"===c&&(t.style.position="relative"),a=d.offset(),r=pt.css(t,"top"),l=pt.css(t,"left"),h=("absolute"===c||"fixed"===c)&&pt.inArray("auto",[r,l])>-1,h?(n=d.position(),s=n.top,o=n.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,i,pt.extend({},a))),null!=e.top&&(u.top=e.top-a.top+s),null!=e.left&&(u.left=e.left-a.left+o),"using"in e?e.using.call(t,u):d.css(u)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return e=r.documentElement,pt.contains(e,o)?("undefined"!=typeof o.getBoundingClientRect&&(n=o.getBoundingClientRect()),i=et(r),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===pt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(i=t.offset()),i.top+=pt.css(t[0],"borderTopWidth",!0),i.left+=pt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-pt.css(n,"marginTop",!0),left:e.left-i.left-pt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||pe})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);pt.fn[t]=function(n){return Bt(this,function(t,n,o){var r=et(t);return void 0===o?r?e in r?r[e]:r.document.documentElement[n]:t[n]:void(r?r.scrollTo(i?pt(r).scrollLeft():o,i?o:pt(r).scrollTop()):t[n]=o)},t,n,arguments.length,null)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=D(dt.pixelPosition,function(t,i){if(i)return i=ge(t,e),de.test(i)?pt(t).position()[e]+"px":i})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){pt.fn[n]=function(n,o){var r=arguments.length&&(i||"boolean"!=typeof n),s=i||(n===!0||o===!0?"margin":"border");return Bt(this,function(e,i,n){var o;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===n?pt.css(e,i,s):pt.style(e,i,n,s)},e,r?n:void 0,r,null)}})}),pt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var ui=t.jQuery,pi=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=pi),e&&t.jQuery===pt&&(t.jQuery=ui),pt},e||(t.jQuery=t.$=pt),pt}),function(t,e){"use strict";t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i,n=t(document);t.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=i.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+i.csrfParam()+'"]').val(i.csrfToken())},fire:function(e,i,n){var o=t.Event(i);return e.trigger(o,n),o.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&t.data("remote")!==!1},handleRemote:function(n){var o,r,s,a,l,h;if(i.fire(n,"ajax:before")){if(a=n.data("with-credentials")||null,l=n.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,n.is("form")){o=n.data("ujs:submit-button-formmethod")||n.attr("method"),r=n.data("ujs:submit-button-formaction")||n.attr("action"),s=t(n[0]).serializeArray();var c=n.data("ujs:submit-button");c&&(s.push(c),n.data("ujs:submit-button",null)),n.data("ujs:submit-button-formmethod",null),n.data("ujs:submit-button-formaction",null)}else n.is(i.inputChangeSelector)?(o=n.data("method"),r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):n.is(i.buttonClickSelector)?(o=n.data("method")||"get",r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):(o=n.data("method"),r=i.href(n),s=n.data("params")||null);return h={type:o||"GET",data:s,dataType:l,beforeSend:function(t,o){return o.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),!!i.fire(n,"ajax:beforeSend",[t,o])&&void n.trigger("ajax:send",t)},success:function(t,e,i){n.trigger("ajax:success",[t,e,i])},complete:function(t,e){n.trigger("ajax:complete",[t,e])},error:function(t,e,i){n.trigger("ajax:error",[t,e,i])},crossDomain:i.isCrossDomain(r)},a&&(h.xhrFields={withCredentials:a}),r&&(h.url=r),i.ajax(h)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var i=document.createElement("a");try{return i.href=t,i.href=i.href,!((!i.protocol||":"===i.protocol)&&!i.host||e.protocol+"//"+e.host==i.protocol+"//"+i.host)}catch(t){return!0}},handleMethod:function(n){var o=i.href(n),r=n.data("method"),s=n.attr("target"),a=i.csrfToken(),l=i.csrfParam(),h=t('<form method="post" action="'+o+'"></form>'),c='<input name="_method" value="'+r+'" type="hidden" />';l===e||a===e||i.isCrossDomain(o)||(c+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&h.attr("target",s),h.hide().append(c).appendTo("body"),h.submit()},formElements:function(e,i){return e.is("form")?t(e[0].elements).filter(i):e.find(i)},disableFormElements:function(e){i.formElements(e,i.disableSelector).each(function(){i.disableFormElement(t(this))})},disableFormElement:function(t){var i,n;i=t.is("button")?"html":"val",n=t.data("disable-with"),n!==e&&(t.data("ujs:enable-with",t[i]()),t[i](n)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(e){i.formElements(e,i.enableSelector).each(function(){i.enableFormElement(t(this))})},enableFormElement:function(t){var i=t.is("button")?"html":"val";t.data("ujs:enable-with")!==e&&(t[i](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,n=t.data("confirm"),o=!1;if(!n)return!0;if(i.fire(t,"confirm")){try{o=i.confirm(n)}catch(t){(console.error||console.log).call(console,t.stack||t)}e=i.fire(t,"confirm:complete",[o])}return o&&e},blankInputs:function(e,i,n){var o,r,s,a,l=t(),h=i||"input,textarea",c=e.find(h),d={};return c.each(function(){o=t(this),o.is("input[type=radio]")?(a=o.attr("name"),d[a]||(0===e.find('input[type=radio]:checked[name="'+a+'"]').length&&(s=e.find('input[type=radio][name="'+a+'"]'),l=l.add(s)),d[a]=a)):(r=o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):!!o.val(),r===n&&(l=l.add(o)))}),!!l.length&&l},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var n=t.data("disable-with");n!==e&&(t.data("ujs:enable-with",t.html()),t.html(n)),t.bind("click.railsDisable",function(t){return i.stopEverything(t)}),t.data("ujs:disabled",!0)},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable"),t.removeData("ujs:disabled")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableElement(e)})}),n.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),n.delegate(i.buttonDisableSelector,"ajax:complete",function(){i.enableFormElement(t(this))}),n.delegate(i.linkClickSelector,"click.rails",function(e){var n=t(this),o=n.data("method"),r=n.data("params"),s=e.metaKey||e.ctrlKey;if(!i.allowAction(n))return i.stopEverything(e);if(!s&&n.is(i.linkDisableSelector)&&i.disableElement(n),i.isRemote(n)){if(s&&(!o||"GET"===o)&&!r)return!0;var a=i.handleRemote(n);return a===!1?i.enableElement(n):a.fail(function(){i.enableElement(n)}),!1}return o?(i.handleMethod(n),!1):void 0}),n.delegate(i.buttonClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n)||!i.isRemote(n))return i.stopEverything(e);n.is(i.buttonDisableSelector)&&i.disableFormElement(n);var o=i.handleRemote(n);return o===!1?i.enableFormElement(n):o.fail(function(){i.enableFormElement(n)}),!1}),n.delegate(i.inputChangeSelector,"change.rails",function(e){var n=t(this);return i.allowAction(n)&&i.isRemote(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var o,r,s=t(this),a=i.isRemote(s);if(!i.allowAction(s))return i.stopEverything(n);if(s.attr("novalidate")===e)if(s.data("ujs:formnovalidate-button")===e){if(o=i.blankInputs(s,i.requiredInputSelector,!1),o&&i.fire(s,"ajax:aborted:required",[o]))return i.stopEverything(n)}else s.data("ujs:formnovalidate-button",e);if(a){if(r=i.nonBlankInputs(s,i.fileInputSelector)){setTimeout(function(){i.disableFormElements(s)},13);var l=i.fire(s,"ajax:aborted:file",[r]);return l||setTimeout(function(){i.enableFormElements(s)},13),l}return i.handleRemote(s),!1}setTimeout(function(){i.disableFormElements(s)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var o=n.attr("name"),r=o?{name:o,value:n.val()}:null,s=n.closest("form");0===s.length&&(s=t("#"+n.attr("form"))),s.data("ujs:submit-button",r),s.data("ujs:formnovalidate-button",n.attr("formnovalidate")),s.data("ujs:submit-button-formaction",n.attr("formaction")),s.data("ujs:submit-button-formmethod",n.attr("formmethod"))}),n.delegate(i.formSubmitSelector,"ajax:send.rails",function(e){this===e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this===e.target&&i.enableFormElements(t(this))}),t(function(){i.refreshCSRFTokens()}))}(jQuery),function(){}.call(this),function(){(function(){(function(){var e=[].slice;this.ActionCable={INTERNAL:{message_types:{welcome:"welcome",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},createConsumer:function(e){var i;return null==e&&(e=null!=(i=this.getConfig("url"))?i:this.INTERNAL.default_mount_path),new t.Consumer(this.createWebSocketURL(e))},getConfig:function(t){var e;return e=document.head.querySelector("meta[name='action-cable-"+t+"']"),null!=e?e.getAttribute("content"):void 0},createWebSocketURL:function(t){var e;return t&&!/^wss?:/i.test(t)?(e=document.createElement("a"),e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href):t},startDebugging:function(){return this.debugging=!0},stopDebugging:function(){return this.debugging=null},log:function(){var t;if(t=1<=arguments.length?e.call(arguments,0):[],this.debugging)return t.push(Date.now()),console.log.apply(console,["[ActionCable]"].concat(e.call(t)))}}}).call(this)}).call(this);var t=this.ActionCable;(function(){(function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ConnectionMonitor=function(){function i(t){this.connection=t,this.visibilityDidChange=e(this.visibilityDidChange,this),this.reconnectAttempts=0}var n,o,r;return i.pollInterval={min:3,max:30},i.staleThreshold=6,i.prototype.start=function(){if(!this.isRunning())return this.startedAt=o(),delete this.stoppedAt,this.startPolling(),document.addEventListener("visibilitychange",this.visibilityDidChange),t.log("ConnectionMonitor started. pollInterval = "+this.getPollInterval()+" ms")},i.prototype.stop=function(){if(this.isRunning())return this.stoppedAt=o(),this.stopPolling(),document.removeEventListener("visibilitychange",this.visibilityDidChange),t.log("ConnectionMonitor stopped")},i.prototype.isRunning=function(){return null!=this.startedAt&&null==this.stoppedAt},i.prototype.recordPing=function(){return this.pingedAt=o()},i.prototype.recordConnect=function(){return this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,t.log("ConnectionMonitor recorded connect")},i.prototype.recordDisconnect=function(){return this.disconnectedAt=o(),t.log("ConnectionMonitor recorded disconnect")},i.prototype.startPolling=function(){return this.stopPolling(),this.poll()},i.prototype.stopPolling=function(){return clearTimeout(this.pollTimeout)},i.prototype.poll=function(){return this.pollTimeout=setTimeout(function(t){return function(){return t.reconnectIfStale(),t.poll()}}(this),this.getPollInterval())},i.prototype.getPollInterval=function(){var t,e,i,o;return o=this.constructor.pollInterval,i=o.min,e=o.max,t=5*Math.log(this.reconnectAttempts+1),Math.round(1e3*n(t,i,e))},i.prototype.reconnectIfStale=function(){if(this.connectionIsStale())return t.log("ConnectionMonitor detected stale connection. reconnectAttempts = "+this.reconnectAttempts+", pollInterval = "+this.getPollInterval()+" ms, time disconnected = "+r(this.disconnectedAt)+" s, stale threshold = "+this.constructor.staleThreshold+" s"),this.reconnectAttempts++,this.disconnectedRecently()?t.log("ConnectionMonitor skipping reopening recent disconnect"):(t.log("ConnectionMonitor reopening"),this.connection.reopen())},i.prototype.connectionIsStale=function(){var t;return r(null!=(t=this.pingedAt)?t:this.startedAt)>this.constructor.staleThreshold},i.prototype.disconnectedRecently=function(){return this.disconnectedAt&&r(this.disconnectedAt)<this.constructor.staleThreshold},i.prototype.visibilityDidChange=function(){if("visible"===document.visibilityState)return setTimeout(function(e){return function(){if(e.connectionIsStale()||!e.connection.isOpen())return t.log("ConnectionMonitor reopening stale connection on visibilitychange. visbilityState = "+document.visibilityState),e.connection.reopen()}}(this),200)},o=function(){return(new Date).getTime()},r=function(t){return(o()-t)/1e3},n=function(t,e,i){return Math.max(e,Math.min(i,t))},i}()}).call(this),function(){var e,i,n,o,r,s,a=[].slice,l=function(t,e){return function(){return t.apply(e,arguments)}},h=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;
return-1};o=t.INTERNAL,i=o.message_types,n=o.protocols,r=2<=n.length?a.call(n,0,e=n.length-1):(e=0,[]),s=n[e++],t.Connection=function(){function e(e){this.consumer=e,this.open=l(this.open,this),this.subscriptions=this.consumer.subscriptions,this.monitor=new t.ConnectionMonitor(this),this.disconnected=!0}return e.reopenDelay=500,e.prototype.send=function(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)},e.prototype.open=function(){if(this.isActive())throw t.log("Attempted to open WebSocket, but existing socket is "+this.getState()),new Error("Existing connection must be closed before opening");return t.log("Opening WebSocket, current state is "+this.getState()+", subprotocols: "+n),null!=this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new WebSocket(this.consumer.url,n),this.installEventHandlers(),this.monitor.start(),!0},e.prototype.close=function(t){var e,i;if(e=(null!=t?t:{allowReconnect:!0}).allowReconnect,e||this.monitor.stop(),this.isActive())return null!=(i=this.webSocket)?i.close():void 0},e.prototype.reopen=function(){var e;if(t.log("Reopening WebSocket, current state is "+this.getState()),!this.isActive())return this.open();try{return this.close()}catch(i){return e=i,t.log("Failed to reopen WebSocket",e)}finally{t.log("Reopening WebSocket in "+this.constructor.reopenDelay+"ms"),setTimeout(this.open,this.constructor.reopenDelay)}},e.prototype.getProtocol=function(){var t;return null!=(t=this.webSocket)?t.protocol:void 0},e.prototype.isOpen=function(){return this.isState("open")},e.prototype.isActive=function(){return this.isState("open","connecting")},e.prototype.isProtocolSupported=function(){var t;return t=this.getProtocol(),h.call(r,t)>=0},e.prototype.isState=function(){var t,e;return e=1<=arguments.length?a.call(arguments,0):[],t=this.getState(),h.call(e,t)>=0},e.prototype.getState=function(){var t,e,i;for(e in WebSocket)if(i=WebSocket[e],i===(null!=(t=this.webSocket)?t.readyState:void 0))return e.toLowerCase();return null},e.prototype.installEventHandlers=function(){var t,e;for(t in this.events)e=this.events[t].bind(this),this.webSocket["on"+t]=e},e.prototype.uninstallEventHandlers=function(){var t;for(t in this.events)this.webSocket["on"+t]=function(){}},e.prototype.events={message:function(t){var e,n,o,r;if(this.isProtocolSupported())switch(o=JSON.parse(t.data),e=o.identifier,n=o.message,r=o.type,r){case i.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case i.ping:return this.monitor.recordPing();case i.confirmation:return this.subscriptions.notify(e,"connected");case i.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open:function(){if(t.log("WebSocket onopen event, using '"+this.getProtocol()+"' subprotocol"),this.disconnected=!1,!this.isProtocolSupported())return t.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close:function(){if(t.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error:function(){return t.log("WebSocket onerror event")}},e}()}.call(this),function(){var e=[].slice;t.Subscriptions=function(){function i(t){this.consumer=t,this.subscriptions=[]}return i.prototype.create=function(e,i){var n,o,r;return n=e,o="object"==typeof n?n:{channel:n},r=new t.Subscription(this.consumer,o,i),this.add(r)},i.prototype.add=function(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.sendCommand(t,"subscribe"),t},i.prototype.remove=function(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t},i.prototype.reject=function(t){var e,i,n,o,r;for(n=this.findAll(t),o=[],e=0,i=n.length;e<i;e++)r=n[e],this.forget(r),this.notify(r,"rejected"),o.push(r);return o},i.prototype.forget=function(t){var e;return this.subscriptions=function(){var i,n,o,r;for(o=this.subscriptions,r=[],i=0,n=o.length;i<n;i++)e=o[i],e!==t&&r.push(e);return r}.call(this),t},i.prototype.findAll=function(t){var e,i,n,o,r;for(n=this.subscriptions,o=[],e=0,i=n.length;e<i;e++)r=n[e],r.identifier===t&&o.push(r);return o},i.prototype.reload=function(){var t,e,i,n,o;for(i=this.subscriptions,n=[],t=0,e=i.length;t<e;t++)o=i[t],n.push(this.sendCommand(o,"subscribe"));return n},i.prototype.notifyAll=function(){var t,i,n,o,r,s,a;for(i=arguments[0],t=2<=arguments.length?e.call(arguments,1):[],r=this.subscriptions,s=[],n=0,o=r.length;n<o;n++)a=r[n],s.push(this.notify.apply(this,[a,i].concat(e.call(t))));return s},i.prototype.notify=function(){var t,i,n,o,r,s,a;for(s=arguments[0],i=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],a="string"==typeof s?this.findAll(s):[s],r=[],n=0,o=a.length;n<o;n++)s=a[n],r.push("function"==typeof s[i]?s[i].apply(s,t):void 0);return r},i.prototype.sendCommand=function(t,e){var i;return i=t.identifier,this.consumer.send({command:e,identifier:i})},i}()}.call(this),function(){t.Subscription=function(){function t(t,i,n){this.consumer=t,null==i&&(i={}),this.identifier=JSON.stringify(i),e(this,n)}var e;return t.prototype.perform=function(t,e){return null==e&&(e={}),e.action=t,this.send(e)},t.prototype.send=function(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})},t.prototype.unsubscribe=function(){return this.consumer.subscriptions.remove(this)},e=function(t,e){var i,n;if(null!=e)for(i in e)n=e[i],t[i]=n;return t},t}()}.call(this),function(){t.Consumer=function(){function e(e){this.url=e,this.subscriptions=new t.Subscriptions(this),this.connection=new t.Connection(this)}return e.prototype.send=function(t){return this.connection.send(t)},e.prototype.connect=function(){return this.connection.open()},e.prototype.disconnect=function(){return this.connection.close({allowReconnect:!1})},e.prototype.ensureActiveConnection=function(){if(!this.connection.isActive())return this.connection.open()},e}()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}.call(this),function(){this.App||(this.App={}),App.cable=ActionCable.createConsumer()}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),function(){}.call(this),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var s=t("#"===r?[]:r);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.7",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new i(this,r)),"number"==typeof e?o.to(e):s?o[s]():r.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(i+o)%this.$items.length;return this.$items.eq(r)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){if(!this.sliding)return this.slide("next")},i.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},i.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),s=this.interval,a="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var h=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:h,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var u=t.Event("slid.bs.carousel",{relatedTarget:h,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(u)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(i){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),e.call(r,s),a&&r.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),o=i.data("bs.collapse"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||i.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),e||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),s=r.data("bs.collapse"),a=s?"toggle":o.data();i.call(r,a)})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(o[0],i.target)||(o.trigger(i=t.Event("hide.bs.dropdown",r)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.7",s.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),s=r.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),s=o.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&h<l.length-1&&h++,~h||(h=0),l.eq(h).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,s.prototype.toggle).on("keydown.bs.dropdown.data-api",r,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);r||o.data("bs.modal",r=new i(this,s)),"string"==typeof e?r[e](n):s.show&&r.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,o=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),o&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});o?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(r)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),o=n.attr("href"),r=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),n.data());n.is("a")&&i.preventDefault(),r.one("show.bs.modal",function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(r,s,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tooltip"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.tooltip",o=new i(this,r)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),!i.isInStateTrue())return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),s=this.getUID(this.type);this.setContent(),r.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(a);h&&(a=a.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=r[0].offsetWidth,u=r[0].offsetHeight;if(h){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+u>f.bottom?"top":"top"==a&&c.top-u<f.top?"bottom":"right"==a&&c.right+d>f.width?"left":"left"==a&&c.left-d<f.left?"right":a,r.removeClass(p).addClass(a)}var g=this.getCalculatedOffset(a,c,d,u);this.applyPlacement(g,a);var m=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",m).emulateTransitionEnd(i.TRANSITION_DURATION):m()}},i.prototype.applyPlacement=function(e,i){var n=this.tip(),o=n[0].offsetWidth,r=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,h=n[0].offsetHeight;"top"==i&&h!=r&&(e.top=e.top+r-h);var c=this.getViewportAdjustedDelta(i,e,l,h);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(i),u=d?2*c.left-o+l:2*c.top-r+h,p=d?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(u,n[0][p],d)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function n(){"in"!=o.hoverState&&r.detach(),o.$element&&o.$element.removeAttr("aria-describedby").trigger("hidden.bs."+o.type),e&&e()}var o=this,r=t(this.$tip),s=t.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n(),this.hoverState=null,this},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName,o=i.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&i instanceof window.SVGElement,s=n?{
top:0,left:0}:r?null:e.offset(),a={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,s)},i.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,l=e.top+r-s.scroll+n;a<s.top?o.top=s.top-a:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var h=e.left-r,c=e.left+r+i;h<s.left?o.left=s.left-h:c>s.right&&(o.left=s.left+s.width-c)}return o},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new i(this,r)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.7",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),+function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof i&&o[i]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[i]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e<o[0])return this.activeTarget=null,this.clear();for(t=o.length;t--;)s!=r[t]&&e>=o[t]&&(void 0===o[t+1]||e<o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tab");o||n.data("bs.tab",o=new i(this)),"string"==typeof e&&o[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=i.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(r),e.trigger(s),!s.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},i.prototype.activate=function(e,n,o){function r(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=n.find("> .active"),a=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(i.TRANSITION_DURATION):r(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.7",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return o<i&&"top";if("bottom"==this.affixed)return null!=i?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-n)&&"bottom";var a=null==this.affixed,l=a?o:r.top,h=a?s:e;return null!=i&&o<=i?"top":null!=n&&l+h>=t-n&&"bottom"},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(s,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),function(){(function(){(function(){this.Turbolinks={supported:function(){return null!=window.history.pushState&&null!=window.requestAnimationFrame}(),visit:function(e,i){return t.controller.visit(e,i)},clearCache:function(){return t.controller.clearCache()}}}).call(this)}).call(this);var t=this.Turbolinks;(function(){(function(){var e,i;t.copyObject=function(t){var e,i,n;i={};for(e in t)n=t[e],i[e]=n;return i},t.closest=function(t,i){return e.call(t,i)},e=function(){var t,e;return t=document.documentElement,null!=(e=t.closest)?e:function(t){var e;for(e=this;e;){if(e.nodeType===Node.ELEMENT_NODE&&i.call(e,t))return e;e=e.parentNode}}}(),t.defer=function(t){return setTimeout(t,1)},t.dispatch=function(t,e){var i,n,o,r,s;return r=null!=e?e:{},s=r.target,i=r.cancelable,n=r.data,o=document.createEvent("Events"),o.initEvent(t,!0,i===!0),o.data=null!=n?n:{},(null!=s?s:document).dispatchEvent(o),o},t.match=function(t,e){return i.call(t,e)},i=function(){var t,e,i,n;return t=document.documentElement,null!=(e=null!=(i=null!=(n=t.matchesSelector)?n:t.webkitMatchesSelector)?i:t.msMatchesSelector)?e:t.mozMatchesSelector}(),t.uuid=function(){var t,e,i;for(i="",t=e=1;36>=e;t=++e)i+=9===t||14===t||19===t||24===t?"-":15===t?"4":20===t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return i}}).call(this),function(){t.Location=function(){function t(t){var e,i;null==t&&(t=""),i=document.createElement("a"),i.href=t.toString(),this.absoluteURL=i.href,e=i.hash.length,2>e?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-e),this.anchor=i.hash.slice(1))}var e,i,n,o;return t.wrap=function(t){return t instanceof this?t:new this(t)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var t,e;return null!=(t=null!=(e=this.absoluteURL.match(/\/\/[^\/]*(\/[^?;]*)/))?e[1]:void 0)?t:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var t,e;return null!=(t=null!=(e=this.getLastPathComponent().match(/\.[^.]*$/))?e[0]:void 0)?t:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(t){var e;return e=i(t),this.isEqualTo(t)||o(this.absoluteURL,e)},t.prototype.isEqualTo=function(t){return this.absoluteURL===(null!=t?t.absoluteURL:void 0)},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},i=function(t){return e(t.getOrigin()+t.getPath())},e=function(t){return n(t,"/")?t:t+"/"},o=function(t,e){return t.slice(0,e.length)===e},n=function(t,e){return t.slice(-e.length)===e},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.HttpRequest=function(){function i(i,n,o){this.delegate=i,this.requestCanceled=e(this.requestCanceled,this),this.requestTimedOut=e(this.requestTimedOut,this),this.requestFailed=e(this.requestFailed,this),this.requestLoaded=e(this.requestLoaded,this),this.requestProgressed=e(this.requestProgressed,this),this.url=t.Location.wrap(n).requestURL,this.referrer=t.Location.wrap(o).absoluteURL,this.createXHR()}return i.NETWORK_FAILURE=0,i.TIMEOUT_FAILURE=-1,i.timeout=60,i.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,"function"==typeof(t=this.delegate).requestStarted?t.requestStarted():void 0):void 0},i.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},i.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},i.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var e;return 200<=(e=t.xhr.status)&&300>e?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},i.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},i.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},i.prototype.requestCanceled=function(){return this.endRequest()},i.prototype.notifyApplicationBeforeRequestStart=function(){return t.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},i.prototype.notifyApplicationAfterRequestEnd=function(){return t.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},i.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},i.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),null!=t&&t.call(this),this.destroy()):void 0},i.prototype.setProgress=function(t){var e;return this.progress=t,"function"==typeof(e=this.delegate).requestProgressed?e.requestProgressed(this.progress):void 0},i.prototype.destroy=function(){var t;return this.setProgress(1),"function"==typeof(t=this.delegate).requestFinished&&t.requestFinished(),this.delegate=null,this.xhr=null},i}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ProgressBar=function(){function t(){this.trickle=e(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var i;return i=300,t.defaultCSS=".turbolinks-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition: width "+i+"ms ease-out, opacity "+i/2+"ms "+i/2+"ms ease-in;\n transform: translate3d(0, 0, 0);\n}",t.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},t.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(t){return function(){return t.uninstallProgressElement(),t.stopTrickling(),t.visible=!1,t.hiding=!1}}(this))):void 0},t.prototype.setValue=function(t){return this.value=t,this.refresh()},t.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},t.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},t.prototype.fadeProgressElement=function(t){return this.progressElement.style.opacity=0,setTimeout(t,1.5*i)},t.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},t.prototype.startTrickling=function(){return null!=this.trickleInterval?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,i)},t.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},t.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},t.prototype.refresh=function(){return requestAnimationFrame(function(t){return function(){return t.progressElement.style.width=10+90*t.value+"%"}}(this))},t.prototype.createStylesheetElement=function(){var t;return t=document.createElement("style"),t.type="text/css",t.textContent=this.constructor.defaultCSS,t},t.prototype.createProgressElement=function(){var t;return t=document.createElement("div"),t.className="turbolinks-progress-bar",t},t}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.BrowserAdapter=function(){function i(i){this.controller=i,this.showProgressBar=e(this.showProgressBar,this),this.progressBar=new t.ProgressBar}var n,o,r,s;return s=t.HttpRequest,n=s.NETWORK_FAILURE,r=s.TIMEOUT_FAILURE,o=500,i.prototype.visitProposedToLocationWithAction=function(t,e){return this.controller.startVisitToLocationWithAction(t,e)},i.prototype.visitStarted=function(t){return t.issueRequest(),t.changeHistory(),t.loadCachedSnapshot()},i.prototype.visitRequestStarted=function(t){return this.progressBar.setValue(0),t.hasCachedSnapshot()||"restore"!==t.action?this.showProgressBarAfterDelay():this.showProgressBar()},i.prototype.visitRequestProgressed=function(t){return this.progressBar.setValue(t.progress)},i.prototype.visitRequestCompleted=function(t){return t.loadResponse()},i.prototype.visitRequestFailedWithStatusCode=function(t,e){switch(e){case n:case r:return this.reload();default:return t.loadResponse()}},i.prototype.visitRequestFinished=function(){return this.hideProgressBar()},i.prototype.visitCompleted=function(t){return t.followRedirect()},i.prototype.pageInvalidated=function(){return this.reload()},i.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,o)},i.prototype.showProgressBar=function(){return this.progressBar.show()},i.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},i.prototype.reload=function(){return window.location.reload()},i}()}.call(this),function(){var e,i=function(t,e){return function(){return t.apply(e,arguments)}};e=!1,addEventListener("load",function(){return t.defer(function(){return e=!0})},!1),t.History=function(){function n(t){this.delegate=t,this.onPopState=i(this.onPopState,this)}return n.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),this.started=!0)},n.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),this.started=!1):void 0},n.prototype.push=function(e,i){return e=t.Location.wrap(e),this.update("push",e,i)},n.prototype.replace=function(e,i){return e=t.Location.wrap(e),this.update("replace",e,i)},n.prototype.onPopState=function(e){var i,n,o,r;return this.shouldHandlePopState()&&(r=null!=(n=e.state)?n.turbolinks:void 0)?(i=t.Location.wrap(window.location),o=r.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(i,o)):void 0},n.prototype.shouldHandlePopState=function(){return e===!0},n.prototype.update=function(t,e,i){var n;return n={turbolinks:{restorationIdentifier:i}},history[t+"State"](n,null,e)},n}()}.call(this),function(){t.Snapshot=function(){function e(t){var e,i;i=t.head,e=t.body,this.head=null!=i?i:document.createElement("head"),this.body=null!=e?e:document.createElement("body")}return e.wrap=function(t){return t instanceof this?t:this.fromHTML(t)},e.fromHTML=function(t){var e;return e=document.createElement("html"),e.innerHTML=t,this.fromElement(e)},e.fromElement=function(t){return new this({head:t.querySelector("head"),body:t.querySelector("body")})},e.prototype.clone=function(){return new e({head:this.head.cloneNode(!0),body:this.body.cloneNode(!0)})},e.prototype.getRootLocation=function(){var e,i;return i=null!=(e=this.getSetting("root"))?e:"/",new t.Location(i)},e.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},e.prototype.hasAnchor=function(t){try{return null!=this.body.querySelector("[id='"+t+"']")}catch(t){}},e.prototype.isPreviewable=function(){return"no-preview"!==this.getCacheControlValue()},e.prototype.isCacheable=function(){return"no-cache"!==this.getCacheControlValue()},e.prototype.getSetting=function(t){var e,i;return i=this.head.querySelectorAll("meta[name='turbolinks-"+t+"']"),e=i[i.length-1],null!=e?e.getAttribute("content"):void 0},e}()}.call(this),function(){var e=[].slice;t.Renderer=function(){function t(){}var i;return t.render=function(){var t,i,n,o;return n=arguments[0],i=arguments[1],t=3<=arguments.length?e.call(arguments,2):[],o=function(t,e,i){i.prototype=t.prototype;var n=new i,o=t.apply(n,e);return Object(o)===o?o:n}(this,t,function(){}),o.delegate=n,o.render(i),o},t.prototype.renderView=function(t){return this.delegate.viewWillRender(this.newBody),t(),this.delegate.viewRendered(this.newBody)},t.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},t.prototype.createScriptElement=function(t){var e;return"false"===t.getAttribute("data-turbolinks-eval")?t:(e=document.createElement("script"),e.textContent=t.textContent,i(e,t),e)},i=function(t,e){var i,n,o,r,s,a,l;for(r=e.attributes,a=[],i=0,n=r.length;n>i;i++)s=r[i],o=s.name,l=s.value,a.push(t.setAttribute(o,l));return a},t}()}.call(this),function(){t.HeadDetails=function(){function t(t){var e,i,r,s,a,l,h;for(this.element=t,this.elements={},h=this.element.childNodes,s=0,l=h.length;l>s;s++)r=h[s],r.nodeType===Node.ELEMENT_NODE&&(a=r.outerHTML,i=null!=(e=this.elements)[a]?e[a]:e[a]={type:o(r),tracked:n(r),elements:[]},i.elements.push(r))}var e,i,n,o;return t.prototype.hasElementWithKey=function(t){return t in this.elements},t.prototype.getTrackedElementSignature=function(){var t,e;return function(){var i,n;i=this.elements,n=[];for(t in i)e=i[t].tracked,e&&n.push(t);return n}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("script",t)},t.prototype.getStylesheetElementsNotInDetails=function(t){return this.getElementsMatchingTypeNotInDetails("stylesheet",t)},t.prototype.getElementsMatchingTypeNotInDetails=function(t,e){var i,n,o,r,s,a;o=this.elements,s=[];for(n in o)r=o[n],a=r.type,i=r.elements,a!==t||e.hasElementWithKey(n)||s.push(i[0]);return s},t.prototype.getProvisionalElements=function(){var t,e,i,n,o,r,s;i=[],n=this.elements;for(e in n)o=n[e],s=o.type,r=o.tracked,t=o.elements,null!=s||r?t.length>1&&i.push.apply(i,t.slice(1)):i.push.apply(i,t);return i},o=function(t){return e(t)?"script":i(t)?"stylesheet":void 0},n=function(t){return"reload"===t.getAttribute("data-turbolinks-track")},e=function(t){var e;return e=t.tagName.toLowerCase(),"script"===e},i=function(t){var e;return e=t.tagName.toLowerCase(),"style"===e||"link"===e&&"stylesheet"===t.getAttribute("rel")},t}()}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t.SnapshotRenderer=function(i){function n(e,i){this.currentSnapshot=e,this.newSnapshot=i,this.currentHeadDetails=new t.HeadDetails(this.currentSnapshot.head),this.newHeadDetails=new t.HeadDetails(this.newSnapshot.head),this.newBody=this.newSnapshot.body}return e(n,i),n.prototype.render=function(t){return this.trackedElementsAreIdentical()?(this.mergeHead(),this.renderView(function(e){return function(){return e.replaceBody(),e.focusFirstAutofocusableElement(),t()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){return this.activateBodyScriptElements(),this.importBodyPermanentElements(),this.assignNewBody()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var t,e,i,n,o;for(n=this.getNewHeadStylesheetElements(),o=[],e=0,i=n.length;i>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.copyNewHeadScriptElements=function(){var t,e,i,n,o;for(n=this.getNewHeadScriptElements(),o=[],e=0,i=n.length;i>e;e++)t=n[e],o.push(document.head.appendChild(this.createScriptElement(t)));return o},n.prototype.removeCurrentHeadProvisionalElements=function(){var t,e,i,n,o;for(n=this.getCurrentHeadProvisionalElements(),o=[],e=0,i=n.length;i>e;e++)t=n[e],o.push(document.head.removeChild(t));return o},n.prototype.copyNewHeadProvisionalElements=function(){var t,e,i,n,o;for(n=this.getNewHeadProvisionalElements(),o=[],e=0,i=n.length;i>e;e++)t=n[e],o.push(document.head.appendChild(t));return o},n.prototype.importBodyPermanentElements=function(){var t,e,i,n,o,r;for(n=this.getNewBodyPermanentElements(),r=[],e=0,i=n.length;i>e;e++)o=n[e],(t=this.findCurrentBodyPermanentElement(o))?r.push(o.parentNode.replaceChild(t,o)):r.push(void 0);return r},n.prototype.activateBodyScriptElements=function(){var t,e,i,n,o,r;for(n=this.getNewBodyScriptElements(),r=[],e=0,i=n.length;i>e;e++)o=n[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var t;return null!=(t=this.findFirstAutofocusableElement())?t.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getNewBodyPermanentElements=function(){return this.newBody.querySelectorAll("[id][data-turbolinks-permanent]")},n.prototype.findCurrentBodyPermanentElement=function(t){return document.body.querySelector("#"+t.id+"[data-turbolinks-permanent]")},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n.prototype.findFirstAutofocusableElement=function(){return document.body.querySelector("[autofocus]")},n}(t.Renderer)}.call(this),function(){var e=function(t,e){function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},i={}.hasOwnProperty;t.ErrorRenderer=function(t){function i(t){this.html=t}return e(i,t),i.prototype.render=function(t){return this.renderView(function(e){return function(){return e.replaceDocumentHTML(),e.activateBodyScriptElements(),t()}}(this))},i.prototype.replaceDocumentHTML=function(){return document.documentElement.innerHTML=this.html},i.prototype.activateBodyScriptElements=function(){var t,e,i,n,o,r;for(n=this.getScriptElements(),r=[],e=0,i=n.length;i>e;e++)o=n[e],t=this.createScriptElement(o),r.push(o.parentNode.replaceChild(t,o));return r},i.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},i}(t.Renderer)}.call(this),function(){t.View=function(){function e(t){this.delegate=t,this.element=document.documentElement}return e.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},e.prototype.getSnapshot=function(){return t.Snapshot.fromElement(this.element)},e.prototype.render=function(t,e){var i,n,o;return o=t.snapshot,i=t.error,n=t.isPreview,this.markAsPreview(n),null!=o?this.renderSnapshot(o,e):this.renderError(i,e)},e.prototype.markAsPreview=function(t){return t?this.element.setAttribute("data-turbolinks-preview",""):this.element.removeAttribute("data-turbolinks-preview")},e.prototype.renderSnapshot=function(e,i){return t.SnapshotRenderer.render(this.delegate,i,this.getSnapshot(),t.Snapshot.wrap(e))},e.prototype.renderError=function(e,i){return t.ErrorRenderer.render(this.delegate,i,e)},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.ScrollManager=function(){function t(t){this.delegate=t,this.onScroll=e(this.onScroll,this)}return t.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},t.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},t.prototype.scrollToElement=function(t){return t.scrollIntoView()},t.prototype.scrollToPosition=function(t){var e,i;return e=t.x,i=t.y,window.scrollTo(e,i)},t.prototype.onScroll=function(){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},t.prototype.updatePosition=function(t){var e;return this.position=t,null!=(e=this.delegate)?e.scrollPositionChanged(this.position):void 0},t}()}.call(this),function(){t.SnapshotCache=function(){function e(t){this.size=t,this.keys=[],this.snapshots={}}var i;return e.prototype.has=function(t){var e;return e=i(t),e in this.snapshots},e.prototype.get=function(t){var e;if(this.has(t))return e=this.read(t),this.touch(t),e},e.prototype.put=function(t,e){return this.write(t,e),this.touch(t),e},e.prototype.read=function(t){var e;return e=i(t),this.snapshots[e]},e.prototype.write=function(t,e){var n;return n=i(t),this.snapshots[n]=e},e.prototype.touch=function(t){var e,n;return n=i(t),e=this.keys.indexOf(n),e>-1&&this.keys.splice(e,1),this.keys.unshift(n),this.trim()},e.prototype.trim=function(){var t,e,i,n,o;for(n=this.keys.splice(this.size),o=[],t=0,i=n.length;i>t;t++)e=n[t],o.push(delete this.snapshots[e]);return o},i=function(e){return t.Location.wrap(e).toCacheKey()},e}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Visit=function(){function i(i,n,o){this.controller=i,this.action=o,this.performScroll=e(this.performScroll,this),this.identifier=t.uuid(),this.location=t.Location.wrap(n),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var n;return i.prototype.start=function(){return"initialized"===this.state?(this.recordTimingMetric("visitStart"),this.state="started",
this.adapter.visitStarted(this)):void 0},i.prototype.cancel=function(){var t;return"started"===this.state?(null!=(t=this.request)&&t.cancel(),this.cancelRender(),this.state="canceled"):void 0},i.prototype.complete=function(){var t;return"started"===this.state?(this.recordTimingMetric("visitEnd"),this.state="completed","function"==typeof(t=this.adapter).visitCompleted&&t.visitCompleted(this),this.controller.visitCompleted(this)):void 0},i.prototype.fail=function(){var t;return"started"===this.state?(this.state="failed","function"==typeof(t=this.adapter).visitFailed?t.visitFailed(this):void 0):void 0},i.prototype.changeHistory=function(){var t,e;return this.historyChanged?void 0:(t=this.location.isEqualTo(this.referrer)?"replace":this.action,e=n(t),this.controller[e](this.location,this.restorationIdentifier),this.historyChanged=!0)},i.prototype.issueRequest=function(){return this.shouldIssueRequest()&&null==this.request?(this.progress=0,this.request=new t.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},i.prototype.getCachedSnapshot=function(){var t;return!(t=this.controller.getCachedSnapshotForLocation(this.location))||null!=this.location.anchor&&!t.hasAnchor(this.location.anchor)||"restore"!==this.action&&!t.isPreviewable()?void 0:t},i.prototype.hasCachedSnapshot=function(){return null!=this.getCachedSnapshot()},i.prototype.loadCachedSnapshot=function(){var t,e;return(e=this.getCachedSnapshot())?(t=this.shouldIssueRequest(),this.render(function(){var i;return this.cacheSnapshot(),this.controller.render({snapshot:e,isPreview:t},this.performScroll),"function"==typeof(i=this.adapter).visitRendered&&i.visitRendered(this),t?void 0:this.complete()})):void 0},i.prototype.loadResponse=function(){return null!=this.response?this.render(function(){var t,e;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),"function"==typeof(t=this.adapter).visitRendered&&t.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),"function"==typeof(e=this.adapter).visitRendered&&e.visitRendered(this),this.complete())}):void 0},i.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},i.prototype.requestStarted=function(){var t;return this.recordTimingMetric("requestStart"),"function"==typeof(t=this.adapter).visitRequestStarted?t.visitRequestStarted(this):void 0},i.prototype.requestProgressed=function(t){var e;return this.progress=t,"function"==typeof(e=this.adapter).visitRequestProgressed?e.visitRequestProgressed(this):void 0},i.prototype.requestCompletedWithResponse=function(e,i){return this.response=e,null!=i&&(this.redirectedToLocation=t.Location.wrap(i)),this.adapter.visitRequestCompleted(this)},i.prototype.requestFailedWithStatusCode=function(t,e){return this.response=e,this.adapter.visitRequestFailedWithStatusCode(this,t)},i.prototype.requestFinished=function(){var t;return this.recordTimingMetric("requestEnd"),"function"==typeof(t=this.adapter).visitRequestFinished?t.visitRequestFinished(this):void 0},i.prototype.performScroll=function(){return this.scrolled?void 0:("restore"===this.action?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},i.prototype.scrollToRestoredPosition=function(){var t,e;return t=null!=(e=this.restorationData)?e.scrollPosition:void 0,null!=t?(this.controller.scrollToPosition(t),!0):void 0},i.prototype.scrollToAnchor=function(){return null!=this.location.anchor?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},i.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},i.prototype.recordTimingMetric=function(t){var e;return null!=(e=this.timingMetrics)[t]?e[t]:e[t]=(new Date).getTime()},i.prototype.getTimingMetrics=function(){return t.copyObject(this.timingMetrics)},n=function(t){switch(t){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},i.prototype.shouldIssueRequest=function(){return"restore"!==this.action||!this.hasCachedSnapshot()},i.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},i.prototype.render=function(t){return this.cancelRender(),this.frame=requestAnimationFrame(function(e){return function(){return e.frame=null,t.call(e)}}(this))},i.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},i}()}.call(this),function(){var e=function(t,e){return function(){return t.apply(e,arguments)}};t.Controller=function(){function i(){this.clickBubbled=e(this.clickBubbled,this),this.clickCaptured=e(this.clickCaptured,this),this.pageLoaded=e(this.pageLoaded,this),this.history=new t.History(this),this.view=new t.View(this),this.scrollManager=new t.ScrollManager(this),this.restorationData={},this.clearCache()}return i.prototype.start=function(){return t.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},i.prototype.disable=function(){return this.enabled=!1},i.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},i.prototype.clearCache=function(){return this.cache=new t.SnapshotCache(10)},i.prototype.visit=function(e,i){var n,o;return null==i&&(i={}),e=t.Location.wrap(e),this.applicationAllowsVisitingLocation(e)?this.locationIsVisitable(e)?(n=null!=(o=i.action)?o:"advance",this.adapter.visitProposedToLocationWithAction(e,n)):window.location=e:void 0},i.prototype.startVisitToLocationWithAction=function(e,i,n){var o;return t.supported?(o=this.getRestorationDataForIdentifier(n),this.startVisit(e,i,{restorationData:o})):window.location=e},i.prototype.startHistory=function(){return this.location=t.Location.wrap(window.location),this.restorationIdentifier=t.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},i.prototype.stopHistory=function(){return this.history.stop()},i.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(e,i){return this.restorationIdentifier=i,this.location=t.Location.wrap(e),this.history.push(this.location,this.restorationIdentifier)},i.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(e,i){return this.restorationIdentifier=i,this.location=t.Location.wrap(e),this.history.replace(this.location,this.restorationIdentifier)},i.prototype.historyPoppedToLocationWithRestorationIdentifier=function(e,i){var n;return this.restorationIdentifier=i,this.enabled?(n=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(e,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:n,historyChanged:!0}),this.location=t.Location.wrap(e)):this.adapter.pageInvalidated()},i.prototype.getCachedSnapshotForLocation=function(t){var e;return e=this.cache.get(t),e?e.clone():void 0},i.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},i.prototype.cacheSnapshot=function(){var t;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),t=this.view.getSnapshot(),this.cache.put(this.lastRenderedLocation,t.clone())):void 0},i.prototype.scrollToAnchor=function(t){var e;return(e=document.getElementById(t))?this.scrollToElement(e):this.scrollToPosition({x:0,y:0})},i.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},i.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},i.prototype.scrollPositionChanged=function(t){var e;return e=this.getCurrentRestorationData(),e.scrollPosition=t},i.prototype.render=function(t,e){return this.view.render(t,e)},i.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},i.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},i.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},i.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},i.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},i.prototype.clickBubbled=function(t){var e,i,n;return this.enabled&&this.clickEventIsSignificant(t)&&(i=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(i))&&this.applicationAllowsFollowingLinkToLocation(i,n)?(t.preventDefault(),e=this.getActionForLink(i),this.visit(n,{action:e})):void 0},i.prototype.applicationAllowsFollowingLinkToLocation=function(t,e){var i;return i=this.notifyApplicationAfterClickingLinkToLocation(t,e),!i.defaultPrevented},i.prototype.applicationAllowsVisitingLocation=function(t){var e;return e=this.notifyApplicationBeforeVisitingLocation(t),!e.defaultPrevented},i.prototype.notifyApplicationAfterClickingLinkToLocation=function(e,i){return t.dispatch("turbolinks:click",{target:e,data:{url:i.absoluteURL},cancelable:!0})},i.prototype.notifyApplicationBeforeVisitingLocation=function(e){return t.dispatch("turbolinks:before-visit",{data:{url:e.absoluteURL},cancelable:!0})},i.prototype.notifyApplicationAfterVisitingLocation=function(e){return t.dispatch("turbolinks:visit",{data:{url:e.absoluteURL}})},i.prototype.notifyApplicationBeforeCachingSnapshot=function(){return t.dispatch("turbolinks:before-cache")},i.prototype.notifyApplicationBeforeRender=function(e){return t.dispatch("turbolinks:before-render",{data:{newBody:e}})},i.prototype.notifyApplicationAfterRender=function(){return t.dispatch("turbolinks:render")},i.prototype.notifyApplicationAfterPageLoad=function(e){return null==e&&(e={}),t.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:e}})},i.prototype.startVisit=function(t,e,i){var n;return null!=(n=this.currentVisit)&&n.cancel(),this.currentVisit=this.createVisit(t,e,i),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},i.prototype.createVisit=function(e,i,n){var o,r,s,a,l;return r=null!=n?n:{},a=r.restorationIdentifier,s=r.restorationData,o=r.historyChanged,l=new t.Visit(this,e,i),l.restorationIdentifier=null!=a?a:t.uuid(),l.restorationData=t.copyObject(s),l.historyChanged=o,l.referrer=this.location,l},i.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},i.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},i.prototype.getVisitableLinkForNode=function(e){return this.nodeIsVisitable(e)?t.closest(e,"a[href]:not([target])"):void 0},i.prototype.getVisitableLocationForLink=function(e){var i;return i=new t.Location(e.getAttribute("href")),this.locationIsVisitable(i)?i:void 0},i.prototype.getActionForLink=function(t){var e;return null!=(e=t.getAttribute("data-turbolinks-action"))?e:"advance"},i.prototype.nodeIsVisitable=function(e){var i;return!(i=t.closest(e,"[data-turbolinks]"))||"false"!==i.getAttribute("data-turbolinks")},i.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},i.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},i.prototype.getRestorationDataForIdentifier=function(t){var e;return null!=(e=this.restorationData)[t]?e[t]:e[t]={}},i}()}.call(this),function(){var e,i,n;t.start=function(){return i()?(null==t.controller&&(t.controller=e()),t.controller.start()):void 0},i=function(){return null==window.Turbolinks&&(window.Turbolinks=t),n()},e=function(){var e;return e=new t.Controller,e.adapter=new t.BrowserAdapter(e),e},n=function(){return window.Turbolinks===t},n()&&t.start()}.call(this)}).call(this),"object"==typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd&&define(t)}.call(this); |
public/controllers/management/components/management/ruleset/ruleset-table.js | wazuh/wazuh-kibana-app | /*
* Wazuh app - React component for registering agents.
* Copyright (C) 2015-2022 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
import React, { Component } from 'react';
import { EuiBasicTable, EuiCallOut, EuiOverlayMask, EuiConfirmModal } from '@elastic/eui';
import { connect } from 'react-redux';
import { RulesetHandler, RulesetResources, resourceDictionary } from './utils/ruleset-handler';
import { getToasts } from '../../../../../kibana-services';
import {
updateIsProcessing,
updateShowModal,
updateDefaultItems,
updateListContent,
updateFileContent,
updateListItemsForRemove,
updateRuleInfo,
updateDecoderInfo,
} from '../../../../../redux/actions/rulesetActions';
import RulesetColums from './utils/columns';
import { WzRequest } from '../../../../../react-services/wz-request';
import { filtersToObject } from '../../../../../components/wz-search-bar';
import { withUserPermissions } from '../../../../../components/common/hocs/withUserPermissions';
import { WzUserPermissions } from '../../../../../react-services/wz-user-permissions';
import { compose } from 'redux';
import { UI_ERROR_SEVERITIES } from '../../../../../react-services/error-orchestrator/types';
import { UI_LOGGER_LEVELS } from '../../../../../../common/constants';
import { getErrorOrchestrator } from '../../../../../react-services/common-services';
class WzRulesetTable extends Component {
_isMounted = false;
constructor(props) {
super(props);
this.wzReq = (...args) => WzRequest.apiReq(...args);
this.state = {
items: [],
pageSize: 15,
pageIndex: 0,
totalItems: 0,
isLoading: false,
isRedirect: false,
};
this.paths = {
rules: '/rules',
decoders: '/decoders',
lists: '/lists/files',
};
this.extraSectionPrefixResource = {
rules: 'rule:file',
decoders: 'decoder:file',
lists: 'list:file',
};
this.rulesetHandler = new RulesetHandler(this.props.state.section);
}
async componentDidMount() {
this._isMounted = true;
this.props.updateIsProcessing(true);
if (this.props.state.section === RulesetResources.RULES) {
const regex = new RegExp('redirectRule=' + '[^&]*');
const match = window.location.href.match(regex);
if (match && match[0]) {
this._isMounted && this.setState({ isRedirect: true });
const id = match[0].split('=')[1];
try {
const result = await this.rulesetHandler.getResource({
params: {
rule_ids: id,
},
});
const items = result.data.affected_items || [];
if (items.length) {
const info = await this.rulesetHandler.getResource({
params: {
filename: items[0].filename,
},
});
if (info.data) {
Object.assign(info.data, { current: parseInt(id) });
}
this.props.updateRuleInfo(info.data);
}
} catch (error) {
const options = {
context: `${WzRulesetTable.name}.componentDidMount`,
level: UI_LOGGER_LEVELS.ERROR,
severity: UI_ERROR_SEVERITIES.BUSINESS,
error: {
error: error,
message: `Error getting resources: ${error.message || error}`,
title: error.name || error,
},
};
getErrorOrchestrator().handleError(options);
}
this._isMounted && this.setState({ isRedirect: false });
}
}
}
async componentDidUpdate(prevProps) {
const { isProcessing, section, showingFiles, filters } = this.props.state;
const processingChange =
prevProps.state.isProcessing !== isProcessing ||
(prevProps.state.isProcessing && isProcessing);
const sectionChanged = prevProps.state.section !== section;
const showingFilesChanged = prevProps.state.showingFiles !== showingFiles;
const filtersChanged = prevProps.state.filters !== filters;
try {
if (
(this._isMounted && processingChange && isProcessing) ||
sectionChanged ||
filtersChanged
) {
if (sectionChanged || showingFilesChanged || filtersChanged) {
this._isMounted &&
(await this.setState({
pageSize: this.state.pageSize,
pageIndex: 0,
sortDirection: null,
sortField: null,
}));
}
this._isMounted && this.setState({ isLoading: true });
this.props.updateIsProcessing(false);
await this.getItems();
}
} catch (error) {
const options = {
context: `${WzRulesetTable.name}.componentDidUpdate`,
level: UI_LOGGER_LEVELS.ERROR,
severity: UI_ERROR_SEVERITIES.BUSINESS,
error: {
error: error,
message: `Error getting items: ${error.message || error}`,
title: error.name || error,
},
};
getErrorOrchestrator().handleError(options);
}
}
componentWillUnmount() {
this._isMounted = false;
}
async getItems() {
const { section, showingFiles } = this.props.state;
this._isMounted &&
this.setState({
items: [],
});
this.props.updateTotalItems(false);
const rawItems = await this.wzReq(
'GET',
`${this.paths[this.props.request]}${showingFiles ? '/files' : ''}`,
{ params: this.buildFilter() }
).catch((error) => {
throw new Error(`Error when get the items of ${section}`);
});
const { affected_items = [], total_affected_items = 0 } =
((rawItems || {}).data || {}).data || {};
this.props.updateTotalItems(total_affected_items);
this._isMounted &&
this.setState({
items: affected_items,
totalItems: total_affected_items,
isLoading: false,
});
}
async setDefaultItems() {
try {
const requestDefaultItems = await this.wzReq('GET', '/manager/configuration', {
wait_for_complete: false,
section: 'ruleset',
field: 'list',
});
const defaultItems = ((requestDefaultItems || {}).data || {}).data;
this.props.updateDefaultItems(defaultItems);
} catch (error) {
throw error;
}
}
buildFilter() {
const { pageSize, pageIndex } = this.state;
const { filters } = this.props.state;
const filter = {
offset: pageIndex * pageSize,
limit: pageSize,
...this.buildSortFilter(),
...filtersToObject(filters),
};
return filter;
}
buildSortFilter() {
const { sortDirection, sortField } = this.state;
const sortFilter = {};
if (sortField) {
const direction = sortDirection === 'asc' ? '+' : '-';
sortFilter['sort'] = direction + sortField;
}
return sortFilter;
}
onTableChange = ({ page = {}, sort = {} }) => {
const { index: pageIndex, size: pageSize } = page;
const { field: sortField, direction: sortDirection } = sort;
this.setState({ pageSize, pageIndex, sortDirection, sortField });
this.props.updateIsProcessing(true);
};
getColumns() {
const { section, showingFiles } = this.props.state;
const rulesetColums = new RulesetColums(this.props).columns;
const columns = showingFiles ? rulesetColums.files : rulesetColums[section];
return columns;
}
render() {
const { error } = this.props.state;
const {
items,
pageSize,
totalItems,
pageIndex,
sortField,
sortDirection,
isLoading,
isRedirect,
} = this.state;
const columns = this.getColumns();
const message = isLoading ? null : 'No results...';
const pagination = {
pageIndex: pageIndex,
pageSize: pageSize,
totalItemCount: totalItems,
pageSizeOptions: [10, 15, 25, 50, 100],
};
const sorting = !!sortField
? {
sort: {
field: sortField,
direction: sortDirection,
},
}
: {};
if (!error) {
const itemList = this.props.state.itemList;
const getRowProps = (item) => {
const { id, name } = item;
const getRequiredPermissions = (item) => {
const { section } = this.props.state;
const { permissionResource } = resourceDictionary[section];
return [
{
action: `${section}:read`,
resource: permissionResource(item.name),
},
];
};
const updateInfo = async () => {
if (this.isLoading) return;
this.setState({ isLoading: true });
const { section } = this.props.state;
section === RulesetResources.RULES && (window.location.href = `${window.location.href}&redirectRule=${id}`);
try {
if (section === RulesetResources.LISTS) {
const result = await this.rulesetHandler.getFileContent(item.filename);
const file = {
name: item.filename,
content: result,
path: item.relative_dirname,
};
this.props.updateListContent(file);
} else {
const result = await this.rulesetHandler.getResource({
params: {
filename: item.filename,
},
});
if (result.data) {
Object.assign(result.data, { current: id || name });
}
if (section === RulesetResources.RULES) this.props.updateRuleInfo(result.data);
if (section === RulesetResources.DECODERS) this.props.updateDecoderInfo(result.data);
}
} catch (error) {
const options = {
context: `${WzRulesetTable.name}.updateInfo`,
level: UI_LOGGER_LEVELS.ERROR,
severity: UI_ERROR_SEVERITIES.BUSINESS,
error: {
error: error,
message: `Error updating info: ${error.message || error}`,
title: error.name || error,
},
};
getErrorOrchestrator().handleError(options);
this.setState({ isLoading: false });
}
this.setState({ isLoading: false });
};
return {
'data-test-subj': `row-${id || name}`,
className: 'customRowClass',
onClick: !WzUserPermissions.checkMissingUserPermissions(
getRequiredPermissions(item),
this.props.userPermissions
)
? updateInfo
: undefined,
};
};
return (
<div>
<EuiBasicTable
itemId="id"
items={items}
columns={columns}
pagination={pagination}
onChange={this.onTableChange}
loading={isLoading || isRedirect}
rowProps={(!this.props.state.showingFiles && getRowProps) || undefined}
sorting={sorting}
message={message}
/>
{this.props.state.showModal ? (
<EuiOverlayMask>
<EuiConfirmModal
title="Are you sure?"
onCancel={() => this.props.updateShowModal(false)}
onConfirm={() => {
this.removeItems(itemList);
this.props.updateShowModal(false);
}}
cancelButtonText="No, don't do it"
confirmButtonText="Yes, do it"
defaultFocusedButton="cancel"
buttonColor="danger"
>
<p>These items will be removed</p>
<div>
{itemList.map(function (item, i) {
return <li key={i}>{item.filename ? item.filename : item.name}</li>;
})}
</div>
</EuiConfirmModal>
</EuiOverlayMask>
) : null}
</div>
);
} else {
return <EuiCallOut color="warning" title={error} iconType="gear" />;
}
}
showToast = (color, title, text, time) => {
getToasts().add({
color: color,
title: title,
text: text,
toastLifeTimeMs: time,
});
};
async removeItems(items) {
try {
this.setState({ isLoading: true });
const results = items.map(async (item, i) => {
await this.rulesetHandler.deleteFile(item.filename || item.name);
});
Promise.all(results).then((completed) => {
this.props.updateIsProcessing(true);
this.showToast('success', 'Success', 'Deleted successfully', 3000);
});
} catch (error) {
const options = {
context: `${WzRulesetTable.name}.removeItems`,
level: UI_LOGGER_LEVELS.ERROR,
severity: UI_ERROR_SEVERITIES.BUSINESS,
error: {
error: error,
message: `Error deleting item: ${error.message || error}`,
title: error.name || error,
},
};
getErrorOrchestrator().handleError(options);
}
}
}
const mapStateToProps = (state) => {
return {
state: state.rulesetReducers,
};
};
const mapDispatchToProps = (dispatch) => {
return {
updateDefaultItems: (defaultItems) => dispatch(updateDefaultItems(defaultItems)), //TODO: Research to remove
updateIsProcessing: (isProcessing) => dispatch(updateIsProcessing(isProcessing)),
updateShowModal: (showModal) => dispatch(updateShowModal(showModal)),
updateFileContent: (fileContent) => dispatch(updateFileContent(fileContent)),
updateListContent: (listInfo) => dispatch(updateListContent(listInfo)),
updateListItemsForRemove: (itemList) => dispatch(updateListItemsForRemove(itemList)),
updateRuleInfo: (rule) => dispatch(updateRuleInfo(rule)),
updateDecoderInfo: (rule) => dispatch(updateDecoderInfo(rule)),
};
};
export default compose(
connect(mapStateToProps, mapDispatchToProps),
withUserPermissions
)(WzRulesetTable);
|
ajax/libs/glamorous/3.9.1/glamorous.umd.js | ahocevar/cdnjs | (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('glamor')) :
typeof define === 'function' && define.amd ? define(['react', 'glamor'], factory) :
(global.glamorous = factory(global.React,global.Glamor));
}(this, (function (React,glamor) { 'use strict';
var React__default = 'default' in React ? React['default'] : React;
var htmlTagNames = [
"a",
"abbr",
"acronym",
"address",
"applet",
"area",
"article",
"aside",
"audio",
"b",
"base",
"basefont",
"bdi",
"bdo",
"bgsound",
"big",
"blink",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"center",
"cite",
"code",
"col",
"colgroup",
"command",
"content",
"data",
"datalist",
"dd",
"del",
"details",
"dfn",
"dialog",
"dir",
"div",
"dl",
"dt",
"element",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"font",
"footer",
"form",
"frame",
"frameset",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"image",
"img",
"input",
"ins",
"isindex",
"kbd",
"keygen",
"label",
"legend",
"li",
"link",
"listing",
"main",
"map",
"mark",
"marquee",
"math",
"menu",
"menuitem",
"meta",
"meter",
"multicol",
"nav",
"nextid",
"nobr",
"noembed",
"noframes",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"picture",
"plaintext",
"pre",
"progress",
"q",
"rb",
"rbc",
"rp",
"rt",
"rtc",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"shadow",
"slot",
"small",
"source",
"spacer",
"span",
"strike",
"strong",
"style",
"sub",
"summary",
"sup",
"svg",
"table",
"tbody",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"tt",
"u",
"ul",
"var",
"video",
"wbr",
"xmp"
]
;
var svgTagNames = [
"a",
"altGlyph",
"altGlyphDef",
"altGlyphItem",
"animate",
"animateColor",
"animateMotion",
"animateTransform",
"animation",
"audio",
"canvas",
"circle",
"clipPath",
"color-profile",
"cursor",
"defs",
"desc",
"discard",
"ellipse",
"feBlend",
"feColorMatrix",
"feComponentTransfer",
"feComposite",
"feConvolveMatrix",
"feDiffuseLighting",
"feDisplacementMap",
"feDistantLight",
"feDropShadow",
"feFlood",
"feFuncA",
"feFuncB",
"feFuncG",
"feFuncR",
"feGaussianBlur",
"feImage",
"feMerge",
"feMergeNode",
"feMorphology",
"feOffset",
"fePointLight",
"feSpecularLighting",
"feSpotLight",
"feTile",
"feTurbulence",
"filter",
"font",
"font-face",
"font-face-format",
"font-face-name",
"font-face-src",
"font-face-uri",
"foreignObject",
"g",
"glyph",
"glyphRef",
"handler",
"hatch",
"hatchpath",
"hkern",
"iframe",
"image",
"line",
"linearGradient",
"listener",
"marker",
"mask",
"mesh",
"meshgradient",
"meshpatch",
"meshrow",
"metadata",
"missing-glyph",
"mpath",
"path",
"pattern",
"polygon",
"polyline",
"prefetch",
"radialGradient",
"rect",
"script",
"set",
"solidColor",
"solidcolor",
"stop",
"style",
"svg",
"switch",
"symbol",
"tbreak",
"text",
"textArea",
"textPath",
"title",
"tref",
"tspan",
"unknown",
"use",
"video",
"view",
"vkern"
]
;
var domElements = htmlTagNames.concat(svgTagNames).filter(function (tag, index, array) {
return array.indexOf(tag) === index;
});
var CHANNEL = '__glamorous__';
/* eslint import/no-mutable-exports:0, import/prefer-default-export:0 */
var PropTypes = void 0;
/* istanbul ignore next */
if (React__default.version.slice(0, 4) === '15.5') {
/* istanbul ignore next */
try {
PropTypes = require('prop-types');
/* istanbul ignore next */
} catch (error) {
// ignore
}
}
/* istanbul ignore next */
PropTypes = PropTypes || React__default.PropTypes;
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineProperty = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var toConsumableArray = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
} else {
return Array.from(arr);
}
};
function generateWarningMessage(componentName) {
// eslint-disable-next-line max-len
return 'glamorous warning: Expected component called "' + componentName + '" which uses withTheme to be within a ThemeProvider but none was found.';
}
function withTheme(ComponentToTheme) {
var ThemedComponent = function (_Component) {
inherits(ThemedComponent, _Component);
function ThemedComponent() {
var _ref;
var _temp, _this, _ret;
classCallCheck(this, ThemedComponent);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = ThemedComponent.__proto__ || Object.getPrototypeOf(ThemedComponent)).call.apply(_ref, [this].concat(args))), _this), _this.state = { theme: {} }, _this.setTheme = function (theme) {
return _this.setState({ theme: theme });
}, _temp), possibleConstructorReturn(_this, _ret);
}
createClass(ThemedComponent, [{
key: 'componentWillMount',
value: function componentWillMount() {
if (!this.context[CHANNEL]) {
{
// eslint-disable-next-line no-console
console.warn(generateWarningMessage(ComponentToTheme.displayName || ComponentToTheme.name || 'Stateless Function'));
}
return;
}
this.setState({ theme: this.context[CHANNEL].getState() });
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.context[CHANNEL]) {
this.unsubscribe = this.context[CHANNEL].subscribe(this.setTheme);
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
// cleanup subscription
this.unsubscribe && this.unsubscribe();
}
}, {
key: 'render',
value: function render() {
return React__default.createElement(ComponentToTheme, _extends({}, this.props, this.state));
}
}]);
return ThemedComponent;
}(React.Component);
ThemedComponent.contextTypes = defineProperty({}, CHANNEL, PropTypes.object);
return ThemedComponent;
}
function createBroadcast (initialState) {
var listeners = [];
var _state = initialState;
var getState = function () { return _state; };
var setState = function (state) {
_state = state;
listeners.forEach(function (listener) { return listener(_state); });
};
var subscribe = function (listener) {
listeners.push(listener);
return function unsubscribe () {
listeners = listeners.filter(function (item) { return item !== listener; });
}
};
return { getState: getState, setState: setState, subscribe: subscribe }
}
/**
* This is a component which will provide a theme to the entire tree
* via context and event listener
* (because pure components block context updates)
* inspired by the styled-components implementation
* https://github.com/styled-components/styled-components
* @param {Object} theme the theme object..
*/
var ThemeProvider = function (_Component) {
inherits(ThemeProvider, _Component);
function ThemeProvider() {
var _ref;
var _temp, _this, _ret;
classCallCheck(this, ThemeProvider);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = ThemeProvider.__proto__ || Object.getPrototypeOf(ThemeProvider)).call.apply(_ref, [this].concat(args))), _this), _this.broadcast = createBroadcast(_this.props.theme), _this.setOuterTheme = function (theme) {
_this.outerTheme = theme;
}, _temp), possibleConstructorReturn(_this, _ret);
}
createClass(ThemeProvider, [{
key: 'getTheme',
// create theme, by merging with outer theme, if present
value: function getTheme(passedTheme) {
var theme = passedTheme || this.props.theme;
return _extends({}, this.outerTheme, theme);
}
}, {
key: 'getChildContext',
value: function getChildContext() {
return defineProperty({}, CHANNEL, this.broadcast);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
// create a new subscription for keeping track of outer theme, if present
if (this.context[CHANNEL]) {
this.unsubscribe = this.context[CHANNEL].subscribe(this.setOuterTheme);
}
}
}, {
key: 'componentWillMount',
value: function componentWillMount() {
// set broadcast state by merging outer theme with own
if (this.context[CHANNEL]) {
this.setOuterTheme(this.context[CHANNEL].getState());
this.broadcast.setState(this.getTheme());
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.props.theme !== nextProps.theme) {
this.broadcast.setState(this.getTheme(nextProps.theme));
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.unsubscribe && this.unsubscribe();
}
}, {
key: 'render',
value: function render() {
return this.props.children ? React__default.Children.only(this.props.children) : null;
}
}]);
return ThemeProvider;
}(React.Component);
ThemeProvider.childContextTypes = defineProperty({}, CHANNEL, PropTypes.object.isRequired);
ThemeProvider.contextTypes = defineProperty({}, CHANNEL, PropTypes.object);
ThemeProvider.propTypes = {
theme: PropTypes.object.isRequired,
children: PropTypes.node
};
/**
* This function takes a className string and gets all the
* associated glamor styles. It's used to merge glamor styles
* from a className to make sure that specificity is not
* a problem when passing a className to a component.
* @param {String} [className=''] the className string
* @return {Object} { glamorStyles, glamorlessClassName }
* - glamorStyles is an array of all the glamor styles objects
* - glamorlessClassName is the rest of the className string
* without the glamor classNames
*/
function extractGlamorStyles() {
var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
return className.toString().split(' ').reduce(function (groups, name) {
if (name.indexOf('css-') === 0) {
var id = name.slice('css-'.length);
var style = glamor.styleSheet.registered[id].style;
groups.glamorStyles.push(style);
} else {
// eslint-disable-next-line max-len
groups.glamorlessClassName = (groups.glamorlessClassName + ' ' + name).trim();
}
return groups;
}, { glamorlessClassName: '', glamorStyles: [] });
}
function getGlamorClassName$1(styles, props, cssOverrides, theme) {
var mappedArgs = styles.slice();
for (var i = mappedArgs.length; i--;) {
if (typeof mappedArgs[i] === 'function') {
mappedArgs[i] = mappedArgs[i](props, theme);
}
}
var _extractGlamorStyles = extractGlamorStyles(props.className),
parentGlamorStyles = _extractGlamorStyles.glamorStyles,
glamorlessClassName = _extractGlamorStyles.glamorlessClassName;
var glamorClassName = glamor.css.apply(undefined, toConsumableArray(mappedArgs).concat(toConsumableArray(parentGlamorStyles), [cssOverrides])).toString();
return (glamorlessClassName + ' ' + glamorClassName).trim();
}
/*
* This is a relatively small abstraction that's ripe for open sourcing.
* Documentation is in the README.md
*/
function createGlamorous(splitProps) {
/**
* This is the main export and the function that people
* interact with most directly.
*
* It accepts a component which can be a string or
* a React Component and returns
* a "glamorousComponentFactory"
* @param {String|ReactComponent} comp the component to render
* @param {Object} options helpful info for the GlamorousComponents
* @return {Function} the glamorousComponentFactory
*/
return function glamorous(comp) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
rootEl = _ref.rootEl,
displayName = _ref.displayName,
_ref$forwardProps = _ref.forwardProps,
forwardProps = _ref$forwardProps === undefined ? [] : _ref$forwardProps;
return glamorousComponentFactory;
/**
* This returns a React Component that renders the comp (closure)
* with a className based on the given glamor styles object(s)
* @param {...Object|Function} styles the styles to create with glamor.
* If any of these are functions, they are invoked with the component
* props and the return value is used.
* @return {ReactComponent} the ReactComponent function
*/
function glamorousComponentFactory() {
for (var _len = arguments.length, styles = Array(_len), _key = 0; _key < _len; _key++) {
styles[_key] = arguments[_key];
}
/**
* This is a component which will render the comp (closure)
* with the glamorous styles (closure). Forwards any valid
* props to the underlying component.
* @param {Object} theme the theme object
* @return {ReactElement} React.createElement
*/
var GlamorousComponent = function (_Component) {
inherits(GlamorousComponent, _Component);
function GlamorousComponent() {
var _ref2;
var _temp, _this, _ret;
classCallCheck(this, GlamorousComponent);
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref2 = GlamorousComponent.__proto__ || Object.getPrototypeOf(GlamorousComponent)).call.apply(_ref2, [this].concat(args))), _this), _this.state = { theme: null }, _this.setTheme = function (theme) {
return _this.setState({ theme: theme });
}, _temp), possibleConstructorReturn(_this, _ret);
}
createClass(GlamorousComponent, [{
key: 'componentWillMount',
value: function componentWillMount() {
var theme = this.props.theme;
if (this.context[CHANNEL]) {
// if a theme is provided via props,
// it takes precedence over context
this.setTheme(theme ? theme : this.context[CHANNEL].getState());
} else {
this.setTheme(theme || {});
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (this.props.theme !== nextProps.theme) {
this.setTheme(nextProps.theme);
}
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.context[CHANNEL] && !this.props.theme) {
// subscribe to future theme changes
this.unsubscribe = this.context[CHANNEL].subscribe(this.setTheme);
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
// cleanup subscription
this.unsubscribe && this.unsubscribe();
}
}, {
key: 'render',
value: function render() {
// in this function, we're willing to sacrafice a little on
// readability to get better performance because it actually
// matters.
var props = this.props;
var _splitProps = splitProps(props, GlamorousComponent),
toForward = _splitProps.toForward,
cssOverrides = _splitProps.cssOverrides;
// freeze the theme object in dev mode
var theme = Object.freeze(this.state.theme);
// create className to apply
var fullClassName = getGlamorClassName$1(GlamorousComponent.styles, props, cssOverrides, theme);
return React__default.createElement(GlamorousComponent.comp, _extends({
ref: props.innerRef
}, toForward, {
className: fullClassName
}));
}
}]);
return GlamorousComponent;
}(React.Component);
GlamorousComponent.propTypes = {
className: PropTypes.string,
cssOverrides: PropTypes.object,
theme: PropTypes.object,
innerRef: PropTypes.func,
glam: PropTypes.object
};
GlamorousComponent.contextTypes = defineProperty({}, CHANNEL, PropTypes.object);
Object.assign(GlamorousComponent, getGlamorousComponentMetadata({
comp: comp,
styles: styles,
rootEl: rootEl,
forwardProps: forwardProps,
displayName: displayName
}));
return GlamorousComponent;
}
};
function getGlamorousComponentMetadata(_ref3) {
var comp = _ref3.comp,
styles = _ref3.styles,
rootEl = _ref3.rootEl,
forwardProps = _ref3.forwardProps,
displayName = _ref3.displayName;
var componentsComp = comp.comp ? comp.comp : comp;
return {
// join styles together (for anyone doing: glamorous(glamorous.a({}), {}))
styles: comp.styles ? comp.styles.concat(styles) : styles,
// keep track of the ultimate rootEl to render (we never
// actually render anything but
// the base component, even when people wrap a glamorous
// component in glamorous
comp: componentsComp,
rootEl: rootEl || componentsComp,
forwardProps: forwardProps,
// set the displayName to something that's slightly more
// helpful than `GlamorousComponent` :)
displayName: displayName || 'glamorous(' + getDisplayName(comp) + ')'
};
}
function getDisplayName(comp) {
return typeof comp === 'string' ? comp : comp.displayName || comp.name || 'unknown';
}
}
//
// Main
//
var index$1 = function memoize (fn, options) {
var cache = options && options.cache
? options.cache
: cacheDefault;
var serializer = options && options.serializer
? options.serializer
: serializerDefault;
var strategy = options && options.strategy
? options.strategy
: strategyDefault;
return strategy(fn, {
cache: cache,
serializer: serializer
})
};
//
// Strategy
//
function isPrimitive (value) {
return value == null || (typeof value !== 'function' && typeof value !== 'object')
}
function monadic (fn, cache, serializer, arg) {
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
if (!cache.has(cacheKey)) {
var computedValue = fn.call(this, arg);
cache.set(cacheKey, computedValue);
return computedValue
}
return cache.get(cacheKey)
}
function variadic (fn, cache, serializer) {
var args = Array.prototype.slice.call(arguments, 3);
var cacheKey = serializer(args);
if (!cache.has(cacheKey)) {
var computedValue = fn.apply(this, args);
cache.set(cacheKey, computedValue);
return computedValue
}
return cache.get(cacheKey)
}
function strategyDefault (fn, options) {
var memoized = fn.length === 1 ? monadic : variadic;
memoized = memoized.bind(
this,
fn,
options.cache.create(),
options.serializer
);
return memoized
}
//
// Serializer
//
function serializerDefault () {
return JSON.stringify(arguments)
}
//
// Cache
//
function ObjectWithoutPrototypeCache () {
this.cache = Object.create(null);
}
ObjectWithoutPrototypeCache.prototype.has = function (key) {
return (key in this.cache)
};
ObjectWithoutPrototypeCache.prototype.get = function (key) {
return this.cache[key]
};
ObjectWithoutPrototypeCache.prototype.set = function (key, value) {
this.cache[key] = value;
};
var cacheDefault = {
create: function create () {
return new ObjectWithoutPrototypeCache()
}
};
function unwrapExports (x) {
return x && x.__esModule ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var a = ["coords","download","href","name","rel","shape","target","type"];
var abbr = ["title"];
var applet = ["alt","height","name","width"];
var area = ["alt","coords","download","href","rel","shape","target","type"];
var audio = ["controls","loop","muted","preload","src"];
var base = ["href","target"];
var basefont = ["size"];
var bdo = ["dir"];
var blockquote = ["cite"];
var button = ["disabled","form","name","type","value"];
var canvas = ["height","width"];
var col = ["span","width"];
var colgroup = ["span","width"];
var data = ["value"];
var del = ["cite"];
var details = ["open"];
var dfn = ["title"];
var dialog = ["open"];
var embed = ["height","src","type","width"];
var fieldset = ["disabled","form","name"];
var font = ["size"];
var form = ["accept","action","method","name","target"];
var frame = ["name","scrolling","src"];
var frameset = ["cols","rows"];
var head = ["profile"];
var hr = ["size","width"];
var html = ["manifest"];
var iframe = ["height","name","sandbox","scrolling","src","width"];
var img = ["alt","height","name","sizes","src","width"];
var input = ["accept","alt","autoCapitalize","autoCorrect","checked","defaultChecked","defaultValue","disabled","form","height","list","max","min","multiple","name","onChange","pattern","placeholder","required","size","src","step","title","type","value","width"];
var ins = ["cite"];
var keygen = ["challenge","disabled","form","name"];
var label = ["form"];
var li = ["type","value"];
var link = ["color","href","integrity","media","nonce","rel","scope","sizes","target","title","type"];
var map = ["name"];
var menu = ["label","type"];
var menuitem = ["checked","default","disabled","icon","label","title","type"];
var meta = ["content","name"];
var meter = ["high","low","max","min","optimum","value"];
var object = ["data","form","height","name","type","width"];
var ol = ["reversed","start","type"];
var optgroup = ["disabled","label"];
var option = ["disabled","label","selected","value"];
var output = ["form","name"];
var param = ["name","type","value"];
var pre = ["width"];
var progress = ["max","value"];
var q = ["cite"];
var script = ["async","defer","integrity","nonce","src","type"];
var select = ["defaultValue","disabled","form","multiple","name","onChange","required","size","value"];
var slot = ["name"];
var source = ["media","sizes","src","type"];
var style = ["media","nonce","title","type"];
var table = ["summary","width"];
var td = ["headers","height","scope","width"];
var textarea = ["autoCapitalize","autoCorrect","cols","defaultValue","disabled","form","name","onChange","placeholder","required","rows","value","wrap"];
var th = ["headers","height","scope","width"];
var track = ["default","kind","label","src"];
var ul = ["type"];
var video = ["controls","height","loop","muted","poster","preload","src","width"];
var svg = ["accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","color","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","width","widths","wordSpacing","writingMode","x","x1","x2","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlSpace","xmlns","xmlnsXlink","y","y1","y2","yChannelSelector","z","zoomAndPan"];
var reactHtmlAttributes = {
a: a,
abbr: abbr,
applet: applet,
area: area,
audio: audio,
base: base,
basefont: basefont,
bdo: bdo,
blockquote: blockquote,
button: button,
canvas: canvas,
col: col,
colgroup: colgroup,
data: data,
del: del,
details: details,
dfn: dfn,
dialog: dialog,
embed: embed,
fieldset: fieldset,
font: font,
form: form,
frame: frame,
frameset: frameset,
head: head,
hr: hr,
html: html,
iframe: iframe,
img: img,
input: input,
ins: ins,
keygen: keygen,
label: label,
li: li,
link: link,
map: map,
menu: menu,
menuitem: menuitem,
meta: meta,
meter: meter,
object: object,
ol: ol,
optgroup: optgroup,
option: option,
output: output,
param: param,
pre: pre,
progress: progress,
q: q,
script: script,
select: select,
slot: slot,
source: source,
style: style,
table: table,
td: td,
textarea: textarea,
th: th,
track: track,
ul: ul,
video: video,
svg: svg,
"*": ["className","dangerouslySetInnerHTML","dir","draggable","hidden","htmlFor","id","is","itemID","itemProp","itemRef","itemScope","itemType","lang","style","suppressContentEditableWarning","title"]
};
var reactHtmlAttributes$1 = Object.freeze({
a: a,
abbr: abbr,
applet: applet,
area: area,
audio: audio,
base: base,
basefont: basefont,
bdo: bdo,
blockquote: blockquote,
button: button,
canvas: canvas,
col: col,
colgroup: colgroup,
data: data,
del: del,
details: details,
dfn: dfn,
dialog: dialog,
embed: embed,
fieldset: fieldset,
font: font,
form: form,
frame: frame,
frameset: frameset,
head: head,
hr: hr,
html: html,
iframe: iframe,
img: img,
input: input,
ins: ins,
keygen: keygen,
label: label,
li: li,
link: link,
map: map,
menu: menu,
menuitem: menuitem,
meta: meta,
meter: meter,
object: object,
ol: ol,
optgroup: optgroup,
option: option,
output: output,
param: param,
pre: pre,
progress: progress,
q: q,
script: script,
select: select,
slot: slot,
source: source,
style: style,
table: table,
td: td,
textarea: textarea,
th: th,
track: track,
ul: ul,
video: video,
svg: svg,
default: reactHtmlAttributes
});
var reactHtmlAttributes$2 = ( reactHtmlAttributes$1 && reactHtmlAttributes ) || reactHtmlAttributes$1;
var index$2 = createCommonjsModule(function (module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = reactHtmlAttributes$2;
module.exports = reactHtmlAttributes$2; // for CommonJS compatibility
});
var reactHTMLAttributes = unwrapExports(index$2);
/*
* This is used to check if a property name is one of the React-specific
* properties and determine if that property should be forwarded
* to the React component
*/
/* Logic copied from ReactDOMUnknownPropertyHook */
var reactProps = ['children', 'dangerouslySetInnerHTML', 'key', 'ref', 'autoFocus', 'defaultValue', 'valueLink', 'defaultChecked', 'checkedLink', 'innerHTML', 'suppressContentEditableWarning', 'onFocusIn', 'onFocusOut', 'className',
/* List copied from https://facebook.github.io/react/docs/events.html */
'onCopy', 'onCut', 'onPaste', 'onCompositionEnd', 'onCompositionStart', 'onCompositionUpdate', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onFocus', 'onBlur', 'onChange', 'onInput', 'onSubmit', 'onClick', 'onContextMenu', 'onDoubleClick', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onSelect', 'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart', 'onScroll', 'onWheel', 'onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded', 'onError', 'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange', 'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting', 'onLoad', 'onAnimationStart', 'onAnimationEnd', 'onAnimationIteration', 'onTransitionEnd', 'onCopyCapture', 'onCutCapture', 'onPasteCapture', 'onCompositionEndCapture', 'onCompositionStartCapture', 'onCompositionUpdateCapture', 'onKeyDownCapture', 'onKeyPressCapture', 'onKeyUpCapture', 'onFocusCapture', 'onBlurCapture', 'onChangeCapture', 'onInputCapture', 'onSubmitCapture', 'onClickCapture', 'onContextMenuCapture', 'onDoubleClickCapture', 'onDragCapture', 'onDragEndCapture', 'onDragEnterCapture', 'onDragExitCapture', 'onDragLeaveCapture', 'onDragOverCapture', 'onDragStartCapture', 'onDropCapture', 'onMouseDownCapture', 'onMouseEnterCapture', 'onMouseLeaveCapture', 'onMouseMoveCapture', 'onMouseOutCapture', 'onMouseOverCapture', 'onMouseUpCapture', 'onSelectCapture', 'onTouchCancelCapture', 'onTouchEndCapture', 'onTouchMoveCapture', 'onTouchStartCapture', 'onScrollCapture', 'onWheelCapture', 'onAbortCapture', 'onCanPlayCapture', 'onCanPlayThroughCapture', 'onDurationChangeCapture', 'onEmptiedCapture', 'onEncryptedCapture', 'onEndedCapture', 'onErrorCapture', 'onLoadedDataCapture', 'onLoadedMetadataCapture', 'onLoadStartCapture', 'onPauseCapture', 'onPlayCapture', 'onPlayingCapture', 'onProgressCapture', 'onRateChangeCapture', 'onSeekedCapture', 'onSeekingCapture', 'onStalledCapture', 'onSuspendCapture', 'onTimeUpdateCapture', 'onVolumeChangeCapture', 'onWaitingCapture', 'onLoadCapture', 'onAnimationStartCapture', 'onAnimationEndCapture', 'onAnimationIterationCapture', 'onTransitionEndCapture'];
/* eslint max-lines:0, func-style:0 */
// copied from:
// https://github.com/styled-components/styled-components/tree/
// 956e8210b6277860c89404f9cb08735f97eaa7e1/src/utils/validAttr.js
/* Trying to avoid the unknown-prop errors on glamorous components
by filtering by React's attribute whitelist.
*/
var globalReactHtmlProps = reactHTMLAttributes['*'];
// these are valid attributes that have the
// same name as CSS properties, and is used
// for css overrides API
var cssProps = ['color', 'height', 'width'];
/* From DOMProperty */
// eslint-disable-next-line max-len
var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
// eslint-disable-next-line max-len
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));
var isHtmlProp = function isHtmlProp(name, tagName) {
var elementAttributes = reactHTMLAttributes[tagName];
return globalReactHtmlProps.indexOf(name) !== -1 || (elementAttributes === undefined ? false : elementAttributes.indexOf(name) !== -1);
};
var isCssProp = function isCssProp(name) {
return cssProps.indexOf(name) !== -1;
};
var isReactProp = function isReactProp(name) {
return reactProps.indexOf(name) !== -1;
};
// eslint-disable-next-line complexity
var shouldForwardProperty = function shouldForwardProperty(tagName, name) {
return typeof tagName !== 'string' || (isHtmlProp(name, tagName) || isReactProp(name) || isCustomAttribute(name.toLowerCase())) && (tagName === 'svg' || !isCssProp(name));
};
var shouldForwardProperty$1 = index$1(shouldForwardProperty);
function splitProps(_ref, _ref2) {
var propsAreCssOverrides = _ref2.propsAreCssOverrides,
rootEl = _ref2.rootEl,
forwardProps = _ref2.forwardProps;
var _ref$css = _ref.css,
cssOverrides = _ref$css === undefined ? {} : _ref$css,
theme = _ref.theme,
className = _ref.className,
innerRef = _ref.innerRef,
glam = _ref.glam,
rest = objectWithoutProperties(_ref, ['css', 'theme', 'className', 'innerRef', 'glam']);
var returnValue = { toForward: {}, cssOverrides: {} };
if (!propsAreCssOverrides) {
returnValue.cssOverrides = cssOverrides;
if (typeof rootEl !== 'string') {
// if it's not a string, then we can forward everything
// (because it's a component)
returnValue.toForward = rest;
return returnValue;
}
}
return Object.keys(rest).reduce(function (split, propName) {
if (forwardProps.indexOf(propName) !== -1 || shouldForwardProperty$1(rootEl, propName)) {
split.toForward[propName] = rest[propName];
} else if (propsAreCssOverrides) {
split.cssOverrides[propName] = rest[propName];
}
return split;
}, returnValue);
}
var glamorous$2 = createGlamorous(splitProps);
/*
* This creates a glamorousComponentFactory for every DOM element so you can
* simply do:
* const GreenButton = glamorous.button({
* backgroundColor: 'green',
* padding: 20,
* })
* <GreenButton>Click Me!</GreenButton>
*/
Object.assign(glamorous$2, domElements.reduce(function (getters, tag) {
getters[tag] = glamorous$2(tag);
return getters;
}, {}));
/*
* This creates a glamorous component for each DOM element so you can
* simply do:
* <glamorous.Div
* color="green"
* marginLeft={20}
* >
* I'm green!
* </glamorous.Div>
*/
Object.assign(glamorous$2, domElements.reduce(function (comps, tag) {
var capitalTag = capitalize(tag);
comps[capitalTag] = glamorous$2[tag]();
comps[capitalTag].displayName = 'glamorous.' + capitalTag;
comps[capitalTag].propsAreCssOverrides = true;
return comps;
}, {}));
function capitalize(s) {
return s.slice(0, 1).toUpperCase() + s.slice(1);
}
var glamorousStar = Object.freeze({
default: glamorous$2,
ThemeProvider: ThemeProvider,
withTheme: withTheme
});
var glamorous = glamorous$2;
Object.assign(glamorous, Object.keys(glamorousStar).reduce(function (e, prop) {
if (prop !== 'default') {
// eslint-disable-next-line import/namespace
e[prop] = glamorousStar[prop];
}
return e;
}, {}));
return glamorous;
})));
//# sourceMappingURL=glamorous.umd.js.map
|
ajax/libs/rxjs/3.1.2/rx.compat.js | vetruvet/cdnjs | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
;(function (undefined) {
var objectTypes = {
'function': true,
'object': true
};
var
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
freeSelf = objectTypes[typeof self] && self.Object && self,
freeWindow = objectTypes[typeof window] && window && window.Object && window,
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
var root = root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
var Rx = {
internals: {},
config: {
Promise: root.Promise
},
helpers: { }
};
// Defaults
var noop = Rx.helpers.noop = function () { },
identity = Rx.helpers.identity = function (x) { return x; },
defaultNow = Rx.helpers.defaultNow = (function () { return !!Date.now ? Date.now : function () { return +new Date; }; }()),
defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); },
defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); },
defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); },
defaultError = Rx.helpers.defaultError = function (err) { throw err; },
isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.subscribe !== 'function' && typeof p.then === 'function'; },
isFunction = Rx.helpers.isFunction = (function () {
var isFn = function (value) {
return typeof value == 'function' || false;
}
// fallback for older versions of Chrome and Safari
if (isFn(/x/)) {
isFn = function(value) {
return typeof value == 'function' && toString.call(value) == '[object Function]';
};
}
return isFn;
}());
function cloneArray(arr) {
var len = arr.length, a = new Array(len);
for(var i = 0; i < len; i++) { a[i] = arr[i]; }
return a;
}
var errorObj = {e: {}};
function tryCatcherGen(tryCatchTarget) {
return function tryCatcher() {
try {
return tryCatchTarget.apply(this, arguments);
} catch (e) {
errorObj.e = e;
return errorObj;
}
}
}
var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) {
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
return tryCatcherGen(fn);
}
function thrower(e) {
throw e;
}
Rx.config.longStackSupport = false;
var hasStacks = false, stacks = tryCatch(function () { throw new Error(); })();
hasStacks = !!stacks.e && !!stacks.e.stack;
// All code after this point will be filtered from stack traces reported by RxJS
var rStartingLine = captureLine(), rFileName;
var STACK_JUMP_SEPARATOR = 'From previous event:';
function makeStackTraceLong(error, observable) {
// If possible, transform the error stack trace by removing Node and RxJS
// cruft, then concatenating with the stack trace of `observable`.
if (hasStacks &&
observable.stack &&
typeof error === 'object' &&
error !== null &&
error.stack &&
error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1
) {
var stacks = [];
for (var o = observable; !!o; o = o.source) {
if (o.stack) {
stacks.unshift(o.stack);
}
}
stacks.unshift(error.stack);
var concatedStacks = stacks.join('\n' + STACK_JUMP_SEPARATOR + '\n');
error.stack = filterStackString(concatedStacks);
}
}
function filterStackString(stackString) {
var lines = stackString.split('\n'), desiredLines = [];
for (var i = 0, len = lines.length; i < len; i++) {
var line = lines[i];
if (!isInternalFrame(line) && !isNodeFrame(line) && line) {
desiredLines.push(line);
}
}
return desiredLines.join('\n');
}
function isInternalFrame(stackLine) {
var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);
if (!fileNameAndLineNumber) {
return false;
}
var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1];
return fileName === rFileName &&
lineNumber >= rStartingLine &&
lineNumber <= rEndingLine;
}
function isNodeFrame(stackLine) {
return stackLine.indexOf('(module.js:') !== -1 ||
stackLine.indexOf('(node.js:') !== -1;
}
function captureLine() {
if (!hasStacks) { return; }
try {
throw new Error();
} catch (e) {
var lines = e.stack.split('\n');
var firstLine = lines[0].indexOf('@') > 0 ? lines[1] : lines[2];
var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);
if (!fileNameAndLineNumber) { return; }
rFileName = fileNameAndLineNumber[0];
return fileNameAndLineNumber[1];
}
}
function getFileNameAndLineNumber(stackLine) {
// Named functions: 'at functionName (filename:lineNumber:columnNumber)'
var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);
if (attempt1) { return [attempt1[1], Number(attempt1[2])]; }
// Anonymous functions: 'at filename:lineNumber:columnNumber'
var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine);
if (attempt2) { return [attempt2[1], Number(attempt2[2])]; }
// Firefox style: 'function@filename:lineNumber or @filename:lineNumber'
var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine);
if (attempt3) { return [attempt3[1], Number(attempt3[2])]; }
}
var EmptyError = Rx.EmptyError = function() {
this.message = 'Sequence contains no elements.';
this.name = 'EmptyError';
Error.call(this);
};
EmptyError.prototype = Object.create(Error.prototype);
var ObjectDisposedError = Rx.ObjectDisposedError = function() {
this.message = 'Object has been disposed';
this.name = 'ObjectDisposedError';
Error.call(this);
};
ObjectDisposedError.prototype = Object.create(Error.prototype);
var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () {
this.message = 'Argument out of range';
this.name = 'ArgumentOutOfRangeError';
Error.call(this);
};
ArgumentOutOfRangeError.prototype = Object.create(Error.prototype);
var NotSupportedError = Rx.NotSupportedError = function (message) {
this.message = message || 'This operation is not supported';
this.name = 'NotSupportedError';
Error.call(this);
};
NotSupportedError.prototype = Object.create(Error.prototype);
var NotImplementedError = Rx.NotImplementedError = function (message) {
this.message = message || 'This operation is not implemented';
this.name = 'NotImplementedError';
Error.call(this);
};
NotImplementedError.prototype = Object.create(Error.prototype);
var notImplemented = Rx.helpers.notImplemented = function () {
throw new NotImplementedError();
};
var notSupported = Rx.helpers.notSupported = function () {
throw new NotSupportedError();
};
// Shim in iterator support
var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) ||
'_es6shim_iterator_';
// Bug for mozilla version
if (root.Set && typeof new root.Set()['@@iterator'] === 'function') {
$iterator$ = '@@iterator';
}
var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined };
var isIterable = Rx.helpers.isIterable = function (o) {
return o[$iterator$] !== undefined;
}
var isArrayLike = Rx.helpers.isArrayLike = function (o) {
return o && o.length !== undefined;
}
Rx.helpers.iterator = $iterator$;
var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) {
if (typeof thisArg === 'undefined') { return func; }
switch(argCount) {
case 0:
return function() {
return func.call(thisArg)
};
case 1:
return function(arg) {
return func.call(thisArg, arg);
}
case 2:
return function(value, index) {
return func.call(thisArg, value, index);
};
case 3:
return function(value, index, collection) {
return func.call(thisArg, value, index, collection);
};
}
return function() {
return func.apply(thisArg, arguments);
};
};
/** Used to determine if values are of the language type Object */
var dontEnums = ['toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'],
dontEnumsLength = dontEnums.length;
/** `Object#toString` result shortcuts */
var argsClass = '[object Arguments]',
arrayClass = '[object Array]',
boolClass = '[object Boolean]',
dateClass = '[object Date]',
errorClass = '[object Error]',
funcClass = '[object Function]',
numberClass = '[object Number]',
objectClass = '[object Object]',
regexpClass = '[object RegExp]',
stringClass = '[object String]';
var toString = Object.prototype.toString,
hasOwnProperty = Object.prototype.hasOwnProperty,
supportsArgsClass = toString.call(arguments) == argsClass, // For less <IE9 && FF<4
supportNodeClass,
errorProto = Error.prototype,
objectProto = Object.prototype,
stringProto = String.prototype,
propertyIsEnumerable = objectProto.propertyIsEnumerable;
try {
supportNodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + ''));
} catch (e) {
supportNodeClass = true;
}
var nonEnumProps = {};
nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };
nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true };
nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true };
nonEnumProps[objectClass] = { 'constructor': true };
var support = {};
(function () {
var ctor = function() { this.x = 1; },
props = [];
ctor.prototype = { 'valueOf': 1, 'y': 1 };
for (var key in new ctor) { props.push(key); }
for (key in arguments) { }
// Detect if `name` or `message` properties of `Error.prototype` are enumerable by default.
support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name');
// Detect if `prototype` properties are enumerable by default.
support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype');
// Detect if `arguments` object indexes are non-enumerable
support.nonEnumArgs = key != 0;
// Detect if properties shadowing those on `Object.prototype` are non-enumerable.
support.nonEnumShadows = !/valueOf/.test(props);
}(1));
var isObject = Rx.internals.isObject = function(value) {
var type = typeof value;
return value && (type == 'function' || type == 'object') || false;
};
function keysIn(object) {
var result = [];
if (!isObject(object)) {
return result;
}
if (support.nonEnumArgs && object.length && isArguments(object)) {
object = slice.call(object);
}
var skipProto = support.enumPrototypes && typeof object == 'function',
skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error);
for (var key in object) {
if (!(skipProto && key == 'prototype') &&
!(skipErrorProps && (key == 'message' || key == 'name'))) {
result.push(key);
}
}
if (support.nonEnumShadows && object !== objectProto) {
var ctor = object.constructor,
index = -1,
length = dontEnumsLength;
if (object === (ctor && ctor.prototype)) {
var className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object),
nonEnum = nonEnumProps[className];
}
while (++index < length) {
key = dontEnums[index];
if (!(nonEnum && nonEnum[key]) && hasOwnProperty.call(object, key)) {
result.push(key);
}
}
}
return result;
}
function internalFor(object, callback, keysFunc) {
var index = -1,
props = keysFunc(object),
length = props.length;
while (++index < length) {
var key = props[index];
if (callback(object[key], key, object) === false) {
break;
}
}
return object;
}
function internalForIn(object, callback) {
return internalFor(object, callback, keysIn);
}
function isNode(value) {
// IE < 9 presents DOM nodes as `Object` objects except they have `toString`
// methods that are `typeof` "string" and still can coerce nodes to strings
return typeof value.toString != 'function' && typeof (value + '') == 'string';
}
var isArguments = function(value) {
return (value && typeof value == 'object') ? toString.call(value) == argsClass : false;
}
// fallback for browsers that can't detect `arguments` objects by [[Class]]
if (!supportsArgsClass) {
isArguments = function(value) {
return (value && typeof value == 'object') ? hasOwnProperty.call(value, 'callee') : false;
};
}
var isEqual = Rx.internals.isEqual = function (x, y) {
return deepEquals(x, y, [], []);
};
/** @private
* Used for deep comparison
**/
function deepEquals(a, b, stackA, stackB) {
// exit early for identical values
if (a === b) {
// treat `+0` vs. `-0` as not equal
return a !== 0 || (1 / a == 1 / b);
}
var type = typeof a,
otherType = typeof b;
// exit early for unlike primitive values
if (a === a && (a == null || b == null ||
(type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) {
return false;
}
// compare [[Class]] names
var className = toString.call(a),
otherClass = toString.call(b);
if (className == argsClass) {
className = objectClass;
}
if (otherClass == argsClass) {
otherClass = objectClass;
}
if (className != otherClass) {
return false;
}
switch (className) {
case boolClass:
case dateClass:
// coerce dates and booleans to numbers, dates to milliseconds and booleans
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal
return +a == +b;
case numberClass:
// treat `NaN` vs. `NaN` as equal
return (a != +a) ?
b != +b :
// but treat `-0` vs. `+0` as not equal
(a == 0 ? (1 / a == 1 / b) : a == +b);
case regexpClass:
case stringClass:
// coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
// treat string primitives and their corresponding object instances as equal
return a == String(b);
}
var isArr = className == arrayClass;
if (!isArr) {
// exit for functions and DOM nodes
if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) {
return false;
}
// in older versions of Opera, `arguments` objects have `Array` constructors
var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor,
ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor;
// non `Object` object instances with different constructors are not equal
if (ctorA != ctorB &&
!(hasOwnProperty.call(a, 'constructor') && hasOwnProperty.call(b, 'constructor')) &&
!(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
('constructor' in a && 'constructor' in b)
) {
return false;
}
}
// assume cyclic structures are equal
// the algorithm for detecting cyclic structures is adapted from ES 5.1
// section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
var initedStack = !stackA;
stackA || (stackA = []);
stackB || (stackB = []);
var length = stackA.length;
while (length--) {
if (stackA[length] == a) {
return stackB[length] == b;
}
}
var size = 0;
var result = true;
// add `a` and `b` to the stack of traversed objects
stackA.push(a);
stackB.push(b);
// recursively compare objects and arrays (susceptible to call stack limits)
if (isArr) {
// compare lengths to determine if a deep comparison is necessary
length = a.length;
size = b.length;
result = size == length;
if (result) {
// deep compare the contents, ignoring non-numeric properties
while (size--) {
var index = length,
value = b[size];
if (!(result = deepEquals(a[size], value, stackA, stackB))) {
break;
}
}
}
}
else {
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
// which, in this case, is more costly
internalForIn(b, function(value, key, b) {
if (hasOwnProperty.call(b, key)) {
// count the number of properties.
size++;
// deep compare each property value.
return (result = hasOwnProperty.call(a, key) && deepEquals(a[key], value, stackA, stackB));
}
});
if (result) {
// ensure both objects have the same number of properties
internalForIn(a, function(value, key, a) {
if (hasOwnProperty.call(a, key)) {
// `size` will be `-1` if `a` has more properties than `b`
return (result = --size > -1);
}
});
}
}
stackA.pop();
stackB.pop();
return result;
}
var hasProp = {}.hasOwnProperty,
slice = Array.prototype.slice;
var inherits = Rx.internals.inherits = function (child, parent) {
function __() { this.constructor = child; }
__.prototype = parent.prototype;
child.prototype = new __();
};
var addProperties = Rx.internals.addProperties = function (obj) {
for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
for (var idx = 0, ln = sources.length; idx < ln; idx++) {
var source = sources[idx];
for (var prop in source) {
obj[prop] = source[prop];
}
}
};
// Rx Utils
var addRef = Rx.internals.addRef = function (xs, r) {
return new AnonymousObservable(function (observer) {
return new CompositeDisposable(r.getDisposable(), xs.subscribe(observer));
});
};
function arrayInitialize(count, factory) {
var a = new Array(count);
for (var i = 0; i < count; i++) {
a[i] = factory();
}
return a;
}
// Utilities
var slice = Array.prototype.slice,
toString = Object.prototype.toString;
if (!Function.prototype.bind) {
Function.prototype.bind = function (that) {
var target = this,
args = slice.call(arguments, 1);
var bound = function () {
if (this instanceof bound) {
function F() { }
F.prototype = target.prototype;
var self = new F();
var result = target.apply(self, args.concat(slice.call(arguments)));
if (Object(result) === result) {
return result;
}
return self;
} else {
return target.apply(that, args.concat(slice.call(arguments)));
}
};
return bound;
};
}
if (!Array.prototype.forEach) {
Array.prototype.forEach = function (callback, thisArg) {
var T, k;
if (this == null) {
throw new TypeError(' this is null or not defined');
}
var O = Object(this);
var len = O.length >>> 0;
if (typeof callback !== 'function') {
throw new TypeError(callback + ' is not a function');
}
if (arguments.length > 1) {
T = thisArg;
}
k = 0;
while (k < len) {
var kValue;
if (k in O) {
kValue = O[k];
callback.call(T, kValue, k, O);
}
k++;
}
};
}
var boxedString = Object('a'),
splitString = boxedString[0] !== 'a' || !(0 in boxedString);
if (!Array.prototype.every) {
Array.prototype.every = function every(fun /*, thisp */) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,
length = self.length >>> 0,
thisp = arguments[1];
if (toString.call(fun) !== funcClass) {
throw new TypeError(fun + ' is not a function');
}
for (var i = 0; i < length; i++) {
if (i in self && !fun.call(thisp, self[i], i, object)) {
return false;
}
}
return true;
};
}
if (!Array.prototype.map) {
Array.prototype.map = function map(fun /*, thisp*/) {
var object = Object(this),
self = splitString && toString.call(this) === stringClass ?
this.split('') :
object,
length = self.length >>> 0,
result = new Array(length),
thisp = arguments[1];
if (toString.call(fun) !== funcClass) {
throw new TypeError(fun + ' is not a function');
}
for (var i = 0; i < length; i++) {
if (i in self) {
result[i] = fun.call(thisp, self[i], i, object);
}
}
return result;
};
}
if (!Array.prototype.filter) {
Array.prototype.filter = function (predicate) {
var results = [], item, t = new Object(this);
for (var i = 0, len = t.length >>> 0; i < len; i++) {
item = t[i];
if (i in t && predicate.call(arguments[1], item, i, t)) {
results.push(item);
}
}
return results;
};
}
if (!Array.isArray) {
Array.isArray = function (arg) {
return toString.call(arg) === arrayClass;
};
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function indexOf(searchElement) {
var t = Object(this);
var len = t.length >>> 0;
if (len === 0) {
return -1;
}
var n = 0;
if (arguments.length > 1) {
n = Number(arguments[1]);
if (n !== n) {
n = 0;
} else if (n !== 0 && n !== Infinity && n !== -Infinity) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
}
if (n >= len) {
return -1;
}
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
for (; k < len; k++) {
if (k in t && t[k] === searchElement) {
return k;
}
}
return -1;
};
}
// Fix for Tessel
if (!Object.prototype.propertyIsEnumerable) {
Object.prototype.propertyIsEnumerable = function (key) {
for (var k in this) { if (k === key) { return true; } }
return false;
};
}
if (!Object.keys) {
Object.keys = (function() {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
return function(obj) {
if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
throw new TypeError('Object.keys called on non-object');
}
var result = [], prop, i;
for (prop in obj) {
if (hasOwnProperty.call(obj, prop)) {
result.push(prop);
}
}
if (hasDontEnumBug) {
for (i = 0; i < dontEnumsLength; i++) {
if (hasOwnProperty.call(obj, dontEnums[i])) {
result.push(dontEnums[i]);
}
}
}
return result;
};
}());
}
if (typeof Object.create !== 'function') {
// Production steps of ECMA-262, Edition 5, 15.2.3.5
// Reference: http://es5.github.io/#x15.2.3.5
Object.create = (function() {
function Temp() {}
var hasOwn = Object.prototype.hasOwnProperty;
return function (O) {
if (typeof O !== 'object') {
throw new TypeError('Object prototype may only be an Object or null');
}
Temp.prototype = O;
var obj = new Temp();
Temp.prototype = null;
if (arguments.length > 1) {
// Object.defineProperties does ToObject on its first argument.
var Properties = Object(arguments[1]);
for (var prop in Properties) {
if (hasOwn.call(Properties, prop)) {
obj[prop] = Properties[prop];
}
}
}
// 5. Return obj
return obj;
};
})();
}
/**
* Represents a group of disposable resources that are disposed together.
* @constructor
*/
var CompositeDisposable = Rx.CompositeDisposable = function () {
var args = [], i, len;
if (Array.isArray(arguments[0])) {
args = arguments[0];
len = args.length;
} else {
len = arguments.length;
args = new Array(len);
for(i = 0; i < len; i++) { args[i] = arguments[i]; }
}
for(i = 0; i < len; i++) {
if (!isDisposable(args[i])) { throw new TypeError('Not a disposable'); }
}
this.disposables = args;
this.isDisposed = false;
this.length = args.length;
};
var CompositeDisposablePrototype = CompositeDisposable.prototype;
/**
* Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed.
* @param {Mixed} item Disposable to add.
*/
CompositeDisposablePrototype.add = function (item) {
if (this.isDisposed) {
item.dispose();
} else {
this.disposables.push(item);
this.length++;
}
};
/**
* Removes and disposes the first occurrence of a disposable from the CompositeDisposable.
* @param {Mixed} item Disposable to remove.
* @returns {Boolean} true if found; false otherwise.
*/
CompositeDisposablePrototype.remove = function (item) {
var shouldDispose = false;
if (!this.isDisposed) {
var idx = this.disposables.indexOf(item);
if (idx !== -1) {
shouldDispose = true;
this.disposables.splice(idx, 1);
this.length--;
item.dispose();
}
}
return shouldDispose;
};
/**
* Disposes all disposables in the group and removes them from the group.
*/
CompositeDisposablePrototype.dispose = function () {
if (!this.isDisposed) {
this.isDisposed = true;
var len = this.disposables.length, currentDisposables = new Array(len);
for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; }
this.disposables = [];
this.length = 0;
for (i = 0; i < len; i++) {
currentDisposables[i].dispose();
}
}
};
/**
* Provides a set of static methods for creating Disposables.
* @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once.
*/
var Disposable = Rx.Disposable = function (action) {
this.isDisposed = false;
this.action = action || noop;
};
/** Performs the task of cleaning up resources. */
Disposable.prototype.dispose = function () {
if (!this.isDisposed) {
this.action();
this.isDisposed = true;
}
};
/**
* Creates a disposable object that invokes the specified action when disposed.
* @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once.
* @return {Disposable} The disposable object that runs the given action upon disposal.
*/
var disposableCreate = Disposable.create = function (action) { return new Disposable(action); };
/**
* Gets the disposable that does nothing when disposed.
*/
var disposableEmpty = Disposable.empty = { dispose: noop };
/**
* Validates whether the given object is a disposable
* @param {Object} Object to test whether it has a dispose method
* @returns {Boolean} true if a disposable object, else false.
*/
var isDisposable = Disposable.isDisposable = function (d) {
return d && isFunction(d.dispose);
};
var checkDisposed = Disposable.checkDisposed = function (disposable) {
if (disposable.isDisposed) { throw new ObjectDisposedError(); }
};
// Single assignment
var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = function () {
this.isDisposed = false;
this.current = null;
};
SingleAssignmentDisposable.prototype.getDisposable = function () {
return this.current;
};
SingleAssignmentDisposable.prototype.setDisposable = function (value) {
if (this.current) { throw new Error('Disposable has already been assigned'); }
var shouldDispose = this.isDisposed;
!shouldDispose && (this.current = value);
shouldDispose && value && value.dispose();
};
SingleAssignmentDisposable.prototype.dispose = function () {
if (!this.isDisposed) {
this.isDisposed = true;
var old = this.current;
this.current = null;
}
old && old.dispose();
};
// Multiple assignment disposable
var SerialDisposable = Rx.SerialDisposable = function () {
this.isDisposed = false;
this.current = null;
};
SerialDisposable.prototype.getDisposable = function () {
return this.current;
};
SerialDisposable.prototype.setDisposable = function (value) {
var shouldDispose = this.isDisposed;
if (!shouldDispose) {
var old = this.current;
this.current = value;
}
old && old.dispose();
shouldDispose && value && value.dispose();
};
SerialDisposable.prototype.dispose = function () {
if (!this.isDisposed) {
this.isDisposed = true;
var old = this.current;
this.current = null;
}
old && old.dispose();
};
/**
* Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed.
*/
var RefCountDisposable = Rx.RefCountDisposable = (function () {
function InnerDisposable(disposable) {
this.disposable = disposable;
this.disposable.count++;
this.isInnerDisposed = false;
}
InnerDisposable.prototype.dispose = function () {
if (!this.disposable.isDisposed && !this.isInnerDisposed) {
this.isInnerDisposed = true;
this.disposable.count--;
if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) {
this.disposable.isDisposed = true;
this.disposable.underlyingDisposable.dispose();
}
}
};
/**
* Initializes a new instance of the RefCountDisposable with the specified disposable.
* @constructor
* @param {Disposable} disposable Underlying disposable.
*/
function RefCountDisposable(disposable) {
this.underlyingDisposable = disposable;
this.isDisposed = false;
this.isPrimaryDisposed = false;
this.count = 0;
}
/**
* Disposes the underlying disposable only when all dependent disposables have been disposed
*/
RefCountDisposable.prototype.dispose = function () {
if (!this.isDisposed && !this.isPrimaryDisposed) {
this.isPrimaryDisposed = true;
if (this.count === 0) {
this.isDisposed = true;
this.underlyingDisposable.dispose();
}
}
};
/**
* Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable.
* @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime.
*/
RefCountDisposable.prototype.getDisposable = function () {
return this.isDisposed ? disposableEmpty : new InnerDisposable(this);
};
return RefCountDisposable;
})();
function ScheduledDisposable(scheduler, disposable) {
this.scheduler = scheduler;
this.disposable = disposable;
this.isDisposed = false;
}
function scheduleItem(s, self) {
if (!self.isDisposed) {
self.isDisposed = true;
self.disposable.dispose();
}
}
ScheduledDisposable.prototype.dispose = function () {
this.scheduler.scheduleWithState(this, scheduleItem);
};
var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) {
this.scheduler = scheduler;
this.state = state;
this.action = action;
this.dueTime = dueTime;
this.comparer = comparer || defaultSubComparer;
this.disposable = new SingleAssignmentDisposable();
}
ScheduledItem.prototype.invoke = function () {
this.disposable.setDisposable(this.invokeCore());
};
ScheduledItem.prototype.compareTo = function (other) {
return this.comparer(this.dueTime, other.dueTime);
};
ScheduledItem.prototype.isCancelled = function () {
return this.disposable.isDisposed;
};
ScheduledItem.prototype.invokeCore = function () {
return this.action(this.scheduler, this.state);
};
/** Provides a set of static properties to access commonly used schedulers. */
var Scheduler = Rx.Scheduler = (function () {
function Scheduler(now, schedule, scheduleRelative, scheduleAbsolute) {
this.now = now;
this._schedule = schedule;
this._scheduleRelative = scheduleRelative;
this._scheduleAbsolute = scheduleAbsolute;
}
/** Determines whether the given object is a scheduler */
Scheduler.isScheduler = function (s) {
return s instanceof Scheduler;
}
function invokeAction(scheduler, action) {
action();
return disposableEmpty;
}
var schedulerProto = Scheduler.prototype;
/**
* Schedules an action to be executed.
* @param {Function} action Action to execute.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.schedule = function (action) {
return this._schedule(action, invokeAction);
};
/**
* Schedules an action to be executed.
* @param state State passed to the action to be executed.
* @param {Function} action Action to be executed.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleWithState = function (state, action) {
return this._schedule(state, action);
};
/**
* Schedules an action to be executed after the specified relative due time.
* @param {Function} action Action to execute.
* @param {Number} dueTime Relative time after which to execute the action.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleWithRelative = function (dueTime, action) {
return this._scheduleRelative(action, dueTime, invokeAction);
};
/**
* Schedules an action to be executed after dueTime.
* @param state State passed to the action to be executed.
* @param {Function} action Action to be executed.
* @param {Number} dueTime Relative time after which to execute the action.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleWithRelativeAndState = function (state, dueTime, action) {
return this._scheduleRelative(state, dueTime, action);
};
/**
* Schedules an action to be executed at the specified absolute due time.
* @param {Function} action Action to execute.
* @param {Number} dueTime Absolute time at which to execute the action.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleWithAbsolute = function (dueTime, action) {
return this._scheduleAbsolute(action, dueTime, invokeAction);
};
/**
* Schedules an action to be executed at dueTime.
* @param {Mixed} state State passed to the action to be executed.
* @param {Function} action Action to be executed.
* @param {Number}dueTime Absolute time at which to execute the action.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleWithAbsoluteAndState = function (state, dueTime, action) {
return this._scheduleAbsolute(state, dueTime, action);
};
/** Gets the current time according to the local machine's system clock. */
Scheduler.now = defaultNow;
/**
* Normalizes the specified TimeSpan value to a positive value.
* @param {Number} timeSpan The time span value to normalize.
* @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0
*/
Scheduler.normalize = function (timeSpan) {
timeSpan < 0 && (timeSpan = 0);
return timeSpan;
};
return Scheduler;
}());
var normalizeTime = Scheduler.normalize, isScheduler = Scheduler.isScheduler;
(function (schedulerProto) {
function invokeRecImmediate(scheduler, pair) {
var state = pair[0], action = pair[1], group = new CompositeDisposable();
action(state, innerAction);
return group;
function innerAction(state2) {
var isAdded = false, isDone = false;
var d = scheduler.scheduleWithState(state2, scheduleWork);
if (!isDone) {
group.add(d);
isAdded = true;
}
function scheduleWork(_, state3) {
if (isAdded) {
group.remove(d);
} else {
isDone = true;
}
action(state3, innerAction);
return disposableEmpty;
}
}
}
function invokeRecDate(scheduler, pair, method) {
var state = pair[0], action = pair[1], group = new CompositeDisposable();
action(state, innerAction);
return group;
function innerAction(state2, dueTime1) {
var isAdded = false, isDone = false;
var d = scheduler[method](state2, dueTime1, scheduleWork);
if (!isDone) {
group.add(d);
isAdded = true;
}
function scheduleWork(_, state3) {
if (isAdded) {
group.remove(d);
} else {
isDone = true;
}
action(state3, innerAction);
return disposableEmpty;
}
}
}
function invokeRecDateRelative(s, p) {
return invokeRecDate(s, p, 'scheduleWithRelativeAndState');
}
function invokeRecDateAbsolute(s, p) {
return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState');
}
function scheduleInnerRecursive(action, self) {
action(function(dt) { self(action, dt); });
}
/**
* Schedules an action to be executed recursively.
* @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursive = function (action) {
return this.scheduleRecursiveWithState(action, scheduleInnerRecursive);
};
/**
* Schedules an action to be executed recursively.
* @param {Mixed} state State passed to the action to be executed.
* @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursiveWithState = function (state, action) {
return this.scheduleWithState([state, action], invokeRecImmediate);
};
/**
* Schedules an action to be executed recursively after a specified relative due time.
* @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified relative time.
* @param {Number}dueTime Relative time after which to execute the action for the first time.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursiveWithRelative = function (dueTime, action) {
return this.scheduleRecursiveWithRelativeAndState(action, dueTime, scheduleInnerRecursive);
};
/**
* Schedules an action to be executed recursively after a specified relative due time.
* @param {Mixed} state State passed to the action to be executed.
* @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state.
* @param {Number}dueTime Relative time after which to execute the action for the first time.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursiveWithRelativeAndState = function (state, dueTime, action) {
return this._scheduleRelative([state, action], dueTime, invokeRecDateRelative);
};
/**
* Schedules an action to be executed recursively at a specified absolute due time.
* @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified absolute time.
* @param {Number}dueTime Absolute time at which to execute the action for the first time.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursiveWithAbsolute = function (dueTime, action) {
return this.scheduleRecursiveWithAbsoluteAndState(action, dueTime, scheduleInnerRecursive);
};
/**
* Schedules an action to be executed recursively at a specified absolute due time.
* @param {Mixed} state State passed to the action to be executed.
* @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state.
* @param {Number}dueTime Absolute time at which to execute the action for the first time.
* @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
*/
schedulerProto.scheduleRecursiveWithAbsoluteAndState = function (state, dueTime, action) {
return this._scheduleAbsolute([state, action], dueTime, invokeRecDateAbsolute);
};
}(Scheduler.prototype));
(function (schedulerProto) {
/**
* Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation.
* @param {Number} period Period for running the work periodically.
* @param {Function} action Action to be executed.
* @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort).
*/
Scheduler.prototype.schedulePeriodic = function (period, action) {
return this.schedulePeriodicWithState(null, period, action);
};
/**
* Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation.
* @param {Mixed} state Initial state passed to the action upon the first iteration.
* @param {Number} period Period for running the work periodically.
* @param {Function} action Action to be executed, potentially updating the state.
* @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort).
*/
Scheduler.prototype.schedulePeriodicWithState = function(state, period, action) {
if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); }
period = normalizeTime(period);
var s = state, id = root.setInterval(function () { s = action(s); }, period);
return disposableCreate(function () { root.clearInterval(id); });
};
}(Scheduler.prototype));
(function (schedulerProto) {
/**
* Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions.
* @param {Function} handler Handler that's run if an exception is caught. The exception will be rethrown if the handler returns false.
* @returns {Scheduler} Wrapper around the original scheduler, enforcing exception handling.
*/
schedulerProto.catchError = schedulerProto['catch'] = function (handler) {
return new CatchScheduler(this, handler);
};
}(Scheduler.prototype));
var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () {
function tick(command, recurse) {
recurse(0, this._period);
try {
this._state = this._action(this._state);
} catch (e) {
this._cancel.dispose();
throw e;
}
}
function SchedulePeriodicRecursive(scheduler, state, period, action) {
this._scheduler = scheduler;
this._state = state;
this._period = period;
this._action = action;
}
SchedulePeriodicRecursive.prototype.start = function () {
var d = new SingleAssignmentDisposable();
this._cancel = d;
d.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0, this._period, tick.bind(this)));
return d;
};
return SchedulePeriodicRecursive;
}());
/** Gets a scheduler that schedules work immediately on the current thread. */
var immediateScheduler = Scheduler.immediate = (function () {
function scheduleNow(state, action) { return action(this, state); }
return new Scheduler(defaultNow, scheduleNow, notSupported, notSupported);
}());
/**
* Gets a scheduler that schedules work as soon as possible on the current thread.
*/
var currentThreadScheduler = Scheduler.currentThread = (function () {
var queue;
function runTrampoline () {
while (queue.length > 0) {
var item = queue.shift();
!item.isCancelled() && item.invoke();
}
}
function scheduleNow(state, action) {
var si = new ScheduledItem(this, state, action, this.now());
if (!queue) {
queue = [si];
var result = tryCatch(runTrampoline)();
queue = null;
if (result === errorObj) { return thrower(result.e); }
} else {
queue.push(si);
}
return si.disposable;
}
var currentScheduler = new Scheduler(defaultNow, scheduleNow, notSupported, notSupported);
currentScheduler.scheduleRequired = function () { return !queue; };
return currentScheduler;
}());
var scheduleMethod, clearMethod;
var localTimer = (function () {
var localSetTimeout, localClearTimeout = noop;
if (!!root.setTimeout) {
localSetTimeout = root.setTimeout;
localClearTimeout = root.clearTimeout;
} else if (!!root.WScript) {
localSetTimeout = function (fn, time) {
root.WScript.Sleep(time);
fn();
};
} else {
throw new NotSupportedError();
}
return {
setTimeout: localSetTimeout,
clearTimeout: localClearTimeout
};
}());
var localSetTimeout = localTimer.setTimeout,
localClearTimeout = localTimer.clearTimeout;
(function () {
var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false;
clearMethod = function (handle) {
delete tasksByHandle[handle];
};
function runTask(handle) {
if (currentlyRunning) {
localSetTimeout(function () { runTask(handle) }, 0);
} else {
var task = tasksByHandle[handle];
if (task) {
currentlyRunning = true;
var result = tryCatch(task)();
clearMethod(handle);
currentlyRunning = false;
if (result === errorObj) { return thrower(result.e); }
}
}
}
var reNative = RegExp('^' +
String(toString)
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
.replace(/toString| for [^\]]+/g, '.*?') + '$'
);
var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' &&
!reNative.test(setImmediate) && setImmediate;
function postMessageSupported () {
// Ensure not in a worker
if (!root.postMessage || root.importScripts) { return false; }
var isAsync = false, oldHandler = root.onmessage;
// Test for async
root.onmessage = function () { isAsync = true; };
root.postMessage('', '*');
root.onmessage = oldHandler;
return isAsync;
}
// Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout
if (isFunction(setImmediate)) {
scheduleMethod = function (action) {
var id = nextHandle++;
tasksByHandle[id] = action;
setImmediate(function () { runTask(id); });
return id;
};
} else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
scheduleMethod = function (action) {
var id = nextHandle++;
tasksByHandle[id] = action;
process.nextTick(function () { runTask(id); });
return id;
};
} else if (postMessageSupported()) {
var MSG_PREFIX = 'ms.rx.schedule' + Math.random();
function onGlobalPostMessage(event) {
// Only if we're a match to avoid any other global events
if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) {
runTask(event.data.substring(MSG_PREFIX.length));
}
}
if (root.addEventListener) {
root.addEventListener('message', onGlobalPostMessage, false);
} else if (root.attachEvent) {
root.attachEvent('onmessage', onGlobalPostMessage);
} else {
root.onmessage = onGlobalPostMessage;
}
scheduleMethod = function (action) {
var id = nextHandle++;
tasksByHandle[id] = action;
root.postMessage(MSG_PREFIX + currentId, '*');
return id;
};
} else if (!!root.MessageChannel) {
var channel = new root.MessageChannel();
channel.port1.onmessage = function (e) { runTask(e.data); };
scheduleMethod = function (action) {
var id = nextHandle++;
tasksByHandle[id] = action;
channel.port2.postMessage(id);
return id;
};
} else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) {
scheduleMethod = function (action) {
var scriptElement = root.document.createElement('script');
var id = nextHandle++;
tasksByHandle[id] = action;
scriptElement.onreadystatechange = function () {
runTask(id);
scriptElement.onreadystatechange = null;
scriptElement.parentNode.removeChild(scriptElement);
scriptElement = null;
};
root.document.documentElement.appendChild(scriptElement);
return id;
};
} else {
scheduleMethod = function (action) {
var id = nextHandle++;
tasksByHandle[id] = action;
localSetTimeout(function () {
runTask(id);
}, 0);
return id;
};
}
}());
/**
* Gets a scheduler that schedules work via a timed callback based upon platform.
*/
var timeoutScheduler = Scheduler.timeout = Scheduler['default'] = (function () {
function scheduleNow(state, action) {
var scheduler = this, disposable = new SingleAssignmentDisposable();
var id = scheduleMethod(function () {
!disposable.isDisposed && disposable.setDisposable(action(scheduler, state));
});
return new CompositeDisposable(disposable, disposableCreate(function () {
clearMethod(id);
}));
}
function scheduleRelative(state, dueTime, action) {
var scheduler = this, dt = Scheduler.normalize(dueTime), disposable = new SingleAssignmentDisposable();
if (dt === 0) { return scheduler.scheduleWithState(state, action); }
var id = localSetTimeout(function () {
!disposable.isDisposed && disposable.setDisposable(action(scheduler, state));
}, dt);
return new CompositeDisposable(disposable, disposableCreate(function () {
localClearTimeout(id);
}));
}
function scheduleAbsolute(state, dueTime, action) {
return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action);
}
return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute);
})();
var CatchScheduler = (function (__super__) {
function scheduleNow(state, action) {
return this._scheduler.scheduleWithState(state, this._wrap(action));
}
function scheduleRelative(state, dueTime, action) {
return this._scheduler.scheduleWithRelativeAndState(state, dueTime, this._wrap(action));
}
function scheduleAbsolute(state, dueTime, action) {
return this._scheduler.scheduleWithAbsoluteAndState(state, dueTime, this._wrap(action));
}
inherits(CatchScheduler, __super__);
function CatchScheduler(scheduler, handler) {
this._scheduler = scheduler;
this._handler = handler;
this._recursiveOriginal = null;
this._recursiveWrapper = null;
__super__.call(this, this._scheduler.now.bind(this._scheduler), scheduleNow, scheduleRelative, scheduleAbsolute);
}
CatchScheduler.prototype._clone = function (scheduler) {
return new CatchScheduler(scheduler, this._handler);
};
CatchScheduler.prototype._wrap = function (action) {
var parent = this;
return function (self, state) {
try {
return action(parent._getRecursiveWrapper(self), state);
} catch (e) {
if (!parent._handler(e)) { throw e; }
return disposableEmpty;
}
};
};
CatchScheduler.prototype._getRecursiveWrapper = function (scheduler) {
if (this._recursiveOriginal !== scheduler) {
this._recursiveOriginal = scheduler;
var wrapper = this._clone(scheduler);
wrapper._recursiveOriginal = scheduler;
wrapper._recursiveWrapper = wrapper;
this._recursiveWrapper = wrapper;
}
return this._recursiveWrapper;
};
CatchScheduler.prototype.schedulePeriodicWithState = function (state, period, action) {
var self = this, failed = false, d = new SingleAssignmentDisposable();
d.setDisposable(this._scheduler.schedulePeriodicWithState(state, period, function (state1) {
if (failed) { return null; }
try {
return action(state1);
} catch (e) {
failed = true;
if (!self._handler(e)) { throw e; }
d.dispose();
return null;
}
}));
return d;
};
return CatchScheduler;
}(Scheduler));
/**
* Represents a notification to an observer.
*/
var Notification = Rx.Notification = (function () {
function Notification(kind, value, exception, accept, acceptObservable, toString) {
this.kind = kind;
this.value = value;
this.exception = exception;
this._accept = accept;
this._acceptObservable = acceptObservable;
this.toString = toString;
}
/**
* Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result.
*
* @memberOf Notification
* @param {Any} observerOrOnNext Delegate to invoke for an OnNext notification or Observer to invoke the notification on..
* @param {Function} onError Delegate to invoke for an OnError notification.
* @param {Function} onCompleted Delegate to invoke for an OnCompleted notification.
* @returns {Any} Result produced by the observation.
*/
Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) {
return observerOrOnNext && typeof observerOrOnNext === 'object' ?
this._acceptObservable(observerOrOnNext) :
this._accept(observerOrOnNext, onError, onCompleted);
};
/**
* Returns an observable sequence with a single notification.
*
* @memberOf Notifications
* @param {Scheduler} [scheduler] Scheduler to send out the notification calls on.
* @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription.
*/
Notification.prototype.toObservable = function (scheduler) {
var self = this;
isScheduler(scheduler) || (scheduler = immediateScheduler);
return new AnonymousObservable(function (observer) {
return scheduler.scheduleWithState(self, function (_, notification) {
notification._acceptObservable(observer);
notification.kind === 'N' && observer.onCompleted();
});
});
};
return Notification;
})();
/**
* Creates an object that represents an OnNext notification to an observer.
* @param {Any} value The value contained in the notification.
* @returns {Notification} The OnNext notification containing the value.
*/
var notificationCreateOnNext = Notification.createOnNext = (function () {
function _accept(onNext) { return onNext(this.value); }
function _acceptObservable(observer) { return observer.onNext(this.value); }
function toString() { return 'OnNext(' + this.value + ')'; }
return function (value) {
return new Notification('N', value, null, _accept, _acceptObservable, toString);
};
}());
/**
* Creates an object that represents an OnError notification to an observer.
* @param {Any} error The exception contained in the notification.
* @returns {Notification} The OnError notification containing the exception.
*/
var notificationCreateOnError = Notification.createOnError = (function () {
function _accept (onNext, onError) { return onError(this.exception); }
function _acceptObservable(observer) { return observer.onError(this.exception); }
function toString () { return 'OnError(' + this.exception + ')'; }
return function (e) {
return new Notification('E', null, e, _accept, _acceptObservable, toString);
};
}());
/**
* Creates an object that represents an OnCompleted notification to an observer.
* @returns {Notification} The OnCompleted notification.
*/
var notificationCreateOnCompleted = Notification.createOnCompleted = (function () {
function _accept (onNext, onError, onCompleted) { return onCompleted(); }
function _acceptObservable(observer) { return observer.onCompleted(); }
function toString () { return 'OnCompleted()'; }
return function () {
return new Notification('C', null, null, _accept, _acceptObservable, toString);
};
}());
/**
* Supports push-style iteration over an observable sequence.
*/
var Observer = Rx.Observer = function () { };
/**
* Creates a notification callback from an observer.
* @returns The action that forwards its input notification to the underlying observer.
*/
Observer.prototype.toNotifier = function () {
var observer = this;
return function (n) { return n.accept(observer); };
};
/**
* Hides the identity of an observer.
* @returns An observer that hides the identity of the specified observer.
*/
Observer.prototype.asObserver = function () {
var self = this;
return new AnonymousObserver(
function (x) { self.onNext(x); },
function (err) { self.onError(err); },
function () { self.onCompleted(); });
};
/**
* Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods.
* If a violation is detected, an Error is thrown from the offending observer method call.
* @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer.
*/
Observer.prototype.checked = function () { return new CheckedObserver(this); };
/**
* Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions.
* @param {Function} [onNext] Observer's OnNext action implementation.
* @param {Function} [onError] Observer's OnError action implementation.
* @param {Function} [onCompleted] Observer's OnCompleted action implementation.
* @returns {Observer} The observer object implemented using the given actions.
*/
var observerCreate = Observer.create = function (onNext, onError, onCompleted) {
onNext || (onNext = noop);
onError || (onError = defaultError);
onCompleted || (onCompleted = noop);
return new AnonymousObserver(onNext, onError, onCompleted);
};
/**
* Creates an observer from a notification callback.
*
* @static
* @memberOf Observer
* @param {Function} handler Action that handles a notification.
* @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives.
*/
Observer.fromNotifier = function (handler, thisArg) {
var cb = bindCallback(handler, thisArg, 1);
return new AnonymousObserver(function (x) {
return cb(notificationCreateOnNext(x));
}, function (e) {
return cb(notificationCreateOnError(e));
}, function () {
return cb(notificationCreateOnCompleted());
});
};
/**
* Schedules the invocation of observer methods on the given scheduler.
* @param {Scheduler} scheduler Scheduler to schedule observer messages on.
* @returns {Observer} Observer whose messages are scheduled on the given scheduler.
*/
Observer.prototype.notifyOn = function (scheduler) {
return new ObserveOnObserver(scheduler, this);
};
Observer.prototype.makeSafe = function(disposable) {
return new AnonymousSafeObserver(this._onNext, this._onError, this._onCompleted, disposable);
};
/**
* Abstract base class for implementations of the Observer class.
* This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages.
*/
var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) {
inherits(AbstractObserver, __super__);
/**
* Creates a new observer in a non-stopped state.
*/
function AbstractObserver() {
this.isStopped = false;
}
// Must be implemented by other observers
AbstractObserver.prototype.next = notImplemented;
AbstractObserver.prototype.error = notImplemented;
AbstractObserver.prototype.completed = notImplemented;
/**
* Notifies the observer of a new element in the sequence.
* @param {Any} value Next element in the sequence.
*/
AbstractObserver.prototype.onNext = function (value) {
!this.isStopped && this.next(value);
};
/**
* Notifies the observer that an exception has occurred.
* @param {Any} error The error that has occurred.
*/
AbstractObserver.prototype.onError = function (error) {
if (!this.isStopped) {
this.isStopped = true;
this.error(error);
}
};
/**
* Notifies the observer of the end of the sequence.
*/
AbstractObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
this.completed();
}
};
/**
* Disposes the observer, causing it to transition to the stopped state.
*/
AbstractObserver.prototype.dispose = function () { this.isStopped = true; };
AbstractObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.error(e);
return true;
}
return false;
};
return AbstractObserver;
}(Observer));
/**
* Class to create an Observer instance from delegate-based implementations of the on* methods.
*/
var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) {
inherits(AnonymousObserver, __super__);
/**
* Creates an observer from the specified OnNext, OnError, and OnCompleted actions.
* @param {Any} onNext Observer's OnNext action implementation.
* @param {Any} onError Observer's OnError action implementation.
* @param {Any} onCompleted Observer's OnCompleted action implementation.
*/
function AnonymousObserver(onNext, onError, onCompleted) {
__super__.call(this);
this._onNext = onNext;
this._onError = onError;
this._onCompleted = onCompleted;
}
/**
* Calls the onNext action.
* @param {Any} value Next element in the sequence.
*/
AnonymousObserver.prototype.next = function (value) {
this._onNext(value);
};
/**
* Calls the onError action.
* @param {Any} error The error that has occurred.
*/
AnonymousObserver.prototype.error = function (error) {
this._onError(error);
};
/**
* Calls the onCompleted action.
*/
AnonymousObserver.prototype.completed = function () {
this._onCompleted();
};
return AnonymousObserver;
}(AbstractObserver));
var CheckedObserver = (function (__super__) {
inherits(CheckedObserver, __super__);
function CheckedObserver(observer) {
__super__.call(this);
this._observer = observer;
this._state = 0; // 0 - idle, 1 - busy, 2 - done
}
var CheckedObserverPrototype = CheckedObserver.prototype;
CheckedObserverPrototype.onNext = function (value) {
this.checkAccess();
var res = tryCatch(this._observer.onNext).call(this._observer, value);
this._state = 0;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.onError = function (err) {
this.checkAccess();
var res = tryCatch(this._observer.onError).call(this._observer, err);
this._state = 2;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.onCompleted = function () {
this.checkAccess();
var res = tryCatch(this._observer.onCompleted).call(this._observer);
this._state = 2;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.checkAccess = function () {
if (this._state === 1) { throw new Error('Re-entrancy detected'); }
if (this._state === 2) { throw new Error('Observer completed'); }
if (this._state === 0) { this._state = 1; }
};
return CheckedObserver;
}(Observer));
var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) {
inherits(ScheduledObserver, __super__);
function ScheduledObserver(scheduler, observer) {
__super__.call(this);
this.scheduler = scheduler;
this.observer = observer;
this.isAcquired = false;
this.hasFaulted = false;
this.queue = [];
this.disposable = new SerialDisposable();
}
ScheduledObserver.prototype.next = function (value) {
var self = this;
this.queue.push(function () { self.observer.onNext(value); });
};
ScheduledObserver.prototype.error = function (e) {
var self = this;
this.queue.push(function () { self.observer.onError(e); });
};
ScheduledObserver.prototype.completed = function () {
var self = this;
this.queue.push(function () { self.observer.onCompleted(); });
};
ScheduledObserver.prototype.ensureActive = function () {
var isOwner = false;
if (!this.hasFaulted && this.queue.length > 0) {
isOwner = !this.isAcquired;
this.isAcquired = true;
}
if (isOwner) {
this.disposable.setDisposable(this.scheduler.scheduleRecursiveWithState(this, function (parent, self) {
var work;
if (parent.queue.length > 0) {
work = parent.queue.shift();
} else {
parent.isAcquired = false;
return;
}
var res = tryCatch(work)();
if (res === errorObj) {
parent.queue = [];
parent.hasFaulted = true;
return thrower(res.e);
}
self(parent);
}));
}
};
ScheduledObserver.prototype.dispose = function () {
__super__.prototype.dispose.call(this);
this.disposable.dispose();
};
return ScheduledObserver;
}(AbstractObserver));
var ObserveOnObserver = (function (__super__) {
inherits(ObserveOnObserver, __super__);
function ObserveOnObserver(scheduler, observer, cancel) {
__super__.call(this, scheduler, observer);
this._cancel = cancel;
}
ObserveOnObserver.prototype.next = function (value) {
__super__.prototype.next.call(this, value);
this.ensureActive();
};
ObserveOnObserver.prototype.error = function (e) {
__super__.prototype.error.call(this, e);
this.ensureActive();
};
ObserveOnObserver.prototype.completed = function () {
__super__.prototype.completed.call(this);
this.ensureActive();
};
ObserveOnObserver.prototype.dispose = function () {
__super__.prototype.dispose.call(this);
this._cancel && this._cancel.dispose();
this._cancel = null;
};
return ObserveOnObserver;
})(ScheduledObserver);
var observableProto;
/**
* Represents a push-style collection.
*/
var Observable = Rx.Observable = (function () {
function makeSubscribe(self, subscribe) {
return function (o) {
var oldOnError = o.onError;
o.onError = function (e) {
makeStackTraceLong(e, self);
oldOnError.call(o, e);
};
return subscribe.call(self, o);
};
}
function Observable(subscribe) {
if (Rx.config.longStackSupport && hasStacks) {
var e = tryCatch(thrower)(new Error()).e;
this.stack = e.stack.substring(e.stack.indexOf('\n') + 1);
this._subscribe = makeSubscribe(this, subscribe);
} else {
this._subscribe = subscribe;
}
}
observableProto = Observable.prototype;
/**
* Determines whether the given object is an Observable
* @param {Any} An object to determine whether it is an Observable
* @returns {Boolean} true if an Observable, else false.
*/
Observable.isObservable = function (o) {
return o && isFunction(o.subscribe);
}
/**
* Subscribes an o to the observable sequence.
* @param {Mixed} [oOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence.
* @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence.
* @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence.
* @returns {Diposable} A disposable handling the subscriptions and unsubscriptions.
*/
observableProto.subscribe = observableProto.forEach = function (oOrOnNext, onError, onCompleted) {
return this._subscribe(typeof oOrOnNext === 'object' ?
oOrOnNext :
observerCreate(oOrOnNext, onError, onCompleted));
};
/**
* Subscribes to the next value in the sequence with an optional "this" argument.
* @param {Function} onNext The function to invoke on each element in the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
*/
observableProto.subscribeOnNext = function (onNext, thisArg) {
return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext));
};
/**
* Subscribes to an exceptional condition in the sequence with an optional "this" argument.
* @param {Function} onError The function to invoke upon exceptional termination of the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
*/
observableProto.subscribeOnError = function (onError, thisArg) {
return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError));
};
/**
* Subscribes to the next value in the sequence with an optional "this" argument.
* @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Disposable} A disposable handling the subscriptions and unsubscriptions.
*/
observableProto.subscribeOnCompleted = function (onCompleted, thisArg) {
return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted));
};
return Observable;
})();
var ObservableBase = Rx.ObservableBase = (function (__super__) {
inherits(ObservableBase, __super__);
function fixSubscriber(subscriber) {
return subscriber && isFunction(subscriber.dispose) ? subscriber :
isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty;
}
function setDisposable(s, state) {
var ado = state[0], self = state[1];
var sub = tryCatch(self.subscribeCore).call(self, ado);
if (sub === errorObj) {
if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); }
}
ado.setDisposable(fixSubscriber(sub));
}
function subscribe(observer) {
var ado = new AutoDetachObserver(observer), state = [ado, this];
if (currentThreadScheduler.scheduleRequired()) {
currentThreadScheduler.scheduleWithState(state, setDisposable);
} else {
setDisposable(null, state);
}
return ado;
}
function ObservableBase() {
__super__.call(this, subscribe);
}
ObservableBase.prototype.subscribeCore = notImplemented;
return ObservableBase;
}(Observable));
var FlatMapObservable = (function(__super__){
inherits(FlatMapObservable, __super__);
function FlatMapObservable(source, selector, resultSelector, thisArg) {
this.resultSelector = Rx.helpers.isFunction(resultSelector) ?
resultSelector : null;
this.selector = Rx.internals.bindCallback(Rx.helpers.isFunction(selector) ? selector : function() { return selector; }, thisArg, 3);
this.source = source;
__super__.call(this);
}
FlatMapObservable.prototype.subscribeCore = function(o) {
return this.source.subscribe(new InnerObserver(o, this.selector, this.resultSelector, this));
};
function InnerObserver(observer, selector, resultSelector, source) {
this.i = 0;
this.selector = selector;
this.resultSelector = resultSelector;
this.source = source;
this.isStopped = false;
this.o = observer;
}
InnerObserver.prototype._wrapResult = function(result, x, i) {
return this.resultSelector ?
result.map(function(y, i2) { return this.resultSelector(x, y, i, i2); }, this) :
result;
};
InnerObserver.prototype.onNext = function(x) {
if (this.isStopped) return;
var i = this.i++;
var result = tryCatch(this.selector)(x, i, this.source);
if (result === errorObj) {
return this.o.onError(result.e);
}
Rx.helpers.isPromise(result) && (result = Rx.Observable.fromPromise(result));
(Rx.helpers.isArrayLike(result) || Rx.helpers.isIterable(result)) && (result = Rx.Observable.from(result));
this.o.onNext(this._wrapResult(result, x, i));
};
InnerObserver.prototype.onError = function(e) {
if(!this.isStopped) { this.isStopped = true; this.o.onError(e); }
};
InnerObserver.prototype.onCompleted = function() {
if (!this.isStopped) {this.isStopped = true; this.o.onCompleted(); }
};
return FlatMapObservable;
}(ObservableBase));
var Enumerable = Rx.internals.Enumerable = function () { };
var ConcatEnumerableObservable = (function(__super__) {
inherits(ConcatEnumerableObservable, __super__);
function ConcatEnumerableObservable(sources) {
this.sources = sources;
__super__.call(this);
}
ConcatEnumerableObservable.prototype.subscribeCore = function (o) {
var isDisposed, subscription = new SerialDisposable();
var cancelable = immediateScheduler.scheduleRecursiveWithState(this.sources[$iterator$](), function (e, self) {
if (isDisposed) { return; }
var currentItem = tryCatch(e.next).call(e);
if (currentItem === errorObj) { return o.onError(currentItem.e); }
if (currentItem.done) {
return o.onCompleted();
}
// Check if promise
var currentValue = currentItem.value;
isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
var d = new SingleAssignmentDisposable();
subscription.setDisposable(d);
d.setDisposable(currentValue.subscribe(new InnerObserver(o, self, e)));
});
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
isDisposed = true;
}));
};
function InnerObserver(o, s, e) {
this.o = o;
this.s = s;
this.e = e;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.o.onNext(x); } };
InnerObserver.prototype.onError = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(err);
}
};
InnerObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
this.s(this.e);
}
};
InnerObserver.prototype.dispose = function () { this.isStopped = true; };
InnerObserver.prototype.fail = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(err);
return true;
}
return false;
};
return ConcatEnumerableObservable;
}(ObservableBase));
Enumerable.prototype.concat = function () {
return new ConcatEnumerableObservable(this);
};
var CatchErrorObservable = (function(__super__) {
inherits(CatchErrorObservable, __super__);
function CatchErrorObservable(sources) {
this.sources = sources;
__super__.call(this);
}
CatchErrorObservable.prototype.subscribeCore = function (o) {
var e = this.sources[$iterator$]();
var isDisposed, subscription = new SerialDisposable();
var cancelable = immediateScheduler.scheduleRecursiveWithState(null, function (lastException, self) {
if (isDisposed) { return; }
var currentItem = tryCatch(e.next).call(e);
if (currentItem === errorObj) { return o.onError(currentItem.e); }
if (currentItem.done) {
return lastException !== null ? o.onError(lastException) : o.onCompleted();
}
// Check if promise
var currentValue = currentItem.value;
isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
var d = new SingleAssignmentDisposable();
subscription.setDisposable(d);
d.setDisposable(currentValue.subscribe(
function(x) { o.onNext(x); },
self,
function() { o.onCompleted(); }));
});
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
isDisposed = true;
}));
};
return CatchErrorObservable;
}(ObservableBase));
Enumerable.prototype.catchError = function () {
return new CatchErrorObservable(this);
};
Enumerable.prototype.catchErrorWhen = function (notificationHandler) {
var sources = this;
return new AnonymousObservable(function (o) {
var exceptions = new Subject(),
notifier = new Subject(),
handled = notificationHandler(exceptions),
notificationDisposable = handled.subscribe(notifier);
var e = sources[$iterator$]();
var isDisposed,
lastException,
subscription = new SerialDisposable();
var cancelable = immediateScheduler.scheduleRecursive(function (self) {
if (isDisposed) { return; }
var currentItem = tryCatch(e.next).call(e);
if (currentItem === errorObj) { return o.onError(currentItem.e); }
if (currentItem.done) {
if (lastException) {
o.onError(lastException);
} else {
o.onCompleted();
}
return;
}
// Check if promise
var currentValue = currentItem.value;
isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
var outer = new SingleAssignmentDisposable();
var inner = new SingleAssignmentDisposable();
subscription.setDisposable(new CompositeDisposable(inner, outer));
outer.setDisposable(currentValue.subscribe(
function(x) { o.onNext(x); },
function (exn) {
inner.setDisposable(notifier.subscribe(self, function(ex) {
o.onError(ex);
}, function() {
o.onCompleted();
}));
exceptions.onNext(exn);
},
function() { o.onCompleted(); }));
});
return new CompositeDisposable(notificationDisposable, subscription, cancelable, disposableCreate(function () {
isDisposed = true;
}));
});
};
var RepeatEnumerable = (function (__super__) {
inherits(RepeatEnumerable, __super__);
function RepeatEnumerable(v, c) {
this.v = v;
this.c = c == null ? -1 : c;
}
RepeatEnumerable.prototype[$iterator$] = function () {
return new RepeatEnumerator(this);
};
function RepeatEnumerator(p) {
this.v = p.v;
this.l = p.c;
}
RepeatEnumerator.prototype.next = function () {
if (this.l === 0) { return doneEnumerator; }
if (this.l > 0) { this.l--; }
return { done: false, value: this.v };
};
return RepeatEnumerable;
}(Enumerable));
var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) {
return new RepeatEnumerable(value, repeatCount);
};
var OfEnumerable = (function(__super__) {
inherits(OfEnumerable, __super__);
function OfEnumerable(s, fn, thisArg) {
this.s = s;
this.fn = fn ? bindCallback(fn, thisArg, 3) : null;
}
OfEnumerable.prototype[$iterator$] = function () {
return new OfEnumerator(this);
};
function OfEnumerator(p) {
this.i = -1;
this.s = p.s;
this.l = this.s.length;
this.fn = p.fn;
}
OfEnumerator.prototype.next = function () {
return ++this.i < this.l ?
{ done: false, value: !this.fn ? this.s[this.i] : this.fn(this.s[this.i], this.i, this.s) } :
doneEnumerator;
};
return OfEnumerable;
}(Enumerable));
var enumerableOf = Enumerable.of = function (source, selector, thisArg) {
return new OfEnumerable(source, selector, thisArg);
};
/**
* Wraps the source sequence in order to run its observer callbacks on the specified scheduler.
*
* This only invokes observer callbacks on a scheduler. In case the subscription and/or unsubscription actions have side-effects
* that require to be run on a scheduler, use subscribeOn.
*
* @param {Scheduler} scheduler Scheduler to notify observers on.
* @returns {Observable} The source sequence whose observations happen on the specified scheduler.
*/
observableProto.observeOn = function (scheduler) {
var source = this;
return new AnonymousObservable(function (observer) {
return source.subscribe(new ObserveOnObserver(scheduler, observer));
}, source);
};
/**
* Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. This operation is not commonly used;
* see the remarks section for more information on the distinction between subscribeOn and observeOn.
* This only performs the side-effects of subscription and unsubscription on the specified scheduler. In order to invoke observer
* callbacks on a scheduler, use observeOn.
* @param {Scheduler} scheduler Scheduler to perform subscription and unsubscription actions on.
* @returns {Observable} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
*/
observableProto.subscribeOn = function (scheduler) {
var source = this;
return new AnonymousObservable(function (observer) {
var m = new SingleAssignmentDisposable(), d = new SerialDisposable();
d.setDisposable(m);
m.setDisposable(scheduler.schedule(function () {
d.setDisposable(new ScheduledDisposable(scheduler, source.subscribe(observer)));
}));
return d;
}, source);
};
var FromPromiseObservable = (function(__super__) {
inherits(FromPromiseObservable, __super__);
function FromPromiseObservable(p) {
this.p = p;
__super__.call(this);
}
FromPromiseObservable.prototype.subscribeCore = function(o) {
this.p.then(function (data) {
o.onNext(data);
o.onCompleted();
}, function (err) { o.onError(err); });
return disposableEmpty;
};
return FromPromiseObservable;
}(ObservableBase));
/**
* Converts a Promise to an Observable sequence
* @param {Promise} An ES6 Compliant promise.
* @returns {Observable} An Observable sequence which wraps the existing promise success and failure.
*/
var observableFromPromise = Observable.fromPromise = function (promise) {
return new FromPromiseObservable(promise);
};
/*
* Converts an existing observable sequence to an ES6 Compatible Promise
* @example
* var promise = Rx.Observable.return(42).toPromise(RSVP.Promise);
*
* // With config
* Rx.config.Promise = RSVP.Promise;
* var promise = Rx.Observable.return(42).toPromise();
* @param {Function} [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise.
* @returns {Promise} An ES6 compatible promise with the last value from the observable sequence.
*/
observableProto.toPromise = function (promiseCtor) {
promiseCtor || (promiseCtor = Rx.config.Promise);
if (!promiseCtor) { throw new NotSupportedError('Promise type not provided nor in Rx.config.Promise'); }
var source = this;
return new promiseCtor(function (resolve, reject) {
// No cancellation can be done
var value, hasValue = false;
source.subscribe(function (v) {
value = v;
hasValue = true;
}, reject, function () {
hasValue && resolve(value);
});
});
};
var ToArrayObservable = (function(__super__) {
inherits(ToArrayObservable, __super__);
function ToArrayObservable(source) {
this.source = source;
__super__.call(this);
}
ToArrayObservable.prototype.subscribeCore = function(o) {
return this.source.subscribe(new InnerObserver(o));
};
function InnerObserver(o) {
this.o = o;
this.a = [];
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.a.push(x); } };
InnerObserver.prototype.onError = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
}
};
InnerObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
this.o.onNext(this.a);
this.o.onCompleted();
}
};
InnerObserver.prototype.dispose = function () { this.isStopped = true; }
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return ToArrayObservable;
}(ObservableBase));
/**
* Creates an array from an observable sequence.
* @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence.
*/
observableProto.toArray = function () {
return new ToArrayObservable(this);
};
/**
* Creates an observable sequence from a specified subscribe method implementation.
* @example
* var res = Rx.Observable.create(function (observer) { return function () { } );
* var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } );
* var res = Rx.Observable.create(function (observer) { } );
* @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable.
* @returns {Observable} The observable sequence with the specified implementation for the Subscribe method.
*/
Observable.create = function (subscribe, parent) {
return new AnonymousObservable(subscribe, parent);
};
/**
* Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.
*
* @example
* var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); });
* @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise.
* @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function.
*/
var observableDefer = Observable.defer = function (observableFactory) {
return new AnonymousObservable(function (observer) {
var result;
try {
result = observableFactory();
} catch (e) {
return observableThrow(e).subscribe(observer);
}
isPromise(result) && (result = observableFromPromise(result));
return result.subscribe(observer);
});
};
var EmptyObservable = (function(__super__) {
inherits(EmptyObservable, __super__);
function EmptyObservable(scheduler) {
this.scheduler = scheduler;
__super__.call(this);
}
EmptyObservable.prototype.subscribeCore = function (observer) {
var sink = new EmptySink(observer, this.scheduler);
return sink.run();
};
function EmptySink(observer, scheduler) {
this.observer = observer;
this.scheduler = scheduler;
}
function scheduleItem(s, state) {
state.onCompleted();
return disposableEmpty;
}
EmptySink.prototype.run = function () {
return this.scheduler.scheduleWithState(this.observer, scheduleItem);
};
return EmptyObservable;
}(ObservableBase));
var EMPTY_OBSERVABLE = new EmptyObservable(immediateScheduler);
/**
* Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message.
*
* @example
* var res = Rx.Observable.empty();
* var res = Rx.Observable.empty(Rx.Scheduler.timeout);
* @param {Scheduler} [scheduler] Scheduler to send the termination call on.
* @returns {Observable} An observable sequence with no elements.
*/
var observableEmpty = Observable.empty = function (scheduler) {
isScheduler(scheduler) || (scheduler = immediateScheduler);
return scheduler === immediateScheduler ? EMPTY_OBSERVABLE : new EmptyObservable(scheduler);
};
var FromObservable = (function(__super__) {
inherits(FromObservable, __super__);
function FromObservable(iterable, mapper, scheduler) {
this.iterable = iterable;
this.mapper = mapper;
this.scheduler = scheduler;
__super__.call(this);
}
FromObservable.prototype.subscribeCore = function (o) {
var sink = new FromSink(o, this);
return sink.run();
};
return FromObservable;
}(ObservableBase));
var FromSink = (function () {
function FromSink(o, parent) {
this.o = o;
this.parent = parent;
}
FromSink.prototype.run = function () {
var list = Object(this.parent.iterable),
it = getIterable(list),
o = this.o,
mapper = this.parent.mapper;
function loopRecursive(i, recurse) {
var next = tryCatch(it.next).call(it);
if (next === errorObj) { return o.onError(next.e); }
if (next.done) { return o.onCompleted(); }
var result = next.value;
if (isFunction(mapper)) {
result = tryCatch(mapper)(result, i);
if (result === errorObj) { return o.onError(result.e); }
}
o.onNext(result);
recurse(i + 1);
}
return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive);
};
return FromSink;
}());
var maxSafeInteger = Math.pow(2, 53) - 1;
function StringIterable(s) {
this._s = s;
}
StringIterable.prototype[$iterator$] = function () {
return new StringIterator(this._s);
};
function StringIterator(s) {
this._s = s;
this._l = s.length;
this._i = 0;
}
StringIterator.prototype[$iterator$] = function () {
return this;
};
StringIterator.prototype.next = function () {
return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator;
};
function ArrayIterable(a) {
this._a = a;
}
ArrayIterable.prototype[$iterator$] = function () {
return new ArrayIterator(this._a);
};
function ArrayIterator(a) {
this._a = a;
this._l = toLength(a);
this._i = 0;
}
ArrayIterator.prototype[$iterator$] = function () {
return this;
};
ArrayIterator.prototype.next = function () {
return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator;
};
function numberIsFinite(value) {
return typeof value === 'number' && root.isFinite(value);
}
function isNan(n) {
return n !== n;
}
function getIterable(o) {
var i = o[$iterator$], it;
if (!i && typeof o === 'string') {
it = new StringIterable(o);
return it[$iterator$]();
}
if (!i && o.length !== undefined) {
it = new ArrayIterable(o);
return it[$iterator$]();
}
if (!i) { throw new TypeError('Object is not iterable'); }
return o[$iterator$]();
}
function sign(value) {
var number = +value;
if (number === 0) { return number; }
if (isNaN(number)) { return number; }
return number < 0 ? -1 : 1;
}
function toLength(o) {
var len = +o.length;
if (isNaN(len)) { return 0; }
if (len === 0 || !numberIsFinite(len)) { return len; }
len = sign(len) * Math.floor(Math.abs(len));
if (len <= 0) { return 0; }
if (len > maxSafeInteger) { return maxSafeInteger; }
return len;
}
/**
* This method creates a new Observable sequence from an array-like or iterable object.
* @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence.
* @param {Function} [mapFn] Map function to call on every element of the array.
* @param {Any} [thisArg] The context to use calling the mapFn if provided.
* @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) {
if (iterable == null) {
throw new Error('iterable cannot be null.')
}
if (mapFn && !isFunction(mapFn)) {
throw new Error('mapFn when provided must be a function');
}
if (mapFn) {
var mapper = bindCallback(mapFn, thisArg, 2);
}
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new FromObservable(iterable, mapper, scheduler);
}
var FromArrayObservable = (function(__super__) {
inherits(FromArrayObservable, __super__);
function FromArrayObservable(args, scheduler) {
this.args = args;
this.scheduler = scheduler;
__super__.call(this);
}
FromArrayObservable.prototype.subscribeCore = function (observer) {
var sink = new FromArraySink(observer, this);
return sink.run();
};
return FromArrayObservable;
}(ObservableBase));
function FromArraySink(observer, parent) {
this.observer = observer;
this.parent = parent;
}
FromArraySink.prototype.run = function () {
var observer = this.observer, args = this.parent.args, len = args.length;
function loopRecursive(i, recurse) {
if (i < len) {
observer.onNext(args[i]);
recurse(i + 1);
} else {
observer.onCompleted();
}
}
return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive);
};
/**
* Converts an array to an observable sequence, using an optional scheduler to enumerate the array.
* @deprecated use Observable.from or Observable.of
* @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
* @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence.
*/
var observableFromArray = Observable.fromArray = function (array, scheduler) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new FromArrayObservable(array, scheduler)
};
/**
* Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.
*
* @example
* var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; });
* var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }, Rx.Scheduler.timeout);
* @param {Mixed} initialState Initial state.
* @param {Function} condition Condition to terminate generation (upon returning false).
* @param {Function} iterate Iteration step function.
* @param {Function} resultSelector Selector function for results produced in the sequence.
* @param {Scheduler} [scheduler] Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread.
* @returns {Observable} The generated sequence.
*/
Observable.generate = function (initialState, condition, iterate, resultSelector, scheduler) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new AnonymousObservable(function (o) {
var first = true;
return scheduler.scheduleRecursiveWithState(initialState, function (state, self) {
var hasResult, result;
try {
if (first) {
first = false;
} else {
state = iterate(state);
}
hasResult = condition(state);
hasResult && (result = resultSelector(state));
} catch (e) {
return o.onError(e);
}
if (hasResult) {
o.onNext(result);
self(state);
} else {
o.onCompleted();
}
});
});
};
var NeverObservable = (function(__super__) {
inherits(NeverObservable, __super__);
function NeverObservable() {
__super__.call(this);
}
NeverObservable.prototype.subscribeCore = function (observer) {
return disposableEmpty;
};
return NeverObservable;
}(ObservableBase));
var NEVER_OBSERVABLE = new NeverObservable();
/**
* Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins).
* @returns {Observable} An observable sequence whose observers will never get called.
*/
var observableNever = Observable.never = function () {
return NEVER_OBSERVABLE;
};
function observableOf (scheduler, array) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new FromArrayObservable(array, scheduler);
}
/**
* This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
* @returns {Observable} The observable sequence whose elements are pulled from the given arguments.
*/
Observable.of = function () {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
return new FromArrayObservable(args, currentThreadScheduler);
};
/**
* This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments.
* @param {Scheduler} scheduler A scheduler to use for scheduling the arguments.
* @returns {Observable} The observable sequence whose elements are pulled from the given arguments.
*/
Observable.ofWithScheduler = function (scheduler) {
var len = arguments.length, args = new Array(len - 1);
for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; }
return new FromArrayObservable(args, scheduler);
};
var PairsObservable = (function(__super__) {
inherits(PairsObservable, __super__);
function PairsObservable(obj, scheduler) {
this.obj = obj;
this.keys = Object.keys(obj);
this.scheduler = scheduler;
__super__.call(this);
}
PairsObservable.prototype.subscribeCore = function (observer) {
var sink = new PairsSink(observer, this);
return sink.run();
};
return PairsObservable;
}(ObservableBase));
function PairsSink(observer, parent) {
this.observer = observer;
this.parent = parent;
}
PairsSink.prototype.run = function () {
var observer = this.observer, obj = this.parent.obj, keys = this.parent.keys, len = keys.length;
function loopRecursive(i, recurse) {
if (i < len) {
var key = keys[i];
observer.onNext([key, obj[key]]);
recurse(i + 1);
} else {
observer.onCompleted();
}
}
return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive);
};
/**
* Convert an object into an observable sequence of [key, value] pairs.
* @param {Object} obj The object to inspect.
* @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on.
* @returns {Observable} An observable sequence of [key, value] pairs from the object.
*/
Observable.pairs = function (obj, scheduler) {
scheduler || (scheduler = currentThreadScheduler);
return new PairsObservable(obj, scheduler);
};
var RangeObservable = (function(__super__) {
inherits(RangeObservable, __super__);
function RangeObservable(start, count, scheduler) {
this.start = start;
this.rangeCount = count;
this.scheduler = scheduler;
__super__.call(this);
}
RangeObservable.prototype.subscribeCore = function (observer) {
var sink = new RangeSink(observer, this);
return sink.run();
};
return RangeObservable;
}(ObservableBase));
var RangeSink = (function () {
function RangeSink(observer, parent) {
this.observer = observer;
this.parent = parent;
}
RangeSink.prototype.run = function () {
var start = this.parent.start, count = this.parent.rangeCount, observer = this.observer;
function loopRecursive(i, recurse) {
if (i < count) {
observer.onNext(start + i);
recurse(i + 1);
} else {
observer.onCompleted();
}
}
return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive);
};
return RangeSink;
}());
/**
* Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
* @param {Number} start The value of the first integer in the sequence.
* @param {Number} count The number of sequential integers to generate.
* @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread.
* @returns {Observable} An observable sequence that contains a range of sequential integral numbers.
*/
Observable.range = function (start, count, scheduler) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new RangeObservable(start, count, scheduler);
};
var RepeatObservable = (function(__super__) {
inherits(RepeatObservable, __super__);
function RepeatObservable(value, repeatCount, scheduler) {
this.value = value;
this.repeatCount = repeatCount == null ? -1 : repeatCount;
this.scheduler = scheduler;
__super__.call(this);
}
RepeatObservable.prototype.subscribeCore = function (observer) {
var sink = new RepeatSink(observer, this);
return sink.run();
};
return RepeatObservable;
}(ObservableBase));
function RepeatSink(observer, parent) {
this.observer = observer;
this.parent = parent;
}
RepeatSink.prototype.run = function () {
var observer = this.observer, value = this.parent.value;
function loopRecursive(i, recurse) {
if (i === -1 || i > 0) {
observer.onNext(value);
i > 0 && i--;
}
if (i === 0) { return observer.onCompleted(); }
recurse(i);
}
return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount, loopRecursive);
};
/**
* Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages.
* @param {Mixed} value Element to repeat.
* @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely.
* @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate.
* @returns {Observable} An observable sequence that repeats the given element the specified number of times.
*/
Observable.repeat = function (value, repeatCount, scheduler) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new RepeatObservable(value, repeatCount, scheduler);
};
var JustObservable = (function(__super__) {
inherits(JustObservable, __super__);
function JustObservable(value, scheduler) {
this.value = value;
this.scheduler = scheduler;
__super__.call(this);
}
JustObservable.prototype.subscribeCore = function (observer) {
var sink = new JustSink(observer, this.value, this.scheduler);
return sink.run();
};
function JustSink(observer, value, scheduler) {
this.observer = observer;
this.value = value;
this.scheduler = scheduler;
}
function scheduleItem(s, state) {
var value = state[0], observer = state[1];
observer.onNext(value);
observer.onCompleted();
return disposableEmpty;
}
JustSink.prototype.run = function () {
var state = [this.value, this.observer];
return this.scheduler === immediateScheduler ?
scheduleItem(null, state) :
this.scheduler.scheduleWithState(state, scheduleItem);
};
return JustObservable;
}(ObservableBase));
/**
* Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages.
* There is an alias called 'just' or browsers <IE9.
* @param {Mixed} value Single element in the resulting observable sequence.
* @param {Scheduler} scheduler Scheduler to send the single element on. If not specified, defaults to Scheduler.immediate.
* @returns {Observable} An observable sequence containing the single specified element.
*/
var observableReturn = Observable['return'] = Observable.just = function (value, scheduler) {
isScheduler(scheduler) || (scheduler = immediateScheduler);
return new JustObservable(value, scheduler);
};
var ThrowObservable = (function(__super__) {
inherits(ThrowObservable, __super__);
function ThrowObservable(error, scheduler) {
this.error = error;
this.scheduler = scheduler;
__super__.call(this);
}
ThrowObservable.prototype.subscribeCore = function (o) {
var sink = new ThrowSink(o, this);
return sink.run();
};
function ThrowSink(o, p) {
this.o = o;
this.p = p;
}
function scheduleItem(s, state) {
var e = state[0], o = state[1];
o.onError(e);
}
ThrowSink.prototype.run = function () {
return this.p.scheduler.scheduleWithState([this.p.error, this.o], scheduleItem);
};
return ThrowObservable;
}(ObservableBase));
/**
* Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single onError message.
* There is an alias to this method called 'throwError' for browsers <IE9.
* @param {Mixed} error An object used for the sequence's termination.
* @param {Scheduler} scheduler Scheduler to send the exceptional termination call on. If not specified, defaults to Scheduler.immediate.
* @returns {Observable} The observable sequence that terminates exceptionally with the specified exception object.
*/
var observableThrow = Observable['throw'] = function (error, scheduler) {
isScheduler(scheduler) || (scheduler = immediateScheduler);
return new ThrowObservable(error, scheduler);
};
/**
* Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime.
* @param {Function} resourceFactory Factory function to obtain a resource object.
* @param {Function} observableFactory Factory function to obtain an observable sequence that depends on the obtained resource.
* @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object.
*/
Observable.using = function (resourceFactory, observableFactory) {
return new AnonymousObservable(function (o) {
var disposable = disposableEmpty;
var resource = tryCatch(resourceFactory)();
if (resource === errorObj) {
return new CompositeDisposable(observableThrow(resource.e).subscribe(o), disposable);
}
resource && (disposable = resource);
var source = tryCatch(observableFactory)(resource);
if (source === errorObj) {
return new CompositeDisposable(observableThrow(source.e).subscribe(o), disposable);
}
return new CompositeDisposable(source.subscribe(o), disposable);
});
};
/**
* Propagates the observable sequence or Promise that reacts first.
* @param {Observable} rightSource Second observable sequence or Promise.
* @returns {Observable} {Observable} An observable sequence that surfaces either of the given sequences, whichever reacted first.
*/
observableProto.amb = function (rightSource) {
var leftSource = this;
return new AnonymousObservable(function (observer) {
var choice,
leftChoice = 'L', rightChoice = 'R',
leftSubscription = new SingleAssignmentDisposable(),
rightSubscription = new SingleAssignmentDisposable();
isPromise(rightSource) && (rightSource = observableFromPromise(rightSource));
function choiceL() {
if (!choice) {
choice = leftChoice;
rightSubscription.dispose();
}
}
function choiceR() {
if (!choice) {
choice = rightChoice;
leftSubscription.dispose();
}
}
var leftSubscribe = observerCreate(
function (left) {
choiceL();
choice === leftChoice && observer.onNext(left);
},
function (e) {
choiceL();
choice === leftChoice && observer.onError(e);
},
function () {
choiceL();
choice === leftChoice && observer.onCompleted();
}
);
var rightSubscribe = observerCreate(
function (right) {
choiceR();
choice === rightChoice && observer.onNext(right);
},
function (e) {
choiceR();
choice === rightChoice && observer.onError(e);
},
function () {
choiceR();
choice === rightChoice && observer.onCompleted();
}
);
leftSubscription.setDisposable(leftSource.subscribe(leftSubscribe));
rightSubscription.setDisposable(rightSource.subscribe(rightSubscribe));
return new CompositeDisposable(leftSubscription, rightSubscription);
});
};
function amb(p, c) { return p.amb(c); }
/**
* Propagates the observable sequence or Promise that reacts first.
* @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first.
*/
Observable.amb = function () {
var acc = observableNever(), items;
if (Array.isArray(arguments[0])) {
items = arguments[0];
} else {
var len = arguments.length;
items = new Array(items);
for(var i = 0; i < len; i++) { items[i] = arguments[i]; }
}
for (var i = 0, len = items.length; i < len; i++) {
acc = amb(acc, items[i]);
}
return acc;
};
var CatchObserver = (function(__super__) {
inherits(CatchObserver, __super__);
function CatchObserver(o, s, fn) {
this._o = o;
this._s = s;
this._fn = fn;
__super__.call(this);
}
CatchObserver.prototype.next = function (x) { this._o.onNext(x); };
CatchObserver.prototype.completed = function () { return this._o.onCompleted(); };
CatchObserver.prototype.error = function (e) {
var result = tryCatch(this._fn)(e);
if (result === errorObj) { return this._o.onError(result.e); }
isPromise(result) && (result = observableFromPromise(result));
var d = new SingleAssignmentDisposable();
this._s.setDisposable(d);
d.setDisposable(result.subscribe(this._o));
};
return CatchObserver;
}(AbstractObserver));
function observableCatchHandler(source, handler) {
return new AnonymousObservable(function (o) {
var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable();
subscription.setDisposable(d1);
d1.setDisposable(source.subscribe(new CatchObserver(o, subscription, handler)));
return subscription;
}, source);
}
/**
* Continues an observable sequence that is terminated by an exception with the next observable sequence.
* @param {Mixed} handlerOrSecond Exception handler function that returns an observable sequence given the error that occurred in the first sequence, or a second observable sequence used to produce results when an error occurred in the first sequence.
* @returns {Observable} An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred.
*/
observableProto['catch'] = function (handlerOrSecond) {
return isFunction(handlerOrSecond) ? observableCatchHandler(this, handlerOrSecond) : observableCatch([this, handlerOrSecond]);
};
/**
* Continues an observable sequence that is terminated by an exception with the next observable sequence.
* @param {Array | Arguments} args Arguments or an array to use as the next sequence if an error occurs.
* @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.
*/
var observableCatch = Observable['catch'] = function () {
var items;
if (Array.isArray(arguments[0])) {
items = arguments[0];
} else {
var len = arguments.length;
items = new Array(len);
for(var i = 0; i < len; i++) { items[i] = arguments[i]; }
}
return enumerableOf(items).catchError();
};
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element.
* This can be in the form of an argument list of observables or an array.
*
* @example
* 1 - obs = observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; });
* 2 - obs = observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; });
* @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
observableProto.combineLatest = function () {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
if (Array.isArray(args[0])) {
args[0].unshift(this);
} else {
args.unshift(this);
}
return combineLatest.apply(this, args);
};
function falseFactory() { return false; }
function argumentsToArray() {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
return args;
}
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element.
*
* @example
* 1 - obs = Rx.Observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; });
* 2 - obs = Rx.Observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; });
* @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
var combineLatest = Observable.combineLatest = function () {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
Array.isArray(args[0]) && (args = args[0]);
return new AnonymousObservable(function (o) {
var n = args.length,
hasValue = arrayInitialize(n, falseFactory),
hasValueAll = false,
isDone = arrayInitialize(n, falseFactory),
values = new Array(n);
function next(i) {
hasValue[i] = true;
if (hasValueAll || (hasValueAll = hasValue.every(identity))) {
try {
var res = resultSelector.apply(null, values);
} catch (e) {
return o.onError(e);
}
o.onNext(res);
} else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) {
o.onCompleted();
}
}
function done (i) {
isDone[i] = true;
isDone.every(identity) && o.onCompleted();
}
var subscriptions = new Array(n);
for (var idx = 0; idx < n; idx++) {
(function (i) {
var source = args[i], sad = new SingleAssignmentDisposable();
isPromise(source) && (source = observableFromPromise(source));
sad.setDisposable(source.subscribe(function (x) {
values[i] = x;
next(i);
},
function(e) { o.onError(e); },
function () { done(i); }
));
subscriptions[i] = sad;
}(idx));
}
return new CompositeDisposable(subscriptions);
}, this);
};
/**
* Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate.
* @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order.
*/
observableProto.concat = function () {
for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
args.unshift(this);
return observableConcat.apply(null, args);
};
var ConcatObservable = (function(__super__) {
inherits(ConcatObservable, __super__);
function ConcatObservable(sources) {
this.sources = sources;
__super__.call(this);
}
ConcatObservable.prototype.subscribeCore = function(o) {
var sink = new ConcatSink(this.sources, o);
return sink.run();
};
function ConcatSink(sources, o) {
this.sources = sources;
this.o = o;
}
ConcatSink.prototype.run = function () {
var isDisposed, subscription = new SerialDisposable(), sources = this.sources, length = sources.length, o = this.o;
var cancelable = immediateScheduler.scheduleRecursiveWithState(0, function (i, self) {
if (isDisposed) { return; }
if (i === length) {
return o.onCompleted();
}
// Check if promise
var currentValue = sources[i];
isPromise(currentValue) && (currentValue = observableFromPromise(currentValue));
var d = new SingleAssignmentDisposable();
subscription.setDisposable(d);
d.setDisposable(currentValue.subscribe(
function (x) { o.onNext(x); },
function (e) { o.onError(e); },
function () { self(i + 1); }
));
});
return new CompositeDisposable(subscription, cancelable, disposableCreate(function () {
isDisposed = true;
}));
};
return ConcatObservable;
}(ObservableBase));
/**
* Concatenates all the observable sequences.
* @param {Array | Arguments} args Arguments or an array to concat to the observable sequence.
* @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order.
*/
var observableConcat = Observable.concat = function () {
var args;
if (Array.isArray(arguments[0])) {
args = arguments[0];
} else {
args = new Array(arguments.length);
for(var i = 0, len = arguments.length; i < len; i++) { args[i] = arguments[i]; }
}
return new ConcatObservable(args);
};
/**
* Concatenates an observable sequence of observable sequences.
* @returns {Observable} An observable sequence that contains the elements of each observed inner sequence, in sequential order.
*/
observableProto.concatAll = function () {
return this.merge(1);
};
var MergeObservable = (function (__super__) {
inherits(MergeObservable, __super__);
function MergeObservable(source, maxConcurrent) {
this.source = source;
this.maxConcurrent = maxConcurrent;
__super__.call(this);
}
MergeObservable.prototype.subscribeCore = function(observer) {
var g = new CompositeDisposable();
g.add(this.source.subscribe(new MergeObserver(observer, this.maxConcurrent, g)));
return g;
};
return MergeObservable;
}(ObservableBase));
var MergeObserver = (function () {
function MergeObserver(o, max, g) {
this.o = o;
this.max = max;
this.g = g;
this.done = false;
this.q = [];
this.activeCount = 0;
this.isStopped = false;
}
MergeObserver.prototype.handleSubscribe = function (xs) {
var sad = new SingleAssignmentDisposable();
this.g.add(sad);
isPromise(xs) && (xs = observableFromPromise(xs));
sad.setDisposable(xs.subscribe(new InnerObserver(this, sad)));
};
MergeObserver.prototype.onNext = function (innerSource) {
if (this.isStopped) { return; }
if(this.activeCount < this.max) {
this.activeCount++;
this.handleSubscribe(innerSource);
} else {
this.q.push(innerSource);
}
};
MergeObserver.prototype.onError = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
}
};
MergeObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
this.done = true;
this.activeCount === 0 && this.o.onCompleted();
}
};
MergeObserver.prototype.dispose = function() { this.isStopped = true; };
MergeObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
function InnerObserver(parent, sad) {
this.parent = parent;
this.sad = sad;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.parent.o.onNext(x); } };
InnerObserver.prototype.onError = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.parent.o.onError(e);
}
};
InnerObserver.prototype.onCompleted = function () {
if(!this.isStopped) {
this.isStopped = true;
var parent = this.parent;
parent.g.remove(this.sad);
if (parent.q.length > 0) {
parent.handleSubscribe(parent.q.shift());
} else {
parent.activeCount--;
parent.done && parent.activeCount === 0 && parent.o.onCompleted();
}
}
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.parent.o.onError(e);
return true;
}
return false;
};
return MergeObserver;
}());
/**
* Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences.
* Or merges two observable sequences into a single observable sequence.
*
* @example
* 1 - merged = sources.merge(1);
* 2 - merged = source.merge(otherSource);
* @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence.
* @returns {Observable} The observable sequence that merges the elements of the inner sequences.
*/
observableProto.merge = function (maxConcurrentOrOther) {
return typeof maxConcurrentOrOther !== 'number' ?
observableMerge(this, maxConcurrentOrOther) :
new MergeObservable(this, maxConcurrentOrOther);
};
/**
* Merges all the observable sequences into a single observable sequence.
* The scheduler is optional and if not specified, the immediate scheduler is used.
* @returns {Observable} The observable sequence that merges the elements of the observable sequences.
*/
var observableMerge = Observable.merge = function () {
var scheduler, sources = [], i, len = arguments.length;
if (!arguments[0]) {
scheduler = immediateScheduler;
for(i = 1; i < len; i++) { sources.push(arguments[i]); }
} else if (isScheduler(arguments[0])) {
scheduler = arguments[0];
for(i = 1; i < len; i++) { sources.push(arguments[i]); }
} else {
scheduler = immediateScheduler;
for(i = 0; i < len; i++) { sources.push(arguments[i]); }
}
if (Array.isArray(sources[0])) {
sources = sources[0];
}
return observableOf(scheduler, sources).mergeAll();
};
var MergeAllObservable = (function (__super__) {
inherits(MergeAllObservable, __super__);
function MergeAllObservable(source) {
this.source = source;
__super__.call(this);
}
MergeAllObservable.prototype.subscribeCore = function (observer) {
var g = new CompositeDisposable(), m = new SingleAssignmentDisposable();
g.add(m);
m.setDisposable(this.source.subscribe(new MergeAllObserver(observer, g)));
return g;
};
function MergeAllObserver(o, g) {
this.o = o;
this.g = g;
this.isStopped = false;
this.done = false;
}
MergeAllObserver.prototype.onNext = function(innerSource) {
if(this.isStopped) { return; }
var sad = new SingleAssignmentDisposable();
this.g.add(sad);
isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
sad.setDisposable(innerSource.subscribe(new InnerObserver(this, sad)));
};
MergeAllObserver.prototype.onError = function (e) {
if(!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
}
};
MergeAllObserver.prototype.onCompleted = function () {
if(!this.isStopped) {
this.isStopped = true;
this.done = true;
this.g.length === 1 && this.o.onCompleted();
}
};
MergeAllObserver.prototype.dispose = function() { this.isStopped = true; };
MergeAllObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
function InnerObserver(parent, sad) {
this.parent = parent;
this.sad = sad;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) { if (!this.isStopped) { this.parent.o.onNext(x); } };
InnerObserver.prototype.onError = function (e) {
if(!this.isStopped) {
this.isStopped = true;
this.parent.o.onError(e);
}
};
InnerObserver.prototype.onCompleted = function () {
if(!this.isStopped) {
var parent = this.parent;
this.isStopped = true;
parent.g.remove(this.sad);
parent.done && parent.g.length === 1 && parent.o.onCompleted();
}
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.parent.o.onError(e);
return true;
}
return false;
};
return MergeAllObservable;
}(ObservableBase));
/**
* Merges an observable sequence of observable sequences into an observable sequence.
* @returns {Observable} The observable sequence that merges the elements of the inner sequences.
*/
observableProto.mergeAll = function () {
return new MergeAllObservable(this);
};
var CompositeError = Rx.CompositeError = function(errors) {
this.name = "NotImplementedError";
this.innerErrors = errors;
this.message = 'This contains multiple errors. Check the innerErrors';
Error.call(this);
}
CompositeError.prototype = Error.prototype;
/**
* Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to
* receive all successfully emitted items from all of the source Observables without being interrupted by
* an error notification from one of them.
*
* This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an
* error via the Observer's onError, mergeDelayError will refrain from propagating that
* error notification until all of the merged Observables have finished emitting items.
* @param {Array | Arguments} args Arguments or an array to merge.
* @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable
*/
Observable.mergeDelayError = function() {
var args;
if (Array.isArray(arguments[0])) {
args = arguments[0];
} else {
var len = arguments.length;
args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
}
var source = observableOf(null, args);
return new AnonymousObservable(function (o) {
var group = new CompositeDisposable(),
m = new SingleAssignmentDisposable(),
isStopped = false,
errors = [];
function setCompletion() {
if (errors.length === 0) {
o.onCompleted();
} else if (errors.length === 1) {
o.onError(errors[0]);
} else {
o.onError(new CompositeError(errors));
}
}
group.add(m);
m.setDisposable(source.subscribe(
function (innerSource) {
var innerSubscription = new SingleAssignmentDisposable();
group.add(innerSubscription);
// Check for promises support
isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
innerSubscription.setDisposable(innerSource.subscribe(
function (x) { o.onNext(x); },
function (e) {
errors.push(e);
group.remove(innerSubscription);
isStopped && group.length === 1 && setCompletion();
},
function () {
group.remove(innerSubscription);
isStopped && group.length === 1 && setCompletion();
}));
},
function (e) {
errors.push(e);
isStopped = true;
group.length === 1 && setCompletion();
},
function () {
isStopped = true;
group.length === 1 && setCompletion();
}));
return group;
});
};
/**
* Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
* @param {Observable} second Second observable sequence used to produce results after the first sequence terminates.
* @returns {Observable} An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.
*/
observableProto.onErrorResumeNext = function (second) {
if (!second) { throw new Error('Second observable is required'); }
return onErrorResumeNext([this, second]);
};
/**
* Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
*
* @example
* 1 - res = Rx.Observable.onErrorResumeNext(xs, ys, zs);
* 1 - res = Rx.Observable.onErrorResumeNext([xs, ys, zs]);
* @returns {Observable} An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.
*/
var onErrorResumeNext = Observable.onErrorResumeNext = function () {
var sources = [];
if (Array.isArray(arguments[0])) {
sources = arguments[0];
} else {
for(var i = 0, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
}
return new AnonymousObservable(function (observer) {
var pos = 0, subscription = new SerialDisposable(),
cancelable = immediateScheduler.scheduleRecursive(function (self) {
var current, d;
if (pos < sources.length) {
current = sources[pos++];
isPromise(current) && (current = observableFromPromise(current));
d = new SingleAssignmentDisposable();
subscription.setDisposable(d);
d.setDisposable(current.subscribe(observer.onNext.bind(observer), self, self));
} else {
observer.onCompleted();
}
});
return new CompositeDisposable(subscription, cancelable);
});
};
/**
* Returns the values from the source observable sequence only after the other observable sequence produces a value.
* @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence.
* @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation.
*/
observableProto.skipUntil = function (other) {
var source = this;
return new AnonymousObservable(function (o) {
var isOpen = false;
var disposables = new CompositeDisposable(source.subscribe(function (left) {
isOpen && o.onNext(left);
}, function (e) { o.onError(e); }, function () {
isOpen && o.onCompleted();
}));
isPromise(other) && (other = observableFromPromise(other));
var rightSubscription = new SingleAssignmentDisposable();
disposables.add(rightSubscription);
rightSubscription.setDisposable(other.subscribe(function () {
isOpen = true;
rightSubscription.dispose();
}, function (e) { o.onError(e); }, function () {
rightSubscription.dispose();
}));
return disposables;
}, source);
};
var SwitchObservable = (function(__super__) {
inherits(SwitchObservable, __super__);
function SwitchObservable(source) {
this.source = source;
__super__.call(this);
}
SwitchObservable.prototype.subscribeCore = function (o) {
var inner = new SerialDisposable(), s = this.source.subscribe(new SwitchObserver(o, inner));
return new CompositeDisposable(s, inner);
};
function SwitchObserver(o, inner) {
this.o = o;
this.inner = inner;
this.stopped = false;
this.latest = 0;
this.hasLatest = false;
this.isStopped = false;
}
SwitchObserver.prototype.onNext = function (innerSource) {
if (this.isStopped) { return; }
var d = new SingleAssignmentDisposable(), id = ++this.latest;
this.hasLatest = true;
this.inner.setDisposable(d);
isPromise(innerSource) && (innerSource = observableFromPromise(innerSource));
d.setDisposable(innerSource.subscribe(new InnerObserver(this, id)));
};
SwitchObserver.prototype.onError = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
}
};
SwitchObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
this.stopped = true;
!this.hasLatest && this.o.onCompleted();
}
};
SwitchObserver.prototype.dispose = function () { this.isStopped = true; };
SwitchObserver.prototype.fail = function (e) {
if(!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
function InnerObserver(parent, id) {
this.parent = parent;
this.id = id;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) {
if (this.isStopped) { return; }
this.parent.latest === this.id && this.parent.o.onNext(x);
};
InnerObserver.prototype.onError = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.parent.latest === this.id && this.parent.o.onError(e);
}
};
InnerObserver.prototype.onCompleted = function () {
if (!this.isStopped) {
this.isStopped = true;
if (this.parent.latest === this.id) {
this.parent.hasLatest = false;
this.parent.isStopped && this.parent.o.onCompleted();
}
}
};
InnerObserver.prototype.dispose = function () { this.isStopped = true; }
InnerObserver.prototype.fail = function (e) {
if(!this.isStopped) {
this.isStopped = true;
this.parent.o.onError(e);
return true;
}
return false;
};
return SwitchObservable;
}(ObservableBase));
/**
* Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
* @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
observableProto['switch'] = observableProto.switchLatest = function () {
return new SwitchObservable(this);
};
var TakeUntilObservable = (function(__super__) {
inherits(TakeUntilObservable, __super__);
function TakeUntilObservable(source, other) {
this.source = source;
this.other = isPromise(other) ? observableFromPromise(other) : other;
__super__.call(this);
}
TakeUntilObservable.prototype.subscribeCore = function(o) {
return new CompositeDisposable(
this.source.subscribe(o),
this.other.subscribe(new InnerObserver(o))
);
};
function InnerObserver(o) {
this.o = o;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) {
if (this.isStopped) { return; }
this.o.onCompleted();
};
InnerObserver.prototype.onError = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(err);
}
};
InnerObserver.prototype.onCompleted = function () {
!this.isStopped && (this.isStopped = true);
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return TakeUntilObservable;
}(ObservableBase));
/**
* Returns the values from the source observable sequence until the other observable sequence produces a value.
* @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence.
* @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.
*/
observableProto.takeUntil = function (other) {
return new TakeUntilObservable(this, other);
};
function falseFactory() { return false; }
/**
* Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element.
* @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
observableProto.withLatestFrom = function () {
var len = arguments.length, args = new Array(len)
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
var resultSelector = args.pop(), source = this;
Array.isArray(args[0]) && (args = args[0]);
return new AnonymousObservable(function (observer) {
var n = args.length,
hasValue = arrayInitialize(n, falseFactory),
hasValueAll = false,
values = new Array(n);
var subscriptions = new Array(n + 1);
for (var idx = 0; idx < n; idx++) {
(function (i) {
var other = args[i], sad = new SingleAssignmentDisposable();
isPromise(other) && (other = observableFromPromise(other));
sad.setDisposable(other.subscribe(function (x) {
values[i] = x;
hasValue[i] = true;
hasValueAll = hasValue.every(identity);
}, function (e) { observer.onError(e); }, noop));
subscriptions[i] = sad;
}(idx));
}
var sad = new SingleAssignmentDisposable();
sad.setDisposable(source.subscribe(function (x) {
var allValues = [x].concat(values);
if (!hasValueAll) { return; }
var res = tryCatch(resultSelector).apply(null, allValues);
if (res === errorObj) { return observer.onError(res.e); }
observer.onNext(res);
}, function (e) { observer.onError(e); }, function () {
observer.onCompleted();
}));
subscriptions[n] = sad;
return new CompositeDisposable(subscriptions);
}, this);
};
function falseFactory() { return false; }
function emptyArrayFactory() { return []; }
function argumentsToArray() {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
return args;
}
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.
* The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args.
* @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function.
*/
observableProto.zip = function () {
if (arguments.length === 0) { throw new Error('invalid arguments'); }
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
Array.isArray(args[0]) && (args = args[0]);
var parent = this;
args.unshift(parent);
return new AnonymousObservable(function (o) {
var n = args.length,
queues = arrayInitialize(n, emptyArrayFactory),
isDone = arrayInitialize(n, falseFactory);
var subscriptions = new Array(n);
for (var idx = 0; idx < n; idx++) {
(function (i) {
var source = args[i], sad = new SingleAssignmentDisposable();
isPromise(source) && (source = observableFromPromise(source));
sad.setDisposable(source.subscribe(function (x) {
queues[i].push(x);
if (queues.every(function (x) { return x.length > 0; })) {
var queuedValues = queues.map(function (x) { return x.shift(); }),
res = tryCatch(resultSelector).apply(parent, queuedValues);
if (res === errorObj) { return o.onError(res.e); }
o.onNext(res);
} else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) {
o.onCompleted();
}
}, function (e) { o.onError(e); }, function () {
isDone[i] = true;
isDone.every(identity) && o.onCompleted();
}));
subscriptions[i] = sad;
})(idx);
}
return new CompositeDisposable(subscriptions);
}, parent);
};
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
* @param arguments Observable sources.
* @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources.
* @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
Observable.zip = function () {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
if (Array.isArray(args[0])) {
args = isFunction(args[1]) ? args[0].concat(args[1]) : args[0];
}
var first = args.shift();
return first.zip.apply(first, args);
};
function falseFactory() { return false; }
function emptyArrayFactory() { return []; }
function argumentsToArray() {
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
return args;
}
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index.
* The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args.
* @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function.
*/
observableProto.zipIterable = function () {
if (arguments.length === 0) { throw new Error('invalid arguments'); }
var len = arguments.length, args = new Array(len);
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray;
var parent = this;
args.unshift(parent);
return new AnonymousObservable(function (o) {
var n = args.length,
queues = arrayInitialize(n, emptyArrayFactory),
isDone = arrayInitialize(n, falseFactory);
var subscriptions = new Array(n);
for (var idx = 0; idx < n; idx++) {
(function (i) {
var source = args[i], sad = new SingleAssignmentDisposable();
(isArrayLike(source) || isIterable(source)) && (source = observableFrom(source));
sad.setDisposable(source.subscribe(function (x) {
queues[i].push(x);
if (queues.every(function (x) { return x.length > 0; })) {
var queuedValues = queues.map(function (x) { return x.shift(); }),
res = tryCatch(resultSelector).apply(parent, queuedValues);
if (res === errorObj) { return o.onError(res.e); }
o.onNext(res);
} else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) {
o.onCompleted();
}
}, function (e) { o.onError(e); }, function () {
isDone[i] = true;
isDone.every(identity) && o.onCompleted();
}));
subscriptions[i] = sad;
})(idx);
}
return new CompositeDisposable(subscriptions);
}, parent);
};
function asObservable(source) {
return function subscribe(o) { return source.subscribe(o); };
}
/**
* Hides the identity of an observable sequence.
* @returns {Observable} An observable sequence that hides the identity of the source sequence.
*/
observableProto.asObservable = function () {
return new AnonymousObservable(asObservable(this), this);
};
function toArray(x) { return x.toArray(); }
function notEmpty(x) { return x.length > 0; }
/**
* Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
* @param {Number} count Length of each buffer.
* @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count.
* @returns {Observable} An observable sequence of buffers.
*/
observableProto.bufferWithCount = function (count, skip) {
typeof skip !== 'number' && (skip = count);
return this.windowWithCount(count, skip)
.flatMap(toArray)
.filter(notEmpty);
};
/**
* Dematerializes the explicit notification values of an observable sequence as implicit notifications.
* @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values.
*/
observableProto.dematerialize = function () {
var source = this;
return new AnonymousObservable(function (o) {
return source.subscribe(function (x) { return x.accept(o); }, function(e) { o.onError(e); }, function () { o.onCompleted(); });
}, this);
};
var DistinctUntilChangedObservable = (function(__super__) {
inherits(DistinctUntilChangedObservable, __super__);
function DistinctUntilChangedObservable(source, keyFn, comparer) {
this.source = source;
this.keyFn = keyFn;
this.comparer = comparer;
__super__.call(this);
}
DistinctUntilChangedObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new DistinctUntilChangedObserver(o, this.keyFn, this.comparer));
};
return DistinctUntilChangedObservable;
}(ObservableBase));
var DistinctUntilChangedObserver = (function(__super__) {
inherits(DistinctUntilChangedObserver, __super__);
function DistinctUntilChangedObserver(o, keyFn, comparer) {
this.o = o;
this.keyFn = keyFn;
this.comparer = comparer;
this.hasCurrentKey = false;
this.currentKey = null;
__super__.call(this);
}
DistinctUntilChangedObserver.prototype.next = function (x) {
var key = x, comparerEquals;
if (isFunction(this.keyFn)) {
key = tryCatch(this.keyFn)(x);
if (key === errorObj) { return this.o.onError(key.e); }
}
if (this.hasCurrentKey) {
comparerEquals = tryCatch(this.comparer)(this.currentKey, key);
if (comparerEquals === errorObj) { return this.o.onError(comparerEquals.e); }
}
if (!this.hasCurrentKey || !comparerEquals) {
this.hasCurrentKey = true;
this.currentKey = key;
this.o.onNext(x);
}
};
DistinctUntilChangedObserver.prototype.error = function(e) {
this.o.onError(e);
};
DistinctUntilChangedObserver.prototype.completed = function () {
this.o.onCompleted();
};
return DistinctUntilChangedObserver;
}(AbstractObserver));
/**
* Returns an observable sequence that contains only distinct contiguous elements according to the keyFn and the comparer.
* @param {Function} [keyFn] A function to compute the comparison key for each element. If not provided, it projects the value.
* @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function.
* @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
*/
observableProto.distinctUntilChanged = function (keyFn, comparer) {
comparer || (comparer = defaultComparer);
return new DistinctUntilChangedObservable(this, keyFn, comparer);
};
var TapObservable = (function(__super__) {
inherits(TapObservable,__super__);
function TapObservable(source, observerOrOnNext, onError, onCompleted) {
this.source = source;
this._oN = observerOrOnNext;
this._oE = onError;
this._oC = onCompleted;
__super__.call(this);
}
TapObservable.prototype.subscribeCore = function(o) {
return this.source.subscribe(new InnerObserver(o, this));
};
function InnerObserver(o, p) {
this.o = o;
this.t = !p._oN || isFunction(p._oN) ?
observerCreate(p._oN || noop, p._oE || noop, p._oC || noop) :
p._oN;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function(x) {
if (this.isStopped) { return; }
var res = tryCatch(this.t.onNext).call(this.t, x);
if (res === errorObj) { this.o.onError(res.e); }
this.o.onNext(x);
};
InnerObserver.prototype.onError = function(err) {
if (!this.isStopped) {
this.isStopped = true;
var res = tryCatch(this.t.onError).call(this.t, err);
if (res === errorObj) { return this.o.onError(res.e); }
this.o.onError(err);
}
};
InnerObserver.prototype.onCompleted = function() {
if (!this.isStopped) {
this.isStopped = true;
var res = tryCatch(this.t.onCompleted).call(this.t);
if (res === errorObj) { return this.o.onError(res.e); }
this.o.onCompleted();
}
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return TapObservable;
}(ObservableBase));
/**
* Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence.
* This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
* @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an o.
* @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function.
* @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function.
* @returns {Observable} The source sequence with the side-effecting behavior applied.
*/
observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) {
return new TapObservable(this, observerOrOnNext, onError, onCompleted);
};
/**
* Invokes an action for each element in the observable sequence.
* This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
* @param {Function} onNext Action to invoke for each element in the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} The source sequence with the side-effecting behavior applied.
*/
observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) {
return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext);
};
/**
* Invokes an action upon exceptional termination of the observable sequence.
* This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
* @param {Function} onError Action to invoke upon exceptional termination of the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} The source sequence with the side-effecting behavior applied.
*/
observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) {
return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError);
};
/**
* Invokes an action upon graceful termination of the observable sequence.
* This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
* @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} The source sequence with the side-effecting behavior applied.
*/
observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) {
return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted);
};
/**
* Invokes a specified action after the source observable sequence terminates gracefully or exceptionally.
* @param {Function} finallyAction Action to invoke after the source observable sequence terminates.
* @returns {Observable} Source sequence with the action-invoking termination behavior applied.
*/
observableProto['finally'] = function (action) {
var source = this;
return new AnonymousObservable(function (observer) {
var subscription = tryCatch(source.subscribe).call(source, observer);
if (subscription === errorObj) {
action();
return thrower(subscription.e);
}
return disposableCreate(function () {
var r = tryCatch(subscription.dispose).call(subscription);
action();
r === errorObj && thrower(r.e);
});
}, this);
};
var IgnoreElementsObservable = (function(__super__) {
inherits(IgnoreElementsObservable, __super__);
function IgnoreElementsObservable(source) {
this.source = source;
__super__.call(this);
}
IgnoreElementsObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new InnerObserver(o));
};
function InnerObserver(o) {
this.o = o;
this.isStopped = false;
}
InnerObserver.prototype.onNext = noop;
InnerObserver.prototype.onError = function (err) {
if(!this.isStopped) {
this.isStopped = true;
this.o.onError(err);
}
};
InnerObserver.prototype.onCompleted = function () {
if(!this.isStopped) {
this.isStopped = true;
this.o.onCompleted();
}
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.observer.onError(e);
return true;
}
return false;
};
return IgnoreElementsObservable;
}(ObservableBase));
/**
* Ignores all elements in an observable sequence leaving only the termination messages.
* @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence.
*/
observableProto.ignoreElements = function () {
return new IgnoreElementsObservable(this);
};
/**
* Materializes the implicit notifications of an observable sequence as explicit notification values.
* @returns {Observable} An observable sequence containing the materialized notification values from the source sequence.
*/
observableProto.materialize = function () {
var source = this;
return new AnonymousObservable(function (observer) {
return source.subscribe(function (value) {
observer.onNext(notificationCreateOnNext(value));
}, function (e) {
observer.onNext(notificationCreateOnError(e));
observer.onCompleted();
}, function () {
observer.onNext(notificationCreateOnCompleted());
observer.onCompleted();
});
}, source);
};
/**
* Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely.
* @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely.
* @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly.
*/
observableProto.repeat = function (repeatCount) {
return enumerableRepeat(this, repeatCount).concat();
};
/**
* Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely.
* Note if you encounter an error and want it to retry once, then you must use .retry(2);
*
* @example
* var res = retried = retry.repeat();
* var res = retried = retry.repeat(2);
* @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely.
* @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.
*/
observableProto.retry = function (retryCount) {
return enumerableRepeat(this, retryCount).catchError();
};
/**
* Repeats the source observable sequence upon error each time the notifier emits or until it successfully terminates.
* if the notifier completes, the observable sequence completes.
*
* @example
* var timer = Observable.timer(500);
* var source = observable.retryWhen(timer);
* @param {Observable} [notifier] An observable that triggers the retries or completes the observable with onNext or onCompleted respectively.
* @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.
*/
observableProto.retryWhen = function (notifier) {
return enumerableRepeat(this).catchErrorWhen(notifier);
};
var ScanObservable = (function(__super__) {
inherits(ScanObservable, __super__);
function ScanObservable(source, accumulator, hasSeed, seed) {
this.source = source;
this.accumulator = accumulator;
this.hasSeed = hasSeed;
this.seed = seed;
__super__.call(this);
}
ScanObservable.prototype.subscribeCore = function(o) {
return this.source.subscribe(new InnerObserver(o,this));
};
return ScanObservable;
}(ObservableBase));
function InnerObserver(o, parent) {
this.o = o;
this.accumulator = parent.accumulator;
this.hasSeed = parent.hasSeed;
this.seed = parent.seed;
this.hasAccumulation = false;
this.accumulation = null;
this.hasValue = false;
this.isStopped = false;
}
InnerObserver.prototype = {
onNext: function (x) {
if (this.isStopped) { return; }
!this.hasValue && (this.hasValue = true);
if (this.hasAccumulation) {
this.accumulation = tryCatch(this.accumulator)(this.accumulation, x);
} else {
this.accumulation = this.hasSeed ? tryCatch(this.accumulator)(this.seed, x) : x;
this.hasAccumulation = true;
}
if (this.accumulation === errorObj) { return this.o.onError(this.accumulation.e); }
this.o.onNext(this.accumulation);
},
onError: function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
}
},
onCompleted: function () {
if (!this.isStopped) {
this.isStopped = true;
!this.hasValue && this.hasSeed && this.o.onNext(this.seed);
this.o.onCompleted();
}
},
dispose: function() { this.isStopped = true; },
fail: function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
}
};
/**
* Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value.
* For aggregation behavior with no intermediate results, see Observable.aggregate.
* @param {Mixed} [seed] The initial accumulator value.
* @param {Function} accumulator An accumulator function to be invoked on each element.
* @returns {Observable} An observable sequence containing the accumulated values.
*/
observableProto.scan = function () {
var hasSeed = false, seed, accumulator = arguments[0];
if (arguments.length === 2) {
hasSeed = true;
seed = arguments[1];
}
return new ScanObservable(this, accumulator, hasSeed, seed);
};
/**
* Bypasses a specified number of elements at the end of an observable sequence.
* @description
* This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are
* received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed.
* @param count Number of elements to bypass at the end of the source sequence.
* @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end.
*/
observableProto.skipLast = function (count) {
if (count < 0) { throw new ArgumentOutOfRangeError(); }
var source = this;
return new AnonymousObservable(function (o) {
var q = [];
return source.subscribe(function (x) {
q.push(x);
q.length > count && o.onNext(q.shift());
}, function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, source);
};
/**
* Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend.
* @example
* var res = source.startWith(1, 2, 3);
* var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3);
* @param {Arguments} args The specified values to prepend to the observable sequence
* @returns {Observable} The source sequence prepended with the specified values.
*/
observableProto.startWith = function () {
var values, scheduler, start = 0;
if (!!arguments.length && isScheduler(arguments[0])) {
scheduler = arguments[0];
start = 1;
} else {
scheduler = immediateScheduler;
}
for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
return enumerableOf([observableFromArray(args, scheduler), this]).concat();
};
/**
* Returns a specified number of contiguous elements from the end of an observable sequence.
* @description
* This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of
* the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed.
* @param {Number} count Number of elements to take from the end of the source sequence.
* @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence.
*/
observableProto.takeLast = function (count) {
if (count < 0) { throw new ArgumentOutOfRangeError(); }
var source = this;
return new AnonymousObservable(function (o) {
var q = [];
return source.subscribe(function (x) {
q.push(x);
q.length > count && q.shift();
}, function (e) { o.onError(e); }, function () {
while (q.length > 0) { o.onNext(q.shift()); }
o.onCompleted();
});
}, source);
};
/**
* Returns an array with the specified number of contiguous elements from the end of an observable sequence.
*
* @description
* This operator accumulates a buffer with a length enough to store count elements. Upon completion of the
* source sequence, this buffer is produced on the result sequence.
* @param {Number} count Number of elements to take from the end of the source sequence.
* @returns {Observable} An observable sequence containing a single array with the specified number of elements from the end of the source sequence.
*/
observableProto.takeLastBuffer = function (count) {
var source = this;
return new AnonymousObservable(function (o) {
var q = [];
return source.subscribe(function (x) {
q.push(x);
q.length > count && q.shift();
}, function (e) { o.onError(e); }, function () {
o.onNext(q);
o.onCompleted();
});
}, source);
};
/**
* Projects each element of an observable sequence into zero or more windows which are produced based on element count information.
*
* var res = xs.windowWithCount(10);
* var res = xs.windowWithCount(10, 1);
* @param {Number} count Length of each window.
* @param {Number} [skip] Number of elements to skip between creation of consecutive windows. If not specified, defaults to the count.
* @returns {Observable} An observable sequence of windows.
*/
observableProto.windowWithCount = function (count, skip) {
var source = this;
+count || (count = 0);
Math.abs(count) === Infinity && (count = 0);
if (count <= 0) { throw new ArgumentOutOfRangeError(); }
skip == null && (skip = count);
+skip || (skip = 0);
Math.abs(skip) === Infinity && (skip = 0);
if (skip <= 0) { throw new ArgumentOutOfRangeError(); }
return new AnonymousObservable(function (observer) {
var m = new SingleAssignmentDisposable(),
refCountDisposable = new RefCountDisposable(m),
n = 0,
q = [];
function createWindow () {
var s = new Subject();
q.push(s);
observer.onNext(addRef(s, refCountDisposable));
}
createWindow();
m.setDisposable(source.subscribe(
function (x) {
for (var i = 0, len = q.length; i < len; i++) { q[i].onNext(x); }
var c = n - count + 1;
c >= 0 && c % skip === 0 && q.shift().onCompleted();
++n % skip === 0 && createWindow();
},
function (e) {
while (q.length > 0) { q.shift().onError(e); }
observer.onError(e);
},
function () {
while (q.length > 0) { q.shift().onCompleted(); }
observer.onCompleted();
}
));
return refCountDisposable;
}, source);
};
observableProto.flatMapConcat = observableProto.concatMap = function(selector, resultSelector, thisArg) {
return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(1);
};
/**
* Projects each notification of an observable sequence to an observable sequence and concats the resulting observable sequences into one observable sequence.
* @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element.
* @param {Function} onError A transform function to apply when an error occurs in the source sequence.
* @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached.
* @param {Any} [thisArg] An optional "this" to use to invoke each transform.
* @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
*/
observableProto.concatMapObserver = observableProto.selectConcatObserver = function(onNext, onError, onCompleted, thisArg) {
var source = this,
onNextFunc = bindCallback(onNext, thisArg, 2),
onErrorFunc = bindCallback(onError, thisArg, 1),
onCompletedFunc = bindCallback(onCompleted, thisArg, 0);
return new AnonymousObservable(function (observer) {
var index = 0;
return source.subscribe(
function (x) {
var result;
try {
result = onNextFunc(x, index++);
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
},
function (err) {
var result;
try {
result = onErrorFunc(err);
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
observer.onCompleted();
},
function () {
var result;
try {
result = onCompletedFunc();
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
observer.onCompleted();
});
}, this).concatAll();
};
/**
* Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty.
*
* var res = obs = xs.defaultIfEmpty();
* 2 - obs = xs.defaultIfEmpty(false);
*
* @memberOf Observable#
* @param defaultValue The value to return if the sequence is empty. If not provided, this defaults to null.
* @returns {Observable} An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself.
*/
observableProto.defaultIfEmpty = function (defaultValue) {
var source = this;
defaultValue === undefined && (defaultValue = null);
return new AnonymousObservable(function (observer) {
var found = false;
return source.subscribe(function (x) {
found = true;
observer.onNext(x);
},
function (e) { observer.onError(e); },
function () {
!found && observer.onNext(defaultValue);
observer.onCompleted();
});
}, source);
};
// Swap out for Array.findIndex
function arrayIndexOfComparer(array, item, comparer) {
for (var i = 0, len = array.length; i < len; i++) {
if (comparer(array[i], item)) { return i; }
}
return -1;
}
function HashSet(comparer) {
this.comparer = comparer;
this.set = [];
}
HashSet.prototype.push = function(value) {
var retValue = arrayIndexOfComparer(this.set, value, this.comparer) === -1;
retValue && this.set.push(value);
return retValue;
};
/**
* Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer.
* Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
*
* @example
* var res = obs = xs.distinct();
* 2 - obs = xs.distinct(function (x) { return x.id; });
* 2 - obs = xs.distinct(function (x) { return x.id; }, function (a,b) { return a === b; });
* @param {Function} [keySelector] A function to compute the comparison key for each element.
* @param {Function} [comparer] Used to compare items in the collection.
* @returns {Observable} An observable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
*/
observableProto.distinct = function (keySelector, comparer) {
var source = this;
comparer || (comparer = defaultComparer);
return new AnonymousObservable(function (o) {
var hashSet = new HashSet(comparer);
return source.subscribe(function (x) {
var key = x;
if (keySelector) {
try {
key = keySelector(x);
} catch (e) {
o.onError(e);
return;
}
}
hashSet.push(key) && o.onNext(x);
},
function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, this);
};
var MapObservable = (function (__super__) {
inherits(MapObservable, __super__);
function MapObservable(source, selector, thisArg) {
this.source = source;
this.selector = bindCallback(selector, thisArg, 3);
__super__.call(this);
}
function innerMap(selector, self) {
return function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); }
}
MapObservable.prototype.internalMap = function (selector, thisArg) {
return new MapObservable(this.source, innerMap(selector, this), thisArg);
};
MapObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new InnerObserver(o, this.selector, this));
};
function InnerObserver(o, selector, source) {
this.o = o;
this.selector = selector;
this.source = source;
this.i = 0;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function(x) {
if (this.isStopped) { return; }
var result = tryCatch(this.selector)(x, this.i++, this.source);
if (result === errorObj) { return this.o.onError(result.e); }
this.o.onNext(result);
};
InnerObserver.prototype.onError = function (e) {
if(!this.isStopped) { this.isStopped = true; this.o.onError(e); }
};
InnerObserver.prototype.onCompleted = function () {
if(!this.isStopped) { this.isStopped = true; this.o.onCompleted(); }
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return MapObservable;
}(ObservableBase));
/**
* Projects each element of an observable sequence into a new form by incorporating the element's index.
* @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source.
*/
observableProto.map = observableProto.select = function (selector, thisArg) {
var selectorFn = typeof selector === 'function' ? selector : function () { return selector; };
return this instanceof MapObservable ?
this.internalMap(selectorFn, thisArg) :
new MapObservable(this, selectorFn, thisArg);
};
function plucker(args, len) {
return function mapper(x) {
var currentProp = x;
for (var i = 0; i < len; i++) {
var p = currentProp[args[i]];
if (typeof p !== 'undefined') {
currentProp = p;
} else {
return undefined;
}
}
return currentProp;
}
}
/**
* Retrieves the value of a specified nested property from all elements in
* the Observable sequence.
* @param {Arguments} arguments The nested properties to pluck.
* @returns {Observable} Returns a new Observable sequence of property values.
*/
observableProto.pluck = function () {
var len = arguments.length, args = new Array(len);
if (len === 0) { throw new Error('List of properties cannot be empty.'); }
for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
return this.map(plucker(args, len));
};
observableProto.flatMap = observableProto.selectMany = function(selector, resultSelector, thisArg) {
return new FlatMapObservable(this, selector, resultSelector, thisArg).mergeAll();
};
//
//Rx.Observable.prototype.flatMapWithMaxConcurrent = function(limit, selector, resultSelector, thisArg) {
// return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(limit);
//};
//
/**
* Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
* @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element.
* @param {Function} onError A transform function to apply when an error occurs in the source sequence.
* @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached.
* @param {Any} [thisArg] An optional "this" to use to invoke each transform.
* @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence.
*/
observableProto.flatMapObserver = observableProto.selectManyObserver = function (onNext, onError, onCompleted, thisArg) {
var source = this;
return new AnonymousObservable(function (observer) {
var index = 0;
return source.subscribe(
function (x) {
var result;
try {
result = onNext.call(thisArg, x, index++);
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
},
function (err) {
var result;
try {
result = onError.call(thisArg, err);
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
observer.onCompleted();
},
function () {
var result;
try {
result = onCompleted.call(thisArg);
} catch (e) {
observer.onError(e);
return;
}
isPromise(result) && (result = observableFromPromise(result));
observer.onNext(result);
observer.onCompleted();
});
}, source).mergeAll();
};
Rx.Observable.prototype.flatMapLatest = function(selector, resultSelector, thisArg) {
return new FlatMapObservable(this, selector, resultSelector, thisArg).switchLatest();
};
var SkipObservable = (function(__super__) {
inherits(SkipObservable, __super__);
function SkipObservable(source, count) {
this.source = source;
this.skipCount = count;
__super__.call(this);
}
SkipObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new InnerObserver(o, this.skipCount));
};
function InnerObserver(o, c) {
this.c = c;
this.r = c;
this.o = o;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function (x) {
if (this.isStopped) { return; }
if (this.r <= 0) {
this.o.onNext(x);
} else {
this.r--;
}
};
InnerObserver.prototype.onError = function(e) {
if (!this.isStopped) { this.isStopped = true; this.o.onError(e); }
};
InnerObserver.prototype.onCompleted = function() {
if (!this.isStopped) { this.isStopped = true; this.o.onCompleted(); }
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function(e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return SkipObservable;
}(ObservableBase));
/**
* Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.
* @param {Number} count The number of elements to skip before returning the remaining elements.
* @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence.
*/
observableProto.skip = function (count) {
if (count < 0) { throw new ArgumentOutOfRangeError(); }
return new SkipObservable(this, count);
};
/**
* Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
* The element's index is used in the logic of the predicate function.
*
* var res = source.skipWhile(function (value) { return value < 10; });
* var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; });
* @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
*/
observableProto.skipWhile = function (predicate, thisArg) {
var source = this,
callback = bindCallback(predicate, thisArg, 3);
return new AnonymousObservable(function (o) {
var i = 0, running = false;
return source.subscribe(function (x) {
if (!running) {
try {
running = !callback(x, i++, source);
} catch (e) {
o.onError(e);
return;
}
}
running && o.onNext(x);
}, function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, source);
};
/**
* Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0).
*
* var res = source.take(5);
* var res = source.take(0, Rx.Scheduler.timeout);
* @param {Number} count The number of elements to return.
* @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case <paramref name="count count</paramref> is set to 0.
* @returns {Observable} An observable sequence that contains the specified number of elements from the start of the input sequence.
*/
observableProto.take = function (count, scheduler) {
if (count < 0) { throw new ArgumentOutOfRangeError(); }
if (count === 0) { return observableEmpty(scheduler); }
var source = this;
return new AnonymousObservable(function (o) {
var remaining = count;
return source.subscribe(function (x) {
if (remaining-- > 0) {
o.onNext(x);
remaining <= 0 && o.onCompleted();
}
}, function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, source);
};
/**
* Returns elements from an observable sequence as long as a specified condition is true.
* The element's index is used in the logic of the predicate function.
* @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
*/
observableProto.takeWhile = function (predicate, thisArg) {
var source = this,
callback = bindCallback(predicate, thisArg, 3);
return new AnonymousObservable(function (o) {
var i = 0, running = true;
return source.subscribe(function (x) {
if (running) {
try {
running = callback(x, i++, source);
} catch (e) {
o.onError(e);
return;
}
if (running) {
o.onNext(x);
} else {
o.onCompleted();
}
}
}, function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, source);
};
var FilterObservable = (function (__super__) {
inherits(FilterObservable, __super__);
function FilterObservable(source, predicate, thisArg) {
this.source = source;
this.predicate = bindCallback(predicate, thisArg, 3);
__super__.call(this);
}
FilterObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new InnerObserver(o, this.predicate, this));
};
function innerPredicate(predicate, self) {
return function(x, i, o) { return self.predicate(x, i, o) && predicate.call(this, x, i, o); }
}
FilterObservable.prototype.internalFilter = function(predicate, thisArg) {
return new FilterObservable(this.source, innerPredicate(predicate, this), thisArg);
};
function InnerObserver(o, predicate, source) {
this.o = o;
this.predicate = predicate;
this.source = source;
this.i = 0;
this.isStopped = false;
}
InnerObserver.prototype.onNext = function(x) {
if (this.isStopped) { return; }
var shouldYield = tryCatch(this.predicate)(x, this.i++, this.source);
if (shouldYield === errorObj) {
return this.o.onError(shouldYield.e);
}
shouldYield && this.o.onNext(x);
};
InnerObserver.prototype.onError = function (e) {
if(!this.isStopped) { this.isStopped = true; this.o.onError(e); }
};
InnerObserver.prototype.onCompleted = function () {
if(!this.isStopped) { this.isStopped = true; this.o.onCompleted(); }
};
InnerObserver.prototype.dispose = function() { this.isStopped = true; };
InnerObserver.prototype.fail = function (e) {
if (!this.isStopped) {
this.isStopped = true;
this.o.onError(e);
return true;
}
return false;
};
return FilterObservable;
}(ObservableBase));
/**
* Filters the elements of an observable sequence based on a predicate by incorporating the element's index.
* @param {Function} predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element.
* @param {Any} [thisArg] Object to use as this when executing callback.
* @returns {Observable} An observable sequence that contains elements from the input sequence that satisfy the condition.
*/
observableProto.filter = observableProto.where = function (predicate, thisArg) {
return this instanceof FilterObservable ? this.internalFilter(predicate, thisArg) :
new FilterObservable(this, predicate, thisArg);
};
/**
* Executes a transducer to transform the observable sequence
* @param {Transducer} transducer A transducer to execute
* @returns {Observable} An Observable sequence containing the results from the transducer.
*/
observableProto.transduce = function(transducer) {
var source = this;
function transformForObserver(o) {
return {
'@@transducer/init': function() {
return o;
},
'@@transducer/step': function(obs, input) {
return obs.onNext(input);
},
'@@transducer/result': function(obs) {
return obs.onCompleted();
}
};
}
return new AnonymousObservable(function(o) {
var xform = transducer(transformForObserver(o));
return source.subscribe(
function(v) {
var res = tryCatch(xform['@@transducer/step']).call(xform, o, v);
if (res === errorObj) { o.onError(res.e); }
},
function (e) { o.onError(e); },
function() { xform['@@transducer/result'](o); }
);
}, source);
};
var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) {
inherits(AnonymousObservable, __super__);
// Fix subscriber to check for undefined or function returned to decorate as Disposable
function fixSubscriber(subscriber) {
return subscriber && isFunction(subscriber.dispose) ? subscriber :
isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty;
}
function setDisposable(s, state) {
var ado = state[0], self = state[1];
var sub = tryCatch(self.__subscribe).call(self, ado);
if (sub === errorObj) {
if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); }
}
ado.setDisposable(fixSubscriber(sub));
}
function innerSubscribe(observer) {
var ado = new AutoDetachObserver(observer), state = [ado, this];
if (currentThreadScheduler.scheduleRequired()) {
currentThreadScheduler.scheduleWithState(state, setDisposable);
} else {
setDisposable(null, state);
}
return ado;
}
function AnonymousObservable(subscribe, parent) {
this.source = parent;
this.__subscribe = subscribe;
__super__.call(this, innerSubscribe);
}
return AnonymousObservable;
}(Observable));
var AutoDetachObserver = (function (__super__) {
inherits(AutoDetachObserver, __super__);
function AutoDetachObserver(observer) {
__super__.call(this);
this.observer = observer;
this.m = new SingleAssignmentDisposable();
}
var AutoDetachObserverPrototype = AutoDetachObserver.prototype;
AutoDetachObserverPrototype.next = function (value) {
var result = tryCatch(this.observer.onNext).call(this.observer, value);
if (result === errorObj) {
this.dispose();
thrower(result.e);
}
};
AutoDetachObserverPrototype.error = function (err) {
var result = tryCatch(this.observer.onError).call(this.observer, err);
this.dispose();
result === errorObj && thrower(result.e);
};
AutoDetachObserverPrototype.completed = function () {
var result = tryCatch(this.observer.onCompleted).call(this.observer);
this.dispose();
result === errorObj && thrower(result.e);
};
AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); };
AutoDetachObserverPrototype.getDisposable = function () { return this.m.getDisposable(); };
AutoDetachObserverPrototype.dispose = function () {
__super__.prototype.dispose.call(this);
this.m.dispose();
};
return AutoDetachObserver;
}(AbstractObserver));
var InnerSubscription = function (subject, observer) {
this.subject = subject;
this.observer = observer;
};
InnerSubscription.prototype.dispose = function () {
if (!this.subject.isDisposed && this.observer !== null) {
var idx = this.subject.observers.indexOf(this.observer);
this.subject.observers.splice(idx, 1);
this.observer = null;
}
};
/**
* Represents an object that is both an observable sequence as well as an observer.
* Each notification is broadcasted to all subscribed observers.
*/
var Subject = Rx.Subject = (function (__super__) {
function subscribe(observer) {
checkDisposed(this);
if (!this.isStopped) {
this.observers.push(observer);
return new InnerSubscription(this, observer);
}
if (this.hasError) {
observer.onError(this.error);
return disposableEmpty;
}
observer.onCompleted();
return disposableEmpty;
}
inherits(Subject, __super__);
/**
* Creates a subject.
*/
function Subject() {
__super__.call(this, subscribe);
this.isDisposed = false,
this.isStopped = false,
this.observers = [];
this.hasError = false;
}
addProperties(Subject.prototype, Observer.prototype, {
/**
* Indicates whether the subject has observers subscribed to it.
* @returns {Boolean} Indicates whether the subject has observers subscribed to it.
*/
hasObservers: function () { return this.observers.length > 0; },
/**
* Notifies all subscribed observers about the end of the sequence.
*/
onCompleted: function () {
checkDisposed(this);
if (!this.isStopped) {
this.isStopped = true;
for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
os[i].onCompleted();
}
this.observers.length = 0;
}
},
/**
* Notifies all subscribed observers about the exception.
* @param {Mixed} error The exception to send to all observers.
*/
onError: function (error) {
checkDisposed(this);
if (!this.isStopped) {
this.isStopped = true;
this.error = error;
this.hasError = true;
for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
os[i].onError(error);
}
this.observers.length = 0;
}
},
/**
* Notifies all subscribed observers about the arrival of the specified element in the sequence.
* @param {Mixed} value The value to send to all observers.
*/
onNext: function (value) {
checkDisposed(this);
if (!this.isStopped) {
for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
os[i].onNext(value);
}
}
},
/**
* Unsubscribe all observers and release resources.
*/
dispose: function () {
this.isDisposed = true;
this.observers = null;
}
});
/**
* Creates a subject from the specified observer and observable.
* @param {Observer} observer The observer used to send messages to the subject.
* @param {Observable} observable The observable used to subscribe to messages sent from the subject.
* @returns {Subject} Subject implemented using the given observer and observable.
*/
Subject.create = function (observer, observable) {
return new AnonymousSubject(observer, observable);
};
return Subject;
}(Observable));
/**
* Represents the result of an asynchronous operation.
* The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
*/
var AsyncSubject = Rx.AsyncSubject = (function (__super__) {
function subscribe(observer) {
checkDisposed(this);
if (!this.isStopped) {
this.observers.push(observer);
return new InnerSubscription(this, observer);
}
if (this.hasError) {
observer.onError(this.error);
} else if (this.hasValue) {
observer.onNext(this.value);
observer.onCompleted();
} else {
observer.onCompleted();
}
return disposableEmpty;
}
inherits(AsyncSubject, __super__);
/**
* Creates a subject that can only receive one value and that value is cached for all future observations.
* @constructor
*/
function AsyncSubject() {
__super__.call(this, subscribe);
this.isDisposed = false;
this.isStopped = false;
this.hasValue = false;
this.observers = [];
this.hasError = false;
}
addProperties(AsyncSubject.prototype, Observer, {
/**
* Indicates whether the subject has observers subscribed to it.
* @returns {Boolean} Indicates whether the subject has observers subscribed to it.
*/
hasObservers: function () {
checkDisposed(this);
return this.observers.length > 0;
},
/**
* Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any).
*/
onCompleted: function () {
var i, len;
checkDisposed(this);
if (!this.isStopped) {
this.isStopped = true;
var os = cloneArray(this.observers), len = os.length;
if (this.hasValue) {
for (i = 0; i < len; i++) {
var o = os[i];
o.onNext(this.value);
o.onCompleted();
}
} else {
for (i = 0; i < len; i++) {
os[i].onCompleted();
}
}
this.observers.length = 0;
}
},
/**
* Notifies all subscribed observers about the error.
* @param {Mixed} error The Error to send to all observers.
*/
onError: function (error) {
checkDisposed(this);
if (!this.isStopped) {
this.isStopped = true;
this.hasError = true;
this.error = error;
for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) {
os[i].onError(error);
}
this.observers.length = 0;
}
},
/**
* Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers.
* @param {Mixed} value The value to store in the subject.
*/
onNext: function (value) {
checkDisposed(this);
if (this.isStopped) { return; }
this.value = value;
this.hasValue = true;
},
/**
* Unsubscribe all observers and release resources.
*/
dispose: function () {
this.isDisposed = true;
this.observers = null;
this.exception = null;
this.value = null;
}
});
return AsyncSubject;
}(Observable));
var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) {
inherits(AnonymousSubject, __super__);
function subscribe(observer) {
return this.observable.subscribe(observer);
}
function AnonymousSubject(observer, observable) {
this.observer = observer;
this.observable = observable;
__super__.call(this, subscribe);
}
addProperties(AnonymousSubject.prototype, Observer.prototype, {
onCompleted: function () {
this.observer.onCompleted();
},
onError: function (error) {
this.observer.onError(error);
},
onNext: function (value) {
this.observer.onNext(value);
}
});
return AnonymousSubject;
}(Observable));
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
root.Rx = Rx;
define(function() {
return Rx;
});
} else if (freeExports && freeModule) {
// in Node.js or RingoJS
if (moduleExports) {
(freeModule.exports = Rx).Rx = Rx;
} else {
freeExports.Rx = Rx;
}
} else {
// in a browser or Rhino
root.Rx = Rx;
}
// All code before this point will be filtered from stack traces.
var rEndingLine = captureLine();
}.call(this));
|
app/javascript/flavours/glitch/components/avatar.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from 'flavours/glitch/util/initial_state';
import classNames from 'classnames';
export default class Avatar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map,
className: PropTypes.string,
size: PropTypes.number.isRequired,
style: PropTypes.object,
inline: PropTypes.bool,
animate: PropTypes.bool,
};
static defaultProps = {
animate: autoPlayGif,
size: 20,
inline: false,
};
state = {
hovering: false,
};
handleMouseEnter = () => {
if (this.props.animate) return;
this.setState({ hovering: true });
}
handleMouseLeave = () => {
if (this.props.animate) return;
this.setState({ hovering: false });
}
render () {
const {
account,
animate,
className,
inline,
size,
} = this.props;
const { hovering } = this.state;
const style = {
...this.props.style,
width: `${size}px`,
height: `${size}px`,
backgroundSize: `${size}px ${size}px`,
};
if (account) {
const src = account.get('avatar');
const staticSrc = account.get('avatar_static');
if (hovering || animate) {
style.backgroundImage = `url(${src})`;
} else {
style.backgroundImage = `url(${staticSrc})`;
}
}
return (
<div
className={classNames('account__avatar', { 'account__avatar-inline': inline }, className)}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
style={style}
data-avatar-of={account && `@${account.get('acct')}`}
/>
);
}
}
|
ajax/libs/video.js/4.5.1/video.dev.js | contolini/cdnjs | /**
* @fileoverview Main function src.
*/
// HTML5 Shiv. Must be in <head> to support older browsers.
document.createElement('video');
document.createElement('audio');
document.createElement('track');
/**
* Doubles as the main function for users to create a player instance and also
* the main library object.
*
* **ALIASES** videojs, _V_ (deprecated)
*
* The `vjs` function can be used to initialize or retrieve a player.
*
* var myPlayer = vjs('my_video_id');
*
* @param {String|Element} id Video element or video element ID
* @param {Object=} options Optional options object for config/settings
* @param {Function=} ready Optional ready callback
* @return {vjs.Player} A player instance
* @namespace
*/
var vjs = function(id, options, ready){
var tag; // Element of ID
// Allow for element or ID to be passed in
// String ID
if (typeof id === 'string') {
// Adjust for jQuery ID syntax
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
// If a player instance has already been created for this ID return it.
if (vjs.players[id]) {
return vjs.players[id];
// Otherwise get element for ID
} else {
tag = vjs.el(id);
}
// ID is a media element
} else {
tag = id;
}
// Check for a useable element
if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also
throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns
}
// Element may have a player attr referring to an already created player instance.
// If not, set up a new player and return the instance.
return tag['player'] || new vjs.Player(tag, options, ready);
};
// Extended name, also available externally, window.videojs
var videojs = vjs;
window.videojs = window.vjs = vjs;
// CDN Version. Used to target right flash swf.
vjs.CDN_VERSION = '4.5';
vjs.ACCESS_PROTOCOL = ('https:' == document.location.protocol ? 'https://' : 'http://');
/**
* Global Player instance options, surfaced from vjs.Player.prototype.options_
* vjs.options = vjs.Player.prototype.options_
* All options should use string keys so they avoid
* renaming by closure compiler
* @type {Object}
*/
vjs.options = {
// Default order of fallback technology
'techOrder': ['html5','flash'],
// techOrder: ['flash','html5'],
'html5': {},
'flash': {},
// Default of web browser is 300x150. Should rely on source width/height.
'width': 300,
'height': 150,
// defaultVolume: 0.85,
'defaultVolume': 0.00, // The freakin seaguls are driving me crazy!
// Included control sets
'children': {
'mediaLoader': {},
'posterImage': {},
'textTrackDisplay': {},
'loadingSpinner': {},
'bigPlayButton': {},
'controlBar': {}
},
// Default message to show when a video cannot be played.
'notSupportedMessage': 'Sorry, no compatible source and playback ' +
'technology were found for this video. Try using another browser ' +
'like <a href="http://bit.ly/ccMUEC">Chrome</a> or download the ' +
'latest <a href="http://adobe.ly/mwfN1">Adobe Flash Player</a>.'
};
// Set CDN Version of swf
// The added (+) blocks the replace from changing this 4.5 string
if (vjs.CDN_VERSION !== 'GENERATED'+'_CDN_VSN') {
videojs.options['flash']['swf'] = vjs.ACCESS_PROTOCOL + 'vjs.zencdn.net/'+vjs.CDN_VERSION+'/video-js.swf';
}
/**
* Global player list
* @type {Object}
*/
vjs.players = {};
/*!
* Custom Universal Module Definition (UMD)
*
* Video.js will never be a non-browser lib so we can simplify UMD a bunch and
* still support requirejs and browserify. This also needs to be closure
* compiler compatible, so string keys are used.
*/
if (typeof define === 'function' && define['amd']) {
define([], function(){ return videojs; });
// checking that module is an object too because of umdjs/umd#35
} else if (typeof exports === 'object' && typeof module === 'object') {
module['exports'] = videojs;
}
/**
* Core Object/Class for objects that use inheritance + contstructors
*
* To create a class that can be subclassed itself, extend the CoreObject class.
*
* var Animal = CoreObject.extend();
* var Horse = Animal.extend();
*
* The constructor can be defined through the init property of an object argument.
*
* var Animal = CoreObject.extend({
* init: function(name, sound){
* this.name = name;
* }
* });
*
* Other methods and properties can be added the same way, or directly to the
* prototype.
*
* var Animal = CoreObject.extend({
* init: function(name){
* this.name = name;
* },
* getName: function(){
* return this.name;
* },
* sound: '...'
* });
*
* Animal.prototype.makeSound = function(){
* alert(this.sound);
* };
*
* To create an instance of a class, use the create method.
*
* var fluffy = Animal.create('Fluffy');
* fluffy.getName(); // -> Fluffy
*
* Methods and properties can be overridden in subclasses.
*
* var Horse = Animal.extend({
* sound: 'Neighhhhh!'
* });
*
* var horsey = Horse.create('Horsey');
* horsey.getName(); // -> Horsey
* horsey.makeSound(); // -> Alert: Neighhhhh!
*
* @class
* @constructor
*/
vjs.CoreObject = vjs['CoreObject'] = function(){};
// Manually exporting vjs['CoreObject'] here for Closure Compiler
// because of the use of the extend/create class methods
// If we didn't do this, those functions would get flattend to something like
// `a = ...` and `this.prototype` would refer to the global object instead of
// CoreObject
/**
* Create a new object that inherits from this Object
*
* var Animal = CoreObject.extend();
* var Horse = Animal.extend();
*
* @param {Object} props Functions and properties to be applied to the
* new object's prototype
* @return {vjs.CoreObject} An object that inherits from CoreObject
* @this {*}
*/
vjs.CoreObject.extend = function(props){
var init, subObj;
props = props || {};
// Set up the constructor using the supplied init method
// or using the init of the parent object
// Make sure to check the unobfuscated version for external libs
init = props['init'] || props.init || this.prototype['init'] || this.prototype.init || function(){};
// In Resig's simple class inheritance (previously used) the constructor
// is a function that calls `this.init.apply(arguments)`
// However that would prevent us from using `ParentObject.call(this);`
// in a Child constuctor because the `this` in `this.init`
// would still refer to the Child and cause an inifinite loop.
// We would instead have to do
// `ParentObject.prototype.init.apply(this, argumnents);`
// Bleh. We're not creating a _super() function, so it's good to keep
// the parent constructor reference simple.
subObj = function(){
init.apply(this, arguments);
};
// Inherit from this object's prototype
subObj.prototype = vjs.obj.create(this.prototype);
// Reset the constructor property for subObj otherwise
// instances of subObj would have the constructor of the parent Object
subObj.prototype.constructor = subObj;
// Make the class extendable
subObj.extend = vjs.CoreObject.extend;
// Make a function for creating instances
subObj.create = vjs.CoreObject.create;
// Extend subObj's prototype with functions and other properties from props
for (var name in props) {
if (props.hasOwnProperty(name)) {
subObj.prototype[name] = props[name];
}
}
return subObj;
};
/**
* Create a new instace of this Object class
*
* var myAnimal = Animal.create();
*
* @return {vjs.CoreObject} An instance of a CoreObject subclass
* @this {*}
*/
vjs.CoreObject.create = function(){
// Create a new object that inherits from this object's prototype
var inst = vjs.obj.create(this.prototype);
// Apply this constructor function to the new object
this.apply(inst, arguments);
// Return the new object
return inst;
};
/**
* @fileoverview Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
* (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)
* This should work very similarly to jQuery's events, however it's based off the book version which isn't as
* robust as jquery's, so there's probably some differences.
*/
/**
* Add an event listener to element
* It stores the handler function in a separate cache object
* and adds a generic handler to the element's event,
* along with a unique id (guid) to the element.
* @param {Element|Object} elem Element or object to bind listeners to
* @param {String} type Type of event to bind to.
* @param {Function} fn Event listener.
* @private
*/
vjs.on = function(elem, type, fn){
var data = vjs.getData(elem);
// We need a place to store all our handler data
if (!data.handlers) data.handlers = {};
if (!data.handlers[type]) data.handlers[type] = [];
if (!fn.guid) fn.guid = vjs.guid++;
data.handlers[type].push(fn);
if (!data.dispatcher) {
data.disabled = false;
data.dispatcher = function (event){
if (data.disabled) return;
event = vjs.fixEvent(event);
var handlers = data.handlers[event.type];
if (handlers) {
// Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.
var handlersCopy = handlers.slice(0);
for (var m = 0, n = handlersCopy.length; m < n; m++) {
if (event.isImmediatePropagationStopped()) {
break;
} else {
handlersCopy[m].call(elem, event);
}
}
}
};
}
if (data.handlers[type].length == 1) {
if (document.addEventListener) {
elem.addEventListener(type, data.dispatcher, false);
} else if (document.attachEvent) {
elem.attachEvent('on' + type, data.dispatcher);
}
}
};
/**
* Removes event listeners from an element
* @param {Element|Object} elem Object to remove listeners from
* @param {String=} type Type of listener to remove. Don't include to remove all events from element.
* @param {Function} fn Specific listener to remove. Don't incldue to remove listeners for an event type.
* @private
*/
vjs.off = function(elem, type, fn) {
// Don't want to add a cache object through getData if not needed
if (!vjs.hasData(elem)) return;
var data = vjs.getData(elem);
// If no events exist, nothing to unbind
if (!data.handlers) { return; }
// Utility function
var removeType = function(t){
data.handlers[t] = [];
vjs.cleanUpEvents(elem,t);
};
// Are we removing all bound events?
if (!type) {
for (var t in data.handlers) removeType(t);
return;
}
var handlers = data.handlers[type];
// If no handlers exist, nothing to unbind
if (!handlers) return;
// If no listener was provided, remove all listeners for type
if (!fn) {
removeType(type);
return;
}
// We're only removing a single handler
if (fn.guid) {
for (var n = 0; n < handlers.length; n++) {
if (handlers[n].guid === fn.guid) {
handlers.splice(n--, 1);
}
}
}
vjs.cleanUpEvents(elem, type);
};
/**
* Clean up the listener cache and dispatchers
* @param {Element|Object} elem Element to clean up
* @param {String} type Type of event to clean up
* @private
*/
vjs.cleanUpEvents = function(elem, type) {
var data = vjs.getData(elem);
// Remove the events of a particular type if there are none left
if (data.handlers[type].length === 0) {
delete data.handlers[type];
// data.handlers[type] = null;
// Setting to null was causing an error with data.handlers
// Remove the meta-handler from the element
if (document.removeEventListener) {
elem.removeEventListener(type, data.dispatcher, false);
} else if (document.detachEvent) {
elem.detachEvent('on' + type, data.dispatcher);
}
}
// Remove the events object if there are no types left
if (vjs.isEmpty(data.handlers)) {
delete data.handlers;
delete data.dispatcher;
delete data.disabled;
// data.handlers = null;
// data.dispatcher = null;
// data.disabled = null;
}
// Finally remove the expando if there is no data left
if (vjs.isEmpty(data)) {
vjs.removeData(elem);
}
};
/**
* Fix a native event to have standard property values
* @param {Object} event Event object to fix
* @return {Object}
* @private
*/
vjs.fixEvent = function(event) {
function returnTrue() { return true; }
function returnFalse() { return false; }
// Test if fixing up is needed
// Used to check if !event.stopPropagation instead of isPropagationStopped
// But native events return true for stopPropagation, but don't have
// other expected methods like isPropagationStopped. Seems to be a problem
// with the Javascript Ninja code. So we're just overriding all events now.
if (!event || !event.isPropagationStopped) {
var old = event || window.event;
event = {};
// Clone the old object so that we can modify the values event = {};
// IE8 Doesn't like when you mess with native event properties
// Firefox returns false for event.hasOwnProperty('type') and other props
// which makes copying more difficult.
// TODO: Probably best to create a whitelist of event props
for (var key in old) {
// Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
// Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation
if (key !== 'layerX' && key !== 'layerY' && key !== 'keyboardEvent.keyLocation') {
// Chrome 32+ warns if you try to copy deprecated returnValue, but
// we still want to if preventDefault isn't supported (IE8).
if (!(key == 'returnValue' && old.preventDefault)) {
event[key] = old[key];
}
}
}
// The event occurred on this element
if (!event.target) {
event.target = event.srcElement || document;
}
// Handle which other element the event is related to
event.relatedTarget = event.fromElement === event.target ?
event.toElement :
event.fromElement;
// Stop the default browser action
event.preventDefault = function () {
if (old.preventDefault) {
old.preventDefault();
}
event.returnValue = false;
event.isDefaultPrevented = returnTrue;
event.defaultPrevented = true;
};
event.isDefaultPrevented = returnFalse;
event.defaultPrevented = false;
// Stop the event from bubbling
event.stopPropagation = function () {
if (old.stopPropagation) {
old.stopPropagation();
}
event.cancelBubble = true;
event.isPropagationStopped = returnTrue;
};
event.isPropagationStopped = returnFalse;
// Stop the event from bubbling and executing other handlers
event.stopImmediatePropagation = function () {
if (old.stopImmediatePropagation) {
old.stopImmediatePropagation();
}
event.isImmediatePropagationStopped = returnTrue;
event.stopPropagation();
};
event.isImmediatePropagationStopped = returnFalse;
// Handle mouse position
if (event.clientX != null) {
var doc = document.documentElement, body = document.body;
event.pageX = event.clientX +
(doc && doc.scrollLeft || body && body.scrollLeft || 0) -
(doc && doc.clientLeft || body && body.clientLeft || 0);
event.pageY = event.clientY +
(doc && doc.scrollTop || body && body.scrollTop || 0) -
(doc && doc.clientTop || body && body.clientTop || 0);
}
// Handle key presses
event.which = event.charCode || event.keyCode;
// Fix button for mouse clicks:
// 0 == left; 1 == middle; 2 == right
if (event.button != null) {
event.button = (event.button & 1 ? 0 :
(event.button & 4 ? 1 :
(event.button & 2 ? 2 : 0)));
}
}
// Returns fixed-up instance
return event;
};
/**
* Trigger an event for an element
* @param {Element|Object} elem Element to trigger an event on
* @param {String} event Type of event to trigger
* @private
*/
vjs.trigger = function(elem, event) {
// Fetches element data and a reference to the parent (for bubbling).
// Don't want to add a data object to cache for every parent,
// so checking hasData first.
var elemData = (vjs.hasData(elem)) ? vjs.getData(elem) : {};
var parent = elem.parentNode || elem.ownerDocument;
// type = event.type || event,
// handler;
// If an event name was passed as a string, creates an event out of it
if (typeof event === 'string') {
event = { type:event, target:elem };
}
// Normalizes the event properties.
event = vjs.fixEvent(event);
// If the passed element has a dispatcher, executes the established handlers.
if (elemData.dispatcher) {
elemData.dispatcher.call(elem, event);
}
// Unless explicitly stopped or the event does not bubble (e.g. media events)
// recursively calls this function to bubble the event up the DOM.
if (parent && !event.isPropagationStopped() && event.bubbles !== false) {
vjs.trigger(parent, event);
// If at the top of the DOM, triggers the default action unless disabled.
} else if (!parent && !event.defaultPrevented) {
var targetData = vjs.getData(event.target);
// Checks if the target has a default action for this event.
if (event.target[event.type]) {
// Temporarily disables event dispatching on the target as we have already executed the handler.
targetData.disabled = true;
// Executes the default action.
if (typeof event.target[event.type] === 'function') {
event.target[event.type]();
}
// Re-enables event dispatching.
targetData.disabled = false;
}
}
// Inform the triggerer if the default was prevented by returning false
return !event.defaultPrevented;
/* Original version of js ninja events wasn't complete.
* We've since updated to the latest version, but keeping this around
* for now just in case.
*/
// // Added in attion to book. Book code was broke.
// event = typeof event === 'object' ?
// event[vjs.expando] ?
// event :
// new vjs.Event(type, event) :
// new vjs.Event(type);
// event.type = type;
// if (handler) {
// handler.call(elem, event);
// }
// // Clean up the event in case it is being reused
// event.result = undefined;
// event.target = elem;
};
/**
* Trigger a listener only once for an event
* @param {Element|Object} elem Element or object to
* @param {String} type
* @param {Function} fn
* @private
*/
vjs.one = function(elem, type, fn) {
var func = function(){
vjs.off(elem, type, func);
fn.apply(this, arguments);
};
func.guid = fn.guid = fn.guid || vjs.guid++;
vjs.on(elem, type, func);
};
var hasOwnProp = Object.prototype.hasOwnProperty;
/**
* Creates an element and applies properties.
* @param {String=} tagName Name of tag to be created.
* @param {Object=} properties Element properties to be applied.
* @return {Element}
* @private
*/
vjs.createEl = function(tagName, properties){
var el, propName;
el = document.createElement(tagName || 'div');
for (propName in properties){
if (hasOwnProp.call(properties, propName)) {
//el[propName] = properties[propName];
// Not remembering why we were checking for dash
// but using setAttribute means you have to use getAttribute
// The check for dash checks for the aria-* attributes, like aria-label, aria-valuemin.
// The additional check for "role" is because the default method for adding attributes does not
// add the attribute "role". My guess is because it's not a valid attribute in some namespaces, although
// browsers handle the attribute just fine. The W3C allows for aria-* attributes to be used in pre-HTML5 docs.
// http://www.w3.org/TR/wai-aria-primer/#ariahtml. Using setAttribute gets around this problem.
if (propName.indexOf('aria-') !== -1 || propName=='role') {
el.setAttribute(propName, properties[propName]);
} else {
el[propName] = properties[propName];
}
}
}
return el;
};
/**
* Uppercase the first letter of a string
* @param {String} string String to be uppercased
* @return {String}
* @private
*/
vjs.capitalize = function(string){
return string.charAt(0).toUpperCase() + string.slice(1);
};
/**
* Object functions container
* @type {Object}
* @private
*/
vjs.obj = {};
/**
* Object.create shim for prototypal inheritance
*
* https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create
*
* @function
* @param {Object} obj Object to use as prototype
* @private
*/
vjs.obj.create = Object.create || function(obj){
//Create a new function called 'F' which is just an empty object.
function F() {}
//the prototype of the 'F' function should point to the
//parameter of the anonymous function.
F.prototype = obj;
//create a new constructor function based off of the 'F' function.
return new F();
};
/**
* Loop through each property in an object and call a function
* whose arguments are (key,value)
* @param {Object} obj Object of properties
* @param {Function} fn Function to be called on each property.
* @this {*}
* @private
*/
vjs.obj.each = function(obj, fn, context){
for (var key in obj) {
if (hasOwnProp.call(obj, key)) {
fn.call(context || this, key, obj[key]);
}
}
};
/**
* Merge two objects together and return the original.
* @param {Object} obj1
* @param {Object} obj2
* @return {Object}
* @private
*/
vjs.obj.merge = function(obj1, obj2){
if (!obj2) { return obj1; }
for (var key in obj2){
if (hasOwnProp.call(obj2, key)) {
obj1[key] = obj2[key];
}
}
return obj1;
};
/**
* Merge two objects, and merge any properties that are objects
* instead of just overwriting one. Uses to merge options hashes
* where deeper default settings are important.
* @param {Object} obj1 Object to override
* @param {Object} obj2 Overriding object
* @return {Object} New object. Obj1 and Obj2 will be untouched.
* @private
*/
vjs.obj.deepMerge = function(obj1, obj2){
var key, val1, val2;
// make a copy of obj1 so we're not ovewriting original values.
// like prototype.options_ and all sub options objects
obj1 = vjs.obj.copy(obj1);
for (key in obj2){
if (hasOwnProp.call(obj2, key)) {
val1 = obj1[key];
val2 = obj2[key];
// Check if both properties are pure objects and do a deep merge if so
if (vjs.obj.isPlain(val1) && vjs.obj.isPlain(val2)) {
obj1[key] = vjs.obj.deepMerge(val1, val2);
} else {
obj1[key] = obj2[key];
}
}
}
return obj1;
};
/**
* Make a copy of the supplied object
* @param {Object} obj Object to copy
* @return {Object} Copy of object
* @private
*/
vjs.obj.copy = function(obj){
return vjs.obj.merge({}, obj);
};
/**
* Check if an object is plain, and not a dom node or any object sub-instance
* @param {Object} obj Object to check
* @return {Boolean} True if plain, false otherwise
* @private
*/
vjs.obj.isPlain = function(obj){
return !!obj
&& typeof obj === 'object'
&& obj.toString() === '[object Object]'
&& obj.constructor === Object;
};
/**
* Bind (a.k.a proxy or Context). A simple method for changing the context of a function
It also stores a unique id on the function so it can be easily removed from events
* @param {*} context The object to bind as scope
* @param {Function} fn The function to be bound to a scope
* @param {Number=} uid An optional unique ID for the function to be set
* @return {Function}
* @private
*/
vjs.bind = function(context, fn, uid) {
// Make sure the function has a unique ID
if (!fn.guid) { fn.guid = vjs.guid++; }
// Create the new function that changes the context
var ret = function() {
return fn.apply(context, arguments);
};
// Allow for the ability to individualize this function
// Needed in the case where multiple objects might share the same prototype
// IF both items add an event listener with the same function, then you try to remove just one
// it will remove both because they both have the same guid.
// when using this, you need to use the bind method when you remove the listener as well.
// currently used in text tracks
ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;
return ret;
};
/**
* Element Data Store. Allows for binding data to an element without putting it directly on the element.
* Ex. Event listneres are stored here.
* (also from jsninja.com, slightly modified and updated for closure compiler)
* @type {Object}
* @private
*/
vjs.cache = {};
/**
* Unique ID for an element or function
* @type {Number}
* @private
*/
vjs.guid = 1;
/**
* Unique attribute name to store an element's guid in
* @type {String}
* @constant
* @private
*/
vjs.expando = 'vdata' + (new Date()).getTime();
/**
* Returns the cache object where data for an element is stored
* @param {Element} el Element to store data for.
* @return {Object}
* @private
*/
vjs.getData = function(el){
var id = el[vjs.expando];
if (!id) {
id = el[vjs.expando] = vjs.guid++;
vjs.cache[id] = {};
}
return vjs.cache[id];
};
/**
* Returns the cache object where data for an element is stored
* @param {Element} el Element to store data for.
* @return {Object}
* @private
*/
vjs.hasData = function(el){
var id = el[vjs.expando];
return !(!id || vjs.isEmpty(vjs.cache[id]));
};
/**
* Delete data for the element from the cache and the guid attr from getElementById
* @param {Element} el Remove data for an element
* @private
*/
vjs.removeData = function(el){
var id = el[vjs.expando];
if (!id) { return; }
// Remove all stored data
// Changed to = null
// http://coding.smashingmagazine.com/2012/11/05/writing-fast-memory-efficient-javascript/
// vjs.cache[id] = null;
delete vjs.cache[id];
// Remove the expando property from the DOM node
try {
delete el[vjs.expando];
} catch(e) {
if (el.removeAttribute) {
el.removeAttribute(vjs.expando);
} else {
// IE doesn't appear to support removeAttribute on the document element
el[vjs.expando] = null;
}
}
};
/**
* Check if an object is empty
* @param {Object} obj The object to check for emptiness
* @return {Boolean}
* @private
*/
vjs.isEmpty = function(obj) {
for (var prop in obj) {
// Inlude null properties as empty.
if (obj[prop] !== null) {
return false;
}
}
return true;
};
/**
* Add a CSS class name to an element
* @param {Element} element Element to add class name to
* @param {String} classToAdd Classname to add
* @private
*/
vjs.addClass = function(element, classToAdd){
if ((' '+element.className+' ').indexOf(' '+classToAdd+' ') == -1) {
element.className = element.className === '' ? classToAdd : element.className + ' ' + classToAdd;
}
};
/**
* Remove a CSS class name from an element
* @param {Element} element Element to remove from class name
* @param {String} classToAdd Classname to remove
* @private
*/
vjs.removeClass = function(element, classToRemove){
var classNames, i;
if (element.className.indexOf(classToRemove) == -1) { return; }
classNames = element.className.split(' ');
// no arr.indexOf in ie8, and we don't want to add a big shim
for (i = classNames.length - 1; i >= 0; i--) {
if (classNames[i] === classToRemove) {
classNames.splice(i,1);
}
}
element.className = classNames.join(' ');
};
/**
* Element for testing browser HTML5 video capabilities
* @type {Element}
* @constant
* @private
*/
vjs.TEST_VID = vjs.createEl('video');
/**
* Useragent for browser testing.
* @type {String}
* @constant
* @private
*/
vjs.USER_AGENT = navigator.userAgent;
/**
* Device is an iPhone
* @type {Boolean}
* @constant
* @private
*/
vjs.IS_IPHONE = (/iPhone/i).test(vjs.USER_AGENT);
vjs.IS_IPAD = (/iPad/i).test(vjs.USER_AGENT);
vjs.IS_IPOD = (/iPod/i).test(vjs.USER_AGENT);
vjs.IS_IOS = vjs.IS_IPHONE || vjs.IS_IPAD || vjs.IS_IPOD;
vjs.IOS_VERSION = (function(){
var match = vjs.USER_AGENT.match(/OS (\d+)_/i);
if (match && match[1]) { return match[1]; }
})();
vjs.IS_ANDROID = (/Android/i).test(vjs.USER_AGENT);
vjs.ANDROID_VERSION = (function() {
// This matches Android Major.Minor.Patch versions
// ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned
var match = vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),
major,
minor;
if (!match) {
return null;
}
major = match[1] && parseFloat(match[1]);
minor = match[2] && parseFloat(match[2]);
if (major && minor) {
return parseFloat(match[1] + '.' + match[2]);
} else if (major) {
return major;
} else {
return null;
}
})();
// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser
vjs.IS_OLD_ANDROID = vjs.IS_ANDROID && (/webkit/i).test(vjs.USER_AGENT) && vjs.ANDROID_VERSION < 2.3;
vjs.IS_FIREFOX = (/Firefox/i).test(vjs.USER_AGENT);
vjs.IS_CHROME = (/Chrome/i).test(vjs.USER_AGENT);
vjs.TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);
/**
* Get an element's attribute values, as defined on the HTML tag
* Attributs are not the same as properties. They're defined on the tag
* or with setAttribute (which shouldn't be used with HTML)
* This will return true or false for boolean attributes.
* @param {Element} tag Element from which to get tag attributes
* @return {Object}
* @private
*/
vjs.getAttributeValues = function(tag){
var obj, knownBooleans, attrs, attrName, attrVal;
obj = {};
// known boolean attributes
// we can check for matching boolean properties, but older browsers
// won't know about HTML5 boolean attributes that we still read from
knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';
if (tag && tag.attributes && tag.attributes.length > 0) {
attrs = tag.attributes;
for (var i = attrs.length - 1; i >= 0; i--) {
attrName = attrs[i].name;
attrVal = attrs[i].value;
// check for known booleans
// the matching element property will return a value for typeof
if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {
// the value of an included boolean attribute is typically an empty
// string ('') which would equal false if we just check for a false value.
// we also don't want support bad code like autoplay='false'
attrVal = (attrVal !== null) ? true : false;
}
obj[attrName] = attrVal;
}
}
return obj;
};
/**
* Get the computed style value for an element
* From http://robertnyman.com/2006/04/24/get-the-rendered-style-of-an-element/
* @param {Element} el Element to get style value for
* @param {String} strCssRule Style name
* @return {String} Style value
* @private
*/
vjs.getComputedDimension = function(el, strCssRule){
var strValue = '';
if(document.defaultView && document.defaultView.getComputedStyle){
strValue = document.defaultView.getComputedStyle(el, '').getPropertyValue(strCssRule);
} else if(el.currentStyle){
// IE8 Width/Height support
strValue = el['client'+strCssRule.substr(0,1).toUpperCase() + strCssRule.substr(1)] + 'px';
}
return strValue;
};
/**
* Insert an element as the first child node of another
* @param {Element} child Element to insert
* @param {[type]} parent Element to insert child into
* @private
*/
vjs.insertFirst = function(child, parent){
if (parent.firstChild) {
parent.insertBefore(child, parent.firstChild);
} else {
parent.appendChild(child);
}
};
/**
* Object to hold browser support information
* @type {Object}
* @private
*/
vjs.support = {};
/**
* Shorthand for document.getElementById()
* Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.
* @param {String} id Element ID
* @return {Element} Element with supplied ID
* @private
*/
vjs.el = function(id){
if (id.indexOf('#') === 0) {
id = id.slice(1);
}
return document.getElementById(id);
};
/**
* Format seconds as a time string, H:MM:SS or M:SS
* Supplying a guide (in seconds) will force a number of leading zeros
* to cover the length of the guide
* @param {Number} seconds Number of seconds to be turned into a string
* @param {Number} guide Number (in seconds) to model the string after
* @return {String} Time formatted as H:MM:SS or M:SS
* @private
*/
vjs.formatTime = function(seconds, guide) {
// Default to using seconds as guide
guide = guide || seconds;
var s = Math.floor(seconds % 60),
m = Math.floor(seconds / 60 % 60),
h = Math.floor(seconds / 3600),
gm = Math.floor(guide / 60 % 60),
gh = Math.floor(guide / 3600);
// handle invalid times
if (isNaN(seconds) || seconds === Infinity) {
// '-' is false for all relational operators (e.g. <, >=) so this setting
// will add the minimum number of fields specified by the guide
h = m = s = '-';
}
// Check if we need to show hours
h = (h > 0 || gh > 0) ? h + ':' : '';
// If hours are showing, we may need to add a leading zero.
// Always show at least one digit of minutes.
m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';
// Check if leading zero is need for seconds
s = (s < 10) ? '0' + s : s;
return h + m + s;
};
// Attempt to block the ability to select text while dragging controls
vjs.blockTextSelection = function(){
document.body.focus();
document.onselectstart = function () { return false; };
};
// Turn off text selection blocking
vjs.unblockTextSelection = function(){ document.onselectstart = function () { return true; }; };
/**
* Trim whitespace from the ends of a string.
* @param {String} string String to trim
* @return {String} Trimmed string
* @private
*/
vjs.trim = function(str){
return (str+'').replace(/^\s+|\s+$/g, '');
};
/**
* Should round off a number to a decimal place
* @param {Number} num Number to round
* @param {Number} dec Number of decimal places to round to
* @return {Number} Rounded number
* @private
*/
vjs.round = function(num, dec) {
if (!dec) { dec = 0; }
return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
};
/**
* Should create a fake TimeRange object
* Mimics an HTML5 time range instance, which has functions that
* return the start and end times for a range
* TimeRanges are returned by the buffered() method
* @param {Number} start Start time in seconds
* @param {Number} end End time in seconds
* @return {Object} Fake TimeRange object
* @private
*/
vjs.createTimeRange = function(start, end){
return {
length: 1,
start: function() { return start; },
end: function() { return end; }
};
};
/**
* Simple http request for retrieving external files (e.g. text tracks)
* @param {String} url URL of resource
* @param {Function=} onSuccess Success callback
* @param {Function=} onError Error callback
* @private
*/
vjs.get = function(url, onSuccess, onError){
var local, request;
if (typeof XMLHttpRequest === 'undefined') {
window.XMLHttpRequest = function () {
try { return new window.ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch (e) {}
try { return new window.ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch (f) {}
try { return new window.ActiveXObject('Msxml2.XMLHTTP'); } catch (g) {}
throw new Error('This browser does not support XMLHttpRequest.');
};
}
request = new XMLHttpRequest();
try {
request.open('GET', url);
} catch(e) {
onError(e);
}
local = (url.indexOf('file:') === 0 || (window.location.href.indexOf('file:') === 0 && url.indexOf('http') === -1));
request.onreadystatechange = function() {
if (request.readyState === 4) {
if (request.status === 200 || local && request.status === 0) {
onSuccess(request.responseText);
} else {
if (onError) {
onError();
}
}
}
};
try {
request.send();
} catch(e) {
if (onError) {
onError(e);
}
}
};
/**
* Add to local storage (may removeable)
* @private
*/
vjs.setLocalStorage = function(key, value){
try {
// IE was throwing errors referencing the var anywhere without this
var localStorage = window.localStorage || false;
if (!localStorage) { return; }
localStorage[key] = value;
} catch(e) {
if (e.code == 22 || e.code == 1014) { // Webkit == 22 / Firefox == 1014
vjs.log('LocalStorage Full (VideoJS)', e);
} else {
if (e.code == 18) {
vjs.log('LocalStorage not allowed (VideoJS)', e);
} else {
vjs.log('LocalStorage Error (VideoJS)', e);
}
}
}
};
/**
* Get abosolute version of relative URL. Used to tell flash correct URL.
* http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue
* @param {String} url URL to make absolute
* @return {String} Absolute URL
* @private
*/
vjs.getAbsoluteURL = function(url){
// Check if absolute URL
if (!url.match(/^https?:\/\//)) {
// Convert to absolute URL. Flash hosted off-site needs an absolute URL.
url = vjs.createEl('div', {
innerHTML: '<a href="'+url+'">x</a>'
}).firstChild.href;
}
return url;
};
// usage: log('inside coolFunc',this,arguments);
// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
vjs.log = function(){
vjs.log.history = vjs.log.history || []; // store logs to an array for reference
vjs.log.history.push(arguments);
if(window.console){
window.console.log(Array.prototype.slice.call(arguments));
}
};
// Offset Left
// getBoundingClientRect technique from John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/
vjs.findPosition = function(el) {
var box, docEl, body, clientLeft, scrollLeft, left, clientTop, scrollTop, top;
if (el.getBoundingClientRect && el.parentNode) {
box = el.getBoundingClientRect();
}
if (!box) {
return {
left: 0,
top: 0
};
}
docEl = document.documentElement;
body = document.body;
clientLeft = docEl.clientLeft || body.clientLeft || 0;
scrollLeft = window.pageXOffset || body.scrollLeft;
left = box.left + scrollLeft - clientLeft;
clientTop = docEl.clientTop || body.clientTop || 0;
scrollTop = window.pageYOffset || body.scrollTop;
top = box.top + scrollTop - clientTop;
// Android sometimes returns slightly off decimal values, so need to round
return {
left: vjs.round(left),
top: vjs.round(top)
};
};
/**
* Utility functions namespace
* @namespace
* @type {Object}
*/
vjs.util = {};
/**
* Merge two options objects,
* recursively merging any plain object properties as well.
* Previously `deepMerge`
*
* @param {Object} obj1 Object to override values in
* @param {Object} obj2 Overriding object
* @return {Object} New object -- obj1 and obj2 will be untouched
*/
vjs.util.mergeOptions = function(obj1, obj2){
var key, val1, val2;
// make a copy of obj1 so we're not ovewriting original values.
// like prototype.options_ and all sub options objects
obj1 = vjs.obj.copy(obj1);
for (key in obj2){
if (obj2.hasOwnProperty(key)) {
val1 = obj1[key];
val2 = obj2[key];
// Check if both properties are pure objects and do a deep merge if so
if (vjs.obj.isPlain(val1) && vjs.obj.isPlain(val2)) {
obj1[key] = vjs.util.mergeOptions(val1, val2);
} else {
obj1[key] = obj2[key];
}
}
}
return obj1;
};
/**
* @fileoverview Player Component - Base class for all UI objects
*
*/
/**
* Base UI Component class
*
* Components are embeddable UI objects that are represented by both a
* javascript object and an element in the DOM. They can be children of other
* components, and can have many children themselves.
*
* // adding a button to the player
* var button = player.addChild('button');
* button.el(); // -> button element
*
* <div class="video-js">
* <div class="vjs-button">Button</div>
* </div>
*
* Components are also event emitters.
*
* button.on('click', function(){
* console.log('Button Clicked!');
* });
*
* button.trigger('customevent');
*
* @param {Object} player Main Player
* @param {Object=} options
* @class
* @constructor
* @extends vjs.CoreObject
*/
vjs.Component = vjs.CoreObject.extend({
/**
* the constructor function for the class
*
* @constructor
*/
init: function(player, options, ready){
this.player_ = player;
// Make a copy of prototype.options_ to protect against overriding global defaults
this.options_ = vjs.obj.copy(this.options_);
// Updated options with supplied options
options = this.options(options);
// Get ID from options, element, or create using player ID and unique ID
this.id_ = options['id'] || ((options['el'] && options['el']['id']) ? options['el']['id'] : player.id() + '_component_' + vjs.guid++ );
this.name_ = options['name'] || null;
// Create element if one wasn't provided in options
this.el_ = options['el'] || this.createEl();
this.children_ = [];
this.childIndex_ = {};
this.childNameIndex_ = {};
// Add any child components in options
this.initChildren();
this.ready(ready);
// Don't want to trigger ready here or it will before init is actually
// finished for all children that run this constructor
if (options.reportTouchActivity !== false) {
this.enableTouchActivity();
}
}
});
/**
* Dispose of the component and all child components
*/
vjs.Component.prototype.dispose = function(){
this.trigger({ type: 'dispose', 'bubbles': false });
// Dispose all children.
if (this.children_) {
for (var i = this.children_.length - 1; i >= 0; i--) {
if (this.children_[i].dispose) {
this.children_[i].dispose();
}
}
}
// Delete child references
this.children_ = null;
this.childIndex_ = null;
this.childNameIndex_ = null;
// Remove all event listeners.
this.off();
// Remove element from DOM
if (this.el_.parentNode) {
this.el_.parentNode.removeChild(this.el_);
}
vjs.removeData(this.el_);
this.el_ = null;
};
/**
* Reference to main player instance
*
* @type {vjs.Player}
* @private
*/
vjs.Component.prototype.player_ = true;
/**
* Return the component's player
*
* @return {vjs.Player}
*/
vjs.Component.prototype.player = function(){
return this.player_;
};
/**
* The component's options object
*
* @type {Object}
* @private
*/
vjs.Component.prototype.options_;
/**
* Deep merge of options objects
*
* Whenever a property is an object on both options objects
* the two properties will be merged using vjs.obj.deepMerge.
*
* This is used for merging options for child components. We
* want it to be easy to override individual options on a child
* component without having to rewrite all the other default options.
*
* Parent.prototype.options_ = {
* children: {
* 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },
* 'childTwo': {},
* 'childThree': {}
* }
* }
* newOptions = {
* children: {
* 'childOne': { 'foo': 'baz', 'abc': '123' }
* 'childTwo': null,
* 'childFour': {}
* }
* }
*
* this.options(newOptions);
*
* RESULT
*
* {
* children: {
* 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },
* 'childTwo': null, // Disabled. Won't be initialized.
* 'childThree': {},
* 'childFour': {}
* }
* }
*
* @param {Object} obj Object of new option values
* @return {Object} A NEW object of this.options_ and obj merged
*/
vjs.Component.prototype.options = function(obj){
if (obj === undefined) return this.options_;
return this.options_ = vjs.util.mergeOptions(this.options_, obj);
};
/**
* The DOM element for the component
*
* @type {Element}
* @private
*/
vjs.Component.prototype.el_;
/**
* Create the component's DOM element
*
* @param {String=} tagName Element's node type. e.g. 'div'
* @param {Object=} attributes An object of element attributes that should be set on the element
* @return {Element}
*/
vjs.Component.prototype.createEl = function(tagName, attributes){
return vjs.createEl(tagName, attributes);
};
/**
* Get the component's DOM element
*
* var domEl = myComponent.el();
*
* @return {Element}
*/
vjs.Component.prototype.el = function(){
return this.el_;
};
/**
* An optional element where, if defined, children will be inserted instead of
* directly in `el_`
*
* @type {Element}
* @private
*/
vjs.Component.prototype.contentEl_;
/**
* Return the component's DOM element for embedding content.
* Will either be el_ or a new element defined in createEl.
*
* @return {Element}
*/
vjs.Component.prototype.contentEl = function(){
return this.contentEl_ || this.el_;
};
/**
* The ID for the component
*
* @type {String}
* @private
*/
vjs.Component.prototype.id_;
/**
* Get the component's ID
*
* var id = myComponent.id();
*
* @return {String}
*/
vjs.Component.prototype.id = function(){
return this.id_;
};
/**
* The name for the component. Often used to reference the component.
*
* @type {String}
* @private
*/
vjs.Component.prototype.name_;
/**
* Get the component's name. The name is often used to reference the component.
*
* var name = myComponent.name();
*
* @return {String}
*/
vjs.Component.prototype.name = function(){
return this.name_;
};
/**
* Array of child components
*
* @type {Array}
* @private
*/
vjs.Component.prototype.children_;
/**
* Get an array of all child components
*
* var kids = myComponent.children();
*
* @return {Array} The children
*/
vjs.Component.prototype.children = function(){
return this.children_;
};
/**
* Object of child components by ID
*
* @type {Object}
* @private
*/
vjs.Component.prototype.childIndex_;
/**
* Returns a child component with the provided ID
*
* @return {vjs.Component}
*/
vjs.Component.prototype.getChildById = function(id){
return this.childIndex_[id];
};
/**
* Object of child components by name
*
* @type {Object}
* @private
*/
vjs.Component.prototype.childNameIndex_;
/**
* Returns a child component with the provided name
*
* @return {vjs.Component}
*/
vjs.Component.prototype.getChild = function(name){
return this.childNameIndex_[name];
};
/**
* Adds a child component inside this component
*
* myComponent.el();
* // -> <div class='my-component'></div>
* myComonent.children();
* // [empty array]
*
* var myButton = myComponent.addChild('MyButton');
* // -> <div class='my-component'><div class="my-button">myButton<div></div>
* // -> myButton === myComonent.children()[0];
*
* Pass in options for child constructors and options for children of the child
*
* var myButton = myComponent.addChild('MyButton', {
* text: 'Press Me',
* children: {
* buttonChildExample: {
* buttonChildOption: true
* }
* }
* });
*
* @param {String|vjs.Component} child The class name or instance of a child to add
* @param {Object=} options Options, including options to be passed to children of the child.
* @return {vjs.Component} The child component (created by this process if a string was used)
* @suppress {accessControls|checkRegExp|checkTypes|checkVars|const|constantProperty|deprecated|duplicate|es5Strict|fileoverviewTags|globalThis|invalidCasts|missingProperties|nonStandardJsDocs|strictModuleDepCheck|undefinedNames|undefinedVars|unknownDefines|uselessCode|visibility}
*/
vjs.Component.prototype.addChild = function(child, options){
var component, componentClass, componentName, componentId;
// If string, create new component with options
if (typeof child === 'string') {
componentName = child;
// Make sure options is at least an empty object to protect against errors
options = options || {};
// Assume name of set is a lowercased name of the UI Class (PlayButton, etc.)
componentClass = options['componentClass'] || vjs.capitalize(componentName);
// Set name through options
options['name'] = componentName;
// Create a new object & element for this controls set
// If there's no .player_, this is a player
// Closure Compiler throws an 'incomplete alias' warning if we use the vjs variable directly.
// Every class should be exported, so this should never be a problem here.
component = new window['videojs'][componentClass](this.player_ || this, options);
// child is a component instance
} else {
component = child;
}
this.children_.push(component);
if (typeof component.id === 'function') {
this.childIndex_[component.id()] = component;
}
// If a name wasn't used to create the component, check if we can use the
// name function of the component
componentName = componentName || (component.name && component.name());
if (componentName) {
this.childNameIndex_[componentName] = component;
}
// Add the UI object's element to the container div (box)
// Having an element is not required
if (typeof component['el'] === 'function' && component['el']()) {
this.contentEl().appendChild(component['el']());
}
// Return so it can stored on parent object if desired.
return component;
};
/**
* Remove a child component from this component's list of children, and the
* child component's element from this component's element
*
* @param {vjs.Component} component Component to remove
*/
vjs.Component.prototype.removeChild = function(component){
if (typeof component === 'string') {
component = this.getChild(component);
}
if (!component || !this.children_) return;
var childFound = false;
for (var i = this.children_.length - 1; i >= 0; i--) {
if (this.children_[i] === component) {
childFound = true;
this.children_.splice(i,1);
break;
}
}
if (!childFound) return;
this.childIndex_[component.id] = null;
this.childNameIndex_[component.name] = null;
var compEl = component.el();
if (compEl && compEl.parentNode === this.contentEl()) {
this.contentEl().removeChild(component.el());
}
};
/**
* Add and initialize default child components from options
*
* // when an instance of MyComponent is created, all children in options
* // will be added to the instance by their name strings and options
* MyComponent.prototype.options_.children = {
* myChildComponent: {
* myChildOption: true
* }
* }
*/
vjs.Component.prototype.initChildren = function(){
var options = this.options_;
if (options && options['children']) {
var self = this;
// Loop through components and add them to the player
vjs.obj.each(options['children'], function(name, opts){
// Allow for disabling default components
// e.g. vjs.options['children']['posterImage'] = false
if (opts === false) return;
// Allow waiting to add components until a specific event is called
var tempAdd = function(){
// Set property name on player. Could cause conflicts with other prop names, but it's worth making refs easy.
self[name] = self.addChild(name, opts);
};
if (opts['loadEvent']) {
// this.one(opts.loadEvent, tempAdd)
} else {
tempAdd();
}
});
}
};
/**
* Allows sub components to stack CSS class names
*
* @return {String} The constructed class name
*/
vjs.Component.prototype.buildCSSClass = function(){
// Child classes can include a function that does:
// return 'CLASS NAME' + this._super();
return '';
};
/* Events
============================================================================= */
/**
* Add an event listener to this component's element
*
* var myFunc = function(){
* var myPlayer = this;
* // Do something when the event is fired
* };
*
* myPlayer.on("eventName", myFunc);
*
* The context will be the component.
*
* @param {String} type The event type e.g. 'click'
* @param {Function} fn The event listener
* @return {vjs.Component} self
*/
vjs.Component.prototype.on = function(type, fn){
vjs.on(this.el_, type, vjs.bind(this, fn));
return this;
};
/**
* Remove an event listener from the component's element
*
* myComponent.off("eventName", myFunc);
*
* @param {String=} type Event type. Without type it will remove all listeners.
* @param {Function=} fn Event listener. Without fn it will remove all listeners for a type.
* @return {vjs.Component}
*/
vjs.Component.prototype.off = function(type, fn){
vjs.off(this.el_, type, fn);
return this;
};
/**
* Add an event listener to be triggered only once and then removed
*
* @param {String} type Event type
* @param {Function} fn Event listener
* @return {vjs.Component}
*/
vjs.Component.prototype.one = function(type, fn) {
vjs.one(this.el_, type, vjs.bind(this, fn));
return this;
};
/**
* Trigger an event on an element
*
* myComponent.trigger('eventName');
*
* @param {String} type The event type to trigger, e.g. 'click'
* @param {Event|Object} event The event object to be passed to the listener
* @return {vjs.Component} self
*/
vjs.Component.prototype.trigger = function(type, event){
vjs.trigger(this.el_, type, event);
return this;
};
/* Ready
================================================================================ */
/**
* Is the component loaded
* This can mean different things depending on the component.
*
* @private
* @type {Boolean}
*/
vjs.Component.prototype.isReady_;
/**
* Trigger ready as soon as initialization is finished
*
* Allows for delaying ready. Override on a sub class prototype.
* If you set this.isReadyOnInitFinish_ it will affect all components.
* Specially used when waiting for the Flash player to asynchrnously load.
*
* @type {Boolean}
* @private
*/
vjs.Component.prototype.isReadyOnInitFinish_ = true;
/**
* List of ready listeners
*
* @type {Array}
* @private
*/
vjs.Component.prototype.readyQueue_;
/**
* Bind a listener to the component's ready state
*
* Different from event listeners in that if the ready event has already happend
* it will trigger the function immediately.
*
* @param {Function} fn Ready listener
* @return {vjs.Component}
*/
vjs.Component.prototype.ready = function(fn){
if (fn) {
if (this.isReady_) {
fn.call(this);
} else {
if (this.readyQueue_ === undefined) {
this.readyQueue_ = [];
}
this.readyQueue_.push(fn);
}
}
return this;
};
/**
* Trigger the ready listeners
*
* @return {vjs.Component}
*/
vjs.Component.prototype.triggerReady = function(){
this.isReady_ = true;
var readyQueue = this.readyQueue_;
if (readyQueue && readyQueue.length > 0) {
for (var i = 0, j = readyQueue.length; i < j; i++) {
readyQueue[i].call(this);
}
// Reset Ready Queue
this.readyQueue_ = [];
// Allow for using event listeners also, in case you want to do something everytime a source is ready.
this.trigger('ready');
}
};
/* Display
============================================================================= */
/**
* Add a CSS class name to the component's element
*
* @param {String} classToAdd Classname to add
* @return {vjs.Component}
*/
vjs.Component.prototype.addClass = function(classToAdd){
vjs.addClass(this.el_, classToAdd);
return this;
};
/**
* Remove a CSS class name from the component's element
*
* @param {String} classToRemove Classname to remove
* @return {vjs.Component}
*/
vjs.Component.prototype.removeClass = function(classToRemove){
vjs.removeClass(this.el_, classToRemove);
return this;
};
/**
* Show the component element if hidden
*
* @return {vjs.Component}
*/
vjs.Component.prototype.show = function(){
this.el_.style.display = 'block';
return this;
};
/**
* Hide the component element if currently showing
*
* @return {vjs.Component}
*/
vjs.Component.prototype.hide = function(){
this.el_.style.display = 'none';
return this;
};
/**
* Lock an item in its visible state
* To be used with fadeIn/fadeOut.
*
* @return {vjs.Component}
* @private
*/
vjs.Component.prototype.lockShowing = function(){
this.addClass('vjs-lock-showing');
return this;
};
/**
* Unlock an item to be hidden
* To be used with fadeIn/fadeOut.
*
* @return {vjs.Component}
* @private
*/
vjs.Component.prototype.unlockShowing = function(){
this.removeClass('vjs-lock-showing');
return this;
};
/**
* Disable component by making it unshowable
*
* Currently private because we're movign towards more css-based states.
* @private
*/
vjs.Component.prototype.disable = function(){
this.hide();
this.show = function(){};
};
/**
* Set or get the width of the component (CSS values)
*
* Setting the video tag dimension values only works with values in pixels.
* Percent values will not work.
* Some percents can be used, but width()/height() will return the number + %,
* not the actual computed width/height.
*
* @param {Number|String=} num Optional width number
* @param {Boolean} skipListeners Skip the 'resize' event trigger
* @return {vjs.Component} This component, when setting the width
* @return {Number|String} The width, when getting
*/
vjs.Component.prototype.width = function(num, skipListeners){
return this.dimension('width', num, skipListeners);
};
/**
* Get or set the height of the component (CSS values)
*
* Setting the video tag dimension values only works with values in pixels.
* Percent values will not work.
* Some percents can be used, but width()/height() will return the number + %,
* not the actual computed width/height.
*
* @param {Number|String=} num New component height
* @param {Boolean=} skipListeners Skip the resize event trigger
* @return {vjs.Component} This component, when setting the height
* @return {Number|String} The height, when getting
*/
vjs.Component.prototype.height = function(num, skipListeners){
return this.dimension('height', num, skipListeners);
};
/**
* Set both width and height at the same time
*
* @param {Number|String} width
* @param {Number|String} height
* @return {vjs.Component} The component
*/
vjs.Component.prototype.dimensions = function(width, height){
// Skip resize listeners on width for optimization
return this.width(width, true).height(height);
};
/**
* Get or set width or height
*
* This is the shared code for the width() and height() methods.
* All for an integer, integer + 'px' or integer + '%';
*
* Known issue: Hidden elements officially have a width of 0. We're defaulting
* to the style.width value and falling back to computedStyle which has the
* hidden element issue. Info, but probably not an efficient fix:
* http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/
*
* @param {String} widthOrHeight 'width' or 'height'
* @param {Number|String=} num New dimension
* @param {Boolean=} skipListeners Skip resize event trigger
* @return {vjs.Component} The component if a dimension was set
* @return {Number|String} The dimension if nothing was set
* @private
*/
vjs.Component.prototype.dimension = function(widthOrHeight, num, skipListeners){
if (num !== undefined) {
// Check if using css width/height (% or px) and adjust
if ((''+num).indexOf('%') !== -1 || (''+num).indexOf('px') !== -1) {
this.el_.style[widthOrHeight] = num;
} else if (num === 'auto') {
this.el_.style[widthOrHeight] = '';
} else {
this.el_.style[widthOrHeight] = num+'px';
}
// skipListeners allows us to avoid triggering the resize event when setting both width and height
if (!skipListeners) { this.trigger('resize'); }
// Return component
return this;
}
// Not setting a value, so getting it
// Make sure element exists
if (!this.el_) return 0;
// Get dimension value from style
var val = this.el_.style[widthOrHeight];
var pxIndex = val.indexOf('px');
if (pxIndex !== -1) {
// Return the pixel value with no 'px'
return parseInt(val.slice(0,pxIndex), 10);
// No px so using % or no style was set, so falling back to offsetWidth/height
// If component has display:none, offset will return 0
// TODO: handle display:none and no dimension style using px
} else {
return parseInt(this.el_['offset'+vjs.capitalize(widthOrHeight)], 10);
// ComputedStyle version.
// Only difference is if the element is hidden it will return
// the percent value (e.g. '100%'')
// instead of zero like offsetWidth returns.
// var val = vjs.getComputedStyleValue(this.el_, widthOrHeight);
// var pxIndex = val.indexOf('px');
// if (pxIndex !== -1) {
// return val.slice(0, pxIndex);
// } else {
// return val;
// }
}
};
/**
* Fired when the width and/or height of the component changes
* @event resize
*/
vjs.Component.prototype.onResize;
/**
* Emit 'tap' events when touch events are supported
*
* This is used to support toggling the controls through a tap on the video.
*
* We're requireing them to be enabled because otherwise every component would
* have this extra overhead unnecessarily, on mobile devices where extra
* overhead is especially bad.
* @private
*/
vjs.Component.prototype.emitTapEvents = function(){
var touchStart, touchTime, couldBeTap, noTap;
// Track the start time so we can determine how long the touch lasted
touchStart = 0;
this.on('touchstart', function(event) {
// Record start time so we can detect a tap vs. "touch and hold"
touchStart = new Date().getTime();
// Reset couldBeTap tracking
couldBeTap = true;
});
noTap = function(){
couldBeTap = false;
};
// TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s
this.on('touchmove', noTap);
this.on('touchleave', noTap);
this.on('touchcancel', noTap);
// When the touch ends, measure how long it took and trigger the appropriate
// event
this.on('touchend', function(event) {
// Proceed only if the touchmove/leave/cancel event didn't happen
if (couldBeTap === true) {
// Measure how long the touch lasted
touchTime = new Date().getTime() - touchStart;
// The touch needs to be quick in order to consider it a tap
if (touchTime < 250) {
this.trigger('tap');
// It may be good to copy the touchend event object and change the
// type to tap, if the other event properties aren't exact after
// vjs.fixEvent runs (e.g. event.target)
}
}
});
};
/**
* Report user touch activity when touch events occur
*
* User activity is used to determine when controls should show/hide. It's
* relatively simple when it comes to mouse events, because any mouse event
* should show the controls. So we capture mouse events that bubble up to the
* player and report activity when that happens.
*
* With touch events it isn't as easy. We can't rely on touch events at the
* player level, because a tap (touchstart + touchend) on the video itself on
* mobile devices is meant to turn controls off (and on). User activity is
* checked asynchronously, so what could happen is a tap event on the video
* turns the controls off, then the touchend event bubbles up to the player,
* which if it reported user activity, would turn the controls right back on.
* (We also don't want to completely block touch events from bubbling up)
*
* Also a touchmove, touch+hold, and anything other than a tap is not supposed
* to turn the controls back on on a mobile device.
*
* Here we're setting the default component behavior to report user activity
* whenever touch events happen, and this can be turned off by components that
* want touch events to act differently.
*/
vjs.Component.prototype.enableTouchActivity = function() {
var report, touchHolding, touchEnd;
// listener for reporting that the user is active
report = vjs.bind(this.player(), this.player().reportUserActivity);
this.on('touchstart', function() {
report();
// For as long as the they are touching the device or have their mouse down,
// we consider them active even if they're not moving their finger or mouse.
// So we want to continue to update that they are active
clearInterval(touchHolding);
// report at the same interval as activityCheck
touchHolding = setInterval(report, 250);
});
touchEnd = function(event) {
report();
// stop the interval that maintains activity if the touch is holding
clearInterval(touchHolding);
};
this.on('touchmove', report);
this.on('touchend', touchEnd);
this.on('touchcancel', touchEnd);
};
/* Button - Base class for all buttons
================================================================================ */
/**
* Base class for all buttons
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.Button = vjs.Component.extend({
/**
* @constructor
* @inheritDoc
*/
init: function(player, options){
vjs.Component.call(this, player, options);
var touchstart = false;
this.on('touchstart', function(event) {
// Stop click and other mouse events from triggering also
event.preventDefault();
touchstart = true;
});
this.on('touchmove', function() {
touchstart = false;
});
var self = this;
this.on('touchend', function(event) {
if (touchstart) {
self.onClick(event);
}
event.preventDefault();
});
this.on('click', this.onClick);
this.on('focus', this.onFocus);
this.on('blur', this.onBlur);
}
});
vjs.Button.prototype.createEl = function(type, props){
// Add standard Aria and Tabindex info
props = vjs.obj.merge({
className: this.buildCSSClass(),
innerHTML: '<div class="vjs-control-content"><span class="vjs-control-text">' + (this.buttonText || 'Need Text') + '</span></div>',
'role': 'button',
'aria-live': 'polite', // let the screen reader user know that the text of the button may change
tabIndex: 0
}, props);
return vjs.Component.prototype.createEl.call(this, type, props);
};
vjs.Button.prototype.buildCSSClass = function(){
// TODO: Change vjs-control to vjs-button?
return 'vjs-control ' + vjs.Component.prototype.buildCSSClass.call(this);
};
// Click - Override with specific functionality for button
vjs.Button.prototype.onClick = function(){};
// Focus - Add keyboard functionality to element
vjs.Button.prototype.onFocus = function(){
vjs.on(document, 'keyup', vjs.bind(this, this.onKeyPress));
};
// KeyPress (document level) - Trigger click when keys are pressed
vjs.Button.prototype.onKeyPress = function(event){
// Check for space bar (32) or enter (13) keys
if (event.which == 32 || event.which == 13) {
event.preventDefault();
this.onClick();
}
};
// Blur - Remove keyboard triggers
vjs.Button.prototype.onBlur = function(){
vjs.off(document, 'keyup', vjs.bind(this, this.onKeyPress));
};
/* Slider
================================================================================ */
/**
* The base functionality for sliders like the volume bar and seek bar
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.Slider = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
// Set property names to bar and handle to match with the child Slider class is looking for
this.bar = this.getChild(this.options_['barName']);
this.handle = this.getChild(this.options_['handleName']);
player.on(this.playerEvent, vjs.bind(this, this.update));
this.on('mousedown', this.onMouseDown);
this.on('touchstart', this.onMouseDown);
this.on('focus', this.onFocus);
this.on('blur', this.onBlur);
this.on('click', this.onClick);
this.player_.on('controlsvisible', vjs.bind(this, this.update));
// This is actually to fix the volume handle position. http://twitter.com/#!/gerritvanaaken/status/159046254519787520
// this.player_.one('timeupdate', vjs.bind(this, this.update));
player.ready(vjs.bind(this, this.update));
this.boundEvents = {};
}
});
vjs.Slider.prototype.createEl = function(type, props) {
props = props || {};
// Add the slider element class to all sub classes
props.className = props.className + ' vjs-slider';
props = vjs.obj.merge({
'role': 'slider',
'aria-valuenow': 0,
'aria-valuemin': 0,
'aria-valuemax': 100,
tabIndex: 0
}, props);
return vjs.Component.prototype.createEl.call(this, type, props);
};
vjs.Slider.prototype.onMouseDown = function(event){
event.preventDefault();
vjs.blockTextSelection();
this.boundEvents.move = vjs.bind(this, this.onMouseMove);
this.boundEvents.end = vjs.bind(this, this.onMouseUp);
vjs.on(document, 'mousemove', this.boundEvents.move);
vjs.on(document, 'mouseup', this.boundEvents.end);
vjs.on(document, 'touchmove', this.boundEvents.move);
vjs.on(document, 'touchend', this.boundEvents.end);
this.onMouseMove(event);
};
vjs.Slider.prototype.onMouseUp = function() {
vjs.unblockTextSelection();
vjs.off(document, 'mousemove', this.boundEvents.move, false);
vjs.off(document, 'mouseup', this.boundEvents.end, false);
vjs.off(document, 'touchmove', this.boundEvents.move, false);
vjs.off(document, 'touchend', this.boundEvents.end, false);
this.update();
};
vjs.Slider.prototype.update = function(){
// In VolumeBar init we have a setTimeout for update that pops and update to the end of the
// execution stack. The player is destroyed before then update will cause an error
if (!this.el_) return;
// If scrubbing, we could use a cached value to make the handle keep up with the user's mouse.
// On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.
// var progress = (this.player_.scrubbing) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration();
var barProgress,
progress = this.getPercent(),
handle = this.handle,
bar = this.bar;
// Protect against no duration and other division issues
if (isNaN(progress)) { progress = 0; }
barProgress = progress;
// If there is a handle, we need to account for the handle in our calculation for progress bar
// so that it doesn't fall short of or extend past the handle.
if (handle) {
var box = this.el_,
boxWidth = box.offsetWidth,
handleWidth = handle.el().offsetWidth,
// The width of the handle in percent of the containing box
// In IE, widths may not be ready yet causing NaN
handlePercent = (handleWidth) ? handleWidth / boxWidth : 0,
// Get the adjusted size of the box, considering that the handle's center never touches the left or right side.
// There is a margin of half the handle's width on both sides.
boxAdjustedPercent = 1 - handlePercent,
// Adjust the progress that we'll use to set widths to the new adjusted box width
adjustedProgress = progress * boxAdjustedPercent;
// The bar does reach the left side, so we need to account for this in the bar's width
barProgress = adjustedProgress + (handlePercent / 2);
// Move the handle from the left based on the adjected progress
handle.el().style.left = vjs.round(adjustedProgress * 100, 2) + '%';
}
// Set the new bar width
bar.el().style.width = vjs.round(barProgress * 100, 2) + '%';
};
vjs.Slider.prototype.calculateDistance = function(event){
var el, box, boxX, boxY, boxW, boxH, handle, pageX, pageY;
el = this.el_;
box = vjs.findPosition(el);
boxW = boxH = el.offsetWidth;
handle = this.handle;
if (this.options_.vertical) {
boxY = box.top;
if (event.changedTouches) {
pageY = event.changedTouches[0].pageY;
} else {
pageY = event.pageY;
}
if (handle) {
var handleH = handle.el().offsetHeight;
// Adjusted X and Width, so handle doesn't go outside the bar
boxY = boxY + (handleH / 2);
boxH = boxH - handleH;
}
// Percent that the click is through the adjusted area
return Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));
} else {
boxX = box.left;
if (event.changedTouches) {
pageX = event.changedTouches[0].pageX;
} else {
pageX = event.pageX;
}
if (handle) {
var handleW = handle.el().offsetWidth;
// Adjusted X and Width, so handle doesn't go outside the bar
boxX = boxX + (handleW / 2);
boxW = boxW - handleW;
}
// Percent that the click is through the adjusted area
return Math.max(0, Math.min(1, (pageX - boxX) / boxW));
}
};
vjs.Slider.prototype.onFocus = function(){
vjs.on(document, 'keyup', vjs.bind(this, this.onKeyPress));
};
vjs.Slider.prototype.onKeyPress = function(event){
if (event.which == 37) { // Left Arrow
event.preventDefault();
this.stepBack();
} else if (event.which == 39) { // Right Arrow
event.preventDefault();
this.stepForward();
}
};
vjs.Slider.prototype.onBlur = function(){
vjs.off(document, 'keyup', vjs.bind(this, this.onKeyPress));
};
/**
* Listener for click events on slider, used to prevent clicks
* from bubbling up to parent elements like button menus.
* @param {Object} event Event object
*/
vjs.Slider.prototype.onClick = function(event){
event.stopImmediatePropagation();
event.preventDefault();
};
/**
* SeekBar Behavior includes play progress bar, and seek handle
* Needed so it can determine seek position based on handle position/size
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.SliderHandle = vjs.Component.extend();
/**
* Default value of the slider
*
* @type {Number}
* @private
*/
vjs.SliderHandle.prototype.defaultValue = 0;
/** @inheritDoc */
vjs.SliderHandle.prototype.createEl = function(type, props) {
props = props || {};
// Add the slider element class to all sub classes
props.className = props.className + ' vjs-slider-handle';
props = vjs.obj.merge({
innerHTML: '<span class="vjs-control-text">'+this.defaultValue+'</span>'
}, props);
return vjs.Component.prototype.createEl.call(this, 'div', props);
};
/* Menu
================================================================================ */
/**
* The Menu component is used to build pop up menus, including subtitle and
* captions selection menus.
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.Menu = vjs.Component.extend();
/**
* Add a menu item to the menu
* @param {Object|String} component Component or component type to add
*/
vjs.Menu.prototype.addItem = function(component){
this.addChild(component);
component.on('click', vjs.bind(this, function(){
this.unlockShowing();
}));
};
/** @inheritDoc */
vjs.Menu.prototype.createEl = function(){
var contentElType = this.options().contentElType || 'ul';
this.contentEl_ = vjs.createEl(contentElType, {
className: 'vjs-menu-content'
});
var el = vjs.Component.prototype.createEl.call(this, 'div', {
append: this.contentEl_,
className: 'vjs-menu'
});
el.appendChild(this.contentEl_);
// Prevent clicks from bubbling up. Needed for Menu Buttons,
// where a click on the parent is significant
vjs.on(el, 'click', function(event){
event.preventDefault();
event.stopImmediatePropagation();
});
return el;
};
/**
* The component for a menu item. `<li>`
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.MenuItem = vjs.Button.extend({
/** @constructor */
init: function(player, options){
vjs.Button.call(this, player, options);
this.selected(options['selected']);
}
});
/** @inheritDoc */
vjs.MenuItem.prototype.createEl = function(type, props){
return vjs.Button.prototype.createEl.call(this, 'li', vjs.obj.merge({
className: 'vjs-menu-item',
innerHTML: this.options_['label']
}, props));
};
/**
* Handle a click on the menu item, and set it to selected
*/
vjs.MenuItem.prototype.onClick = function(){
this.selected(true);
};
/**
* Set this menu item as selected or not
* @param {Boolean} selected
*/
vjs.MenuItem.prototype.selected = function(selected){
if (selected) {
this.addClass('vjs-selected');
this.el_.setAttribute('aria-selected',true);
} else {
this.removeClass('vjs-selected');
this.el_.setAttribute('aria-selected',false);
}
};
/**
* A button class with a popup menu
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.MenuButton = vjs.Button.extend({
/** @constructor */
init: function(player, options){
vjs.Button.call(this, player, options);
this.menu = this.createMenu();
// Add list to element
this.addChild(this.menu);
// Automatically hide empty menu buttons
if (this.items && this.items.length === 0) {
this.hide();
}
this.on('keyup', this.onKeyPress);
this.el_.setAttribute('aria-haspopup', true);
this.el_.setAttribute('role', 'button');
}
});
/**
* Track the state of the menu button
* @type {Boolean}
* @private
*/
vjs.MenuButton.prototype.buttonPressed_ = false;
vjs.MenuButton.prototype.createMenu = function(){
var menu = new vjs.Menu(this.player_);
// Add a title list item to the top
if (this.options().title) {
menu.el().appendChild(vjs.createEl('li', {
className: 'vjs-menu-title',
innerHTML: vjs.capitalize(this.kind_),
tabindex: -1
}));
}
this.items = this['createItems']();
if (this.items) {
// Add menu items to the menu
for (var i = 0; i < this.items.length; i++) {
menu.addItem(this.items[i]);
}
}
return menu;
};
/**
* Create the list of menu items. Specific to each subclass.
*/
vjs.MenuButton.prototype.createItems = function(){};
/** @inheritDoc */
vjs.MenuButton.prototype.buildCSSClass = function(){
return this.className + ' vjs-menu-button ' + vjs.Button.prototype.buildCSSClass.call(this);
};
// Focus - Add keyboard functionality to element
// This function is not needed anymore. Instead, the keyboard functionality is handled by
// treating the button as triggering a submenu. When the button is pressed, the submenu
// appears. Pressing the button again makes the submenu disappear.
vjs.MenuButton.prototype.onFocus = function(){};
// Can't turn off list display that we turned on with focus, because list would go away.
vjs.MenuButton.prototype.onBlur = function(){};
vjs.MenuButton.prototype.onClick = function(){
// When you click the button it adds focus, which will show the menu indefinitely.
// So we'll remove focus when the mouse leaves the button.
// Focus is needed for tab navigation.
this.one('mouseout', vjs.bind(this, function(){
this.menu.unlockShowing();
this.el_.blur();
}));
if (this.buttonPressed_){
this.unpressButton();
} else {
this.pressButton();
}
};
vjs.MenuButton.prototype.onKeyPress = function(event){
event.preventDefault();
// Check for space bar (32) or enter (13) keys
if (event.which == 32 || event.which == 13) {
if (this.buttonPressed_){
this.unpressButton();
} else {
this.pressButton();
}
// Check for escape (27) key
} else if (event.which == 27){
if (this.buttonPressed_){
this.unpressButton();
}
}
};
vjs.MenuButton.prototype.pressButton = function(){
this.buttonPressed_ = true;
this.menu.lockShowing();
this.el_.setAttribute('aria-pressed', true);
if (this.items && this.items.length > 0) {
this.items[0].el().focus(); // set the focus to the title of the submenu
}
};
vjs.MenuButton.prototype.unpressButton = function(){
this.buttonPressed_ = false;
this.menu.unlockShowing();
this.el_.setAttribute('aria-pressed', false);
};
/**
* An instance of the `vjs.Player` class is created when any of the Video.js setup methods are used to initialize a video.
*
* ```js
* var myPlayer = videojs('example_video_1');
* ```
*
* In the follwing example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.
*
* ```html
* <video id="example_video_1" data-setup='{}' controls>
* <source src="my-source.mp4" type="video/mp4">
* </video>
* ```
*
* After an instance has been created it can be accessed globally using `Video('example_video_1')`.
*
* @class
* @extends vjs.Component
*/
vjs.Player = vjs.Component.extend({
/**
* player's constructor function
*
* @constructs
* @method init
* @param {Element} tag The original video tag used for configuring options
* @param {Object=} options Player options
* @param {Function=} ready Ready callback function
*/
init: function(tag, options, ready){
this.tag = tag; // Store the original tag used to set options
// Make sure tag ID exists
tag.id = tag.id || 'vjs_video_' + vjs.guid++;
// Set Options
// The options argument overrides options set in the video tag
// which overrides globally set options.
// This latter part coincides with the load order
// (tag must exist before Player)
options = vjs.obj.merge(this.getTagSettings(tag), options);
// Cache for video property values.
this.cache_ = {};
// Set poster
this.poster_ = options['poster'];
// Set controls
this.controls_ = options['controls'];
// Original tag settings stored in options
// now remove immediately so native controls don't flash.
// May be turned back on by HTML5 tech if nativeControlsForTouch is true
tag.controls = false;
// we don't want the player to report touch activity on itself
// see enableTouchActivity in Component
options.reportTouchActivity = false;
// Run base component initializing with new options.
// Builds the element through createEl()
// Inits and embeds any child components in opts
vjs.Component.call(this, this, options, ready);
// Update controls className. Can't do this when the controls are initially
// set because the element doesn't exist yet.
if (this.controls()) {
this.addClass('vjs-controls-enabled');
} else {
this.addClass('vjs-controls-disabled');
}
// TODO: Make this smarter. Toggle user state between touching/mousing
// using events, since devices can have both touch and mouse events.
// if (vjs.TOUCH_ENABLED) {
// this.addClass('vjs-touch-enabled');
// }
// Firstplay event implimentation. Not sold on the event yet.
// Could probably just check currentTime==0?
this.one('play', function(e){
var fpEvent = { type: 'firstplay', target: this.el_ };
// Using vjs.trigger so we can check if default was prevented
var keepGoing = vjs.trigger(this.el_, fpEvent);
if (!keepGoing) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
}
});
this.on('ended', this.onEnded);
this.on('play', this.onPlay);
this.on('firstplay', this.onFirstPlay);
this.on('pause', this.onPause);
this.on('progress', this.onProgress);
this.on('durationchange', this.onDurationChange);
this.on('error', this.onError);
this.on('fullscreenchange', this.onFullscreenChange);
// Make player easily findable by ID
vjs.players[this.id_] = this;
if (options['plugins']) {
vjs.obj.each(options['plugins'], function(key, val){
this[key](val);
}, this);
}
this.listenForUserActivity();
}
});
/**
* Player instance options, surfaced using vjs.options
* vjs.options = vjs.Player.prototype.options_
* Make changes in vjs.options, not here.
* All options should use string keys so they avoid
* renaming by closure compiler
* @type {Object}
* @private
*/
vjs.Player.prototype.options_ = vjs.options;
/**
* Destroys the video player and does any necessary cleanup
*
* myPlayer.dispose();
*
* This is especially helpful if you are dynamically adding and removing videos
* to/from the DOM.
*/
vjs.Player.prototype.dispose = function(){
this.trigger('dispose');
// prevent dispose from being called twice
this.off('dispose');
// Kill reference to this player
vjs.players[this.id_] = null;
if (this.tag && this.tag['player']) { this.tag['player'] = null; }
if (this.el_ && this.el_['player']) { this.el_['player'] = null; }
// Ensure that tracking progress and time progress will stop and plater deleted
this.stopTrackingProgress();
this.stopTrackingCurrentTime();
if (this.tech) { this.tech.dispose(); }
// Component dispose
vjs.Component.prototype.dispose.call(this);
};
vjs.Player.prototype.getTagSettings = function(tag){
var options = {
'sources': [],
'tracks': []
};
vjs.obj.merge(options, vjs.getAttributeValues(tag));
// Get tag children settings
if (tag.hasChildNodes()) {
var children, child, childName, i, j;
children = tag.childNodes;
for (i=0,j=children.length; i<j; i++) {
child = children[i];
// Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/
childName = child.nodeName.toLowerCase();
if (childName === 'source') {
options['sources'].push(vjs.getAttributeValues(child));
} else if (childName === 'track') {
options['tracks'].push(vjs.getAttributeValues(child));
}
}
}
return options;
};
vjs.Player.prototype.createEl = function(){
var el = this.el_ = vjs.Component.prototype.createEl.call(this, 'div');
var tag = this.tag;
// Remove width/height attrs from tag so CSS can make it 100% width/height
tag.removeAttribute('width');
tag.removeAttribute('height');
// Empty video tag tracks so the built-in player doesn't use them also.
// This may not be fast enough to stop HTML5 browsers from reading the tags
// so we'll need to turn off any default tracks if we're manually doing
// captions and subtitles. videoElement.textTracks
if (tag.hasChildNodes()) {
var nodes, nodesLength, i, node, nodeName, removeNodes;
nodes = tag.childNodes;
nodesLength = nodes.length;
removeNodes = [];
while (nodesLength--) {
node = nodes[nodesLength];
nodeName = node.nodeName.toLowerCase();
if (nodeName === 'track') {
removeNodes.push(node);
}
}
for (i=0; i<removeNodes.length; i++) {
tag.removeChild(removeNodes[i]);
}
}
// Give video tag ID and class to player div
// ID will now reference player box, not the video tag
el.id = tag.id;
el.className = tag.className;
// Update tag id/class for use as HTML5 playback tech
// Might think we should do this after embedding in container so .vjs-tech class
// doesn't flash 100% width/height, but class only applies with .video-js parent
tag.id += '_html5_api';
tag.className = 'vjs-tech';
// Make player findable on elements
tag['player'] = el['player'] = this;
// Default state of video is paused
this.addClass('vjs-paused');
// Make box use width/height of tag, or rely on default implementation
// Enforce with CSS since width/height attrs don't work on divs
this.width(this.options_['width'], true); // (true) Skip resize listener on load
this.height(this.options_['height'], true);
// Wrap video tag in div (el/box) container
if (tag.parentNode) {
tag.parentNode.insertBefore(el, tag);
}
vjs.insertFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.
return el;
};
// /* Media Technology (tech)
// ================================================================================ */
// Load/Create an instance of playback technlogy including element and API methods
// And append playback element in player div.
vjs.Player.prototype.loadTech = function(techName, source){
// Pause and remove current playback technology
if (this.tech) {
this.unloadTech();
}
// get rid of the HTML5 video tag as soon as we are using another tech
if (techName !== 'Html5' && this.tag) {
vjs.Html5.disposeMediaElement(this.tag);
this.tag = null;
}
this.techName = techName;
// Turn off API access because we're loading a new tech that might load asynchronously
this.isReady_ = false;
var techReady = function(){
this.player_.triggerReady();
// Manually track progress in cases where the browser/flash player doesn't report it.
if (!this.features['progressEvents']) {
this.player_.manualProgressOn();
}
// Manually track timeudpates in cases where the browser/flash player doesn't report it.
if (!this.features['timeupdateEvents']) {
this.player_.manualTimeUpdatesOn();
}
};
// Grab tech-specific options from player options and add source and parent element to use.
var techOptions = vjs.obj.merge({ 'source': source, 'parentEl': this.el_ }, this.options_[techName.toLowerCase()]);
if (source) {
if (source.src == this.cache_.src && this.cache_.currentTime > 0) {
techOptions['startTime'] = this.cache_.currentTime;
}
this.cache_.src = source.src;
}
// Initialize tech instance
this.tech = new window['videojs'][techName](this, techOptions);
this.tech.ready(techReady);
};
vjs.Player.prototype.unloadTech = function(){
this.isReady_ = false;
this.tech.dispose();
// Turn off any manual progress or timeupdate tracking
if (this.manualProgress) { this.manualProgressOff(); }
if (this.manualTimeUpdates) { this.manualTimeUpdatesOff(); }
this.tech = false;
};
// There's many issues around changing the size of a Flash (or other plugin) object.
// First is a plugin reload issue in Firefox that has been around for 11 years: https://bugzilla.mozilla.org/show_bug.cgi?id=90268
// Then with the new fullscreen API, Mozilla and webkit browsers will reload the flash object after going to fullscreen.
// To get around this, we're unloading the tech, caching source and currentTime values, and reloading the tech once the plugin is resized.
// reloadTech: function(betweenFn){
// vjs.log('unloadingTech')
// this.unloadTech();
// vjs.log('unloadedTech')
// if (betweenFn) { betweenFn.call(); }
// vjs.log('LoadingTech')
// this.loadTech(this.techName, { src: this.cache_.src })
// vjs.log('loadedTech')
// },
/* Fallbacks for unsupported event types
================================================================================ */
// Manually trigger progress events based on changes to the buffered amount
// Many flash players and older HTML5 browsers don't send progress or progress-like events
vjs.Player.prototype.manualProgressOn = function(){
this.manualProgress = true;
// Trigger progress watching when a source begins loading
this.trackProgress();
// Watch for a native progress event call on the tech element
// In HTML5, some older versions don't support the progress event
// So we're assuming they don't, and turning off manual progress if they do.
// As opposed to doing user agent detection
this.tech.one('progress', function(){
// Update known progress support for this playback technology
this.features['progressEvents'] = true;
// Turn off manual progress tracking
this.player_.manualProgressOff();
});
};
vjs.Player.prototype.manualProgressOff = function(){
this.manualProgress = false;
this.stopTrackingProgress();
};
vjs.Player.prototype.trackProgress = function(){
this.progressInterval = setInterval(vjs.bind(this, function(){
// Don't trigger unless buffered amount is greater than last time
// log(this.cache_.bufferEnd, this.buffered().end(0), this.duration())
/* TODO: update for multiple buffered regions */
if (this.cache_.bufferEnd < this.buffered().end(0)) {
this.trigger('progress');
} else if (this.bufferedPercent() == 1) {
this.stopTrackingProgress();
this.trigger('progress'); // Last update
}
}), 500);
};
vjs.Player.prototype.stopTrackingProgress = function(){ clearInterval(this.progressInterval); };
/*! Time Tracking -------------------------------------------------------------- */
vjs.Player.prototype.manualTimeUpdatesOn = function(){
this.manualTimeUpdates = true;
this.on('play', this.trackCurrentTime);
this.on('pause', this.stopTrackingCurrentTime);
// timeupdate is also called by .currentTime whenever current time is set
// Watch for native timeupdate event
this.tech.one('timeupdate', function(){
// Update known progress support for this playback technology
this.features['timeupdateEvents'] = true;
// Turn off manual progress tracking
this.player_.manualTimeUpdatesOff();
});
};
vjs.Player.prototype.manualTimeUpdatesOff = function(){
this.manualTimeUpdates = false;
this.stopTrackingCurrentTime();
this.off('play', this.trackCurrentTime);
this.off('pause', this.stopTrackingCurrentTime);
};
vjs.Player.prototype.trackCurrentTime = function(){
if (this.currentTimeInterval) { this.stopTrackingCurrentTime(); }
this.currentTimeInterval = setInterval(vjs.bind(this, function(){
this.trigger('timeupdate');
}), 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15
};
// Turn off play progress tracking (when paused or dragging)
vjs.Player.prototype.stopTrackingCurrentTime = function(){ clearInterval(this.currentTimeInterval); };
// /* Player event handlers (how the player reacts to certain events)
// ================================================================================ */
/**
* Fired when the user agent begins looking for media data
* @event loadstart
*/
vjs.Player.prototype.onLoadStart;
/**
* Fired when the player has initial duration and dimension information
* @event loadedmetadata
*/
vjs.Player.prototype.onLoadedMetaData;
/**
* Fired when the player has downloaded data at the current playback position
* @event loadeddata
*/
vjs.Player.prototype.onLoadedData;
/**
* Fired when the player has finished downloading the source data
* @event loadedalldata
*/
vjs.Player.prototype.onLoadedAllData;
/**
* Fired whenever the media begins or resumes playback
* @event play
*/
vjs.Player.prototype.onPlay = function(){
vjs.removeClass(this.el_, 'vjs-paused');
vjs.addClass(this.el_, 'vjs-playing');
};
/**
* Fired the first time a video is played
*
* Not part of the HLS spec, and we're not sure if this is the best
* implementation yet, so use sparingly. If you don't have a reason to
* prevent playback, use `myPlayer.one('play');` instead.
*
* @event firstplay
*/
vjs.Player.prototype.onFirstPlay = function(){
//If the first starttime attribute is specified
//then we will start at the given offset in seconds
if(this.options_['starttime']){
this.currentTime(this.options_['starttime']);
}
this.addClass('vjs-has-started');
};
/**
* Fired whenever the media has been paused
* @event pause
*/
vjs.Player.prototype.onPause = function(){
vjs.removeClass(this.el_, 'vjs-playing');
vjs.addClass(this.el_, 'vjs-paused');
};
/**
* Fired when the current playback position has changed
*
* During playback this is fired every 15-250 milliseconds, depnding on the
* playback technology in use.
* @event timeupdate
*/
vjs.Player.prototype.onTimeUpdate;
/**
* Fired while the user agent is downloading media data
* @event progress
*/
vjs.Player.prototype.onProgress = function(){
// Add custom event for when source is finished downloading.
if (this.bufferedPercent() == 1) {
this.trigger('loadedalldata');
}
};
/**
* Fired when the end of the media resource is reached (currentTime == duration)
* @event ended
*/
vjs.Player.prototype.onEnded = function(){
if (this.options_['loop']) {
this.currentTime(0);
this.play();
}
};
/**
* Fired when the duration of the media resource is first known or changed
* @event durationchange
*/
vjs.Player.prototype.onDurationChange = function(){
// Allows for cacheing value instead of asking player each time.
// We need to get the techGet response and check for a value so we don't
// accidentally cause the stack to blow up.
var duration = this.techGet('duration');
if (duration) {
this.duration(duration);
}
};
/**
* Fired when the volume changes
* @event volumechange
*/
vjs.Player.prototype.onVolumeChange;
/**
* Fired when the player switches in or out of fullscreen mode
* @event fullscreenchange
*/
vjs.Player.prototype.onFullscreenChange = function() {
if (this.isFullScreen()) {
this.addClass('vjs-fullscreen');
} else {
this.removeClass('vjs-fullscreen');
}
};
/**
* Fired when there is an error in playback
* @event error
*/
vjs.Player.prototype.onError = function(e) {
vjs.log('Video Error', e);
};
// /* Player API
// ================================================================================ */
/**
* Object for cached values.
* @private
*/
vjs.Player.prototype.cache_;
vjs.Player.prototype.getCache = function(){
return this.cache_;
};
// Pass values to the playback tech
vjs.Player.prototype.techCall = function(method, arg){
// If it's not ready yet, call method when it is
if (this.tech && !this.tech.isReady_) {
this.tech.ready(function(){
this[method](arg);
});
// Otherwise call method now
} else {
try {
this.tech[method](arg);
} catch(e) {
vjs.log(e);
throw e;
}
}
};
// Get calls can't wait for the tech, and sometimes don't need to.
vjs.Player.prototype.techGet = function(method){
if (this.tech && this.tech.isReady_) {
// Flash likes to die and reload when you hide or reposition it.
// In these cases the object methods go away and we get errors.
// When that happens we'll catch the errors and inform tech that it's not ready any more.
try {
return this.tech[method]();
} catch(e) {
// When building additional tech libs, an expected method may not be defined yet
if (this.tech[method] === undefined) {
vjs.log('Video.js: ' + method + ' method not defined for '+this.techName+' playback technology.', e);
} else {
// When a method isn't available on the object it throws a TypeError
if (e.name == 'TypeError') {
vjs.log('Video.js: ' + method + ' unavailable on '+this.techName+' playback technology element.', e);
this.tech.isReady_ = false;
} else {
vjs.log(e);
}
}
throw e;
}
}
return;
};
/**
* start media playback
*
* myPlayer.play();
*
* @return {vjs.Player} self
*/
vjs.Player.prototype.play = function(){
this.techCall('play');
return this;
};
/**
* Pause the video playback
*
* myPlayer.pause();
*
* @return {vjs.Player} self
*/
vjs.Player.prototype.pause = function(){
this.techCall('pause');
return this;
};
/**
* Check if the player is paused
*
* var isPaused = myPlayer.paused();
* var isPlaying = !myPlayer.paused();
*
* @return {Boolean} false if the media is currently playing, or true otherwise
*/
vjs.Player.prototype.paused = function(){
// The initial state of paused should be true (in Safari it's actually false)
return (this.techGet('paused') === false) ? false : true;
};
/**
* Get or set the current time (in seconds)
*
* // get
* var whereYouAt = myPlayer.currentTime();
*
* // set
* myPlayer.currentTime(120); // 2 minutes into the video
*
* @param {Number|String=} seconds The time to seek to
* @return {Number} The time in seconds, when not setting
* @return {vjs.Player} self, when the current time is set
*/
vjs.Player.prototype.currentTime = function(seconds){
if (seconds !== undefined) {
this.techCall('setCurrentTime', seconds);
// improve the accuracy of manual timeupdates
if (this.manualTimeUpdates) { this.trigger('timeupdate'); }
return this;
}
// cache last currentTime and return. default to 0 seconds
//
// Caching the currentTime is meant to prevent a massive amount of reads on the tech's
// currentTime when scrubbing, but may not provide much performace benefit afterall.
// Should be tested. Also something has to read the actual current time or the cache will
// never get updated.
return this.cache_.currentTime = (this.techGet('currentTime') || 0);
};
/**
* Get the length in time of the video in seconds
*
* var lengthOfVideo = myPlayer.duration();
*
* **NOTE**: The video must have started loading before the duration can be
* known, and in the case of Flash, may not be known until the video starts
* playing.
*
* @return {Number} The duration of the video in seconds
*/
vjs.Player.prototype.duration = function(seconds){
if (seconds !== undefined) {
// cache the last set value for optimiized scrubbing (esp. Flash)
this.cache_.duration = parseFloat(seconds);
return this;
}
if (this.cache_.duration === undefined) {
this.onDurationChange();
}
return this.cache_.duration || 0;
};
// Calculates how much time is left. Not in spec, but useful.
vjs.Player.prototype.remainingTime = function(){
return this.duration() - this.currentTime();
};
// http://dev.w3.org/html5/spec/video.html#dom-media-buffered
// Buffered returns a timerange object.
// Kind of like an array of portions of the video that have been downloaded.
// So far no browsers return more than one range (portion)
/**
* Get a TimeRange object with the times of the video that have been downloaded
*
* If you just want the percent of the video that's been downloaded,
* use bufferedPercent.
*
* // Number of different ranges of time have been buffered. Usually 1.
* numberOfRanges = bufferedTimeRange.length,
*
* // Time in seconds when the first range starts. Usually 0.
* firstRangeStart = bufferedTimeRange.start(0),
*
* // Time in seconds when the first range ends
* firstRangeEnd = bufferedTimeRange.end(0),
*
* // Length in seconds of the first time range
* firstRangeLength = firstRangeEnd - firstRangeStart;
*
* @return {Object} A mock TimeRange object (following HTML spec)
*/
vjs.Player.prototype.buffered = function(){
var buffered = this.techGet('buffered'),
start = 0,
buflast = buffered.length - 1,
// Default end to 0 and store in values
end = this.cache_.bufferEnd = this.cache_.bufferEnd || 0;
if (buffered && buflast >= 0 && buffered.end(buflast) !== end) {
end = buffered.end(buflast);
// Storing values allows them be overridden by setBufferedFromProgress
this.cache_.bufferEnd = end;
}
return vjs.createTimeRange(start, end);
};
/**
* Get the percent (as a decimal) of the video that's been downloaded
*
* var howMuchIsDownloaded = myPlayer.bufferedPercent();
*
* 0 means none, 1 means all.
* (This method isn't in the HTML5 spec, but it's very convenient)
*
* @return {Number} A decimal between 0 and 1 representing the percent
*/
vjs.Player.prototype.bufferedPercent = function(){
return (this.duration()) ? this.buffered().end(0) / this.duration() : 0;
};
/**
* Get or set the current volume of the media
*
* // get
* var howLoudIsIt = myPlayer.volume();
*
* // set
* myPlayer.volume(0.5); // Set volume to half
*
* 0 is off (muted), 1.0 is all the way up, 0.5 is half way.
*
* @param {Number} percentAsDecimal The new volume as a decimal percent
* @return {Number} The current volume, when getting
* @return {vjs.Player} self, when setting
*/
vjs.Player.prototype.volume = function(percentAsDecimal){
var vol;
if (percentAsDecimal !== undefined) {
vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1
this.cache_.volume = vol;
this.techCall('setVolume', vol);
vjs.setLocalStorage('volume', vol);
return this;
}
// Default to 1 when returning current volume.
vol = parseFloat(this.techGet('volume'));
return (isNaN(vol)) ? 1 : vol;
};
/**
* Get the current muted state, or turn mute on or off
*
* // get
* var isVolumeMuted = myPlayer.muted();
*
* // set
* myPlayer.muted(true); // mute the volume
*
* @param {Boolean=} muted True to mute, false to unmute
* @return {Boolean} True if mute is on, false if not, when getting
* @return {vjs.Player} self, when setting mute
*/
vjs.Player.prototype.muted = function(muted){
if (muted !== undefined) {
this.techCall('setMuted', muted);
return this;
}
return this.techGet('muted') || false; // Default to false
};
// Check if current tech can support native fullscreen
// (e.g. with built in controls lik iOS, so not our flash swf)
vjs.Player.prototype.supportsFullScreen = function(){
return this.techGet('supportsFullScreen') || false;
};
/**
* is the player in fullscreen
* @type {Boolean}
* @private
*/
vjs.Player.prototype.isFullScreen_ = false;
/**
* Check if the player is in fullscreen mode
*
* // get
* var fullscreenOrNot = myPlayer.isFullScreen();
*
* // set
* myPlayer.isFullScreen(true); // tell the player it's in fullscreen
*
* NOTE: As of the latest HTML5 spec, isFullScreen is no longer an official
* property and instead document.fullscreenElement is used. But isFullScreen is
* still a valuable property for internal player workings.
*
* @param {Boolean=} isFS Update the player's fullscreen state
* @return {Boolean} true if fullscreen, false if not
* @return {vjs.Player} self, when setting
*/
vjs.Player.prototype.isFullScreen = function(isFS){
if (isFS !== undefined) {
this.isFullScreen_ = isFS;
return this;
}
return this.isFullScreen_;
};
/**
* Increase the size of the video to full screen
*
* myPlayer.requestFullScreen();
*
* In some browsers, full screen is not supported natively, so it enters
* "full window mode", where the video fills the browser window.
* In browsers and devices that support native full screen, sometimes the
* browser's default controls will be shown, and not the Video.js custom skin.
* This includes most mobile devices (iOS, Android) and older versions of
* Safari.
*
* @return {vjs.Player} self
*/
vjs.Player.prototype.requestFullScreen = function(){
var requestFullScreen = vjs.support.requestFullScreen;
this.isFullScreen(true);
if (requestFullScreen) {
// the browser supports going fullscreen at the element level so we can
// take the controls fullscreen as well as the video
// Trigger fullscreenchange event after change
// We have to specifically add this each time, and remove
// when cancelling fullscreen. Otherwise if there's multiple
// players on a page, they would all be reacting to the same fullscreen
// events
vjs.on(document, requestFullScreen.eventName, vjs.bind(this, function(e){
this.isFullScreen(document[requestFullScreen.isFullScreen]);
// If cancelling fullscreen, remove event listener.
if (this.isFullScreen() === false) {
vjs.off(document, requestFullScreen.eventName, arguments.callee);
}
this.trigger('fullscreenchange');
}));
this.el_[requestFullScreen.requestFn]();
} else if (this.tech.supportsFullScreen()) {
// we can't take the video.js controls fullscreen but we can go fullscreen
// with native controls
this.techCall('enterFullScreen');
} else {
// fullscreen isn't supported so we'll just stretch the video element to
// fill the viewport
this.enterFullWindow();
this.trigger('fullscreenchange');
}
return this;
};
/**
* Return the video to its normal size after having been in full screen mode
*
* myPlayer.cancelFullScreen();
*
* @return {vjs.Player} self
*/
vjs.Player.prototype.cancelFullScreen = function(){
var requestFullScreen = vjs.support.requestFullScreen;
this.isFullScreen(false);
// Check for browser element fullscreen support
if (requestFullScreen) {
document[requestFullScreen.cancelFn]();
} else if (this.tech.supportsFullScreen()) {
this.techCall('exitFullScreen');
} else {
this.exitFullWindow();
this.trigger('fullscreenchange');
}
return this;
};
// When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.
vjs.Player.prototype.enterFullWindow = function(){
this.isFullWindow = true;
// Storing original doc overflow value to return to when fullscreen is off
this.docOrigOverflow = document.documentElement.style.overflow;
// Add listener for esc key to exit fullscreen
vjs.on(document, 'keydown', vjs.bind(this, this.fullWindowOnEscKey));
// Hide any scroll bars
document.documentElement.style.overflow = 'hidden';
// Apply fullscreen styles
vjs.addClass(document.body, 'vjs-full-window');
this.trigger('enterFullWindow');
};
vjs.Player.prototype.fullWindowOnEscKey = function(event){
if (event.keyCode === 27) {
if (this.isFullScreen() === true) {
this.cancelFullScreen();
} else {
this.exitFullWindow();
}
}
};
vjs.Player.prototype.exitFullWindow = function(){
this.isFullWindow = false;
vjs.off(document, 'keydown', this.fullWindowOnEscKey);
// Unhide scroll bars.
document.documentElement.style.overflow = this.docOrigOverflow;
// Remove fullscreen styles
vjs.removeClass(document.body, 'vjs-full-window');
// Resize the box, controller, and poster to original sizes
// this.positionAll();
this.trigger('exitFullWindow');
};
vjs.Player.prototype.selectSource = function(sources){
// Loop through each playback technology in the options order
for (var i=0,j=this.options_['techOrder'];i<j.length;i++) {
var techName = vjs.capitalize(j[i]),
tech = window['videojs'][techName];
// Check if the browser supports this technology
if (tech.isSupported()) {
// Loop through each source object
for (var a=0,b=sources;a<b.length;a++) {
var source = b[a];
// Check if source can be played with this technology
if (tech['canPlaySource'](source)) {
return { source: source, tech: techName };
}
}
}
}
return false;
};
/**
* The source function updates the video source
*
* There are three types of variables you can pass as the argument.
*
* **URL String**: A URL to the the video file. Use this method if you are sure
* the current playback technology (HTML5/Flash) can support the source you
* provide. Currently only MP4 files can be used in both HTML5 and Flash.
*
* myPlayer.src("http://www.example.com/path/to/video.mp4");
*
* **Source Object (or element):** A javascript object containing information
* about the source file. Use this method if you want the player to determine if
* it can support the file using the type information.
*
* myPlayer.src({ type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" });
*
* **Array of Source Objects:** To provide multiple versions of the source so
* that it can be played using HTML5 across browsers you can use an array of
* source objects. Video.js will detect which version is supported and load that
* file.
*
* myPlayer.src([
* { type: "video/mp4", src: "http://www.example.com/path/to/video.mp4" },
* { type: "video/webm", src: "http://www.example.com/path/to/video.webm" },
* { type: "video/ogg", src: "http://www.example.com/path/to/video.ogv" }
* ]);
*
* @param {String|Object|Array=} source The source URL, object, or array of sources
* @return {String} The current video source when getting
* @return {String} The player when setting
*/
vjs.Player.prototype.src = function(source){
if (source === undefined) {
return this.techGet('src');
}
// Case: Array of source objects to choose from and pick the best to play
if (source instanceof Array) {
var sourceTech = this.selectSource(source),
techName;
if (sourceTech) {
source = sourceTech.source;
techName = sourceTech.tech;
// If this technology is already loaded, set source
if (techName == this.techName) {
this.src(source); // Passing the source object
// Otherwise load this technology with chosen source
} else {
this.loadTech(techName, source);
}
} else {
this.el_.appendChild(vjs.createEl('p', {
innerHTML: this.options()['notSupportedMessage']
}));
this.triggerReady(); // we could not find an appropriate tech, but let's still notify the delegate that this is it
}
// Case: Source object { src: '', type: '' ... }
} else if (source instanceof Object) {
if (window['videojs'][this.techName]['canPlaySource'](source)) {
this.src(source.src);
} else {
// Send through tech loop to check for a compatible technology.
this.src([source]);
}
// Case: URL String (http://myvideo...)
} else {
// Cache for getting last set source
this.cache_.src = source;
if (!this.isReady_) {
this.ready(function(){
this.src(source);
});
} else {
this.techCall('src', source);
if (this.options_['preload'] == 'auto') {
this.load();
}
if (this.options_['autoplay']) {
this.play();
}
}
}
return this;
};
// Begin loading the src data
// http://dev.w3.org/html5/spec/video.html#dom-media-load
vjs.Player.prototype.load = function(){
this.techCall('load');
return this;
};
// http://dev.w3.org/html5/spec/video.html#dom-media-currentsrc
vjs.Player.prototype.currentSrc = function(){
return this.techGet('currentSrc') || this.cache_.src || '';
};
// Attributes/Options
vjs.Player.prototype.preload = function(value){
if (value !== undefined) {
this.techCall('setPreload', value);
this.options_['preload'] = value;
return this;
}
return this.techGet('preload');
};
vjs.Player.prototype.autoplay = function(value){
if (value !== undefined) {
this.techCall('setAutoplay', value);
this.options_['autoplay'] = value;
return this;
}
return this.techGet('autoplay', value);
};
vjs.Player.prototype.loop = function(value){
if (value !== undefined) {
this.techCall('setLoop', value);
this.options_['loop'] = value;
return this;
}
return this.techGet('loop');
};
/**
* the url of the poster image source
* @type {String}
* @private
*/
vjs.Player.prototype.poster_;
/**
* get or set the poster image source url
*
* ##### EXAMPLE:
*
* // getting
* var currentPoster = myPlayer.poster();
*
* // setting
* myPlayer.poster('http://example.com/myImage.jpg');
*
* @param {String=} [src] Poster image source URL
* @return {String} poster URL when getting
* @return {vjs.Player} self when setting
*/
vjs.Player.prototype.poster = function(src){
if (src === undefined) {
return this.poster_;
}
// update the internal poster variable
this.poster_ = src;
// update the tech's poster
this.techCall('setPoster', src);
// alert components that the poster has been set
this.trigger('posterchange');
};
/**
* Whether or not the controls are showing
* @type {Boolean}
* @private
*/
vjs.Player.prototype.controls_;
/**
* Get or set whether or not the controls are showing.
* @param {Boolean} controls Set controls to showing or not
* @return {Boolean} Controls are showing
*/
vjs.Player.prototype.controls = function(bool){
if (bool !== undefined) {
bool = !!bool; // force boolean
// Don't trigger a change event unless it actually changed
if (this.controls_ !== bool) {
this.controls_ = bool;
if (bool) {
this.removeClass('vjs-controls-disabled');
this.addClass('vjs-controls-enabled');
this.trigger('controlsenabled');
} else {
this.removeClass('vjs-controls-enabled');
this.addClass('vjs-controls-disabled');
this.trigger('controlsdisabled');
}
}
return this;
}
return this.controls_;
};
vjs.Player.prototype.usingNativeControls_;
/**
* Toggle native controls on/off. Native controls are the controls built into
* devices (e.g. default iPhone controls), Flash, or other techs
* (e.g. Vimeo Controls)
*
* **This should only be set by the current tech, because only the tech knows
* if it can support native controls**
*
* @param {Boolean} bool True signals that native controls are on
* @return {vjs.Player} Returns the player
* @private
*/
vjs.Player.prototype.usingNativeControls = function(bool){
if (bool !== undefined) {
bool = !!bool; // force boolean
// Don't trigger a change event unless it actually changed
if (this.usingNativeControls_ !== bool) {
this.usingNativeControls_ = bool;
if (bool) {
this.addClass('vjs-using-native-controls');
/**
* player is using the native device controls
*
* @event usingnativecontrols
* @memberof vjs.Player
* @instance
* @private
*/
this.trigger('usingnativecontrols');
} else {
this.removeClass('vjs-using-native-controls');
/**
* player is using the custom HTML controls
*
* @event usingcustomcontrols
* @memberof vjs.Player
* @instance
* @private
*/
this.trigger('usingcustomcontrols');
}
}
return this;
}
return this.usingNativeControls_;
};
vjs.Player.prototype.error = function(){ return this.techGet('error'); };
vjs.Player.prototype.ended = function(){ return this.techGet('ended'); };
vjs.Player.prototype.seeking = function(){ return this.techGet('seeking'); };
// When the player is first initialized, trigger activity so components
// like the control bar show themselves if needed
vjs.Player.prototype.userActivity_ = true;
vjs.Player.prototype.reportUserActivity = function(event){
this.userActivity_ = true;
};
vjs.Player.prototype.userActive_ = true;
vjs.Player.prototype.userActive = function(bool){
if (bool !== undefined) {
bool = !!bool;
if (bool !== this.userActive_) {
this.userActive_ = bool;
if (bool) {
// If the user was inactive and is now active we want to reset the
// inactivity timer
this.userActivity_ = true;
this.removeClass('vjs-user-inactive');
this.addClass('vjs-user-active');
this.trigger('useractive');
} else {
// We're switching the state to inactive manually, so erase any other
// activity
this.userActivity_ = false;
// Chrome/Safari/IE have bugs where when you change the cursor it can
// trigger a mousemove event. This causes an issue when you're hiding
// the cursor when the user is inactive, and a mousemove signals user
// activity. Making it impossible to go into inactive mode. Specifically
// this happens in fullscreen when we really need to hide the cursor.
//
// When this gets resolved in ALL browsers it can be removed
// https://code.google.com/p/chromium/issues/detail?id=103041
if(this.tech) {
this.tech.one('mousemove', function(e){
e.stopPropagation();
e.preventDefault();
});
}
this.removeClass('vjs-user-active');
this.addClass('vjs-user-inactive');
this.trigger('userinactive');
}
}
return this;
}
return this.userActive_;
};
vjs.Player.prototype.listenForUserActivity = function(){
var onMouseActivity, onMouseDown, mouseInProgress, onMouseUp,
activityCheck, inactivityTimeout;
onMouseActivity = vjs.bind(this, this.reportUserActivity);
onMouseDown = function() {
onMouseActivity();
// For as long as the they are touching the device or have their mouse down,
// we consider them active even if they're not moving their finger or mouse.
// So we want to continue to update that they are active
clearInterval(mouseInProgress);
// Setting userActivity=true now and setting the interval to the same time
// as the activityCheck interval (250) should ensure we never miss the
// next activityCheck
mouseInProgress = setInterval(onMouseActivity, 250);
};
onMouseUp = function(event) {
onMouseActivity();
// Stop the interval that maintains activity if the mouse/touch is down
clearInterval(mouseInProgress);
};
// Any mouse movement will be considered user activity
this.on('mousedown', onMouseDown);
this.on('mousemove', onMouseActivity);
this.on('mouseup', onMouseUp);
// Listen for keyboard navigation
// Shouldn't need to use inProgress interval because of key repeat
this.on('keydown', onMouseActivity);
this.on('keyup', onMouseActivity);
// Run an interval every 250 milliseconds instead of stuffing everything into
// the mousemove/touchmove function itself, to prevent performance degradation.
// `this.reportUserActivity` simply sets this.userActivity_ to true, which
// then gets picked up by this loop
// http://ejohn.org/blog/learning-from-twitter/
activityCheck = setInterval(vjs.bind(this, function() {
// Check to see if mouse/touch activity has happened
if (this.userActivity_) {
// Reset the activity tracker
this.userActivity_ = false;
// If the user state was inactive, set the state to active
this.userActive(true);
// Clear any existing inactivity timeout to start the timer over
clearTimeout(inactivityTimeout);
// In X seconds, if no more activity has occurred the user will be
// considered inactive
inactivityTimeout = setTimeout(vjs.bind(this, function() {
// Protect against the case where the inactivityTimeout can trigger just
// before the next user activity is picked up by the activityCheck loop
// causing a flicker
if (!this.userActivity_) {
this.userActive(false);
}
}), 2000);
}
}), 250);
// Clean up the intervals when we kill the player
this.on('dispose', function(){
clearInterval(activityCheck);
clearTimeout(inactivityTimeout);
});
};
// Methods to add support for
// networkState: function(){ return this.techCall('networkState'); },
// readyState: function(){ return this.techCall('readyState'); },
// initialTime: function(){ return this.techCall('initialTime'); },
// startOffsetTime: function(){ return this.techCall('startOffsetTime'); },
// played: function(){ return this.techCall('played'); },
// seekable: function(){ return this.techCall('seekable'); },
// videoTracks: function(){ return this.techCall('videoTracks'); },
// audioTracks: function(){ return this.techCall('audioTracks'); },
// videoWidth: function(){ return this.techCall('videoWidth'); },
// videoHeight: function(){ return this.techCall('videoHeight'); },
// defaultPlaybackRate: function(){ return this.techCall('defaultPlaybackRate'); },
// playbackRate: function(){ return this.techCall('playbackRate'); },
// mediaGroup: function(){ return this.techCall('mediaGroup'); },
// controller: function(){ return this.techCall('controller'); },
// defaultMuted: function(){ return this.techCall('defaultMuted'); }
// TODO
// currentSrcList: the array of sources including other formats and bitrates
// playList: array of source lists in order of playback
// RequestFullscreen API
(function(){
var prefix, requestFS, div;
div = document.createElement('div');
requestFS = {};
// Current W3C Spec
// http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
// Mozilla Draft: https://wiki.mozilla.org/Gecko:FullScreenAPI#fullscreenchange_event
// New: https://dvcs.w3.org/hg/fullscreen/raw-file/529a67b8d9f3/Overview.html
if (div.cancelFullscreen !== undefined) {
requestFS.requestFn = 'requestFullscreen';
requestFS.cancelFn = 'exitFullscreen';
requestFS.eventName = 'fullscreenchange';
requestFS.isFullScreen = 'fullScreen';
// Webkit (Chrome/Safari) and Mozilla (Firefox) have working implementations
// that use prefixes and vary slightly from the new W3C spec. Specifically,
// using 'exit' instead of 'cancel', and lowercasing the 'S' in Fullscreen.
// Other browsers don't have any hints of which version they might follow yet,
// so not going to try to predict by looping through all prefixes.
} else {
if (document.mozCancelFullScreen) {
prefix = 'moz';
requestFS.isFullScreen = prefix + 'FullScreen';
} else {
prefix = 'webkit';
requestFS.isFullScreen = prefix + 'IsFullScreen';
}
if (div[prefix + 'RequestFullScreen']) {
requestFS.requestFn = prefix + 'RequestFullScreen';
requestFS.cancelFn = prefix + 'CancelFullScreen';
}
requestFS.eventName = prefix + 'fullscreenchange';
}
if (document[requestFS.cancelFn]) {
vjs.support.requestFullScreen = requestFS;
}
})();
/**
* Container of main controls
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
* @extends vjs.Component
*/
vjs.ControlBar = vjs.Component.extend();
vjs.ControlBar.prototype.options_ = {
loadEvent: 'play',
children: {
'playToggle': {},
'currentTimeDisplay': {},
'timeDivider': {},
'durationDisplay': {},
'remainingTimeDisplay': {},
'progressControl': {},
'fullscreenToggle': {},
'volumeControl': {},
'muteToggle': {}
// 'volumeMenuButton': {}
}
};
vjs.ControlBar.prototype.createEl = function(){
return vjs.createEl('div', {
className: 'vjs-control-bar'
});
};
/**
* Button to toggle between play and pause
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.PlayToggle = vjs.Button.extend({
/** @constructor */
init: function(player, options){
vjs.Button.call(this, player, options);
player.on('play', vjs.bind(this, this.onPlay));
player.on('pause', vjs.bind(this, this.onPause));
}
});
vjs.PlayToggle.prototype.buttonText = 'Play';
vjs.PlayToggle.prototype.buildCSSClass = function(){
return 'vjs-play-control ' + vjs.Button.prototype.buildCSSClass.call(this);
};
// OnClick - Toggle between play and pause
vjs.PlayToggle.prototype.onClick = function(){
if (this.player_.paused()) {
this.player_.play();
} else {
this.player_.pause();
}
};
// OnPlay - Add the vjs-playing class to the element so it can change appearance
vjs.PlayToggle.prototype.onPlay = function(){
vjs.removeClass(this.el_, 'vjs-paused');
vjs.addClass(this.el_, 'vjs-playing');
this.el_.children[0].children[0].innerHTML = 'Pause'; // change the button text to "Pause"
};
// OnPause - Add the vjs-paused class to the element so it can change appearance
vjs.PlayToggle.prototype.onPause = function(){
vjs.removeClass(this.el_, 'vjs-playing');
vjs.addClass(this.el_, 'vjs-paused');
this.el_.children[0].children[0].innerHTML = 'Play'; // change the button text to "Play"
};
/**
* Displays the current time
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.CurrentTimeDisplay = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
player.on('timeupdate', vjs.bind(this, this.updateContent));
}
});
vjs.CurrentTimeDisplay.prototype.createEl = function(){
var el = vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-current-time vjs-time-controls vjs-control'
});
this.contentEl_ = vjs.createEl('div', {
className: 'vjs-current-time-display',
innerHTML: '<span class="vjs-control-text">Current Time </span>' + '0:00', // label the current time for screen reader users
'aria-live': 'off' // tell screen readers not to automatically read the time as it changes
});
el.appendChild(this.contentEl_);
return el;
};
vjs.CurrentTimeDisplay.prototype.updateContent = function(){
// Allows for smooth scrubbing, when player can't keep up.
var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();
this.contentEl_.innerHTML = '<span class="vjs-control-text">Current Time </span>' + vjs.formatTime(time, this.player_.duration());
};
/**
* Displays the duration
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.DurationDisplay = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
// this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,
// however the durationchange event fires before this.player_.duration() is set,
// so the value cannot be written out using this method.
// Once the order of durationchange and this.player_.duration() being set is figured out,
// this can be updated.
player.on('timeupdate', vjs.bind(this, this.updateContent));
}
});
vjs.DurationDisplay.prototype.createEl = function(){
var el = vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-duration vjs-time-controls vjs-control'
});
this.contentEl_ = vjs.createEl('div', {
className: 'vjs-duration-display',
innerHTML: '<span class="vjs-control-text">Duration Time </span>' + '0:00', // label the duration time for screen reader users
'aria-live': 'off' // tell screen readers not to automatically read the time as it changes
});
el.appendChild(this.contentEl_);
return el;
};
vjs.DurationDisplay.prototype.updateContent = function(){
var duration = this.player_.duration();
if (duration) {
this.contentEl_.innerHTML = '<span class="vjs-control-text">Duration Time </span>' + vjs.formatTime(duration); // label the duration time for screen reader users
}
};
/**
* The separator between the current time and duration
*
* Can be hidden if it's not needed in the design.
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.TimeDivider = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
}
});
vjs.TimeDivider.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-time-divider',
innerHTML: '<div><span>/</span></div>'
});
};
/**
* Displays the time left in the video
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.RemainingTimeDisplay = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
player.on('timeupdate', vjs.bind(this, this.updateContent));
}
});
vjs.RemainingTimeDisplay.prototype.createEl = function(){
var el = vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-remaining-time vjs-time-controls vjs-control'
});
this.contentEl_ = vjs.createEl('div', {
className: 'vjs-remaining-time-display',
innerHTML: '<span class="vjs-control-text">Remaining Time </span>' + '-0:00', // label the remaining time for screen reader users
'aria-live': 'off' // tell screen readers not to automatically read the time as it changes
});
el.appendChild(this.contentEl_);
return el;
};
vjs.RemainingTimeDisplay.prototype.updateContent = function(){
if (this.player_.duration()) {
this.contentEl_.innerHTML = '<span class="vjs-control-text">Remaining Time </span>' + '-'+ vjs.formatTime(this.player_.remainingTime());
}
// Allows for smooth scrubbing, when player can't keep up.
// var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();
// this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());
};
/**
* Toggle fullscreen video
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @extends vjs.Button
*/
vjs.FullscreenToggle = vjs.Button.extend({
/**
* @constructor
* @memberof vjs.FullscreenToggle
* @instance
*/
init: function(player, options){
vjs.Button.call(this, player, options);
}
});
vjs.FullscreenToggle.prototype.buttonText = 'Fullscreen';
vjs.FullscreenToggle.prototype.buildCSSClass = function(){
return 'vjs-fullscreen-control ' + vjs.Button.prototype.buildCSSClass.call(this);
};
vjs.FullscreenToggle.prototype.onClick = function(){
if (!this.player_.isFullScreen()) {
this.player_.requestFullScreen();
this.el_.children[0].children[0].innerHTML = 'Non-Fullscreen'; // change the button text to "Non-Fullscreen"
} else {
this.player_.cancelFullScreen();
this.el_.children[0].children[0].innerHTML = 'Fullscreen'; // change the button to "Fullscreen"
}
};
/**
* The Progress Control component contains the seek bar, load progress,
* and play progress
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.ProgressControl = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
}
});
vjs.ProgressControl.prototype.options_ = {
children: {
'seekBar': {}
}
};
vjs.ProgressControl.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-progress-control vjs-control'
});
};
/**
* Seek Bar and holder for the progress bars
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.SeekBar = vjs.Slider.extend({
/** @constructor */
init: function(player, options){
vjs.Slider.call(this, player, options);
player.on('timeupdate', vjs.bind(this, this.updateARIAAttributes));
player.ready(vjs.bind(this, this.updateARIAAttributes));
}
});
vjs.SeekBar.prototype.options_ = {
children: {
'loadProgressBar': {},
'playProgressBar': {},
'seekHandle': {}
},
'barName': 'playProgressBar',
'handleName': 'seekHandle'
};
vjs.SeekBar.prototype.playerEvent = 'timeupdate';
vjs.SeekBar.prototype.createEl = function(){
return vjs.Slider.prototype.createEl.call(this, 'div', {
className: 'vjs-progress-holder',
'aria-label': 'video progress bar'
});
};
vjs.SeekBar.prototype.updateARIAAttributes = function(){
// Allows for smooth scrubbing, when player can't keep up.
var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();
this.el_.setAttribute('aria-valuenow',vjs.round(this.getPercent()*100, 2)); // machine readable value of progress bar (percentage complete)
this.el_.setAttribute('aria-valuetext',vjs.formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)
};
vjs.SeekBar.prototype.getPercent = function(){
return this.player_.currentTime() / this.player_.duration();
};
vjs.SeekBar.prototype.onMouseDown = function(event){
vjs.Slider.prototype.onMouseDown.call(this, event);
this.player_.scrubbing = true;
this.videoWasPlaying = !this.player_.paused();
this.player_.pause();
};
vjs.SeekBar.prototype.onMouseMove = function(event){
var newTime = this.calculateDistance(event) * this.player_.duration();
// Don't let video end while scrubbing.
if (newTime == this.player_.duration()) { newTime = newTime - 0.1; }
// Set new time (tell player to seek to new time)
this.player_.currentTime(newTime);
};
vjs.SeekBar.prototype.onMouseUp = function(event){
vjs.Slider.prototype.onMouseUp.call(this, event);
this.player_.scrubbing = false;
if (this.videoWasPlaying) {
this.player_.play();
}
};
vjs.SeekBar.prototype.stepForward = function(){
this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users
};
vjs.SeekBar.prototype.stepBack = function(){
this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users
};
/**
* Shows load progress
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.LoadProgressBar = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
player.on('progress', vjs.bind(this, this.update));
}
});
vjs.LoadProgressBar.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-load-progress',
innerHTML: '<span class="vjs-control-text">Loaded: 0%</span>'
});
};
vjs.LoadProgressBar.prototype.update = function(){
if (this.el_.style) { this.el_.style.width = vjs.round(this.player_.bufferedPercent() * 100, 2) + '%'; }
};
/**
* Shows play progress
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.PlayProgressBar = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
}
});
vjs.PlayProgressBar.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-play-progress',
innerHTML: '<span class="vjs-control-text">Progress: 0%</span>'
});
};
/**
* The Seek Handle shows the current position of the playhead during playback,
* and can be dragged to adjust the playhead.
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.SeekHandle = vjs.SliderHandle.extend({
init: function(player, options) {
vjs.SliderHandle.call(this, player, options);
player.on('timeupdate', vjs.bind(this, this.updateContent));
}
});
/**
* The default value for the handle content, which may be read by screen readers
*
* @type {String}
* @private
*/
vjs.SeekHandle.prototype.defaultValue = '00:00';
/** @inheritDoc */
vjs.SeekHandle.prototype.createEl = function() {
return vjs.SliderHandle.prototype.createEl.call(this, 'div', {
className: 'vjs-seek-handle',
'aria-live': 'off'
});
};
vjs.SeekHandle.prototype.updateContent = function() {
var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();
this.el_.innerHTML = '<span class="vjs-control-text">' + vjs.formatTime(time, this.player_.duration()) + '</span>';
};
/**
* The component for controlling the volume level
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.VolumeControl = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
// hide volume controls when they're not supported by the current tech
if (player.tech && player.tech.features && player.tech.features['volumeControl'] === false) {
this.addClass('vjs-hidden');
}
player.on('loadstart', vjs.bind(this, function(){
if (player.tech.features && player.tech.features['volumeControl'] === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
}));
}
});
vjs.VolumeControl.prototype.options_ = {
children: {
'volumeBar': {}
}
};
vjs.VolumeControl.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-control vjs-control'
});
};
/**
* The bar that contains the volume level and can be clicked on to adjust the level
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.VolumeBar = vjs.Slider.extend({
/** @constructor */
init: function(player, options){
vjs.Slider.call(this, player, options);
player.on('volumechange', vjs.bind(this, this.updateARIAAttributes));
player.ready(vjs.bind(this, this.updateARIAAttributes));
setTimeout(vjs.bind(this, this.update), 0); // update when elements is in DOM
}
});
vjs.VolumeBar.prototype.updateARIAAttributes = function(){
// Current value of volume bar as a percentage
this.el_.setAttribute('aria-valuenow',vjs.round(this.player_.volume()*100, 2));
this.el_.setAttribute('aria-valuetext',vjs.round(this.player_.volume()*100, 2)+'%');
};
vjs.VolumeBar.prototype.options_ = {
children: {
'volumeLevel': {},
'volumeHandle': {}
},
'barName': 'volumeLevel',
'handleName': 'volumeHandle'
};
vjs.VolumeBar.prototype.playerEvent = 'volumechange';
vjs.VolumeBar.prototype.createEl = function(){
return vjs.Slider.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-bar',
'aria-label': 'volume level'
});
};
vjs.VolumeBar.prototype.onMouseMove = function(event) {
if (this.player_.muted()) {
this.player_.muted(false);
}
this.player_.volume(this.calculateDistance(event));
};
vjs.VolumeBar.prototype.getPercent = function(){
if (this.player_.muted()) {
return 0;
} else {
return this.player_.volume();
}
};
vjs.VolumeBar.prototype.stepForward = function(){
this.player_.volume(this.player_.volume() + 0.1);
};
vjs.VolumeBar.prototype.stepBack = function(){
this.player_.volume(this.player_.volume() - 0.1);
};
/**
* Shows volume level
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.VolumeLevel = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
}
});
vjs.VolumeLevel.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-level',
innerHTML: '<span class="vjs-control-text"></span>'
});
};
/**
* The volume handle can be dragged to adjust the volume level
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.VolumeHandle = vjs.SliderHandle.extend();
vjs.VolumeHandle.prototype.defaultValue = '00:00';
/** @inheritDoc */
vjs.VolumeHandle.prototype.createEl = function(){
return vjs.SliderHandle.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-handle'
});
};
/**
* A button component for muting the audio
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.MuteToggle = vjs.Button.extend({
/** @constructor */
init: function(player, options){
vjs.Button.call(this, player, options);
player.on('volumechange', vjs.bind(this, this.update));
// hide mute toggle if the current tech doesn't support volume control
if (player.tech && player.tech.features && player.tech.features['volumeControl'] === false) {
this.addClass('vjs-hidden');
}
player.on('loadstart', vjs.bind(this, function(){
if (player.tech.features && player.tech.features['volumeControl'] === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
}));
}
});
vjs.MuteToggle.prototype.createEl = function(){
return vjs.Button.prototype.createEl.call(this, 'div', {
className: 'vjs-mute-control vjs-control',
innerHTML: '<div><span class="vjs-control-text">Mute</span></div>'
});
};
vjs.MuteToggle.prototype.onClick = function(){
this.player_.muted( this.player_.muted() ? false : true );
};
vjs.MuteToggle.prototype.update = function(){
var vol = this.player_.volume(),
level = 3;
if (vol === 0 || this.player_.muted()) {
level = 0;
} else if (vol < 0.33) {
level = 1;
} else if (vol < 0.67) {
level = 2;
}
// Don't rewrite the button text if the actual text doesn't change.
// This causes unnecessary and confusing information for screen reader users.
// This check is needed because this function gets called every time the volume level is changed.
if(this.player_.muted()){
if(this.el_.children[0].children[0].innerHTML!='Unmute'){
this.el_.children[0].children[0].innerHTML = 'Unmute'; // change the button text to "Unmute"
}
} else {
if(this.el_.children[0].children[0].innerHTML!='Mute'){
this.el_.children[0].children[0].innerHTML = 'Mute'; // change the button text to "Mute"
}
}
/* TODO improve muted icon classes */
for (var i = 0; i < 4; i++) {
vjs.removeClass(this.el_, 'vjs-vol-'+i);
}
vjs.addClass(this.el_, 'vjs-vol-'+level);
};
/**
* Menu button with a popup for showing the volume slider.
* @constructor
*/
vjs.VolumeMenuButton = vjs.MenuButton.extend({
/** @constructor */
init: function(player, options){
vjs.MenuButton.call(this, player, options);
// Same listeners as MuteToggle
player.on('volumechange', vjs.bind(this, this.update));
// hide mute toggle if the current tech doesn't support volume control
if (player.tech && player.tech.features && player.tech.features.volumeControl === false) {
this.addClass('vjs-hidden');
}
player.on('loadstart', vjs.bind(this, function(){
if (player.tech.features && player.tech.features.volumeControl === false) {
this.addClass('vjs-hidden');
} else {
this.removeClass('vjs-hidden');
}
}));
this.addClass('vjs-menu-button');
}
});
vjs.VolumeMenuButton.prototype.createMenu = function(){
var menu = new vjs.Menu(this.player_, {
contentElType: 'div'
});
var vc = new vjs.VolumeBar(this.player_, vjs.obj.merge({vertical: true}, this.options_.volumeBar));
menu.addChild(vc);
return menu;
};
vjs.VolumeMenuButton.prototype.onClick = function(){
vjs.MuteToggle.prototype.onClick.call(this);
vjs.MenuButton.prototype.onClick.call(this);
};
vjs.VolumeMenuButton.prototype.createEl = function(){
return vjs.Button.prototype.createEl.call(this, 'div', {
className: 'vjs-volume-menu-button vjs-menu-button vjs-control',
innerHTML: '<div><span class="vjs-control-text">Mute</span></div>'
});
};
vjs.VolumeMenuButton.prototype.update = vjs.MuteToggle.prototype.update;
/* Poster Image
================================================================================ */
/**
* The component that handles showing the poster image.
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.PosterImage = vjs.Button.extend({
/** @constructor */
init: function(player, options){
vjs.Button.call(this, player, options);
if (player.poster()) {
this.src(player.poster());
}
if (!player.poster() || !player.controls()) {
this.hide();
}
player.on('posterchange', vjs.bind(this, function(){
this.src(player.poster());
}));
player.on('play', vjs.bind(this, this.hide));
}
});
// use the test el to check for backgroundSize style support
var _backgroundSizeSupported = 'backgroundSize' in vjs.TEST_VID.style;
vjs.PosterImage.prototype.createEl = function(){
var el = vjs.createEl('div', {
className: 'vjs-poster',
// Don't want poster to be tabbable.
tabIndex: -1
});
if (!_backgroundSizeSupported) {
// setup an img element as a fallback for IE8
el.appendChild(vjs.createEl('img'));
}
return el;
};
vjs.PosterImage.prototype.src = function(url){
var el = this.el();
// getter
// can't think of a need for a getter here
// see #838 if on is needed in the future
// still don't want a getter to set src as undefined
if (url === undefined) {
return;
}
// setter
// To ensure the poster image resizes while maintaining its original aspect
// ratio, use a div with `background-size` when available. For browsers that
// do not support `background-size` (e.g. IE8), fall back on using a regular
// img element.
if (_backgroundSizeSupported) {
el.style.backgroundImage = 'url("' + url + '")';
} else {
el.firstChild.src = url;
}
};
vjs.PosterImage.prototype.onClick = function(){
// Only accept clicks when controls are enabled
if (this.player().controls()) {
this.player_.play();
}
};
/* Loading Spinner
================================================================================ */
/**
* Loading spinner for waiting events
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.LoadingSpinner = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
player.on('canplay', vjs.bind(this, this.hide));
player.on('canplaythrough', vjs.bind(this, this.hide));
player.on('playing', vjs.bind(this, this.hide));
player.on('seeking', vjs.bind(this, this.show));
// in some browsers seeking does not trigger the 'playing' event,
// so we also need to trap 'seeked' if we are going to set a
// 'seeking' event
player.on('seeked', vjs.bind(this, this.hide));
player.on('error', vjs.bind(this, this.show));
player.on('ended', vjs.bind(this, this.hide));
// Not showing spinner on stalled any more. Browsers may stall and then not trigger any events that would remove the spinner.
// Checked in Chrome 16 and Safari 5.1.2. http://help.videojs.com/discussions/problems/883-why-is-the-download-progress-showing
// player.on('stalled', vjs.bind(this, this.show));
player.on('waiting', vjs.bind(this, this.show));
}
});
vjs.LoadingSpinner.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-loading-spinner'
});
};
/* Big Play Button
================================================================================ */
/**
* Initial play button. Shows before the video has played. The hiding of the
* big play button is done via CSS and player states.
* @param {vjs.Player|Object} player
* @param {Object=} options
* @class
* @constructor
*/
vjs.BigPlayButton = vjs.Button.extend();
vjs.BigPlayButton.prototype.createEl = function(){
return vjs.Button.prototype.createEl.call(this, 'div', {
className: 'vjs-big-play-button',
innerHTML: '<span aria-hidden="true"></span>',
'aria-label': 'play video'
});
};
vjs.BigPlayButton.prototype.onClick = function(){
this.player_.play();
};
/**
* @fileoverview Media Technology Controller - Base class for media playback
* technology controllers like Flash and HTML5
*/
/**
* Base class for media (HTML5 Video, Flash) controllers
* @param {vjs.Player|Object} player Central player instance
* @param {Object=} options Options object
* @constructor
*/
vjs.MediaTechController = vjs.Component.extend({
/** @constructor */
init: function(player, options, ready){
options = options || {};
// we don't want the tech to report user activity automatically.
// This is done manually in addControlsListeners
options.reportTouchActivity = false;
vjs.Component.call(this, player, options, ready);
this.initControlsListeners();
}
});
/**
* Set up click and touch listeners for the playback element
* On desktops, a click on the video itself will toggle playback,
* on a mobile device a click on the video toggles controls.
* (toggling controls is done by toggling the user state between active and
* inactive)
*
* A tap can signal that a user has become active, or has become inactive
* e.g. a quick tap on an iPhone movie should reveal the controls. Another
* quick tap should hide them again (signaling the user is in an inactive
* viewing state)
*
* In addition to this, we still want the user to be considered inactive after
* a few seconds of inactivity.
*
* Note: the only part of iOS interaction we can't mimic with this setup
* is a touch and hold on the video element counting as activity in order to
* keep the controls showing, but that shouldn't be an issue. A touch and hold on
* any controls will still keep the user active
*/
vjs.MediaTechController.prototype.initControlsListeners = function(){
var player, tech, activateControls, deactivateControls;
tech = this;
player = this.player();
var activateControls = function(){
if (player.controls() && !player.usingNativeControls()) {
tech.addControlsListeners();
}
};
deactivateControls = vjs.bind(tech, tech.removeControlsListeners);
// Set up event listeners once the tech is ready and has an element to apply
// listeners to
this.ready(activateControls);
player.on('controlsenabled', activateControls);
player.on('controlsdisabled', deactivateControls);
};
vjs.MediaTechController.prototype.addControlsListeners = function(){
var userWasActive;
// Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do
// trigger mousedown/up.
// http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object
// Any touch events are set to block the mousedown event from happening
this.on('mousedown', this.onClick);
// If the controls were hidden we don't want that to change without a tap event
// so we'll check if the controls were already showing before reporting user
// activity
this.on('touchstart', function(event) {
// Stop the mouse events from also happening
event.preventDefault();
userWasActive = this.player_.userActive();
});
this.on('touchmove', function(event) {
if (userWasActive){
this.player().reportUserActivity();
}
});
// Turn on component tap events
this.emitTapEvents();
// The tap listener needs to come after the touchend listener because the tap
// listener cancels out any reportedUserActivity when setting userActive(false)
this.on('tap', this.onTap);
};
/**
* Remove the listeners used for click and tap controls. This is needed for
* toggling to controls disabled, where a tap/touch should do nothing.
*/
vjs.MediaTechController.prototype.removeControlsListeners = function(){
// We don't want to just use `this.off()` because there might be other needed
// listeners added by techs that extend this.
this.off('tap');
this.off('touchstart');
this.off('touchmove');
this.off('touchleave');
this.off('touchcancel');
this.off('touchend');
this.off('click');
this.off('mousedown');
};
/**
* Handle a click on the media element. By default will play/pause the media.
*/
vjs.MediaTechController.prototype.onClick = function(event){
// We're using mousedown to detect clicks thanks to Flash, but mousedown
// will also be triggered with right-clicks, so we need to prevent that
if (event.button !== 0) return;
// When controls are disabled a click should not toggle playback because
// the click is considered a control
if (this.player().controls()) {
if (this.player().paused()) {
this.player().play();
} else {
this.player().pause();
}
}
};
/**
* Handle a tap on the media element. By default it will toggle the user
* activity state, which hides and shows the controls.
*/
vjs.MediaTechController.prototype.onTap = function(){
this.player().userActive(!this.player().userActive());
};
/**
* Provide a default setPoster method for techs
*
* Poster support for techs should be optional, so we don't want techs to
* break if they don't have a way to set a poster.
*/
vjs.MediaTechController.prototype.setPoster = function(){};
vjs.MediaTechController.prototype.features = {
'volumeControl': true,
// Resizing plugins using request fullscreen reloads the plugin
'fullscreenResize': false,
// Optional events that we can manually mimic with timers
// currently not triggered by video-js-swf
'progressEvents': false,
'timeupdateEvents': false
};
vjs.media = {};
/**
* List of default API methods for any MediaTechController
* @type {String}
*/
vjs.media.ApiMethods = 'play,pause,paused,currentTime,setCurrentTime,duration,buffered,volume,setVolume,muted,setMuted,width,height,supportsFullScreen,enterFullScreen,src,load,currentSrc,preload,setPreload,autoplay,setAutoplay,loop,setLoop,error,networkState,readyState,seeking,initialTime,startOffsetTime,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks,defaultPlaybackRate,playbackRate,mediaGroup,controller,controls,defaultMuted'.split(',');
// Create placeholder methods for each that warn when a method isn't supported by the current playback technology
function createMethod(methodName){
return function(){
throw new Error('The "'+methodName+'" method is not available on the playback technology\'s API');
};
}
for (var i = vjs.media.ApiMethods.length - 1; i >= 0; i--) {
var methodName = vjs.media.ApiMethods[i];
vjs.MediaTechController.prototype[vjs.media.ApiMethods[i]] = createMethod(methodName);
}
/**
* @fileoverview HTML5 Media Controller - Wrapper for HTML5 Media API
*/
/**
* HTML5 Media Controller - Wrapper for HTML5 Media API
* @param {vjs.Player|Object} player
* @param {Object=} options
* @param {Function=} ready
* @constructor
*/
vjs.Html5 = vjs.MediaTechController.extend({
/** @constructor */
init: function(player, options, ready){
// volume cannot be changed from 1 on iOS
this.features['volumeControl'] = vjs.Html5.canControlVolume();
// In iOS, if you move a video element in the DOM, it breaks video playback.
this.features['movingMediaElementInDOM'] = !vjs.IS_IOS;
// HTML video is able to automatically resize when going to fullscreen
this.features['fullscreenResize'] = true;
vjs.MediaTechController.call(this, player, options, ready);
this.setupTriggers();
var source = options['source'];
// If the element source is already set, we may have missed the loadstart event, and want to trigger it.
// We don't want to set the source again and interrupt playback.
if (source && this.el_.currentSrc === source.src && this.el_.networkState > 0) {
player.trigger('loadstart');
// Otherwise set the source if one was provided.
} else if (source) {
this.el_.src = source.src;
}
// Determine if native controls should be used
// Our goal should be to get the custom controls on mobile solid everywhere
// so we can remove this all together. Right now this will block custom
// controls on touch enabled laptops like the Chrome Pixel
if (vjs.TOUCH_ENABLED && player.options()['nativeControlsForTouch'] !== false) {
this.useNativeControls();
}
// Chrome and Safari both have issues with autoplay.
// In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.
// In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)
// This fixes both issues. Need to wait for API, so it updates displays correctly
player.ready(function(){
if (this.tag && this.options_['autoplay'] && this.paused()) {
delete this.tag['poster']; // Chrome Fix. Fixed in Chrome v16.
this.play();
}
});
this.triggerReady();
}
});
vjs.Html5.prototype.dispose = function(){
vjs.MediaTechController.prototype.dispose.call(this);
};
vjs.Html5.prototype.createEl = function(){
var player = this.player_,
// If possible, reuse original tag for HTML5 playback technology element
el = player.tag,
newEl,
clone;
// Check if this browser supports moving the element into the box.
// On the iPhone video will break if you move the element,
// So we have to create a brand new element.
if (!el || this.features['movingMediaElementInDOM'] === false) {
// If the original tag is still there, clone and remove it.
if (el) {
clone = el.cloneNode(false);
vjs.Html5.disposeMediaElement(el);
el = clone;
player.tag = null;
} else {
el = vjs.createEl('video', {
id:player.id() + '_html5_api',
className:'vjs-tech'
});
}
// associate the player with the new tag
el['player'] = player;
vjs.insertFirst(el, player.el());
}
// Update specific tag settings, in case they were overridden
var attrs = ['autoplay','preload','loop','muted'];
for (var i = attrs.length - 1; i >= 0; i--) {
var attr = attrs[i];
if (player.options_[attr] !== null) {
el[attr] = player.options_[attr];
}
}
return el;
// jenniisawesome = true;
};
// Make video events trigger player events
// May seem verbose here, but makes other APIs possible.
vjs.Html5.prototype.setupTriggers = function(){
for (var i = vjs.Html5.Events.length - 1; i >= 0; i--) {
vjs.on(this.el_, vjs.Html5.Events[i], vjs.bind(this.player_, this.eventHandler));
}
};
// Triggers removed using this.off when disposed
vjs.Html5.prototype.eventHandler = function(e){
this.trigger(e);
// No need for media events to bubble up.
e.stopPropagation();
};
vjs.Html5.prototype.useNativeControls = function(){
var tech, player, controlsOn, controlsOff, cleanUp;
tech = this;
player = this.player();
// If the player controls are enabled turn on the native controls
tech.setControls(player.controls());
// Update the native controls when player controls state is updated
controlsOn = function(){
tech.setControls(true);
};
controlsOff = function(){
tech.setControls(false);
};
player.on('controlsenabled', controlsOn);
player.on('controlsdisabled', controlsOff);
// Clean up when not using native controls anymore
cleanUp = function(){
player.off('controlsenabled', controlsOn);
player.off('controlsdisabled', controlsOff);
};
tech.on('dispose', cleanUp);
player.on('usingcustomcontrols', cleanUp);
// Update the state of the player to using native controls
player.usingNativeControls(true);
};
vjs.Html5.prototype.play = function(){ this.el_.play(); };
vjs.Html5.prototype.pause = function(){ this.el_.pause(); };
vjs.Html5.prototype.paused = function(){ return this.el_.paused; };
vjs.Html5.prototype.currentTime = function(){ return this.el_.currentTime; };
vjs.Html5.prototype.setCurrentTime = function(seconds){
try {
this.el_.currentTime = seconds;
} catch(e) {
vjs.log(e, 'Video is not ready. (Video.js)');
// this.warning(VideoJS.warnings.videoNotReady);
}
};
vjs.Html5.prototype.duration = function(){ return this.el_.duration || 0; };
vjs.Html5.prototype.buffered = function(){ return this.el_.buffered; };
vjs.Html5.prototype.volume = function(){ return this.el_.volume; };
vjs.Html5.prototype.setVolume = function(percentAsDecimal){ this.el_.volume = percentAsDecimal; };
vjs.Html5.prototype.muted = function(){ return this.el_.muted; };
vjs.Html5.prototype.setMuted = function(muted){ this.el_.muted = muted; };
vjs.Html5.prototype.width = function(){ return this.el_.offsetWidth; };
vjs.Html5.prototype.height = function(){ return this.el_.offsetHeight; };
vjs.Html5.prototype.supportsFullScreen = function(){
if (typeof this.el_.webkitEnterFullScreen == 'function') {
// Seems to be broken in Chromium/Chrome && Safari in Leopard
if (/Android/.test(vjs.USER_AGENT) || !/Chrome|Mac OS X 10.5/.test(vjs.USER_AGENT)) {
return true;
}
}
return false;
};
vjs.Html5.prototype.enterFullScreen = function(){
var video = this.el_;
if (video.paused && video.networkState <= video.HAVE_METADATA) {
// attempt to prime the video element for programmatic access
// this isn't necessary on the desktop but shouldn't hurt
this.el_.play();
// playing and pausing synchronously during the transition to fullscreen
// can get iOS ~6.1 devices into a play/pause loop
setTimeout(function(){
video.pause();
video.webkitEnterFullScreen();
}, 0);
} else {
video.webkitEnterFullScreen();
}
};
vjs.Html5.prototype.exitFullScreen = function(){
this.el_.webkitExitFullScreen();
};
vjs.Html5.prototype.src = function(src){ this.el_.src = src; };
vjs.Html5.prototype.load = function(){ this.el_.load(); };
vjs.Html5.prototype.currentSrc = function(){ return this.el_.currentSrc; };
vjs.Html5.prototype.poster = function(){ return this.el_.poster; };
vjs.Html5.prototype.setPoster = function(val){ this.el_.poster = val; };
vjs.Html5.prototype.preload = function(){ return this.el_.preload; };
vjs.Html5.prototype.setPreload = function(val){ this.el_.preload = val; };
vjs.Html5.prototype.autoplay = function(){ return this.el_.autoplay; };
vjs.Html5.prototype.setAutoplay = function(val){ this.el_.autoplay = val; };
vjs.Html5.prototype.controls = function(){ return this.el_.controls; };
vjs.Html5.prototype.setControls = function(val){ this.el_.controls = !!val; };
vjs.Html5.prototype.loop = function(){ return this.el_.loop; };
vjs.Html5.prototype.setLoop = function(val){ this.el_.loop = val; };
vjs.Html5.prototype.error = function(){ return this.el_.error; };
vjs.Html5.prototype.seeking = function(){ return this.el_.seeking; };
vjs.Html5.prototype.ended = function(){ return this.el_.ended; };
vjs.Html5.prototype.defaultMuted = function(){ return this.el_.defaultMuted; };
/* HTML5 Support Testing ---------------------------------------------------- */
vjs.Html5.isSupported = function(){
// ie9 with no Media Player is a LIAR! (#984)
try {
vjs.TEST_VID['volume'] = 0.5;
} catch (e) {
return false;
}
return !!vjs.TEST_VID.canPlayType;
};
vjs.Html5.canPlaySource = function(srcObj){
// IE9 on Windows 7 without MediaPlayer throws an error here
// https://github.com/videojs/video.js/issues/519
try {
return !!vjs.TEST_VID.canPlayType(srcObj.type);
} catch(e) {
return '';
}
// TODO: Check Type
// If no Type, check ext
// Check Media Type
};
vjs.Html5.canControlVolume = function(){
var volume = vjs.TEST_VID.volume;
vjs.TEST_VID.volume = (volume / 2) + 0.1;
return volume !== vjs.TEST_VID.volume;
};
// HTML5 Feature detection and Device Fixes --------------------------------- //
(function() {
var canPlayType,
mpegurlRE = /^application\/(?:x-|vnd\.apple\.)mpegurl/i,
mp4RE = /^video\/mp4/i;
vjs.Html5.patchCanPlayType = function() {
// Android 4.0 and above can play HLS to some extent but it reports being unable to do so
if (vjs.ANDROID_VERSION >= 4.0) {
if (!canPlayType) {
canPlayType = vjs.TEST_VID.constructor.prototype.canPlayType;
}
vjs.TEST_VID.constructor.prototype.canPlayType = function(type) {
if (type && mpegurlRE.test(type)) {
return 'maybe';
}
return canPlayType.call(this, type);
};
}
// Override Android 2.2 and less canPlayType method which is broken
if (vjs.IS_OLD_ANDROID) {
if (!canPlayType) {
canPlayType = vjs.TEST_VID.constructor.prototype.canPlayType;
}
vjs.TEST_VID.constructor.prototype.canPlayType = function(type){
if (type && mp4RE.test(type)) {
return 'maybe';
}
return canPlayType.call(this, type);
};
}
};
vjs.Html5.unpatchCanPlayType = function() {
var r = vjs.TEST_VID.constructor.prototype.canPlayType;
vjs.TEST_VID.constructor.prototype.canPlayType = canPlayType;
canPlayType = null;
return r;
};
// by default, patch the video element
vjs.Html5.patchCanPlayType();
})();
// List of all HTML5 events (various uses).
vjs.Html5.Events = 'loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange'.split(',');
vjs.Html5.disposeMediaElement = function(el){
if (!el) { return; }
el['player'] = null;
if (el.parentNode) {
el.parentNode.removeChild(el);
}
// remove any child track or source nodes to prevent their loading
while(el.hasChildNodes()) {
el.removeChild(el.firstChild);
}
// remove any src reference. not setting `src=''` because that causes a warning
// in firefox
el.removeAttribute('src');
// force the media element to update its loading state by calling load()
// however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)
if (typeof el.load === 'function') {
// wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)
(function() {
try {
el.load();
} catch (e) {
// not supported
}
})();
}
};
/**
* @fileoverview VideoJS-SWF - Custom Flash Player with HTML5-ish API
* https://github.com/zencoder/video-js-swf
* Not using setupTriggers. Using global onEvent func to distribute events
*/
/**
* Flash Media Controller - Wrapper for fallback SWF API
*
* @param {vjs.Player} player
* @param {Object=} options
* @param {Function=} ready
* @constructor
*/
vjs.Flash = vjs.MediaTechController.extend({
/** @constructor */
init: function(player, options, ready){
vjs.MediaTechController.call(this, player, options, ready);
var source = options['source'],
// Which element to embed in
parentEl = options['parentEl'],
// Create a temporary element to be replaced by swf object
placeHolder = this.el_ = vjs.createEl('div', { id: player.id() + '_temp_flash' }),
// Generate ID for swf object
objId = player.id()+'_flash_api',
// Store player options in local var for optimization
// TODO: switch to using player methods instead of options
// e.g. player.autoplay();
playerOptions = player.options_,
// Merge default flashvars with ones passed in to init
flashVars = vjs.obj.merge({
// SWF Callback Functions
'readyFunction': 'videojs.Flash.onReady',
'eventProxyFunction': 'videojs.Flash.onEvent',
'errorEventProxyFunction': 'videojs.Flash.onError',
// Player Settings
'autoplay': playerOptions.autoplay,
'preload': playerOptions.preload,
'loop': playerOptions.loop,
'muted': playerOptions.muted
}, options['flashVars']),
// Merge default parames with ones passed in
params = vjs.obj.merge({
'wmode': 'opaque', // Opaque is needed to overlay controls, but can affect playback performance
'bgcolor': '#000000' // Using bgcolor prevents a white flash when the object is loading
}, options['params']),
// Merge default attributes with ones passed in
attributes = vjs.obj.merge({
'id': objId,
'name': objId, // Both ID and Name needed or swf to identifty itself
'class': 'vjs-tech'
}, options['attributes']),
lastSeekTarget
;
// If source was supplied pass as a flash var.
if (source) {
if (source.type && vjs.Flash.isStreamingType(source.type)) {
var parts = vjs.Flash.streamToParts(source.src);
flashVars['rtmpConnection'] = encodeURIComponent(parts.connection);
flashVars['rtmpStream'] = encodeURIComponent(parts.stream);
}
else {
flashVars['src'] = encodeURIComponent(vjs.getAbsoluteURL(source.src));
}
}
this['setCurrentTime'] = function(time){
lastSeekTarget = time;
this.el_.vjs_setProperty('currentTime', time);
};
this['currentTime'] = function(time){
// when seeking make the reported time keep up with the requested time
// by reading the time we're seeking to
if (this.seeking()) {
return lastSeekTarget;
}
return this.el_.vjs_getProperty('currentTime');
};
// Add placeholder to player div
vjs.insertFirst(placeHolder, parentEl);
// Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers
// This allows resetting the playhead when we catch the reload
if (options['startTime']) {
this.ready(function(){
this.load();
this.play();
this.currentTime(options['startTime']);
});
}
// firefox doesn't bubble mousemove events to parent. videojs/video-js-swf#37
// bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=836786
if (vjs.IS_FIREFOX) {
this.ready(function(){
vjs.on(this.el(), 'mousemove', vjs.bind(this, function(){
// since it's a custom event, don't bubble higher than the player
this.player().trigger({ 'type':'mousemove', 'bubbles': false });
}));
});
}
// Flash iFrame Mode
// In web browsers there are multiple instances where changing the parent element or visibility of a plugin causes the plugin to reload.
// - Firefox just about always. https://bugzilla.mozilla.org/show_bug.cgi?id=90268 (might be fixed by version 13)
// - Webkit when hiding the plugin
// - Webkit and Firefox when using requestFullScreen on a parent element
// Loading the flash plugin into a dynamically generated iFrame gets around most of these issues.
// Issues that remain include hiding the element and requestFullScreen in Firefox specifically
// There's on particularly annoying issue with this method which is that Firefox throws a security error on an offsite Flash object loaded into a dynamically created iFrame.
// Even though the iframe was inserted into a page on the web, Firefox + Flash considers it a local app trying to access an internet file.
// I tried mulitple ways of setting the iframe src attribute but couldn't find a src that worked well. Tried a real/fake source, in/out of domain.
// Also tried a method from stackoverflow that caused a security error in all browsers. http://stackoverflow.com/questions/2486901/how-to-set-document-domain-for-a-dynamically-generated-iframe
// In the end the solution I found to work was setting the iframe window.location.href right before doing a document.write of the Flash object.
// The only downside of this it seems to trigger another http request to the original page (no matter what's put in the href). Not sure why that is.
// NOTE (2012-01-29): Cannot get Firefox to load the remote hosted SWF into a dynamically created iFrame
// Firefox 9 throws a security error, unleess you call location.href right before doc.write.
// Not sure why that even works, but it causes the browser to look like it's continuously trying to load the page.
// Firefox 3.6 keeps calling the iframe onload function anytime I write to it, causing an endless loop.
if (options['iFrameMode'] === true && !vjs.IS_FIREFOX) {
// Create iFrame with vjs-tech class so it's 100% width/height
var iFrm = vjs.createEl('iframe', {
'id': objId + '_iframe',
'name': objId + '_iframe',
'className': 'vjs-tech',
'scrolling': 'no',
'marginWidth': 0,
'marginHeight': 0,
'frameBorder': 0
});
// Update ready function names in flash vars for iframe window
flashVars['readyFunction'] = 'ready';
flashVars['eventProxyFunction'] = 'events';
flashVars['errorEventProxyFunction'] = 'errors';
// Tried multiple methods to get this to work in all browsers
// Tried embedding the flash object in the page first, and then adding a place holder to the iframe, then replacing the placeholder with the page object.
// The goal here was to try to load the swf URL in the parent page first and hope that got around the firefox security error
// var newObj = vjs.Flash.embed(options['swf'], placeHolder, flashVars, params, attributes);
// (in onload)
// var temp = vjs.createEl('a', { id:'asdf', innerHTML: 'asdf' } );
// iDoc.body.appendChild(temp);
// Tried embedding the flash object through javascript in the iframe source.
// This works in webkit but still triggers the firefox security error
// iFrm.src = 'javascript: document.write('"+vjs.Flash.getEmbedCode(options['swf'], flashVars, params, attributes)+"');";
// Tried an actual local iframe just to make sure that works, but it kills the easiness of the CDN version if you require the user to host an iframe
// We should add an option to host the iframe locally though, because it could help a lot of issues.
// iFrm.src = "iframe.html";
// Wait until iFrame has loaded to write into it.
vjs.on(iFrm, 'load', vjs.bind(this, function(){
var iDoc,
iWin = iFrm.contentWindow;
// The one working method I found was to use the iframe's document.write() to create the swf object
// This got around the security issue in all browsers except firefox.
// I did find a hack where if I call the iframe's window.location.href='', it would get around the security error
// However, the main page would look like it was loading indefinitely (URL bar loading spinner would never stop)
// Plus Firefox 3.6 didn't work no matter what I tried.
// if (vjs.USER_AGENT.match('Firefox')) {
// iWin.location.href = '';
// }
// Get the iFrame's document depending on what the browser supports
iDoc = iFrm.contentDocument ? iFrm.contentDocument : iFrm.contentWindow.document;
// Tried ensuring both document domains were the same, but they already were, so that wasn't the issue.
// Even tried adding /. that was mentioned in a browser security writeup
// document.domain = document.domain+'/.';
// iDoc.domain = document.domain+'/.';
// Tried adding the object to the iframe doc's innerHTML. Security error in all browsers.
// iDoc.body.innerHTML = swfObjectHTML;
// Tried appending the object to the iframe doc's body. Security error in all browsers.
// iDoc.body.appendChild(swfObject);
// Using document.write actually got around the security error that browsers were throwing.
// Again, it's a dynamically generated (same domain) iframe, loading an external Flash swf.
// Not sure why that's a security issue, but apparently it is.
iDoc.write(vjs.Flash.getEmbedCode(options['swf'], flashVars, params, attributes));
// Setting variables on the window needs to come after the doc write because otherwise they can get reset in some browsers
// So far no issues with swf ready event being called before it's set on the window.
iWin['player'] = this.player_;
// Create swf ready function for iFrame window
iWin['ready'] = vjs.bind(this.player_, function(currSwf){
var el = iDoc.getElementById(currSwf),
player = this,
tech = player.tech;
// Update reference to playback technology element
tech.el_ = el;
// Make sure swf is actually ready. Sometimes the API isn't actually yet.
vjs.Flash.checkReady(tech);
});
// Create event listener for all swf events
iWin['events'] = vjs.bind(this.player_, function(swfID, eventName){
var player = this;
if (player && player.techName === 'flash') {
player.trigger(eventName);
}
});
// Create error listener for all swf errors
iWin['errors'] = vjs.bind(this.player_, function(swfID, eventName){
vjs.log('Flash Error', eventName);
});
}));
// Replace placeholder with iFrame (it will load now)
placeHolder.parentNode.replaceChild(iFrm, placeHolder);
// If not using iFrame mode, embed as normal object
} else {
vjs.Flash.embed(options['swf'], placeHolder, flashVars, params, attributes);
}
}
});
vjs.Flash.prototype.dispose = function(){
vjs.MediaTechController.prototype.dispose.call(this);
};
vjs.Flash.prototype.play = function(){
this.el_.vjs_play();
};
vjs.Flash.prototype.pause = function(){
this.el_.vjs_pause();
};
vjs.Flash.prototype.src = function(src){
if (src === undefined) {
return this.currentSrc();
}
if (vjs.Flash.isStreamingSrc(src)) {
src = vjs.Flash.streamToParts(src);
this.setRtmpConnection(src.connection);
this.setRtmpStream(src.stream);
} else {
// Make sure source URL is abosolute.
src = vjs.getAbsoluteURL(src);
this.el_.vjs_src(src);
}
// Currently the SWF doesn't autoplay if you load a source later.
// e.g. Load player w/ no source, wait 2s, set src.
if (this.player_.autoplay()) {
var tech = this;
setTimeout(function(){ tech.play(); }, 0);
}
};
vjs.Flash.prototype.currentSrc = function(){
var src = this.el_.vjs_getProperty('currentSrc');
// no src, check and see if RTMP
if (src == null) {
var connection = this['rtmpConnection'](),
stream = this['rtmpStream']();
if (connection && stream) {
src = vjs.Flash.streamFromParts(connection, stream);
}
}
return src;
};
vjs.Flash.prototype.load = function(){
this.el_.vjs_load();
};
vjs.Flash.prototype.poster = function(){
this.el_.vjs_getProperty('poster');
};
vjs.Flash.prototype.setPoster = function(){
// poster images are not handled by the Flash tech so make this a no-op
};
vjs.Flash.prototype.buffered = function(){
return vjs.createTimeRange(0, this.el_.vjs_getProperty('buffered'));
};
vjs.Flash.prototype.supportsFullScreen = function(){
return false; // Flash does not allow fullscreen through javascript
};
vjs.Flash.prototype.enterFullScreen = function(){
return false;
};
// Create setters and getters for attributes
var api = vjs.Flash.prototype,
readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(','),
readOnly = 'error,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks'.split(',');
// Overridden: buffered, currentTime, currentSrc
/**
* @this {*}
* @private
*/
var createSetter = function(attr){
var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);
api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };
};
/**
* @this {*}
* @private
*/
var createGetter = function(attr){
api[attr] = function(){ return this.el_.vjs_getProperty(attr); };
};
(function(){
var i;
// Create getter and setters for all read/write attributes
for (i = 0; i < readWrite.length; i++) {
createGetter(readWrite[i]);
createSetter(readWrite[i]);
}
// Create getters for read-only attributes
for (i = 0; i < readOnly.length; i++) {
createGetter(readOnly[i]);
}
})();
/* Flash Support Testing -------------------------------------------------------- */
vjs.Flash.isSupported = function(){
return vjs.Flash.version()[0] >= 10;
// return swfobject.hasFlashPlayerVersion('10');
};
vjs.Flash.canPlaySource = function(srcObj){
var type;
if (!srcObj.type) {
return '';
}
type = srcObj.type.replace(/;.*/,'').toLowerCase();
if (type in vjs.Flash.formats || type in vjs.Flash.streamingFormats) {
return 'maybe';
}
};
vjs.Flash.formats = {
'video/flv': 'FLV',
'video/x-flv': 'FLV',
'video/mp4': 'MP4',
'video/m4v': 'MP4'
};
vjs.Flash.streamingFormats = {
'rtmp/mp4': 'MP4',
'rtmp/flv': 'FLV'
};
vjs.Flash['onReady'] = function(currSwf){
var el = vjs.el(currSwf);
// Get player from box
// On firefox reloads, el might already have a player
var player = el['player'] || el.parentNode['player'],
tech = player.tech;
// Reference player on tech element
el['player'] = player;
// Update reference to playback technology element
tech.el_ = el;
vjs.Flash.checkReady(tech);
};
// The SWF isn't alwasy ready when it says it is. Sometimes the API functions still need to be added to the object.
// If it's not ready, we set a timeout to check again shortly.
vjs.Flash.checkReady = function(tech){
// Check if API property exists
if (tech.el().vjs_getProperty) {
// If so, tell tech it's ready
tech.triggerReady();
// Otherwise wait longer.
} else {
setTimeout(function(){
vjs.Flash.checkReady(tech);
}, 50);
}
};
// Trigger events from the swf on the player
vjs.Flash['onEvent'] = function(swfID, eventName){
var player = vjs.el(swfID)['player'];
player.trigger(eventName);
};
// Log errors from the swf
vjs.Flash['onError'] = function(swfID, err){
var player = vjs.el(swfID)['player'];
player.trigger('error');
vjs.log('Flash Error', err, swfID);
};
// Flash Version Check
vjs.Flash.version = function(){
var version = '0,0,0';
// IE
try {
version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
// other browsers
} catch(e) {
try {
if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){
version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
}
} catch(err) {}
}
return version.split(',');
};
// Flash embedding method. Only used in non-iframe mode
vjs.Flash.embed = function(swf, placeHolder, flashVars, params, attributes){
var code = vjs.Flash.getEmbedCode(swf, flashVars, params, attributes),
// Get element by embedding code and retrieving created element
obj = vjs.createEl('div', { innerHTML: code }).childNodes[0],
par = placeHolder.parentNode
;
placeHolder.parentNode.replaceChild(obj, placeHolder);
// IE6 seems to have an issue where it won't initialize the swf object after injecting it.
// This is a dumb fix
var newObj = par.childNodes[0];
setTimeout(function(){
newObj.style.display = 'block';
}, 1000);
return obj;
};
vjs.Flash.getEmbedCode = function(swf, flashVars, params, attributes){
var objTag = '<object type="application/x-shockwave-flash"',
flashVarsString = '',
paramsString = '',
attrsString = '';
// Convert flash vars to string
if (flashVars) {
vjs.obj.each(flashVars, function(key, val){
flashVarsString += (key + '=' + val + '&');
});
}
// Add swf, flashVars, and other default params
params = vjs.obj.merge({
'movie': swf,
'flashvars': flashVarsString,
'allowScriptAccess': 'always', // Required to talk to swf
'allowNetworking': 'all' // All should be default, but having security issues.
}, params);
// Create param tags string
vjs.obj.each(params, function(key, val){
paramsString += '<param name="'+key+'" value="'+val+'" />';
});
attributes = vjs.obj.merge({
// Add swf to attributes (need both for IE and Others to work)
'data': swf,
// Default to 100% width/height
'width': '100%',
'height': '100%'
}, attributes);
// Create Attributes string
vjs.obj.each(attributes, function(key, val){
attrsString += (key + '="' + val + '" ');
});
return objTag + attrsString + '>' + paramsString + '</object>';
};
vjs.Flash.streamFromParts = function(connection, stream) {
return connection + '&' + stream;
};
vjs.Flash.streamToParts = function(src) {
var parts = {
connection: '',
stream: ''
};
if (! src) {
return parts;
}
// Look for the normal URL separator we expect, '&'.
// If found, we split the URL into two pieces around the
// first '&'.
var connEnd = src.indexOf('&');
var streamBegin;
if (connEnd !== -1) {
streamBegin = connEnd + 1;
}
else {
// If there's not a '&', we use the last '/' as the delimiter.
connEnd = streamBegin = src.lastIndexOf('/') + 1;
if (connEnd === 0) {
// really, there's not a '/'?
connEnd = streamBegin = src.length;
}
}
parts.connection = src.substring(0, connEnd);
parts.stream = src.substring(streamBegin, src.length);
return parts;
};
vjs.Flash.isStreamingType = function(srcType) {
return srcType in vjs.Flash.streamingFormats;
};
// RTMP has four variations, any string starting
// with one of these protocols should be valid
vjs.Flash.RTMP_RE = /^rtmp[set]?:\/\//i;
vjs.Flash.isStreamingSrc = function(src) {
return vjs.Flash.RTMP_RE.test(src);
};
/**
* The Media Loader is the component that decides which playback technology to load
* when the player is initialized.
*
* @constructor
*/
vjs.MediaLoader = vjs.Component.extend({
/** @constructor */
init: function(player, options, ready){
vjs.Component.call(this, player, options, ready);
// If there are no sources when the player is initialized,
// load the first supported playback technology.
if (!player.options_['sources'] || player.options_['sources'].length === 0) {
for (var i=0,j=player.options_['techOrder']; i<j.length; i++) {
var techName = vjs.capitalize(j[i]),
tech = window['videojs'][techName];
// Check if the browser supports this technology
if (tech && tech.isSupported()) {
player.loadTech(techName);
break;
}
}
} else {
// // Loop through playback technologies (HTML5, Flash) and check for support.
// // Then load the best source.
// // A few assumptions here:
// // All playback technologies respect preload false.
player.src(player.options_['sources']);
}
}
});
/**
* @fileoverview Text Tracks
* Text tracks are tracks of timed text events.
* Captions - text displayed over the video for the hearing impared
* Subtitles - text displayed over the video for those who don't understand langauge in the video
* Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video
* Descriptions (not supported yet) - audio descriptions that are read back to the user by a screen reading device
*/
// Player Additions - Functions add to the player object for easier access to tracks
/**
* List of associated text tracks
* @type {Array}
* @private
*/
vjs.Player.prototype.textTracks_;
/**
* Get an array of associated text tracks. captions, subtitles, chapters, descriptions
* http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks
* @return {Array} Array of track objects
* @private
*/
vjs.Player.prototype.textTracks = function(){
this.textTracks_ = this.textTracks_ || [];
return this.textTracks_;
};
/**
* Add a text track
* In addition to the W3C settings we allow adding additional info through options.
* http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack
* @param {String} kind Captions, subtitles, chapters, descriptions, or metadata
* @param {String=} label Optional label
* @param {String=} language Optional language
* @param {Object=} options Additional track options, like src
* @private
*/
vjs.Player.prototype.addTextTrack = function(kind, label, language, options){
var tracks = this.textTracks_ = this.textTracks_ || [];
options = options || {};
options['kind'] = kind;
options['label'] = label;
options['language'] = language;
// HTML5 Spec says default to subtitles.
// Uppercase first letter to match class names
var Kind = vjs.capitalize(kind || 'subtitles');
// Create correct texttrack class. CaptionsTrack, etc.
var track = new window['videojs'][Kind + 'Track'](this, options);
tracks.push(track);
// If track.dflt() is set, start showing immediately
// TODO: Add a process to deterime the best track to show for the specific kind
// Incase there are mulitple defaulted tracks of the same kind
// Or the user has a set preference of a specific language that should override the default
// if (track.dflt()) {
// this.ready(vjs.bind(track, track.show));
// }
return track;
};
/**
* Add an array of text tracks. captions, subtitles, chapters, descriptions
* Track objects will be stored in the player.textTracks() array
* @param {Array} trackList Array of track elements or objects (fake track elements)
* @private
*/
vjs.Player.prototype.addTextTracks = function(trackList){
var trackObj;
for (var i = 0; i < trackList.length; i++) {
trackObj = trackList[i];
this.addTextTrack(trackObj['kind'], trackObj['label'], trackObj['language'], trackObj);
}
return this;
};
// Show a text track
// disableSameKind: disable all other tracks of the same kind. Value should be a track kind (captions, etc.)
vjs.Player.prototype.showTextTrack = function(id, disableSameKind){
var tracks = this.textTracks_,
i = 0,
j = tracks.length,
track, showTrack, kind;
// Find Track with same ID
for (;i<j;i++) {
track = tracks[i];
if (track.id() === id) {
track.show();
showTrack = track;
// Disable tracks of the same kind
} else if (disableSameKind && track.kind() == disableSameKind && track.mode() > 0) {
track.disable();
}
}
// Get track kind from shown track or disableSameKind
kind = (showTrack) ? showTrack.kind() : ((disableSameKind) ? disableSameKind : false);
// Trigger trackchange event, captionstrackchange, subtitlestrackchange, etc.
if (kind) {
this.trigger(kind+'trackchange');
}
return this;
};
/**
* The base class for all text tracks
*
* Handles the parsing, hiding, and showing of text track cues
*
* @param {vjs.Player|Object} player
* @param {Object=} options
* @constructor
*/
vjs.TextTrack = vjs.Component.extend({
/** @constructor */
init: function(player, options){
vjs.Component.call(this, player, options);
// Apply track info to track object
// Options will often be a track element
// Build ID if one doesn't exist
this.id_ = options['id'] || ('vjs_' + options['kind'] + '_' + options['language'] + '_' + vjs.guid++);
this.src_ = options['src'];
// 'default' is a reserved keyword in js so we use an abbreviated version
this.dflt_ = options['default'] || options['dflt'];
this.title_ = options['title'];
this.language_ = options['srclang'];
this.label_ = options['label'];
this.cues_ = [];
this.activeCues_ = [];
this.readyState_ = 0;
this.mode_ = 0;
this.player_.on('fullscreenchange', vjs.bind(this, this.adjustFontSize));
}
});
/**
* Track kind value. Captions, subtitles, etc.
* @private
*/
vjs.TextTrack.prototype.kind_;
/**
* Get the track kind value
* @return {String}
*/
vjs.TextTrack.prototype.kind = function(){
return this.kind_;
};
/**
* Track src value
* @private
*/
vjs.TextTrack.prototype.src_;
/**
* Get the track src value
* @return {String}
*/
vjs.TextTrack.prototype.src = function(){
return this.src_;
};
/**
* Track default value
* If default is used, subtitles/captions to start showing
* @private
*/
vjs.TextTrack.prototype.dflt_;
/**
* Get the track default value. ('default' is a reserved keyword)
* @return {Boolean}
*/
vjs.TextTrack.prototype.dflt = function(){
return this.dflt_;
};
/**
* Track title value
* @private
*/
vjs.TextTrack.prototype.title_;
/**
* Get the track title value
* @return {String}
*/
vjs.TextTrack.prototype.title = function(){
return this.title_;
};
/**
* Language - two letter string to represent track language, e.g. 'en' for English
* Spec def: readonly attribute DOMString language;
* @private
*/
vjs.TextTrack.prototype.language_;
/**
* Get the track language value
* @return {String}
*/
vjs.TextTrack.prototype.language = function(){
return this.language_;
};
/**
* Track label e.g. 'English'
* Spec def: readonly attribute DOMString label;
* @private
*/
vjs.TextTrack.prototype.label_;
/**
* Get the track label value
* @return {String}
*/
vjs.TextTrack.prototype.label = function(){
return this.label_;
};
/**
* All cues of the track. Cues have a startTime, endTime, text, and other properties.
* Spec def: readonly attribute TextTrackCueList cues;
* @private
*/
vjs.TextTrack.prototype.cues_;
/**
* Get the track cues
* @return {Array}
*/
vjs.TextTrack.prototype.cues = function(){
return this.cues_;
};
/**
* ActiveCues is all cues that are currently showing
* Spec def: readonly attribute TextTrackCueList activeCues;
* @private
*/
vjs.TextTrack.prototype.activeCues_;
/**
* Get the track active cues
* @return {Array}
*/
vjs.TextTrack.prototype.activeCues = function(){
return this.activeCues_;
};
/**
* ReadyState describes if the text file has been loaded
* const unsigned short NONE = 0;
* const unsigned short LOADING = 1;
* const unsigned short LOADED = 2;
* const unsigned short ERROR = 3;
* readonly attribute unsigned short readyState;
* @private
*/
vjs.TextTrack.prototype.readyState_;
/**
* Get the track readyState
* @return {Number}
*/
vjs.TextTrack.prototype.readyState = function(){
return this.readyState_;
};
/**
* Mode describes if the track is showing, hidden, or disabled
* const unsigned short OFF = 0;
* const unsigned short HIDDEN = 1; (still triggering cuechange events, but not visible)
* const unsigned short SHOWING = 2;
* attribute unsigned short mode;
* @private
*/
vjs.TextTrack.prototype.mode_;
/**
* Get the track mode
* @return {Number}
*/
vjs.TextTrack.prototype.mode = function(){
return this.mode_;
};
/**
* Change the font size of the text track to make it larger when playing in fullscreen mode
* and restore it to its normal size when not in fullscreen mode.
*/
vjs.TextTrack.prototype.adjustFontSize = function(){
if (this.player_.isFullScreen()) {
// Scale the font by the same factor as increasing the video width to the full screen window width.
// Additionally, multiply that factor by 1.4, which is the default font size for
// the caption track (from the CSS)
this.el_.style.fontSize = screen.width / this.player_.width() * 1.4 * 100 + '%';
} else {
// Change the font size of the text track back to its original non-fullscreen size
this.el_.style.fontSize = '';
}
};
/**
* Create basic div to hold cue text
* @return {Element}
*/
vjs.TextTrack.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-' + this.kind_ + ' vjs-text-track'
});
};
/**
* Show: Mode Showing (2)
* Indicates that the text track is active. If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
* The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
* In addition, for text tracks whose kind is subtitles or captions, the cues are being displayed over the video as appropriate;
* for text tracks whose kind is descriptions, the user agent is making the cues available to the user in a non-visual fashion;
* and for text tracks whose kind is chapters, the user agent is making available to the user a mechanism by which the user can navigate to any point in the media resource by selecting a cue.
* The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.
* This allows the user agent to override the state if a later track is discovered that is more appropriate per the user's preferences.
*/
vjs.TextTrack.prototype.show = function(){
this.activate();
this.mode_ = 2;
// Show element.
vjs.Component.prototype.show.call(this);
};
/**
* Hide: Mode Hidden (1)
* Indicates that the text track is active, but that the user agent is not actively displaying the cues.
* If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
* The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
*/
vjs.TextTrack.prototype.hide = function(){
// When hidden, cues are still triggered. Disable to stop triggering.
this.activate();
this.mode_ = 1;
// Hide element.
vjs.Component.prototype.hide.call(this);
};
/**
* Disable: Mode Off/Disable (0)
* Indicates that the text track is not active. Other than for the purposes of exposing the track in the DOM, the user agent is ignoring the text track.
* No cues are active, no events are fired, and the user agent will not attempt to obtain the track's cues.
*/
vjs.TextTrack.prototype.disable = function(){
// If showing, hide.
if (this.mode_ == 2) { this.hide(); }
// Stop triggering cues
this.deactivate();
// Switch Mode to Off
this.mode_ = 0;
};
/**
* Turn on cue tracking. Tracks that are showing OR hidden are active.
*/
vjs.TextTrack.prototype.activate = function(){
// Load text file if it hasn't been yet.
if (this.readyState_ === 0) { this.load(); }
// Only activate if not already active.
if (this.mode_ === 0) {
// Update current cue on timeupdate
// Using unique ID for bind function so other tracks don't remove listener
this.player_.on('timeupdate', vjs.bind(this, this.update, this.id_));
// Reset cue time on media end
this.player_.on('ended', vjs.bind(this, this.reset, this.id_));
// Add to display
if (this.kind_ === 'captions' || this.kind_ === 'subtitles') {
this.player_.getChild('textTrackDisplay').addChild(this);
}
}
};
/**
* Turn off cue tracking.
*/
vjs.TextTrack.prototype.deactivate = function(){
// Using unique ID for bind function so other tracks don't remove listener
this.player_.off('timeupdate', vjs.bind(this, this.update, this.id_));
this.player_.off('ended', vjs.bind(this, this.reset, this.id_));
this.reset(); // Reset
// Remove from display
this.player_.getChild('textTrackDisplay').removeChild(this);
};
// A readiness state
// One of the following:
//
// Not loaded
// Indicates that the text track is known to exist (e.g. it has been declared with a track element), but its cues have not been obtained.
//
// Loading
// Indicates that the text track is loading and there have been no fatal errors encountered so far. Further cues might still be added to the track.
//
// Loaded
// Indicates that the text track has been loaded with no fatal errors. No new cues will be added to the track except if the text track corresponds to a MutableTextTrack object.
//
// Failed to load
// Indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way (e.g. URL could not be resolved, network error, unknown text track format). Some or all of the cues are likely missing and will not be obtained.
vjs.TextTrack.prototype.load = function(){
// Only load if not loaded yet.
if (this.readyState_ === 0) {
this.readyState_ = 1;
vjs.get(this.src_, vjs.bind(this, this.parseCues), vjs.bind(this, this.onError));
}
};
vjs.TextTrack.prototype.onError = function(err){
this.error = err;
this.readyState_ = 3;
this.trigger('error');
};
// Parse the WebVTT text format for cue times.
// TODO: Separate parser into own class so alternative timed text formats can be used. (TTML, DFXP)
vjs.TextTrack.prototype.parseCues = function(srcContent) {
var cue, time, text,
lines = srcContent.split('\n'),
line = '', id;
for (var i=1, j=lines.length; i<j; i++) {
// Line 0 should be 'WEBVTT', so skipping i=0
line = vjs.trim(lines[i]); // Trim whitespace and linebreaks
if (line) { // Loop until a line with content
// First line could be an optional cue ID
// Check if line has the time separator
if (line.indexOf('-->') == -1) {
id = line;
// Advance to next line for timing.
line = vjs.trim(lines[++i]);
} else {
id = this.cues_.length;
}
// First line - Number
cue = {
id: id, // Cue Number
index: this.cues_.length // Position in Array
};
// Timing line
time = line.split(' --> ');
cue.startTime = this.parseCueTime(time[0]);
cue.endTime = this.parseCueTime(time[1]);
// Additional lines - Cue Text
text = [];
// Loop until a blank line or end of lines
// Assumeing trim('') returns false for blank lines
while (lines[++i] && (line = vjs.trim(lines[i]))) {
text.push(line);
}
cue.text = text.join('<br/>');
// Add this cue
this.cues_.push(cue);
}
}
this.readyState_ = 2;
this.trigger('loaded');
};
vjs.TextTrack.prototype.parseCueTime = function(timeText) {
var parts = timeText.split(':'),
time = 0,
hours, minutes, other, seconds, ms;
// Check if optional hours place is included
// 00:00:00.000 vs. 00:00.000
if (parts.length == 3) {
hours = parts[0];
minutes = parts[1];
other = parts[2];
} else {
hours = 0;
minutes = parts[0];
other = parts[1];
}
// Break other (seconds, milliseconds, and flags) by spaces
// TODO: Make additional cue layout settings work with flags
other = other.split(/\s+/);
// Remove seconds. Seconds is the first part before any spaces.
seconds = other.splice(0,1)[0];
// Could use either . or , for decimal
seconds = seconds.split(/\.|,/);
// Get milliseconds
ms = parseFloat(seconds[1]);
seconds = seconds[0];
// hours => seconds
time += parseFloat(hours) * 3600;
// minutes => seconds
time += parseFloat(minutes) * 60;
// Add seconds
time += parseFloat(seconds);
// Add milliseconds
if (ms) { time += ms/1000; }
return time;
};
// Update active cues whenever timeupdate events are triggered on the player.
vjs.TextTrack.prototype.update = function(){
if (this.cues_.length > 0) {
// Get curent player time
var time = this.player_.currentTime();
// Check if the new time is outside the time box created by the the last update.
if (this.prevChange === undefined || time < this.prevChange || this.nextChange <= time) {
var cues = this.cues_,
// Create a new time box for this state.
newNextChange = this.player_.duration(), // Start at beginning of the timeline
newPrevChange = 0, // Start at end
reverse = false, // Set the direction of the loop through the cues. Optimized the cue check.
newCues = [], // Store new active cues.
// Store where in the loop the current active cues are, to provide a smart starting point for the next loop.
firstActiveIndex, lastActiveIndex,
cue, i; // Loop vars
// Check if time is going forwards or backwards (scrubbing/rewinding)
// If we know the direction we can optimize the starting position and direction of the loop through the cues array.
if (time >= this.nextChange || this.nextChange === undefined) { // NextChange should happen
// Forwards, so start at the index of the first active cue and loop forward
i = (this.firstActiveIndex !== undefined) ? this.firstActiveIndex : 0;
} else {
// Backwards, so start at the index of the last active cue and loop backward
reverse = true;
i = (this.lastActiveIndex !== undefined) ? this.lastActiveIndex : cues.length - 1;
}
while (true) { // Loop until broken
cue = cues[i];
// Cue ended at this point
if (cue.endTime <= time) {
newPrevChange = Math.max(newPrevChange, cue.endTime);
if (cue.active) {
cue.active = false;
}
// No earlier cues should have an active start time.
// Nevermind. Assume first cue could have a duration the same as the video.
// In that case we need to loop all the way back to the beginning.
// if (reverse && cue.startTime) { break; }
// Cue hasn't started
} else if (time < cue.startTime) {
newNextChange = Math.min(newNextChange, cue.startTime);
if (cue.active) {
cue.active = false;
}
// No later cues should have an active start time.
if (!reverse) { break; }
// Cue is current
} else {
if (reverse) {
// Add cue to front of array to keep in time order
newCues.splice(0,0,cue);
// If in reverse, the first current cue is our lastActiveCue
if (lastActiveIndex === undefined) { lastActiveIndex = i; }
firstActiveIndex = i;
} else {
// Add cue to end of array
newCues.push(cue);
// If forward, the first current cue is our firstActiveIndex
if (firstActiveIndex === undefined) { firstActiveIndex = i; }
lastActiveIndex = i;
}
newNextChange = Math.min(newNextChange, cue.endTime);
newPrevChange = Math.max(newPrevChange, cue.startTime);
cue.active = true;
}
if (reverse) {
// Reverse down the array of cues, break if at first
if (i === 0) { break; } else { i--; }
} else {
// Walk up the array fo cues, break if at last
if (i === cues.length - 1) { break; } else { i++; }
}
}
this.activeCues_ = newCues;
this.nextChange = newNextChange;
this.prevChange = newPrevChange;
this.firstActiveIndex = firstActiveIndex;
this.lastActiveIndex = lastActiveIndex;
this.updateDisplay();
this.trigger('cuechange');
}
}
};
// Add cue HTML to display
vjs.TextTrack.prototype.updateDisplay = function(){
var cues = this.activeCues_,
html = '',
i=0,j=cues.length;
for (;i<j;i++) {
html += '<span class="vjs-tt-cue">'+cues[i].text+'</span>';
}
this.el_.innerHTML = html;
};
// Set all loop helper values back
vjs.TextTrack.prototype.reset = function(){
this.nextChange = 0;
this.prevChange = this.player_.duration();
this.firstActiveIndex = 0;
this.lastActiveIndex = 0;
};
// Create specific track types
/**
* The track component for managing the hiding and showing of captions
*
* @constructor
*/
vjs.CaptionsTrack = vjs.TextTrack.extend();
vjs.CaptionsTrack.prototype.kind_ = 'captions';
// Exporting here because Track creation requires the track kind
// to be available on global object. e.g. new window['videojs'][Kind + 'Track']
/**
* The track component for managing the hiding and showing of subtitles
*
* @constructor
*/
vjs.SubtitlesTrack = vjs.TextTrack.extend();
vjs.SubtitlesTrack.prototype.kind_ = 'subtitles';
/**
* The track component for managing the hiding and showing of chapters
*
* @constructor
*/
vjs.ChaptersTrack = vjs.TextTrack.extend();
vjs.ChaptersTrack.prototype.kind_ = 'chapters';
/* Text Track Display
============================================================================= */
// Global container for both subtitle and captions text. Simple div container.
/**
* The component for displaying text track cues
*
* @constructor
*/
vjs.TextTrackDisplay = vjs.Component.extend({
/** @constructor */
init: function(player, options, ready){
vjs.Component.call(this, player, options, ready);
// This used to be called during player init, but was causing an error
// if a track should show by default and the display hadn't loaded yet.
// Should probably be moved to an external track loader when we support
// tracks that don't need a display.
if (player.options_['tracks'] && player.options_['tracks'].length > 0) {
this.player_.addTextTracks(player.options_['tracks']);
}
}
});
vjs.TextTrackDisplay.prototype.createEl = function(){
return vjs.Component.prototype.createEl.call(this, 'div', {
className: 'vjs-text-track-display'
});
};
/**
* The specific menu item type for selecting a language within a text track kind
*
* @constructor
*/
vjs.TextTrackMenuItem = vjs.MenuItem.extend({
/** @constructor */
init: function(player, options){
var track = this.track = options['track'];
// Modify options for parent MenuItem class's init.
options['label'] = track.label();
options['selected'] = track.dflt();
vjs.MenuItem.call(this, player, options);
this.player_.on(track.kind() + 'trackchange', vjs.bind(this, this.update));
}
});
vjs.TextTrackMenuItem.prototype.onClick = function(){
vjs.MenuItem.prototype.onClick.call(this);
this.player_.showTextTrack(this.track.id_, this.track.kind());
};
vjs.TextTrackMenuItem.prototype.update = function(){
this.selected(this.track.mode() == 2);
};
/**
* A special menu item for turning of a specific type of text track
*
* @constructor
*/
vjs.OffTextTrackMenuItem = vjs.TextTrackMenuItem.extend({
/** @constructor */
init: function(player, options){
// Create pseudo track info
// Requires options['kind']
options['track'] = {
kind: function() { return options['kind']; },
player: player,
label: function(){ return options['kind'] + ' off'; },
dflt: function(){ return false; },
mode: function(){ return false; }
};
vjs.TextTrackMenuItem.call(this, player, options);
this.selected(true);
}
});
vjs.OffTextTrackMenuItem.prototype.onClick = function(){
vjs.TextTrackMenuItem.prototype.onClick.call(this);
this.player_.showTextTrack(this.track.id_, this.track.kind());
};
vjs.OffTextTrackMenuItem.prototype.update = function(){
var tracks = this.player_.textTracks(),
i=0, j=tracks.length, track,
off = true;
for (;i<j;i++) {
track = tracks[i];
if (track.kind() == this.track.kind() && track.mode() == 2) {
off = false;
}
}
this.selected(off);
};
/**
* The base class for buttons that toggle specific text track types (e.g. subtitles)
*
* @constructor
*/
vjs.TextTrackButton = vjs.MenuButton.extend({
/** @constructor */
init: function(player, options){
vjs.MenuButton.call(this, player, options);
if (this.items.length <= 1) {
this.hide();
}
}
});
// vjs.TextTrackButton.prototype.buttonPressed = false;
// vjs.TextTrackButton.prototype.createMenu = function(){
// var menu = new vjs.Menu(this.player_);
// // Add a title list item to the top
// // menu.el().appendChild(vjs.createEl('li', {
// // className: 'vjs-menu-title',
// // innerHTML: vjs.capitalize(this.kind_),
// // tabindex: -1
// // }));
// this.items = this.createItems();
// // Add menu items to the menu
// for (var i = 0; i < this.items.length; i++) {
// menu.addItem(this.items[i]);
// }
// // Add list to element
// this.addChild(menu);
// return menu;
// };
// Create a menu item for each text track
vjs.TextTrackButton.prototype.createItems = function(){
var items = [], track;
// Add an OFF menu item to turn all tracks off
items.push(new vjs.OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));
for (var i = 0; i < this.player_.textTracks().length; i++) {
track = this.player_.textTracks()[i];
if (track.kind() === this.kind_) {
items.push(new vjs.TextTrackMenuItem(this.player_, {
'track': track
}));
}
}
return items;
};
/**
* The button component for toggling and selecting captions
*
* @constructor
*/
vjs.CaptionsButton = vjs.TextTrackButton.extend({
/** @constructor */
init: function(player, options, ready){
vjs.TextTrackButton.call(this, player, options, ready);
this.el_.setAttribute('aria-label','Captions Menu');
}
});
vjs.CaptionsButton.prototype.kind_ = 'captions';
vjs.CaptionsButton.prototype.buttonText = 'Captions';
vjs.CaptionsButton.prototype.className = 'vjs-captions-button';
/**
* The button component for toggling and selecting subtitles
*
* @constructor
*/
vjs.SubtitlesButton = vjs.TextTrackButton.extend({
/** @constructor */
init: function(player, options, ready){
vjs.TextTrackButton.call(this, player, options, ready);
this.el_.setAttribute('aria-label','Subtitles Menu');
}
});
vjs.SubtitlesButton.prototype.kind_ = 'subtitles';
vjs.SubtitlesButton.prototype.buttonText = 'Subtitles';
vjs.SubtitlesButton.prototype.className = 'vjs-subtitles-button';
// Chapters act much differently than other text tracks
// Cues are navigation vs. other tracks of alternative languages
/**
* The button component for toggling and selecting chapters
*
* @constructor
*/
vjs.ChaptersButton = vjs.TextTrackButton.extend({
/** @constructor */
init: function(player, options, ready){
vjs.TextTrackButton.call(this, player, options, ready);
this.el_.setAttribute('aria-label','Chapters Menu');
}
});
vjs.ChaptersButton.prototype.kind_ = 'chapters';
vjs.ChaptersButton.prototype.buttonText = 'Chapters';
vjs.ChaptersButton.prototype.className = 'vjs-chapters-button';
// Create a menu item for each text track
vjs.ChaptersButton.prototype.createItems = function(){
var items = [], track;
for (var i = 0; i < this.player_.textTracks().length; i++) {
track = this.player_.textTracks()[i];
if (track.kind() === this.kind_) {
items.push(new vjs.TextTrackMenuItem(this.player_, {
'track': track
}));
}
}
return items;
};
vjs.ChaptersButton.prototype.createMenu = function(){
var tracks = this.player_.textTracks(),
i = 0,
j = tracks.length,
track, chaptersTrack,
items = this.items = [];
for (;i<j;i++) {
track = tracks[i];
if (track.kind() == this.kind_ && track.dflt()) {
if (track.readyState() < 2) {
this.chaptersTrack = track;
track.on('loaded', vjs.bind(this, this.createMenu));
return;
} else {
chaptersTrack = track;
break;
}
}
}
var menu = this.menu = new vjs.Menu(this.player_);
menu.el_.appendChild(vjs.createEl('li', {
className: 'vjs-menu-title',
innerHTML: vjs.capitalize(this.kind_),
tabindex: -1
}));
if (chaptersTrack) {
var cues = chaptersTrack.cues_, cue, mi;
i = 0;
j = cues.length;
for (;i<j;i++) {
cue = cues[i];
mi = new vjs.ChaptersTrackMenuItem(this.player_, {
'track': chaptersTrack,
'cue': cue
});
items.push(mi);
menu.addChild(mi);
}
}
if (this.items.length > 0) {
this.show();
}
return menu;
};
/**
* @constructor
*/
vjs.ChaptersTrackMenuItem = vjs.MenuItem.extend({
/** @constructor */
init: function(player, options){
var track = this.track = options['track'],
cue = this.cue = options['cue'],
currentTime = player.currentTime();
// Modify options for parent MenuItem class's init.
options['label'] = cue.text;
options['selected'] = (cue.startTime <= currentTime && currentTime < cue.endTime);
vjs.MenuItem.call(this, player, options);
track.on('cuechange', vjs.bind(this, this.update));
}
});
vjs.ChaptersTrackMenuItem.prototype.onClick = function(){
vjs.MenuItem.prototype.onClick.call(this);
this.player_.currentTime(this.cue.startTime);
this.update(this.cue.startTime);
};
vjs.ChaptersTrackMenuItem.prototype.update = function(){
var cue = this.cue,
currentTime = this.player_.currentTime();
// vjs.log(currentTime, cue.startTime);
this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);
};
// Add Buttons to controlBar
vjs.obj.merge(vjs.ControlBar.prototype.options_['children'], {
'subtitlesButton': {},
'captionsButton': {},
'chaptersButton': {}
});
// vjs.Cue = vjs.Component.extend({
// /** @constructor */
// init: function(player, options){
// vjs.Component.call(this, player, options);
// }
// });
/**
* @fileoverview Add JSON support
* @suppress {undefinedVars}
* (Compiler doesn't like JSON not being declared)
*/
/**
* Javascript JSON implementation
* (Parse Method Only)
* https://github.com/douglascrockford/JSON-js/blob/master/json2.js
* Only using for parse method when parsing data-setup attribute JSON.
* @suppress {undefinedVars}
* @namespace
* @private
*/
vjs.JSON;
if (typeof window.JSON !== 'undefined' && window.JSON.parse === 'function') {
vjs.JSON = window.JSON;
} else {
vjs.JSON = {};
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
/**
* parse the json
*
* @memberof vjs.JSON
* @param {String} text The JSON string to parse
* @param {Function=} [reviver] Optional function that can transform the results
* @return {Object|Array} The parsed JSON
*/
vjs.JSON.parse = function (text, reviver) {
var j;
function walk(holder, key) {
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
j = eval('(' + text + ')');
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
throw new SyntaxError('JSON.parse(): invalid or malformed JSON data');
};
}
/**
* @fileoverview Functions for automatically setting up a player
* based on the data-setup attribute of the video tag
*/
// Automatically set up any tags that have a data-setup attribute
vjs.autoSetup = function(){
var options, vid, player,
vids = document.getElementsByTagName('video');
// Check if any media elements exist
if (vids && vids.length > 0) {
for (var i=0,j=vids.length; i<j; i++) {
vid = vids[i];
// Check if element exists, has getAttribute func.
// IE seems to consider typeof el.getAttribute == 'object' instead of 'function' like expected, at least when loading the player immediately.
if (vid && vid.getAttribute) {
// Make sure this player hasn't already been set up.
if (vid['player'] === undefined) {
options = vid.getAttribute('data-setup');
// Check if data-setup attr exists.
// We only auto-setup if they've added the data-setup attr.
if (options !== null) {
// Parse options JSON
// If empty string, make it a parsable json object.
options = vjs.JSON.parse(options || '{}');
// Create new video.js instance.
player = videojs(vid, options);
}
}
// If getAttribute isn't defined, we need to wait for the DOM.
} else {
vjs.autoSetupTimeout(1);
break;
}
}
// No videos were found, so keep looping unless page is finisehd loading.
} else if (!vjs.windowLoaded) {
vjs.autoSetupTimeout(1);
}
};
// Pause to let the DOM keep processing
vjs.autoSetupTimeout = function(wait){
setTimeout(vjs.autoSetup, wait);
};
if (document.readyState === 'complete') {
vjs.windowLoaded = true;
} else {
vjs.one(window, 'load', function(){
vjs.windowLoaded = true;
});
}
// Run Auto-load players
// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)
vjs.autoSetupTimeout(1);
/**
* the method for registering a video.js plugin
*
* @param {String} name The name of the plugin
* @param {Function} init The function that is run when the player inits
*/
vjs.plugin = function(name, init){
vjs.Player.prototype[name] = init;
};
|
ajax/libs/yui/3.7.1/scrollview-base/scrollview-base-debug.js | smcguinness/cdnjs | YUI.add('scrollview-base', function (Y, NAME) {
/**
* The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators
*
* @module scrollview
* @submodule scrollview-base
*/
var getClassName = Y.ClassNameManager.getClassName,
DOCUMENT = Y.config.doc,
WINDOW = Y.config.win,
IE = Y.UA.ie,
NATIVE_TRANSITIONS = Y.Transition.useNative,
SCROLLVIEW = 'scrollview',
CLASS_NAMES = {
vertical: getClassName(SCROLLVIEW, 'vert'),
horizontal: getClassName(SCROLLVIEW, 'horiz')
},
EV_SCROLL_END = 'scrollEnd',
FLICK = 'flick',
DRAG = 'drag',
MOUSEWHEEL = 'mousewheel',
UI = 'ui',
TOP = 'top',
RIGHT = 'right',
BOTTOM = 'bottom',
LEFT = 'left',
PX = 'px',
AXIS = 'axis',
SCROLL_Y = 'scrollY',
SCROLL_X = 'scrollX',
BOUNCE = 'bounce',
DISABLED = 'disabled',
DECELERATION = 'deceleration',
DIM_X = 'x',
DIM_Y = 'y',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
GESTURE_MOVE = 'gesturemove',
START = 'start',
END = 'end',
EMPTY = '',
ZERO = '0s',
SNAP_DURATION = 'snapDuration',
SNAP_EASING = 'snapEasing',
EASING = 'easing',
FRAME_DURATION = 'frameDuration',
BOUNCE_RANGE = 'bounceRange',
_constrain = function (val, min, max) {
return Math.min(Math.max(val, min), max);
};
/**
* ScrollView provides a scrollable widget, supporting flick gestures,
* across both touch and mouse based devices.
*
* @class ScrollView
* @param config {Object} Object literal with initial attribute values
* @extends Widget
* @constructor
*/
function ScrollView() {
ScrollView.superclass.constructor.apply(this, arguments);
}
Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// *** Y.ScrollView prototype
/**
* Flag driving whether or not we should try and force H/W acceleration when transforming. Currently enabled by default for Webkit.
* Used by the _transform method.
*
* @property _forceHWTransforms
* @type boolean
* @protected
*/
_forceHWTransforms: Y.UA.webkit ? true : false,
/**
* <p>Used to control whether or not ScrollView's internal
* gesturemovestart, gesturemove and gesturemoveend
* event listeners should preventDefault. The value is an
* object, with "start", "move" and "end" properties used to
* specify which events should preventDefault and which shouldn't:</p>
*
* <pre>
* {
* start: false,
* move: true,
* end: false
* }
* </pre>
*
* <p>The default values are set up in order to prevent panning,
* on touch devices, while allowing click listeners on elements inside
* the ScrollView to be notified as expected.</p>
*
* @property _prevent
* @type Object
* @protected
*/
_prevent: {
start: false,
move: true,
end: false
},
/**
* Contains the distance (postive or negative) in pixels by which
* the scrollview was last scrolled. This is useful when setting up
* click listeners on the scrollview content, which on mouse based
* devices are always fired, even after a drag/flick.
*
* <p>Touch based devices don't currently fire a click event,
* if the finger has been moved (beyond a threshold) so this
* check isn't required, if working in a purely touch based environment</p>
*
* @property lastScrolledAmt
* @type Number
* @public
* @default 0
*/
lastScrolledAmt: 0,
/**
* Designated initializer
*
* @method initializer
* @param {config} Configuration object for the plugin
*/
initializer: function (config) {
var sv = this;
// Cache these values, since they aren't going to change.
sv._bb = sv.get(BOUNDING_BOX);
sv._cb = sv.get(CONTENT_BOX);
// Cache some attributes
sv._cAxis = sv.get(AXIS);
sv._cBounce = sv.get(BOUNCE);
sv._cBounceRange = sv.get(BOUNCE_RANGE);
sv._cDeceleration = sv.get(DECELERATION);
sv._cFrameDuration = sv.get(FRAME_DURATION);
},
/**
* bindUI implementation
*
* Hooks up events for the widget
* @method bindUI
*/
bindUI: function () {
var sv = this;
// Bind interaction listers
sv._bindFlick(sv.get(FLICK));
sv._bindDrag(sv.get(DRAG));
sv._bindMousewheel(true);
// Bind change events
sv._bindAttrs();
// IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release.
if (IE) {
sv._fixIESelect(sv._bb, sv._cb);
}
// Set any deprecated static properties
if (ScrollView.SNAP_DURATION) {
sv.set(SNAP_DURATION, ScrollView.SNAP_DURATION);
}
if (ScrollView.SNAP_EASING) {
sv.set(SNAP_EASING, ScrollView.SNAP_EASING);
}
if (ScrollView.EASING) {
sv.set(EASING, ScrollView.EASING);
}
if (ScrollView.FRAME_STEP) {
sv.set(FRAME_DURATION, ScrollView.FRAME_STEP);
}
if (ScrollView.BOUNCE_RANGE) {
sv.set(BOUNCE_RANGE, ScrollView.BOUNCE_RANGE);
}
// Recalculate dimension properties
// TODO: This should be throttled.
// Y.one(WINDOW).after('resize', sv._afterDimChange, sv);
},
/**
* Bind event listeners
*
* @method _bindAttrs
* @private
*/
_bindAttrs: function () {
var sv = this,
scrollChangeHandler = sv._afterScrollChange,
dimChangeHandler = sv._afterDimChange;
// Bind any change event listeners
sv.after({
'scrollEnd': sv._afterScrollEnd,
'disabledChange': sv._afterDisabledChange,
'flickChange': sv._afterFlickChange,
'dragChange': sv._afterDragChange,
'axisChange': sv._afterAxisChange,
'scrollYChange': scrollChangeHandler,
'scrollXChange': scrollChangeHandler,
'heightChange': dimChangeHandler,
'widthChange': dimChangeHandler
});
},
/**
* Bind (or unbind) gesture move listeners required for drag support
*
* @method _bindDrag
* @param drag {boolean} If true, the method binds listener to enable drag (gesturemovestart). If false, the method unbinds gesturemove listeners for drag support.
* @private
*/
_bindDrag: function (drag) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'drag' listeners
bb.detach(DRAG + '|*');
if (drag) {
bb.on(DRAG + '|' + GESTURE_MOVE + START, Y.bind(sv._onGestureMoveStart, sv));
}
},
/**
* Bind (or unbind) flick listeners.
*
* @method _bindFlick
* @param flick {Object|boolean} If truthy, the method binds listeners for flick support. If false, the method unbinds flick listeners.
* @private
*/
_bindFlick: function (flick) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'flick' listeners
bb.detach(FLICK + '|*');
if (flick) {
bb.on(FLICK + '|' + FLICK, Y.bind(sv._flick, sv), flick);
// Rebind Drag, becuase _onGestureMoveEnd always has to fire -after- _flick
sv._bindDrag(sv.get(DRAG));
}
},
/**
* Bind (or unbind) mousewheel listeners.
*
* @method _bindMousewheel
* @param mousewheel {Object|boolean} If truthy, the method binds listeners for mousewheel support. If false, the method unbinds mousewheel listeners.
* @private
*/
_bindMousewheel: function (mousewheel) {
var sv = this,
bb = sv._bb;
// Unbind any previous 'mousewheel' listeners
bb.detach(MOUSEWHEEL + '|*');
// Only enable for vertical scrollviews
if (mousewheel) {
// Bound to document, because that's where mousewheel events fire off of.
Y.one(DOCUMENT).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv));
}
},
/**
* syncUI implementation.
*
* Update the scroll position, based on the current value of scrollX/scrollY.
*
* @method syncUI
*/
syncUI: function () {
var sv = this,
scrollDims = sv._getScrollDims(),
width = scrollDims.offsetWidth,
height = scrollDims.offsetHeight,
scrollWidth = scrollDims.scrollWidth,
scrollHeight = scrollDims.scrollHeight;
// If the axis is undefined, auto-calculate it
if (sv._cAxis === undefined) {
// This should only ever be run once (for now).
// In the future SV might post-load axis changes
sv._cAxis = {
x: (scrollWidth > width),
y: (scrollHeight > height)
};
sv._set(AXIS, sv._cAxis);
}
// get text direction on or inherited by scrollview node
sv.rtl = (sv._cb.getComputedStyle('direction') === 'rtl');
// Cache the disabled value
sv._cDisabled = sv.get(DISABLED);
// Run this to set initial values
sv._uiDimensionsChange();
// If we're out-of-bounds, snap back.
if (sv._isOutOfBounds()) {
sv._snapBack();
}
},
/**
* Utility method to obtain widget dimensions
*
* @method _getScrollDims
* @returns {Object} The offsetWidth, offsetHeight, scrollWidth and scrollHeight as an array: [offsetWidth, offsetHeight, scrollWidth, scrollHeight]
* @private
*/
_getScrollDims: function () {
var sv = this,
cb = sv._cb,
bb = sv._bb,
TRANS = ScrollView._TRANSITION,
// Ideally using CSSMatrix - don't think we have it normalized yet though.
// origX = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).e,
// origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f,
origX = sv.get(SCROLL_X),
origY = sv.get(SCROLL_Y),
origHWTransform,
dims;
// TODO: Is this OK? Just in case it's called 'during' a transition.
if (NATIVE_TRANSITIONS) {
cb.setStyle(TRANS.DURATION, ZERO);
cb.setStyle(TRANS.PROPERTY, EMPTY);
}
origHWTransform = sv._forceHWTransforms;
sv._forceHWTransforms = false; // the z translation was causing issues with picking up accurate scrollWidths in Chrome/Mac.
sv._moveTo(cb, 0, 0);
dims = {
'offsetWidth': bb.get('offsetWidth'),
'offsetHeight': bb.get('offsetHeight'),
'scrollWidth': bb.get('scrollWidth'),
'scrollHeight': bb.get('scrollHeight')
};
sv._moveTo(cb, -(origX), -(origY));
sv._forceHWTransforms = origHWTransform;
return dims;
},
/**
* This method gets invoked whenever the height or width attributes change,
* allowing us to determine which scrolling axes need to be enabled.
*
* @method _uiDimensionsChange
* @protected
*/
_uiDimensionsChange: function () {
var sv = this,
bb = sv._bb,
scrollDims = sv._getScrollDims(),
width = scrollDims.offsetWidth,
height = scrollDims.offsetHeight,
scrollWidth = scrollDims.scrollWidth,
scrollHeight = scrollDims.scrollHeight,
rtl = sv.rtl,
svAxis = sv._cAxis;
if (svAxis && svAxis.x) {
bb.addClass(CLASS_NAMES.horizontal);
}
if (svAxis && svAxis.y) {
bb.addClass(CLASS_NAMES.vertical);
}
/**
* Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis
*
* @property _minScrollX
* @type number
* @protected
*/
sv._minScrollX = (rtl) ? Math.min(0, -(scrollWidth - width)) : 0;
/**
* Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis
*
* @property _maxScrollX
* @type number
* @protected
*/
sv._maxScrollX = (rtl) ? 0 : Math.max(0, scrollWidth - width);
/**
* Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis
*
* @property _minScrollY
* @type number
* @protected
*/
sv._minScrollY = 0;
/**
* Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis
*
* @property _maxScrollY
* @type number
* @protected
*/
sv._maxScrollY = Math.max(0, scrollHeight - height);
},
/**
* Scroll the element to a given xy coordinate
*
* @method scrollTo
* @param x {Number} The x-position to scroll to. (null for no movement)
* @param y {Number} The y-position to scroll to. (null for no movement)
* @param {Number} [duration] ms of the scroll animation. (default is 0)
* @param {String} [easing] An easing equation if duration is set. (default is `easing` attribute)
* @param {String} [node] The node to transform. Setting this can be useful in dual-axis paginated instances. (default is the instance's contentBox)
*/
scrollTo: function (x, y, duration, easing, node) {
// Check to see if widget is disabled
if (this._cDisabled) {
return;
}
var sv = this,
cb = sv._cb,
TRANS = ScrollView._TRANSITION,
callback = Y.bind(sv._onTransEnd, sv), // @Todo : cache this
newX = 0,
newY = 0,
transition = {},
transform;
// default the optional arguments
duration = duration || 0;
easing = easing || sv.get(EASING); // @TODO: Cache this
node = node || cb;
if (x !== null) {
sv.set(SCROLL_X, x, {src:UI});
newX = -(x);
}
if (y !== null) {
sv.set(SCROLL_Y, y, {src:UI});
newY = -(y);
}
transform = sv._transform(newX, newY);
if (NATIVE_TRANSITIONS) {
// ANDROID WORKAROUND - try and stop existing transition, before kicking off new one.
node.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY);
}
// Move
if (duration === 0) {
if (NATIVE_TRANSITIONS) {
node.setStyle('transform', transform);
}
else {
// TODO: If both set, batch them in the same update
// Update: Nope, setStyles() just loops through each property and applies it.
if (x !== null) {
node.setStyle(LEFT, newX + PX);
}
if (y !== null) {
node.setStyle(TOP, newY + PX);
}
}
}
// Animate
else {
transition.easing = easing;
transition.duration = duration / 1000;
if (NATIVE_TRANSITIONS) {
transition.transform = transform;
}
else {
transition.left = newX + PX;
transition.top = newY + PX;
}
node.transition(transition, callback);
}
},
/**
* Utility method, to create the translate transform string with the
* x, y translation amounts provided.
*
* @method _transform
* @param {Number} x Number of pixels to translate along the x axis
* @param {Number} y Number of pixels to translate along the y axis
* @private
*/
_transform: function (x, y) {
// TODO: Would we be better off using a Matrix for this?
var prop = 'translate(' + x + 'px, ' + y + 'px)';
if (this._forceHWTransforms) {
prop += ' translateZ(0)';
}
return prop;
},
/**
* Utility method, to move the given element to the given xy position
*
* @method _moveTo
* @param node {Node} The node to move
* @param x {Number} The x-position to move to
* @param y {Number} The y-position to move to
* @private
*/
_moveTo : function(node, x, y) {
if (NATIVE_TRANSITIONS) {
node.setStyle('transform', this._transform(x, y));
} else {
node.setStyle(LEFT, x + PX);
node.setStyle(TOP, y + PX);
}
},
/**
* Content box transition callback
*
* @method _onTransEnd
* @param {Event.Facade} e The event facade
* @private
*/
_onTransEnd: function (e) {
var sv = this;
/**
* Notification event fired at the end of a scroll transition
*
* @event scrollEnd
* @param e {EventFacade} The default event facade.
*/
sv.fire(EV_SCROLL_END);
},
/**
* gesturemovestart event handler
*
* @method _onGestureMoveStart
* @param e {Event.Facade} The gesturemovestart event facade
* @private
*/
_onGestureMoveStart: function (e) {
if (this._cDisabled) {
return false;
}
var sv = this,
bb = sv._bb,
currentX = sv.get(SCROLL_X),
currentY = sv.get(SCROLL_Y),
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.start) {
e.preventDefault();
}
// if a flick animation is in progress, cancel it
if (sv._flickAnim) {
// Cancel and delete sv._flickAnim
sv._flickAnim.cancel();
delete sv._flickAnim;
sv._onTransEnd();
}
// TODO: Review if neccesary (#2530129)
e.stopPropagation();
// Reset lastScrolledAmt
sv.lastScrolledAmt = 0;
// Stores data for this gesture cycle. Cleaned up later
sv._gesture = {
// Will hold the axis value
axis: null,
// The current attribute values
startX: currentX,
startY: currentY,
// The X/Y coordinates where the event began
startClientX: clientX,
startClientY: clientY,
// The X/Y coordinates where the event will end
endClientX: null,
endClientY: null,
// The current delta of the event
deltaX: null,
deltaY: null,
// Will be populated for flicks
flick: null,
// Create some listeners for the rest of the gesture cycle
onGestureMove: bb.on(DRAG + '|' + GESTURE_MOVE, Y.bind(sv._onGestureMove, sv)),
// @TODO: Don't bind gestureMoveEnd if it's a Flick?
onGestureMoveEnd: bb.on(DRAG + '|' + GESTURE_MOVE + END, Y.bind(sv._onGestureMoveEnd, sv))
};
},
/**
* gesturemove event handler
*
* @method _onGestureMove
* @param e {Event.Facade} The gesturemove event facade
* @private
*/
_onGestureMove: function (e) {
var sv = this,
gesture = sv._gesture,
svAxis = sv._cAxis,
svAxisX = svAxis.x,
svAxisY = svAxis.y,
startX = gesture.startX,
startY = gesture.startY,
startClientX = gesture.startClientX,
startClientY = gesture.startClientY,
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.move) {
e.preventDefault();
}
gesture.deltaX = startClientX - clientX;
gesture.deltaY = startClientY - clientY;
// Determine if this is a vertical or horizontal movement
// @TODO: This is crude, but it works. Investigate more intelligent ways to detect intent
if (gesture.axis === null) {
gesture.axis = (Math.abs(gesture.deltaX) > Math.abs(gesture.deltaY)) ? DIM_X : DIM_Y;
}
// Move X or Y. @TODO: Move both if dualaxis.
if (gesture.axis === DIM_X && svAxisX) {
sv.set(SCROLL_X, startX + gesture.deltaX);
}
else if (gesture.axis === DIM_Y && svAxisY) {
sv.set(SCROLL_Y, startY + gesture.deltaY);
}
},
/**
* gesturemoveend event handler
*
* @method _onGestureMoveEnd
* @param e {Event.Facade} The gesturemoveend event facade
* @private
*/
_onGestureMoveEnd: function (e) {
var sv = this,
gesture = sv._gesture,
flick = gesture.flick,
clientX = e.clientX,
clientY = e.clientY;
if (sv._prevent.end) {
e.preventDefault();
}
// Store the end X/Y coordinates
gesture.endClientX = clientX;
gesture.endClientY = clientY;
// Cleanup the event handlers
gesture.onGestureMove.detach();
gesture.onGestureMoveEnd.detach();
// If this wasn't a flick, wrap up the gesture cycle
if (!flick) {
// @TODO: Be more intelligent about this. Look at the Flick attribute to see
// if it is safe to assume _flick did or didn't fire.
// Then, the order _flick and _onGestureMoveEnd fire doesn't matter?
// If there was movement (_onGestureMove fired)
if (gesture.deltaX !== null && gesture.deltaY !== null) {
// If we're out-out-bounds, then snapback
if (sv._isOutOfBounds()) {
sv._snapBack();
}
// Inbounds
else {
// Don't fire scrollEnd on the gesture axis is the same as paginator's
// Not totally confident this is ideal to access a plugin's properties from a host, @TODO revisit
if (sv.pages && !sv.pages.get(AXIS)[gesture.axis]) {
sv._onTransEnd();
}
}
}
}
},
/**
* Execute a flick at the end of a scroll action
*
* @method _flick
* @param e {Event.Facade} The Flick event facade
* @private
*/
_flick: function (e) {
if (this._cDisabled) {
return false;
}
var sv = this,
svAxis = sv._cAxis,
flick = e.flick,
flickAxis = flick.axis,
flickVelocity = flick.velocity,
axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,
startPosition = sv.get(axisAttr);
// Sometimes flick is enabled, but drag is disabled
if (sv._gesture) {
sv._gesture.flick = flick;
}
// Prevent unneccesary firing of _flickFrame if we can't scroll on the flick axis
if (svAxis[flickAxis]) {
sv._flickFrame(flickVelocity, flickAxis, startPosition);
}
},
/**
* Execute a single frame in the flick animation
*
* @method _flickFrame
* @param velocity {Number} The velocity of this animated frame
* @param flickAxis {String} The axis on which to animate
* @param startPosition {Number} The starting X/Y point to flick from
* @protected
*/
_flickFrame: function (velocity, flickAxis, startPosition) {
var sv = this,
axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y,
// Localize cached values
bounce = sv._cBounce,
bounceRange = sv._cBounceRange,
deceleration = sv._cDeceleration,
frameDuration = sv._cFrameDuration,
// Calculate
newVelocity = velocity * deceleration,
newPosition = startPosition - (frameDuration * newVelocity),
// Some convinience conditions
min = flickAxis === DIM_X ? sv._minScrollX : sv._minScrollY,
max = flickAxis === DIM_X ? sv._maxScrollX : sv._maxScrollY,
belowMin = (newPosition < min),
belowMax = (newPosition < max),
aboveMin = (newPosition > min),
aboveMax = (newPosition > max),
belowMinRange = (newPosition < (min - bounceRange)),
belowMaxRange = (newPosition < (max + bounceRange)),
withinMinRange = (belowMin && (newPosition > (min - bounceRange))),
withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))),
aboveMinRange = (newPosition > (min - bounceRange)),
aboveMaxRange = (newPosition > (max + bounceRange)),
tooSlow;
// If we're within the range but outside min/max, dampen the velocity
if (withinMinRange || withinMaxRange) {
newVelocity *= bounce;
}
// Is the velocity too slow to bother?
tooSlow = (Math.abs(newVelocity).toFixed(4) < 0.015);
// If the velocity is too slow or we're outside the range
if (tooSlow || belowMinRange || aboveMaxRange) {
// Cancel and delete sv._flickAnim
if (sv._flickAnim) {
sv._flickAnim.cancel();
delete sv._flickAnim;
}
// If we're inside the scroll area, just end
if (aboveMin && belowMax) {
sv._onTransEnd();
}
// We're outside the scroll area, so we need to snap back
else {
sv._snapBack();
}
}
// Otherwise, animate to the next frame
else {
// @TODO: maybe use requestAnimationFrame instead
sv._flickAnim = Y.later(frameDuration, sv, '_flickFrame', [newVelocity, flickAxis, newPosition]);
sv.set(axisAttr, newPosition);
}
},
/**
* Handle mousewheel events on the widget
*
* @method _mousewheel
* @param e {Event.Facade} The mousewheel event facade
* @private
*/
_mousewheel: function (e) {
var sv = this,
scrollY = sv.get(SCROLL_Y),
bb = sv._bb,
scrollOffset = 10, // 10px
isForward = (e.wheelDelta > 0),
scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset);
scrollToY = _constrain(scrollToY, sv._minScrollY, sv._maxScrollY);
// Because Mousewheel events fire off 'document', every ScrollView widget will react
// to any mousewheel anywhere on the page. This check will ensure that the mouse is currently
// over this specific ScrollView. Also, only allow mousewheel scrolling on Y-axis,
// becuase otherwise the 'prevent' will block page scrolling.
if (bb.contains(e.target) && sv._cAxis[DIM_Y]) {
// Reset lastScrolledAmt
sv.lastScrolledAmt = 0;
// Jump to the new offset
sv.set(SCROLL_Y, scrollToY);
// if we have scrollbars plugin, update & set the flash timer on the scrollbar
// @TODO: This probably shouldn't be in this module
if (sv.scrollbars) {
// @TODO: The scrollbars should handle this themselves
sv.scrollbars._update();
sv.scrollbars.flash();
// or just this
// sv.scrollbars._hostDimensionsChange();
}
// Fire the 'scrollEnd' event
sv._onTransEnd();
// prevent browser default behavior on mouse scroll
e.preventDefault();
}
},
/**
* Checks to see the current scrollX/scrollY position beyond the min/max boundary
*
* @method _isOutOfBounds
* @param x {Number} [optional] The X position to check
* @param y {Number} [optional] The Y position to check
* @returns {boolen} Whether the current X/Y position is out of bounds (true) or not (false)
* @private
*/
_isOutOfBounds: function (x, y) {
var sv = this,
svAxis = sv._cAxis,
svAxisX = svAxis.x,
svAxisY = svAxis.y,
currentX = x || sv.get(SCROLL_X),
currentY = y || sv.get(SCROLL_Y),
minX = sv._minScrollX,
minY = sv._minScrollY,
maxX = sv._maxScrollX,
maxY = sv._maxScrollY;
return (svAxisX && (currentX < minX || currentX > maxX)) || (svAxisY && (currentY < minY || currentY > maxY));
},
/**
* Bounces back
* @TODO: Should be more generalized and support both X and Y detection
*
* @method _snapBack
* @private
*/
_snapBack: function () {
var sv = this,
currentX = sv.get(SCROLL_X),
currentY = sv.get(SCROLL_Y),
minX = sv._minScrollX,
minY = sv._minScrollY,
maxX = sv._maxScrollX,
maxY = sv._maxScrollY,
newY = _constrain(currentY, minY, maxY),
newX = _constrain(currentX, minX, maxX),
duration = sv.get(SNAP_DURATION),
easing = sv.get(SNAP_EASING);
if (newX !== currentX) {
sv.set(SCROLL_X, newX, {duration:duration, easing:easing});
}
else if (newY !== currentY) {
sv.set(SCROLL_Y, newY, {duration:duration, easing:easing});
}
else {
// It shouldn't ever get here, but in case it does, fire scrollEnd
sv._onTransEnd();
}
},
/**
* After listener for changes to the scrollX or scrollY attribute
*
* @method _afterScrollChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterScrollChange: function (e) {
if (e.src === ScrollView.UI_SRC) {
return false;
}
var sv = this,
duration = e.duration,
easing = e.easing,
val = e.newVal,
scrollToArgs = [];
// Set the scrolled value
sv.lastScrolledAmt = sv.lastScrolledAmt + (e.newVal - e.prevVal);
// Generate the array of args to pass to scrollTo()
if (e.attrName === SCROLL_X) {
scrollToArgs.push(val);
scrollToArgs.push(sv.get(SCROLL_Y));
}
else {
scrollToArgs.push(sv.get(SCROLL_X));
scrollToArgs.push(val);
}
scrollToArgs.push(duration);
scrollToArgs.push(easing);
sv.scrollTo.apply(sv, scrollToArgs);
},
/**
* After listener for changes to the flick attribute
*
* @method _afterFlickChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterFlickChange: function (e) {
this._bindFlick(e.newVal);
},
/**
* After listener for changes to the disabled attribute
*
* @method _afterDisabledChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDisabledChange: function (e) {
// Cache for performance - we check during move
this._cDisabled = e.newVal;
},
/**
* After listener for the axis attribute
*
* @method _afterAxisChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterAxisChange: function (e) {
this._cAxis = e.newVal;
},
/**
* After listener for changes to the drag attribute
*
* @method _afterDragChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDragChange: function (e) {
this._bindDrag(e.newVal);
},
/**
* After listener for the height or width attribute
*
* @method _afterDimChange
* @param e {Event.Facade} The event facade
* @protected
*/
_afterDimChange: function () {
this._uiDimensionsChange();
},
/**
* After listener for scrollEnd, for cleanup
*
* @method _afterScrollEnd
* @param e {Event.Facade} The event facade
* @protected
*/
_afterScrollEnd: function (e) {
var sv = this;
// @TODO: Move to sv._cancelFlick()
if (sv._flickAnim) {
// Cancel the flick (if it exists)
sv._flickAnim.cancel();
// Also delete it, otherwise _onGestureMoveStart will think we're still flicking
delete sv._flickAnim;
}
// If for some reason we're OOB, snapback
if (sv._isOutOfBounds()) {
sv._snapBack();
}
// Ideally this should be removed, but doing so causing some JS errors with fast swiping
// because _gesture is being deleted after the previous one has been overwritten
// delete sv._gesture; // TODO: Move to sv.prevGesture?
},
/**
* Setter for 'axis' attribute
*
* @method _axisSetter
* @param val {Mixed} A string ('x', 'y', 'xy') to specify which axis/axes to allow scrolling on
* @param name {String} The attribute name
* @return {Object} An object to specify scrollability on the x & y axes
*
* @protected
*/
_axisSetter: function (val, name) {
// Turn a string into an axis object
if (Y.Lang.isString(val)) {
return {
x: val.match(/x/i) ? true : false,
y: val.match(/y/i) ? true : false
};
}
},
/**
* The scrollX, scrollY setter implementation
*
* @method _setScroll
* @private
* @param {Number} val
* @param {String} dim
*
* @return {Number} The value
*/
_setScroll : function(val, dim) {
// Just ensure the widget is not disabled
if (this._cDisabled) {
val = Y.Attribute.INVALID_VALUE;
}
return val;
},
/**
* Setter for the scrollX attribute
*
* @method _setScrollX
* @param val {Number} The new scrollX value
* @return {Number} The normalized value
* @protected
*/
_setScrollX: function(val) {
return this._setScroll(val, DIM_X);
},
/**
* Setter for the scrollY ATTR
*
* @method _setScrollY
* @param val {Number} The new scrollY value
* @return {Number} The normalized value
* @protected
*/
_setScrollY: function(val) {
return this._setScroll(val, DIM_Y);
}
// End prototype properties
}, {
// Static properties
/**
* The identity of the widget.
*
* @property NAME
* @type String
* @default 'scrollview'
* @readOnly
* @protected
* @static
*/
NAME: 'scrollview',
/**
* Static property used to define the default attribute configuration of
* the Widget.
*
* @property ATTRS
* @type {Object}
* @protected
* @static
*/
ATTRS: {
/**
* Specifies ability to scroll on x, y, or x and y axis/axes.
*
* @attribute axis
* @type String
*/
axis: {
setter: '_axisSetter',
writeOnce: 'initOnly'
},
/**
* The current scroll position in the x-axis
*
* @attribute scrollX
* @type Number
* @default 0
*/
scrollX: {
value: 0,
setter: '_setScrollX'
},
/**
* The current scroll position in the y-axis
*
* @attribute scrollY
* @type Number
* @default 0
*/
scrollY: {
value: 0,
setter: '_setScrollY'
},
/**
* Drag coefficent for inertial scrolling. The closer to 1 this
* value is, the less friction during scrolling.
*
* @attribute deceleration
* @default 0.93
*/
deceleration: {
value: 0.93
},
/**
* Drag coefficient for intertial scrolling at the upper
* and lower boundaries of the scrollview. Set to 0 to
* disable "rubber-banding".
*
* @attribute bounce
* @type Number
* @default 0.1
*/
bounce: {
value: 0.1
},
/**
* The minimum distance and/or velocity which define a flick. Can be set to false,
* to disable flick support (note: drag support is enabled/disabled separately)
*
* @attribute flick
* @type Object
* @default Object with properties minDistance = 10, minVelocity = 0.3.
*/
flick: {
value: {
minDistance: 10,
minVelocity: 0.3
}
},
/**
* Enable/Disable dragging the ScrollView content (note: flick support is enabled/disabled separately)
* @attribute drag
* @type boolean
* @default true
*/
drag: {
value: true
},
/**
* The default duration to use when animating the bounce snap back.
*
* @attribute snapDuration
* @type Number
* @default 400
*/
snapDuration: {
value: 400
},
/**
* The default easing to use when animating the bounce snap back.
*
* @attribute snapEasing
* @type String
* @default 'ease-out'
*/
snapEasing: {
value: 'ease-out'
},
/**
* The default easing used when animating the flick
*
* @attribute easing
* @type String
* @default 'cubic-bezier(0, 0.1, 0, 1.0)'
*/
easing: {
value: 'cubic-bezier(0, 0.1, 0, 1.0)'
},
/**
* The interval (ms) used when animating the flick for JS-timer animations
*
* @attribute frameDuration
* @type Number
* @default 15
*/
frameDuration: {
value: 15
},
/**
* The default bounce distance in pixels
*
* @attribute bounceRange
* @type Number
* @default 150
*/
bounceRange: {
value: 150
}
},
/**
* List of class names used in the scrollview's DOM
*
* @property CLASS_NAMES
* @type Object
* @static
*/
CLASS_NAMES: CLASS_NAMES,
/**
* Flag used to source property changes initiated from the DOM
*
* @property UI_SRC
* @type String
* @static
* @default 'ui'
*/
UI_SRC: UI,
/**
* Object map of style property names used to set transition properties.
* Defaults to the vendor prefix established by the Transition module.
* The configured property names are `_TRANSITION.DURATION` (e.g. "WebkitTransitionDuration") and
* `_TRANSITION.PROPERTY (e.g. "WebkitTransitionProperty").
*
* @property _TRANSITION
* @private
*/
_TRANSITION: {
DURATION: Y.Transition._VENDOR_PREFIX + 'TransitionDuration',
PROPERTY: Y.Transition._VENDOR_PREFIX + 'TransitionProperty'
},
/**
* The default bounce distance in pixels
*
* @property BOUNCE_RANGE
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
BOUNCE_RANGE: false,
/**
* The interval (ms) used when animating the flick
*
* @property FRAME_STEP
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
FRAME_STEP: false,
/**
* The default easing used when animating the flick
*
* @property EASING
* @type String
* @static
* @default false
* @deprecated (in 3.7.0)
*/
EASING: false,
/**
* The default easing to use when animating the bounce snap back.
*
* @property SNAP_EASING
* @type String
* @static
* @default false
* @deprecated (in 3.7.0)
*/
SNAP_EASING: false,
/**
* The default duration to use when animating the bounce snap back.
*
* @property SNAP_DURATION
* @type Number
* @static
* @default false
* @deprecated (in 3.7.0)
*/
SNAP_DURATION: false
// End static properties
});
}, '@VERSION@', {"requires": ["widget", "event-gestures", "event-mousewheel", "transition"], "skinnable": true});
|
RNLearning/z-day04-Estore/Home/IMMainTop.js | ivanl001/ReactNative-Learning | /**
* Created by feng on 16/12/11.
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView,
} from 'react-native';
var topData = require('../../z-LocalData/TopMenu.json').data;
var IMWindow = require('Dimensions').get('window');
var IMMainTopListView = require('./IMMainTopListView');
var IMMainTop = React.createClass({
// getDefaultProps方法
getDefaultProps(){
return{
}
},
// getInitialState方法
getInitialState(){
return{
currentPage: 0,
}
},
// render方法
render(){
return(
<View style={styles.MainContainer}>
{/*//上部scrollView*/}
<View style={styles.scrollViewContainer}>
<ScrollView style={styles.scrollView}
horizontal={true}
pagingEnabled={true}
showsHorizontalScrollIndicator={false}
onMomentumScrollEnd = {this.onScrollAnimationEnd}
>
{this.renderScrollViewContents()}
</ScrollView>
</View>
{/*//下部indicator*/}
<View style={styles.indicatorContainer}>
{this.renderIndicator()}
</View>
</View>
)
},
// componentDidMount方法,在这里直接放置需要的方法即可
componentDidMount(){
},
renderIndicator(){
var indicators = [];
for(var i=0;i<topData.length;i++){
style = (i === this.state.currentPage) ? {color:'orange'}:{color:'gray'};
indicators.push(
<Text key={i} style={[{fontSize: 18},style]}>•</Text>
)
}
return indicators;
},
onScrollAnimationEnd(scrollView){
var page = scrollView.nativeEvent.contentOffset.x/IMWindow.width;
console.log(page);
this.setState({
currentPage: page,
})
},
renderScrollViewContents(){
var scrollcontentArray = [];
// var colorArr = ['green','gray'];//{backgroundColor:colorArr[i]
for(var i=0;i<topData.length;i++){
scrollcontentArray.push(
<View key={i} style={{width:375,height:150}}>
{/*//在这里引入listView控件,然后把数据传过去即可*/}
<IMMainTopListView data={topData[i]}/>
</View>
)
}
return scrollcontentArray
},
//之后就是自定义的方法
});
const styles = StyleSheet.create({
MainContainer:{
width: IMWindow.width,
alignItems:'center',
borderBottomWidth: 0.5,
borderBottomColor: '#dddddd',
backgroundColor: 'white',
},
scrollViewContainer:{
height: 150,
width: IMWindow.width,
},
indicatorContainer:{
width: IMWindow.width,
height:25,
flexDirection:'row',
justifyContent:'center',
alignItems: 'center'
},
scrollView:{
// backgroundColor: 'white',
},
});
module.exports = IMMainTop; |
src/components/Contact/index.js | ndlib/usurper | import React from 'react'
import PropTypes from 'prop-types'
import * as helper from 'constants/HelperFunctions'
const Contact = (props) => {
let name
if (props.name) {
name = <p itemProp='name' className='name'>{props.name.trim()}</p>
}
let title
if (props.title) {
title = (<p itemProp='jobTitle' className='title'>{props.title.trim()}</p>)
}
let phone
if (props.phone) {
phone = (
<span>
<a
href={helper.formatPhoneLink(props.phone)}
itemProp='telephone'
>
{props.phone.trim()}
</a><br />
</span>
)
}
let email
if (props.email) {
email = (
<span>
<a
href={'mailto:' + props.email}
itemProp='email'
>
{props.email.trim()}
</a><br />
</span>
)
}
let addr1
if (props.addr1) {
addr1 = <span itemProp='streetAddress'>{props.addr1.trim()}<br /></span>
}
let addr2
if (props.addr2) {
addr2 = <span>{props.addr2.trim()}</span>
}
let address
if (addr1 || addr2) {
address = (
<div itemScope itemType='http://schema.org/PostalAddress' itemProp='address'>
{addr1}
{addr2}
</div>
)
}
return (
<address className='contact' aria-label={props.name.trim()} itemScope itemType='http://schema.org/Person'>
{name}
{title}
{phone}
{email}
{address}
</address>
)
}
Contact.propTypes = {
name: PropTypes.string,
title: PropTypes.string,
phone: PropTypes.string,
email: PropTypes.string,
addr1: PropTypes.string,
addr2: PropTypes.string,
}
export default Contact
|
src/client.js | rasvaan/digibird_client | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './redux/create';
import ApiClient from './helpers/ApiClient';
import io from 'socket.io-client';
import {Provider} from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { ReduxAsyncConnect } from 'redux-connect';
import useScroll from 'scroll-behavior/lib/useStandardScroll';
import getRoutes from './routes';
const client = new ApiClient();
const _browserHistory = useScroll(() => browserHistory)();
const dest = document.getElementById('content');
const store = createStore(_browserHistory, client, window.__data);
const history = syncHistoryWithStore(_browserHistory, store);
function initSocket() {
const socket = io('', {path: '/ws'});
socket.on('news', (data) => {
console.log(data);
socket.emit('my other event', { my: 'data from client' });
});
socket.on('msg', (data) => {
console.log(data);
});
return socket;
}
global.socket = initSocket();
const component = (
<Router render={(props) =>
<ReduxAsyncConnect {...props} helpers={{client}} filter={item => !item.deferred} />
} history={history}>
{getRoutes(store)}
</Router>
);
ReactDOM.render(
<Provider store={store} key="provider">
{component}
</Provider>,
dest
);
if (process.env.NODE_ENV !== 'production') {
window.React = React; // enable debugger
if (!dest || !dest.firstChild || !dest.firstChild.attributes || !dest.firstChild.attributes['data-react-checksum']) {
console.error('Server-side React render was discarded. Make sure that your initial render does not contain any client-side code.');
}
}
if (__DEVTOOLS__ && !window.devToolsExtension) {
const DevTools = require('./containers/DevTools/DevTools');
ReactDOM.render(
<Provider store={store} key="provider">
<div>
{component}
<DevTools />
</div>
</Provider>,
dest
);
}
|
local-cli/templates/HelloNavigation/App.js | dikaiosune/react-native | /**
* This is an example React Native app demonstrates ListViews, text input and
* navigation between a few screens.
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react';
import { StackNavigator } from 'react-navigation';
import HomeScreenTabNavigator from './views/HomeScreenTabNavigator';
import ChatScreen from './views/chat/ChatScreen';
/**
* Top-level navigator. Renders the application UI.
*/
const App = StackNavigator({
Home: {
screen: HomeScreenTabNavigator,
},
Chat: {
screen: ChatScreen,
},
});
export default App;
|
node_modules/material-ui/svg-icons/navigation/arrow-back.js | Alex-Shilman/Drupal8Node | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _pure = require('recompose/pure');
var _pure2 = _interopRequireDefault(_pure);
var _SvgIcon = require('../../SvgIcon');
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NavigationArrowBack = function NavigationArrowBack(props) {
return _react2.default.createElement(
_SvgIcon2.default,
props,
_react2.default.createElement('path', { d: 'M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z' })
);
};
NavigationArrowBack = (0, _pure2.default)(NavigationArrowBack);
NavigationArrowBack.displayName = 'NavigationArrowBack';
NavigationArrowBack.muiName = 'SvgIcon';
exports.default = NavigationArrowBack; |
node_modules/semantic-ui-react/dist/es/collections/Grid/GridColumn.js | mowbell/clickdelivery-fed-test | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, SUI, useKeyOnly, useOnlyProp, useTextAlignProp, useValueAndKey, useVerticalAlignProp, useWidthProp } from '../../lib';
/**
* A column sub-component for Grid.
*/
function GridColumn(props) {
var children = props.children,
className = props.className,
computer = props.computer,
color = props.color,
floated = props.floated,
largeScreen = props.largeScreen,
mobile = props.mobile,
only = props.only,
stretched = props.stretched,
tablet = props.tablet,
textAlign = props.textAlign,
verticalAlign = props.verticalAlign,
widescreen = props.widescreen,
width = props.width;
var classes = cx(color, useKeyOnly(stretched, 'stretched'), useOnlyProp(only, 'only'), useTextAlignProp(textAlign), useValueAndKey(floated, 'floated'), useVerticalAlignProp(verticalAlign), useWidthProp(computer, 'wide computer'), useWidthProp(largeScreen, 'wide large screen'), useWidthProp(mobile, 'wide mobile'), useWidthProp(tablet, 'wide tablet'), useWidthProp(widescreen, 'wide widescreen'), useWidthProp(width, 'wide'), 'column', className);
var rest = getUnhandledProps(GridColumn, props);
var ElementType = getElementType(GridColumn, props);
return React.createElement(
ElementType,
_extends({}, rest, { className: classes }),
children
);
}
GridColumn.handledProps = ['as', 'children', 'className', 'color', 'computer', 'floated', 'largeScreen', 'mobile', 'only', 'stretched', 'tablet', 'textAlign', 'verticalAlign', 'widescreen', 'width'];
GridColumn._meta = {
name: 'GridColumn',
parent: 'Grid',
type: META.TYPES.COLLECTION
};
process.env.NODE_ENV !== "production" ? GridColumn.propTypes = {
/** An element type to render as (string or function). */
as: customPropTypes.as,
/** Primary content. */
children: PropTypes.node,
/** Additional classes. */
className: PropTypes.string,
/** A grid column can be colored. */
color: PropTypes.oneOf(SUI.COLORS),
/** A column can specify a width for a computer. */
computer: PropTypes.oneOf(SUI.WIDTHS),
/** A column can sit flush against the left or right edge of a row. */
floated: PropTypes.oneOf(SUI.FLOATS),
/** A column can specify a width for a large screen device. */
largeScreen: PropTypes.oneOf(SUI.WIDTHS),
/** A column can specify a width for a mobile device. */
mobile: PropTypes.oneOf(SUI.WIDTHS),
/** A row can appear only for a specific device, or screen sizes. */
only: customPropTypes.onlyProp(SUI.VISIBILITY),
/** A column can stretch its contents to take up the entire grid or row height. */
stretched: PropTypes.bool,
/** A column can specify a width for a tablet device. */
tablet: PropTypes.oneOf(SUI.WIDTHS),
/** A column can specify its text alignment. */
textAlign: PropTypes.oneOf(SUI.TEXT_ALIGNMENTS),
/** A column can specify its vertical alignment to have all its columns vertically centered. */
verticalAlign: PropTypes.oneOf(SUI.VERTICAL_ALIGNMENTS),
/** A column can specify a width for a wide screen device. */
widescreen: PropTypes.oneOf(SUI.WIDTHS),
/** Represents width of column. */
width: PropTypes.oneOf(SUI.WIDTHS)
} : void 0;
export default GridColumn; |
docs/src/examples/elements/Button/States/ButtonExampleDisabled.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleDisabled = () => <Button disabled>Disabled</Button>
export default ButtonExampleDisabled
|
src/FlatButton/FlatButtonLabel.js | skarnecki/material-ui | import React from 'react';
function getStyles(props, context) {
const {baseTheme} = context.muiTheme;
return {
root: {
position: 'relative',
paddingLeft: baseTheme.spacing.desktopGutterLess,
paddingRight: baseTheme.spacing.desktopGutterLess,
verticalAlign: 'middle',
},
};
}
class FlatButtonLabel extends React.Component {
static propTypes = {
label: React.PropTypes.node,
/**
* Override the inline-styles of the root element.
*/
style: React.PropTypes.object,
};
static contextTypes = {
muiTheme: React.PropTypes.object.isRequired,
};
render() {
const {
label,
style,
} = this.props;
const {prepareStyles} = this.context.muiTheme;
const styles = getStyles(this.props, this.context);
return (
<span style={prepareStyles(Object.assign(styles.root, style))}>{label}</span>
);
}
}
export default FlatButtonLabel;
|
examples/src/app.js | hannahsquier/react-select | /* eslint react/prop-types: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
import Select from 'react-select';
import Creatable from './components/Creatable';
import Contributors from './components/Contributors';
import GithubUsers from './components/GithubUsers';
import CustomComponents from './components/CustomComponents';
import CustomRender from './components/CustomRender';
import Multiselect from './components/Multiselect';
import NumericSelect from './components/NumericSelect';
import BooleanSelect from './components/BooleanSelect';
import Virtualized from './components/Virtualized';
import States from './components/States';
ReactDOM.render(
<div>
<States label="States" searchable />
<Multiselect label="Multiselect" />
<Virtualized label="Virtualized" />
<Contributors label="Contributors (Async)" />
<GithubUsers label="Github users (Async with fetch.js)" />
<NumericSelect label="Numeric Values" />
<BooleanSelect label="Boolean Values" />
<CustomRender label="Custom Render Methods"/>
<CustomComponents label="Custom Placeholder, Option, Value, and Arrow Components" />
<Creatable
hint="Enter a value that's NOT in the list, then hit return"
label="Custom tag creation"
/>
</div>,
document.getElementById('example')
);
|
node_modules/react-icons/fa/odnoklassniki-square.js | bengimbel/Solstice-React-Contacts-Project |
import React from 'react'
import Icon from 'react-icon-base'
const FaOdnoklassnikiSquare = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m23.7 12.9q0 1.5-1 2.6t-2.6 1-2.5-1-1-2.6 1-2.5 2.5-1 2.6 1 1 2.5z m4.8 8.1q-0.3-0.4-0.7-0.7t-1-0.2-1.4 0.6q-0.2 0.2-0.6 0.5t-1.8 0.7-2.9 0.4-2.7-0.4-1.9-0.8l-0.6-0.4q-0.7-0.5-1.4-0.6t-1.1 0.2-0.6 0.7q-0.5 1.1 0 1.7t1.9 1.7q1.9 1.1 5.1 1.4l-1.2 1.2q-3.1 3.2-4.2 4.3-0.5 0.4-0.5 1.1t0.5 1.2l0.2 0.2q0.4 0.5 1.1 0.5t1.2-0.5l4.3-4.3q2.5 2.6 4.2 4.3 0.5 0.5 1.2 0.5t1.2-0.5l0.2-0.2q0.5-0.5 0.5-1.2t-0.5-1.1l-4.3-4.3-1.2-1.2q3.2-0.3 5.1-1.4 1.5-1 1.9-1.7t0-1.7z m-1.1-8.1q0-2.9-2.1-5.1t-5.2-2.1-5.1 2.1-2.1 5.1 2.1 5.2 5.1 2.1 5.2-2.1 2.1-5.2z m9.9-3.6v21.4q0 2.7-1.9 4.6t-4.5 1.8h-21.5q-2.6 0-4.5-1.8t-1.9-4.6v-21.4q0-2.7 1.9-4.6t4.5-1.8h21.5q2.6 0 4.5 1.8t1.9 4.6z"/></g>
</Icon>
)
export default FaOdnoklassnikiSquare
|
src/example/index.js | abobwhite/slate-editor | import React from 'react'
import { Router } from 'react-router'
import createBrowserHistory from 'history/createBrowserHistory'
import { version } from '../../package.json'
import Home from './pages/Home'
import './index.css'
const history = createBrowserHistory()
export default () => (
<Router history={history}>
<Home title='Nossas - SlateJS Editor' version={version} />
</Router>
)
|
src/components/Loader.js | SteemBlog/app |
import React from 'react';
export default class Loader extends React.Component {
render() {
return(
<div class="col-xs-12 text-center">
<br></br>
<br></br>
<h1 class="loading">{this.props.message || 'Loading'}</h1>
<h1><i class="fa fa-refresh fa-spin"></i></h1>
<br></br>
<br></br>
</div>
)
}
}
|
src/routes/register/index.js | chaudhryjunaid/chaudhryjunaid.com | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../components/Layout';
import Register from './Register';
const title = 'New User Registration';
function action() {
return {
chunks: ['register'],
title,
component: (
<Layout>
<Register title={title} />
</Layout>
),
};
}
export default action;
|
ajax/libs/react-data-grid/1.0.68/react-data-grid.js | dakshshah96/cdnjs | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom"], factory);
else if(typeof exports === 'object')
exports["ReactDataGrid"] = factory(require("react"), require("react-dom"));
else
root["ReactDataGrid"] = factory(root["React"], root["ReactDOM"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var Grid = __webpack_require__(54);
var Row = __webpack_require__(18);
var Cell = __webpack_require__(24);
module.exports = Grid;
module.exports.Row = Row;
module.exports.Cell = Cell;
/***/ },
/* 1 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
/***/ },
/* 2 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
var freeGlobal = __webpack_require__(31);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ },
/* 4 */
/***/ function(module, exports) {
'use strict';
module.exports = {
getColumn: function getColumn(columns, idx) {
if (Array.isArray(columns)) {
return columns[idx];
} else if (typeof Immutable !== 'undefined') {
return columns.get(idx);
}
},
spliceColumn: function spliceColumn(metrics, idx, column) {
if (Array.isArray(metrics.columns)) {
metrics.columns.splice(idx, 1, column);
} else if (typeof Immutable !== 'undefined') {
metrics.columns = metrics.columns.splice(idx, 1, column);
}
return metrics;
},
getSize: function getSize(columns) {
if (Array.isArray(columns)) {
return columns.length;
} else if (typeof Immutable !== 'undefined') {
return columns.size;
}
},
// Logic extented to allow for functions to be passed down in column.editable
// this allows us to deicde whether we can be edting from a cell level
canEdit: function canEdit(col, rowData, enableCellSelect) {
if (col.editable != null && typeof col.editable === 'function') {
return enableCellSelect === true && col.editable(rowData);
}
return enableCellSelect === true && (!!col.editor || !!col.editable);
}
};
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
function classNames() {
var classes = '';
var arg;
for (var i = 0; i < arguments.length; i++) {
arg = arguments[i];
if (!arg) {
continue;
}
if ('string' === typeof arg || 'number' === typeof arg) {
classes += ' ' + arg;
} else if (Object.prototype.toString.call(arg) === '[object Array]') {
classes += ' ' + classNames.apply(null, arg);
} else if ('object' === typeof arg) {
for (var key in arg) {
if (!arg.hasOwnProperty(key) || !arg[key]) {
continue;
}
classes += ' ' + key;
}
}
}
return classes.substr(1);
}
// safely export classNames for node / browserify
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
}
// safely export classNames for RequireJS
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
return classNames;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var ExcelColumnShape = {
name: React.PropTypes.node.isRequired,
key: React.PropTypes.string.isRequired,
width: React.PropTypes.number.isRequired,
filterable: React.PropTypes.bool
};
module.exports = ExcelColumnShape;
/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(86),
getValue = __webpack_require__(97);
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var PropTypes = __webpack_require__(1).PropTypes;
module.exports = {
selected: PropTypes.object.isRequired,
copied: PropTypes.object,
dragged: PropTypes.object,
onCellClick: PropTypes.func.isRequired,
onCellDoubleClick: PropTypes.func.isRequired,
onCommit: PropTypes.func.isRequired,
onCommitCancel: PropTypes.func.isRequired,
handleDragEnterRow: PropTypes.func.isRequired,
handleTerminateDrag: PropTypes.func.isRequired
};
/***/ },
/* 9 */
/***/ function(module, exports) {
"use strict";
function createObjectWithProperties(originalObj, properties) {
var result = {};
for (var _iterator = properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var property = _ref;
if (originalObj[property]) {
result[property] = originalObj[property];
}
}
return result;
}
module.exports = createObjectWithProperties;
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var shallowCloneObject = __webpack_require__(19);
var contextTypes = {
metricsComputator: React.PropTypes.object
};
var MetricsComputatorMixin = {
childContextTypes: contextTypes,
getChildContext: function getChildContext() {
return { metricsComputator: this };
},
getMetricImpl: function getMetricImpl(name) {
return this._DOMMetrics.metrics[name].value;
},
registerMetricsImpl: function registerMetricsImpl(component, metrics) {
var getters = {};
var s = this._DOMMetrics;
for (var name in metrics) {
if (s.metrics[name] !== undefined) {
throw new Error('DOM metric ' + name + ' is already defined');
}
s.metrics[name] = { component: component, computator: metrics[name].bind(component) };
getters[name] = this.getMetricImpl.bind(null, name);
}
if (s.components.indexOf(component) === -1) {
s.components.push(component);
}
return getters;
},
unregisterMetricsFor: function unregisterMetricsFor(component) {
var s = this._DOMMetrics;
var idx = s.components.indexOf(component);
if (idx > -1) {
s.components.splice(idx, 1);
var name = void 0;
var metricsToDelete = {};
for (name in s.metrics) {
if (s.metrics[name].component === component) {
metricsToDelete[name] = true;
}
}
for (name in metricsToDelete) {
if (metricsToDelete.hasOwnProperty(name)) {
delete s.metrics[name];
}
}
}
},
updateMetrics: function updateMetrics() {
var s = this._DOMMetrics;
var needUpdate = false;
for (var name in s.metrics) {
if (!s.metrics.hasOwnProperty(name)) continue;
var newMetric = s.metrics[name].computator();
if (newMetric !== s.metrics[name].value) {
needUpdate = true;
}
s.metrics[name].value = newMetric;
}
if (needUpdate) {
for (var i = 0, len = s.components.length; i < len; i++) {
if (s.components[i].metricsUpdated) {
s.components[i].metricsUpdated();
}
}
}
},
componentWillMount: function componentWillMount() {
this._DOMMetrics = {
metrics: {},
components: []
};
},
componentDidMount: function componentDidMount() {
if (window.addEventListener) {
window.addEventListener('resize', this.updateMetrics);
} else {
window.attachEvent('resize', this.updateMetrics);
}
this.updateMetrics();
},
componentWillUnmount: function componentWillUnmount() {
window.removeEventListener('resize', this.updateMetrics);
}
};
var MetricsMixin = {
contextTypes: contextTypes,
componentWillMount: function componentWillMount() {
if (this.DOMMetrics) {
this._DOMMetricsDefs = shallowCloneObject(this.DOMMetrics);
this.DOMMetrics = {};
for (var name in this._DOMMetricsDefs) {
if (!this._DOMMetricsDefs.hasOwnProperty(name)) continue;
this.DOMMetrics[name] = function () {};
}
}
},
componentDidMount: function componentDidMount() {
if (this.DOMMetrics) {
this.DOMMetrics = this.registerMetrics(this._DOMMetricsDefs);
}
},
componentWillUnmount: function componentWillUnmount() {
if (!this.registerMetricsImpl) {
return this.context.metricsComputator.unregisterMetricsFor(this);
}
if (this.hasOwnProperty('DOMMetrics')) {
delete this.DOMMetrics;
}
},
registerMetrics: function registerMetrics(metrics) {
if (this.registerMetricsImpl) {
return this.registerMetricsImpl(this, metrics);
}
return this.context.metricsComputator.registerMetricsImpl(this, metrics);
},
getMetric: function getMetric(name) {
if (this.getMetricImpl) {
return this.getMetricImpl(name);
}
return this.context.metricsComputator.getMetricImpl(name);
}
};
module.exports = {
MetricsComputatorMixin: MetricsComputatorMixin,
MetricsMixin: MetricsMixin
};
/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(107),
listCacheDelete = __webpack_require__(108),
listCacheGet = __webpack_require__(109),
listCacheHas = __webpack_require__(110),
listCacheSet = __webpack_require__(111);
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
var eq = __webpack_require__(33);
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(22),
getRawTag = __webpack_require__(95),
objectToString = __webpack_require__(120);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
value = Object(value);
return (symToStringTag && symToStringTag in value)
? getRawTag(value)
: objectToString(value);
}
module.exports = baseGetTag;
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(104);
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
module.exports = getMapData;
/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ },
/* 16 */
/***/ function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var shallowCloneObject = __webpack_require__(19);
var sameColumn = __webpack_require__(43);
var ColumnUtils = __webpack_require__(4);
var getScrollbarSize = __webpack_require__(28);
var isColumnsImmutable = __webpack_require__(70);
function setColumnWidths(columns, totalWidth) {
return columns.map(function (column) {
var colInfo = Object.assign({}, column);
if (column.width) {
if (/^([0-9]+)%$/.exec(column.width.toString())) {
colInfo.width = Math.floor(column.width / 100 * totalWidth);
}
}
return colInfo;
});
}
function setDefferedColumnWidths(columns, unallocatedWidth, minColumnWidth) {
var defferedColumns = columns.filter(function (c) {
return !c.width;
});
return columns.map(function (column) {
if (!column.width) {
if (unallocatedWidth <= 0) {
column.width = minColumnWidth;
} else {
column.width = Math.floor(unallocatedWidth / ColumnUtils.getSize(defferedColumns));
}
}
return column;
});
}
function setColumnOffsets(columns) {
var left = 0;
return columns.map(function (column) {
column.left = left;
left += column.width;
return column;
});
}
/**
* Update column metrics calculation.
*
* @param {ColumnMetricsType} metrics
*/
function recalculate(metrics) {
// compute width for columns which specify width
var columns = setColumnWidths(metrics.columns, metrics.totalWidth);
var unallocatedWidth = columns.filter(function (c) {
return c.width;
}).reduce(function (w, column) {
return w - column.width;
}, metrics.totalWidth);
unallocatedWidth -= getScrollbarSize();
var width = columns.filter(function (c) {
return c.width;
}).reduce(function (w, column) {
return w + column.width;
}, 0);
// compute width for columns which doesn't specify width
columns = setDefferedColumnWidths(columns, unallocatedWidth, metrics.minColumnWidth);
// compute left offset
columns = setColumnOffsets(columns);
return {
columns: columns,
width: width,
totalWidth: metrics.totalWidth,
minColumnWidth: metrics.minColumnWidth
};
}
/**
* Update column metrics calculation by resizing a column.
*
* @param {ColumnMetricsType} metrics
* @param {Column} column
* @param {number} width
*/
function resizeColumn(metrics, index, width) {
var column = ColumnUtils.getColumn(metrics.columns, index);
var metricsClone = shallowCloneObject(metrics);
metricsClone.columns = metrics.columns.slice(0);
var updatedColumn = shallowCloneObject(column);
updatedColumn.width = Math.max(width, metricsClone.minColumnWidth);
metricsClone = ColumnUtils.spliceColumn(metricsClone, index, updatedColumn);
return recalculate(metricsClone);
}
function areColumnsImmutable(prevColumns, nextColumns) {
return isColumnsImmutable(prevColumns) && isColumnsImmutable(nextColumns);
}
function compareEachColumn(prevColumns, nextColumns, isSameColumn) {
var i = void 0;
var len = void 0;
var column = void 0;
var prevColumnsByKey = {};
var nextColumnsByKey = {};
if (ColumnUtils.getSize(prevColumns) !== ColumnUtils.getSize(nextColumns)) {
return false;
}
for (i = 0, len = ColumnUtils.getSize(prevColumns); i < len; i++) {
column = prevColumns[i];
prevColumnsByKey[column.key] = column;
}
for (i = 0, len = ColumnUtils.getSize(nextColumns); i < len; i++) {
column = nextColumns[i];
nextColumnsByKey[column.key] = column;
var prevColumn = prevColumnsByKey[column.key];
if (prevColumn === undefined || !isSameColumn(prevColumn, column)) {
return false;
}
}
for (i = 0, len = ColumnUtils.getSize(prevColumns); i < len; i++) {
column = prevColumns[i];
var nextColumn = nextColumnsByKey[column.key];
if (nextColumn === undefined) {
return false;
}
}
return true;
}
function sameColumns(prevColumns, nextColumns, isSameColumn) {
if (areColumnsImmutable(prevColumns, nextColumns)) {
return prevColumns === nextColumns;
}
return compareEachColumn(prevColumns, nextColumns, isSameColumn);
}
module.exports = { recalculate: recalculate, resizeColumn: resizeColumn, sameColumn: sameColumn, sameColumns: sameColumns };
/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _OverflowCell = __webpack_require__(53);
var _OverflowCell2 = _interopRequireDefault(_OverflowCell);
var _RowComparer = __webpack_require__(56);
var _RowComparer2 = _interopRequireDefault(_RowComparer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var joinClasses = __webpack_require__(5);
var Cell = __webpack_require__(24);
var ColumnUtilsMixin = __webpack_require__(4);
var cellMetaDataShape = __webpack_require__(8);
var PropTypes = React.PropTypes;
var createObjectWithProperties = __webpack_require__(9);
var CellExpander = React.createClass({
displayName: 'CellExpander',
render: function render() {
return React.createElement(Cell, this.props);
}
});
// The list of the propTypes that we want to include in the Row div
var knownDivPropertyKeys = ['height'];
var Row = React.createClass({
displayName: 'Row',
propTypes: {
height: PropTypes.number.isRequired,
columns: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
row: PropTypes.any.isRequired,
cellRenderer: PropTypes.func,
cellMetaData: PropTypes.shape(cellMetaDataShape),
isSelected: PropTypes.bool,
idx: PropTypes.number.isRequired,
expandedRows: PropTypes.arrayOf(PropTypes.object),
extraClasses: PropTypes.string,
forceUpdate: PropTypes.bool,
subRowDetails: PropTypes.object,
isRowHovered: PropTypes.bool,
colVisibleStart: PropTypes.number.isRequired,
colVisibleEnd: PropTypes.number.isRequired,
colDisplayStart: PropTypes.number.isRequired,
colDisplayEnd: PropTypes.number.isRequired,
isScrolling: React.PropTypes.bool.isRequired
},
mixins: [ColumnUtilsMixin],
getDefaultProps: function getDefaultProps() {
return {
cellRenderer: Cell,
isSelected: false,
height: 35
};
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
return (0, _RowComparer2['default'])(nextProps, this.props);
},
handleDragEnter: function handleDragEnter() {
var handleDragEnterRow = this.props.cellMetaData.handleDragEnterRow;
if (handleDragEnterRow) {
handleDragEnterRow(this.props.idx);
}
},
getSelectedColumn: function getSelectedColumn() {
if (this.props.cellMetaData) {
var selected = this.props.cellMetaData.selected;
if (selected && selected.idx) {
return this.getColumn(this.props.columns, selected.idx);
}
}
},
getCellRenderer: function getCellRenderer(columnKey) {
var CellRenderer = this.props.cellRenderer;
if (this.props.subRowDetails && this.props.subRowDetails.field === columnKey) {
return CellExpander;
}
return CellRenderer;
},
getCell: function getCell(column, i, selectedColumn) {
var CellRenderer = this.props.cellRenderer;
var _props = this.props,
colVisibleStart = _props.colVisibleStart,
colVisibleEnd = _props.colVisibleEnd,
idx = _props.idx,
cellMetaData = _props.cellMetaData;
var key = column.key,
formatter = column.formatter;
var baseCellProps = { key: key + '-' + idx, idx: i, rowIdx: idx, height: this.getRowHeight(), column: column, cellMetaData: cellMetaData };
if (i < colVisibleStart || i > colVisibleEnd) {
return React.createElement(_OverflowCell2['default'], _extends({ ref: key }, baseCellProps));
}
var _props2 = this.props,
row = _props2.row,
isSelected = _props2.isSelected;
var cellProps = {
ref: key,
value: this.getCellValue(key || i),
rowData: row,
isRowSelected: isSelected,
expandableOptions: this.getExpandableOptions(key),
selectedColumn: selectedColumn,
formatter: formatter,
isScrolling: this.props.isScrolling
};
return React.createElement(CellRenderer, _extends({}, baseCellProps, cellProps));
},
getCells: function getCells() {
var _this = this;
var cells = [];
var lockedCells = [];
var selectedColumn = this.getSelectedColumn();
if (this.props.columns) {
this.props.columns.forEach(function (column, i) {
var cell = _this.getCell(column, i, selectedColumn);
if (column.locked) {
lockedCells.push(cell);
} else {
cells.push(cell);
}
});
}
return cells.concat(lockedCells);
},
getRowHeight: function getRowHeight() {
var rows = this.props.expandedRows || null;
if (rows && this.props.idx) {
var row = rows[this.props.idx] || null;
if (row) {
return row.height;
}
}
return this.props.height;
},
getCellValue: function getCellValue(key) {
var val = void 0;
if (key === 'select-row') {
return this.props.isSelected;
} else if (typeof this.props.row.get === 'function') {
val = this.props.row.get(key);
} else {
val = this.props.row[key];
}
return val;
},
isContextMenuDisplayed: function isContextMenuDisplayed() {
if (this.props.cellMetaData) {
var selected = this.props.cellMetaData.selected;
if (selected && selected.contextMenuDisplayed && selected.rowIdx === this.props.idx) {
return true;
}
}
return false;
},
getExpandableOptions: function getExpandableOptions(columnKey) {
return { canExpand: this.props.subRowDetails && this.props.subRowDetails.field === columnKey, expanded: this.props.subRowDetails && this.props.subRowDetails.expanded, children: this.props.subRowDetails && this.props.subRowDetails.children, treeDepth: this.props.subRowDetails ? this.props.subRowDetails.treeDepth : 0 };
},
setScrollLeft: function setScrollLeft(scrollLeft) {
var _this2 = this;
this.props.columns.forEach(function (column, i) {
if (column.locked) {
if (!_this2.refs['cell-' + i]) return;
_this2.refs['cell-' + i].setScrollLeft(scrollLeft);
}
});
},
getKnownDivProps: function getKnownDivProps() {
return createObjectWithProperties(this.props, knownDivPropertyKeys);
},
renderCell: function renderCell(props) {
if (typeof this.props.cellRenderer === 'function') {
this.props.cellRenderer.call(this, props);
}
if (React.isValidElement(this.props.cellRenderer)) {
return React.cloneElement(this.props.cellRenderer, props);
}
return this.props.cellRenderer(props);
},
render: function render() {
var className = joinClasses('react-grid-Row', 'react-grid-Row--' + (this.props.idx % 2 === 0 ? 'even' : 'odd'), {
'row-selected': this.props.isSelected,
'row-context-menu': this.isContextMenuDisplayed()
}, this.props.extraClasses);
var style = {
height: this.getRowHeight(this.props),
overflow: 'hidden',
contain: 'layout'
};
var cells = this.getCells();
return React.createElement(
'div',
_extends({}, this.getKnownDivProps(), { className: className, style: style, onDragEnter: this.handleDragEnter }),
React.isValidElement(this.props.row) ? this.props.row : cells
);
}
});
module.exports = Row;
/***/ },
/* 19 */
/***/ function(module, exports) {
"use strict";
function shallowCloneObject(obj) {
var result = {};
for (var k in obj) {
if (obj.hasOwnProperty(k)) {
result[k] = obj[k];
}
}
return result;
}
module.exports = shallowCloneObject;
/***/ },
/* 20 */
/***/ function(module, exports) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule shallowEqual
* @typechecks
*
*/
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
*/
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
var bHasOwnProperty = hasOwnProperty.bind(objB);
for (var i = 0; i < keysA.length; i++) {
if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
return false;
}
}
return true;
}
module.exports = shallowEqual;
/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7),
root = __webpack_require__(3);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(3);
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ },
/* 23 */
/***/ function(module, exports) {
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _isEqual = __webpack_require__(132);
var _isEqual2 = _interopRequireDefault(_isEqual);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var joinClasses = __webpack_require__(5);
var EditorContainer = __webpack_require__(66);
var ExcelColumn = __webpack_require__(6);
var isFunction = __webpack_require__(27);
var CellMetaDataShape = __webpack_require__(8);
var SimpleCellFormatter = __webpack_require__(68);
var ColumnUtils = __webpack_require__(4);
var createObjectWithProperties = __webpack_require__(9);
// The list of the propTypes that we want to include in the Cell div
var knownDivPropertyKeys = ['height', 'tabIndex', 'value'];
var Cell = React.createClass({
displayName: 'Cell',
propTypes: {
rowIdx: React.PropTypes.number.isRequired,
idx: React.PropTypes.number.isRequired,
selected: React.PropTypes.shape({
idx: React.PropTypes.number.isRequired
}),
selectedColumn: React.PropTypes.object,
height: React.PropTypes.number,
tabIndex: React.PropTypes.number,
ref: React.PropTypes.string,
column: React.PropTypes.shape(ExcelColumn).isRequired,
value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired,
isExpanded: React.PropTypes.bool,
isRowSelected: React.PropTypes.bool,
cellMetaData: React.PropTypes.shape(CellMetaDataShape).isRequired,
handleDragStart: React.PropTypes.func,
className: React.PropTypes.string,
cellControls: React.PropTypes.any,
rowData: React.PropTypes.object.isRequired,
forceUpdate: React.PropTypes.bool,
expandableOptions: React.PropTypes.object.isRequired,
isScrolling: React.PropTypes.bool.isRequired
},
getDefaultProps: function getDefaultProps() {
return {
tabIndex: -1,
isExpanded: false,
value: ''
};
},
getInitialState: function getInitialState() {
return {
isCellValueChanging: false
};
},
componentDidMount: function componentDidMount() {
this.checkFocus();
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
this.setState({
isCellValueChanging: this.props.value !== nextProps.value
});
},
componentDidUpdate: function componentDidUpdate() {
this.checkFocus();
var dragged = this.props.cellMetaData.dragged;
if (dragged && dragged.complete === true) {
this.props.cellMetaData.handleTerminateDrag();
}
if (this.state.isCellValueChanging && this.props.selectedColumn != null) {
this.applyUpdateClass();
}
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
var shouldUpdate = this.props.column.width !== nextProps.column.width || this.props.column.left !== nextProps.column.left || this.props.column.cellClass !== nextProps.column.cellClass || this.props.height !== nextProps.height || this.props.rowIdx !== nextProps.rowIdx || this.isCellSelectionChanging(nextProps) || this.isDraggedCellChanging(nextProps) || this.isCopyCellChanging(nextProps) || this.props.isRowSelected !== nextProps.isRowSelected || this.isSelected() || this.props.value !== nextProps.value || this.props.forceUpdate === true || this.props.className !== nextProps.className || this.hasChangedDependentValues(nextProps);
return shouldUpdate;
},
onCellClick: function onCellClick(e) {
var meta = this.props.cellMetaData;
if (meta != null && meta.onCellClick && typeof meta.onCellClick === 'function') {
meta.onCellClick({ rowIdx: this.props.rowIdx, idx: this.props.idx }, e);
}
},
onCellContextMenu: function onCellContextMenu() {
var meta = this.props.cellMetaData;
if (meta != null && meta.onCellContextMenu && typeof meta.onCellContextMenu === 'function') {
meta.onCellContextMenu({ rowIdx: this.props.rowIdx, idx: this.props.idx });
}
},
onCellDoubleClick: function onCellDoubleClick(e) {
var meta = this.props.cellMetaData;
if (meta != null && meta.onCellDoubleClick && typeof meta.onCellDoubleClick === 'function') {
meta.onCellDoubleClick({ rowIdx: this.props.rowIdx, idx: this.props.idx }, e);
}
},
onCellExpand: function onCellExpand(e) {
e.stopPropagation();
var meta = this.props.cellMetaData;
if (meta != null && meta.onCellExpand != null) {
meta.onCellExpand({ rowIdx: this.props.rowIdx, idx: this.props.idx, rowData: this.props.rowData, expandArgs: this.props.expandableOptions });
}
},
onCellKeyDown: function onCellKeyDown(e) {
if (this.canExpand() && e.key === 'Enter') {
this.onCellExpand(e);
}
},
onDragHandleDoubleClick: function onDragHandleDoubleClick(e) {
e.stopPropagation();
var meta = this.props.cellMetaData;
if (meta != null && meta.onDragHandleDoubleClick && typeof meta.onDragHandleDoubleClick === 'function') {
meta.onDragHandleDoubleClick({ rowIdx: this.props.rowIdx, idx: this.props.idx, rowData: this.getRowData(), e: e });
}
},
onDragOver: function onDragOver(e) {
e.preventDefault();
},
getStyle: function getStyle() {
var style = {
position: 'absolute',
width: this.props.column.width,
height: this.props.height,
left: this.props.column.left,
contain: 'layout'
};
return style;
},
getFormatter: function getFormatter() {
var col = this.props.column;
if (this.isActive()) {
return React.createElement(EditorContainer, { rowData: this.getRowData(), rowIdx: this.props.rowIdx, value: this.props.value, idx: this.props.idx, cellMetaData: this.props.cellMetaData, column: col, height: this.props.height });
}
return this.props.column.formatter;
},
getRowData: function getRowData() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
return props.rowData.toJSON ? props.rowData.toJSON() : props.rowData;
},
getFormatterDependencies: function getFormatterDependencies() {
// convention based method to get corresponding Id or Name of any Name or Id property
if (typeof this.props.column.getRowMetaData === 'function') {
return this.props.column.getRowMetaData(this.getRowData(), this.props.column);
}
},
getCellClass: function getCellClass() {
var className = joinClasses(this.props.column.cellClass, 'react-grid-Cell', this.props.className, this.props.column.locked ? 'react-grid-Cell--locked' : null);
var extraClasses = joinClasses({
'row-selected': this.props.isRowSelected,
editing: this.isActive(),
copied: this.isCopied() || this.wasDraggedOver() || this.isDraggedOverUpwards() || this.isDraggedOverDownwards(),
'is-dragged-over-up': this.isDraggedOverUpwards(),
'is-dragged-over-down': this.isDraggedOverDownwards(),
'was-dragged-over': this.wasDraggedOver()
});
return joinClasses(className, extraClasses);
},
getUpdateCellClass: function getUpdateCellClass() {
return this.props.column.getUpdateCellClass ? this.props.column.getUpdateCellClass(this.props.selectedColumn, this.props.column, this.state.isCellValueChanging) : '';
},
isColumnSelected: function isColumnSelected() {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
return meta.selected && meta.selected.idx === this.props.idx;
},
isSelected: function isSelected() {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
return meta.selected && meta.selected.rowIdx === this.props.rowIdx && meta.selected.idx === this.props.idx;
},
isActive: function isActive() {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
return this.isSelected() && meta.selected.active === true;
},
isCellSelectionChanging: function isCellSelectionChanging(nextProps) {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
var nextSelected = nextProps.cellMetaData.selected;
if (meta.selected && nextSelected) {
return this.props.idx === nextSelected.idx || this.props.idx === meta.selected.idx;
}
return true;
},
isCellSelectEnabled: function isCellSelectEnabled() {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
return meta.enableCellSelect;
},
hasChangedDependentValues: function hasChangedDependentValues(nextProps) {
var currentColumn = this.props.column;
var hasChangedDependentValues = false;
if (currentColumn.getRowMetaData) {
var currentRowMetaData = currentColumn.getRowMetaData(this.getRowData(), currentColumn);
var nextColumn = nextProps.column;
var nextRowMetaData = nextColumn.getRowMetaData(this.getRowData(nextProps), nextColumn);
hasChangedDependentValues = !(0, _isEqual2['default'])(currentRowMetaData, nextRowMetaData);
}
return hasChangedDependentValues;
},
applyUpdateClass: function applyUpdateClass() {
var updateCellClass = this.getUpdateCellClass();
// -> removing the class
if (updateCellClass != null && updateCellClass !== '') {
var cellDOMNode = ReactDOM.findDOMNode(this);
if (cellDOMNode.classList) {
cellDOMNode.classList.remove(updateCellClass);
// -> and re-adding the class
cellDOMNode.classList.add(updateCellClass);
} else if (cellDOMNode.className.indexOf(updateCellClass) === -1) {
// IE9 doesn't support classList, nor (I think) altering element.className
// without replacing it wholesale.
cellDOMNode.className = cellDOMNode.className + ' ' + updateCellClass;
}
}
},
setScrollLeft: function setScrollLeft(scrollLeft) {
var ctrl = this; // flow on windows has an outdated react declaration, once that gets updated, we can remove this
if (ctrl.isMounted()) {
var node = ReactDOM.findDOMNode(this);
var transform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)';
node.style.webkitTransform = transform;
node.style.transform = transform;
}
},
isCopied: function isCopied() {
var copied = this.props.cellMetaData.copied;
return copied && copied.rowIdx === this.props.rowIdx && copied.idx === this.props.idx;
},
isDraggedOver: function isDraggedOver() {
var dragged = this.props.cellMetaData.dragged;
return dragged && dragged.overRowIdx === this.props.rowIdx && dragged.idx === this.props.idx;
},
wasDraggedOver: function wasDraggedOver() {
var dragged = this.props.cellMetaData.dragged;
return dragged && (dragged.overRowIdx < this.props.rowIdx && this.props.rowIdx < dragged.rowIdx || dragged.overRowIdx > this.props.rowIdx && this.props.rowIdx > dragged.rowIdx) && dragged.idx === this.props.idx;
},
isDraggedCellChanging: function isDraggedCellChanging(nextProps) {
var isChanging = void 0;
var dragged = this.props.cellMetaData.dragged;
var nextDragged = nextProps.cellMetaData.dragged;
if (dragged) {
isChanging = nextDragged && this.props.idx === nextDragged.idx || dragged && this.props.idx === dragged.idx;
return isChanging;
}
return false;
},
isCopyCellChanging: function isCopyCellChanging(nextProps) {
var isChanging = void 0;
var copied = this.props.cellMetaData.copied;
var nextCopied = nextProps.cellMetaData.copied;
if (copied) {
isChanging = nextCopied && this.props.idx === nextCopied.idx || copied && this.props.idx === copied.idx;
return isChanging;
}
return false;
},
isDraggedOverUpwards: function isDraggedOverUpwards() {
var dragged = this.props.cellMetaData.dragged;
return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx < dragged.rowIdx;
},
isDraggedOverDownwards: function isDraggedOverDownwards() {
var dragged = this.props.cellMetaData.dragged;
return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx > dragged.rowIdx;
},
isFocusedOnBody: function isFocusedOnBody() {
return document.activeElement == null || document.activeElement.nodeName && typeof document.activeElement.nodeName === 'string' && document.activeElement.nodeName.toLowerCase() === 'body';
},
checkFocus: function checkFocus() {
if (this.isSelected() && !this.isActive()) {
if (this.props.isScrolling && !this.props.cellMetaData.isScrollingVerticallyWithKeyboard && !this.props.cellMetaData.isScrollingHorizontallyWithKeyboard) {
return;
}
// Only focus to the current cell if the currently active node in the document is within the data grid.
// Meaning focus should not be stolen from elements that the grid doesnt control.
var dataGridDOMNode = this.props.cellMetaData && this.props.cellMetaData.getDataGridDOMNode ? this.props.cellMetaData.getDataGridDOMNode() : null;
if (document.activeElement.className === 'react-grid-Cell' || this.isFocusedOnBody() || dataGridDOMNode && dataGridDOMNode.contains(document.activeElement)) {
var cellDOMNode = ReactDOM.findDOMNode(this);
if (cellDOMNode) {
cellDOMNode.focus();
}
}
}
},
canEdit: function canEdit() {
return this.props.column.editor != null || this.props.column.editable;
},
canExpand: function canExpand() {
return this.props.expandableOptions && this.props.expandableOptions.canExpand;
},
createColumEventCallBack: function createColumEventCallBack(onColumnEvent, info) {
return function (e) {
onColumnEvent(e, info);
};
},
createCellEventCallBack: function createCellEventCallBack(gridEvent, columnEvent) {
return function (e) {
gridEvent(e);
columnEvent(e);
};
},
createEventDTO: function createEventDTO(gridEvents, columnEvents, onColumnEvent) {
var allEvents = Object.assign({}, gridEvents);
for (var eventKey in columnEvents) {
if (columnEvents.hasOwnProperty(eventKey)) {
var event = columnEvents[event];
var eventInfo = { rowIdx: this.props.rowIdx, idx: this.props.idx, name: eventKey };
var eventCallback = this.createColumEventCallBack(onColumnEvent, eventInfo);
if (allEvents.hasOwnProperty(eventKey)) {
var currentEvent = allEvents[eventKey];
allEvents[eventKey] = this.createCellEventCallBack(currentEvent, eventCallback);
} else {
allEvents[eventKey] = eventCallback;
}
}
}
return allEvents;
},
getEvents: function getEvents() {
var columnEvents = this.props.column ? Object.assign({}, this.props.column.events) : undefined;
var onColumnEvent = this.props.cellMetaData ? this.props.cellMetaData.onColumnEvent : undefined;
var gridEvents = {
onClick: this.onCellClick,
onDoubleClick: this.onCellDoubleClick,
onContextMenu: this.onCellContextMenu,
onDragOver: this.onDragOver
};
if (!columnEvents || !onColumnEvent) {
return gridEvents;
}
return this.createEventDTO(gridEvents, columnEvents, onColumnEvent);
},
getKnownDivProps: function getKnownDivProps() {
return createObjectWithProperties(this.props, knownDivPropertyKeys);
},
renderCellContent: function renderCellContent(props) {
var CellContent = void 0;
var Formatter = this.getFormatter();
if (React.isValidElement(Formatter)) {
props.dependentValues = this.getFormatterDependencies();
CellContent = React.cloneElement(Formatter, props);
} else if (isFunction(Formatter)) {
CellContent = React.createElement(Formatter, { value: this.props.value, dependentValues: this.getFormatterDependencies() });
} else {
CellContent = React.createElement(SimpleCellFormatter, { value: this.props.value });
}
var cellExpander = void 0;
var marginLeft = this.props.expandableOptions ? this.props.expandableOptions.treeDepth * 30 : 0;
if (this.canExpand()) {
cellExpander = React.createElement(
'span',
{ style: { float: 'left', marginLeft: marginLeft }, onClick: this.onCellExpand },
this.props.expandableOptions.expanded ? String.fromCharCode('9660') : String.fromCharCode('9658')
);
}
return React.createElement(
'div',
{ className: 'react-grid-Cell__value' },
cellExpander,
React.createElement(
'span',
null,
CellContent
),
' ',
this.props.cellControls,
' '
);
},
render: function render() {
if (this.props.column.hidden) {
return null;
}
var style = this.getStyle();
var className = this.getCellClass();
var cellContent = this.renderCellContent({
value: this.props.value,
column: this.props.column,
rowIdx: this.props.rowIdx,
isExpanded: this.props.isExpanded
});
var dragHandle = !this.isActive() && ColumnUtils.canEdit(this.props.column, this.props.rowData, this.props.cellMetaData.enableCellSelect) ? React.createElement(
'div',
{ className: 'drag-handle', draggable: 'true', onDoubleClick: this.onDragHandleDoubleClick },
React.createElement('span', { style: { display: 'none' } })
) : null;
var events = this.getEvents();
return React.createElement(
'div',
_extends({}, this.getKnownDivProps(), { className: className, style: style }, events),
cellContent,
dragHandle
);
}
});
module.exports = Cell;
/***/ },
/* 25 */
/***/ function(module, exports) {
'use strict';
var KeyboardHandlerMixin = {
onKeyDown: function onKeyDown(e) {
if (this.isCtrlKeyHeldDown(e)) {
this.checkAndCall('onPressKeyWithCtrl', e);
} else if (this.isKeyExplicitlyHandled(e.key)) {
// break up individual keyPress events to have their own specific callbacks
// this allows multiple mixins to listen to onKeyDown events and somewhat reduces methodName clashing
var callBack = 'onPress' + e.key;
this.checkAndCall(callBack, e);
} else if (this.isKeyPrintable(e.keyCode)) {
this.checkAndCall('onPressChar', e);
}
// Track which keys are currently down for shift clicking etc
this._keysDown = this._keysDown || {};
this._keysDown[e.keyCode] = true;
if (this.props.onGridKeyDown && typeof this.props.onGridKeyDown === 'function') {
this.props.onGridKeyDown(e);
}
},
onKeyUp: function onKeyUp(e) {
// Track which keys are currently down for shift clicking etc
this._keysDown = this._keysDown || {};
delete this._keysDown[e.keyCode];
if (this.props.onGridKeyUp && typeof this.props.onGridKeyUp === 'function') {
this.props.onGridKeyUp(e);
}
},
isKeyDown: function isKeyDown(keyCode) {
if (!this._keysDown) return false;
return keyCode in this._keysDown;
},
isSingleKeyDown: function isSingleKeyDown(keyCode) {
if (!this._keysDown) return false;
return keyCode in this._keysDown && Object.keys(this._keysDown).length === 1;
},
// taken from http://stackoverflow.com/questions/12467240/determine-if-javascript-e-keycode-is-a-printable-non-control-character
isKeyPrintable: function isKeyPrintable(keycode) {
var valid = keycode > 47 && keycode < 58 || // number keys
keycode === 32 || keycode === 13 || // spacebar & return key(s) (if you want to allow carriage returns)
keycode > 64 && keycode < 91 || // letter keys
keycode > 95 && keycode < 112 || // numpad keys
keycode > 185 && keycode < 193 || // ;=,-./` (in order)
keycode > 218 && keycode < 223; // [\]' (in order)
return valid;
},
isKeyExplicitlyHandled: function isKeyExplicitlyHandled(key) {
return typeof this['onPress' + key] === 'function';
},
isCtrlKeyHeldDown: function isCtrlKeyHeldDown(e) {
return e.ctrlKey === true && e.key !== 'Control';
},
checkAndCall: function checkAndCall(methodName, args) {
if (typeof this[methodName] === 'function') {
this[methodName](args);
}
}
};
module.exports = KeyboardHandlerMixin;
/***/ },
/* 26 */
/***/ function(module, exports) {
'use strict';
var RowUtils = {
get: function get(row, property) {
if (typeof row.get === 'function') {
return row.get(property);
}
return row[property];
},
isRowSelected: function isRowSelected(keys, indexes, isSelectedKey, rowData, rowIdx) {
if (indexes && Object.prototype.toString.call(indexes) === '[object Array]') {
return indexes.indexOf(rowIdx) > -1;
} else if (keys && keys.rowKey && keys.values && Object.prototype.toString.call(keys.values) === '[object Array]') {
return keys.values.indexOf(rowData[keys.rowKey]) > -1;
} else if (isSelectedKey && rowData && typeof isSelectedKey === 'string') {
return rowData[isSelectedKey];
}
return false;
}
};
module.exports = RowUtils;
/***/ },
/* 27 */
/***/ function(module, exports) {
'use strict';
var isFunction = function isFunction(functionToCheck) {
var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
module.exports = isFunction;
/***/ },
/* 28 */
/***/ function(module, exports) {
'use strict';
var size = void 0;
function getScrollbarSize() {
if (size === undefined) {
var outer = document.createElement('div');
outer.style.width = '50px';
outer.style.height = '50px';
outer.style.position = 'absolute';
outer.style.top = '-200px';
outer.style.left = '-200px';
var inner = document.createElement('div');
inner.style.height = '100px';
inner.style.width = '100%';
outer.appendChild(inner);
document.body.appendChild(outer);
var outerWidth = outer.clientWidth;
outer.style.overflowY = 'scroll';
var innerWidth = inner.clientWidth;
document.body.removeChild(outer);
size = outerWidth - innerWidth;
}
return size;
}
module.exports = getScrollbarSize;
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(112),
mapCacheDelete = __webpack_require__(113),
mapCacheGet = __webpack_require__(114),
mapCacheHas = __webpack_require__(115),
mapCacheSet = __webpack_require__(116);
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(77),
arraySome = __webpack_require__(82),
cacheHas = __webpack_require__(91);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
module.exports = equalArrays;
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof (window) == 'object' && (window) && (window).Object === Object && (window);
module.exports = freeGlobal;
/***/ },
/* 32 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ },
/* 33 */
/***/ function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
module.exports = eq;
/***/ },
/* 34 */
/***/ function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(3),
stubFalse = __webpack_require__(134);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
module.exports = isBuffer;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(40)(module)))
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(13),
isObject = __webpack_require__(23);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ },
/* 37 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(87),
baseUnary = __webpack_require__(90),
nodeUtil = __webpack_require__(119);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
module.exports = isTypedArray;
/***/ },
/* 39 */
/***/ function(module, exports) {
'use strict';
function ToObject(val) {
if (val == null) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
module.exports = Object.assign || function (target, source) {
var from;
var keys;
var to = ToObject(target);
for (var s = 1; s < arguments.length; s++) {
from = arguments[s];
keys = Object.keys(Object(from));
for (var i = 0; i < keys.length; i++) {
to[keys[i]] = from[keys[i]];
}
}
return to;
};
/***/ },
/* 40 */
/***/ function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
module.children = [];
module.webpackPolyfill = 1;
}
return module;
}
/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _keyMirror = __webpack_require__(72);
var _keyMirror2 = _interopRequireDefault(_keyMirror);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var constants = {
UpdateActions: (0, _keyMirror2['default'])({
CELL_UPDATE: null,
COLUMN_FILL: null,
COPY_PASTE: null,
CELL_DRAG: null
})
};
exports['default'] = constants;
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _shallowEqual = __webpack_require__(20);
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
var _RowsContainer = __webpack_require__(58);
var _RowsContainer2 = _interopRequireDefault(_RowsContainer);
var _RowGroup = __webpack_require__(57);
var _RowGroup2 = _interopRequireDefault(_RowGroup);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var joinClasses = __webpack_require__(5);
var PropTypes = React.PropTypes;
var ScrollShim = __webpack_require__(59);
var Row = __webpack_require__(18);
var cellMetaDataShape = __webpack_require__(8);
var RowUtils = __webpack_require__(26);
var Canvas = React.createClass({
displayName: 'Canvas',
mixins: [ScrollShim],
propTypes: {
rowRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
rowHeight: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
width: PropTypes.number,
totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
style: PropTypes.string,
className: PropTypes.string,
displayStart: PropTypes.number.isRequired,
displayEnd: PropTypes.number.isRequired,
visibleStart: PropTypes.number.isRequired,
visibleEnd: PropTypes.number.isRequired,
colVisibleStart: PropTypes.number.isRequired,
colVisibleEnd: PropTypes.number.isRequired,
colDisplayStart: PropTypes.number.isRequired,
colDisplayEnd: PropTypes.number.isRequired,
rowsCount: PropTypes.number.isRequired,
rowGetter: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.array.isRequired]),
expandedRows: PropTypes.array,
onRows: PropTypes.func,
onScroll: PropTypes.func,
columns: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired,
cellMetaData: PropTypes.shape(cellMetaDataShape).isRequired,
selectedRows: PropTypes.array,
rowKey: React.PropTypes.string,
rowScrollTimeout: React.PropTypes.number,
contextMenu: PropTypes.element,
getSubRowDetails: PropTypes.func,
rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({
indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired
}), React.PropTypes.shape({
isSelectedKey: React.PropTypes.string.isRequired
}), React.PropTypes.shape({
keys: React.PropTypes.shape({
values: React.PropTypes.array.isRequired,
rowKey: React.PropTypes.string.isRequired
}).isRequired
})]),
rowGroupRenderer: React.PropTypes.func,
isScrolling: React.PropTypes.bool
},
getDefaultProps: function getDefaultProps() {
return {
rowRenderer: Row,
onRows: function onRows() {},
selectedRows: [],
rowScrollTimeout: 0
};
},
getInitialState: function getInitialState() {
return {
displayStart: this.props.displayStart,
displayEnd: this.props.displayEnd,
scrollingTimeout: null
};
},
componentWillMount: function componentWillMount() {
this._currentRowsLength = 0;
this._currentRowsRange = { start: 0, end: 0 };
this._scroll = { scrollTop: 0, scrollLeft: 0 };
},
componentDidMount: function componentDidMount() {
this.onRows();
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (nextProps.displayStart !== this.state.displayStart || nextProps.displayEnd !== this.state.displayEnd) {
this.setState({
displayStart: nextProps.displayStart,
displayEnd: nextProps.displayEnd
});
}
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
var shouldUpdate = nextState.displayStart !== this.state.displayStart || nextState.displayEnd !== this.state.displayEnd || nextState.scrollingTimeout !== this.state.scrollingTimeout || nextProps.rowsCount !== this.props.rowsCount || nextProps.rowHeight !== this.props.rowHeight || nextProps.columns !== this.props.columns || nextProps.width !== this.props.width || nextProps.cellMetaData !== this.props.cellMetaData || this.props.colDisplayStart !== nextProps.colDisplayStart || this.props.colDisplayEnd !== nextProps.colDisplayEnd || this.props.colVisibleStart !== nextProps.colVisibleStart || this.props.colVisibleEnd !== nextProps.colVisibleEnd || !(0, _shallowEqual2['default'])(nextProps.style, this.props.style);
return shouldUpdate;
},
componentWillUnmount: function componentWillUnmount() {
this._currentRowsLength = 0;
this._currentRowsRange = { start: 0, end: 0 };
this._scroll = { scrollTop: 0, scrollLeft: 0 };
},
componentDidUpdate: function componentDidUpdate() {
if (this._scroll.scrollTop !== 0 && this._scroll.scrollLeft !== 0) {
this.setScrollLeft(this._scroll.scrollLeft);
}
this.onRows();
},
onRows: function onRows() {
if (this._currentRowsRange !== { start: 0, end: 0 }) {
this.props.onRows(this._currentRowsRange);
this._currentRowsRange = { start: 0, end: 0 };
}
},
onScroll: function onScroll(e) {
if (ReactDOM.findDOMNode(this) !== e.target) {
return;
}
this.appendScrollShim();
var scrollLeft = e.target.scrollLeft;
var scrollTop = e.target.scrollTop;
var scroll = { scrollTop: scrollTop, scrollLeft: scrollLeft };
this._scroll = scroll;
this.props.onScroll(scroll);
},
getSubRows: function getSubRows(row) {
var subRowDetails = this.props.getSubRowDetails(row);
if (subRowDetails.expanded === true) {
return subRowDetails.children.map(function (r) {
return { row: r };
});
}
},
addSubRows: function addSubRows(rowsInput, row, i, displayEnd, treeDepth) {
var _this = this;
var subRowDetails = this.props.getSubRowDetails(row) || {};
var rows = rowsInput;
var increment = i;
if (increment < displayEnd) {
subRowDetails.treeDepth = treeDepth;
rows.push({ row: row, subRowDetails: subRowDetails });
increment++;
}
if (subRowDetails && subRowDetails.expanded) {
var subRows = this.getSubRows(row);
subRows.forEach(function (sr) {
var result = _this.addSubRows(rows, sr.row, increment, displayEnd, treeDepth + 1);
rows = result.rows;
increment = result.increment;
});
}
return { rows: rows, increment: increment };
},
getRows: function getRows(displayStart, displayEnd) {
this._currentRowsRange = { start: displayStart, end: displayEnd };
if (Array.isArray(this.props.rowGetter)) {
return this.props.rowGetter.slice(displayStart, displayEnd);
}
var rows = [];
var rowFetchIndex = displayStart;
var i = displayStart;
while (i < displayEnd) {
var row = this.props.rowGetter(rowFetchIndex);
if (this.props.getSubRowDetails) {
var treeDepth = 0;
var result = this.addSubRows(rows, row, i, displayEnd, treeDepth);
rows = result.rows;
i = result.increment;
} else {
rows.push({ row: row });
i++;
}
rowFetchIndex++;
}
return rows;
},
getScrollbarWidth: function getScrollbarWidth() {
var scrollbarWidth = 0;
// Get the scrollbar width
var canvas = ReactDOM.findDOMNode(this);
scrollbarWidth = canvas.offsetWidth - canvas.clientWidth;
return scrollbarWidth;
},
getScroll: function getScroll() {
var _ReactDOM$findDOMNode = ReactDOM.findDOMNode(this),
scrollTop = _ReactDOM$findDOMNode.scrollTop,
scrollLeft = _ReactDOM$findDOMNode.scrollLeft;
return { scrollTop: scrollTop, scrollLeft: scrollLeft };
},
isRowSelected: function isRowSelected(idx, row) {
var _this2 = this;
// Use selectedRows if set
if (this.props.selectedRows !== null) {
var selectedRows = this.props.selectedRows.filter(function (r) {
var rowKeyValue = row.get ? row.get(_this2.props.rowKey) : row[_this2.props.rowKey];
return r[_this2.props.rowKey] === rowKeyValue;
});
return selectedRows.length > 0 && selectedRows[0].isSelected;
}
// Else use new rowSelection props
if (this.props.rowSelection) {
var _props$rowSelection = this.props.rowSelection,
keys = _props$rowSelection.keys,
indexes = _props$rowSelection.indexes,
isSelectedKey = _props$rowSelection.isSelectedKey;
return RowUtils.isRowSelected(keys, indexes, isSelectedKey, row, idx);
}
return false;
},
_currentRowsLength: 0,
_currentRowsRange: { start: 0, end: 0 },
_scroll: { scrollTop: 0, scrollLeft: 0 },
setScrollLeft: function setScrollLeft(scrollLeft) {
if (this._currentRowsLength !== 0) {
if (!this.refs) return;
for (var i = 0, len = this._currentRowsLength; i < len; i++) {
if (this.refs[i]) {
var row = this.getRowByRef(i);
if (row && row.setScrollLeft) {
row.setScrollLeft(scrollLeft);
}
}
}
}
},
getRowByRef: function getRowByRef(i) {
// check if wrapped with React DND drop target
var wrappedRow = this.refs[i].getDecoratedComponentInstance ? this.refs[i].getDecoratedComponentInstance(i) : null;
if (wrappedRow) {
return wrappedRow.refs.row;
}
return this.refs[i];
},
renderRow: function renderRow(props) {
var row = props.row;
if (row.__metaData && row.__metaData.isGroup) {
return React.createElement(_RowGroup2['default'], _extends({
key: props.key,
name: row.name
}, row.__metaData, {
row: props.row,
idx: props.idx,
height: props.height,
cellMetaData: this.props.cellMetaData,
renderer: this.props.rowGroupRenderer
}));
}
var RowsRenderer = this.props.rowRenderer;
if (typeof RowsRenderer === 'function') {
return React.createElement(RowsRenderer, props);
}
if (React.isValidElement(this.props.rowRenderer)) {
return React.cloneElement(this.props.rowRenderer, props);
}
},
renderPlaceholder: function renderPlaceholder(key, height) {
// just renders empty cells
// if we wanted to show gridlines, we'd need classes and position as with renderScrollingPlaceholder
return React.createElement(
'div',
{ key: key, style: { height: height } },
this.props.columns.map(function (column, idx) {
return React.createElement('div', { style: { width: column.width }, key: idx });
})
);
},
render: function render() {
var _this3 = this;
var _state = this.state,
displayStart = _state.displayStart,
displayEnd = _state.displayEnd;
var _props = this.props,
rowHeight = _props.rowHeight,
rowsCount = _props.rowsCount;
var rows = this.getRows(displayStart, displayEnd).map(function (r, idx) {
return _this3.renderRow({
key: 'row-' + (displayStart + idx),
ref: idx,
idx: displayStart + idx,
visibleStart: _this3.props.visibleStart,
visibleEnd: _this3.props.visibleEnd,
row: r.row,
height: rowHeight,
onMouseOver: _this3.onMouseOver,
columns: _this3.props.columns,
isSelected: _this3.isRowSelected(displayStart + idx, r.row, displayStart, displayEnd),
expandedRows: _this3.props.expandedRows,
cellMetaData: _this3.props.cellMetaData,
subRowDetails: r.subRowDetails,
colVisibleStart: _this3.props.colVisibleStart,
colVisibleEnd: _this3.props.colVisibleEnd,
colDisplayStart: _this3.props.colDisplayStart,
colDisplayEnd: _this3.props.colDisplayEnd,
isScrolling: _this3.props.isScrolling
});
});
this._currentRowsLength = rows.length;
if (displayStart > 0) {
rows.unshift(this.renderPlaceholder('top', displayStart * rowHeight));
}
if (rowsCount - displayEnd > 0) {
rows.push(this.renderPlaceholder('bottom', (rowsCount - displayEnd) * rowHeight));
}
var style = {
position: 'absolute',
top: 0,
left: 0,
overflowX: 'auto',
overflowY: 'scroll',
width: this.props.totalWidth,
height: this.props.height
};
return React.createElement(
'div',
{
style: style,
onScroll: this.onScroll,
className: joinClasses('react-grid-Canvas', this.props.className, { opaque: this.props.cellMetaData.selected && this.props.cellMetaData.selected.active }) },
React.createElement(_RowsContainer2['default'], {
width: this.props.width,
rows: rows,
contextMenu: this.props.contextMenu,
rowIdx: this.props.cellMetaData.selected.rowIdx,
idx: this.props.cellMetaData.selected.idx })
);
}
});
module.exports = Canvas;
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var isValidElement = __webpack_require__(1).isValidElement;
module.exports = function sameColumn(a, b) {
var k = void 0;
for (k in a) {
if (a.hasOwnProperty(k)) {
if (typeof a[k] === 'function' && typeof b[k] === 'function' || isValidElement(a[k]) && isValidElement(b[k])) {
continue;
}
if (!b.hasOwnProperty(k) || a[k] !== b[k]) {
return false;
}
}
}
for (k in b) {
if (b.hasOwnProperty(k) && !a.hasOwnProperty(k)) {
return false;
}
}
return true;
};
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _reactDom = __webpack_require__(2);
var _reactDom2 = _interopRequireDefault(_reactDom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ColumnMetrics = __webpack_require__(17);
var DOMMetrics = __webpack_require__(10);
Object.assign = __webpack_require__(39);
var PropTypes = __webpack_require__(1).PropTypes;
var ColumnUtils = __webpack_require__(4);
var Column = function Column() {
_classCallCheck(this, Column);
};
module.exports = {
mixins: [DOMMetrics.MetricsMixin],
propTypes: {
columns: PropTypes.arrayOf(Column),
minColumnWidth: PropTypes.number,
columnEquality: PropTypes.func,
onColumnResize: PropTypes.func
},
DOMMetrics: {
gridWidth: function gridWidth() {
return _reactDom2['default'].findDOMNode(this).parentElement.offsetWidth;
}
},
getDefaultProps: function getDefaultProps() {
return {
minColumnWidth: 80,
columnEquality: ColumnMetrics.sameColumn
};
},
componentWillMount: function componentWillMount() {
this._mounted = true;
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (nextProps.columns) {
if (!ColumnMetrics.sameColumns(this.props.columns, nextProps.columns, this.props.columnEquality) || nextProps.minWidth !== this.props.minWidth) {
var columnMetrics = this.createColumnMetrics(nextProps);
this.setState({ columnMetrics: columnMetrics });
}
}
},
getTotalWidth: function getTotalWidth() {
var totalWidth = 0;
if (this._mounted) {
totalWidth = this.DOMMetrics.gridWidth();
} else {
totalWidth = ColumnUtils.getSize(this.props.columns) * this.props.minColumnWidth;
}
return totalWidth;
},
getColumnMetricsType: function getColumnMetricsType(metrics) {
var totalWidth = metrics.totalWidth || this.getTotalWidth();
var currentMetrics = {
columns: metrics.columns,
totalWidth: totalWidth,
minColumnWidth: metrics.minColumnWidth
};
var updatedMetrics = ColumnMetrics.recalculate(currentMetrics);
return updatedMetrics;
},
getColumn: function getColumn(idx) {
var columns = this.state.columnMetrics.columns;
if (Array.isArray(columns)) {
return columns[idx];
} else if (typeof Immutable !== 'undefined') {
return columns.get(idx);
}
},
getSize: function getSize() {
var columns = this.state.columnMetrics.columns;
if (Array.isArray(columns)) {
return columns.length;
} else if (typeof Immutable !== 'undefined') {
return columns.size;
}
},
metricsUpdated: function metricsUpdated() {
var columnMetrics = this.createColumnMetrics();
this.setState({ columnMetrics: columnMetrics });
},
createColumnMetrics: function createColumnMetrics() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
var gridColumns = this.setupGridColumns(props);
return this.getColumnMetricsType({
columns: gridColumns,
minColumnWidth: this.props.minColumnWidth,
totalWidth: props.minWidth
});
},
onColumnResize: function onColumnResize(index, width) {
var columnMetrics = ColumnMetrics.resizeColumn(this.state.columnMetrics, index, width);
this.setState({ columnMetrics: columnMetrics });
if (this.props.onColumnResize) {
this.props.onColumnResize(index, width);
}
}
};
/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = __webpack_require__(1);
var PropTypes = React.PropTypes;
var createObjectWithProperties = __webpack_require__(9);
// The list of the propTypes that we want to include in the Draggable div
var knownDivPropertyKeys = ['onDragStart', 'onDragEnd', 'onDrag', 'style'];
var Draggable = React.createClass({
displayName: 'Draggable',
propTypes: {
onDragStart: PropTypes.func,
onDragEnd: PropTypes.func,
onDrag: PropTypes.func,
component: PropTypes.oneOfType([PropTypes.func, PropTypes.constructor]),
style: PropTypes.object
},
getDefaultProps: function getDefaultProps() {
return {
onDragStart: function onDragStart() {
return true;
},
onDragEnd: function onDragEnd() {},
onDrag: function onDrag() {}
};
},
getInitialState: function getInitialState() {
return {
drag: null
};
},
componentWillUnmount: function componentWillUnmount() {
this.cleanUp();
},
onMouseDown: function onMouseDown(e) {
var drag = this.props.onDragStart(e);
if (drag === null && e.button !== 0) {
return;
}
window.addEventListener('mouseup', this.onMouseUp);
window.addEventListener('mousemove', this.onMouseMove);
window.addEventListener('touchend', this.onMouseUp);
window.addEventListener('touchmove', this.onMouseMove);
this.setState({ drag: drag });
},
onMouseMove: function onMouseMove(e) {
if (this.state.drag === null) {
return;
}
if (e.preventDefault) {
e.preventDefault();
}
this.props.onDrag(e);
},
onMouseUp: function onMouseUp(e) {
this.cleanUp();
this.props.onDragEnd(e, this.state.drag);
this.setState({ drag: null });
},
cleanUp: function cleanUp() {
window.removeEventListener('mouseup', this.onMouseUp);
window.removeEventListener('mousemove', this.onMouseMove);
window.removeEventListener('touchend', this.onMouseUp);
window.removeEventListener('touchmove', this.onMouseMove);
},
getKnownDivProps: function getKnownDivProps() {
return createObjectWithProperties(this.props, knownDivPropertyKeys);
},
render: function render() {
return React.createElement('div', _extends({}, this.getKnownDivProps(), {
onMouseDown: this.onMouseDown,
onTouchStart: this.onMouseDown,
className: 'react-grid-HeaderCell__draggable' }));
}
});
module.exports = Draggable;
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var PropTypes = React.PropTypes;
var Header = __webpack_require__(48);
var Viewport = __webpack_require__(60);
var GridScrollMixin = __webpack_require__(47);
var DOMMetrics = __webpack_require__(10);
var cellMetaDataShape = __webpack_require__(8);
var Grid = React.createClass({
displayName: 'Grid',
propTypes: {
rowGetter: PropTypes.oneOfType([PropTypes.array, PropTypes.func]).isRequired,
columns: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
columnMetrics: PropTypes.object,
minHeight: PropTypes.number,
totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
headerRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
rowHeight: PropTypes.number,
rowRenderer: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
emptyRowsView: PropTypes.func,
expandedRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
selectedRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]),
rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({
indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired
}), React.PropTypes.shape({
isSelectedKey: React.PropTypes.string.isRequired
}), React.PropTypes.shape({
keys: React.PropTypes.shape({
values: React.PropTypes.array.isRequired,
rowKey: React.PropTypes.string.isRequired
}).isRequired
})]),
rowsCount: PropTypes.number,
onRows: PropTypes.func,
sortColumn: React.PropTypes.string,
sortDirection: React.PropTypes.oneOf(['ASC', 'DESC', 'NONE']),
rowOffsetHeight: PropTypes.number.isRequired,
onViewportKeydown: PropTypes.func.isRequired,
onViewportKeyup: PropTypes.func,
onViewportDragStart: PropTypes.func.isRequired,
onViewportDragEnd: PropTypes.func.isRequired,
onViewportDoubleClick: PropTypes.func.isRequired,
onColumnResize: PropTypes.func,
onSort: PropTypes.func,
cellMetaData: PropTypes.shape(cellMetaDataShape),
rowKey: PropTypes.string.isRequired,
rowScrollTimeout: PropTypes.number,
contextMenu: PropTypes.element,
getSubRowDetails: PropTypes.func,
draggableHeaderCell: PropTypes.func,
getValidFilterValues: PropTypes.func,
rowGroupRenderer: PropTypes.func,
overScan: PropTypes.object
},
mixins: [GridScrollMixin, DOMMetrics.MetricsComputatorMixin],
getDefaultProps: function getDefaultProps() {
return {
rowHeight: 35,
minHeight: 350
};
},
getStyle: function getStyle() {
return {
overflow: 'hidden',
outline: 0,
position: 'relative',
minHeight: this.props.minHeight
};
},
render: function render() {
var headerRows = this.props.headerRows || [{ ref: 'row' }];
var EmptyRowsView = this.props.emptyRowsView;
return React.createElement(
'div',
{ style: this.getStyle(), className: 'react-grid-Grid' },
React.createElement(Header, {
ref: 'header',
columnMetrics: this.props.columnMetrics,
onColumnResize: this.props.onColumnResize,
height: this.props.rowHeight,
totalWidth: this.props.totalWidth,
headerRows: headerRows,
sortColumn: this.props.sortColumn,
sortDirection: this.props.sortDirection,
draggableHeaderCell: this.props.draggableHeaderCell,
onSort: this.props.onSort,
onScroll: this.onHeaderScroll,
getValidFilterValues: this.props.getValidFilterValues
}),
this.props.rowsCount >= 1 || this.props.rowsCount === 0 && !this.props.emptyRowsView ? React.createElement(
'div',
{ ref: 'viewPortContainer', tabIndex: '0', onKeyDown: this.props.onViewportKeydown, onKeyUp: this.props.onViewportKeyup, onDoubleClick: this.props.onViewportDoubleClick, onDragStart: this.props.onViewportDragStart, onDragEnd: this.props.onViewportDragEnd },
React.createElement(Viewport, {
ref: 'viewport',
rowKey: this.props.rowKey,
width: this.props.columnMetrics.width,
rowHeight: this.props.rowHeight,
rowRenderer: this.props.rowRenderer,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
selectedRows: this.props.selectedRows,
expandedRows: this.props.expandedRows,
columnMetrics: this.props.columnMetrics,
totalWidth: this.props.totalWidth,
onScroll: this.onScroll,
onRows: this.props.onRows,
cellMetaData: this.props.cellMetaData,
rowOffsetHeight: this.props.rowOffsetHeight || this.props.rowHeight * headerRows.length,
minHeight: this.props.minHeight,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu,
rowSelection: this.props.rowSelection,
getSubRowDetails: this.props.getSubRowDetails,
rowGroupRenderer: this.props.rowGroupRenderer,
overScan: this.props.overScan
})
) : React.createElement(
'div',
{ ref: 'emptyView', className: 'react-grid-Empty' },
React.createElement(EmptyRowsView, null)
)
);
}
});
module.exports = Grid;
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var ReactDOM = __webpack_require__(2);
module.exports = {
componentDidMount: function componentDidMount() {
this._scrollLeft = this.refs.viewport ? this.refs.viewport.getScroll().scrollLeft : 0;
this._onScroll();
},
componentDidUpdate: function componentDidUpdate() {
this._onScroll();
},
componentWillMount: function componentWillMount() {
this._scrollLeft = undefined;
},
componentWillUnmount: function componentWillUnmount() {
this._scrollLeft = undefined;
},
onScroll: function onScroll(props) {
if (this._scrollLeft !== props.scrollLeft) {
this._scrollLeft = props.scrollLeft;
this._onScroll();
}
},
onHeaderScroll: function onHeaderScroll(e) {
var scrollLeft = e.target.scrollLeft;
if (this._scrollLeft !== scrollLeft) {
this._scrollLeft = scrollLeft;
this.refs.header.setScrollLeft(scrollLeft);
var canvas = ReactDOM.findDOMNode(this.refs.viewport.refs.canvas);
canvas.scrollLeft = scrollLeft;
this.refs.viewport.refs.canvas.setScrollLeft(scrollLeft);
}
},
_onScroll: function _onScroll() {
if (this._scrollLeft !== undefined) {
this.refs.header.setScrollLeft(this._scrollLeft);
if (this.refs.viewport) {
this.refs.viewport.setScrollLeft(this._scrollLeft);
}
}
}
};
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var joinClasses = __webpack_require__(5);
var shallowCloneObject = __webpack_require__(19);
var ColumnMetrics = __webpack_require__(17);
var ColumnUtils = __webpack_require__(4);
var HeaderRow = __webpack_require__(51);
var PropTypes = React.PropTypes;
var createObjectWithProperties = __webpack_require__(9);
// The list of the propTypes that we want to include in the Header div
var knownDivPropertyKeys = ['height', 'onScroll'];
var Header = React.createClass({
displayName: 'Header',
propTypes: {
columnMetrics: PropTypes.shape({ width: PropTypes.number.isRequired, columns: PropTypes.any }).isRequired,
totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
height: PropTypes.number.isRequired,
headerRows: PropTypes.array.isRequired,
sortColumn: PropTypes.string,
sortDirection: PropTypes.oneOf(['ASC', 'DESC', 'NONE']),
onSort: PropTypes.func,
onColumnResize: PropTypes.func,
onScroll: PropTypes.func,
draggableHeaderCell: PropTypes.func,
getValidFilterValues: PropTypes.func
},
getInitialState: function getInitialState() {
return { resizing: null };
},
componentWillReceiveProps: function componentWillReceiveProps() {
this.setState({ resizing: null });
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
var update = !ColumnMetrics.sameColumns(this.props.columnMetrics.columns, nextProps.columnMetrics.columns, ColumnMetrics.sameColumn) || this.props.totalWidth !== nextProps.totalWidth || this.props.headerRows.length !== nextProps.headerRows.length || this.state.resizing !== nextState.resizing || this.props.sortColumn !== nextProps.sortColumn || this.props.sortDirection !== nextProps.sortDirection;
return update;
},
onColumnResize: function onColumnResize(column, width) {
var state = this.state.resizing || this.props;
var pos = this.getColumnPosition(column);
if (pos != null) {
var _resizing = {
columnMetrics: shallowCloneObject(state.columnMetrics)
};
_resizing.columnMetrics = ColumnMetrics.resizeColumn(_resizing.columnMetrics, pos, width);
// we don't want to influence scrollLeft while resizing
if (_resizing.columnMetrics.totalWidth < state.columnMetrics.totalWidth) {
_resizing.columnMetrics.totalWidth = state.columnMetrics.totalWidth;
}
_resizing.column = ColumnUtils.getColumn(_resizing.columnMetrics.columns, pos);
this.setState({ resizing: _resizing });
}
},
onColumnResizeEnd: function onColumnResizeEnd(column, width) {
var pos = this.getColumnPosition(column);
if (pos !== null && this.props.onColumnResize) {
this.props.onColumnResize(pos, width || column.width);
}
},
getHeaderRows: function getHeaderRows() {
var _this = this;
var columnMetrics = this.getColumnMetrics();
var resizeColumn = void 0;
if (this.state.resizing) {
resizeColumn = this.state.resizing.column;
}
var headerRows = [];
this.props.headerRows.forEach(function (row, index) {
// To allow header filters to be visible
var rowHeight = 'auto';
if (row.rowType === 'filter') {
rowHeight = '500px';
}
var headerRowStyle = {
position: 'absolute',
top: _this.getCombinedHeaderHeights(index),
left: 0,
width: _this.props.totalWidth,
overflowX: 'hidden',
minHeight: rowHeight
};
headerRows.push(React.createElement(HeaderRow, {
key: row.ref,
ref: row.ref,
rowType: row.rowType,
style: headerRowStyle,
onColumnResize: _this.onColumnResize,
onColumnResizeEnd: _this.onColumnResizeEnd,
width: columnMetrics.width,
height: row.height || _this.props.height,
columns: columnMetrics.columns,
resizing: resizeColumn,
draggableHeaderCell: _this.props.draggableHeaderCell,
filterable: row.filterable,
onFilterChange: row.onFilterChange,
sortColumn: _this.props.sortColumn,
sortDirection: _this.props.sortDirection,
onSort: _this.props.onSort,
onScroll: _this.props.onScroll,
getValidFilterValues: _this.props.getValidFilterValues
}));
});
return headerRows;
},
getColumnMetrics: function getColumnMetrics() {
var columnMetrics = void 0;
if (this.state.resizing) {
columnMetrics = this.state.resizing.columnMetrics;
} else {
columnMetrics = this.props.columnMetrics;
}
return columnMetrics;
},
getColumnPosition: function getColumnPosition(column) {
var columnMetrics = this.getColumnMetrics();
var pos = -1;
columnMetrics.columns.forEach(function (c, idx) {
if (c.key === column.key) {
pos = idx;
}
});
return pos === -1 ? null : pos;
},
getCombinedHeaderHeights: function getCombinedHeaderHeights(until) {
var stopAt = this.props.headerRows.length;
if (typeof until !== 'undefined') {
stopAt = until;
}
var height = 0;
for (var index = 0; index < stopAt; index++) {
height += this.props.headerRows[index].height || this.props.height;
}
return height;
},
getStyle: function getStyle() {
return {
position: 'relative',
height: this.getCombinedHeaderHeights()
};
},
setScrollLeft: function setScrollLeft(scrollLeft) {
var node = ReactDOM.findDOMNode(this.refs.row);
node.scrollLeft = scrollLeft;
this.refs.row.setScrollLeft(scrollLeft);
if (this.refs.filterRow) {
var nodeFilters = ReactDOM.findDOMNode(this.refs.filterRow);
nodeFilters.scrollLeft = scrollLeft;
this.refs.filterRow.setScrollLeft(scrollLeft);
}
},
getKnownDivProps: function getKnownDivProps() {
return createObjectWithProperties(this.props, knownDivPropertyKeys);
},
render: function render() {
var className = joinClasses({
'react-grid-Header': true,
'react-grid-Header--resizing': !!this.state.resizing
});
var headerRows = this.getHeaderRows();
return React.createElement(
'div',
_extends({}, this.getKnownDivProps(), { style: this.getStyle(), className: className }),
headerRows
);
}
});
module.exports = Header;
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _reactAddonsShallowCompare = __webpack_require__(135);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var joinClasses = __webpack_require__(5);
var ExcelColumn = __webpack_require__(6);
var ResizeHandle = __webpack_require__(55);
var PropTypes = React.PropTypes;
function simpleCellRenderer(objArgs) {
return React.createElement(
'div',
{ className: 'widget-HeaderCell__value' },
objArgs.column.name
);
}
var HeaderCell = React.createClass({
displayName: 'HeaderCell',
propTypes: {
renderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).isRequired,
column: PropTypes.shape(ExcelColumn).isRequired,
onResize: PropTypes.func.isRequired,
height: PropTypes.number.isRequired,
onResizeEnd: PropTypes.func.isRequired,
className: PropTypes.string
},
getDefaultProps: function getDefaultProps() {
return {
renderer: simpleCellRenderer
};
},
getInitialState: function getInitialState() {
return { resizing: false };
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState) && (this.props.column.width !== nextProps.column.width || this.props.column.left !== nextProps.column.left || this.props.column.name !== nextProps.column.name || this.props.column.cellClass !== nextProps.column.cellClass);
},
onDragStart: function onDragStart(e) {
this.setState({ resizing: true });
// need to set dummy data for FF
if (e && e.dataTransfer && e.dataTransfer.setData) e.dataTransfer.setData('text/plain', 'dummy');
},
onDrag: function onDrag(e) {
var resize = this.props.onResize || null; // for flows sake, doesnt recognise a null check direct
if (resize) {
var _width = this.getWidthFromMouseEvent(e);
if (_width > 0) {
resize(this.props.column, _width);
}
}
},
onDragEnd: function onDragEnd(e) {
var width = this.getWidthFromMouseEvent(e);
this.props.onResizeEnd(this.props.column, width);
this.setState({ resizing: false });
},
getWidthFromMouseEvent: function getWidthFromMouseEvent(e) {
var right = e.pageX || e.touches && e.touches[0] && e.touches[0].pageX || e.changedTouches && e.changedTouches[e.changedTouches.length - 1].pageX;
var left = ReactDOM.findDOMNode(this).getBoundingClientRect().left;
return right - left;
},
getCell: function getCell() {
if (React.isValidElement(this.props.renderer)) {
// if it is a string, it's an HTML element, and column is not a valid property, so only pass height
if (typeof this.props.renderer.type === 'string') {
return React.cloneElement(this.props.renderer, { height: this.props.height });
}
return React.cloneElement(this.props.renderer, { column: this.props.column, height: this.props.height });
}
return this.props.renderer({ column: this.props.column });
},
getStyle: function getStyle() {
return {
width: this.props.column.width,
left: this.props.column.left,
display: 'inline-block',
position: 'absolute',
height: this.props.height,
margin: 0,
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
};
},
setScrollLeft: function setScrollLeft(scrollLeft) {
var node = ReactDOM.findDOMNode(this);
node.style.webkitTransform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)';
node.style.transform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)';
},
render: function render() {
var resizeHandle = void 0;
if (this.props.column.resizable) {
resizeHandle = React.createElement(ResizeHandle, {
onDrag: this.onDrag,
onDragStart: this.onDragStart,
onDragEnd: this.onDragEnd
});
}
var className = joinClasses({
'react-grid-HeaderCell': true,
'react-grid-HeaderCell--resizing': this.state.resizing,
'react-grid-HeaderCell--locked': this.props.column.locked
});
className = joinClasses(className, this.props.className, this.props.column.cellClass);
var cell = this.getCell();
return React.createElement(
'div',
{ className: className, style: this.getStyle() },
cell,
resizeHandle
);
}
});
module.exports = HeaderCell;
/***/ },
/* 50 */
/***/ function(module, exports) {
"use strict";
var HeaderCellType = {
SORTABLE: 0,
FILTERABLE: 1,
NONE: 2,
CHECKBOX: 3
};
module.exports = HeaderCellType;
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = __webpack_require__(1);
var shallowEqual = __webpack_require__(20);
var BaseHeaderCell = __webpack_require__(49);
var getScrollbarSize = __webpack_require__(28);
var ExcelColumn = __webpack_require__(6);
var ColumnUtilsMixin = __webpack_require__(4);
var SortableHeaderCell = __webpack_require__(63);
var FilterableHeaderCell = __webpack_require__(62);
var HeaderCellType = __webpack_require__(50);
var createObjectWithProperties = __webpack_require__(9);
var PropTypes = React.PropTypes;
var HeaderRowStyle = {
overflow: React.PropTypes.string,
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
height: React.PropTypes.number,
position: React.PropTypes.string
};
var DEFINE_SORT = ['ASC', 'DESC', 'NONE'];
// The list of the propTypes that we want to include in the HeaderRow div
var knownDivPropertyKeys = ['width', 'height', 'style', 'onScroll'];
var HeaderRow = React.createClass({
displayName: 'HeaderRow',
propTypes: {
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
height: PropTypes.number.isRequired,
columns: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired,
onColumnResize: PropTypes.func,
onSort: PropTypes.func.isRequired,
onColumnResizeEnd: PropTypes.func,
style: PropTypes.shape(HeaderRowStyle),
sortColumn: PropTypes.string,
sortDirection: React.PropTypes.oneOf(DEFINE_SORT),
cellRenderer: PropTypes.func,
headerCellRenderer: PropTypes.func,
filterable: PropTypes.bool,
onFilterChange: PropTypes.func,
resizing: PropTypes.object,
onScroll: PropTypes.func,
rowType: PropTypes.string,
draggableHeaderCell: PropTypes.func
},
mixins: [ColumnUtilsMixin],
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
return nextProps.width !== this.props.width || nextProps.height !== this.props.height || nextProps.columns !== this.props.columns || !shallowEqual(nextProps.style, this.props.style) || this.props.sortColumn !== nextProps.sortColumn || this.props.sortDirection !== nextProps.sortDirection;
},
getHeaderCellType: function getHeaderCellType(column) {
if (column.filterable) {
if (this.props.filterable) return HeaderCellType.FILTERABLE;
}
if (column.sortable) return HeaderCellType.SORTABLE;
return HeaderCellType.NONE;
},
getFilterableHeaderCell: function getFilterableHeaderCell(column) {
var FilterRenderer = FilterableHeaderCell;
if (column.filterRenderer !== undefined) {
FilterRenderer = column.filterRenderer;
}
return React.createElement(FilterRenderer, _extends({}, this.props, { onChange: this.props.onFilterChange }));
},
getSortableHeaderCell: function getSortableHeaderCell(column) {
var sortDirection = this.props.sortColumn === column.key ? this.props.sortDirection : DEFINE_SORT.NONE;
return React.createElement(SortableHeaderCell, { columnKey: column.key, onSort: this.props.onSort, sortDirection: sortDirection });
},
getHeaderRenderer: function getHeaderRenderer(column) {
var renderer = void 0;
if (column.headerRenderer) {
renderer = column.headerRenderer;
} else {
var headerCellType = this.getHeaderCellType(column);
switch (headerCellType) {
case HeaderCellType.SORTABLE:
renderer = this.getSortableHeaderCell(column);
break;
case HeaderCellType.FILTERABLE:
renderer = this.getFilterableHeaderCell(column);
break;
default:
break;
}
}
return renderer;
},
getStyle: function getStyle() {
return {
overflow: 'hidden',
width: '100%',
height: this.props.height,
position: 'absolute'
};
},
getCells: function getCells() {
var cells = [];
var lockedCells = [];
for (var i = 0, len = this.getSize(this.props.columns); i < len; i++) {
var column = this.getColumn(this.props.columns, i);
var _renderer = this.getHeaderRenderer(column);
if (column.key === 'select-row' && this.props.rowType === 'filter') {
_renderer = React.createElement('div', null);
}
var _HeaderCell = column.draggable ? this.props.draggableHeaderCell : BaseHeaderCell;
var cell = React.createElement(_HeaderCell, {
ref: i,
key: i,
height: this.props.height,
column: column,
renderer: _renderer,
resizing: this.props.resizing === column,
onResize: this.props.onColumnResize,
onResizeEnd: this.props.onColumnResizeEnd
});
if (column.locked) {
lockedCells.push(cell);
} else {
cells.push(cell);
}
}
return cells.concat(lockedCells);
},
setScrollLeft: function setScrollLeft(scrollLeft) {
var _this = this;
this.props.columns.forEach(function (column, i) {
if (column.locked) {
_this.refs[i].setScrollLeft(scrollLeft);
}
});
},
getKnownDivProps: function getKnownDivProps() {
return createObjectWithProperties(this.props, knownDivPropertyKeys);
},
render: function render() {
var cellsStyle = {
width: this.props.width ? this.props.width + getScrollbarSize() : '100%',
height: this.props.height,
whiteSpace: 'nowrap',
overflowX: 'hidden',
overflowY: 'hidden'
};
var cells = this.getCells();
return React.createElement(
'div',
_extends({}, this.getKnownDivProps(), { className: 'react-grid-HeaderRow' }),
React.createElement(
'div',
{ style: cellsStyle },
cells
)
);
}
});
module.exports = HeaderRow;
/***/ },
/* 52 */
/***/ function(module, exports) {
"use strict";
module.exports = {
Backspace: 8,
Tab: 9,
Enter: 13,
Shift: 16,
Ctrl: 17,
Alt: 18,
PauseBreak: 19,
CapsLock: 20,
Escape: 27,
PageUp: 33,
PageDown: 34,
End: 35,
Home: 36,
LeftArrow: 37,
UpArrow: 38,
RightArrow: 39,
DownArrow: 40,
Insert: 45,
Delete: 46,
0: 48,
1: 49,
2: 50,
3: 51,
4: 52,
5: 53,
6: 54,
7: 55,
8: 56,
9: 57,
a: 65,
b: 66,
c: 67,
d: 68,
e: 69,
f: 70,
g: 71,
h: 72,
i: 73,
j: 74,
k: 75,
l: 76,
m: 77,
n: 78,
o: 79,
p: 80,
q: 81,
r: 82,
s: 83,
t: 84,
u: 85,
v: 86,
w: 87,
x: 88,
y: 89,
z: 90,
LeftWindowKey: 91,
RightWindowKey: 92,
SelectKey: 93,
NumPad0: 96,
NumPad1: 97,
NumPad2: 98,
NumPad3: 99,
NumPad4: 100,
NumPad5: 101,
NumPad6: 102,
NumPad7: 103,
NumPad8: 104,
NumPad9: 105,
Multiply: 106,
Add: 107,
Subtract: 109,
DecimalPoint: 110,
Divide: 111,
F1: 112,
F2: 113,
F3: 114,
F4: 115,
F5: 116,
F6: 117,
F7: 118,
F8: 119,
F9: 120,
F10: 121,
F12: 123,
NumLock: 144,
ScrollLock: 145,
SemiColon: 186,
EqualSign: 187,
Comma: 188,
Dash: 189,
Period: 190,
ForwardSlash: 191,
GraveAccent: 192,
OpenBracket: 219,
BackSlash: 220,
CloseBracket: 221,
SingleQuote: 222
};
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.OverflowCellComponent = undefined;
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _focusableComponentWrapper = __webpack_require__(69);
var _focusableComponentWrapper2 = _interopRequireDefault(_focusableComponentWrapper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var OverflowCell = function (_React$Component) {
_inherits(OverflowCell, _React$Component);
function OverflowCell() {
_classCallCheck(this, OverflowCell);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
OverflowCell.prototype.getStyle = function getStyle() {
var style = {
position: 'absolute',
width: this.props.column.width,
height: this.props.height,
left: this.props.column.left,
border: '1px solid #eee'
};
return style;
};
OverflowCell.prototype.render = function render() {
return _react2['default'].createElement('div', { tabIndex: '-1', style: this.getStyle(), width: '100%', className: 'react-grid-Cell' });
};
return OverflowCell;
}(_react2['default'].Component);
OverflowCell.isSelected = function (props) {
var cellMetaData = props.cellMetaData,
rowIdx = props.rowIdx,
idx = props.idx;
if (cellMetaData == null) {
return false;
}
var selected = cellMetaData.selected;
return selected && selected.rowIdx === rowIdx && selected.idx === idx;
};
OverflowCell.isScrolling = function (props) {
return props.cellMetaData.isScrollingHorizontallyWithKeyboard;
};
OverflowCell.propTypes = {
rowIdx: _react2['default'].PropTypes.number,
idx: _react2['default'].PropTypes.number,
height: _react2['default'].PropTypes.number,
column: _react2['default'].PropTypes.object,
cellMetaData: _react2['default'].PropTypes.object
};
OverflowCell.displayName = 'Cell';
var OverflowCellComponent = OverflowCell;
exports['default'] = (0, _focusableComponentWrapper2['default'])(OverflowCell);
exports.OverflowCellComponent = OverflowCellComponent;
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _AppConstants = __webpack_require__(41);
var _AppConstants2 = _interopRequireDefault(_AppConstants);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var BaseGrid = __webpack_require__(46);
var Row = __webpack_require__(18);
var ExcelColumn = __webpack_require__(6);
var KeyboardHandlerMixin = __webpack_require__(25);
var CheckboxEditor = __webpack_require__(64);
var DOMMetrics = __webpack_require__(10);
var ColumnMetricsMixin = __webpack_require__(44);
var RowUtils = __webpack_require__(26);
var ColumnUtils = __webpack_require__(4);
var KeyCodes = __webpack_require__(52);
if (!Object.assign) {
Object.assign = __webpack_require__(39);
}
var ReactDataGrid = React.createClass({
displayName: 'ReactDataGrid',
mixins: [ColumnMetricsMixin, DOMMetrics.MetricsComputatorMixin, KeyboardHandlerMixin],
propTypes: {
rowHeight: React.PropTypes.number.isRequired,
headerRowHeight: React.PropTypes.number,
minHeight: React.PropTypes.number.isRequired,
minWidth: React.PropTypes.number,
enableRowSelect: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.string]),
onRowUpdated: React.PropTypes.func,
rowGetter: React.PropTypes.func.isRequired,
rowsCount: React.PropTypes.number.isRequired,
toolbar: React.PropTypes.element,
enableCellSelect: React.PropTypes.bool,
columns: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.array]).isRequired,
onFilter: React.PropTypes.func,
onCellCopyPaste: React.PropTypes.func,
onCellsDragged: React.PropTypes.func,
onAddFilter: React.PropTypes.func,
onGridSort: React.PropTypes.func,
onDragHandleDoubleClick: React.PropTypes.func,
onGridRowsUpdated: React.PropTypes.func,
onRowSelect: React.PropTypes.func,
rowKey: React.PropTypes.string,
rowScrollTimeout: React.PropTypes.number,
onClearFilters: React.PropTypes.func,
contextMenu: React.PropTypes.element,
cellNavigationMode: React.PropTypes.oneOf(['none', 'loopOverRow', 'changeRow']),
onCellSelected: React.PropTypes.func,
onCellDeSelected: React.PropTypes.func,
onCellExpand: React.PropTypes.func,
enableDragAndDrop: React.PropTypes.bool,
onRowExpandToggle: React.PropTypes.func,
draggableHeaderCell: React.PropTypes.func,
getValidFilterValues: React.PropTypes.func,
rowSelection: React.PropTypes.shape({
enableShiftSelect: React.PropTypes.bool,
onRowsSelected: React.PropTypes.func,
onRowsDeselected: React.PropTypes.func,
showCheckbox: React.PropTypes.bool,
selectBy: React.PropTypes.oneOfType([React.PropTypes.shape({
indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired
}), React.PropTypes.shape({
isSelectedKey: React.PropTypes.string.isRequired
}), React.PropTypes.shape({
keys: React.PropTypes.shape({
values: React.PropTypes.array.isRequired,
rowKey: React.PropTypes.string.isRequired
}).isRequired
})]).isRequired
}),
onRowClick: React.PropTypes.func,
onGridKeyUp: React.PropTypes.func,
onGridKeyDown: React.PropTypes.func,
rowGroupRenderer: React.PropTypes.func,
rowActionsCell: React.PropTypes.func,
onCheckCellIsEditable: React.PropTypes.func,
/* called before cell is set active, returns a boolean to determine whether cell is editable */
overScan: React.PropTypes.object
},
getDefaultProps: function getDefaultProps() {
return {
enableCellSelect: false,
tabIndex: -1,
rowHeight: 35,
enableRowSelect: false,
minHeight: 350,
rowKey: 'id',
rowScrollTimeout: 0,
cellNavigationMode: 'none',
overScan: {
colsStart: 5,
colsEnd: 5,
rowsStart: 5,
rowsEnd: 5
}
};
},
getInitialState: function getInitialState() {
var columnMetrics = this.createColumnMetrics();
var initialState = { columnMetrics: columnMetrics, selectedRows: [], copied: null, expandedRows: [], canFilter: false, columnFilters: {}, sortDirection: null, sortColumn: null, dragged: null, scrollOffset: 0, lastRowIdxUiSelected: -1 };
if (this.props.enableCellSelect) {
initialState.selected = { rowIdx: 0, idx: 0 };
} else {
initialState.selected = { rowIdx: -1, idx: -1 };
}
return initialState;
},
hasSelectedCellChanged: function hasSelectedCellChanged(selected) {
var previouslySelected = Object.assign({}, this.state.selected);
return previouslySelected.rowIdx !== selected.rowIdx || previouslySelected.idx !== selected.idx || previouslySelected.active === false;
},
onContextMenuHide: function onContextMenuHide() {
document.removeEventListener('click', this.onContextMenuHide);
var newSelected = Object.assign({}, this.state.selected, { contextMenuDisplayed: false });
this.setState({ selected: newSelected });
},
onColumnEvent: function onColumnEvent(ev, columnEvent) {
var idx = columnEvent.idx,
name = columnEvent.name;
if (name && typeof idx !== 'undefined') {
var column = this.getColumn(idx);
if (column && column.events && column.events[name] && typeof column.events[name] === 'function') {
var eventArgs = {
rowIdx: columnEvent.rowIdx,
idx: idx,
column: column
};
column.events[name](ev, eventArgs);
}
}
},
onSelect: function onSelect(selected) {
var _this = this;
if (this.state.selected.rowIdx !== selected.rowIdx || this.state.selected.idx !== selected.idx || this.state.selected.active === false) {
var _idx = selected.idx;
var _rowIdx = selected.rowIdx;
if (_idx >= 0 && _rowIdx >= 0 && _idx < ColumnUtils.getSize(this.state.columnMetrics.columns) && _rowIdx < this.props.rowsCount) {
(function () {
var oldSelection = _this.state.selected;
_this.setState({ selected: selected }, function () {
if (typeof _this.props.onCellDeSelected === 'function') {
_this.props.onCellDeSelected(oldSelection);
}
if (typeof _this.props.onCellSelected === 'function') {
_this.props.onCellSelected(selected);
}
});
})();
}
}
},
onCellClick: function onCellClick(cell) {
this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx });
if (this.props.onRowClick && typeof this.props.onRowClick === 'function') {
this.props.onRowClick(cell.rowIdx, this.props.rowGetter(cell.rowIdx));
}
},
onCellContextMenu: function onCellContextMenu(cell) {
this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx, contextMenuDisplayed: this.props.contextMenu });
if (this.props.contextMenu) {
document.addEventListener('click', this.onContextMenuHide);
}
},
onCellDoubleClick: function onCellDoubleClick(cell) {
this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx });
this.setActive('Enter');
},
onViewportDoubleClick: function onViewportDoubleClick() {
this.setActive();
},
onPressArrowUp: function onPressArrowUp(e) {
this.moveSelectedCell(e, -1, 0);
},
onPressArrowDown: function onPressArrowDown(e) {
this.moveSelectedCell(e, 1, 0);
},
onPressArrowLeft: function onPressArrowLeft(e) {
this.moveSelectedCell(e, 0, -1);
},
onPressArrowRight: function onPressArrowRight(e) {
this.moveSelectedCell(e, 0, 1);
},
onPressTab: function onPressTab(e) {
this.moveSelectedCell(e, 0, e.shiftKey ? -1 : 1);
},
onPressEnter: function onPressEnter(e) {
this.setActive(e.key);
},
onPressDelete: function onPressDelete(e) {
this.setActive(e.key);
},
onPressEscape: function onPressEscape(e) {
this.setInactive(e.key);
this.handleCancelCopy();
},
onPressBackspace: function onPressBackspace(e) {
this.setActive(e.key);
},
onPressChar: function onPressChar(e) {
if (this.isKeyPrintable(e.keyCode)) {
this.setActive(e.keyCode);
}
},
onPressKeyWithCtrl: function onPressKeyWithCtrl(e) {
var keys = {
KeyCode_c: 99,
KeyCode_C: 67,
KeyCode_V: 86,
KeyCode_v: 118
};
var rowIdx = this.state.selected.rowIdx;
var row = this.props.rowGetter(rowIdx);
var idx = this.state.selected.idx;
var col = this.getColumn(idx);
if (ColumnUtils.canEdit(col, row, this.props.enableCellSelect)) {
if (e.keyCode === keys.KeyCode_c || e.keyCode === keys.KeyCode_C) {
var _value = this.getSelectedValue();
this.handleCopy({ value: _value });
} else if (e.keyCode === keys.KeyCode_v || e.keyCode === keys.KeyCode_V) {
this.handlePaste();
}
}
},
onGridRowsUpdated: function onGridRowsUpdated(cellKey, fromRow, toRow, updated, action) {
var rowIds = [];
for (var i = fromRow; i <= toRow; i++) {
rowIds.push(this.props.rowGetter(i)[this.props.rowKey]);
}
this.props.onGridRowsUpdated({ cellKey: cellKey, fromRow: fromRow, toRow: toRow, rowIds: rowIds, updated: updated, action: action });
},
onCellCommit: function onCellCommit(commit) {
var selected = Object.assign({}, this.state.selected);
selected.active = false;
if (commit.key === 'Tab') {
selected.idx += 1;
}
var expandedRows = this.state.expandedRows;
// if(commit.changed && commit.changed.expandedHeight){
// expandedRows = this.expandRow(commit.rowIdx, commit.changed.expandedHeight);
// }
this.setState({ selected: selected, expandedRows: expandedRows });
if (this.props.onRowUpdated) {
this.props.onRowUpdated(commit);
}
var targetRow = commit.rowIdx;
if (this.props.onGridRowsUpdated) {
this.onGridRowsUpdated(commit.cellKey, targetRow, targetRow, commit.updated, _AppConstants2['default'].UpdateActions.CELL_UPDATE);
}
},
onDragStart: function onDragStart(e) {
var idx = this.state.selected.idx;
if (idx > -1) {
var _value2 = this.getSelectedValue();
this.handleDragStart({ idx: this.state.selected.idx, rowIdx: this.state.selected.rowIdx, value: _value2 });
// need to set dummy data for FF
if (e && e.dataTransfer) {
if (e.dataTransfer.setData) {
e.dataTransfer.dropEffect = 'move';
e.dataTransfer.effectAllowed = 'move';
e.dataTransfer.setData('text/plain', 'dummy');
}
}
}
},
onToggleFilter: function onToggleFilter() {
var _this2 = this;
// setState() does not immediately mutate this.state but creates a pending state transition.
// Therefore if you want to do something after the state change occurs, pass it in as a callback function.
this.setState({ canFilter: !this.state.canFilter }, function () {
if (_this2.state.canFilter === false && _this2.props.onClearFilters) {
_this2.props.onClearFilters();
}
});
},
onDragHandleDoubleClick: function onDragHandleDoubleClick(e) {
if (this.props.onDragHandleDoubleClick) {
this.props.onDragHandleDoubleClick(e);
}
if (this.props.onGridRowsUpdated) {
var _onGridRowsUpdated;
var cellKey = this.getColumn(e.idx).key;
this.onGridRowsUpdated(cellKey, e.rowIdx, this.props.rowsCount - 1, (_onGridRowsUpdated = {}, _onGridRowsUpdated[cellKey] = e.rowData[cellKey], _onGridRowsUpdated), _AppConstants2['default'].UpdateActions.COLUMN_FILL);
}
},
onCellExpand: function onCellExpand(args) {
if (this.props.onCellExpand) {
this.props.onCellExpand(args);
}
},
onRowExpandToggle: function onRowExpandToggle(args) {
if (typeof this.props.onRowExpandToggle === 'function') {
this.props.onRowExpandToggle(args);
}
},
handleDragStart: function handleDragStart(dragged) {
if (!this.dragEnabled()) {
return;
}
var idx = dragged.idx;
var rowIdx = dragged.rowIdx;
if (idx >= 0 && rowIdx >= 0 && idx < this.getSize() && rowIdx < this.props.rowsCount) {
this.setState({ dragged: dragged });
}
},
handleDragEnd: function handleDragEnd() {
if (!this.dragEnabled()) {
return;
}
var selected = this.state.selected;
var dragged = this.state.dragged;
var cellKey = this.getColumn(this.state.selected.idx).key;
var fromRow = selected.rowIdx < dragged.overRowIdx ? selected.rowIdx : dragged.overRowIdx;
var toRow = selected.rowIdx > dragged.overRowIdx ? selected.rowIdx : dragged.overRowIdx;
if (this.props.onCellsDragged) {
this.props.onCellsDragged({ cellKey: cellKey, fromRow: fromRow, toRow: toRow, value: dragged.value });
}
if (this.props.onGridRowsUpdated) {
var _onGridRowsUpdated2;
this.onGridRowsUpdated(cellKey, fromRow, toRow, (_onGridRowsUpdated2 = {}, _onGridRowsUpdated2[cellKey] = dragged.value, _onGridRowsUpdated2), _AppConstants2['default'].UpdateActions.CELL_DRAG);
}
this.setState({ dragged: { complete: true } });
},
handleDragEnter: function handleDragEnter(row) {
if (!this.dragEnabled() || this.state.dragged == null) {
return;
}
var dragged = this.state.dragged;
dragged.overRowIdx = row;
this.setState({ dragged: dragged });
},
handleTerminateDrag: function handleTerminateDrag() {
if (!this.dragEnabled()) {
return;
}
this.setState({ dragged: null });
},
handlePaste: function handlePaste() {
if (!this.copyPasteEnabled() || !this.state.copied) {
return;
}
var selected = this.state.selected;
var cellKey = this.getColumn(this.state.selected.idx).key;
var textToCopy = this.state.textToCopy;
var fromRow = this.state.copied.rowIdx;
var toRow = selected.rowIdx;
if (this.props.onCellCopyPaste) {
this.props.onCellCopyPaste({ cellKey: cellKey, rowIdx: toRow, value: textToCopy, fromRow: fromRow, toRow: toRow });
}
if (this.props.onGridRowsUpdated) {
var _onGridRowsUpdated3;
this.onGridRowsUpdated(cellKey, toRow, toRow, (_onGridRowsUpdated3 = {}, _onGridRowsUpdated3[cellKey] = textToCopy, _onGridRowsUpdated3), _AppConstants2['default'].UpdateActions.COPY_PASTE);
}
},
handleCancelCopy: function handleCancelCopy() {
this.setState({ copied: null });
},
handleCopy: function handleCopy(args) {
if (!this.copyPasteEnabled()) {
return;
}
var textToCopy = args.value;
var selected = this.state.selected;
var copied = { idx: selected.idx, rowIdx: selected.rowIdx };
this.setState({ textToCopy: textToCopy, copied: copied });
},
handleSort: function handleSort(columnKey, direction) {
this.setState({ sortDirection: direction, sortColumn: columnKey }, function () {
this.props.onGridSort(columnKey, direction);
});
},
getSelectedRow: function getSelectedRow(rows, key) {
var _this3 = this;
var selectedRow = rows.filter(function (r) {
if (r[_this3.props.rowKey] === key) {
return true;
}
return false;
});
if (selectedRow.length > 0) {
return selectedRow[0];
}
},
useNewRowSelection: function useNewRowSelection() {
return this.props.rowSelection && this.props.rowSelection.selectBy;
},
// return false if not a shift select so can be handled as normal row selection
handleShiftSelect: function handleShiftSelect(rowIdx) {
if (this.state.lastRowIdxUiSelected > -1 && this.isSingleKeyDown(KeyCodes.Shift)) {
var _props$rowSelection$s = this.props.rowSelection.selectBy,
keys = _props$rowSelection$s.keys,
indexes = _props$rowSelection$s.indexes,
isSelectedKey = _props$rowSelection$s.isSelectedKey;
var isPreviouslySelected = RowUtils.isRowSelected(keys, indexes, isSelectedKey, this.props.rowGetter(rowIdx), rowIdx);
if (isPreviouslySelected) return false;
var handled = false;
if (rowIdx > this.state.lastRowIdxUiSelected) {
var rowsSelected = [];
for (var i = this.state.lastRowIdxUiSelected + 1; i <= rowIdx; i++) {
rowsSelected.push({ rowIdx: i, row: this.props.rowGetter(i) });
}
if (typeof this.props.rowSelection.onRowsSelected === 'function') {
this.props.rowSelection.onRowsSelected(rowsSelected);
}
handled = true;
} else if (rowIdx < this.state.lastRowIdxUiSelected) {
var _rowsSelected = [];
for (var _i = rowIdx; _i <= this.state.lastRowIdxUiSelected - 1; _i++) {
_rowsSelected.push({ rowIdx: _i, row: this.props.rowGetter(_i) });
}
if (typeof this.props.rowSelection.onRowsSelected === 'function') {
this.props.rowSelection.onRowsSelected(_rowsSelected);
}
handled = true;
}
if (handled) {
this.setState({ lastRowIdxUiSelected: rowIdx });
}
return handled;
}
return false;
},
handleNewRowSelect: function handleNewRowSelect(rowIdx, rowData) {
var _props$rowSelection$s2 = this.props.rowSelection.selectBy,
keys = _props$rowSelection$s2.keys,
indexes = _props$rowSelection$s2.indexes,
isSelectedKey = _props$rowSelection$s2.isSelectedKey;
var isPreviouslySelected = RowUtils.isRowSelected(keys, indexes, isSelectedKey, rowData, rowIdx);
this.setState({ lastRowIdxUiSelected: isPreviouslySelected ? -1 : rowIdx, selected: { rowIdx: rowIdx, idx: 0 } });
if (isPreviouslySelected && typeof this.props.rowSelection.onRowsDeselected === 'function') {
this.props.rowSelection.onRowsDeselected([{ rowIdx: rowIdx, row: rowData }]);
} else if (!isPreviouslySelected && typeof this.props.rowSelection.onRowsSelected === 'function') {
this.props.rowSelection.onRowsSelected([{ rowIdx: rowIdx, row: rowData }]);
}
},
// columnKey not used here as this function will select the whole row,
// but needed to match the function signature in the CheckboxEditor
handleRowSelect: function handleRowSelect(rowIdx, columnKey, rowData, e) {
e.stopPropagation();
if (this.useNewRowSelection()) {
if (this.props.rowSelection.enableShiftSelect === true) {
if (!this.handleShiftSelect(rowIdx)) {
this.handleNewRowSelect(rowIdx, rowData);
}
} else {
this.handleNewRowSelect(rowIdx, rowData);
}
} else {
// Fallback to old onRowSelect handler
var _selectedRows = this.props.enableRowSelect === 'single' ? [] : this.state.selectedRows.slice(0);
var selectedRow = this.getSelectedRow(_selectedRows, rowData[this.props.rowKey]);
if (selectedRow) {
selectedRow.isSelected = !selectedRow.isSelected;
} else {
rowData.isSelected = true;
_selectedRows.push(rowData);
}
this.setState({ selectedRows: _selectedRows, selected: { rowIdx: rowIdx, idx: 0 } });
if (this.props.onRowSelect) {
this.props.onRowSelect(_selectedRows.filter(function (r) {
return r.isSelected === true;
}));
}
}
},
handleCheckboxChange: function handleCheckboxChange(e) {
var allRowsSelected = void 0;
if (e.currentTarget instanceof HTMLInputElement && e.currentTarget.checked === true) {
allRowsSelected = true;
} else {
allRowsSelected = false;
}
if (this.useNewRowSelection()) {
var _props$rowSelection$s3 = this.props.rowSelection.selectBy,
keys = _props$rowSelection$s3.keys,
indexes = _props$rowSelection$s3.indexes,
isSelectedKey = _props$rowSelection$s3.isSelectedKey;
if (allRowsSelected && typeof this.props.rowSelection.onRowsSelected === 'function') {
var _selectedRows2 = [];
for (var i = 0; i < this.props.rowsCount; i++) {
var rowData = this.props.rowGetter(i);
if (!RowUtils.isRowSelected(keys, indexes, isSelectedKey, rowData, i)) {
_selectedRows2.push({ rowIdx: i, row: rowData });
}
}
if (_selectedRows2.length > 0) {
this.props.rowSelection.onRowsSelected(_selectedRows2);
}
} else if (!allRowsSelected && typeof this.props.rowSelection.onRowsDeselected === 'function') {
var deselectedRows = [];
for (var _i2 = 0; _i2 < this.props.rowsCount; _i2++) {
var _rowData = this.props.rowGetter(_i2);
if (RowUtils.isRowSelected(keys, indexes, isSelectedKey, _rowData, _i2)) {
deselectedRows.push({ rowIdx: _i2, row: _rowData });
}
}
if (deselectedRows.length > 0) {
this.props.rowSelection.onRowsDeselected(deselectedRows);
}
}
} else {
var _selectedRows3 = [];
for (var _i3 = 0; _i3 < this.props.rowsCount; _i3++) {
var row = Object.assign({}, this.props.rowGetter(_i3), { isSelected: allRowsSelected });
_selectedRows3.push(row);
}
this.setState({ selectedRows: _selectedRows3 });
if (typeof this.props.onRowSelect === 'function') {
this.props.onRowSelect(_selectedRows3.filter(function (r) {
return r.isSelected === true;
}));
}
}
},
getScrollOffSet: function getScrollOffSet() {
var scrollOffset = 0;
var canvas = ReactDOM.findDOMNode(this).querySelector('.react-grid-Canvas');
if (canvas) {
scrollOffset = canvas.offsetWidth - canvas.clientWidth;
}
this.setState({ scrollOffset: scrollOffset });
},
getRowOffsetHeight: function getRowOffsetHeight() {
var offsetHeight = 0;
this.getHeaderRows().forEach(function (row) {
return offsetHeight += parseFloat(row.height, 10);
});
return offsetHeight;
},
getHeaderRows: function getHeaderRows() {
var rows = [{ ref: 'row', height: this.props.headerRowHeight || this.props.rowHeight, rowType: 'header' }];
if (this.state.canFilter === true) {
rows.push({
ref: 'filterRow',
filterable: true,
onFilterChange: this.props.onAddFilter,
height: 45,
rowType: 'filter'
});
}
return rows;
},
getInitialSelectedRows: function getInitialSelectedRows() {
var selectedRows = [];
for (var i = 0; i < this.props.rowsCount; i++) {
selectedRows.push(false);
}
return selectedRows;
},
getRowSelectionProps: function getRowSelectionProps() {
if (this.props.rowSelection) {
return this.props.rowSelection.selectBy;
}
return null;
},
getSelectedRows: function getSelectedRows() {
if (this.props.rowSelection) {
return null;
}
return this.state.selectedRows.filter(function (r) {
return r.isSelected === true;
});
},
getSelectedValue: function getSelectedValue() {
var rowIdx = this.state.selected.rowIdx;
var idx = this.state.selected.idx;
var cellKey = this.getColumn(idx).key;
var row = this.props.rowGetter(rowIdx);
return RowUtils.get(row, cellKey);
},
moveSelectedCell: function moveSelectedCell(e, rowDelta, cellDelta) {
// we need to prevent default as we control grid scroll
// otherwise it moves every time you left/right which is janky
e.preventDefault();
var rowIdx = void 0;
var idx = void 0;
var cellNavigationMode = this.props.cellNavigationMode;
if (cellNavigationMode !== 'none') {
var _calculateNextSelecti = this.calculateNextSelectionPosition(cellNavigationMode, cellDelta, rowDelta);
idx = _calculateNextSelecti.idx;
rowIdx = _calculateNextSelecti.rowIdx;
} else {
rowIdx = this.state.selected.rowIdx + rowDelta;
idx = this.state.selected.idx + cellDelta;
}
this.onSelect({ idx: idx, rowIdx: rowIdx });
},
getNbrColumns: function getNbrColumns() {
var _props = this.props,
columns = _props.columns,
enableRowSelect = _props.enableRowSelect;
return enableRowSelect ? columns.length + 1 : columns.length;
},
getDataGridDOMNode: function getDataGridDOMNode() {
if (!this._gridNode) {
this._gridNode = ReactDOM.findDOMNode(this);
}
return this._gridNode;
},
calculateNextSelectionPosition: function calculateNextSelectionPosition(cellNavigationMode, cellDelta, rowDelta) {
var _rowDelta = rowDelta;
var idx = this.state.selected.idx + cellDelta;
var nbrColumns = this.getNbrColumns();
if (cellDelta > 0) {
if (this.isAtLastCellInRow(nbrColumns)) {
if (cellNavigationMode === 'changeRow') {
_rowDelta = this.isAtLastRow() ? rowDelta : rowDelta + 1;
idx = this.isAtLastRow() ? idx : 0;
} else {
idx = 0;
}
}
} else if (cellDelta < 0) {
if (this.isAtFirstCellInRow()) {
if (cellNavigationMode === 'changeRow') {
_rowDelta = this.isAtFirstRow() ? rowDelta : rowDelta - 1;
idx = this.isAtFirstRow() ? 0 : nbrColumns - 1;
} else {
idx = nbrColumns - 1;
}
}
}
var rowIdx = this.state.selected.rowIdx + _rowDelta;
return { idx: idx, rowIdx: rowIdx };
},
isAtLastCellInRow: function isAtLastCellInRow(nbrColumns) {
return this.state.selected.idx === nbrColumns - 1;
},
isAtLastRow: function isAtLastRow() {
return this.state.selected.rowIdx === this.props.rowsCount - 1;
},
isAtFirstCellInRow: function isAtFirstCellInRow() {
return this.state.selected.idx === 0;
},
isAtFirstRow: function isAtFirstRow() {
return this.state.selected.rowIdx === 0;
},
openCellEditor: function openCellEditor(rowIdx, idx) {
var _this4 = this;
var row = this.props.rowGetter(rowIdx);
var col = this.getColumn(idx);
if (!ColumnUtils.canEdit(col, row, this.props.enableCellSelect)) {
return;
}
var selected = { rowIdx: rowIdx, idx: idx };
if (this.hasSelectedCellChanged(selected)) {
this.setState({ selected: selected }, function () {
_this4.setActive('Enter');
});
} else {
this.setActive('Enter');
}
},
scrollToColumn: function scrollToColumn(colIdx) {
var canvas = ReactDOM.findDOMNode(this).querySelector('.react-grid-Canvas');
if (canvas) {
var left = 0;
var locked = 0;
for (var i = 0; i < colIdx; i++) {
var column = this.getColumn(i);
if (column) {
if (column.width) {
left += column.width;
}
if (column.locked) {
locked += column.width;
}
}
}
var selectedColumn = this.getColumn(colIdx);
if (selectedColumn) {
var scrollLeft = left - locked - canvas.scrollLeft;
var scrollRight = left + selectedColumn.width - canvas.scrollLeft;
if (scrollLeft < 0) {
canvas.scrollLeft += scrollLeft;
} else if (scrollRight > canvas.clientWidth) {
var scrollAmount = scrollRight - canvas.clientWidth;
canvas.scrollLeft += scrollAmount;
}
}
}
},
setActive: function setActive(keyPressed) {
var rowIdx = this.state.selected.rowIdx;
var row = this.props.rowGetter(rowIdx);
var idx = this.state.selected.idx;
var column = this.getColumn(idx);
if (ColumnUtils.canEdit(column, row, this.props.enableCellSelect) && !this.isActive()) {
var _selected = Object.assign(this.state.selected, { idx: idx, rowIdx: rowIdx, active: true, initialKeyCode: keyPressed });
var showEditor = true;
if (typeof this.props.onCheckCellIsEditable === 'function') {
var args = Object.assign({}, { row: row, column: column }, _selected);
showEditor = this.props.onCheckCellIsEditable(args);
}
if (showEditor !== false) {
this.setState({ selected: _selected }, this.scrollToColumn(idx));
this.handleCancelCopy();
}
}
},
setInactive: function setInactive() {
var rowIdx = this.state.selected.rowIdx;
var row = this.props.rowGetter(rowIdx);
var idx = this.state.selected.idx;
var col = this.getColumn(idx);
if (ColumnUtils.canEdit(col, row, this.props.enableCellSelect) && this.isActive()) {
var _selected2 = Object.assign(this.state.selected, { idx: idx, rowIdx: rowIdx, active: false });
this.setState({ selected: _selected2 });
}
},
isActive: function isActive() {
return this.state.selected.active === true;
},
setupGridColumns: function setupGridColumns() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
var columns = props.columns;
if (this._cachedColumns === columns) {
return this._cachedComputedColumns;
}
this._cachedColumns = columns;
var cols = columns.slice(0);
var unshiftedCols = {};
if (this.props.rowActionsCell || props.enableRowSelect && !this.props.rowSelection || props.rowSelection && props.rowSelection.showCheckbox !== false) {
var headerRenderer = props.enableRowSelect === 'single' ? null : React.createElement(
'div',
{ className: 'react-grid-checkbox-container' },
React.createElement('input', { className: 'react-grid-checkbox', type: 'checkbox', name: 'select-all-checkbox', id: 'select-all-checkbox', onChange: this.handleCheckboxChange }),
React.createElement('label', { htmlFor: 'select-all-checkbox', className: 'react-grid-checkbox-label' })
);
var Formatter = this.props.rowActionsCell ? this.props.rowActionsCell : CheckboxEditor;
var selectColumn = {
key: 'select-row',
name: '',
formatter: React.createElement(Formatter, { rowSelection: this.props.rowSelection }),
onCellChange: this.handleRowSelect,
filterable: false,
headerRenderer: headerRenderer,
width: 60,
locked: true,
getRowMetaData: function getRowMetaData(rowData) {
return rowData;
},
cellClass: this.props.rowActionsCell ? 'rdg-row-actions-cell' : ''
};
unshiftedCols = cols.unshift(selectColumn);
cols = unshiftedCols > 0 ? cols : unshiftedCols;
}
this._cachedComputedColumns = cols;
return this._cachedComputedColumns;
},
copyPasteEnabled: function copyPasteEnabled() {
return this.props.onCellCopyPaste !== null;
},
dragEnabled: function dragEnabled() {
return this.props.onGridRowsUpdated !== undefined || this.props.onCellsDragged !== undefined;
},
renderToolbar: function renderToolbar() {
var Toolbar = this.props.toolbar;
if (React.isValidElement(Toolbar)) {
return React.cloneElement(Toolbar, { columns: this.props.columns, onToggleFilter: this.onToggleFilter, numberOfRows: this.props.rowsCount });
}
},
render: function render() {
var cellMetaData = {
selected: this.state.selected,
dragged: this.state.dragged,
hoveredRowIdx: this.state.hoveredRowIdx,
onCellClick: this.onCellClick,
onCellContextMenu: this.onCellContextMenu,
onCellDoubleClick: this.onCellDoubleClick,
onCommit: this.onCellCommit,
onCommitCancel: this.setInactive,
copied: this.state.copied,
handleDragEnterRow: this.handleDragEnter,
handleTerminateDrag: this.handleTerminateDrag,
enableCellSelect: this.props.enableCellSelect,
onColumnEvent: this.onColumnEvent,
openCellEditor: this.openCellEditor,
onDragHandleDoubleClick: this.onDragHandleDoubleClick,
onCellExpand: this.onCellExpand,
onRowExpandToggle: this.onRowExpandToggle,
onRowHover: this.onRowHover,
getDataGridDOMNode: this.getDataGridDOMNode,
isScrollingVerticallyWithKeyboard: this.isKeyDown(40) || this.isKeyDown(38), // up or down
isScrollingHorizontallyWithKeyboard: this.isKeyDown(37) || this.isKeyDown(39) // left or right
};
var toolbar = this.renderToolbar();
var containerWidth = this.props.minWidth || this.DOMMetrics.gridWidth();
var gridWidth = containerWidth - this.state.scrollOffset;
// depending on the current lifecycle stage, gridWidth() may not initialize correctly
// this also handles cases where it always returns undefined -- such as when inside a div with display:none
// eg Bootstrap tabs and collapses
if (typeof containerWidth === 'undefined' || isNaN(containerWidth) || containerWidth === 0) {
containerWidth = '100%';
}
if (typeof gridWidth === 'undefined' || isNaN(gridWidth) || gridWidth === 0) {
gridWidth = '100%';
}
return React.createElement(
'div',
{ className: 'react-grid-Container', style: { width: containerWidth } },
toolbar,
React.createElement(
'div',
{ className: 'react-grid-Main' },
React.createElement(BaseGrid, _extends({
ref: 'base'
}, this.props, {
rowKey: this.props.rowKey,
headerRows: this.getHeaderRows(),
columnMetrics: this.state.columnMetrics,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
rowHeight: this.props.rowHeight,
cellMetaData: cellMetaData,
selectedRows: this.getSelectedRows(),
rowSelection: this.getRowSelectionProps(),
expandedRows: this.state.expandedRows,
rowOffsetHeight: this.getRowOffsetHeight(),
sortColumn: this.state.sortColumn,
sortDirection: this.state.sortDirection,
onSort: this.handleSort,
minHeight: this.props.minHeight,
totalWidth: gridWidth,
onViewportKeydown: this.onKeyDown,
onViewportKeyup: this.onKeyUp,
onViewportDragStart: this.onDragStart,
onViewportDragEnd: this.handleDragEnd,
onViewportDoubleClick: this.onViewportDoubleClick,
onColumnResize: this.onColumnResize,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu,
overScan: this.props.overScan }))
)
);
}
});
module.exports = ReactDataGrid;
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = __webpack_require__(1);
var Draggable = __webpack_require__(45);
var ResizeHandle = React.createClass({
displayName: 'ResizeHandle',
style: {
position: 'absolute',
top: 0,
right: 0,
width: 6,
height: '100%'
},
render: function render() {
return React.createElement(Draggable, _extends({}, this.props, {
className: 'react-grid-HeaderCell__resizeHandle',
style: this.style
}));
}
});
module.exports = ResizeHandle;
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.shouldRowUpdate = undefined;
var _ColumnMetrics = __webpack_require__(17);
var _ColumnMetrics2 = _interopRequireDefault(_ColumnMetrics);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function doesRowContainSelectedCell(props) {
var selected = props.cellMetaData.selected;
if (selected && selected.rowIdx === props.idx) {
return true;
}
return false;
}
function willRowBeDraggedOver(props) {
var dragged = props.cellMetaData.dragged;
return dragged != null && (dragged.rowIdx >= 0 || dragged.complete === true);
}
function hasRowBeenCopied(props) {
var copied = props.cellMetaData.copied;
return copied != null && copied.rowIdx === props.idx;
}
var shouldRowUpdate = exports.shouldRowUpdate = function shouldRowUpdate(nextProps, currentProps) {
return !_ColumnMetrics2['default'].sameColumns(currentProps.columns, nextProps.columns, _ColumnMetrics2['default'].sameColumn) || doesRowContainSelectedCell(currentProps) || doesRowContainSelectedCell(nextProps) || willRowBeDraggedOver(nextProps) || nextProps.row !== currentProps.row || currentProps.colDisplayStart !== nextProps.colDisplayStart || currentProps.colDisplayEnd !== nextProps.colDisplayEnd || currentProps.colVisibleStart !== nextProps.colVisibleStart || currentProps.colVisibleEnd !== nextProps.colVisibleEnd || hasRowBeenCopied(currentProps) || currentProps.isSelected !== nextProps.isSelected || nextProps.height !== currentProps.height || currentProps.isOver !== nextProps.isOver || currentProps.canDrop !== nextProps.canDrop || currentProps.forceUpdate === true;
};
exports['default'] = shouldRowUpdate;
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(2);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _classnames = __webpack_require__(5);
var _classnames2 = _interopRequireDefault(_classnames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var RowGroup = function (_Component) {
_inherits(RowGroup, _Component);
function RowGroup() {
_classCallCheck(this, RowGroup);
var _this = _possibleConstructorReturn(this, _Component.call(this));
_this.checkFocus = _this.checkFocus.bind(_this);
_this.isSelected = _this.isSelected.bind(_this);
_this.onClick = _this.onClick.bind(_this);
_this.onRowExpandToggle = _this.onRowExpandToggle.bind(_this);
_this.onKeyDown = _this.onKeyDown.bind(_this);
_this.onRowExpandClick = _this.onRowExpandClick.bind(_this);
return _this;
}
RowGroup.prototype.componentDidMount = function componentDidMount() {
this.checkFocus();
};
RowGroup.prototype.componentDidUpdate = function componentDidUpdate() {
this.checkFocus();
};
RowGroup.prototype.isSelected = function isSelected() {
var meta = this.props.cellMetaData;
if (meta == null) {
return false;
}
return meta.selected && meta.selected.rowIdx === this.props.idx;
};
RowGroup.prototype.onClick = function onClick(e) {
var meta = this.props.cellMetaData;
if (meta != null && meta.onCellClick && typeof meta.onCellClick === 'function') {
meta.onCellClick({ rowIdx: this.props.idx, idx: 0 }, e);
}
};
RowGroup.prototype.onKeyDown = function onKeyDown(e) {
if (e.key === 'ArrowLeft') {
this.onRowExpandToggle(false);
}
if (e.key === 'ArrowRight') {
this.onRowExpandToggle(true);
}
if (e.key === 'Enter') {
this.onRowExpandToggle(!this.props.isExpanded);
}
};
RowGroup.prototype.onRowExpandClick = function onRowExpandClick() {
this.onRowExpandToggle(!this.props.isExpanded);
};
RowGroup.prototype.onRowExpandToggle = function onRowExpandToggle(expand) {
var shouldExpand = expand == null ? !this.props.isExpanded : expand;
var meta = this.props.cellMetaData;
if (meta != null && meta.onRowExpandToggle && typeof meta.onRowExpandToggle === 'function') {
meta.onRowExpandToggle({ rowIdx: this.props.idx, shouldExpand: shouldExpand, columnGroupName: this.props.columnGroupName, name: this.props.name });
}
};
RowGroup.prototype.getClassName = function getClassName() {
return (0, _classnames2['default'])('react-grid-row-group', 'react-grid-Row', { 'row-selected': this.isSelected() });
};
RowGroup.prototype.checkFocus = function checkFocus() {
if (this.isSelected()) {
_reactDom2['default'].findDOMNode(this).focus();
}
};
RowGroup.prototype.render = function render() {
var style = {
height: '50px',
overflow: 'hidden',
border: '1px solid #dddddd',
paddingTop: '15px',
paddingLeft: '5px'
};
var rowGroupRendererProps = Object.assign({ onRowExpandClick: this.onRowExpandClick }, this.props);
return _react2['default'].createElement(
'div',
{ style: style, className: this.getClassName(), onClick: this.onClick, onKeyDown: this.onKeyDown, tabIndex: -1 },
_react2['default'].createElement(this.props.renderer, rowGroupRendererProps)
);
};
return RowGroup;
}(_react.Component);
RowGroup.propTypes = {
name: _react.PropTypes.string.isRequired,
columnGroupName: _react.PropTypes.string.isRequired,
isExpanded: _react.PropTypes.bool.isRequired,
treeDepth: _react.PropTypes.number.isRequired,
height: _react.PropTypes.number.isRequired,
cellMetaData: _react.PropTypes.object,
idx: _react.PropTypes.number.isRequired,
renderer: _react.PropTypes.func
};
var DefaultRowGroupRenderer = function DefaultRowGroupRenderer(props) {
var treeDepth = props.treeDepth || 0;
var marginLeft = treeDepth * 20;
return _react2['default'].createElement(
'div',
null,
_react2['default'].createElement(
'span',
{ className: 'row-expand-icon', style: { float: 'left', marginLeft: marginLeft, cursor: 'pointer' }, onClick: props.onRowExpandClick },
props.isExpanded ? String.fromCharCode('9660') : String.fromCharCode('9658')
),
_react2['default'].createElement(
'strong',
null,
props.columnGroupName,
' : ',
props.name
)
);
};
DefaultRowGroupRenderer.propTypes = {
onRowExpandClick: _react.PropTypes.func.isRequired,
isExpanded: _react.PropTypes.bool.isRequired,
treeDepth: _react.PropTypes.number.isRequired,
name: _react.PropTypes.string.isRequired,
columnGroupName: _react.PropTypes.string.isRequired
};
RowGroup.defaultProps = {
renderer: DefaultRowGroupRenderer
};
exports['default'] = RowGroup;
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.SimpleRowsContainer = undefined;
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SimpleRowsContainer = function SimpleRowsContainer(props) {
return _react2['default'].createElement(
'div',
{ key: 'rows-container', style: { overflow: 'hidden' } },
props.rows
);
};
SimpleRowsContainer.propTypes = {
width: _react.PropTypes.number,
rows: _react.PropTypes.array
};
var RowsContainer = function (_React$Component) {
_inherits(RowsContainer, _React$Component);
function RowsContainer(props) {
_classCallCheck(this, RowsContainer);
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
_this.plugins = props.window ? props.window.ReactDataGridPlugins : window.ReactDataGridPlugins;
_this.hasContextMenu = _this.hasContextMenu.bind(_this);
_this.renderRowsWithContextMenu = _this.renderRowsWithContextMenu.bind(_this);
_this.getContextMenuContainer = _this.getContextMenuContainer.bind(_this);
_this.state = { ContextMenuContainer: _this.getContextMenuContainer(props) };
return _this;
}
RowsContainer.prototype.getContextMenuContainer = function getContextMenuContainer() {
if (this.hasContextMenu()) {
if (!this.plugins) {
throw new Error('You need to include ReactDataGrid UiPlugins in order to initialise context menu');
}
return this.plugins.Menu.ContextMenuLayer('reactDataGridContextMenu')(SimpleRowsContainer);
}
};
RowsContainer.prototype.hasContextMenu = function hasContextMenu() {
return this.props.contextMenu && _react2['default'].isValidElement(this.props.contextMenu);
};
RowsContainer.prototype.renderRowsWithContextMenu = function renderRowsWithContextMenu() {
var ContextMenuRowsContainer = this.state.ContextMenuContainer;
var newProps = { rowIdx: this.props.rowIdx, idx: this.props.idx };
var contextMenu = _react2['default'].cloneElement(this.props.contextMenu, newProps);
// Initialise the context menu if it is available
return _react2['default'].createElement(
'div',
null,
_react2['default'].createElement(ContextMenuRowsContainer, this.props),
contextMenu
);
};
RowsContainer.prototype.render = function render() {
return this.hasContextMenu() ? this.renderRowsWithContextMenu() : _react2['default'].createElement(SimpleRowsContainer, this.props);
};
return RowsContainer;
}(_react2['default'].Component);
RowsContainer.propTypes = {
contextMenu: _react.PropTypes.element,
rowIdx: _react.PropTypes.number,
idx: _react.PropTypes.number,
window: _react.PropTypes.object
};
exports['default'] = RowsContainer;
exports.SimpleRowsContainer = SimpleRowsContainer;
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _reactDom = __webpack_require__(2);
var _reactDom2 = _interopRequireDefault(_reactDom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var ScrollShim = {
appendScrollShim: function appendScrollShim() {
if (!this._scrollShim) {
var size = this._scrollShimSize();
var shim = document.createElement('div');
if (shim.classList) {
shim.classList.add('react-grid-ScrollShim'); // flow - not compatible with HTMLElement
} else {
shim.className += ' react-grid-ScrollShim';
}
shim.style.position = 'absolute';
shim.style.top = 0;
shim.style.left = 0;
shim.style.width = size.width + 'px';
shim.style.height = size.height + 'px';
_reactDom2['default'].findDOMNode(this).appendChild(shim);
this._scrollShim = shim;
}
this._scheduleRemoveScrollShim();
},
_scrollShimSize: function _scrollShimSize() {
return {
width: this.props.width,
height: this.props.length * this.props.rowHeight
};
},
_scheduleRemoveScrollShim: function _scheduleRemoveScrollShim() {
if (this._scheduleRemoveScrollShimTimer) {
clearTimeout(this._scheduleRemoveScrollShimTimer);
}
this._scheduleRemoveScrollShimTimer = setTimeout(this._removeScrollShim, 200);
},
_removeScrollShim: function _removeScrollShim() {
if (this._scrollShim) {
this._scrollShim.parentNode.removeChild(this._scrollShim);
this._scrollShim = undefined;
}
}
};
module.exports = ScrollShim;
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var Canvas = __webpack_require__(42);
var ViewportScroll = __webpack_require__(61);
var cellMetaDataShape = __webpack_require__(8);
var PropTypes = React.PropTypes;
var Viewport = React.createClass({
displayName: 'Viewport',
mixins: [ViewportScroll],
propTypes: {
rowOffsetHeight: PropTypes.number.isRequired,
totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
columnMetrics: PropTypes.object.isRequired,
rowGetter: PropTypes.oneOfType([PropTypes.array, PropTypes.func]).isRequired,
selectedRows: PropTypes.array,
rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({
indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired
}), React.PropTypes.shape({
isSelectedKey: React.PropTypes.string.isRequired
}), React.PropTypes.shape({
keys: React.PropTypes.shape({
values: React.PropTypes.array.isRequired,
rowKey: React.PropTypes.string.isRequired
}).isRequired
})]),
expandedRows: PropTypes.array,
rowRenderer: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
rowsCount: PropTypes.number.isRequired,
rowHeight: PropTypes.number.isRequired,
onRows: PropTypes.func,
onScroll: PropTypes.func,
minHeight: PropTypes.number,
cellMetaData: PropTypes.shape(cellMetaDataShape),
rowKey: PropTypes.string.isRequired,
rowScrollTimeout: PropTypes.number,
contextMenu: PropTypes.element,
getSubRowDetails: PropTypes.func,
rowGroupRenderer: PropTypes.func
},
onScroll: function onScroll(scroll) {
this.updateScroll(scroll.scrollTop, scroll.scrollLeft, this.state.height, this.props.rowHeight, this.props.rowsCount);
if (this.props.onScroll) {
this.props.onScroll({ scrollTop: scroll.scrollTop, scrollLeft: scroll.scrollLeft });
}
},
getScroll: function getScroll() {
return this.refs.canvas.getScroll();
},
setScrollLeft: function setScrollLeft(scrollLeft) {
this.refs.canvas.setScrollLeft(scrollLeft);
},
render: function render() {
var style = {
padding: 0,
bottom: 0,
left: 0,
right: 0,
overflow: 'hidden',
position: 'absolute',
top: this.props.rowOffsetHeight
};
return React.createElement(
'div',
{
className: 'react-grid-Viewport',
style: style },
React.createElement(Canvas, {
ref: 'canvas',
rowKey: this.props.rowKey,
totalWidth: this.props.totalWidth,
width: this.props.columnMetrics.width,
rowGetter: this.props.rowGetter,
rowsCount: this.props.rowsCount,
selectedRows: this.props.selectedRows,
expandedRows: this.props.expandedRows,
columns: this.props.columnMetrics.columns,
rowRenderer: this.props.rowRenderer,
displayStart: this.state.displayStart,
displayEnd: this.state.displayEnd,
visibleStart: this.state.visibleStart,
visibleEnd: this.state.visibleEnd,
colVisibleStart: this.state.colVisibleStart,
colVisibleEnd: this.state.colVisibleEnd,
colDisplayStart: this.state.colDisplayStart,
colDisplayEnd: this.state.colDisplayEnd,
cellMetaData: this.props.cellMetaData,
height: this.state.height,
rowHeight: this.props.rowHeight,
onScroll: this.onScroll,
onRows: this.props.onRows,
rowScrollTimeout: this.props.rowScrollTimeout,
contextMenu: this.props.contextMenu,
rowSelection: this.props.rowSelection,
getSubRowDetails: this.props.getSubRowDetails,
rowGroupRenderer: this.props.rowGroupRenderer,
isScrolling: this.state.isScrolling
})
);
}
});
module.exports = Viewport;
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _ColumnUtils = __webpack_require__(4);
var _ColumnUtils2 = _interopRequireDefault(_ColumnUtils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var DOMMetrics = __webpack_require__(10);
var min = Math.min;
var max = Math.max;
var floor = Math.floor;
var ceil = Math.ceil;
module.exports = {
mixins: [DOMMetrics.MetricsMixin],
DOMMetrics: {
viewportHeight: function viewportHeight() {
return ReactDOM.findDOMNode(this).offsetHeight;
},
viewportWidth: function viewportWidth() {
return ReactDOM.findDOMNode(this).offsetWidth;
}
},
propTypes: {
rowHeight: React.PropTypes.number,
rowsCount: React.PropTypes.number.isRequired
},
getDefaultProps: function getDefaultProps() {
return {
rowHeight: 30
};
},
getInitialState: function getInitialState() {
return this.getGridState(this.props);
},
getGridState: function getGridState(props) {
var totalNumberColumns = _ColumnUtils2['default'].getSize(props.columnMetrics.columns);
var canvasHeight = props.minHeight - props.rowOffsetHeight;
var renderedRowsCount = ceil((props.minHeight - props.rowHeight) / props.rowHeight);
var totalRowCount = min(renderedRowsCount * 4, props.rowsCount);
return {
displayStart: 0,
displayEnd: totalRowCount,
visibleStart: 0,
visibleEnd: totalRowCount,
height: canvasHeight,
scrollTop: 0,
scrollLeft: 0,
colVisibleStart: 0,
colVisibleEnd: totalNumberColumns,
colDisplayStart: 0,
colDisplayEnd: totalNumberColumns
};
},
getRenderedColumnCount: function getRenderedColumnCount(displayStart, width) {
var remainingWidth = width > 0 ? width : this.props.columnMetrics.totalWidth;
if (remainingWidth === 0) {
remainingWidth = ReactDOM.findDOMNode(this).offsetWidth;
}
var columnIndex = displayStart;
var columnCount = 0;
while (remainingWidth > 0) {
var column = _ColumnUtils2['default'].getColumn(this.props.columnMetrics.columns, columnIndex);
if (!column) {
break;
}
columnCount++;
columnIndex++;
remainingWidth -= column.width;
}
return columnCount;
},
getVisibleColStart: function getVisibleColStart(scrollLeft) {
var remainingScroll = scrollLeft;
var columnIndex = -1;
while (remainingScroll >= 0) {
columnIndex++;
remainingScroll -= _ColumnUtils2['default'].getColumn(this.props.columnMetrics.columns, columnIndex).width;
}
return columnIndex;
},
resetScrollStateAfterDelay: function resetScrollStateAfterDelay() {
if (this.resetScrollStateTimeoutId) {
clearTimeout(this.resetScrollStateTimeoutId);
}
this.resetScrollStateTimeoutId = setTimeout(this.resetScrollStateAfterDelayCallback, 500);
},
resetScrollStateAfterDelayCallback: function resetScrollStateAfterDelayCallback() {
this.resetScrollStateTimeoutId = null;
this.setState({
isScrolling: false
});
},
updateScroll: function updateScroll(scrollTop, scrollLeft, height, rowHeight, length, width) {
var isScrolling = true;
this.resetScrollStateAfterDelay();
var renderedRowsCount = ceil(height / rowHeight);
var visibleStart = max(0, floor(scrollTop / rowHeight));
var visibleEnd = min(visibleStart + renderedRowsCount, length);
var displayStart = max(0, visibleStart - this.props.overScan.rowsStart);
var displayEnd = min(visibleEnd + this.props.overScan.rowsEnd, length);
var totalNumberColumns = _ColumnUtils2['default'].getSize(this.props.columnMetrics.columns);
var colVisibleStart = max(0, this.getVisibleColStart(scrollLeft));
var renderedColumnCount = this.getRenderedColumnCount(colVisibleStart, width);
var colVisibleEnd = colVisibleStart + renderedColumnCount;
var colDisplayStart = max(0, colVisibleStart - this.props.overScan.colsStart);
var colDisplayEnd = min(colVisibleEnd + this.props.overScan.colsEnd, totalNumberColumns);
var nextScrollState = {
visibleStart: visibleStart,
visibleEnd: visibleEnd,
displayStart: displayStart,
displayEnd: displayEnd,
height: height,
scrollTop: scrollTop,
scrollLeft: scrollLeft,
colVisibleStart: colVisibleStart,
colVisibleEnd: colVisibleEnd,
colDisplayStart: colDisplayStart,
colDisplayEnd: colDisplayEnd,
isScrolling: isScrolling
};
this.setState(nextScrollState);
},
metricsUpdated: function metricsUpdated() {
var height = this.DOMMetrics.viewportHeight();
var width = this.DOMMetrics.viewportWidth();
if (height) {
this.updateScroll(this.state.scrollTop, this.state.scrollLeft, height, this.props.rowHeight, this.props.rowsCount, width);
}
},
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
if (this.props.rowHeight !== nextProps.rowHeight || this.props.minHeight !== nextProps.minHeight || _ColumnUtils2['default'].getSize(this.props.columnMetrics.columns) !== _ColumnUtils2['default'].getSize(nextProps.columnMetrics.columns)) {
this.setState(this.getGridState(nextProps));
} else if (this.props.rowsCount !== nextProps.rowsCount) {
this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height, nextProps.rowHeight, nextProps.rowsCount);
// Added to fix the hiding of the bottom scrollbar when showing the filters.
} else if (this.props.rowOffsetHeight !== nextProps.rowOffsetHeight) {
// The value of height can be positive or negative and will be added to the current height to cater for changes in the header height (due to the filer)
var _height = this.props.rowOffsetHeight - nextProps.rowOffsetHeight;
this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height + _height, nextProps.rowHeight, nextProps.rowsCount);
}
}
};
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var ExcelColumn = __webpack_require__(6);
var FilterableHeaderCell = React.createClass({
displayName: 'FilterableHeaderCell',
propTypes: {
onChange: React.PropTypes.func.isRequired,
column: React.PropTypes.shape(ExcelColumn)
},
getInitialState: function getInitialState() {
return { filterTerm: '' };
},
handleChange: function handleChange(e) {
var val = e.target.value;
this.setState({ filterTerm: val });
this.props.onChange({ filterTerm: val, column: this.props.column });
},
renderInput: function renderInput() {
if (this.props.column.filterable === false) {
return React.createElement('span', null);
}
var inputKey = 'header-filter-' + this.props.column.key;
return React.createElement('input', { key: inputKey, type: 'text', className: 'form-control input-sm', placeholder: 'Search', value: this.state.filterTerm, onChange: this.handleChange });
},
render: function render() {
return React.createElement(
'div',
null,
React.createElement(
'div',
{ className: 'form-group' },
this.renderInput()
)
);
}
});
module.exports = FilterableHeaderCell;
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var joinClasses = __webpack_require__(5);
var DEFINE_SORT = {
ASC: 'ASC',
DESC: 'DESC',
NONE: 'NONE'
};
var SortableHeaderCell = React.createClass({
displayName: 'SortableHeaderCell',
propTypes: {
columnKey: React.PropTypes.string.isRequired,
column: React.PropTypes.shape({ name: React.PropTypes.node }),
onSort: React.PropTypes.func.isRequired,
sortDirection: React.PropTypes.oneOf(['ASC', 'DESC', 'NONE'])
},
onClick: function onClick() {
var direction = void 0;
switch (this.props.sortDirection) {
default:
case null:
case undefined:
case DEFINE_SORT.NONE:
direction = DEFINE_SORT.ASC;
break;
case DEFINE_SORT.ASC:
direction = DEFINE_SORT.DESC;
break;
case DEFINE_SORT.DESC:
direction = DEFINE_SORT.NONE;
break;
}
this.props.onSort(this.props.columnKey, direction);
},
getSortByText: function getSortByText() {
var unicodeKeys = {
ASC: '9650',
DESC: '9660',
NONE: ''
};
return String.fromCharCode(unicodeKeys[this.props.sortDirection]);
},
render: function render() {
var className = joinClasses({
'react-grid-HeaderCell-sortable': true,
'react-grid-HeaderCell-sortable--ascending': this.props.sortDirection === 'ASC',
'react-grid-HeaderCell-sortable--descending': this.props.sortDirection === 'DESC'
});
return React.createElement(
'div',
{ className: className,
onClick: this.onClick,
style: { cursor: 'pointer' } },
this.props.column.name,
React.createElement(
'span',
{ className: 'pull-right' },
this.getSortByText()
)
);
}
});
module.exports = SortableHeaderCell;
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var CheckboxEditor = React.createClass({
displayName: 'CheckboxEditor',
propTypes: {
value: React.PropTypes.bool,
rowIdx: React.PropTypes.number,
column: React.PropTypes.shape({
key: React.PropTypes.string,
onCellChange: React.PropTypes.func
}),
dependentValues: React.PropTypes.object
},
handleChange: function handleChange(e) {
this.props.column.onCellChange(this.props.rowIdx, this.props.column.key, this.props.dependentValues, e);
},
render: function render() {
var checked = this.props.value != null ? this.props.value : false;
var checkboxName = 'checkbox' + this.props.rowIdx;
return React.createElement(
'div',
{ className: 'react-grid-checkbox-container', onClick: this.handleChange },
React.createElement('input', { className: 'react-grid-checkbox', type: 'checkbox', name: checkboxName, checked: checked }),
React.createElement('label', { htmlFor: checkboxName, className: 'react-grid-checkbox-label' })
);
}
});
module.exports = CheckboxEditor;
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = __webpack_require__(1);
var ReactDOM = __webpack_require__(2);
var ExcelColumn = __webpack_require__(6);
var EditorBase = function (_React$Component) {
_inherits(EditorBase, _React$Component);
function EditorBase() {
_classCallCheck(this, EditorBase);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
EditorBase.prototype.getStyle = function getStyle() {
return {
width: '100%'
};
};
EditorBase.prototype.getValue = function getValue() {
var updated = {};
updated[this.props.column.key] = this.getInputNode().value;
return updated;
};
EditorBase.prototype.getInputNode = function getInputNode() {
var domNode = ReactDOM.findDOMNode(this);
if (domNode.tagName === 'INPUT') {
return domNode;
}
return domNode.querySelector('input:not([type=hidden])');
};
EditorBase.prototype.inheritContainerStyles = function inheritContainerStyles() {
return true;
};
return EditorBase;
}(React.Component);
EditorBase.propTypes = {
onKeyDown: React.PropTypes.func.isRequired,
value: React.PropTypes.any.isRequired,
onBlur: React.PropTypes.func.isRequired,
column: React.PropTypes.shape(ExcelColumn).isRequired,
commit: React.PropTypes.func.isRequired
};
module.exports = EditorBase;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var React = __webpack_require__(1);
var joinClasses = __webpack_require__(5);
var keyboardHandlerMixin = __webpack_require__(25);
var SimpleTextEditor = __webpack_require__(67);
var isFunction = __webpack_require__(27);
var EditorContainer = React.createClass({
displayName: 'EditorContainer',
mixins: [keyboardHandlerMixin],
propTypes: {
rowIdx: React.PropTypes.number,
rowData: React.PropTypes.object.isRequired,
value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired,
cellMetaData: React.PropTypes.shape({
selected: React.PropTypes.object.isRequired,
copied: React.PropTypes.object,
dragged: React.PropTypes.object,
onCellClick: React.PropTypes.func,
onCellDoubleClick: React.PropTypes.func,
onCommitCancel: React.PropTypes.func,
onCommit: React.PropTypes.func
}).isRequired,
column: React.PropTypes.object.isRequired,
height: React.PropTypes.number.isRequired
},
changeCommitted: false,
getInitialState: function getInitialState() {
return { isInvalid: false };
},
componentDidMount: function componentDidMount() {
var inputNode = this.getInputNode();
if (inputNode !== undefined) {
this.setTextInputFocus();
if (!this.getEditor().disableContainerStyles) {
inputNode.className += ' editor-main';
inputNode.style.height = this.props.height - 1 + 'px';
}
}
},
componentWillUnmount: function componentWillUnmount() {
if (!this.changeCommitted && !this.hasEscapeBeenPressed()) {
this.commit({ key: 'Enter' });
}
},
createEditor: function createEditor() {
var _this = this;
var editorRef = function editorRef(c) {
return _this.editor = c;
};
var editorProps = {
ref: editorRef,
column: this.props.column,
value: this.getInitialValue(),
onCommit: this.commit,
rowMetaData: this.getRowMetaData(),
rowData: this.props.rowData,
height: this.props.height,
onBlur: this.commit,
onOverrideKeyDown: this.onKeyDown
};
var CustomEditor = this.props.column.editor;
// return custom column editor or SimpleEditor if none specified
if (React.isValidElement(CustomEditor)) {
return React.cloneElement(CustomEditor, editorProps);
}
if (isFunction(CustomEditor)) {
return React.createElement(CustomEditor, _extends({ ref: editorRef }, editorProps));
}
return React.createElement(SimpleTextEditor, { ref: editorRef, column: this.props.column, value: this.getInitialValue(), onBlur: this.commit, rowMetaData: this.getRowMetaData(), onKeyDown: function onKeyDown() {}, commit: function commit() {} });
},
onPressEnter: function onPressEnter() {
this.commit({ key: 'Enter' });
},
onPressTab: function onPressTab() {
this.commit({ key: 'Tab' });
},
onPressEscape: function onPressEscape(e) {
if (!this.editorIsSelectOpen()) {
this.props.cellMetaData.onCommitCancel();
} else {
// prevent event from bubbling if editor has results to select
e.stopPropagation();
}
},
onPressArrowDown: function onPressArrowDown(e) {
if (this.editorHasResults()) {
// dont want to propogate as that then moves us round the grid
e.stopPropagation();
} else {
this.commit(e);
}
},
onPressArrowUp: function onPressArrowUp(e) {
if (this.editorHasResults()) {
// dont want to propogate as that then moves us round the grid
e.stopPropagation();
} else {
this.commit(e);
}
},
onPressArrowLeft: function onPressArrowLeft(e) {
// prevent event propogation. this disables left cell navigation
if (!this.isCaretAtBeginningOfInput()) {
e.stopPropagation();
} else {
this.commit(e);
}
},
onPressArrowRight: function onPressArrowRight(e) {
// prevent event propogation. this disables right cell navigation
if (!this.isCaretAtEndOfInput()) {
e.stopPropagation();
} else {
this.commit(e);
}
},
editorHasResults: function editorHasResults() {
if (isFunction(this.getEditor().hasResults)) {
return this.getEditor().hasResults();
}
return false;
},
editorIsSelectOpen: function editorIsSelectOpen() {
if (isFunction(this.getEditor().isSelectOpen)) {
return this.getEditor().isSelectOpen();
}
return false;
},
getRowMetaData: function getRowMetaData() {
// clone row data so editor cannot actually change this
// convention based method to get corresponding Id or Name of any Name or Id property
if (typeof this.props.column.getRowMetaData === 'function') {
return this.props.column.getRowMetaData(this.props.rowData, this.props.column);
}
},
getEditor: function getEditor() {
return this.editor;
},
getInputNode: function getInputNode() {
return this.getEditor().getInputNode();
},
getInitialValue: function getInitialValue() {
var selected = this.props.cellMetaData.selected;
var keyCode = selected.initialKeyCode;
if (keyCode === 'Delete' || keyCode === 'Backspace') {
return '';
} else if (keyCode === 'Enter') {
return this.props.value;
}
var text = keyCode ? String.fromCharCode(keyCode) : this.props.value;
return text;
},
getContainerClass: function getContainerClass() {
return joinClasses({
'has-error': this.state.isInvalid === true
});
},
commit: function commit(args) {
var opts = args || {};
var updated = this.getEditor().getValue();
if (this.isNewValueValid(updated)) {
this.changeCommitted = true;
var cellKey = this.props.column.key;
this.props.cellMetaData.onCommit({ cellKey: cellKey, rowIdx: this.props.rowIdx, updated: updated, key: opts.key });
}
},
isNewValueValid: function isNewValueValid(value) {
if (isFunction(this.getEditor().validate)) {
var isValid = this.getEditor().validate(value);
this.setState({ isInvalid: !isValid });
return isValid;
}
return true;
},
setCaretAtEndOfInput: function setCaretAtEndOfInput() {
var input = this.getInputNode();
// taken from http://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element
var txtLength = input.value.length;
if (input.setSelectionRange) {
input.setSelectionRange(txtLength, txtLength);
} else if (input.createTextRange) {
var fieldRange = input.createTextRange();
fieldRange.moveStart('character', txtLength);
fieldRange.collapse();
fieldRange.select();
}
},
isCaretAtBeginningOfInput: function isCaretAtBeginningOfInput() {
var inputNode = this.getInputNode();
return inputNode.selectionStart === inputNode.selectionEnd && inputNode.selectionStart === 0;
},
isCaretAtEndOfInput: function isCaretAtEndOfInput() {
var inputNode = this.getInputNode();
return inputNode.selectionStart === inputNode.value.length;
},
isBodyClicked: function isBodyClicked(e) {
return e.relatedTarget === null;
},
isViewportClicked: function isViewportClicked(e) {
return e.relatedTarget.classList.contains('react-grid-Viewport');
},
isClickInisdeEditor: function isClickInisdeEditor(e) {
return e.currentTarget.contains(e.relatedTarget) || e.relatedTarget.classList.contains('editing') || e.relatedTarget.classList.contains('react-grid-Cell');
},
handleBlur: function handleBlur(e) {
e.stopPropagation();
if (this.isBodyClicked(e)) {
this.commit(e);
}
if (!this.isBodyClicked(e)) {
// prevent null reference
if (this.isViewportClicked(e) || !this.isClickInisdeEditor(e)) {
this.commit(e);
}
}
},
setTextInputFocus: function setTextInputFocus() {
var selected = this.props.cellMetaData.selected;
var keyCode = selected.initialKeyCode;
var inputNode = this.getInputNode();
inputNode.focus();
if (inputNode.tagName === 'INPUT') {
if (!this.isKeyPrintable(keyCode)) {
inputNode.focus();
inputNode.select();
} else {
inputNode.select();
}
}
},
hasEscapeBeenPressed: function hasEscapeBeenPressed() {
var pressed = false;
var escapeKey = 27;
if (window.event) {
if (window.event.keyCode === escapeKey) {
pressed = true;
} else if (window.event.which === escapeKey) {
pressed = true;
}
}
return pressed;
},
renderStatusIcon: function renderStatusIcon() {
if (this.state.isInvalid === true) {
return React.createElement('span', { className: 'glyphicon glyphicon-remove form-control-feedback' });
}
},
render: function render() {
return React.createElement(
'div',
{ className: this.getContainerClass(), onBlur: this.handleBlur, onKeyDown: this.onKeyDown },
this.createEditor(),
this.renderStatusIcon()
);
}
});
module.exports = EditorContainer;
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var React = __webpack_require__(1);
var EditorBase = __webpack_require__(65);
var SimpleTextEditor = function (_EditorBase) {
_inherits(SimpleTextEditor, _EditorBase);
function SimpleTextEditor() {
_classCallCheck(this, SimpleTextEditor);
return _possibleConstructorReturn(this, _EditorBase.apply(this, arguments));
}
SimpleTextEditor.prototype.render = function render() {
return React.createElement('input', { ref: 'input', type: 'text', onBlur: this.props.onBlur, className: 'form-control', defaultValue: this.props.value });
};
return SimpleTextEditor;
}(EditorBase);
module.exports = SimpleTextEditor;
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(1);
var SimpleCellFormatter = React.createClass({
displayName: 'SimpleCellFormatter',
propTypes: {
value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired
},
shouldComponentUpdate: function shouldComponentUpdate(nextProps) {
return nextProps.value !== this.props.value;
},
render: function render() {
return React.createElement(
'div',
{ title: this.props.value },
this.props.value
);
}
});
module.exports = SimpleCellFormatter;
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(2);
var _reactDom2 = _interopRequireDefault(_reactDom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/prop-types */
var focusableComponentWrapper = function focusableComponentWrapper(WrappedComponent) {
return function (_Component) {
_inherits(ComponentWrapper, _Component);
function ComponentWrapper() {
_classCallCheck(this, ComponentWrapper);
var _this = _possibleConstructorReturn(this, _Component.call(this));
_this.checkFocus = _this.checkFocus.bind(_this);
return _this;
}
ComponentWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
return WrappedComponent.isSelected(this.props) !== WrappedComponent.isSelected(nextProps);
};
ComponentWrapper.prototype.componentDidMount = function componentDidMount() {
this.checkFocus();
};
ComponentWrapper.prototype.componentDidUpdate = function componentDidUpdate() {
this.checkFocus();
};
ComponentWrapper.prototype.checkFocus = function checkFocus() {
if (WrappedComponent.isSelected(this.props) && WrappedComponent.isScrolling(this.props)) {
this.focus();
}
};
ComponentWrapper.prototype.focus = function focus() {
_reactDom2['default'].findDOMNode(this).focus();
};
ComponentWrapper.prototype.render = function render() {
return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, this.state));
};
return ComponentWrapper;
}(_react.Component);
};
exports['default'] = focusableComponentWrapper;
/***/ },
/* 70 */
/***/ function(module, exports) {
'use strict';
module.exports = function isColumnsImmutable(columns) {
return typeof Immutable !== 'undefined' && columns instanceof Immutable.List;
};
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule invariant
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
function invariant(condition, format, a, b, c, d, e, f) {
if (false) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule keyMirror
* @typechecks static-only
*/
'use strict';
var invariant = __webpack_require__(71);
/**
* Constructs an enumeration with keys equal to their value.
*
* For example:
*
* var COLORS = keyMirror({blue: null, red: null});
* var myColor = COLORS.blue;
* var isColorValid = !!COLORS[myColor];
*
* The last line could not be performed if the values of the generated enum were
* not equal to their keys.
*
* Input: {key1: val1, key2: val2}
* Output: {key1: key1, key2: key2}
*
* @param {object} obj
* @return {object}
*/
var keyMirror = function (obj) {
var ret = {};
var key;
!(obj instanceof Object && !Array.isArray(obj)) ? false ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : undefined;
for (key in obj) {
if (!obj.hasOwnProperty(key)) {
continue;
}
ret[key] = key;
}
return ret;
};
module.exports = keyMirror;
/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7),
root = __webpack_require__(3);
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView');
module.exports = DataView;
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(98),
hashDelete = __webpack_require__(99),
hashGet = __webpack_require__(100),
hashHas = __webpack_require__(101),
hashSet = __webpack_require__(102);
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7),
root = __webpack_require__(3);
/* Built-in method references that are verified to be native. */
var Promise = getNative(root, 'Promise');
module.exports = Promise;
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7),
root = __webpack_require__(3);
/* Built-in method references that are verified to be native. */
var Set = getNative(root, 'Set');
module.exports = Set;
/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(29),
setCacheAdd = __webpack_require__(122),
setCacheHas = __webpack_require__(123);
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(11),
stackClear = __webpack_require__(125),
stackDelete = __webpack_require__(126),
stackGet = __webpack_require__(127),
stackHas = __webpack_require__(128),
stackSet = __webpack_require__(129);
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(3);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(7),
root = __webpack_require__(3);
/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root, 'WeakMap');
module.exports = WeakMap;
/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {
var baseTimes = __webpack_require__(89),
isArguments = __webpack_require__(130),
isArray = __webpack_require__(34),
isBuffer = __webpack_require__(35),
isIndex = __webpack_require__(103),
isTypedArray = __webpack_require__(38);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
module.exports = arrayLikeKeys;
/***/ },
/* 82 */
/***/ function(module, exports) {
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
module.exports = arraySome;
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(13),
isObjectLike = __webpack_require__(16);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqualDeep = __webpack_require__(85),
isObject = __webpack_require__(23),
isObjectLike = __webpack_require__(16);
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
module.exports = baseIsEqual;
/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {
var Stack = __webpack_require__(78),
equalArrays = __webpack_require__(30),
equalByTag = __webpack_require__(93),
equalObjects = __webpack_require__(94),
getTag = __webpack_require__(96),
isArray = __webpack_require__(34),
isBuffer = __webpack_require__(35),
isTypedArray = __webpack_require__(38);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
module.exports = baseIsEqualDeep;
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(36),
isMasked = __webpack_require__(105),
isObject = __webpack_require__(23),
toSource = __webpack_require__(32);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(13),
isLength = __webpack_require__(37),
isObjectLike = __webpack_require__(16);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
module.exports = baseIsTypedArray;
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
var isPrototype = __webpack_require__(106),
nativeKeys = __webpack_require__(118);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
module.exports = baseKeys;
/***/ },
/* 89 */
/***/ function(module, exports) {
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
module.exports = baseTimes;
/***/ },
/* 90 */
/***/ function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ },
/* 91 */
/***/ function(module, exports) {
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
/***/ },
/* 92 */
/***/ function(module, exports, __webpack_require__) {
var root = __webpack_require__(3);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(22),
Uint8Array = __webpack_require__(79),
eq = __webpack_require__(33),
equalArrays = __webpack_require__(30),
mapToArray = __webpack_require__(117),
setToArray = __webpack_require__(124);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;
/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {
var keys = __webpack_require__(133);
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1;
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
module.exports = equalObjects;
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(22);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
/***/ },
/* 96 */
/***/ function(module, exports, __webpack_require__) {
var DataView = __webpack_require__(73),
Map = __webpack_require__(21),
Promise = __webpack_require__(75),
Set = __webpack_require__(76),
WeakMap = __webpack_require__(80),
baseGetTag = __webpack_require__(13),
toSource = __webpack_require__(32);
/** `Object#toString` result references. */
var mapTag = '[object Map]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';
var dataViewTag = '[object DataView]';
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
module.exports = getTag;
/***/ },
/* 97 */
/***/ function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(15);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ },
/* 99 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(15);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(15);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(15);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ },
/* 103 */
/***/ function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
/***/ },
/* 104 */
/***/ function(module, exports) {
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
module.exports = isKeyable;
/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(92);
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
/***/ },
/* 106 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
module.exports = isPrototype;
/***/ },
/* 107 */
/***/ function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(12);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(12);
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ },
/* 110 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(12);
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ },
/* 111 */
/***/ function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(12);
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(74),
ListCache = __webpack_require__(11),
Map = __webpack_require__(21);
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
module.exports = mapCacheClear;
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(14);
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(14);
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(14);
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(14);
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
/***/ },
/* 117 */
/***/ function(module, exports) {
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
module.exports = mapToArray;
/***/ },
/* 118 */
/***/ function(module, exports, __webpack_require__) {
var overArg = __webpack_require__(121);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);
module.exports = nativeKeys;
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(31);
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(40)(module)))
/***/ },
/* 120 */
/***/ function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
/***/ },
/* 121 */
/***/ function(module, exports) {
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
module.exports = overArg;
/***/ },
/* 122 */
/***/ function(module, exports) {
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
/***/ },
/* 123 */
/***/ function(module, exports) {
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
/***/ },
/* 124 */
/***/ function(module, exports) {
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
module.exports = setToArray;
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(11);
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
module.exports = stackClear;
/***/ },
/* 126 */
/***/ function(module, exports) {
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
module.exports = stackDelete;
/***/ },
/* 127 */
/***/ function(module, exports) {
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
module.exports = stackGet;
/***/ },
/* 128 */
/***/ function(module, exports) {
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
module.exports = stackHas;
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
var ListCache = __webpack_require__(11),
Map = __webpack_require__(21),
MapCache = __webpack_require__(29);
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
module.exports = stackSet;
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(83),
isObjectLike = __webpack_require__(16);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(36),
isLength = __webpack_require__(37);
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
var baseIsEqual = __webpack_require__(84);
/**
* Performs a deep comparison between two values to determine if they are
* equivalent.
*
* **Note:** This method supports comparing arrays, array buffers, booleans,
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
* nodes are **not** supported.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.isEqual(object, other);
* // => true
*
* object === other;
* // => false
*/
function isEqual(value, other) {
return baseIsEqual(value, other);
}
module.exports = isEqual;
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(81),
baseKeys = __webpack_require__(88),
isArrayLike = __webpack_require__(131);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;
/***/ },
/* 134 */
/***/ function(module, exports) {
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = stubFalse;
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(136);
/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule shallowCompare
*/
'use strict';
var shallowEqual = __webpack_require__(20);
/**
* Does a shallow comparison for props and state.
* See ReactComponentWithPureRenderMixin
*/
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
module.exports = shallowCompare;
/***/ }
/******/ ])
});
; |
src/components/Nav.js | chrisyaxley/reactBoilerplateNodeServer | import React from 'react';
import { Link } from 'react-router-dom';
// The Header creates links that can be used to navigate
// between routes.
const Nav = () => (
<header>
<nav>
<ul>
<li><Link to="/">Home</Link></li>
<li><Link to="/jobs">Jobs</Link></li>
<li><Link to="/strava">Strava</Link></li>
</ul>
</nav>
</header>
);
export default Nav;
|
.build/bundle/programs/server/npm/node_modules/meteor/okgrow_analytics/examples/react-router/node_modules/react-dom/lib/ReactDOMUMDEntry.js | ocadni/citychrone | /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var React = require('react/lib/React');
var ReactDOM = require('./ReactDOM');
var ReactDOMUMDEntry = ReactDOM;
if (process.env.NODE_ENV !== 'production') {
ReactDOMUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
// ReactPerf and ReactTestUtils currently only work with the DOM renderer
// so we expose them from here, but only in DEV mode.
ReactPerf: require('./ReactPerf'),
ReactTestUtils: require('./ReactTestUtils')
};
}
// Inject ReactDOM into React for the addons UMD build that depends on ReactDOM (TransitionGroup).
// We can remove this after we deprecate and remove the addons UMD build.
if (React.addons) {
React.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMUMDEntry;
}
module.exports = ReactDOMUMDEntry; |
src/components/photo_gallery_items.js | gor181/react-redux-mini-gallery | import _ from 'lodash';
import React, {Component, PropTypes} from 'react';
import shouldComponentUpdate from 'react-addons-shallow-compare';
import {GridList} from 'material-ui';
import GalleryItem from './photo_gallery_item';
export default class GalleryItems extends Component {
static propTypes = {
photos: PropTypes.array.isRequired,
editable: PropTypes.bool.isRequired,
confirmDelete: PropTypes.func.isRequired,
toggleSelected: PropTypes.func.isRequired
}
constructor () {
super();
this.shouldComponentUpdate = shouldComponentUpdate.bind(this);
}
render () {
const {photos, editable, confirmDelete, toggleSelected} = this.props;
return (
<GridList cellHeight={200}>
{_.map(photos, photo => {
return (
<GalleryItem
photo={photo}
key={photo.id}
onDelete={confirmDelete}
toggleSelected={toggleSelected}
editable={editable}
/>
);
})}
</GridList>
)
}
}
|
demo/src/components/App/components/Examples/components/MultipleSections/MultipleSections.js | moroshko/react-autosuggest | import styles from './MultipleSections.less';
import theme from './theme.less';
import React, { Component } from 'react';
import isMobile from 'ismobilejs';
import Link from 'Link/Link';
import Autosuggest from 'Autosuggest';
import languages from './languages';
import { escapeRegexCharacters } from 'utils/utils';
const focusInputOnSuggestionClick = !isMobile.any;
const getSuggestions = value => {
const escapedValue = escapeRegexCharacters(value.trim());
if (escapedValue === '') {
return [];
}
const regex = new RegExp('^' + escapedValue, 'i');
return languages
.map(section => {
return {
title: section.title,
languages: section.languages.filter(language =>
regex.test(language.name)
)
};
})
.filter(section => section.languages.length > 0);
};
const getSuggestionValue = suggestion => suggestion.name;
const renderSuggestion = suggestion => <span>{suggestion.name}</span>;
const renderSectionTitle = section => <strong>{section.title}</strong>;
const getSectionSuggestions = section => section.languages;
export default class MultipleSections extends Component {
constructor() {
super();
this.state = {
value: '',
suggestions: []
};
}
onChange = (event, { newValue }) => {
this.setState({
value: newValue
});
};
onSuggestionsFetchRequested = ({ value }) => {
this.setState({
suggestions: getSuggestions(value)
});
};
onSuggestionsClearRequested = () => {
this.setState({
suggestions: []
});
};
render() {
const { value, suggestions } = this.state;
const inputProps = {
placeholder: "Type 'c'",
value,
onChange: this.onChange
};
return (
<div id="multiple-sections-example" className={styles.container}>
<div className={styles.textContainer}>
<div className={styles.title}>Multiple sections</div>
<div className={styles.description}>
Suggestions can also be presented in multiple sections. Note that we
highlight the first suggestion by default here.
</div>
<Link
className={styles.codepenLink}
href="http://codepen.io/moroshko/pen/qbRNjV"
underline={false}
>
Codepen
</Link>
</div>
<div className={styles.autosuggest}>
<Autosuggest
multiSection={true}
suggestions={suggestions}
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
getSuggestionValue={getSuggestionValue}
renderSuggestion={renderSuggestion}
renderSectionTitle={renderSectionTitle}
getSectionSuggestions={getSectionSuggestions}
inputProps={inputProps}
highlightFirstSuggestion={true}
focusInputOnSuggestionClick={focusInputOnSuggestionClick}
theme={theme}
id="multiple-sections-example"
/>
</div>
</div>
);
}
}
|
client/src/components/AddCandidate.js | serban-petrescu/candidate-management | import React from 'react';
import {FormGroup, FormControl, ControlLabel, HelpBlock, Button, Grid, Row, Col} from 'react-bootstrap';
import {addCandidate} from '../actions/CandidateActions';
import {bindActionCreators} from "redux";
import {connect} from "react-redux";
import ButtonAddCandidate from './ButtonAddCandidate';
import {showNotification} from '../utils/ApiNotification.js';
import TopNavbar from './TopNavbar';
function FieldGroup({id, label, validationState, help, ...props}) {
return (
<FormGroup controlId={id} validationState={validationState}>
<ControlLabel>{label}</ControlLabel>
<FormControl {...props}/>
{ help && <HelpBlock>{help}</HelpBlock>}
</FormGroup>
)
}
let fieldsInitialValues = {
emailAddress: '',
emailAddressValidationMsg: '',
emailAddressValidationStatus: null,
firstName: '',
firstNameValidationMsg: '',
firstNameValidationStatus: null,
lastName: '',
lastNameValidationMsg: '',
lastNameValidationStatus: null,
phoneNumber: '',
phoneNumberValidationMsg: '',
phoneNumberValidationStatus: null
};
/**
* Component handling the add operation of a candidate
*/
class AddCandidate extends React.Component {
constructor(props) {
super(props);
this.state = {
...fieldsInitialValues,
remainOnPage: false
}
}
handleChangeEmail = (e) => {
const emailAddress = e.target.value;
let validationMessage = '';
let validationStatus = 'error';
if (!emailAddress) {
validationMessage = 'Email required!';
}
else {
// regex for testing the allowed email formats
// http://jsfiddle.net/ghvj4gy9/embedded/result,js/
const regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
let regexCheckResult = this.checkRegexAndGetMessage(emailAddress, regex);
validationMessage = regexCheckResult.validationMessage;
validationStatus = regexCheckResult.validationStatus;
}
this.setState({
emailAddress: emailAddress,
emailAddressValidationMsg: validationMessage,
emailAddressValidationStatus: validationStatus
})
};
handleChangeFirstName = (e) => {
const firstName = e.target.value;
let validationMessage = '';
let validationStatus = 'error';
if (!firstName) {
validationMessage = 'First name required!';
}
else {
const regexCheckResult = this.checkRegexAndGetMessage(firstName, /^[a-zA-Z ]+$/);
validationMessage = regexCheckResult.validationMessage;
validationStatus = regexCheckResult.validationStatus;
}
this.setState({
firstName: firstName,
firstNameValidationMsg: validationMessage,
firstNameValidationStatus: validationStatus
})
};
handleChangeLastName = (e) => {
const lastName = e.target.value;
let validationMessage = '';
let validationStatus = 'error';
if (!lastName) {
validationMessage = 'Last name required!';
}
else {
const regexCheckResult = this.checkRegexAndGetMessage(lastName, /^[a-zA-Z ]+$/);
validationMessage = regexCheckResult.validationMessage;
validationStatus = regexCheckResult.validationStatus;
}
this.setState({
lastName: lastName,
lastNameValidationMsg: validationMessage,
lastNameValidationStatus: validationStatus
})
};
handleChangePhoneNumber = (e) => {
const phoneNumber = e.target.value;
let validationMessage = '';
let validationStatus = 'error';
if (!phoneNumber) {
validationMessage = 'Phone number required';
}
else {
const regexCheckResult = this.checkRegexAndGetMessage(phoneNumber, /^(0|(0040|004\s0)|(\+40|\+4\s0))([0-9]{3}\s?|[0-9]{2}\s[0-9])(([0-9]{3}\s?){2}|([0-9]{2}\s?){3})$/);
validationMessage = regexCheckResult.validationMessage;
validationStatus = regexCheckResult.validationStatus;
}
this.setState({
phoneNumber: phoneNumber,
phoneNumberValidationMsg: validationMessage,
phoneNumberValidationStatus: validationStatus
})
};
handleCheckbox = () => {
this.setState({
remainOnPage: !this.state.remainOnPage
})
};
checkRegexAndGetMessage = (value, regex) => {
let validationMessage = '';
let validationStatus = '';
if (regex.test(value)) {
validationMessage = 'Valid!';
validationStatus = 'success';
}
else {
validationMessage = 'Invalid!';
validationStatus = 'error';
}
return {
validationMessage: validationMessage,
validationStatus: validationStatus
}
};
submitCandidate = () => {
let candidate = {
firstName: this.state.firstName,
lastName: this.state.lastName,
email: this.state.emailAddress,
phone: this.state.phoneNumber
};
let HTTP_STATUS_CREATED = 201;
let result = this.props.addCandidate(candidate);
showNotification(result, HTTP_STATUS_CREATED, "create");
return result;
};
afterSubmit = () => {
if (this.state.remainOnPage) {
this.setState({
...fieldsInitialValues
});
} else {
window.location.href = '#/home';
}
};
formValid = () => {
return (this.state.emailAddressValidationStatus === 'success' && this.state.firstNameValidationStatus === 'success'
&& this.state.lastNameValidationStatus === 'success' && this.state.phoneNumberValidationStatus === 'success');
};
render() {
return (
<div>
<TopNavbar/>
<Grid>
{/* Personal info section */}
<form>
<FieldGroup id="formFirstName"
label="First Name"
validationState={this.state.firstNameValidationStatus}
help={this.state.firstNameValidationMsg}
type="text"
value={this.state.firstName}
placeholder="Enter first name"
onChange={this.handleChangeFirstName}>
</FieldGroup>
<FieldGroup id="formLastName"
label="Last Name"
validationState={this.state.lastNameValidationStatus}
help={this.state.lastNameValidationMsg}
type="text"
value={this.state.lastName}
placeholder="Enter last name"
onChange={this.handleChangeLastName}>
</FieldGroup>
<FieldGroup id="formEmailAddress"
label="Email address"
validationState={this.state.emailAddressValidationStatus}
help={this.state.emailAddressValidationMsg}
type="text"
value={this.state.emailAddress}
placeholder="Enter email"
onChange={this.handleChangeEmail}>
</FieldGroup>
<FieldGroup id="formPhoneNumber"
label="Phone number"
validationState={this.state.phoneNumberValidationStatus}
help={this.state.phoneNumberValidationMsg}
type="text"
value={this.state.phoneNumber}
placeholder="Enter phone number"
onChange={this.handleChangePhoneNumber}>
</FieldGroup>
<input id="checkbox_stay_on_page" type="checkbox" checked={this.state.remainOnPage}
onClick={this.handleCheckbox}/>
<label className="checkbox-label">Remain on the current page to add another
candidate</label>
</form>
{/* Buttons section */}
<Row>
<Col xs={4} md={3}>
<ButtonAddCandidate formValid={this.formValid()}
submitCandidate={() => this.submitCandidate()}
afterSubmit={() => this.afterSubmit()}/>
</Col>
<Col xs={14} md={9}>
<Button id="btn-home" className="float-right candidateCustomButton"
href="#/home">Home</Button>
</Col>
</Row>
</Grid>
</div>
)
}
}
function mapDispatchToProps(dispatch) {
return bindActionCreators({addCandidate: addCandidate}, dispatch);
}
export default connect(null, mapDispatchToProps)(AddCandidate); |
src/svg-icons/action/pets.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPets = (props) => (
<SvgIcon {...props}>
<circle cx="4.5" cy="9.5" r="2.5"/><circle cx="9" cy="5.5" r="2.5"/><circle cx="15" cy="5.5" r="2.5"/><circle cx="19.5" cy="9.5" r="2.5"/><path d="M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"/>
</SvgIcon>
);
ActionPets = pure(ActionPets);
ActionPets.displayName = 'ActionPets';
ActionPets.muiName = 'SvgIcon';
export default ActionPets;
|
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js | TimurTarasenko/actor-platform | import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import ActorClient from 'utils/ActorClient';
import { Styles, FlatButton } from 'material-ui';
import { KeyCodes } from 'constants/ActorAppConstants';
import ActorTheme from 'constants/ActorTheme';
import MessageActionCreators from 'actions/MessageActionCreators';
import TypingActionCreators from 'actions/TypingActionCreators';
import DraftActionCreators from 'actions/DraftActionCreators';
import DraftStore from 'stores/DraftStore';
import AvatarItem from 'components/common/AvatarItem.react';
const ThemeManager = new Styles.ThemeManager();
const getStateFromStores = () => {
return {
text: DraftStore.getDraft(),
profile: ActorClient.getUser(ActorClient.getUid())
};
};
var ComposeSection = React.createClass({
displayName: 'ComposeSection',
propTypes: {
peer: React.PropTypes.object.isRequired
},
childContextTypes: {
muiTheme: React.PropTypes.object
},
mixins: [PureRenderMixin],
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
},
componentWillMount() {
ThemeManager.setTheme(ActorTheme);
DraftStore.addLoadDraftListener(this.onDraftLoad);
},
componentWillUnmount() {
DraftStore.removeLoadDraftListener(this.onDraftLoad);
},
getInitialState: function() {
return getStateFromStores();
},
onDraftLoad() {
this.setState(getStateFromStores());
},
_onChange: function(event) {
TypingActionCreators.onTyping(this.props.peer);
this.setState({text: event.target.value});
},
_onKeyDown: function(event) {
if (event.keyCode === KeyCodes.ENTER && !event.shiftKey) {
event.preventDefault();
this._sendTextMessage();
} else if (event.keyCode === 50 && event.shiftKey) {
console.warn('Mention should show now.');
}
},
onKeyUp() {
DraftActionCreators.saveDraft(this.state.text);
},
_sendTextMessage() {
const text = this.state.text;
if (text) {
MessageActionCreators.sendTextMessage(this.props.peer, text);
}
this.setState({text: ''});
DraftActionCreators.saveDraft('', true);
},
_onSendFileClick: function() {
const fileInput = document.getElementById('composeFileInput');
fileInput.click();
},
_onSendPhotoClick: function() {
const photoInput = document.getElementById('composePhotoInput');
photoInput.accept = 'image/*';
photoInput.click();
},
_onFileInputChange: function() {
const files = document.getElementById('composeFileInput').files;
MessageActionCreators.sendFileMessage(this.props.peer, files[0]);
},
_onPhotoInputChange: function() {
const photos = document.getElementById('composePhotoInput').files;
MessageActionCreators.sendPhotoMessage(this.props.peer, photos[0]);
},
_onPaste: function(event) {
let preventDefault = false;
_.forEach(event.clipboardData.items, function(item) {
if (item.type.indexOf('image') !== -1) {
preventDefault = true;
MessageActionCreators.sendClipboardPhotoMessage(this.props.peer, item.getAsFile());
}
}, this);
if (preventDefault) {
event.preventDefault();
}
},
render: function() {
const text = this.state.text;
const profile = this.state.profile;
return (
<section className="compose" onPaste={this._onPaste}>
<AvatarItem image={profile.avatar}
placeholder={profile.placeholder}
title={profile.name}/>
<textarea className="compose__message"
onChange={this._onChange}
onKeyDown={this._onKeyDown}
onKeyUp={this.onKeyUp}
value={text}>
</textarea>
<footer className="compose__footer row">
<button className="button" onClick={this._onSendFileClick}>
<i className="material-icons">attachment</i> Send file
</button>
<button className="button" onClick={this._onSendPhotoClick}>
<i className="material-icons">photo_camera</i> Send photo
</button>
<span className="col-xs"></span>
<FlatButton label="Send" onClick={this._sendTextMessage} secondary={true}/>
</footer>
<div className="compose__hidden">
<input id="composeFileInput"
onChange={this._onFileInputChange}
type="file"/>
<input id="composePhotoInput"
onChange={this._onPhotoInputChange}
type="file"/>
</div>
</section>
);
}
});
export default ComposeSection;
|
src/components/MonModal/MonModal.js | eunvanz/handpokemon2 | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import keygen from 'keygenerator'
import shallowCompare from 'react-addons-shallow-compare'
import { browserHistory, Link } from 'react-router'
import $ from 'jquery'
import CustomModal from 'components/CustomModal'
import Button from 'components/Button'
import MonLevel from 'components/MonLevel'
import MonInfo from 'components/MonInfo'
import Img from 'components/Img'
import Info from 'components/Info'
import Selectbox from 'components/Selectbox'
import { getMonImage } from 'utils/monUtil'
import { showAlert } from 'utils/commonUtil'
import { colors } from 'constants/colors'
import { updatePickMonInfo } from 'store/pickMonInfo'
import { updateCollectionPath, updateCollection } from 'services/CollectionService'
const mapDispatchToProps = dispatch => {
return {
// updatePickMonInfo: pickMonInfo => dispatch(receivePickMonInfo(pickMonInfo))
updatePickMonInfo: pickMonInfo => dispatch(updatePickMonInfo(pickMonInfo))
}
}
const mapStateToProps = (state) => {
return {
pickMonInfo: state.pickMonInfo
}
}
class MonModal extends React.Component {
constructor (props) {
super(props)
this.state = {
showStat: false,
imageSeq: props.mon.tobe.imageSeq,
mon: props.mon
}
this._handleOnClickEvolution = this._handleOnClickEvolution.bind(this)
this._handleOnClickMix = this._handleOnClickMix.bind(this)
this._handleOnChangeImage = this._handleOnChangeImage.bind(this)
}
shouldComponentUpdate (nextProps, nextState) {
return shallowCompare(this, nextProps, nextState)
}
_handleOnClickEvolution () {
const { mon, updatePickMonInfo, close } = this.props
const colToEvolute = mon.tobe
if (colToEvolute.isDefender && colToEvolute.level === colToEvolute.mon[colToEvolute.monId].evoLv) {
showAlert({ title: '이런!', text: '진화가능 레벨의 수비 포켓몬은 진화할 수 없습니다. 한번 더 레벨업 해주세요.', type: 'error' })
return false
} else if (colToEvolute.isFavorite && colToEvolute.level === colToEvolute.mon[colToEvolute.monId].evoLv) {
showAlert({ title: '이런!', text: '진화가능 레벨의 즐겨찾기 포켓몬은 진화할 수 없습니다. 한번 더 레벨업 해주세요.', type: 'error' })
return false
}
const pickMonInfo = {
quantity: 1,
evoluteCol: colToEvolute
}
updatePickMonInfo(pickMonInfo)
.then(() => {
close()
browserHistory.replace(`/pick-mon?f=${keygen._()}`)
})
}
_handleOnClickMix () {
const { mon, updatePickMonInfo, close } = this.props
const colToMix = mon.tobe
if (colToMix.isDefender && colToMix.level === 1) {
showAlert({ title: '이런!', text: 'LV.1의 수비 포켓몬은 교배할 수 없습니다.', type: 'error' })
return false
} else if (colToMix.isFavorite && colToMix.level === 1) {
showAlert({ title: '이런!', text: 'LV.1의 즐겨찾기 포켓몬은 교배할 수 없습니다.', type: 'error' })
return false
}
const pickMonInfo = {
quantity: 1,
mixCols: [colToMix]
}
updatePickMonInfo(pickMonInfo)
.then(() => {
close()
this.context.router.replace(`/collection/${mon.tobe.userId}`)
})
}
_handleOnChangeImage (e) {
const { value } = e.target
const { firebase } = this.props
const { mon } = this.state
if (value === '') return
this.setState({ imageSeq: Number(value) })
updateCollectionPath(firebase, mon.tobe, 'imageSeq', Number(value))
const url = mon.tobe.mon[mon.tobe.monId].monImage.filter(image => image.seq === Number(value))[0].url
$(`img#${mon.tobe.id}`).attr('src', url)
if (mon.tobe.mon[mon.tobe.monId].name.ko === '킬가르도') {
const newCol = Object.assign({}, mon.tobe)
const power = mon.tobe.mon[mon.tobe.monId].power
const colPower = mon.tobe.power
const armor = mon.tobe.mon[mon.tobe.monId].armor
const colArmor = mon.tobe.armor
const sPower = mon.tobe.mon[mon.tobe.monId].sPower
const colSPower = mon.tobe.sPower
const sArmor = mon.tobe.mon[mon.tobe.monId].sArmor
const colSArmor = mon.tobe.sArmor
if (value === '1') {
newCol.mon[newCol.monId].power = power > armor ? power : armor
newCol.power = colPower > colArmor ? colPower : colArmor
newCol.mon[newCol.monId].armor = power > armor ? armor : power
newCol.armor = colPower > colArmor ? colArmor : colPower
newCol.mon[newCol.monId].sPower = sPower > sArmor ? sPower : sArmor
newCol.sPower = colSPower > colSArmor ? colSPower : colSArmor
newCol.mon[newCol.monId].sArmor = sPower > sArmor ? sArmor : sPower
newCol.sArmor = colSPower > colSArmor ? colSArmor : colSPower
} else if (value === '0') {
newCol.mon[newCol.monId].power = power < armor ? power : armor
newCol.power = colPower < colArmor ? colPower : colArmor
newCol.mon[newCol.monId].armor = power < armor ? armor : power
newCol.armor = colPower < colArmor ? colArmor : colPower
newCol.mon[newCol.monId].sPower = sPower < sArmor ? sPower : sArmor
newCol.sPower = colSPower < colSArmor ? colSPower : colSArmor
newCol.mon[newCol.monId].sArmor = sPower < sArmor ? sArmor : sPower
newCol.sArmor = colSPower < colSArmor ? colSArmor : colSPower
}
newCol.imageSeq = Number(value)
updateCollection(firebase, newCol)
this.setState({ mon: Object.assign({}, mon, { tobe: newCol }) })
} else if (mon.tobe.mon[mon.tobe.monId].name.ko === '로토무') {
const newCol = Object.assign({}, mon.tobe)
const cost = newCol.mon[newCol.monId].cost
const power = mon.tobe.mon[mon.tobe.monId].power
const colPower = mon.tobe.power
const armor = mon.tobe.mon[mon.tobe.monId].armor
const colArmor = mon.tobe.armor
const sPower = mon.tobe.mon[mon.tobe.monId].sPower
const colSPower = mon.tobe.sPower
const sArmor = mon.tobe.mon[mon.tobe.monId].sArmor
const colSArmor = mon.tobe.sArmor
const dex = mon.tobe.mon[mon.tobe.monId].dex
const colDex = mon.tobe.dex
if (value === '0') {
newCol.mon[newCol.monId].subAttr = '유령'
newCol.mon[newCol.monId].cost = 5
if (cost !== 5) {
newCol.mon[newCol.monId].power = power - 15
newCol.mon[newCol.monId].armor = armor - 30
newCol.mon[newCol.monId].sPower = sPower - 10
newCol.mon[newCol.monId].sArmor = sArmor - 30
newCol.mon[newCol.monId].dex = dex + 10
newCol.power = colPower - 15
newCol.armor = colArmor - 30
newCol.sPower = colSPower - 10
newCol.sArmor = colSArmor - 30
newCol.dex = colDex + 10
$(`.mon-cost#${mon.tobe.id} > i`).removeClass('c-amber')
}
} else {
newCol.mon[newCol.monId].cost = 7
if (value === '1') {
newCol.mon[newCol.monId].subAttr = '불꽃'
} else if (value === '2') {
newCol.mon[newCol.monId].subAttr = '비행'
} else if (value === '3') {
newCol.mon[newCol.monId].subAttr = '얼음'
} else if (value === '4') {
newCol.mon[newCol.monId].subAttr = '물'
} else if (value === '5') {
newCol.mon[newCol.monId].subAttr = '풀'
}
if (cost !== 7) {
newCol.mon[newCol.monId].power = power + 15
newCol.mon[newCol.monId].armor = armor + 30
newCol.mon[newCol.monId].sPower = sPower + 10
newCol.mon[newCol.monId].sArmor = sArmor + 30
newCol.mon[newCol.monId].dex = dex - 10
newCol.power = colPower + 15
newCol.armor = colArmor + 30
newCol.sPower = colSPower + 10
newCol.sArmor = colSArmor + 30
newCol.dex = colDex - 10
$(`.mon-cost#${mon.tobe.id} > i:nth-child(1)`).addClass('c-amber')
$(`.mon-cost#${mon.tobe.id} > i:nth-child(2)`).addClass('c-amber')
}
}
newCol.imageSeq = Number(value)
updateCollection(firebase, newCol)
this.setState({ mon: Object.assign({}, mon, { tobe: newCol }) })
}
}
render () {
const { mon, show, close, type, updatePickMonInfo, pickMonInfo, isNotMine, user, locale, blinkMix, isMaxLevel, firebase, ...restProps } = this.props
const { imageSeq } = this.state
const tobeMon = mon.tobe
const renderLevel = () => {
if (mon.asis) {
return (
<div className='text-center m-b-30' style={{ height: '60px' }}>
<MonLevel level={mon.asis.level} style={{ backgroundColor: colors.gray }} /> <i className='fa fa-long-arrow-right c-gray' /> <MonLevel level={mon.tobe.level} style={{ fontSize: 'small' }} isMaxLevel={isMaxLevel} />
{
!isNotMine &&
<div className='m-t-15'>
{
tobeMon.mon[tobeMon.monId].evoLv !== 0 && tobeMon.level >= tobeMon.mon[tobeMon.monId].evoLv &&
<Button text='진화하기' color='deeporange' size='xs' className='m-r-5' onClick={this._handleOnClickEvolution} />
}
<Button className={blinkMix ? 'blink-opacity' : null} text='교배하기' color='orange' size='xs' onClick={this._handleOnClickMix} />
</div>
}
</div>
)
}
return (
<div>
<MonLevel level={tobeMon.level} isMaxLevel={isMaxLevel} /> {isMaxLevel && <Info id='maxLevelInfo' title='최대레벨' content={<div>현재 포켓몬이 최대레벨에 도달했습니다. 콜렉션 점수가 높으면 높을수록 최대레벨 한도도 올라갑니다. 자세한 사항은 <Link to='/board-list/guide/-L1Nv0pE3BopkKsqQDRH'>이곳</Link>을 참조해주세요.</div>} />}
{
!isNotMine && type !== 'defender' &&
<div className='m-t-15'>
{
tobeMon.mon[tobeMon.monId].evoLv !== 0 && tobeMon.level >= tobeMon.mon[tobeMon.monId].evoLv &&
<Button text='진화하기' color='deeporange' size='xs' className='m-r-5' onClick={this._handleOnClickEvolution} />
}
<Button className={blinkMix ? 'blink-opacity' : null} text='교배하기' color='orange' size='xs' onClick={this._handleOnClickMix} />
</div>
}
</div>
)
}
const renderBody = () => {
return (
<div className='row'>
<div className='col-sm-4 col-xs-12 text-center' style={{ marginBottom: '20px' }}>
<p style={{ marginBottom: '10px' }}>
<Img src={type === 'collection' || type === 'defender' ? getMonImage(tobeMon, imageSeq).url : 'hidden'} width='100%'
style={{ border: '1px dotted #e2e2e2', maxWidth: '200px' }} cache />
</p>
{
!isNotMine && tobeMon.mon && tobeMon.mon[tobeMon.monId].monImage.length > 1 &&
<div className='row'>
<div className='col-xs-8 col-xs-offset-2 col-sm-offset-0 col-sm-12'>
<Selectbox
id='monImage'
defaultValue='일러스트선택'
options={tobeMon.mon[tobeMon.monId].monImage.map(item => {
return { name: `${item.designer}`, value: item.seq }
})}
onChange={this._handleOnChangeImage}
value={this.state.imageSeq}
/>
</div>
</div>
}
{tobeMon.level &&
renderLevel()
}
</div>
<MonInfo monObj={this.state.mon} showStat={this.state.showStat} type={type} forModal user={user} locale={locale} />
</div>
)
}
const renderFooter = () => {
return (
<div className='text-right'>
<Button text='뒤집기' icon='fa fa-sync'
onClick={() => this.setState({ showStat: !this.state.showStat })} />
<Button link text='닫기' onClick={close} />
</div>
)
}
return (
<CustomModal
title='포켓몬 정보'
bodyComponent={renderBody()}
footerComponent={renderFooter()}
show={show}
close={close}
backdrop
{...restProps}
/>
)
}
}
MonModal.contextTypes = {
router: PropTypes.object.isRequired
}
MonModal.propTypes = {
mon: PropTypes.object, // asis, tobe
show: PropTypes.bool.isRequired,
close: PropTypes.func,
type: PropTypes.string,
location: PropTypes.object,
updatePickMonInfo: PropTypes.func.isRequired,
pickMonInfo: PropTypes.object,
isNotMine: PropTypes.bool,
user: PropTypes.object,
locale: PropTypes.string,
blinkMix: PropTypes.bool,
isMaxLevel: PropTypes.bool,
firebase: PropTypes.object
}
export default connect(mapStateToProps, mapDispatchToProps)(MonModal)
|
utils/typography.js | Slava/ats-website | import ReactDOM from 'react-dom/server'
import React from 'react'
import Typography from 'typography'
import { GoogleFont } from 'react-typography'
import CodePlugin from 'typography-plugin-code'
const options = {
googleFonts: [
{
name: 'Montserrat',
styles: [
'700',
],
},
{
name: 'Arvo',
styles: [
'400',
'400i',
'700',
],
},
],
headerFontFamily: ['Montserrat', 'sans-serif'],
bodyFontFamily: ['Arvo', 'sans-serif'],
baseFontSize: '18px',
baseLineHeight: 1.65,
scaleRatio: 2.25,
plugins: [
new CodePlugin(),
],
}
const typography = new Typography(options)
// Hot reload typography in development.
if (process.env.NODE_ENV !== 'production') {
typography.injectStyles()
if (typeof document !== 'undefined') {
const googleFonts = ReactDOM.renderToStaticMarkup(
React.createFactory(GoogleFont)({ typography })
)
const head = document.getElementsByTagName('head')[0]
head.insertAdjacentHTML('beforeend', googleFonts)
}
}
export default typography
|
components/animalListScene.js | marxsk/zobro | import React from 'react';
import {
View,
Text,
TouchableHighlight,
TextInput,
StyleSheet, Alert
} from 'react-native';
import * as scenes from '../scenes';
import AlphabetListView from 'react-native-alphabetlistview';
import animalDb from '../animals';
var navigator;
var bg;
class Cell extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<TouchableHighlight
onPress={() => scenes.navigatePush(navigator, scenes.ANIMAL_DETAIL, {animal: this.props.item.animal})}
underlayColor='#bbbbbb'
>
<View style={{height:30, paddingLeft: 5}}>
<Text style={{color: 'white'}}>{this.props.item.name}</Text>
</View>
</TouchableHighlight>
);
}
}
class SectionItem extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={{
backgroundColor: this.props.bgColor,
width: 30,
height: 30,
borderLeftWidth: 1,
borderColor: 'white',
justifyContent: 'center',
}}>
<Text style={{color: 'white', textAlign: 'center', fontWeight: '700'}}>{this.props.title}</Text>
</View>
);
}
}
class SectionHeader extends React.Component {
constructor(props) {
super(props);
}
render() {
// inline styles used for brevity, use a stylesheet when possible
var textStyle = {
textAlign:'center',
color:'#fff',
fontWeight:'700',
fontSize:24
};
var viewStyle = {
backgroundColor: '#104f1f'
};
return (
<View style={viewStyle}>
<Text style={textStyle}>{this.props.title}</Text>
</View>
);
}
}
export default class AnimalListScene extends React.Component {
constructor(props) {
super(props);
navigator = this.props.navigator;
bg = this.props.bg;
this.state = this.prepareSortedStructure(animalDb);
}
componentWillMount() {
bg();
}
prepareSortedStructure(animals) {
let state = {
fullData: {}
};
const removeAccents = {
'Č' : 'C',
'Š' : 'S',
'Ú' : 'U',
'Ž' : 'Z',
'Ě' : 'E',
'Á' : 'A',
'Ř' : 'R',
};
for (let animalID in animals) {
let animal = animals[animalID];
let firstLetter = animal.name.charAt(0).toUpperCase();
if ((firstLetter === 'C') && (animal.name.charAt(1) === 'h')) {
firstLetter = 'Ch';
}
if (firstLetter in removeAccents) {
firstLetter = removeAccents[firstLetter];
}
if (!(firstLetter in state.fullData)) {
state.fullData[firstLetter] = [];
}
state.fullData[firstLetter].push(animal);
};
for (let letter in state.fullData) {
state.fullData[letter].sort(function(a, b) {
return a.name.localeCompare(b.name);
})
};
state['data'] = state.fullData;
return state;
}
setFilter(text) {
this.setState({
text: text.text,
data: this.filter(text.text.toUpperCase()),
})
}
filter(text) {
let data = {};
for (let letter in this.state.fullData) {
for (let idx in this.state.fullData[letter]) {
if (this.state.fullData[letter][idx].name.toUpperCase().includes(text)) {
if (!(letter in data)) {
data[letter] = [];
}
data[letter].push(this.state.fullData[letter][idx]);
}
}
}
if (Object.keys(data).length === 0) {
data['*'] = [{name: 'Zvíře s požadovaným jménem v aplikaci zatím chybí'}];
}
return data;
}
render() {
return (
<View style={{flex: 1}}>
<TextInput
style={{height: 40, textAlign: 'center', borderColor: 'gray', borderWidth: 1, backgroundColor: 'white'}}
onChangeText={(text) => this.setFilter({text})}
value={this.state.text}
placeholder='Hledat'
autoCorrect={false}
/>
<AlphabetListView
data={this.state.data}
cell={Cell}
cellHeight={30}
sectionListItem={SectionItem}
sectionHeader={SectionHeader}
sectionHeaderHeight={22.5}
compareFunction={(a,b) => {return a.localeCompare(b); }}
style={{
backgroundColor: '#104f1f',
}}
/>
</View>
);
}
}
AnimalListScene.propTypes = {
bg: React.PropTypes.func.isRequired,
navigator: React.PropTypes.object.isRequired,
};
|
ajax/libs/react-intl/1.0.2/react-intl-with-locales.js | LeaYeh/cdnjs | (function() {
"use strict";
var $$utils$$hop = Object.prototype.hasOwnProperty;
function $$utils$$extend(obj) {
var sources = Array.prototype.slice.call(arguments, 1),
i, len, source, key;
for (i = 0, len = sources.length; i < len; i += 1) {
source = sources[i];
if (!source) { continue; }
for (key in source) {
if ($$utils$$hop.call(source, key)) {
obj[key] = source[key];
}
}
}
return obj;
}
// Purposely using the same implementation as the Intl.js `Intl` polyfill.
// Copyright 2013 Andy Earnshaw, MIT License
var $$es51$$realDefineProp = (function () {
try { return !!Object.defineProperty({}, 'a', {}); }
catch (e) { return false; }
})();
var $$es51$$es3 = !$$es51$$realDefineProp && !Object.prototype.__defineGetter__;
var $$es51$$defineProperty = $$es51$$realDefineProp ? Object.defineProperty :
function (obj, name, desc) {
if ('get' in desc && obj.__defineGetter__) {
obj.__defineGetter__(name, desc.get);
} else if (!$$utils$$hop.call(obj, name) || 'value' in desc) {
obj[name] = desc.value;
}
};
var $$es51$$objCreate = Object.create || function (proto, props) {
var obj, k;
function F() {}
F.prototype = proto;
obj = new F();
for (k in props) {
if ($$utils$$hop.call(props, k)) {
$$es51$$defineProperty(obj, k, props[k]);
}
}
return obj;
};
var $$compiler$$default = $$compiler$$Compiler;
function $$compiler$$Compiler(locales, formats, pluralFn) {
this.locales = locales;
this.formats = formats;
this.pluralFn = pluralFn;
}
$$compiler$$Compiler.prototype.compile = function (ast) {
this.pluralStack = [];
this.currentPlural = null;
this.pluralNumberFormat = null;
return this.compileMessage(ast);
};
$$compiler$$Compiler.prototype.compileMessage = function (ast) {
if (!(ast && ast.type === 'messageFormatPattern')) {
throw new Error('Message AST is not of type: "messageFormatPattern"');
}
var elements = ast.elements,
pattern = [];
var i, len, element;
for (i = 0, len = elements.length; i < len; i += 1) {
element = elements[i];
switch (element.type) {
case 'messageTextElement':
pattern.push(this.compileMessageText(element));
break;
case 'argumentElement':
pattern.push(this.compileArgument(element));
break;
default:
throw new Error('Message element does not have a valid type');
}
}
return pattern;
};
$$compiler$$Compiler.prototype.compileMessageText = function (element) {
// When this `element` is part of plural sub-pattern and its value contains
// an unescaped '#', use a `PluralOffsetString` helper to properly output
// the number with the correct offset in the string.
if (this.currentPlural && /(^|[^\\])#/g.test(element.value)) {
// Create a cache a NumberFormat instance that can be reused for any
// PluralOffsetString instance in this message.
if (!this.pluralNumberFormat) {
this.pluralNumberFormat = new Intl.NumberFormat(this.locales);
}
return new $$compiler$$PluralOffsetString(
this.currentPlural.id,
this.currentPlural.format.offset,
this.pluralNumberFormat,
element.value);
}
// Unescape the escaped '#'s in the message text.
return element.value.replace(/\\#/g, '#');
};
$$compiler$$Compiler.prototype.compileArgument = function (element) {
var format = element.format;
if (!format) {
return new $$compiler$$StringFormat(element.id);
}
var formats = this.formats,
locales = this.locales,
pluralFn = this.pluralFn,
options;
switch (format.type) {
case 'numberFormat':
options = formats.number[format.style];
return {
id : element.id,
format: new Intl.NumberFormat(locales, options).format
};
case 'dateFormat':
options = formats.date[format.style];
return {
id : element.id,
format: new Intl.DateTimeFormat(locales, options).format
};
case 'timeFormat':
options = formats.time[format.style];
return {
id : element.id,
format: new Intl.DateTimeFormat(locales, options).format
};
case 'pluralFormat':
options = this.compileOptions(element);
return new $$compiler$$PluralFormat(element.id, format.offset, options, pluralFn);
case 'selectFormat':
options = this.compileOptions(element);
return new $$compiler$$SelectFormat(element.id, options);
default:
throw new Error('Message element does not have a valid format type');
}
};
$$compiler$$Compiler.prototype.compileOptions = function (element) {
var format = element.format,
options = format.options,
optionsHash = {};
// Save the current plural element, if any, then set it to a new value when
// compiling the options sub-patterns. This conform's the spec's algorithm
// for handling `"#"` synax in message text.
this.pluralStack.push(this.currentPlural);
this.currentPlural = format.type === 'pluralFormat' ? element : null;
var i, len, option;
for (i = 0, len = options.length; i < len; i += 1) {
option = options[i];
// Compile the sub-pattern and save it under the options's selector.
optionsHash[option.selector] = this.compileMessage(option.value);
}
// Pop the plural stack to put back the original currnet plural value.
this.currentPlural = this.pluralStack.pop();
return optionsHash;
};
// -- Compiler Helper Classes --------------------------------------------------
function $$compiler$$StringFormat(id) {
this.id = id;
}
$$compiler$$StringFormat.prototype.format = function (value) {
if (!value) {
return '';
}
return typeof value === 'string' ? value : String(value);
};
function $$compiler$$PluralFormat(id, offset, options, pluralFn) {
this.id = id;
this.offset = offset;
this.options = options;
this.pluralFn = pluralFn;
}
$$compiler$$PluralFormat.prototype.getOption = function (value) {
var options = this.options;
var option = options['=' + value] ||
options[this.pluralFn(value - this.offset)];
return option || options.other;
};
function $$compiler$$PluralOffsetString(id, offset, numberFormat, string) {
this.id = id;
this.offset = offset;
this.numberFormat = numberFormat;
this.string = string;
}
$$compiler$$PluralOffsetString.prototype.format = function (value) {
var number = this.numberFormat.format(value - this.offset);
return this.string
.replace(/(^|[^\\])#/g, '$1' + number)
.replace(/\\#/g, '#');
};
function $$compiler$$SelectFormat(id, options) {
this.id = id;
this.options = options;
}
$$compiler$$SelectFormat.prototype.getOption = function (value) {
var options = this.options;
return options[value] || options.other;
};
var intl$messageformat$parser$$default = (function() {
/*
* Generated by PEG.js 0.8.0.
*
* http://pegjs.majda.cz/
*/
function peg$subclass(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
}
function SyntaxError(message, expected, found, offset, line, column) {
this.message = message;
this.expected = expected;
this.found = found;
this.offset = offset;
this.line = line;
this.column = column;
this.name = "SyntaxError";
}
peg$subclass(SyntaxError, Error);
function parse(input) {
var options = arguments.length > 1 ? arguments[1] : {},
peg$FAILED = {},
peg$startRuleFunctions = { start: peg$parsestart },
peg$startRuleFunction = peg$parsestart,
peg$c0 = [],
peg$c1 = function(elements) {
return {
type : 'messageFormatPattern',
elements: elements
};
},
peg$c2 = peg$FAILED,
peg$c3 = function(text) {
var string = '',
i, j, outerLen, inner, innerLen;
for (i = 0, outerLen = text.length; i < outerLen; i += 1) {
inner = text[i];
for (j = 0, innerLen = inner.length; j < innerLen; j += 1) {
string += inner[j];
}
}
return string;
},
peg$c4 = function(messageText) {
return {
type : 'messageTextElement',
value: messageText
};
},
peg$c5 = /^[^ \t\n\r,.+={}#]/,
peg$c6 = { type: "class", value: "[^ \\t\\n\\r,.+={}#]", description: "[^ \\t\\n\\r,.+={}#]" },
peg$c7 = "{",
peg$c8 = { type: "literal", value: "{", description: "\"{\"" },
peg$c9 = null,
peg$c10 = ",",
peg$c11 = { type: "literal", value: ",", description: "\",\"" },
peg$c12 = "}",
peg$c13 = { type: "literal", value: "}", description: "\"}\"" },
peg$c14 = function(id, format) {
return {
type : 'argumentElement',
id : id,
format: format && format[2]
};
},
peg$c15 = "number",
peg$c16 = { type: "literal", value: "number", description: "\"number\"" },
peg$c17 = "date",
peg$c18 = { type: "literal", value: "date", description: "\"date\"" },
peg$c19 = "time",
peg$c20 = { type: "literal", value: "time", description: "\"time\"" },
peg$c21 = function(type, style) {
return {
type : type + 'Format',
style: style && style[2]
};
},
peg$c22 = "plural",
peg$c23 = { type: "literal", value: "plural", description: "\"plural\"" },
peg$c24 = function(offset, options) {
return {
type : 'pluralFormat',
offset : offset || 0,
options: options
}
},
peg$c25 = "select",
peg$c26 = { type: "literal", value: "select", description: "\"select\"" },
peg$c27 = function(options) {
return {
type : 'selectFormat',
options: options
}
},
peg$c28 = "=",
peg$c29 = { type: "literal", value: "=", description: "\"=\"" },
peg$c30 = function(selector, pattern) {
return {
type : 'optionalFormatPattern',
selector: selector,
value : pattern
};
},
peg$c31 = "offset:",
peg$c32 = { type: "literal", value: "offset:", description: "\"offset:\"" },
peg$c33 = function(number) {
return number;
},
peg$c34 = { type: "other", description: "whitespace" },
peg$c35 = /^[ \t\n\r]/,
peg$c36 = { type: "class", value: "[ \\t\\n\\r]", description: "[ \\t\\n\\r]" },
peg$c37 = { type: "other", description: "optionalWhitespace" },
peg$c38 = /^[0-9]/,
peg$c39 = { type: "class", value: "[0-9]", description: "[0-9]" },
peg$c40 = /^[0-9a-f]/i,
peg$c41 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" },
peg$c42 = "0",
peg$c43 = { type: "literal", value: "0", description: "\"0\"" },
peg$c44 = /^[1-9]/,
peg$c45 = { type: "class", value: "[1-9]", description: "[1-9]" },
peg$c46 = function(digits) {
return parseInt(digits, 10);
},
peg$c47 = /^[^{}\\\0-\x1F \t\n\r]/,
peg$c48 = { type: "class", value: "[^{}\\\\\\0-\\x1F \\t\\n\\r]", description: "[^{}\\\\\\0-\\x1F \\t\\n\\r]" },
peg$c49 = "\\#",
peg$c50 = { type: "literal", value: "\\#", description: "\"\\\\#\"" },
peg$c51 = function() { return '\\#'; },
peg$c52 = "\\{",
peg$c53 = { type: "literal", value: "\\{", description: "\"\\\\{\"" },
peg$c54 = function() { return '\u007B'; },
peg$c55 = "\\}",
peg$c56 = { type: "literal", value: "\\}", description: "\"\\\\}\"" },
peg$c57 = function() { return '\u007D'; },
peg$c58 = "\\u",
peg$c59 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
peg$c60 = function(digits) {
return String.fromCharCode(parseInt(digits, 16));
},
peg$c61 = function(chars) { return chars.join(''); },
peg$currPos = 0,
peg$reportedPos = 0,
peg$cachedPos = 0,
peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },
peg$maxFailPos = 0,
peg$maxFailExpected = [],
peg$silentFails = 0,
peg$result;
if ("startRule" in options) {
if (!(options.startRule in peg$startRuleFunctions)) {
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
}
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
}
function text() {
return input.substring(peg$reportedPos, peg$currPos);
}
function offset() {
return peg$reportedPos;
}
function line() {
return peg$computePosDetails(peg$reportedPos).line;
}
function column() {
return peg$computePosDetails(peg$reportedPos).column;
}
function expected(description) {
throw peg$buildException(
null,
[{ type: "other", description: description }],
peg$reportedPos
);
}
function error(message) {
throw peg$buildException(message, null, peg$reportedPos);
}
function peg$computePosDetails(pos) {
function advance(details, startPos, endPos) {
var p, ch;
for (p = startPos; p < endPos; p++) {
ch = input.charAt(p);
if (ch === "\n") {
if (!details.seenCR) { details.line++; }
details.column = 1;
details.seenCR = false;
} else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
details.line++;
details.column = 1;
details.seenCR = true;
} else {
details.column++;
details.seenCR = false;
}
}
}
if (peg$cachedPos !== pos) {
if (peg$cachedPos > pos) {
peg$cachedPos = 0;
peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
}
advance(peg$cachedPosDetails, peg$cachedPos, pos);
peg$cachedPos = pos;
}
return peg$cachedPosDetails;
}
function peg$fail(expected) {
if (peg$currPos < peg$maxFailPos) { return; }
if (peg$currPos > peg$maxFailPos) {
peg$maxFailPos = peg$currPos;
peg$maxFailExpected = [];
}
peg$maxFailExpected.push(expected);
}
function peg$buildException(message, expected, pos) {
function cleanupExpected(expected) {
var i = 1;
expected.sort(function(a, b) {
if (a.description < b.description) {
return -1;
} else if (a.description > b.description) {
return 1;
} else {
return 0;
}
});
while (i < expected.length) {
if (expected[i - 1] === expected[i]) {
expected.splice(i, 1);
} else {
i++;
}
}
}
function buildMessage(expected, found) {
function stringEscape(s) {
function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }
return s
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"')
.replace(/\x08/g, '\\b')
.replace(/\t/g, '\\t')
.replace(/\n/g, '\\n')
.replace(/\f/g, '\\f')
.replace(/\r/g, '\\r')
.replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
.replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); })
.replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); })
.replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); });
}
var expectedDescs = new Array(expected.length),
expectedDesc, foundDesc, i;
for (i = 0; i < expected.length; i++) {
expectedDescs[i] = expected[i].description;
}
expectedDesc = expected.length > 1
? expectedDescs.slice(0, -1).join(", ")
+ " or "
+ expectedDescs[expected.length - 1]
: expectedDescs[0];
foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";
return "Expected " + expectedDesc + " but " + foundDesc + " found.";
}
var posDetails = peg$computePosDetails(pos),
found = pos < input.length ? input.charAt(pos) : null;
if (expected !== null) {
cleanupExpected(expected);
}
return new SyntaxError(
message !== null ? message : buildMessage(expected, found),
expected,
found,
pos,
posDetails.line,
posDetails.column
);
}
function peg$parsestart() {
var s0;
s0 = peg$parsemessageFormatPattern();
return s0;
}
function peg$parsemessageFormatPattern() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsemessageFormatElement();
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsemessageFormatElement();
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c1(s1);
}
s0 = s1;
return s0;
}
function peg$parsemessageFormatElement() {
var s0;
s0 = peg$parsemessageTextElement();
if (s0 === peg$FAILED) {
s0 = peg$parseargumentElement();
}
return s0;
}
function peg$parsemessageText() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
s1 = [];
s2 = peg$currPos;
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
s4 = peg$parsechars();
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s3 = [s3, s4, s5];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$currPos;
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
s4 = peg$parsechars();
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s3 = [s3, s4, s5];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c3(s1);
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = peg$parsews();
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
}
return s0;
}
function peg$parsemessageTextElement() {
var s0, s1;
s0 = peg$currPos;
s1 = peg$parsemessageText();
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c4(s1);
}
s0 = s1;
return s0;
}
function peg$parseargument() {
var s0, s1, s2;
s0 = peg$parsenumber();
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = [];
if (peg$c5.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c6); }
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
if (peg$c5.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c6); }
}
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
}
return s0;
}
function peg$parseargumentElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c7;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c8); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargument();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s6 = peg$c10;
peg$currPos++;
} else {
s6 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s6 !== peg$FAILED) {
s7 = peg$parse_();
if (s7 !== peg$FAILED) {
s8 = peg$parseelementFormat();
if (s8 !== peg$FAILED) {
s6 = [s6, s7, s8];
s5 = s6;
} else {
peg$currPos = s5;
s5 = peg$c2;
}
} else {
peg$currPos = s5;
s5 = peg$c2;
}
} else {
peg$currPos = s5;
s5 = peg$c2;
}
if (s5 === peg$FAILED) {
s5 = peg$c9;
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s7 = peg$c12;
peg$currPos++;
} else {
s7 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c13); }
}
if (s7 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c14(s3, s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseelementFormat() {
var s0;
s0 = peg$parsesimpleFormat();
if (s0 === peg$FAILED) {
s0 = peg$parsepluralFormat();
if (s0 === peg$FAILED) {
s0 = peg$parseselectFormat();
}
}
return s0;
}
function peg$parsesimpleFormat() {
var s0, s1, s2, s3, s4, s5, s6;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c15) {
s1 = peg$c15;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c16); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c17) {
s1 = peg$c17;
peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c18); }
}
if (s1 === peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c19) {
s1 = peg$c19;
peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c20); }
}
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s4 = peg$c10;
peg$currPos++;
} else {
s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s6 = peg$parsechars();
if (s6 !== peg$FAILED) {
s4 = [s4, s5, s6];
s3 = s4;
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
if (s3 === peg$FAILED) {
s3 = peg$c9;
}
if (s3 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c21(s1, s3);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parsepluralFormat() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c22) {
s1 = peg$c22;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c23); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s3 = peg$c10;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = peg$parseoffset();
if (s5 === peg$FAILED) {
s5 = peg$c9;
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
s7 = [];
s8 = peg$parseoptionalFormatPattern();
if (s8 !== peg$FAILED) {
while (s8 !== peg$FAILED) {
s7.push(s8);
s8 = peg$parseoptionalFormatPattern();
}
} else {
s7 = peg$c2;
}
if (s7 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c24(s5, s7);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseselectFormat() {
var s0, s1, s2, s3, s4, s5, s6;
s0 = peg$currPos;
if (input.substr(peg$currPos, 6) === peg$c25) {
s1 = peg$c25;
peg$currPos += 6;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c26); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s3 = peg$c10;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c11); }
}
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
s5 = [];
s6 = peg$parseoptionalFormatPattern();
if (s6 !== peg$FAILED) {
while (s6 !== peg$FAILED) {
s5.push(s6);
s6 = peg$parseoptionalFormatPattern();
}
} else {
s5 = peg$c2;
}
if (s5 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c27(s5);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseselector() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 61) {
s2 = peg$c28;
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c29); }
}
if (s2 !== peg$FAILED) {
s3 = peg$parsenumber();
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
} else {
peg$currPos = s1;
s1 = peg$c2;
}
} else {
peg$currPos = s1;
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$parsechars();
}
return s0;
}
function peg$parseoptionalFormatPattern() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
s0 = peg$currPos;
s1 = peg$parse_();
if (s1 !== peg$FAILED) {
s2 = peg$parseselector();
if (s2 !== peg$FAILED) {
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 123) {
s4 = peg$c7;
peg$currPos++;
} else {
s4 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c8); }
}
if (s4 !== peg$FAILED) {
s5 = peg$parse_();
if (s5 !== peg$FAILED) {
s6 = peg$parsemessageFormatPattern();
if (s6 !== peg$FAILED) {
s7 = peg$parse_();
if (s7 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s8 = peg$c12;
peg$currPos++;
} else {
s8 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c13); }
}
if (s8 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c30(s2, s6);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parseoffset() {
var s0, s1, s2, s3;
s0 = peg$currPos;
if (input.substr(peg$currPos, 7) === peg$c31) {
s1 = peg$c31;
peg$currPos += 7;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c32); }
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parsenumber();
if (s3 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c33(s3);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
return s0;
}
function peg$parsews() {
var s0, s1;
peg$silentFails++;
s0 = [];
if (peg$c35.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c36); }
}
if (s1 !== peg$FAILED) {
while (s1 !== peg$FAILED) {
s0.push(s1);
if (peg$c35.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c36); }
}
}
} else {
s0 = peg$c2;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c34); }
}
return s0;
}
function peg$parse_() {
var s0, s1, s2;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsews();
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsews();
}
if (s1 !== peg$FAILED) {
s1 = input.substring(s0, peg$currPos);
}
s0 = s1;
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c37); }
}
return s0;
}
function peg$parsedigit() {
var s0;
if (peg$c38.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c39); }
}
return s0;
}
function peg$parsehexDigit() {
var s0;
if (peg$c40.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c41); }
}
return s0;
}
function peg$parsenumber() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 48) {
s1 = peg$c42;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c43); }
}
if (s1 === peg$FAILED) {
s1 = peg$currPos;
s2 = peg$currPos;
if (peg$c44.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c45); }
}
if (s3 !== peg$FAILED) {
s4 = [];
s5 = peg$parsedigit();
while (s5 !== peg$FAILED) {
s4.push(s5);
s5 = peg$parsedigit();
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
} else {
peg$currPos = s2;
s2 = peg$c2;
}
} else {
peg$currPos = s2;
s2 = peg$c2;
}
if (s2 !== peg$FAILED) {
s2 = input.substring(s1, peg$currPos);
}
s1 = s2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c46(s1);
}
s0 = s1;
return s0;
}
function peg$parsechar() {
var s0, s1, s2, s3, s4, s5, s6, s7;
if (peg$c47.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c48); }
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c49) {
s1 = peg$c49;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c50); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c51();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c52) {
s1 = peg$c52;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c53); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c54();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c55) {
s1 = peg$c55;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c56); }
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c57();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c58) {
s1 = peg$c58;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) { peg$fail(peg$c59); }
}
if (s1 !== peg$FAILED) {
s2 = peg$currPos;
s3 = peg$currPos;
s4 = peg$parsehexDigit();
if (s4 !== peg$FAILED) {
s5 = peg$parsehexDigit();
if (s5 !== peg$FAILED) {
s6 = peg$parsehexDigit();
if (s6 !== peg$FAILED) {
s7 = peg$parsehexDigit();
if (s7 !== peg$FAILED) {
s4 = [s4, s5, s6, s7];
s3 = s4;
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
} else {
peg$currPos = s3;
s3 = peg$c2;
}
if (s3 !== peg$FAILED) {
s3 = input.substring(s2, peg$currPos);
}
s2 = s3;
if (s2 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c60(s2);
s0 = s1;
} else {
peg$currPos = s0;
s0 = peg$c2;
}
} else {
peg$currPos = s0;
s0 = peg$c2;
}
}
}
}
}
return s0;
}
function peg$parsechars() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsechar();
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsechar();
}
} else {
s1 = peg$c2;
}
if (s1 !== peg$FAILED) {
peg$reportedPos = s0;
s1 = peg$c61(s1);
}
s0 = s1;
return s0;
}
peg$result = peg$startRuleFunction();
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
return peg$result;
} else {
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
peg$fail({ type: "end", description: "end of input" });
}
throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
}
}
return {
SyntaxError: SyntaxError,
parse: parse
};
})();
var $$core$$default = $$core$$MessageFormat;
// -- MessageFormat --------------------------------------------------------
function $$core$$MessageFormat(message, locales, formats) {
// Parse string messages into an AST.
var ast = typeof message === 'string' ?
$$core$$MessageFormat.__parse(message) : message;
if (!(ast && ast.type === 'messageFormatPattern')) {
throw new TypeError('A message must be provided as a String or AST.');
}
// Creates a new object with the specified `formats` merged with the default
// formats.
formats = this._mergeFormats($$core$$MessageFormat.formats, formats);
// Defined first because it's used to build the format pattern.
$$es51$$defineProperty(this, '_locale', {value: this._resolveLocale(locales)});
var pluralFn = $$core$$MessageFormat.__localeData__[this._locale].pluralRuleFunction;
// Compile the `ast` to a pattern that is highly optimized for repeated
// `format()` invocations. **Note:** This passes the `locales` set provided
// to the constructor instead of just the resolved locale.
var pattern = this._compilePattern(ast, locales, formats, pluralFn);
// "Bind" `format()` method to `this` so it can be passed by reference like
// the other `Intl` APIs.
var messageFormat = this;
this.format = function (values) {
return messageFormat._format(pattern, values);
};
}
// Default format options used as the prototype of the `formats` provided to the
// constructor. These are used when constructing the internal Intl.NumberFormat
// and Intl.DateTimeFormat instances.
$$es51$$defineProperty($$core$$MessageFormat, 'formats', {
enumerable: true,
value: {
number: {
'currency': {
style: 'currency'
},
'percent': {
style: 'percent'
}
},
date: {
'short': {
month: 'numeric',
day : 'numeric',
year : '2-digit'
},
'medium': {
month: 'short',
day : 'numeric',
year : 'numeric'
},
'long': {
month: 'long',
day : 'numeric',
year : 'numeric'
},
'full': {
weekday: 'long',
month : 'long',
day : 'numeric',
year : 'numeric'
}
},
time: {
'short': {
hour : 'numeric',
minute: 'numeric'
},
'medium': {
hour : 'numeric',
minute: 'numeric',
second: 'numeric'
},
'long': {
hour : 'numeric',
minute : 'numeric',
second : 'numeric',
timeZoneName: 'short'
},
'full': {
hour : 'numeric',
minute : 'numeric',
second : 'numeric',
timeZoneName: 'short'
}
}
}
});
// Define internal private properties for dealing with locale data.
$$es51$$defineProperty($$core$$MessageFormat, '__localeData__', {value: $$es51$$objCreate(null)});
$$es51$$defineProperty($$core$$MessageFormat, '__addLocaleData', {value: function (data) {
if (!(data && data.locale)) {
throw new Error(
'Locale data provided to IntlMessageFormat is missing a ' +
'`locale` property'
);
}
if (!data.pluralRuleFunction) {
throw new Error(
'Locale data provided to IntlMessageFormat is missing a ' +
'`pluralRuleFunction` property'
);
}
// Message format locale data only requires the first part of the tag.
var locale = data.locale.toLowerCase().split('-')[0];
$$core$$MessageFormat.__localeData__[locale] = data;
}});
// Defines `__parse()` static method as an exposed private.
$$es51$$defineProperty($$core$$MessageFormat, '__parse', {value: intl$messageformat$parser$$default.parse});
// Define public `defaultLocale` property which defaults to English, but can be
// set by the developer.
$$es51$$defineProperty($$core$$MessageFormat, 'defaultLocale', {
enumerable: true,
writable : true,
value : undefined
});
$$core$$MessageFormat.prototype.resolvedOptions = function () {
// TODO: Provide anything else?
return {
locale: this._locale
};
};
$$core$$MessageFormat.prototype._compilePattern = function (ast, locales, formats, pluralFn) {
var compiler = new $$compiler$$default(locales, formats, pluralFn);
return compiler.compile(ast);
};
$$core$$MessageFormat.prototype._format = function (pattern, values) {
var result = '',
i, len, part, id, value;
for (i = 0, len = pattern.length; i < len; i += 1) {
part = pattern[i];
// Exist early for string parts.
if (typeof part === 'string') {
result += part;
continue;
}
id = part.id;
// Enforce that all required values are provided by the caller.
if (!(values && $$utils$$hop.call(values, id))) {
throw new Error('A value must be provided for: ' + id);
}
value = values[id];
// Recursively format plural and select parts' option — which can be a
// nested pattern structure. The choosing of the option to use is
// abstracted-by and delegated-to the part helper object.
if (part.options) {
result += this._format(part.getOption(value), values);
} else {
result += part.format(value);
}
}
return result;
};
$$core$$MessageFormat.prototype._mergeFormats = function (defaults, formats) {
var mergedFormats = {},
type, mergedType;
for (type in defaults) {
if (!$$utils$$hop.call(defaults, type)) { continue; }
mergedFormats[type] = mergedType = $$es51$$objCreate(defaults[type]);
if (formats && $$utils$$hop.call(formats, type)) {
$$utils$$extend(mergedType, formats[type]);
}
}
return mergedFormats;
};
$$core$$MessageFormat.prototype._resolveLocale = function (locales) {
if (!locales) {
locales = $$core$$MessageFormat.defaultLocale;
}
if (typeof locales === 'string') {
locales = [locales];
}
var localeData = $$core$$MessageFormat.__localeData__;
var i, len, locale;
for (i = 0, len = locales.length; i < len; i += 1) {
// We just need the root part of the langage tag.
locale = locales[i].split('-')[0].toLowerCase();
// Validate that the langage tag is structurally valid.
if (!/[a-z]{2,3}/.test(locale)) {
throw new Error(
'Language tag provided to IntlMessageFormat is not ' +
'structrually valid: ' + locale
);
}
// Return the first locale for which we have CLDR data registered.
if ($$utils$$hop.call(localeData, locale)) {
return locale;
}
}
throw new Error(
'No locale data has been added to IntlMessageFormat for: ' +
locales.join(', ')
);
};
var $$en1$$default = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";}};
$$core$$default.__addLocaleData($$en1$$default);
$$core$$default.defaultLocale = 'en';
var intl$messageformat$$default = $$core$$default;
// Purposely using the same implementation as the Intl.js `Intl` polyfill.
// Copyright 2013 Andy Earnshaw, MIT License
var $$es52$$hop = Object.prototype.hasOwnProperty;
var $$es52$$realDefineProp = (function () {
try { return !!Object.defineProperty({}, 'a', {}); }
catch (e) { return false; }
})();
var $$es52$$es3 = !$$es52$$realDefineProp && !Object.prototype.__defineGetter__;
var $$es52$$defineProperty = $$es52$$realDefineProp ? Object.defineProperty :
function (obj, name, desc) {
if ('get' in desc && obj.__defineGetter__) {
obj.__defineGetter__(name, desc.get);
} else if (!$$es52$$hop.call(obj, name) || 'value' in desc) {
obj[name] = desc.value;
}
};
var $$es52$$objCreate = Object.create || function (proto, props) {
var obj, k;
function F() {}
F.prototype = proto;
obj = new F();
for (k in props) {
if ($$es52$$hop.call(props, k)) {
$$es52$$defineProperty(obj, k, props[k]);
}
}
return obj;
};
var $$es52$$arrIndexOf = Array.prototype.indexOf || function (search, fromIndex) {
/*jshint validthis:true */
var arr = this;
if (!arr.length) {
return -1;
}
for (var i = fromIndex || 0, max = arr.length; i < max; i++) {
if (arr[i] === search) {
return i;
}
}
return -1;
};
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
/* jslint esnext: true */
var $$diff$$round = Math.round;
function $$diff$$daysToYears (days) {
// 400 years have 146097 days (taking into account leap year rules)
return days * 400 / 146097;
}
var $$diff$$default = function (dfrom, dto) {
// Convert to ms timestamps.
dfrom = +dfrom;
dto = +dto;
var millisecond = $$diff$$round(dto - dfrom),
second = $$diff$$round(millisecond / 1000),
minute = $$diff$$round(second / 60),
hour = $$diff$$round(minute / 60),
day = $$diff$$round(hour / 24),
week = $$diff$$round(day / 7);
var rawYears = $$diff$$daysToYears(day),
month = $$diff$$round(rawYears * 12),
year = $$diff$$round(rawYears);
return {
millisecond: millisecond,
second : second,
minute : minute,
hour : hour,
day : day,
week : week,
month : month,
year : year
};
};
var $$core1$$default = $$core1$$RelativeFormat;
// -----------------------------------------------------------------------------
var $$core1$$FIELDS = ['second', 'minute', 'hour', 'day', 'month', 'year'];
var $$core1$$STYLES = ['best fit', 'numeric'];
var $$core1$$getTime = Date.now ? Date.now : function () {
return new Date().getTime();
};
// -- RelativeFormat -----------------------------------------------------------
function $$core1$$RelativeFormat(locales, options) {
options = options || {};
// Make a copy of `locales` if it's an array, so that it doesn't change
// since it's used lazily.
if (Object.prototype.toString.call(locales) === '[object Array]') {
locales = locales.concat();
}
$$es52$$defineProperty(this, '_locale', {value: this._resolveLocale(locales)});
$$es52$$defineProperty(this, '_locales', {value: locales});
$$es52$$defineProperty(this, '_options', {value: {
style: this._resolveStyle(options.style),
units: this._isValidUnits(options.units) && options.units
}});
$$es52$$defineProperty(this, '_messages', {value: $$es52$$objCreate(null)});
// "Bind" `format()` method to `this` so it can be passed by reference like
// the other `Intl` APIs.
var relativeFormat = this;
this.format = function format(date) {
return relativeFormat._format(date);
};
}
// Define internal private properties for dealing with locale data.
$$es52$$defineProperty($$core1$$RelativeFormat, '__localeData__', {value: $$es52$$objCreate(null)});
$$es52$$defineProperty($$core1$$RelativeFormat, '__addLocaleData', {value: function (data) {
if (!(data && data.locale)) {
throw new Error(
'Locale data provided to IntlRelativeFormat is missing a ' +
'`locale` property value'
);
}
if (!data.fields) {
throw new Error(
'Locale data provided to IntlRelativeFormat is missing a ' +
'`fields` property value'
);
}
// Add data to IntlMessageFormat.
intl$messageformat$$default.__addLocaleData(data);
// Relative format locale data only requires the first part of the tag.
var locale = data.locale.toLowerCase().split('-')[0];
$$core1$$RelativeFormat.__localeData__[locale] = data;
}});
// Define public `defaultLocale` property which can be set by the developer, or
// it will be set when the first RelativeFormat instance is created by leveraging
// the resolved locale from `Intl`.
$$es52$$defineProperty($$core1$$RelativeFormat, 'defaultLocale', {
enumerable: true,
writable : true,
value : undefined
});
// Define public `thresholds` property which can be set by the developer, and
// defaults to relative time thresholds from moment.js.
$$es52$$defineProperty($$core1$$RelativeFormat, 'thresholds', {
enumerable: true,
value: {
second: 45, // seconds to minute
minute: 45, // minutes to hour
hour : 22, // hours to day
day : 26, // days to month
month : 11 // months to year
}
});
$$core1$$RelativeFormat.prototype.resolvedOptions = function () {
return {
locale: this._locale,
style : this._options.style,
units : this._options.units
};
};
$$core1$$RelativeFormat.prototype._compileMessage = function (units) {
// `this._locales` is the original set of locales the user specificed to the
// constructor, while `this._locale` is the resolved root locale.
var locales = this._locales;
var resolvedLocale = this._locale;
var localeData = $$core1$$RelativeFormat.__localeData__;
var field = localeData[resolvedLocale].fields[units];
var relativeTime = field.relativeTime;
var future = '';
var past = '';
var i;
for (i in relativeTime.future) {
if (relativeTime.future.hasOwnProperty(i)) {
future += ' ' + i + ' {' +
relativeTime.future[i].replace('{0}', '#') + '}';
}
}
for (i in relativeTime.past) {
if (relativeTime.past.hasOwnProperty(i)) {
past += ' ' + i + ' {' +
relativeTime.past[i].replace('{0}', '#') + '}';
}
}
var message = '{when, select, future {{0, plural, ' + future + '}}' +
'past {{0, plural, ' + past + '}}}';
// Create the synthetic IntlMessageFormat instance using the original
// locales value specified by the user when constructing the the parent
// IntlRelativeFormat instance.
return new intl$messageformat$$default(message, locales);
};
$$core1$$RelativeFormat.prototype._format = function (date) {
var now = $$core1$$getTime();
if (date === undefined) {
date = now;
}
// Determine if the `date` is valid, and throw a similar error to what
// `Intl.DateTimeFormat#format()` would throw.
if (!isFinite(date)) {
throw new RangeError(
'The date value provided to IntlRelativeFormat#format() is not ' +
'in valid range.'
);
}
var diffReport = $$diff$$default(now, date);
var units = this._options.units || this._selectUnits(diffReport);
var diffInUnits = diffReport[units];
if (this._options.style !== 'numeric') {
var relativeUnits = this._resolveRelativeUnits(diffInUnits, units);
if (relativeUnits) {
return relativeUnits;
}
}
return this._resolveMessage(units).format({
'0' : Math.abs(diffInUnits),
when: diffInUnits < 0 ? 'past' : 'future'
});
};
$$core1$$RelativeFormat.prototype._isValidUnits = function (units) {
if (!units || $$es52$$arrIndexOf.call($$core1$$FIELDS, units) >= 0) {
return true;
}
if (typeof units === 'string') {
var suggestion = /s$/.test(units) && units.substr(0, units.length - 1);
if (suggestion && $$es52$$arrIndexOf.call($$core1$$FIELDS, suggestion) >= 0) {
throw new Error(
'"' + units + '" is not a valid IntlRelativeFormat `units` ' +
'value, did you mean: ' + suggestion
);
}
}
throw new Error(
'"' + units + '" is not a valid IntlRelativeFormat `units` value, it ' +
'must be one of: "' + $$core1$$FIELDS.join('", "') + '"'
);
};
$$core1$$RelativeFormat.prototype._resolveLocale = function (locales) {
if (!locales) {
locales = $$core1$$RelativeFormat.defaultLocale;
}
if (typeof locales === 'string') {
locales = [locales];
}
var hop = Object.prototype.hasOwnProperty;
var localeData = $$core1$$RelativeFormat.__localeData__;
var i, len, locale;
for (i = 0, len = locales.length; i < len; i += 1) {
// We just need the root part of the langage tag.
locale = locales[i].split('-')[0].toLowerCase();
// Validate that the langage tag is structurally valid.
if (!/[a-z]{2,3}/.test(locale)) {
throw new Error(
'Language tag provided to IntlRelativeFormat is not ' +
'structrually valid: ' + locale
);
}
// Return the first locale for which we have CLDR data registered.
if (hop.call(localeData, locale)) {
return locale;
}
}
throw new Error(
'No locale data has been added to IntlRelativeFormat for: ' +
locales.join(', ')
);
};
$$core1$$RelativeFormat.prototype._resolveMessage = function (units) {
var messages = this._messages;
// Create a new synthetic message based on the locale data from CLDR.
if (!messages[units]) {
messages[units] = this._compileMessage(units);
}
return messages[units];
};
$$core1$$RelativeFormat.prototype._resolveRelativeUnits = function (diff, units) {
var field = $$core1$$RelativeFormat.__localeData__[this._locale].fields[units];
if (field.relative) {
return field.relative[diff];
}
};
$$core1$$RelativeFormat.prototype._resolveStyle = function (style) {
// Default to "best fit" style.
if (!style) {
return $$core1$$STYLES[0];
}
if ($$es52$$arrIndexOf.call($$core1$$STYLES, style) >= 0) {
return style;
}
throw new Error(
'"' + style + '" is not a valid IntlRelativeFormat `style` value, it ' +
'must be one of: "' + $$core1$$STYLES.join('", "') + '"'
);
};
$$core1$$RelativeFormat.prototype._selectUnits = function (diffReport) {
var i, l, units;
for (i = 0, l = $$core1$$FIELDS.length; i < l; i += 1) {
units = $$core1$$FIELDS[i];
if (Math.abs(diffReport[units]) < $$core1$$RelativeFormat.thresholds[units]) {
break;
}
}
return units;
};
var $$en2$$default = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}}}};
$$core1$$default.__addLocaleData($$en2$$default);
$$core1$$default.defaultLocale = 'en';
var intl$relativeformat$$default = $$core1$$default;
// Purposely using the same implementation as the Intl.js `Intl` polyfill.
// Copyright 2013 Andy Earnshaw, MIT License
var $$es5$$hop = Object.prototype.hasOwnProperty;
var $$es5$$realDefineProp = (function () {
try { return !!Object.defineProperty({}, 'a', {}); }
catch (e) { return false; }
})();
var $$es5$$es3 = !$$es5$$realDefineProp && !Object.prototype.__defineGetter__;
var $$es5$$defineProperty = $$es5$$realDefineProp ? Object.defineProperty :
function (obj, name, desc) {
if ('get' in desc && obj.__defineGetter__) {
obj.__defineGetter__(name, desc.get);
} else if (!$$es5$$hop.call(obj, name) || 'value' in desc) {
obj[name] = desc.value;
}
};
var $$es5$$objCreate = Object.create || function (proto, props) {
var obj, k;
function F() {}
F.prototype = proto;
obj = new F();
for (k in props) {
if ($$es5$$hop.call(props, k)) {
$$es5$$defineProperty(obj, k, props[k]);
}
}
return obj;
};
var intl$format$cache$$default = intl$format$cache$$createFormatCache;
// -----------------------------------------------------------------------------
function intl$format$cache$$createFormatCache(FormatConstructor) {
var cache = $$es5$$objCreate(null);
return function () {
var args = Array.prototype.slice.call(arguments);
var cacheId = intl$format$cache$$getCacheId(args);
var format = cacheId && cache[cacheId];
if (!format) {
format = $$es5$$objCreate(FormatConstructor.prototype);
FormatConstructor.apply(format, args);
if (cacheId) {
cache[cacheId] = format;
}
}
return format;
};
}
// -- Utilities ----------------------------------------------------------------
function intl$format$cache$$getCacheId(inputs) {
// When JSON is not available in the runtime, we will not create a cache id.
if (typeof JSON === 'undefined') { return; }
var cacheId = [];
var i, len, input;
for (i = 0, len = inputs.length; i < len; i += 1) {
input = inputs[i];
if (input && typeof input === 'object') {
cacheId.push(intl$format$cache$$orderedProps(input));
} else {
cacheId.push(input);
}
}
return JSON.stringify(cacheId);
}
function intl$format$cache$$orderedProps(obj) {
var props = [],
keys = [];
var key, i, len, prop;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
keys.push(key);
}
}
var orderedKeys = keys.sort();
for (i = 0, len = orderedKeys.length; i < len; i += 1) {
key = orderedKeys[i];
prop = {};
prop[key] = obj[key];
props[i] = prop;
}
return props;
}
// -----------------------------------------------------------------------------
var $$mixin$$typesSpec = {
locales: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.array
]),
formats : React.PropTypes.object,
messages: React.PropTypes.object
};
function $$mixin$$assertIsDate(date, errMsg) {
// Determine if the `date` is valid by checking if it is finite, which is
// the same way that `Intl.DateTimeFormat#format()` checks.
if (!isFinite(date)) {
throw new TypeError(errMsg);
}
}
function $$mixin$$assertIsNumber(num, errMsg) {
if (typeof num !== 'number') {
throw new TypeError(errMsg);
}
}
var $$mixin$$default = {
propsTypes : $$mixin$$typesSpec,
contextTypes : $$mixin$$typesSpec,
childContextTypes: $$mixin$$typesSpec,
getNumberFormat : intl$format$cache$$default(Intl.NumberFormat),
getDateTimeFormat: intl$format$cache$$default(Intl.DateTimeFormat),
getMessageFormat : intl$format$cache$$default(intl$messageformat$$default),
getRelativeFormat: intl$format$cache$$default(intl$relativeformat$$default),
getChildContext: function () {
var context = this.context;
var props = this.props;
return {
locales: props.locales || context.locales,
formats: props.formats || context.formats,
messages: props.messages || context.messages
};
},
formatDate: function (date, options) {
date = new Date(date);
$$mixin$$assertIsDate(date, 'A date or timestamp must be provided to formatDate()');
return this._format('date', date, options);
},
formatTime: function (date, options) {
date = new Date(date);
$$mixin$$assertIsDate(date, 'A date or timestamp must be provided to formatTime()');
return this._format('time', date, options);
},
formatRelative: function (date, options) {
date = new Date(date);
$$mixin$$assertIsDate(date, 'A date or timestamp must be provided to formatRelative()');
return this._format('relative', date, options);
},
formatNumber: function (num, options) {
$$mixin$$assertIsNumber(num, 'A number must be provided to formatNumber()');
return this._format('number', num, options);
},
formatMessage: function (message, values) {
var locales = this.props.locales || this.context.locales;
var formats = this.props.formats || this.context.formats;
// When `message` is a function, assume it's an IntlMessageFormat
// instance's `format()` method passed by reference, and call it. This
// is possible because its `this` will be pre-bound to the instance.
if (typeof message === 'function') {
return message(values);
}
if (typeof message === 'string') {
message = this.getMessageFormat(message, locales, formats);
}
return message.format(values);
},
getIntlMessage: function (path) {
var messages = this.props.messages || this.context.messages;
var pathParts = path.split('.');
var message;
try {
message = pathParts.reduce(function (obj, pathPart) {
return obj[pathPart];
}, messages);
} finally {
if (message === undefined) {
throw new ReferenceError('Could not find Intl message: ' + path);
}
}
return message;
},
_format: function (type, value, options) {
var locales = this.props.locales || this.context.locales;
var formats = this.props.formats || this.context.formats;
if (options && typeof options === 'string') {
try {
options = formats[type][options];
} catch (e) {
options = undefined;
} finally {
if (options === undefined) {
throw new ReferenceError(
'No ' + type + ' format named: ' + options
);
}
}
}
switch(type) {
case 'date':
case 'time':
return this.getDateTimeFormat(locales, options).format(value);
case 'number':
return this.getNumberFormat(locales, options).format(value);
case 'relative':
return this.getRelativeFormat(locales, options).format(value);
default:
throw new Error('Unrecognized format type: ' + type);
}
},
__addLocaleData: function (data) {
intl$messageformat$$default.__addLocaleData(data);
intl$relativeformat$$default.__addLocaleData(data);
}
};
var $$en$$default = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}}}};
$$mixin$$default.__addLocaleData($$en$$default);
var src$main$$default = $$mixin$$default;
this['ReactIntlMixin'] = src$main$$default;
}).call(this);
//
ReactIntlMixin.__addLocaleData({"locale":"af","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekonde","relative":{"0":"nou"},"relativeTime":{"future":{"one":"Oor {0} sekonde","other":"Oor {0} sekondes"},"past":{"one":"{0} sekonde gelede","other":"{0} sekondes gelede"}}},"minute":{"displayName":"Minuut","relativeTime":{"future":{"one":"Oor {0} minuut","other":"Oor {0} minute"},"past":{"one":"{0} minuut gelede","other":"{0} minute gelede"}}},"hour":{"displayName":"Uur","relativeTime":{"future":{"one":"Oor {0} uur","other":"Oor {0} uur"},"past":{"one":"{0} uur gelede","other":"{0} uur gelede"}}},"day":{"displayName":"Dag","relative":{"0":"vandag","1":"môre","2":"Die dag na môre","-2":"Die dag voor gister","-1":"gister"},"relativeTime":{"future":{"one":"Oor {0} dag","other":"Oor {0} dae"},"past":{"one":"{0} dag gelede","other":"{0} dae gelede"}}},"month":{"displayName":"Maand","relative":{"0":"vandeesmaand","1":"volgende maand","-1":"verlede maand"},"relativeTime":{"future":{"one":"Oor {0} maand","other":"Oor {0} maande"},"past":{"one":"{0} maand gelede","other":"{0} maande gelede"}}},"year":{"displayName":"Jaar","relative":{"0":"hierdie jaar","1":"volgende jaar","-1":"verlede jaar"},"relativeTime":{"future":{"one":"Oor {0} jaar","other":"Oor {0} jaar"},"past":{"one":"{0} jaar gelede","other":"{0} jaar gelede"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ak","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"Sɛkɛnd","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Sema","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Dɔnhwer","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Da","relative":{"0":"Ndɛ","1":"Ɔkyena","-1":"Ndeda"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Bosome","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Afe","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"am","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"ሰከንድ","relative":{"0":"አሁን"},"relativeTime":{"future":{"one":"በ{0} ሰከንድ ውስጥ","other":"በ{0} ሰከንዶች ውስጥ"},"past":{"one":"ከ{0} ሰከንድ በፊት","other":"ከ{0} ሰከንዶች በፊት"}}},"minute":{"displayName":"ደቂቃ","relativeTime":{"future":{"one":"በ{0} ደቂቃ ውስጥ","other":"በ{0} ደቂቃዎች ውስጥ"},"past":{"one":"ከ{0} ደቂቃ በፊት","other":"ከ{0} ደቂቃዎች በፊት"}}},"hour":{"displayName":"ሰዓት","relativeTime":{"future":{"one":"በ{0} ሰዓት ውስጥ","other":"በ{0} ሰዓቶች ውስጥ"},"past":{"one":"ከ{0} ሰዓት በፊት","other":"ከ{0} ሰዓቶች በፊት"}}},"day":{"displayName":"ቀን","relative":{"0":"ዛሬ","1":"ነገ","2":"ከነገ ወዲያ","-2":"ከትናንት ወዲያ","-1":"ትናንት"},"relativeTime":{"future":{"one":"በ{0} ቀን ውስጥ","other":"በ{0} ቀናት ውስጥ"},"past":{"one":"ከ{0} ቀን በፊት","other":"ከ{0} ቀናት በፊት"}}},"month":{"displayName":"ወር","relative":{"0":"በዚህ ወር","1":"የሚቀጥለው ወር","-1":"ያለፈው ወር"},"relativeTime":{"future":{"one":"በ{0} ወር ውስጥ","other":"በ{0} ወራት ውስጥ"},"past":{"one":"ከ{0} ወር በፊት","other":"ከ{0} ወራት በፊት"}}},"year":{"displayName":"ዓመት","relative":{"0":"በዚህ ዓመት","1":"የሚቀጥለው ዓመት","-1":"ያለፈው ዓመት"},"relativeTime":{"future":{"one":"በ{0} ዓመታት ውስጥ","other":"በ{0} ዓመታት ውስጥ"},"past":{"one":"ከ{0} ዓመት በፊት","other":"ከ{0} ዓመታት በፊት"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ar","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===0)return"zero";if(n===1)return"one";if(n===2)return"two";if(n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10)return"few";if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99)return"many";return"other";},"fields":{"second":{"displayName":"الثواني","relative":{"0":"الآن"},"relativeTime":{"future":{"zero":"خلال {0} من الثواني","one":"خلال {0} من الثواني","two":"خلال ثانيتين","few":"خلال {0} ثوانِ","many":"خلال {0} ثانية","other":"خلال {0} من الثواني"},"past":{"zero":"قبل {0} من الثواني","one":"قبل {0} من الثواني","two":"قبل ثانيتين","few":"قبل {0} ثوانِ","many":"قبل {0} ثانية","other":"قبل {0} من الثواني"}}},"minute":{"displayName":"الدقائق","relativeTime":{"future":{"zero":"خلال {0} من الدقائق","one":"خلال {0} من الدقائق","two":"خلال دقيقتين","few":"خلال {0} دقائق","many":"خلال {0} دقيقة","other":"خلال {0} من الدقائق"},"past":{"zero":"قبل {0} من الدقائق","one":"قبل {0} من الدقائق","two":"قبل دقيقتين","few":"قبل {0} دقائق","many":"قبل {0} دقيقة","other":"قبل {0} من الدقائق"}}},"hour":{"displayName":"الساعات","relativeTime":{"future":{"zero":"خلال {0} من الساعات","one":"خلال {0} من الساعات","two":"خلال ساعتين","few":"خلال {0} ساعات","many":"خلال {0} ساعة","other":"خلال {0} من الساعات"},"past":{"zero":"قبل {0} من الساعات","one":"قبل {0} من الساعات","two":"قبل ساعتين","few":"قبل {0} ساعات","many":"قبل {0} ساعة","other":"قبل {0} من الساعات"}}},"day":{"displayName":"يوم","relative":{"0":"اليوم","1":"غدًا","2":"بعد الغد","-2":"أول أمس","-1":"أمس"},"relativeTime":{"future":{"zero":"خلال {0} من الأيام","one":"خلال {0} من الأيام","two":"خلال يومين","few":"خلال {0} أيام","many":"خلال {0} يومًا","other":"خلال {0} من الأيام"},"past":{"zero":"قبل {0} من الأيام","one":"قبل {0} من الأيام","two":"قبل يومين","few":"قبل {0} أيام","many":"قبل {0} يومًا","other":"قبل {0} من الأيام"}}},"month":{"displayName":"الشهر","relative":{"0":"هذا الشهر","1":"الشهر التالي","-1":"الشهر الماضي"},"relativeTime":{"future":{"zero":"خلال {0} من الشهور","one":"خلال {0} من الشهور","two":"خلال شهرين","few":"خلال {0} شهور","many":"خلال {0} شهرًا","other":"خلال {0} من الشهور"},"past":{"zero":"قبل {0} من الشهور","one":"قبل {0} من الشهور","two":"قبل شهرين","few":"قبل {0} أشهر","many":"قبل {0} شهرًا","other":"قبل {0} من الشهور"}}},"year":{"displayName":"السنة","relative":{"0":"هذه السنة","1":"السنة التالية","-1":"السنة الماضية"},"relativeTime":{"future":{"zero":"خلال {0} من السنوات","one":"خلال {0} من السنوات","two":"خلال سنتين","few":"خلال {0} سنوات","many":"خلال {0} سنة","other":"خلال {0} من السنوات"},"past":{"zero":"قبل {0} من السنوات","one":"قبل {0} من السنوات","two":"قبل سنتين","few":"قبل {0} سنوات","many":"قبل {0} سنة","other":"قبل {0} من السنوات"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"as","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"ছেকেণ্ড","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"মিনিট","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ঘণ্টা","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"দিন","relative":{"0":"today","1":"কাইলৈ","2":"পৰহিলৈ","-2":"পৰহি","-1":"কালি"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"মাহ","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"বছৰ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"asa","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Thekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Thaa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Thiku","relative":{"0":"Iyoo","1":"Yavo","-1":"Ighuo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mweji","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ast","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"segundu","relative":{"0":"now"},"relativeTime":{"future":{"one":"En {0} segundu","other":"En {0} segundos"},"past":{"one":"Hai {0} segundu","other":"Hai {0} segundos"}}},"minute":{"displayName":"minutu","relativeTime":{"future":{"one":"En {0} minutu","other":"En {0} minutos"},"past":{"one":"Hai {0} minutu","other":"Hai {0} minutos"}}},"hour":{"displayName":"hora","relativeTime":{"future":{"one":"En {0} hora","other":"En {0} hores"},"past":{"one":"Hai {0} hora","other":"Hai {0} hores"}}},"day":{"displayName":"día","relative":{"0":"güei","1":"mañana","2":"pasao mañana","-3":"antantayeri","-2":"antayeri","-1":"ayeri"},"relativeTime":{"future":{"one":"En {0} dia","other":"En {0} díes"},"past":{"one":"Hai {0} dia","other":"Hai {0} díes"}}},"month":{"displayName":"mes","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"En {0} mes","other":"En {0} meses"},"past":{"one":"Hai {0} mes","other":"Hai {0} meses"}}},"year":{"displayName":"añu","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"En {0} añu","other":"En {0} años"},"past":{"one":"Hai {0} añu","other":"Hai {0} años"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"az","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"saniyə","relative":{"0":"indi"},"relativeTime":{"future":{"one":"{0} saniyə ərzində","other":"{0} saniyə ərzində"},"past":{"one":"{0} saniyə öncə","other":"{0} saniyə öncə"}}},"minute":{"displayName":"dəqiqə","relativeTime":{"future":{"one":"{0} dəqiqə ərzində","other":"{0} dəqiqə ərzində"},"past":{"one":"{0} dəqiqə öncə","other":"{0} dəqiqə öncə"}}},"hour":{"displayName":"saat","relativeTime":{"future":{"one":"{0} saat ərzində","other":"{0} saat ərzində"},"past":{"one":"{0} saat öncə","other":"{0} saat öncə"}}},"day":{"displayName":"bu gün","relative":{"0":"bu gün","1":"sabah","-1":"dünən"},"relativeTime":{"future":{"one":"{0} gün ərində","other":"{0} gün ərində"},"past":{"one":"{0} gün öncə","other":"{0} gün öncə"}}},"month":{"displayName":"ay","relative":{"0":"bu ay","1":"gələn ay","-1":"keçən ay"},"relativeTime":{"future":{"one":"{0} ay ərzində","other":"{0} ay ərzində"},"past":{"one":"{0} ay öncə","other":"{0} ay öncə"}}},"year":{"displayName":"il","relative":{"0":"bu il","1":"gələn il","-1":"keçən il"},"relativeTime":{"future":{"one":"{0} il ərzində","other":"{0} il ərzində"},"past":{"one":"{0} il öncə","other":"{0} il öncə"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"be","pluralRuleFunction":function (n) {n=Math.floor(n);if(n%10===1&&(n%100!==11))return"one";if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14))return"few";if(n%10===0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14)return"many";return"other";},"fields":{"second":{"displayName":"секунда","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"хвіліна","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"гадзіна","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"дзень","relative":{"0":"сёння","1":"заўтра","2":"паслязаўтра","-2":"пазаўчора","-1":"учора"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"месяц","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"год","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bem","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekondi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Mineti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Insa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ubushiku","relative":{"0":"Lelo","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Umweshi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Umwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bez","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Sihu","relative":{"0":"Neng'u ni","1":"Hilawu","-1":"Igolo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mwedzi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mwaha","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bg","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"секунда","relative":{"0":"сега"},"relativeTime":{"future":{"one":"след {0} секунда","other":"след {0} секунди"},"past":{"one":"преди {0} секунда","other":"преди {0} секунди"}}},"minute":{"displayName":"минута","relativeTime":{"future":{"one":"след {0} минута","other":"след {0} минути"},"past":{"one":"преди {0} минута","other":"преди {0} минути"}}},"hour":{"displayName":"час","relativeTime":{"future":{"one":"след {0} час","other":"след {0} часа"},"past":{"one":"преди {0} час","other":"преди {0} часа"}}},"day":{"displayName":"ден","relative":{"0":"днес","1":"утре","2":"вдругиден","-2":"онзи ден","-1":"вчера"},"relativeTime":{"future":{"one":"след {0} дни","other":"след {0} дни"},"past":{"one":"преди {0} ден","other":"преди {0} дни"}}},"month":{"displayName":"месец","relative":{"0":"този месец","1":"следващият месец","-1":"миналият месец"},"relativeTime":{"future":{"one":"след {0} месец","other":"след {0} месеца"},"past":{"one":"преди {0} месец","other":"преди {0} месеца"}}},"year":{"displayName":"година","relative":{"0":"тази година","1":"следващата година","-1":"миналата година"},"relativeTime":{"future":{"one":"след {0} година","other":"след {0} години"},"past":{"one":"преди {0} година","other":"преди {0} години"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bm","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"sekondi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"miniti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"lɛrɛ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"don","relative":{"0":"bi","1":"sini","-1":"kunu"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"kalo","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"san","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bn","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"সেকেন্ড","relative":{"0":"এখন"},"relativeTime":{"future":{"one":"{0} সেকেন্ডে","other":"{0} সেকেন্ডে"},"past":{"one":"{0} সেকেন্ড পূর্বে","other":"{0} সেকেন্ড পূর্বে"}}},"minute":{"displayName":"মিনিট","relativeTime":{"future":{"one":"{0} মিনিটে","other":"{0} মিনিটে"},"past":{"one":"{0} মিনিট পূর্বে","other":"{0} মিনিট পূর্বে"}}},"hour":{"displayName":"ঘন্টা","relativeTime":{"future":{"one":"{0} ঘন্টায়","other":"{0} ঘন্টায়"},"past":{"one":"{0} ঘন্টা আগে","other":"{0} ঘন্টা আগে"}}},"day":{"displayName":"দিন","relative":{"0":"আজ","1":"আগামীকাল","2":"আগামী পরশু","-2":"গত পরশু","-1":"গতকাল"},"relativeTime":{"future":{"one":"{0} দিনের মধ্যে","other":"{0} দিনের মধ্যে"},"past":{"one":"{0} দিন পূর্বে","other":"{0} দিন পূর্বে"}}},"month":{"displayName":"মাস","relative":{"0":"এই মাস","1":"পরের মাস","-1":"গত মাস"},"relativeTime":{"future":{"one":"{0} মাসে","other":"{0} মাসে"},"past":{"one":"{0} মাস পূর্বে","other":"{0} মাস পূর্বে"}}},"year":{"displayName":"বছর","relative":{"0":"এই বছর","1":"পরের বছর","-1":"গত বছর"},"relativeTime":{"future":{"one":"{0} বছরে","other":"{0} বছরে"},"past":{"one":"{0} বছর পূর্বে","other":"{0} বছর পূর্বে"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bo","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"སྐར་ཆ།","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"སྐར་མ།","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ཆུ་ཙོ་","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"ཉིན།","relative":{"0":"དེ་རིང་","1":"སང་ཉིན་","2":"གནངས་ཉིན་ཀ་","-2":"ཁས་ཉིན་ཀ་","-1":"ཁས་ས་"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"ཟླ་བ་","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ལོ།","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"br","pluralRuleFunction":function (n) {n=Math.floor(n);if(n%10===1&&!(n%100===11||n%100===71||n%100===91))return"one";if(n%10===2&&!(n%100===12||n%100===72||n%100===92))return"two";if(n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10===9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99))return"few";if((n!==0)&&n%1e6===0)return"many";return"other";},"fields":{"second":{"displayName":"eilenn","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"munut","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"eur","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"hiziv","1":"warcʼhoazh","-2":"dercʼhent-decʼh","-1":"decʼh"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"miz","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"brx","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"सेखेन्द","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"मिनिथ","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"रिंगा","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"सान","relative":{"0":"दिनै","1":"गाबोन","-1":"मैया"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"दान","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"बोसोर","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"bs","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(v===0&&i%10===1&&((i%100!==11)||f%10===1&&(f%100!==11)))return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&(!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14)))return"few";return"other";},"fields":{"second":{"displayName":"sekund","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"minut","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"čas","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"dan","relative":{"0":"danas","1":"sutra","2":"prekosutra","-2":"prekjuče","-1":"juče"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"mesec","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"godina","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ca","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"segon","relative":{"0":"ara"},"relativeTime":{"future":{"one":"D'aquí a {0} segon","other":"D'aquí a {0} segons"},"past":{"one":"Fa {0} segon","other":"Fa {0} segons"}}},"minute":{"displayName":"minut","relativeTime":{"future":{"one":"D'aquí a {0} minut","other":"D'aquí a {0} minuts"},"past":{"one":"Fa {0} minut","other":"Fa {0} minuts"}}},"hour":{"displayName":"hora","relativeTime":{"future":{"one":"D'aquí a {0} hora","other":"D'aquí a {0} hores"},"past":{"one":"Fa {0} hora","other":"Fa {0} hores"}}},"day":{"displayName":"dia","relative":{"0":"avui","1":"demà","2":"demà passat","-2":"abans-d'ahir","-1":"ahir"},"relativeTime":{"future":{"one":"D'aquí a {0} dia","other":"D'aquí a {0} dies"},"past":{"one":"Fa {0} dia","other":"Fa {0} dies"}}},"month":{"displayName":"mes","relative":{"0":"aquest mes","1":"el mes que ve","-1":"el mes passat"},"relativeTime":{"future":{"one":"D'aquí a {0} mes","other":"D'aquí a {0} mesos"},"past":{"one":"Fa {0} mes","other":"Fa {0} mesos"}}},"year":{"displayName":"any","relative":{"0":"enguany","1":"l'any que ve","-1":"l'any passat"},"relativeTime":{"future":{"one":"D'aquí a {0} any","other":"D'aquí a {0} anys"},"past":{"one":"Fa {0} any","other":"Fa {0} anys"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"cgg","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Obucweka\u002FEsekendi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Edakiika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Shaaha","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Eizooba","relative":{"0":"Erizooba","1":"Nyenkyakare","-1":"Nyomwabazyo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Omwezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Omwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"chr","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"ᎠᏎᏢ","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"ᎢᏯᏔᏬᏍᏔᏅ","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ᏑᏣᎶᏓ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"ᏏᎦ","relative":{"0":"ᎪᎯ ᎢᎦ","1":"ᏌᎾᎴᎢ","-1":"ᏒᎯ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"ᏏᏅᏓ","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ᏑᏕᏘᏴᏓ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"cs","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";if(i===Math.floor(i)&&i>=2&&i<=4&&v===0)return"few";if((v!==0))return"many";return"other";},"fields":{"second":{"displayName":"Sekunda","relative":{"0":"nyní"},"relativeTime":{"future":{"one":"za {0} sekundu","few":"za {0} sekundy","many":"za {0} sekundy","other":"za {0} sekund"},"past":{"one":"před {0} sekundou","few":"před {0} sekundami","many":"před {0} sekundou","other":"před {0} sekundami"}}},"minute":{"displayName":"Minuta","relativeTime":{"future":{"one":"za {0} minutu","few":"za {0} minuty","many":"za {0} minuty","other":"za {0} minut"},"past":{"one":"před {0} minutou","few":"před {0} minutami","many":"před {0} minutou","other":"před {0} minutami"}}},"hour":{"displayName":"Hodina","relativeTime":{"future":{"one":"za {0} hodinu","few":"za {0} hodiny","many":"za {0} hodiny","other":"za {0} hodin"},"past":{"one":"před {0} hodinou","few":"před {0} hodinami","many":"před {0} hodinou","other":"před {0} hodinami"}}},"day":{"displayName":"Den","relative":{"0":"dnes","1":"zítra","2":"pozítří","-2":"předevčírem","-1":"včera"},"relativeTime":{"future":{"one":"za {0} den","few":"za {0} dny","many":"za {0} dne","other":"za {0} dní"},"past":{"one":"před {0} dnem","few":"před {0} dny","many":"před {0} dnem","other":"před {0} dny"}}},"month":{"displayName":"Měsíc","relative":{"0":"tento měsíc","1":"příští měsíc","-1":"minulý měsíc"},"relativeTime":{"future":{"one":"za {0} měsíc","few":"za {0} měsíce","many":"za {0} měsíce","other":"za {0} měsíců"},"past":{"one":"před {0} měsícem","few":"před {0} měsíci","many":"před {0} měsícem","other":"před {0} měsíci"}}},"year":{"displayName":"Rok","relative":{"0":"tento rok","1":"příští rok","-1":"minulý rok"},"relativeTime":{"future":{"one":"za {0} rok","few":"za {0} roky","many":"za {0} roku","other":"za {0} let"},"past":{"one":"před {0} rokem","few":"před {0} lety","many":"před {0} rokem","other":"před {0} lety"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"cy","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===0)return"zero";if(n===1)return"one";if(n===2)return"two";if(n===3)return"few";if(n===6)return"many";return"other";},"fields":{"second":{"displayName":"Eiliad","relative":{"0":"nawr"},"relativeTime":{"future":{"zero":"Ymhen {0} eiliad","one":"Ymhen eiliad","two":"Ymhen {0} eiliad","few":"Ymhen {0} eiliad","many":"Ymhen {0} eiliad","other":"Ymhen {0} eiliad"},"past":{"zero":"{0} eiliad yn ôl","one":"eiliad yn ôl","two":"{0} eiliad yn ôl","few":"{0} eiliad yn ôl","many":"{0} eiliad yn ôl","other":"{0} eiliad yn ôl"}}},"minute":{"displayName":"Munud","relativeTime":{"future":{"zero":"Ymhen {0} munud","one":"Ymhen munud","two":"Ymhen {0} funud","few":"Ymhen {0} munud","many":"Ymhen {0} munud","other":"Ymhen {0} munud"},"past":{"zero":"{0} munud yn ôl","one":"{0} munud yn ôl","two":"{0} funud yn ôl","few":"{0} munud yn ôl","many":"{0} munud yn ôl","other":"{0} munud yn ôl"}}},"hour":{"displayName":"Awr","relativeTime":{"future":{"zero":"Ymhen {0} awr","one":"Ymhen {0} awr","two":"Ymhen {0} awr","few":"Ymhen {0} awr","many":"Ymhen {0} awr","other":"Ymhen {0} awr"},"past":{"zero":"{0} awr yn ôl","one":"awr yn ôl","two":"{0} awr yn ôl","few":"{0} awr yn ôl","many":"{0} awr yn ôl","other":"{0} awr yn ôl"}}},"day":{"displayName":"Dydd","relative":{"0":"heddiw","1":"yfory","2":"drennydd","-2":"echdoe","-1":"ddoe"},"relativeTime":{"future":{"zero":"Ymhen {0} diwrnod","one":"Ymhen diwrnod","two":"Ymhen deuddydd","few":"Ymhen tridiau","many":"Ymhen {0} diwrnod","other":"Ymhen {0} diwrnod"},"past":{"zero":"{0} diwrnod yn ôl","one":"{0} diwrnod yn ôl","two":"{0} ddiwrnod yn ôl","few":"{0} diwrnod yn ôl","many":"{0} diwrnod yn ôl","other":"{0} diwrnod yn ôl"}}},"month":{"displayName":"Mis","relative":{"0":"y mis hwn","1":"mis nesaf","-1":"mis diwethaf"},"relativeTime":{"future":{"zero":"Ymhen {0} mis","one":"Ymhen mis","two":"Ymhen deufis","few":"Ymhen {0} mis","many":"Ymhen {0} mis","other":"Ymhen {0} mis"},"past":{"zero":"{0} mis yn ôl","one":"{0} mis yn ôl","two":"{0} fis yn ôl","few":"{0} mis yn ôl","many":"{0} mis yn ôl","other":"{0} mis yn ôl"}}},"year":{"displayName":"Blwyddyn","relative":{"0":"eleni","1":"blwyddyn nesaf","-1":"llynedd"},"relativeTime":{"future":{"zero":"Ymhen {0} mlynedd","one":"Ymhen blwyddyn","two":"Ymhen {0} flynedd","few":"Ymhen {0} blynedd","many":"Ymhen {0} blynedd","other":"Ymhen {0} mlynedd"},"past":{"zero":"{0} o flynyddoedd yn ôl","one":"blwyddyn yn ôl","two":"{0} flynedd yn ôl","few":"{0} blynedd yn ôl","many":"{0} blynedd yn ôl","other":"{0} o flynyddoedd yn ôl"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"da","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10);n=Math.floor(n);if(n===1||(t!==0)&&(i===0||i===1))return"one";return"other";},"fields":{"second":{"displayName":"Sekund","relative":{"0":"nu"},"relativeTime":{"future":{"one":"om {0} sekund","other":"om {0} sekunder"},"past":{"one":"for {0} sekund siden","other":"for {0} sekunder siden"}}},"minute":{"displayName":"Minut","relativeTime":{"future":{"one":"om {0} minut","other":"om {0} minutter"},"past":{"one":"for {0} minut siden","other":"for {0} minutter siden"}}},"hour":{"displayName":"Time","relativeTime":{"future":{"one":"om {0} time","other":"om {0} timer"},"past":{"one":"for {0} time siden","other":"for {0} timer siden"}}},"day":{"displayName":"Dag","relative":{"0":"i dag","1":"i morgen","2":"i overmorgen","-2":"i forgårs","-1":"i går"},"relativeTime":{"future":{"one":"om {0} døgn","other":"om {0} døgn"},"past":{"one":"for {0} døgn siden","other":"for {0} døgn siden"}}},"month":{"displayName":"Måned","relative":{"0":"denne måned","1":"næste måned","-1":"sidste måned"},"relativeTime":{"future":{"one":"om {0} måned","other":"om {0} måneder"},"past":{"one":"for {0} måned siden","other":"for {0} måneder siden"}}},"year":{"displayName":"År","relative":{"0":"i år","1":"næste år","-1":"sidste år"},"relativeTime":{"future":{"one":"om {0} år","other":"om {0} år"},"past":{"one":"for {0} år siden","other":"for {0} år siden"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"de","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"jetzt"},"relativeTime":{"future":{"one":"In {0} Sekunde","other":"In {0} Sekunden"},"past":{"one":"Vor {0} Sekunde","other":"Vor {0} Sekunden"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"In {0} Minute","other":"In {0} Minuten"},"past":{"one":"Vor {0} Minute","other":"Vor {0} Minuten"}}},"hour":{"displayName":"Stunde","relativeTime":{"future":{"one":"In {0} Stunde","other":"In {0} Stunden"},"past":{"one":"Vor {0} Stunde","other":"Vor {0} Stunden"}}},"day":{"displayName":"Tag","relative":{"0":"Heute","1":"Morgen","2":"Übermorgen","-2":"Vorgestern","-1":"Gestern"},"relativeTime":{"future":{"one":"In {0} Tag","other":"In {0} Tagen"},"past":{"one":"Vor {0} Tag","other":"Vor {0} Tagen"}}},"month":{"displayName":"Monat","relative":{"0":"Dieser Monat","1":"Nächster Monat","-1":"Letzter Monat"},"relativeTime":{"future":{"one":"In {0} Monat","other":"In {0} Monaten"},"past":{"one":"Vor {0} Monat","other":"Vor {0} Monaten"}}},"year":{"displayName":"Jahr","relative":{"0":"Dieses Jahr","1":"Nächstes Jahr","-1":"Letztes Jahr"},"relativeTime":{"future":{"one":"In {0} Jahr","other":"In {0} Jahren"},"past":{"one":"Vor {0} Jahr","other":"Vor {0} Jahren"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"dz","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"སྐར་ཆཱ་","relative":{"0":"now"},"relativeTime":{"future":{"other":"སྐར་ཆ་ {0} ནང་"},"past":{"other":"སྐར་ཆ་ {0} ཧེ་མ་"}}},"minute":{"displayName":"སྐར་མ","relativeTime":{"future":{"other":"སྐར་མ་ {0} ནང་"},"past":{"other":"སྐར་མ་ {0} ཧེ་མ་"}}},"hour":{"displayName":"ཆུ་ཚོད","relativeTime":{"future":{"other":"ཆུ་ཚོད་ {0} ནང་"},"past":{"other":"ཆུ་ཚོད་ {0} ཧེ་མ་"}}},"day":{"displayName":"ཚེས་","relative":{"0":"ད་རིས་","1":"ནངས་པ་","2":"གནངས་ཚེ","-2":"ཁ་ཉིམ","-1":"ཁ་ཙ་"},"relativeTime":{"future":{"other":"ཉིནམ་ {0} ནང་"},"past":{"other":"ཉིནམ་ {0} ཧེ་མ་"}}},"month":{"displayName":"ཟླ་ཝ་","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"ཟླཝ་ {0} ནང་"},"past":{"other":"ཟླཝ་ {0} ཧེ་མ་"}}},"year":{"displayName":"ལོ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"ལོ་འཁོར་ {0} ནང་"},"past":{"other":"ལོ་འཁོར་ {0} ཧེ་མ་"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ee","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekend","relative":{"0":"fifi"},"relativeTime":{"future":{"one":"le sekend {0} me","other":"le sekend {0} wo me"},"past":{"one":"sekend {0} si va yi","other":"sekend {0} si wo va yi"}}},"minute":{"displayName":"aɖabaƒoƒo","relativeTime":{"future":{"one":"le aɖabaƒoƒo {0} me","other":"le aɖabaƒoƒo {0} wo me"},"past":{"one":"aɖabaƒoƒo {0} si va yi","other":"aɖabaƒoƒo {0} si wo va yi"}}},"hour":{"displayName":"gaƒoƒo","relativeTime":{"future":{"one":"le gaƒoƒo {0} me","other":"le gaƒoƒo {0} wo me"},"past":{"one":"gaƒoƒo {0} si va yi","other":"gaƒoƒo {0} si wo va yi"}}},"day":{"displayName":"ŋkeke","relative":{"0":"egbe","1":"etsɔ si gbɔna","2":"nyitsɔ si gbɔna","-2":"nyitsɔ si va yi","-1":"etsɔ si va yi"},"relativeTime":{"future":{"one":"le ŋkeke {0} me","other":"le ŋkeke {0} wo me"},"past":{"one":"ŋkeke {0} si va yi","other":"ŋkeke {0} si wo va yi"}}},"month":{"displayName":"ɣleti","relative":{"0":"ɣleti sia","1":"ɣleti si gbɔ na","-1":"ɣleti si va yi"},"relativeTime":{"future":{"one":"le ɣleti {0} me","other":"le ɣleti {0} wo me"},"past":{"one":"ɣleti {0} si va yi","other":"ɣleti {0} si wo va yi"}}},"year":{"displayName":"ƒe","relative":{"0":"ƒe sia","1":"ƒe si gbɔ na","-1":"ƒe si va yi"},"relativeTime":{"future":{"one":"le ƒe {0} me","other":"le ƒe {0} wo me"},"past":{"one":"ƒe {0} si va yi","other":"ƒe {0} si wo va yi"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"el","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Δευτερόλεπτο","relative":{"0":"τώρα"},"relativeTime":{"future":{"one":"Σε {0} δευτερόλεπτο","other":"Σε {0} δευτερόλεπτα"},"past":{"one":"Πριν από {0} δευτερόλεπτο","other":"Πριν από {0} δευτερόλεπτα"}}},"minute":{"displayName":"Λεπτό","relativeTime":{"future":{"one":"Σε {0} λεπτό","other":"Σε {0} λεπτά"},"past":{"one":"Πριν από {0} λεπτό","other":"Πριν από {0} λεπτά"}}},"hour":{"displayName":"Ώρα","relativeTime":{"future":{"one":"Σε {0} ώρα","other":"Σε {0} ώρες"},"past":{"one":"Πριν από {0} ώρα","other":"Πριν από {0} ώρες"}}},"day":{"displayName":"Ημέρα","relative":{"0":"σήμερα","1":"αύριο","2":"μεθαύριο","-2":"προχθές","-1":"χθες"},"relativeTime":{"future":{"one":"Σε {0} ημέρα","other":"Σε {0} ημέρες"},"past":{"one":"Πριν από {0} ημέρα","other":"Πριν από {0} ημέρες"}}},"month":{"displayName":"Μήνας","relative":{"0":"τρέχων μήνας","1":"επόμενος μήνας","-1":"προηγούμενος μήνας"},"relativeTime":{"future":{"one":"Σε {0} μήνα","other":"Σε {0} μήνες"},"past":{"one":"Πριν από {0} μήνα","other":"Πριν από {0} μήνες"}}},"year":{"displayName":"Έτος","relative":{"0":"φέτος","1":"επόμενο έτος","-1":"προηγούμενο έτος"},"relativeTime":{"future":{"one":"Σε {0} έτος","other":"Σε {0} έτη"},"past":{"one":"Πριν από {0} έτος","other":"Πριν από {0} έτη"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"eo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"es","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"segundo","relative":{"0":"ahora"},"relativeTime":{"future":{"one":"dentro de {0} segundo","other":"dentro de {0} segundos"},"past":{"one":"hace {0} segundo","other":"hace {0} segundos"}}},"minute":{"displayName":"minuto","relativeTime":{"future":{"one":"dentro de {0} minuto","other":"dentro de {0} minutos"},"past":{"one":"hace {0} minuto","other":"hace {0} minutos"}}},"hour":{"displayName":"hora","relativeTime":{"future":{"one":"dentro de {0} hora","other":"dentro de {0} horas"},"past":{"one":"hace {0} hora","other":"hace {0} horas"}}},"day":{"displayName":"día","relative":{"0":"hoy","1":"mañana","2":"pasado mañana","-2":"antes de ayer","-1":"ayer"},"relativeTime":{"future":{"one":"dentro de {0} día","other":"dentro de {0} días"},"past":{"one":"hace {0} día","other":"hace {0} días"}}},"month":{"displayName":"mes","relative":{"0":"este mes","1":"el próximo mes","-1":"el mes pasado"},"relativeTime":{"future":{"one":"dentro de {0} mes","other":"dentro de {0} meses"},"past":{"one":"hace {0} mes","other":"hace {0} meses"}}},"year":{"displayName":"año","relative":{"0":"este año","1":"el próximo año","-1":"el año pasado"},"relativeTime":{"future":{"one":"dentro de {0} año","other":"dentro de {0} años"},"past":{"one":"hace {0} año","other":"hace {0} años"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"et","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"sekund","relative":{"0":"nüüd"},"relativeTime":{"future":{"one":"{0} sekundi pärast","other":"{0} sekundi pärast"},"past":{"one":"{0} sekundi eest","other":"{0} sekundi eest"}}},"minute":{"displayName":"minut","relativeTime":{"future":{"one":"{0} minuti pärast","other":"{0} minuti pärast"},"past":{"one":"{0} minuti eest","other":"{0} minuti eest"}}},"hour":{"displayName":"tund","relativeTime":{"future":{"one":"{0} tunni pärast","other":"{0} tunni pärast"},"past":{"one":"{0} tunni eest","other":"{0} tunni eest"}}},"day":{"displayName":"päev","relative":{"0":"täna","1":"homme","2":"ülehomme","-2":"üleeile","-1":"eile"},"relativeTime":{"future":{"one":"{0} päeva pärast","other":"{0} päeva pärast"},"past":{"one":"{0} päeva eest","other":"{0} päeva eest"}}},"month":{"displayName":"kuu","relative":{"0":"käesolev kuu","1":"järgmine kuu","-1":"eelmine kuu"},"relativeTime":{"future":{"one":"{0} kuu pärast","other":"{0} kuu pärast"},"past":{"one":"{0} kuu eest","other":"{0} kuu eest"}}},"year":{"displayName":"aasta","relative":{"0":"käesolev aasta","1":"järgmine aasta","-1":"eelmine aasta"},"relativeTime":{"future":{"one":"{0} aasta pärast","other":"{0} aasta pärast"},"past":{"one":"{0} aasta eest","other":"{0} aasta eest"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"eu","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Segundoa","relative":{"0":"orain"},"relativeTime":{"future":{"one":"{0} segundo barru","other":"{0} segundo barru"},"past":{"one":"Duela {0} segundo","other":"Duela {0} segundo"}}},"minute":{"displayName":"Minutua","relativeTime":{"future":{"one":"{0} minutu barru","other":"{0} minutu barru"},"past":{"one":"Duela {0} minutu","other":"Duela {0} minutu"}}},"hour":{"displayName":"Ordua","relativeTime":{"future":{"one":"{0} ordu barru","other":"{0} ordu barru"},"past":{"one":"Duela {0} ordu","other":"Duela {0} ordu"}}},"day":{"displayName":"Eguna","relative":{"0":"gaur","1":"bihar","2":"etzi","-2":"herenegun","-1":"atzo"},"relativeTime":{"future":{"one":"{0} egun barru","other":"{0} egun barru"},"past":{"one":"Duela {0} egun","other":"Duela {0} egun"}}},"month":{"displayName":"Hilabetea","relative":{"0":"hilabete hau","1":"hurrengo hilabetea","-1":"aurreko hilabetea"},"relativeTime":{"future":{"one":"{0} hilabete barru","other":"{0} hilabete barru"},"past":{"one":"Duela {0} hilabete","other":"Duela {0} hilabete"}}},"year":{"displayName":"Urtea","relative":{"0":"aurten","1":"hurrengo urtea","-1":"aurreko urtea"},"relativeTime":{"future":{"one":"{0} urte barru","other":"{0} urte barru"},"past":{"one":"Duela {0} urte","other":"Duela {0} urte"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fa","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"ثانیه","relative":{"0":"اکنون"},"relativeTime":{"future":{"one":"{0} ثانیه بعد","other":"{0} ثانیه بعد"},"past":{"one":"{0} ثانیه پیش","other":"{0} ثانیه پیش"}}},"minute":{"displayName":"دقیقه","relativeTime":{"future":{"one":"{0} دقیقه بعد","other":"{0} دقیقه بعد"},"past":{"one":"{0} دقیقه پیش","other":"{0} دقیقه پیش"}}},"hour":{"displayName":"ساعت","relativeTime":{"future":{"one":"{0} ساعت بعد","other":"{0} ساعت بعد"},"past":{"one":"{0} ساعت پیش","other":"{0} ساعت پیش"}}},"day":{"displayName":"روز","relative":{"0":"امروز","1":"فردا","2":"پسفردا","-2":"پریروز","-1":"دیروز"},"relativeTime":{"future":{"one":"{0} روز بعد","other":"{0} روز بعد"},"past":{"one":"{0} روز پیش","other":"{0} روز پیش"}}},"month":{"displayName":"ماه","relative":{"0":"این ماه","1":"ماه آینده","-1":"ماه گذشته"},"relativeTime":{"future":{"one":"{0} ماه بعد","other":"{0} ماه بعد"},"past":{"one":"{0} ماه پیش","other":"{0} ماه پیش"}}},"year":{"displayName":"سال","relative":{"0":"امسال","1":"سال آینده","-1":"سال گذشته"},"relativeTime":{"future":{"one":"{0} سال بعد","other":"{0} سال بعد"},"past":{"one":"{0} سال پیش","other":"{0} سال پیش"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ff","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||i===1)return"one";return"other";},"fields":{"second":{"displayName":"Majaango","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Hoƴom","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Waktu","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ñalnde","relative":{"0":"Hannde","1":"Jaŋngo","-1":"Haŋki"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Lewru","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Hitaande","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fi","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"sekunti","relative":{"0":"nyt"},"relativeTime":{"future":{"one":"{0} sekunnin päästä","other":"{0} sekunnin päästä"},"past":{"one":"{0} sekunti sitten","other":"{0} sekuntia sitten"}}},"minute":{"displayName":"minuutti","relativeTime":{"future":{"one":"{0} minuutin päästä","other":"{0} minuutin päästä"},"past":{"one":"{0} minuutti sitten","other":"{0} minuuttia sitten"}}},"hour":{"displayName":"tunti","relativeTime":{"future":{"one":"{0} tunnin päästä","other":"{0} tunnin päästä"},"past":{"one":"{0} tunti sitten","other":"{0} tuntia sitten"}}},"day":{"displayName":"päivä","relative":{"0":"tänään","1":"huomenna","2":"ylihuomenna","-2":"toissapäivänä","-1":"eilen"},"relativeTime":{"future":{"one":"{0} päivän päästä","other":"{0} päivän päästä"},"past":{"one":"{0} päivä sitten","other":"{0} päivää sitten"}}},"month":{"displayName":"kuukausi","relative":{"0":"tässä kuussa","1":"ensi kuussa","-1":"viime kuussa"},"relativeTime":{"future":{"one":"{0} kuukauden päästä","other":"{0} kuukauden päästä"},"past":{"one":"{0} kuukausi sitten","other":"{0} kuukautta sitten"}}},"year":{"displayName":"vuosi","relative":{"0":"tänä vuonna","1":"ensi vuonna","-1":"viime vuonna"},"relativeTime":{"future":{"one":"{0} vuoden päästä","other":"{0} vuoden päästä"},"past":{"one":"{0} vuosi sitten","other":"{0} vuotta sitten"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fil","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(v===0&&(i===1||i===2||i===3||v===0&&(!(i%10===4||i%10===6||i%10===9)||(v!==0)&&!(f%10===4||f%10===6||f%10===9))))return"one";return"other";},"fields":{"second":{"displayName":"Segundo","relative":{"0":"ngayon"},"relativeTime":{"future":{"one":"Sa loob ng {0} segundo","other":"Sa loob ng {0} segundo"},"past":{"one":"{0} segundo ang nakalipas","other":"{0} segundo ang nakalipas"}}},"minute":{"displayName":"Minuto","relativeTime":{"future":{"one":"Sa loob ng {0} minuto","other":"Sa loob ng {0} minuto"},"past":{"one":"{0} minuto ang nakalipas","other":"{0} minuto ang nakalipas"}}},"hour":{"displayName":"Oras","relativeTime":{"future":{"one":"Sa loob ng {0} oras","other":"Sa loob ng {0} oras"},"past":{"one":"{0} oras ang nakalipas","other":"{0} oras ang nakalipas"}}},"day":{"displayName":"Araw","relative":{"0":"Ngayon","1":"Bukas","2":"Samakalawa","-2":"Araw bago ang kahapon","-1":"Kahapon"},"relativeTime":{"future":{"one":"Sa loob ng {0} araw","other":"Sa loob ng {0} araw"},"past":{"one":"{0} araw ang nakalipas","other":"{0} araw ang nakalipas"}}},"month":{"displayName":"Buwan","relative":{"0":"ngayong buwan","1":"susunod na buwan","-1":"nakaraang buwan"},"relativeTime":{"future":{"one":"Sa loob ng {0} buwan","other":"Sa loob ng {0} buwan"},"past":{"one":"{0} buwan ang nakalipas","other":"{0} buwan ang nakalipas"}}},"year":{"displayName":"Taon","relative":{"0":"ngayong taon","1":"susunod na taon","-1":"nakaraang taon"},"relativeTime":{"future":{"one":"Sa loob ng {0} taon","other":"Sa loob ng {0} taon"},"past":{"one":"{0} taon ang nakalipas","other":"{0} taon ang nakalipas"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekund","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"mínúta","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"klukkustund","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"dagur","relative":{"0":"í dag","1":"á morgunn","2":"á yfirmorgunn","-2":"í fyrradag","-1":"í gær"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"mánuður","relative":{"0":"henda mánuður","1":"næstu mánuður","-1":"síðstu mánuður"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ár","relative":{"0":"hetta ár","1":"næstu ár","-1":"síðstu ár"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fr","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||i===1)return"one";return"other";},"fields":{"second":{"displayName":"seconde","relative":{"0":"maintenant"},"relativeTime":{"future":{"one":"dans {0} seconde","other":"dans {0} secondes"},"past":{"one":"il y a {0} seconde","other":"il y a {0} secondes"}}},"minute":{"displayName":"minute","relativeTime":{"future":{"one":"dans {0} minute","other":"dans {0} minutes"},"past":{"one":"il y a {0} minute","other":"il y a {0} minutes"}}},"hour":{"displayName":"heure","relativeTime":{"future":{"one":"dans {0} heure","other":"dans {0} heures"},"past":{"one":"il y a {0} heure","other":"il y a {0} heures"}}},"day":{"displayName":"jour","relative":{"0":"aujourd’hui","1":"demain","2":"après-demain","-2":"avant-hier","-1":"hier"},"relativeTime":{"future":{"one":"dans {0} jour","other":"dans {0} jours"},"past":{"one":"il y a {0} jour","other":"il y a {0} jours"}}},"month":{"displayName":"mois","relative":{"0":"ce mois-ci","1":"le mois prochain","-1":"le mois dernier"},"relativeTime":{"future":{"one":"dans {0} mois","other":"dans {0} mois"},"past":{"one":"il y a {0} mois","other":"il y a {0} mois"}}},"year":{"displayName":"année","relative":{"0":"cette année","1":"l’année prochaine","-1":"l’année dernière"},"relativeTime":{"future":{"one":"dans {0} an","other":"dans {0} ans"},"past":{"one":"il y a {0} an","other":"il y a {0} ans"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fur","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"secont","relative":{"0":"now"},"relativeTime":{"future":{"one":"ca di {0} secont","other":"ca di {0} seconts"},"past":{"one":"{0} secont indaûr","other":"{0} seconts indaûr"}}},"minute":{"displayName":"minût","relativeTime":{"future":{"one":"ca di {0} minût","other":"ca di {0} minûts"},"past":{"one":"{0} minût indaûr","other":"{0} minûts indaûr"}}},"hour":{"displayName":"ore","relativeTime":{"future":{"one":"ca di {0} ore","other":"ca di {0} oris"},"past":{"one":"{0} ore indaûr","other":"{0} oris indaûr"}}},"day":{"displayName":"dì","relative":{"0":"vuê","1":"doman","2":"passantdoman","-2":"îr l'altri","-1":"îr"},"relativeTime":{"future":{"one":"ca di {0} zornade","other":"ca di {0} zornadis"},"past":{"one":"{0} zornade indaûr","other":"{0} zornadis indaûr"}}},"month":{"displayName":"mês","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"ca di {0} mês","other":"ca di {0} mês"},"past":{"one":"{0} mês indaûr","other":"{0} mês indaûr"}}},"year":{"displayName":"an","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"ca di {0} an","other":"ca di {0} agns"},"past":{"one":"{0} an indaûr","other":"{0} agns indaûr"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"fy","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Sekonde","relative":{"0":"nu"},"relativeTime":{"future":{"one":"Oer {0} sekonde","other":"Oer {0} sekonden"},"past":{"one":"{0} sekonde lyn","other":"{0} sekonden lyn"}}},"minute":{"displayName":"Minút","relativeTime":{"future":{"one":"Oer {0} minút","other":"Oer {0} minuten"},"past":{"one":"{0} minút lyn","other":"{0} minuten lyn"}}},"hour":{"displayName":"oere","relativeTime":{"future":{"one":"Oer {0} oere","other":"Oer {0} oere"},"past":{"one":"{0} oere lyn","other":"{0} oere lyn"}}},"day":{"displayName":"dei","relative":{"0":"vandaag","1":"morgen","2":"Oermorgen","-2":"eergisteren","-1":"gisteren"},"relativeTime":{"future":{"one":"Oer {0} dei","other":"Oer {0} deien"},"past":{"one":"{0} dei lyn","other":"{0} deien lyn"}}},"month":{"displayName":"Moanne","relative":{"0":"dizze moanne","1":"folgjende moanne","-1":"foarige moanne"},"relativeTime":{"future":{"one":"Oer {0} moanne","other":"Oer {0} moannen"},"past":{"one":"{0} moanne lyn","other":"{0} moannen lyn"}}},"year":{"displayName":"Jier","relative":{"0":"dit jier","1":"folgjend jier","-1":"foarich jier"},"relativeTime":{"future":{"one":"Oer {0} jier","other":"Oer {0} jier"},"past":{"one":"{0} jier lyn","other":"{0} jier lyn"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ga","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";if(n===2)return"two";if(n===Math.floor(n)&&n>=3&&n<=6)return"few";if(n===Math.floor(n)&&n>=7&&n<=10)return"many";return"other";},"fields":{"second":{"displayName":"Soicind","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Nóiméad","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Uair","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Lá","relative":{"0":"Inniu","1":"Amárach","2":"Arú amárach","-2":"Arú inné","-1":"Inné"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mí","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Bliain","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"gd","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1||n===11)return"one";if(n===2||n===12)return"two";if(n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19))return"few";return"other";},"fields":{"second":{"displayName":"Diog","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Mionaid","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Uair a thìde","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Latha","relative":{"0":"An-diugh","1":"A-màireach","2":"An-earar","-2":"A-bhòin-dè","-1":"An-dè"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mìos","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Bliadhna","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"gl","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Segundo","relative":{"0":"agora"},"relativeTime":{"future":{"one":"En {0} segundo","other":"En {0} segundos"},"past":{"one":"Hai {0} segundo","other":"Hai {0} segundos"}}},"minute":{"displayName":"Minuto","relativeTime":{"future":{"one":"En {0} minuto","other":"En {0} minutos"},"past":{"one":"Hai {0} minuto","other":"Hai {0} minutos"}}},"hour":{"displayName":"Hora","relativeTime":{"future":{"one":"En {0} hora","other":"En {0} horas"},"past":{"one":"Hai {0} hora","other":"Hai {0} horas"}}},"day":{"displayName":"Día","relative":{"0":"hoxe","1":"mañá","2":"pasadomañá","-2":"antonte","-1":"onte"},"relativeTime":{"future":{"one":"En {0} día","other":"En {0} días"},"past":{"one":"Hai {0} día","other":"Hai {0} días"}}},"month":{"displayName":"Mes","relative":{"0":"este mes","1":"mes seguinte","-1":"mes pasado"},"relativeTime":{"future":{"one":"En {0} mes","other":"En {0} meses"},"past":{"one":"Hai {0} mes","other":"Hai {0} meses"}}},"year":{"displayName":"Ano","relative":{"0":"este ano","1":"seguinte ano","-1":"ano pasado"},"relativeTime":{"future":{"one":"En {0} ano","other":"En {0} anos"},"past":{"one":"Hai {0} ano","other":"Hai {0} anos"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"gsw","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minuute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Schtund","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Tag","relative":{"0":"hüt","1":"moorn","2":"übermoorn","-2":"vorgeschter","-1":"geschter"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Monet","relative":{"0":"diese Monet","1":"nächste Monet","-1":"letzte Monet"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Jaar","relative":{"0":"diese Jaar","1":"nächste Jaar","-1":"letzte Jaar"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"gu","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"સેકન્ડ","relative":{"0":"હમણાં"},"relativeTime":{"future":{"one":"{0} સેકંડમાં","other":"{0} સેકંડમાં"},"past":{"one":"{0} સેકંડ પહેલા","other":"{0} સેકંડ પહેલા"}}},"minute":{"displayName":"મિનિટ","relativeTime":{"future":{"one":"{0} મિનિટમાં","other":"{0} મિનિટમાં"},"past":{"one":"{0} મિનિટ પહેલા","other":"{0} મિનિટ પહેલા"}}},"hour":{"displayName":"કલાક","relativeTime":{"future":{"one":"{0} કલાકમાં","other":"{0} કલાકમાં"},"past":{"one":"{0} કલાક પહેલા","other":"{0} કલાક પહેલા"}}},"day":{"displayName":"દિવસ","relative":{"0":"આજે","1":"આવતીકાલે","2":"પરમદિવસે","-2":"ગયા પરમદિવસે","-1":"ગઈકાલે"},"relativeTime":{"future":{"one":"{0} દિવસમાં","other":"{0} દિવસમાં"},"past":{"one":"{0} દિવસ પહેલા","other":"{0} દિવસ પહેલા"}}},"month":{"displayName":"મહિનો","relative":{"0":"આ મહિને","1":"આવતા મહિને","-1":"ગયા મહિને"},"relativeTime":{"future":{"one":"{0} મહિનામાં","other":"{0} મહિનામાં"},"past":{"one":"{0} મહિના પહેલા","other":"{0} મહિના પહેલા"}}},"year":{"displayName":"વર્ષ","relative":{"0":"આ વર્ષે","1":"આવતા વર્ષે","-1":"ગયા વર્ષે"},"relativeTime":{"future":{"one":"{0} વર્ષમાં","other":"{0} વર્ષમાં"},"past":{"one":"{0} વર્ષ પહેલા","other":"{0} વર્ષ પહેલા"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"gv","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(v===0&&i%10===1)return"one";if(v===0&&i%10===2)return"two";if(v===0&&(i%100===0||i%100===20||i%100===40||i%100===60||i%100===80))return"few";if((v!==0))return"many";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ha","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Daƙiƙa","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Awa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Kwana","relative":{"0":"Yau","1":"Gobe","-1":"Jiya"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Wata","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Shekara","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"haw","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"he","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";if(i===2&&v===0)return"two";if(v===0&&!(n>=0&&n<=10)&&n%10===0)return"many";return"other";},"fields":{"second":{"displayName":"שנייה","relative":{"0":"עכשיו"},"relativeTime":{"future":{"one":"בעוד שנייה {0}","two":"בעוד {0} שניות","many":"בעוד {0} שניות","other":"בעוד {0} שניות"},"past":{"one":"לפני שנייה {0}","two":"לפני {0} שניות","many":"לפני {0} שניות","other":"לפני {0} שניות"}}},"minute":{"displayName":"דקה","relativeTime":{"future":{"one":"בעוד דקה {0}","two":"בעוד {0} דקות","many":"בעוד {0} דקות","other":"בעוד {0} דקות"},"past":{"one":"לפני דקה {0}","two":"לפני {0} דקות","many":"לפני {0} דקות","other":"לפני {0} דקות"}}},"hour":{"displayName":"שעה","relativeTime":{"future":{"one":"בעוד שעה {0}","two":"בעוד {0} שעות","many":"בעוד {0} שעות","other":"בעוד {0} שעות"},"past":{"one":"לפני שעה {0}","two":"לפני {0} שעות","many":"לפני {0} שעות","other":"לפני {0} שעות"}}},"day":{"displayName":"יום","relative":{"0":"היום","1":"מחר","2":"מחרתיים","-2":"שלשום","-1":"אתמול"},"relativeTime":{"future":{"one":"בעוד יום {0}","two":"בעוד {0} ימים","many":"בעוד {0} ימים","other":"בעוד {0} ימים"},"past":{"one":"לפני יום {0}","two":"לפני {0} ימים","many":"לפני {0} ימים","other":"לפני {0} ימים"}}},"month":{"displayName":"חודש","relative":{"0":"החודש","1":"החודש הבא","-1":"החודש שעבר"},"relativeTime":{"future":{"one":"בעוד חודש {0}","two":"בעוד {0} חודשים","many":"בעוד {0} חודשים","other":"בעוד {0} חודשים"},"past":{"one":"לפני חודש {0}","two":"לפני {0} חודשים","many":"לפני {0} חודשים","other":"לפני {0} חודשים"}}},"year":{"displayName":"שנה","relative":{"0":"השנה","1":"השנה הבאה","-1":"השנה שעברה"},"relativeTime":{"future":{"one":"בעוד שנה {0}","two":"בעוד {0} שנים","many":"בעוד {0} שנים","other":"בעוד {0} שנים"},"past":{"one":"לפני שנה {0}","two":"לפני {0} שנים","many":"לפני {0} שנים","other":"לפני {0} שנים"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"hi","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"सेकंड","relative":{"0":"अब"},"relativeTime":{"future":{"one":"{0} सेकंड में","other":"{0} सेकंड में"},"past":{"one":"{0} सेकंड पहले","other":"{0} सेकंड पहले"}}},"minute":{"displayName":"मिनट","relativeTime":{"future":{"one":"{0} मिनट में","other":"{0} मिनट में"},"past":{"one":"{0} मिनट पहले","other":"{0} मिनट पहले"}}},"hour":{"displayName":"घंटा","relativeTime":{"future":{"one":"{0} घंटे में","other":"{0} घंटे में"},"past":{"one":"{0} घंटे पहले","other":"{0} घंटे पहले"}}},"day":{"displayName":"दिन","relative":{"0":"आज","1":"आने वाला कल","2":"परसों","-2":"बीता परसों","-1":"बीता कल"},"relativeTime":{"future":{"one":"{0} दिन में","other":"{0} दिन में"},"past":{"one":"{0} दिन पहले","other":"{0} दिन पहले"}}},"month":{"displayName":"माह","relative":{"0":"यह माह","1":"अगला माह","-1":"पिछला माह"},"relativeTime":{"future":{"one":"{0} माह में","other":"{0} माह में"},"past":{"one":"{0} माह पहले","other":"{0} माह पहले"}}},"year":{"displayName":"वर्ष","relative":{"0":"यह वर्ष","1":"अगला वर्ष","-1":"पिछला वर्ष"},"relativeTime":{"future":{"one":"{0} वर्ष में","other":"{0} वर्ष में"},"past":{"one":"{0} वर्ष पहले","other":"{0} वर्ष पहले"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"hr","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(v===0&&i%10===1&&((i%100!==11)||f%10===1&&(f%100!==11)))return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&(!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14)))return"few";return"other";},"fields":{"second":{"displayName":"Sekunda","relative":{"0":"sada"},"relativeTime":{"future":{"one":"za {0} sekundu","few":"za {0} sekunde","other":"za {0} sekundi"},"past":{"one":"prije {0} sekundu","few":"prije {0} sekunde","other":"prije {0} sekundi"}}},"minute":{"displayName":"Minuta","relativeTime":{"future":{"one":"za {0} minutu","few":"za {0} minute","other":"za {0} minuta"},"past":{"one":"prije {0} minutu","few":"prije {0} minute","other":"prije {0} minuta"}}},"hour":{"displayName":"Sat","relativeTime":{"future":{"one":"za {0} sat","few":"za {0} sata","other":"za {0} sati"},"past":{"one":"prije {0} sat","few":"prije {0} sata","other":"prije {0} sati"}}},"day":{"displayName":"Dan","relative":{"0":"danas","1":"sutra","2":"prekosutra","-2":"prekjučer","-1":"jučer"},"relativeTime":{"future":{"one":"za {0} dan","few":"za {0} dana","other":"za {0} dana"},"past":{"one":"prije {0} dan","few":"prije {0} dana","other":"prije {0} dana"}}},"month":{"displayName":"Mjesec","relative":{"0":"ovaj mjesec","1":"sljedeći mjesec","-1":"prošli mjesec"},"relativeTime":{"future":{"one":"za {0} mjesec","few":"za {0} mjeseca","other":"za {0} mjeseci"},"past":{"one":"prije {0} mjesec","few":"prije {0} mjeseca","other":"prije {0} mjeseci"}}},"year":{"displayName":"Godina","relative":{"0":"ove godine","1":"sljedeće godine","-1":"prošle godine"},"relativeTime":{"future":{"one":"za {0} godinu","few":"za {0} godine","other":"za {0} godina"},"past":{"one":"prije {0} godinu","few":"prije {0} godine","other":"prije {0} godina"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"hu","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"másodperc","relative":{"0":"most"},"relativeTime":{"future":{"one":"{0} másodperc múlva","other":"{0} másodperc múlva"},"past":{"one":"{0} másodperccel ezelőtt","other":"{0} másodperccel ezelőtt"}}},"minute":{"displayName":"perc","relativeTime":{"future":{"one":"{0} perc múlva","other":"{0} perc múlva"},"past":{"one":"{0} perccel ezelőtt","other":"{0} perccel ezelőtt"}}},"hour":{"displayName":"óra","relativeTime":{"future":{"one":"{0} óra múlva","other":"{0} óra múlva"},"past":{"one":"{0} órával ezelőtt","other":"{0} órával ezelőtt"}}},"day":{"displayName":"nap","relative":{"0":"ma","1":"holnap","2":"holnapután","-2":"tegnapelőtt","-1":"tegnap"},"relativeTime":{"future":{"one":"{0} nap múlva","other":"{0} nap múlva"},"past":{"one":"{0} nappal ezelőtt","other":"{0} nappal ezelőtt"}}},"month":{"displayName":"hónap","relative":{"0":"ez a hónap","1":"következő hónap","-1":"előző hónap"},"relativeTime":{"future":{"one":"{0} hónap múlva","other":"{0} hónap múlva"},"past":{"one":"{0} hónappal ezelőtt","other":"{0} hónappal ezelőtt"}}},"year":{"displayName":"év","relative":{"0":"ez az év","1":"következő év","-1":"előző év"},"relativeTime":{"future":{"one":"{0} év múlva","other":"{0} év múlva"},"past":{"one":"{0} évvel ezelőtt","other":"{0} évvel ezelőtt"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"hy","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||i===1)return"one";return"other";},"fields":{"second":{"displayName":"Վայրկյան","relative":{"0":"այժմ"},"relativeTime":{"future":{"one":"{0} վայրկյան անց","other":"{0} վայրկյան անց"},"past":{"one":"{0} վայրկյան առաջ","other":"{0} վայրկյան առաջ"}}},"minute":{"displayName":"Րոպե","relativeTime":{"future":{"one":"{0} րոպե անց","other":"{0} րոպե անց"},"past":{"one":"{0} րոպե առաջ","other":"{0} րոպե առաջ"}}},"hour":{"displayName":"Ժամ","relativeTime":{"future":{"one":"{0} ժամ անց","other":"{0} ժամ անց"},"past":{"one":"{0} ժամ առաջ","other":"{0} ժամ առաջ"}}},"day":{"displayName":"Օր","relative":{"0":"այսօր","1":"վաղը","2":"վաղը չէ մյուս օրը","-2":"երեկ չէ առաջի օրը","-1":"երեկ"},"relativeTime":{"future":{"one":"{0} օր անց","other":"{0} օր անց"},"past":{"one":"{0} օր առաջ","other":"{0} օր առաջ"}}},"month":{"displayName":"Ամիս","relative":{"0":"այս ամիս","1":"հաջորդ ամիս","-1":"անցյալ ամիս"},"relativeTime":{"future":{"one":"{0} ամիս անց","other":"{0} ամիս անց"},"past":{"one":"{0} ամիս առաջ","other":"{0} ամիս առաջ"}}},"year":{"displayName":"Տարի","relative":{"0":"այս տարի","1":"հաջորդ տարի","-1":"անցյալ տարի"},"relativeTime":{"future":{"one":"{0} տարի անց","other":"{0} տարի անց"},"past":{"one":"{0} տարի առաջ","other":"{0} տարի առաջ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"id","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Detik","relative":{"0":"sekarang"},"relativeTime":{"future":{"other":"Dalam {0} detik"},"past":{"other":"{0} detik yang lalu"}}},"minute":{"displayName":"Menit","relativeTime":{"future":{"other":"Dalam {0} menit"},"past":{"other":"{0} menit yang lalu"}}},"hour":{"displayName":"Jam","relativeTime":{"future":{"other":"Dalam {0} jam"},"past":{"other":"{0} jam yang lalu"}}},"day":{"displayName":"Hari","relative":{"0":"hari ini","1":"besok","2":"lusa","-2":"kemarin lusa","-1":"kemarin"},"relativeTime":{"future":{"other":"Dalam {0} hari"},"past":{"other":"{0} hari yang lalu"}}},"month":{"displayName":"Bulan","relative":{"0":"bulan ini","1":"Bulan berikutnya","-1":"bulan lalu"},"relativeTime":{"future":{"other":"Dalam {0} bulan"},"past":{"other":"{0} bulan yang lalu"}}},"year":{"displayName":"Tahun","relative":{"0":"tahun ini","1":"tahun depan","-1":"tahun lalu"},"relativeTime":{"future":{"other":"Dalam {0} tahun"},"past":{"other":"{0} tahun yang lalu"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ig","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Nkejinta","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Nkeji","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Elekere","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ụbọchị","relative":{"0":"Taata","1":"Echi","-1":"Nnyaafụ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Ọnwa","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Afọ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ii","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"ꇙ","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"ꃏ","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ꄮꈉ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"ꑍ","relative":{"0":"ꀃꑍ","1":"ꃆꏂꑍ","2":"ꌕꀿꑍ","-2":"ꎴꂿꋍꑍ","-1":"ꀋꅔꉈ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"ꆪ","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ꈎ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"is","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10);n=Math.floor(n);if(t===0&&i%10===1&&((i%100!==11)||(t!==0)))return"one";return"other";},"fields":{"second":{"displayName":"sekúnda","relative":{"0":"núna"},"relativeTime":{"future":{"one":"eftir {0} sekúndu","other":"eftir {0} sekúndur"},"past":{"one":"fyrir {0} sekúndu","other":"fyrir {0} sekúndum"}}},"minute":{"displayName":"mínúta","relativeTime":{"future":{"one":"eftir {0} mínútu","other":"eftir {0} mínútur"},"past":{"one":"fyrir {0} mínútu","other":"fyrir {0} mínútum"}}},"hour":{"displayName":"klukkustund","relativeTime":{"future":{"one":"eftir {0} klukkustund","other":"eftir {0} klukkustundir"},"past":{"one":"fyrir {0} klukkustund","other":"fyrir {0} klukkustundum"}}},"day":{"displayName":"dagur","relative":{"0":"í dag","1":"á morgun","2":"eftir tvo daga","-2":"í fyrradag","-1":"í gær"},"relativeTime":{"future":{"one":"eftir {0} dag","other":"eftir {0} daga"},"past":{"one":"fyrir {0} degi","other":"fyrir {0} dögum"}}},"month":{"displayName":"mánuður","relative":{"0":"í þessum mánuði","1":"í næsta mánuði","-1":"í síðasta mánuði"},"relativeTime":{"future":{"one":"eftir {0} mánuð","other":"eftir {0} mánuði"},"past":{"one":"fyrir {0} mánuði","other":"fyrir {0} mánuðum"}}},"year":{"displayName":"ár","relative":{"0":"á þessu ári","1":"á næsta ári","-1":"á síðasta ári"},"relativeTime":{"future":{"one":"eftir {0} ár","other":"eftir {0} ár"},"past":{"one":"fyrir {0} ári","other":"fyrir {0} árum"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"it","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"secondo","relative":{"0":"ora"},"relativeTime":{"future":{"one":"tra {0} secondo","other":"tra {0} secondi"},"past":{"one":"{0} secondo fa","other":"{0} secondi fa"}}},"minute":{"displayName":"minuto","relativeTime":{"future":{"one":"tra {0} minuto","other":"tra {0} minuti"},"past":{"one":"{0} minuto fa","other":"{0} minuti fa"}}},"hour":{"displayName":"ora","relativeTime":{"future":{"one":"tra {0} ora","other":"tra {0} ore"},"past":{"one":"{0} ora fa","other":"{0} ore fa"}}},"day":{"displayName":"giorno","relative":{"0":"oggi","1":"domani","2":"dopodomani","-2":"l'altro ieri","-1":"ieri"},"relativeTime":{"future":{"one":"tra {0} giorno","other":"tra {0} giorni"},"past":{"one":"{0} giorno fa","other":"{0} giorni fa"}}},"month":{"displayName":"mese","relative":{"0":"questo mese","1":"mese prossimo","-1":"mese scorso"},"relativeTime":{"future":{"one":"tra {0} mese","other":"tra {0} mesi"},"past":{"one":"{0} mese fa","other":"{0} mesi fa"}}},"year":{"displayName":"anno","relative":{"0":"quest'anno","1":"anno prossimo","-1":"anno scorso"},"relativeTime":{"future":{"one":"tra {0} anno","other":"tra {0} anni"},"past":{"one":"{0} anno fa","other":"{0} anni fa"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ja","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"秒","relative":{"0":"今すぐ"},"relativeTime":{"future":{"other":"{0} 秒後"},"past":{"other":"{0} 秒前"}}},"minute":{"displayName":"分","relativeTime":{"future":{"other":"{0} 分後"},"past":{"other":"{0} 分前"}}},"hour":{"displayName":"時","relativeTime":{"future":{"other":"{0} 時間後"},"past":{"other":"{0} 時間前"}}},"day":{"displayName":"日","relative":{"0":"今日","1":"明日","2":"明後日","-2":"一昨日","-1":"昨日"},"relativeTime":{"future":{"other":"{0} 日後"},"past":{"other":"{0} 日前"}}},"month":{"displayName":"月","relative":{"0":"今月","1":"翌月","-1":"先月"},"relativeTime":{"future":{"other":"{0} か月後"},"past":{"other":"{0} か月前"}}},"year":{"displayName":"年","relative":{"0":"今年","1":"翌年","-1":"昨年"},"relativeTime":{"future":{"other":"{0} 年後"},"past":{"other":"{0} 年前"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"jgo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"nǔu {0} minút","other":"nǔu {0} minút"},"past":{"one":"ɛ́ gɛ́ mɔ́ minút {0}","other":"ɛ́ gɛ́ mɔ́ minút {0}"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"nǔu háwa {0}","other":"nǔu háwa {0}"},"past":{"one":"ɛ́ gɛ mɔ́ {0} háwa","other":"ɛ́ gɛ mɔ́ {0} háwa"}}},"day":{"displayName":"Day","relative":{"0":"lɔꞋɔ","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"Nǔu lɛ́Ꞌ {0}","other":"Nǔu lɛ́Ꞌ {0}"},"past":{"one":"Ɛ́ gɛ́ mɔ́ lɛ́Ꞌ {0}","other":"Ɛ́ gɛ́ mɔ́ lɛ́Ꞌ {0}"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"Nǔu {0} saŋ","other":"Nǔu {0} saŋ"},"past":{"one":"ɛ́ gɛ́ mɔ́ pɛsaŋ {0}","other":"ɛ́ gɛ́ mɔ́ pɛsaŋ {0}"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"Nǔu ŋguꞋ {0}","other":"Nǔu ŋguꞋ {0}"},"past":{"one":"Ɛ́gɛ́ mɔ́ ŋguꞋ {0}","other":"Ɛ́gɛ́ mɔ́ ŋguꞋ {0}"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"jmc","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakyika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mfiri","relative":{"0":"Inu","1":"Ngama","-1":"Ukou"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mori","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Maka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ka","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"წამი","relative":{"0":"ახლა"},"relativeTime":{"future":{"one":"{0} წამში","other":"{0} წამში"},"past":{"one":"{0} წამის წინ","other":"{0} წამის წინ"}}},"minute":{"displayName":"წუთი","relativeTime":{"future":{"one":"{0} წუთში","other":"{0} წუთში"},"past":{"one":"{0} წუთის წინ","other":"{0} წუთის წინ"}}},"hour":{"displayName":"საათი","relativeTime":{"future":{"one":"{0} საათში","other":"{0} საათში"},"past":{"one":"{0} საათის წინ","other":"{0} საათის წინ"}}},"day":{"displayName":"დღე","relative":{"0":"დღეს","1":"ხვალ","2":"ზეგ","-2":"გუშინწინ","-1":"გუშინ"},"relativeTime":{"future":{"one":"{0} დღეში","other":"{0} დღეში"},"past":{"one":"{0} დღის წინ","other":"{0} დღის წინ"}}},"month":{"displayName":"თვე","relative":{"0":"ამ თვეში","1":"მომავალ თვეს","-1":"გასულ თვეს"},"relativeTime":{"future":{"one":"{0} თვეში","other":"{0} თვეში"},"past":{"one":"{0} თვის წინ","other":"{0} თვის წინ"}}},"year":{"displayName":"წელი","relative":{"0":"ამ წელს","1":"მომავალ წელს","-1":"გასულ წელს"},"relativeTime":{"future":{"one":"{0} წელიწადში","other":"{0} წელიწადში"},"past":{"one":"{0} წლის წინ","other":"{0} წლის წინ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kab","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||i===1)return"one";return"other";},"fields":{"second":{"displayName":"Tasint","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Tamrect","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Tamert","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ass","relative":{"0":"Ass-a","1":"Azekka","-1":"Iḍelli"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Aggur","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Aseggas","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kde","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Lihiku","relative":{"0":"Nelo","1":"Nundu","-1":"Lido"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mwedi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kea","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Sigundu","relative":{"0":"now"},"relativeTime":{"future":{"other":"di li {0} sigundu"},"past":{"other":"a ten {0} sigundu"}}},"minute":{"displayName":"Minutu","relativeTime":{"future":{"other":"di li {0} minutu"},"past":{"other":"a ten {0} minutu"}}},"hour":{"displayName":"Ora","relativeTime":{"future":{"other":"di li {0} ora"},"past":{"other":"a ten {0} ora"}}},"day":{"displayName":"Dia","relative":{"0":"Oji","1":"Manha","-1":"Onti"},"relativeTime":{"future":{"other":"di li {0} dia"},"past":{"other":"a ten {0} dia"}}},"month":{"displayName":"Mes","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"di li {0} mes"},"past":{"other":"a ten {0} mes"}}},"year":{"displayName":"Anu","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"di li {0} anu"},"past":{"other":"a ten {0} anu"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kk","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"секунд","relative":{"0":"қазір"},"relativeTime":{"future":{"one":"{0} секундтан кейін","other":"{0} секундтан кейін"},"past":{"one":"{0} секунд бұрын","other":"{0} секунд бұрын"}}},"minute":{"displayName":"минут","relativeTime":{"future":{"one":"{0} минуттан кейін","other":"{0} минуттан кейін"},"past":{"one":"{0} минут бұрын","other":"{0} минут бұрын"}}},"hour":{"displayName":"сағат","relativeTime":{"future":{"one":"{0} сағаттан кейін","other":"{0} сағаттан кейін"},"past":{"one":"{0} сағат бұрын","other":"{0} сағат бұрын"}}},"day":{"displayName":"күн","relative":{"0":"бүгін","1":"ертең","2":"арғы күні","-2":"алдыңғы күні","-1":"кеше"},"relativeTime":{"future":{"one":"{0} күннен кейін","other":"{0} күннен кейін"},"past":{"one":"{0} күн бұрын","other":"{0} күн бұрын"}}},"month":{"displayName":"ай","relative":{"0":"осы ай","1":"келесі ай","-1":"өткен ай"},"relativeTime":{"future":{"one":"{0} айдан кейін","other":"{0} айдан кейін"},"past":{"one":"{0} ай бұрын","other":"{0} ай бұрын"}}},"year":{"displayName":"жыл","relative":{"0":"биылғы жыл","1":"келесі жыл","-1":"былтырғы жыл"},"relativeTime":{"future":{"one":"{0} жылдан кейін","other":"{0} жылдан кейін"},"past":{"one":"{0} жыл бұрын","other":"{0} жыл бұрын"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kkj","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"muka","1":"nɛmɛnɔ","-1":"kwey"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kl","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekundi","relative":{"0":"now"},"relativeTime":{"future":{"one":"om {0} sekundi","other":"om {0} sekundi"},"past":{"one":"for {0} sekundi siden","other":"for {0} sekundi siden"}}},"minute":{"displayName":"minutsi","relativeTime":{"future":{"one":"om {0} minutsi","other":"om {0} minutsi"},"past":{"one":"for {0} minutsi siden","other":"for {0} minutsi siden"}}},"hour":{"displayName":"nalunaaquttap-akunnera","relativeTime":{"future":{"one":"om {0} nalunaaquttap-akunnera","other":"om {0} nalunaaquttap-akunnera"},"past":{"one":"for {0} nalunaaquttap-akunnera siden","other":"for {0} nalunaaquttap-akunnera siden"}}},"day":{"displayName":"ulloq","relative":{"0":"ullumi","1":"aqagu","2":"aqaguagu","-2":"ippassaani","-1":"ippassaq"},"relativeTime":{"future":{"one":"om {0} ulloq unnuarlu","other":"om {0} ulloq unnuarlu"},"past":{"one":"for {0} ulloq unnuarlu siden","other":"for {0} ulloq unnuarlu siden"}}},"month":{"displayName":"qaammat","relative":{"0":"manna qaammat","1":"tulleq qaammat","-1":"kingulleq qaammat"},"relativeTime":{"future":{"one":"om {0} qaammat","other":"om {0} qaammat"},"past":{"one":"for {0} qaammat siden","other":"for {0} qaammat siden"}}},"year":{"displayName":"ukioq","relative":{"0":"manna ukioq","1":"tulleq ukioq","-1":"kingulleq ukioq"},"relativeTime":{"future":{"one":"om {0} ukioq","other":"om {0} ukioq"},"past":{"one":"for {0} ukioq siden","other":"for {0} ukioq siden"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"km","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"វិនាទី","relative":{"0":"ឥឡូវ"},"relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} វិនាទី"},"past":{"other":"{0} វិនាទីមុន"}}},"minute":{"displayName":"នាទី","relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} នាទី"},"past":{"other":"{0} នាទីមុន"}}},"hour":{"displayName":"ម៉ោង","relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} ម៉ោង"},"past":{"other":"{0} ម៉ោងមុន"}}},"day":{"displayName":"ថ្ងៃ","relative":{"0":"ថ្ងៃនេះ","1":"ថ្ងៃស្អែក","2":"ខានស្អែក","-2":"ម្សិលម៉្ងៃ","-1":"ម្សិលមិញ"},"relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} ថ្ងៃ"},"past":{"other":"{0} ថ្ងៃមុន"}}},"month":{"displayName":"ខែ","relative":{"0":"ខែនេះ","1":"ខែក្រោយ","-1":"ខែមុន"},"relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} ខែ"},"past":{"other":"{0} ខែមុន"}}},"year":{"displayName":"ឆ្នាំ","relative":{"0":"ឆ្នាំនេះ","1":"ឆ្នាំក្រោយ","-1":"ឆ្នាំមុន"},"relativeTime":{"future":{"other":"ក្នុងរយៈពេល {0} ឆ្នាំ"},"past":{"other":"{0} ឆ្នាំមុន"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kn","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"ಸೆಕೆಂಡ್","relative":{"0":"ಇದೀಗ"},"relativeTime":{"future":{"one":"{0} ಸೆಕೆಂಡ್ಗಳಲ್ಲಿ","other":"{0} ಸೆಕೆಂಡ್ಗಳಲ್ಲಿ"},"past":{"one":"{0} ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ","other":"{0} ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ"}}},"minute":{"displayName":"ನಿಮಿಷ","relativeTime":{"future":{"one":"{0} ನಿಮಿಷಗಳಲ್ಲಿ","other":"{0} ನಿಮಿಷಗಳಲ್ಲಿ"},"past":{"one":"{0} ನಿಮಿಷಗಳ ಹಿಂದೆ","other":"{0} ನಿಮಿಷಗಳ ಹಿಂದೆ"}}},"hour":{"displayName":"ಗಂಟೆ","relativeTime":{"future":{"one":"{0} ಗಂಟೆಗಳಲ್ಲಿ","other":"{0} ಗಂಟೆಗಳಲ್ಲಿ"},"past":{"one":"{0} ಗಂಟೆಗಳ ಹಿಂದೆ","other":"{0} ಗಂಟೆಗಳ ಹಿಂದೆ"}}},"day":{"displayName":"ದಿನ","relative":{"0":"ಇಂದು","1":"ನಾಳೆ","2":"ನಾಡಿದ್ದು","-2":"ಮೊನ್ನೆ","-1":"ನಿನ್ನೆ"},"relativeTime":{"future":{"one":"{0} ದಿನಗಳಲ್ಲಿ","other":"{0} ದಿನಗಳಲ್ಲಿ"},"past":{"one":"{0} ದಿನಗಳ ಹಿಂದೆ","other":"{0} ದಿನಗಳ ಹಿಂದೆ"}}},"month":{"displayName":"ತಿಂಗಳು","relative":{"0":"ಈ ತಿಂಗಳು","1":"ಮುಂದಿನ ತಿಂಗಳು","-1":"ಕಳೆದ ತಿಂಗಳು"},"relativeTime":{"future":{"one":"{0} ತಿಂಗಳುಗಳಲ್ಲಿ","other":"{0} ತಿಂಗಳುಗಳಲ್ಲಿ"},"past":{"one":"{0} ತಿಂಗಳುಗಳ ಹಿಂದೆ","other":"{0} ತಿಂಗಳುಗಳ ಹಿಂದೆ"}}},"year":{"displayName":"ವರ್ಷ","relative":{"0":"ಈ ವರ್ಷ","1":"ಮುಂದಿನ ವರ್ಷ","-1":"ಕಳೆದ ವರ್ಷ"},"relativeTime":{"future":{"one":"{0} ವರ್ಷಗಳಲ್ಲಿ","other":"{0} ವರ್ಷಗಳಲ್ಲಿ"},"past":{"one":"{0} ವರ್ಷಗಳ ಹಿಂದೆ","other":"{0} ವರ್ಷಗಳ ಹಿಂದೆ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ko","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"초","relative":{"0":"지금"},"relativeTime":{"future":{"other":"{0}초 후"},"past":{"other":"{0}초 전"}}},"minute":{"displayName":"분","relativeTime":{"future":{"other":"{0}분 후"},"past":{"other":"{0}분 전"}}},"hour":{"displayName":"시","relativeTime":{"future":{"other":"{0}시간 후"},"past":{"other":"{0}시간 전"}}},"day":{"displayName":"일","relative":{"0":"오늘","1":"내일","2":"모레","-2":"그저께","-1":"어제"},"relativeTime":{"future":{"other":"{0}일 후"},"past":{"other":"{0}일 전"}}},"month":{"displayName":"월","relative":{"0":"이번 달","1":"다음 달","-1":"지난달"},"relativeTime":{"future":{"other":"{0}개월 후"},"past":{"other":"{0}개월 전"}}},"year":{"displayName":"년","relative":{"0":"올해","1":"내년","-1":"지난해"},"relativeTime":{"future":{"other":"{0}년 후"},"past":{"other":"{0}년 전"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ks","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"سٮ۪کَنڑ","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"مِنَٹ","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"گٲنٛٹہٕ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"دۄہ","relative":{"0":"اَز","1":"پگاہ","-1":"راتھ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"رٮ۪تھ","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ؤری","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ksb","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Siku","relative":{"0":"Evi eo","1":"Keloi","-1":"Ghuo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Ng'ezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Ng'waka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ksh","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===0)return"zero";if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekond","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Menutt","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Schtund","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Daach","relative":{"0":"hück","1":"morje","2":"övvermorje","-2":"vörjestere","-1":"jestere"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mohnd","relative":{"0":"diese Mohnd","1":"nächste Mohnd","-1":"lätzde Mohnd"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Johr","relative":{"0":"diese Johr","1":"nächste Johr","-1":"läz Johr"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"kw","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";if(n===2)return"two";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Eur","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Dedh","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mis","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Bledhen","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ky","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"секунд","relative":{"0":"азыр"},"relativeTime":{"future":{"one":"{0} секунддан кийин","other":"{0} секунддан кийин"},"past":{"one":"{0} секунд мурун","other":"{0} секунд мурун"}}},"minute":{"displayName":"мүнөт","relativeTime":{"future":{"one":"{0} мүнөттөн кийин","other":"{0} мүнөттөн кийин"},"past":{"one":"{0} мүнөт мурун","other":"{0} мүнөт мурун"}}},"hour":{"displayName":"саат","relativeTime":{"future":{"one":"{0} сааттан кийин","other":"{0} сааттан кийин"},"past":{"one":"{0} саат мурун","other":"{0} саат мурун"}}},"day":{"displayName":"күн","relative":{"0":"бүгүн","1":"эртеӊ","2":"бүрсүгүнү","-2":"мурдагы күнү","-1":"кечээ"},"relativeTime":{"future":{"one":"{0} күндөн кийин","other":"{0} күндөн кийин"},"past":{"one":"{0} күн мурун","other":"{0} күн мурун"}}},"month":{"displayName":"ай","relative":{"0":"бул айда","1":"эмдиги айда","-1":"өткөн айда"},"relativeTime":{"future":{"one":"{0} айдан кийин","other":"{0} айдан кийин"},"past":{"one":"{0} ай мурун","other":"{0} ай мурун"}}},"year":{"displayName":"жыл","relative":{"0":"быйыл","1":"эмдиги жылы","-1":"былтыр"},"relativeTime":{"future":{"one":"{0} жылдан кийин","other":"{0} жылдан кийин"},"past":{"one":"{0} жыл мурун","other":"{0} жыл мурун"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lag","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(n===0)return"zero";if((i===0||i===1)&&(n!==0))return"one";return"other";},"fields":{"second":{"displayName":"Sekúunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakíka","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Sáa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Sikʉ","relative":{"0":"Isikʉ","1":"Lamʉtoondo","-1":"Niijo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mweéri","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mwaáka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lg","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Kasikonda","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakiika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saawa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Lunaku","relative":{"0":"Lwaleero","1":"Nkya","-1":"Ggulo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mwezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lkt","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Okpí","relative":{"0":"now"},"relativeTime":{"future":{"other":"Letáŋhaŋ okpí {0} kiŋháŋ"},"past":{"other":"Hékta okpí {0} k’uŋ héhaŋ"}}},"minute":{"displayName":"Owápȟe oȟʼáŋkȟo","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Owápȟe","relativeTime":{"future":{"other":"Letáŋhaŋ owápȟe {0} kiŋháŋ"},"past":{"other":"Hékta owápȟe {0} kʼuŋ héhaŋ"}}},"day":{"displayName":"Aŋpétu","relative":{"0":"Lé aŋpétu kiŋ","1":"Híŋhaŋni kiŋháŋ","-1":"Lé aŋpétu kiŋ"},"relativeTime":{"future":{"other":"Letáŋhaŋ {0}-čháŋ kiŋháŋ"},"past":{"other":"Hékta {0}-čháŋ k’uŋ héhaŋ"}}},"month":{"displayName":"Wí","relative":{"0":"Lé wí kiŋ","1":"Wí kiŋháŋ","-1":"Wí kʼuŋ héhaŋ"},"relativeTime":{"future":{"other":"Letáŋhaŋ wíyawapi {0} kiŋháŋ"},"past":{"other":"Hékta wíyawapi {0} kʼuŋ héhaŋ"}}},"year":{"displayName":"Ómakȟa","relative":{"0":"Lé ómakȟa kiŋ","1":"Tȟokáta ómakȟa kiŋháŋ","-1":"Ómakȟa kʼuŋ héhaŋ"},"relativeTime":{"future":{"other":"Letáŋhaŋ ómakȟa {0} kiŋháŋ"},"past":{"other":"Hékta ómakȟa {0} kʼuŋ héhaŋ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ln","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"Sɛkɔ́ndɛ","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Monúti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Ngonga","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mokɔlɔ","relative":{"0":"Lɛlɔ́","1":"Lóbi ekoyâ","-1":"Lóbi elékí"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Sánzá","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Mobú","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lo","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"ວິນາທີ","relative":{"0":"ຕອນນີ້"},"relativeTime":{"future":{"other":"ໃນອີກ {0} ວິນາທີ"},"past":{"other":"{0} ວິນາທີກ່ອນ"}}},"minute":{"displayName":"ນາທີ","relativeTime":{"future":{"other":"{0} ໃນອີກ 0 ນາທີ"},"past":{"other":"{0} ນາທີກ່ອນ"}}},"hour":{"displayName":"ຊົ່ວໂມງ","relativeTime":{"future":{"other":"ໃນອີກ {0} ຊົ່ວໂມງ"},"past":{"other":"{0} ຊົ່ວໂມງກ່ອນ"}}},"day":{"displayName":"ມື້","relative":{"0":"ມື້ນີ້","1":"ມື້ອື່ນ","2":"ມື້ຮື","-2":"ມື້ກ່ອນ","-1":"ມື້ວານ"},"relativeTime":{"future":{"other":"ໃນອີກ {0} ມື້"},"past":{"other":"{0} ມື້ກ່ອນ"}}},"month":{"displayName":"ເດືອນ","relative":{"0":"ເດືອນນີ້","1":"ເດືອນໜ້າ","-1":"ເດືອນແລ້ວ"},"relativeTime":{"future":{"other":"ໃນອີກ {0} ເດືອນ"},"past":{"other":"{0} ເດືອນກ່ອນ"}}},"year":{"displayName":"ປີ","relative":{"0":"ປີນີ້","1":"ປີໜ້າ","-1":"ປີກາຍ"},"relativeTime":{"future":{"other":"ໃນອີກ {0} ປີ"},"past":{"other":"{0} ປີກ່ອນ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lt","pluralRuleFunction":function (n) {var f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(n%10===1&&!(n%100>=11&&n%100<=19))return"one";if(n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19))return"few";if((f!==0))return"many";return"other";},"fields":{"second":{"displayName":"Sekundė","relative":{"0":"dabar"},"relativeTime":{"future":{"one":"po {0} sekundės","few":"po {0} sekundžių","many":"po {0} sekundės","other":"po {0} sekundžių"},"past":{"one":"prieš {0} sekundę","few":"prieš {0} sekundes","many":"prieš {0} sekundės","other":"prieš {0} sekundžių"}}},"minute":{"displayName":"Minutė","relativeTime":{"future":{"one":"po {0} minutės","few":"po {0} minučių","many":"po {0} minutės","other":"po {0} minučių"},"past":{"one":"prieš {0} minutę","few":"prieš {0} minutes","many":"prieš {0} minutės","other":"prieš {0} minučių"}}},"hour":{"displayName":"Valanda","relativeTime":{"future":{"one":"po {0} valandos","few":"po {0} valandų","many":"po {0} valandos","other":"po {0} valandų"},"past":{"one":"prieš {0} valandą","few":"prieš {0} valandas","many":"prieš {0} valandos","other":"prieš {0} valandų"}}},"day":{"displayName":"Diena","relative":{"0":"šiandien","1":"rytoj","2":"poryt","-2":"užvakar","-1":"vakar"},"relativeTime":{"future":{"one":"po {0} dienos","few":"po {0} dienų","many":"po {0} dienos","other":"po {0} dienų"},"past":{"one":"prieš {0} dieną","few":"prieš {0} dienas","many":"prieš {0} dienos","other":"prieš {0} dienų"}}},"month":{"displayName":"Mėnuo","relative":{"0":"šį mėnesį","1":"kitą mėnesį","-1":"praėjusį mėnesį"},"relativeTime":{"future":{"one":"po {0} mėnesio","few":"po {0} mėnesių","many":"po {0} mėnesio","other":"po {0} mėnesių"},"past":{"one":"prieš {0} mėnesį","few":"prieš {0} mėnesius","many":"prieš {0} mėnesio","other":"prieš {0} mėnesių"}}},"year":{"displayName":"Metai","relative":{"0":"šiais metais","1":"kitais metais","-1":"praėjusiais metais"},"relativeTime":{"future":{"one":"po {0} metų","few":"po {0} metų","many":"po {0} metų","other":"po {0} metų"},"past":{"one":"prieš {0} metus","few":"prieš {0} metus","many":"prieš {0} metų","other":"prieš {0} metų"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"lv","pluralRuleFunction":function (n) {var v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(n%10===0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||v===2&&f%100===Math.floor(f%100)&&f%100>=11&&f%100<=19)return"zero";if(n%10===1&&((n%100!==11)||v===2&&f%10===1&&((f%100!==11)||(v!==2)&&f%10===1)))return"one";return"other";},"fields":{"second":{"displayName":"Sekundes","relative":{"0":"tagad"},"relativeTime":{"future":{"zero":"Pēc {0} sekundēm","one":"Pēc {0} sekundes","other":"Pēc {0} sekundēm"},"past":{"zero":"Pirms {0} sekundēm","one":"Pirms {0} sekundes","other":"Pirms {0} sekundēm"}}},"minute":{"displayName":"Minūtes","relativeTime":{"future":{"zero":"Pēc {0} minūtēm","one":"Pēc {0} minūtes","other":"Pēc {0} minūtēm"},"past":{"zero":"Pirms {0} minūtēm","one":"Pirms {0} minūtes","other":"Pirms {0} minūtēm"}}},"hour":{"displayName":"Stundas","relativeTime":{"future":{"zero":"Pēc {0} stundām","one":"Pēc {0} stundas","other":"Pēc {0} stundām"},"past":{"zero":"Pirms {0} stundām","one":"Pirms {0} stundas","other":"Pirms {0} stundām"}}},"day":{"displayName":"Diena","relative":{"0":"šodien","1":"rīt","2":"parīt","-2":"aizvakar","-1":"vakar"},"relativeTime":{"future":{"zero":"Pēc {0} dienām","one":"Pēc {0} dienas","other":"Pēc {0} dienām"},"past":{"zero":"Pirms {0} dienām","one":"Pirms {0} dienas","other":"Pirms {0} dienām"}}},"month":{"displayName":"Mēnesis","relative":{"0":"šomēnes","1":"nākammēnes","-1":"pagājušajā mēnesī"},"relativeTime":{"future":{"zero":"Pēc {0} mēnešiem","one":"Pēc {0} mēneša","other":"Pēc {0} mēnešiem"},"past":{"zero":"Pirms {0} mēnešiem","one":"Pirms {0} mēneša","other":"Pirms {0} mēnešiem"}}},"year":{"displayName":"Gads","relative":{"0":"šogad","1":"nākamgad","-1":"pagājušajā gadā"},"relativeTime":{"future":{"zero":"Pēc {0} gadiem","one":"Pēc {0} gada","other":"Pēc {0} gadiem"},"past":{"zero":"Pirms {0} gadiem","one":"Pirms {0} gada","other":"Pirms {0} gadiem"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mas","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Oldákikaè","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Ɛ́sáâ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ɛnkɔlɔ́ŋ","relative":{"0":"Táatá","1":"Tááisérè","-1":"Ŋolé"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Ɔlápà","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Ɔlárì","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mg","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"Segondra","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minitra","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Ora","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Andro","relative":{"0":"Anio","1":"Rahampitso","-1":"Omaly"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Volana","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Taona","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mgo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"+{0} s","other":"+{0} s"},"past":{"one":"-{0} s","other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"+{0} min","other":"+{0} min"},"past":{"one":"-{0} min","other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"+{0} h","other":"+{0} h"},"past":{"one":"-{0} h","other":"-{0} h"}}},"day":{"displayName":"anəg","relative":{"0":"tèchɔ̀ŋ","1":"isu","2":"isu ywi","-1":"ikwiri"},"relativeTime":{"future":{"one":"+{0} d","other":"+{0} d"},"past":{"one":"-{0} d","other":"-{0} d"}}},"month":{"displayName":"iməg","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"+{0} m","other":"+{0} m"},"past":{"one":"-{0} m","other":"-{0} m"}}},"year":{"displayName":"fituʼ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mk","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(v===0&&(i%10===1||f%10===1))return"one";return"other";},"fields":{"second":{"displayName":"Секунда","relative":{"0":"сега"},"relativeTime":{"future":{"one":"За {0} секунда","other":"За {0} секунди"},"past":{"one":"Пред {0} секунда","other":"Пред {0} секунди"}}},"minute":{"displayName":"Минута","relativeTime":{"future":{"one":"За {0} минута","other":"За {0} минути"},"past":{"one":"Пред {0} минута","other":"Пред {0} минути"}}},"hour":{"displayName":"Час","relativeTime":{"future":{"one":"За {0} час","other":"За {0} часа"},"past":{"one":"Пред {0} час","other":"Пред {0} часа"}}},"day":{"displayName":"ден","relative":{"0":"Денес","1":"утре","2":"задутре","-2":"завчера","-1":"вчера"},"relativeTime":{"future":{"one":"За {0} ден","other":"За {0} дена"},"past":{"one":"Пред {0} ден","other":"Пред {0} дена"}}},"month":{"displayName":"Месец","relative":{"0":"овој месец","1":"следниот месец","-1":"минатиот месец"},"relativeTime":{"future":{"one":"За {0} месец","other":"За {0} месеци"},"past":{"one":"Пред {0} месец","other":"Пред {0} месеци"}}},"year":{"displayName":"година","relative":{"0":"оваа година","1":"следната година","-1":"минатата година"},"relativeTime":{"future":{"one":"За {0} година","other":"За {0} години"},"past":{"one":"Пред {0} година","other":"Пред {0} години"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ml","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"സെക്കൻറ്","relative":{"0":"ഇപ്പോൾ"},"relativeTime":{"future":{"one":"{0} സെക്കൻഡിൽ","other":"{0} സെക്കൻഡിൽ"},"past":{"one":"{0} സെക്കൻറ് മുമ്പ്","other":"{0} സെക്കൻറ് മുമ്പ്"}}},"minute":{"displayName":"മിനിട്ട്","relativeTime":{"future":{"one":"{0} മിനിറ്റിൽ","other":"{0} മിനിറ്റിനുള്ളിൽ"},"past":{"one":"{0} മിനിറ്റ് മുമ്പ്","other":"{0} മിനിറ്റ് മുമ്പ്"}}},"hour":{"displayName":"മണിക്കൂർ","relativeTime":{"future":{"one":"{0} മണിക്കൂറിൽ","other":"{0} മണിക്കൂറിൽ"},"past":{"one":"{0} മണിക്കൂർ മുമ്പ്","other":"{0} മണിക്കൂർ മുമ്പ്"}}},"day":{"displayName":"ദിവസം","relative":{"0":"ഇന്ന്","1":"നാളെ","2":"മറ്റന്നാൾ","-2":"മിനിഞ്ഞാന്ന്","-1":"ഇന്നലെ"},"relativeTime":{"future":{"one":"{0} ദിവസത്തിൽ","other":"{0} ദിവസത്തിൽ"},"past":{"one":"{0} ദിവസം മുമ്പ്","other":"{0} ദിവസം മുമ്പ്"}}},"month":{"displayName":"മാസം","relative":{"0":"ഈ മാസം","1":"അടുത്ത മാസം","-1":"കഴിഞ്ഞ മാസം"},"relativeTime":{"future":{"one":"{0} മാസത്തിൽ","other":"{0} മാസത്തിൽ"},"past":{"one":"{0} മാസം മുമ്പ്","other":"{0} മാസം മുമ്പ്"}}},"year":{"displayName":"വർഷം","relative":{"0":"ഈ വർഷം","1":"അടുത്തവർഷം","-1":"കഴിഞ്ഞ വർഷം"},"relativeTime":{"future":{"one":"{0} വർഷത്തിൽ","other":"{0} വർഷത്തിൽ"},"past":{"one":"{0} വർഷം മുമ്പ്","other":"{0} വർഷം മുമ്പ്"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mn","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Секунд","relative":{"0":"Одоо"},"relativeTime":{"future":{"one":"{0} секундын дараа","other":"{0} секундын дараа"},"past":{"one":"{0} секундын өмнө","other":"{0} секундын өмнө"}}},"minute":{"displayName":"Минут","relativeTime":{"future":{"one":"{0} минутын дараа","other":"{0} минутын дараа"},"past":{"one":"{0} минутын өмнө","other":"{0} минутын өмнө"}}},"hour":{"displayName":"Цаг","relativeTime":{"future":{"one":"{0} цагийн дараа","other":"{0} цагийн дараа"},"past":{"one":"{0} цагийн өмнө","other":"{0} цагийн өмнө"}}},"day":{"displayName":"Өдөр","relative":{"0":"өнөөдөр","1":"маргааш","2":"Нөгөөдөр","-2":"Уржигдар","-1":"өчигдөр"},"relativeTime":{"future":{"one":"{0} өдрийн дараа","other":"{0} өдрийн дараа"},"past":{"one":"{0} өдрийн өмнө","other":"{0} өдрийн өмнө"}}},"month":{"displayName":"Сар","relative":{"0":"энэ сар","1":"ирэх сар","-1":"өнгөрсөн сар"},"relativeTime":{"future":{"one":"{0} сарын дараа","other":"{0} сарын дараа"},"past":{"one":"{0} сарын өмнө","other":"{0} сарын өмнө"}}},"year":{"displayName":"Жил","relative":{"0":"энэ жил","1":"ирэх жил","-1":"өнгөрсөн жил"},"relativeTime":{"future":{"one":"{0} жилийн дараа","other":"{0} жилийн дараа"},"past":{"one":"{0} жилийн өмнө","other":"{0} жилийн өмнө"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mr","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"सेकंद","relative":{"0":"आत्ता"},"relativeTime":{"future":{"one":"{0} सेकंदामध्ये","other":"{0} सेकंदांमध्ये"},"past":{"one":"{0} सेकंदापूर्वी","other":"{0} सेकंदांपूर्वी"}}},"minute":{"displayName":"मिनिट","relativeTime":{"future":{"one":"{0} मिनिटामध्ये","other":"{0} मिनिटांमध्ये"},"past":{"one":"{0} मिनिटापूर्वी","other":"{0} मिनिटांपूर्वी"}}},"hour":{"displayName":"तास","relativeTime":{"future":{"one":"{0} तासामध्ये","other":"{0} तासांमध्ये"},"past":{"one":"{0} तासापूर्वी","other":"{0} तासांपूर्वी"}}},"day":{"displayName":"दिवस","relative":{"0":"आज","1":"उद्या","-1":"काल"},"relativeTime":{"future":{"one":"{0} दिवसामध्ये","other":"{0} दिवसांमध्ये"},"past":{"one":"{0} दिवसापूर्वी","other":"{0} दिवसांपूर्वी"}}},"month":{"displayName":"महिना","relative":{"0":"हा महिना","1":"पुढील महिना","-1":"मागील महिना"},"relativeTime":{"future":{"one":"{0} महिन्यामध्ये","other":"{0} महिन्यांमध्ये"},"past":{"one":"{0} महिन्यापूर्वी","other":"{0} महिन्यांपूर्वी"}}},"year":{"displayName":"वर्ष","relative":{"0":"हे वर्ष","1":"पुढील वर्ष","-1":"मागील वर्ष"},"relativeTime":{"future":{"one":"{0} वर्षामध्ये","other":"{0} वर्षांमध्ये"},"past":{"one":"{0} वर्षापूर्वी","other":"{0} वर्षांपूर्वी"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ms","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Kedua","relative":{"0":"sekarang"},"relativeTime":{"future":{"other":"Dalam {0} saat"},"past":{"other":"{0} saat lalu"}}},"minute":{"displayName":"Minit","relativeTime":{"future":{"other":"Dalam {0} minit"},"past":{"other":"{0} minit lalu"}}},"hour":{"displayName":"Jam","relativeTime":{"future":{"other":"Dalam {0} jam"},"past":{"other":"{0} jam lalu"}}},"day":{"displayName":"Hari","relative":{"0":"Hari ini","1":"Esok","2":"Hari selepas esok","-2":"Hari sebelum semalam","-1":"Semalam"},"relativeTime":{"future":{"other":"Dalam {0} hari"},"past":{"other":"{0} hari lalu"}}},"month":{"displayName":"Bulan","relative":{"0":"bulan ini","1":"bulan depan","-1":"bulan lalu"},"relativeTime":{"future":{"other":"Dalam {0} bulan"},"past":{"other":"{0} bulan lalu"}}},"year":{"displayName":"Tahun","relative":{"0":"tahun ini","1":"tahun depan","-1":"tahun lepas"},"relativeTime":{"future":{"other":"Dalam {0} tahun"},"past":{"other":"{0} tahun lalu"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"mt","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";if(n===0||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10)return"few";if(n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19)return"many";return"other";},"fields":{"second":{"displayName":"Sekonda","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minuta","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Siegħa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Jum","relative":{"0":"Illum","1":"Għada","-1":"Ilbieraħ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Xahar","relative":{"0":"Dan ix-xahar","1":"Ix-xahar id-dieħel","-1":"Ix-xahar li għadda"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Sena","relative":{"0":"Din is-sena","1":"Is-sena d-dieħla","-1":"Is-sena li għaddiet"},"relativeTime":{"past":{"one":"{0} sena ilu","few":"{0} snin ilu","many":"{0} snin ilu","other":"{0} snin ilu"},"future":{"other":"+{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"my","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"စက္ကန့်","relative":{"0":"ယခု"},"relativeTime":{"future":{"other":"{0}စက္ကန့်အတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}စက္ကန့်"}}},"minute":{"displayName":"မိနစ်","relativeTime":{"future":{"other":"{0}မိနစ်အတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}မိနစ်"}}},"hour":{"displayName":"နာရီ","relativeTime":{"future":{"other":"{0}နာရီအတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}နာရီ"}}},"day":{"displayName":"ရက်","relative":{"0":"ယနေ့","1":"မနက်ဖြန်","2":"သဘက်ခါ","-2":"တနေ့က","-1":"မနေ့က"},"relativeTime":{"future":{"other":"{0}ရက်အတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}ရက်"}}},"month":{"displayName":"လ","relative":{"0":"ယခုလ","1":"နောက်လ","-1":"ယမန်လ"},"relativeTime":{"future":{"other":"{0}လအတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}လ"}}},"year":{"displayName":"နှစ်","relative":{"0":"ယခုနှစ်","1":"နောက်နှစ်","-1":"ယမန်နှစ်"},"relativeTime":{"future":{"other":"{0}နှစ်အတွင်း"},"past":{"other":"လွန်ခဲ့သော{0}နှစ်"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"naq","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";if(n===2)return"two";return"other";},"fields":{"second":{"displayName":"ǀGâub","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Haib","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Iiri","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Tsees","relative":{"0":"Neetsee","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"ǁKhâb","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Kurib","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nb","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekund","relative":{"0":"nå"},"relativeTime":{"future":{"one":"om {0} sekund","other":"om {0} sekunder"},"past":{"one":"for {0} sekund siden","other":"for {0} sekunder siden"}}},"minute":{"displayName":"Minutt","relativeTime":{"future":{"one":"om {0} minutt","other":"om {0} minutter"},"past":{"one":"for {0} minutt siden","other":"for {0} minutter siden"}}},"hour":{"displayName":"Time","relativeTime":{"future":{"one":"om {0} time","other":"om {0} timer"},"past":{"one":"for {0} time siden","other":"for {0} timer siden"}}},"day":{"displayName":"Dag","relative":{"0":"i dag","1":"i morgen","2":"i overmorgen","-2":"i forgårs","-1":"i går"},"relativeTime":{"future":{"one":"om {0} døgn","other":"om {0} døgn"},"past":{"one":"for {0} døgn siden","other":"for {0} døgn siden"}}},"month":{"displayName":"Måned","relative":{"0":"Denne måneden","1":"Neste måned","-1":"Sist måned"},"relativeTime":{"future":{"one":"om {0} måned","other":"om {0} måneder"},"past":{"one":"for {0} måned siden","other":"for {0} måneder siden"}}},"year":{"displayName":"År","relative":{"0":"Dette året","1":"Neste år","-1":"I fjor"},"relativeTime":{"future":{"one":"om {0} år","other":"om {0} år"},"past":{"one":"for {0} år siden","other":"for {0} år siden"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nd","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Isekendi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Umuzuzu","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Ihola","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ilanga","relative":{"0":"Lamuhla","1":"Kusasa","-1":"Izolo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Inyangacale","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Umnyaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ne","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"दोस्रो","relative":{"0":"अब"},"relativeTime":{"future":{"one":"{0} सेकेण्डमा","other":"{0} सेकेण्डमा"},"past":{"one":"{0} सेकेण्ड पहिले","other":"{0} सेकेण्ड पहिले"}}},"minute":{"displayName":"मिनेट","relativeTime":{"future":{"one":"{0} मिनेटमा","other":"{0} मिनेटमा"},"past":{"one":"{0} मिनेट पहिले","other":"{0} मिनेट पहिले"}}},"hour":{"displayName":"घण्टा","relativeTime":{"future":{"one":"{0} घण्टामा","other":"{0} घण्टामा"},"past":{"one":"{0} घण्टा पहिले","other":"{0} घण्टा पहिले"}}},"day":{"displayName":"बार","relative":{"0":"आज","1":"भोली","-2":"अस्ति","-1":"हिजो"},"relativeTime":{"future":{"one":"{0} दिनमा","other":"{0} दिनमा"},"past":{"one":"{0} दिन पहिले","other":"{0} दिन पहिले"}}},"month":{"displayName":"महिना","relative":{"0":"यो महिना","1":"अर्को महिना","-1":"गएको महिना"},"relativeTime":{"future":{"one":"{0} महिनामा","other":"{0} महिनामा"},"past":{"one":"{0} महिना पहिले","other":"{0} महिना पहिले"}}},"year":{"displayName":"बर्ष","relative":{"0":"यो वर्ष","1":"अर्को वर्ष","-1":"पहिलो वर्ष"},"relativeTime":{"future":{"one":"{0} वर्षमा","other":"{0} वर्षमा"},"past":{"one":"{0} वर्ष अघि","other":"{0} वर्ष अघि"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nl","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Seconde","relative":{"0":"nu"},"relativeTime":{"future":{"one":"Over {0} seconde","other":"Over {0} seconden"},"past":{"one":"{0} seconde geleden","other":"{0} seconden geleden"}}},"minute":{"displayName":"Minuut","relativeTime":{"future":{"one":"Over {0} minuut","other":"Over {0} minuten"},"past":{"one":"{0} minuut geleden","other":"{0} minuten geleden"}}},"hour":{"displayName":"Uur","relativeTime":{"future":{"one":"Over {0} uur","other":"Over {0} uur"},"past":{"one":"{0} uur geleden","other":"{0} uur geleden"}}},"day":{"displayName":"Dag","relative":{"0":"vandaag","1":"morgen","2":"overmorgen","-2":"eergisteren","-1":"gisteren"},"relativeTime":{"future":{"one":"Over {0} dag","other":"Over {0} dagen"},"past":{"one":"{0} dag geleden","other":"{0} dagen geleden"}}},"month":{"displayName":"Maand","relative":{"0":"deze maand","1":"volgende maand","-1":"vorige maand"},"relativeTime":{"future":{"one":"Over {0} maand","other":"Over {0} maanden"},"past":{"one":"{0} maand geleden","other":"{0} maanden geleden"}}},"year":{"displayName":"Jaar","relative":{"0":"dit jaar","1":"volgend jaar","-1":"vorig jaar"},"relativeTime":{"future":{"one":"Over {0} jaar","other":"Over {0} jaar"},"past":{"one":"{0} jaar geleden","other":"{0} jaar geleden"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nn","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekund","relative":{"0":"now"},"relativeTime":{"future":{"one":"om {0} sekund","other":"om {0} sekunder"},"past":{"one":"for {0} sekund siden","other":"for {0} sekunder siden"}}},"minute":{"displayName":"minutt","relativeTime":{"future":{"one":"om {0} minutt","other":"om {0} minutter"},"past":{"one":"for {0} minutt siden","other":"for {0} minutter siden"}}},"hour":{"displayName":"time","relativeTime":{"future":{"one":"om {0} time","other":"om {0} timer"},"past":{"one":"for {0} time siden","other":"for {0} timer siden"}}},"day":{"displayName":"dag","relative":{"0":"i dag","1":"i morgon","2":"i overmorgon","-2":"i forgårs","-1":"i går"},"relativeTime":{"future":{"one":"om {0} døgn","other":"om {0} døgn"},"past":{"one":"for {0} døgn siden","other":"for {0} døgn siden"}}},"month":{"displayName":"månad","relative":{"0":"denne månad","1":"neste månad","-1":"forrige månad"},"relativeTime":{"future":{"one":"om {0} måned","other":"om {0} måneder"},"past":{"one":"for {0} måned siden","other":"for {0} måneder siden"}}},"year":{"displayName":"år","relative":{"0":"dette år","1":"neste år","-1":"i fjor"},"relativeTime":{"future":{"one":"om {0} år","other":"om {0} år"},"past":{"one":"for {0} år siden","other":"for {0} år siden"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nnh","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"fʉ̀ʼ nèm","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"lyɛ̌ʼ","relative":{"0":"lyɛ̌ʼɔɔn","1":"jǔɔ gẅie à ne ntóo","-1":"jǔɔ gẅie à ka tɔ̌g"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ngùʼ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nr","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nso","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"nyn","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Obucweka\u002FEsekendi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Edakiika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Shaaha","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Eizooba","relative":{"0":"Erizooba","1":"Nyenkyakare","-1":"Nyomwabazyo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Omwezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Omwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"om","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"or","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"os","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Секунд","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Минут","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Сахат","relativeTime":{"future":{"one":"{0} сахаты фӕстӕ","other":"{0} сахаты фӕстӕ"},"past":{"one":"{0} сахаты размӕ","other":"{0} сахаты размӕ"}}},"day":{"displayName":"Бон","relative":{"0":"Абон","1":"Сом","2":"Иннӕбон","-2":"Ӕндӕрӕбон","-1":"Знон"},"relativeTime":{"future":{"one":"{0} боны фӕстӕ","other":"{0} боны фӕстӕ"},"past":{"one":"{0} бон раздӕр","other":"{0} боны размӕ"}}},"month":{"displayName":"Мӕй","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Аз","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"pa","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"ਸਕਿੰਟ","relative":{"0":"ਹੁਣ"},"relativeTime":{"future":{"one":"{0} ਸਕਿੰਟ ਵਿਚ","other":"{0} ਸਕਿੰਟ ਵਿਚ"},"past":{"one":"{0} ਸਕਿੰਟ ਪਹਿਲਾਂ","other":"{0} ਸਕਿੰਟ ਪਹਿਲਾਂ"}}},"minute":{"displayName":"ਮਿੰਟ","relativeTime":{"future":{"one":"{0} ਮਿੰਟ ਵਿਚ","other":"{0} ਮਿੰਟ ਵਿਚ"},"past":{"one":"{0} ਮਿੰਟ ਪਹਿਲਾਂ","other":"{0} ਮਿੰਟ ਪਹਿਲਾਂ"}}},"hour":{"displayName":"ਘੰਟਾ","relativeTime":{"future":{"one":"{0} ਘੰਟੇ ਵਿਚ","other":"{0} ਘੰਟੇ ਵਿਚ"},"past":{"one":"{0} ਘੰਟਾ ਪਹਿਲਾਂ","other":"{0} ਘੰਟੇ ਪਹਿਲਾਂ"}}},"day":{"displayName":"ਦਿਨ","relative":{"0":"ਅੱਜ","1":"ਭਲਕੇ","-1":"ਲੰਘਿਆ ਕੱਲ"},"relativeTime":{"future":{"one":"{0} ਦਿਨ ਵਿਚ","other":"{0} ਦਿਨਾਂ ਵਿਚ"},"past":{"one":"{0} ਦਿਨ ਪਹਿਲਾਂ","other":"{0} ਦਿਨ ਪਹਿਲਾਂ"}}},"month":{"displayName":"ਮਹੀਨਾ","relative":{"0":"ਇਹ ਮਹੀਨਾ","1":"ਅਗਲਾ ਮਹੀਨਾ","-1":"ਪਿਛਲਾ ਮਹੀਨਾ"},"relativeTime":{"future":{"one":"{0} ਮਹੀਨੇ ਵਿਚ","other":"{0} ਮਹੀਨੇ ਵਿਚ"},"past":{"one":"{0} ਮਹੀਨੇ ਪਹਿਲਾਂ","other":"{0} ਮਹੀਨੇ ਪਹਿਲਾਂ"}}},"year":{"displayName":"ਸਾਲ","relative":{"0":"ਇਹ ਸਾਲ","1":"ਅਗਲਾ ਸਾਲ","-1":"ਪਿਛਲਾ ਸਾਲ"},"relativeTime":{"future":{"one":"{0} ਸਾਲ ਵਿਚ","other":"{0} ਸਾਲ ਵਿਚ"},"past":{"one":"{0} ਸਾਲ ਪਹਿਲਾਂ","other":"{0} ਸਾਲ ਪਹਿਲਾਂ"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"pl","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return"few";if(v===0&&(i!==1)&&(i%10===Math.floor(i%10)&&i%10>=0&&i%10<=1||v===0&&(i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=12&&i%100<=14)))return"many";return"other";},"fields":{"second":{"displayName":"sekunda","relative":{"0":"teraz"},"relativeTime":{"future":{"one":"Za {0} sekundę","few":"Za {0} sekundy","many":"Za {0} sekund","other":"Za {0} sekundy"},"past":{"one":"{0} sekundę temu","few":"{0} sekundy temu","many":"{0} sekund temu","other":"{0} sekundy temu"}}},"minute":{"displayName":"minuta","relativeTime":{"future":{"one":"Za {0} minutę","few":"Za {0} minuty","many":"Za {0} minut","other":"Za {0} minuty"},"past":{"one":"{0} minutę temu","few":"{0} minuty temu","many":"{0} minut temu","other":"{0} minuty temu"}}},"hour":{"displayName":"godzina","relativeTime":{"future":{"one":"Za {0} godzinę","few":"Za {0} godziny","many":"Za {0} godzin","other":"Za {0} godziny"},"past":{"one":"{0} godzinę temu","few":"{0} godziny temu","many":"{0} godzin temu","other":"{0} godziny temu"}}},"day":{"displayName":"dzień","relative":{"0":"dzisiaj","1":"jutro","2":"pojutrze","-2":"przedwczoraj","-1":"wczoraj"},"relativeTime":{"future":{"one":"Za {0} dzień","few":"Za {0} dni","many":"Za {0} dni","other":"Za {0} dnia"},"past":{"one":"{0} dzień temu","few":"{0} dni temu","many":"{0} dni temu","other":"{0} dnia temu"}}},"month":{"displayName":"miesiąc","relative":{"0":"w tym miesiącu","1":"w przyszłym miesiącu","-1":"w zeszłym miesiącu"},"relativeTime":{"future":{"one":"Za {0} miesiąc","few":"Za {0} miesiące","many":"Za {0} miesięcy","other":"Za {0} miesiąca"},"past":{"one":"{0} miesiąc temu","few":"{0} miesiące temu","many":"{0} miesięcy temu","other":"{0} miesiąca temu"}}},"year":{"displayName":"rok","relative":{"0":"w tym roku","1":"w przyszłym roku","-1":"w zeszłym roku"},"relativeTime":{"future":{"one":"Za {0} rok","few":"Za {0} lata","many":"Za {0} lat","other":"Za {0} roku"},"past":{"one":"{0} rok temu","few":"{0} lata temu","many":"{0} lat temu","other":"{0} roku temu"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ps","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"pt","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,t=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10);n=Math.floor(n);if(i===1&&(v===0||i===0&&t===1))return"one";return"other";},"fields":{"second":{"displayName":"Segundo","relative":{"0":"agora"},"relativeTime":{"future":{"one":"Dentro de {0} segundo","other":"Dentro de {0} segundos"},"past":{"one":"Há {0} segundo","other":"Há {0} segundos"}}},"minute":{"displayName":"Minuto","relativeTime":{"future":{"one":"Dentro de {0} minuto","other":"Dentro de {0} minutos"},"past":{"one":"Há {0} minuto","other":"Há {0} minutos"}}},"hour":{"displayName":"Hora","relativeTime":{"future":{"one":"Dentro de {0} hora","other":"Dentro de {0} horas"},"past":{"one":"Há {0} hora","other":"Há {0} horas"}}},"day":{"displayName":"Dia","relative":{"0":"hoje","1":"amanhã","2":"depois de amanhã","-2":"anteontem","-1":"ontem"},"relativeTime":{"future":{"one":"Dentro de {0} dia","other":"Dentro de {0} dias"},"past":{"one":"Há {0} dia","other":"Há {0} dias"}}},"month":{"displayName":"Mês","relative":{"0":"este mês","1":"próximo mês","-1":"mês passado"},"relativeTime":{"future":{"one":"Dentro de {0} mês","other":"Dentro de {0} meses"},"past":{"one":"Há {0} mês","other":"Há {0} meses"}}},"year":{"displayName":"Ano","relative":{"0":"este ano","1":"próximo ano","-1":"ano passado"},"relativeTime":{"future":{"one":"Dentro de {0} ano","other":"Dentro de {0} anos"},"past":{"one":"Há {0} ano","other":"Há {0} anos"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"rm","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"secunda","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"minuta","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ura","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Tag","relative":{"0":"oz","1":"damaun","2":"puschmaun","-2":"stersas","-1":"ier"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"mais","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"onn","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ro","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";if((v!==0)||n===0||(n!==1)&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19)return"few";return"other";},"fields":{"second":{"displayName":"secundă","relative":{"0":"acum"},"relativeTime":{"future":{"one":"Peste {0} secundă","few":"Peste {0} secunde","other":"Peste {0} de secunde"},"past":{"one":"Acum {0} secundă","few":"Acum {0} secunde","other":"Acum {0} de secunde"}}},"minute":{"displayName":"minut","relativeTime":{"future":{"one":"Peste {0} minut","few":"Peste {0} minute","other":"Peste {0} de minute"},"past":{"one":"Acum {0} minut","few":"Acum {0} minute","other":"Acum {0} de minute"}}},"hour":{"displayName":"oră","relativeTime":{"future":{"one":"Peste {0} oră","few":"Peste {0} ore","other":"Peste {0} de ore"},"past":{"one":"Acum {0} oră","few":"Acum {0} ore","other":"Acum {0} de ore"}}},"day":{"displayName":"zi","relative":{"0":"azi","1":"mâine","2":"poimâine","-2":"alaltăieri","-1":"ieri"},"relativeTime":{"future":{"one":"Peste {0} zi","few":"Peste {0} zile","other":"Peste {0} de zile"},"past":{"one":"Acum {0} zi","few":"Acum {0} zile","other":"Acum {0} de zile"}}},"month":{"displayName":"lună","relative":{"0":"luna aceasta","1":"luna viitoare","-1":"luna trecută"},"relativeTime":{"future":{"one":"Peste {0} lună","few":"Peste {0} luni","other":"Peste {0} de luni"},"past":{"one":"Acum {0} lună","few":"Acum {0} luni","other":"Acum {0} de luni"}}},"year":{"displayName":"an","relative":{"0":"anul acesta","1":"anul viitor","-1":"anul trecut"},"relativeTime":{"future":{"one":"Peste {0} an","few":"Peste {0} ani","other":"Peste {0} de ani"},"past":{"one":"Acum {0} an","few":"Acum {0} ani","other":"Acum {0} de ani"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"rof","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Isaa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mfiri","relative":{"0":"Linu","1":"Ng'ama","-1":"Hiyo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mweri","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Muaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ru","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(v===0&&i%10===1&&(i%100!==11))return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return"few";if(v===0&&(i%10===0||v===0&&(i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14)))return"many";return"other";},"fields":{"second":{"displayName":"Секунда","relative":{"0":"сейчас"},"relativeTime":{"future":{"one":"Через {0} секунду","few":"Через {0} секунды","many":"Через {0} секунд","other":"Через {0} секунды"},"past":{"one":"{0} секунду назад","few":"{0} секунды назад","many":"{0} секунд назад","other":"{0} секунды назад"}}},"minute":{"displayName":"Минута","relativeTime":{"future":{"one":"Через {0} минуту","few":"Через {0} минуты","many":"Через {0} минут","other":"Через {0} минуты"},"past":{"one":"{0} минуту назад","few":"{0} минуты назад","many":"{0} минут назад","other":"{0} минуты назад"}}},"hour":{"displayName":"Час","relativeTime":{"future":{"one":"Через {0} час","few":"Через {0} часа","many":"Через {0} часов","other":"Через {0} часа"},"past":{"one":"{0} час назад","few":"{0} часа назад","many":"{0} часов назад","other":"{0} часа назад"}}},"day":{"displayName":"День","relative":{"0":"сегодня","1":"завтра","2":"послезавтра","-2":"позавчера","-1":"вчера"},"relativeTime":{"future":{"one":"Через {0} день","few":"Через {0} дня","many":"Через {0} дней","other":"Через {0} дня"},"past":{"one":"{0} день назад","few":"{0} дня назад","many":"{0} дней назад","other":"{0} дня назад"}}},"month":{"displayName":"Месяц","relative":{"0":"в этом месяце","1":"в следующем месяце","-1":"в прошлом месяце"},"relativeTime":{"future":{"one":"Через {0} месяц","few":"Через {0} месяца","many":"Через {0} месяцев","other":"Через {0} месяца"},"past":{"one":"{0} месяц назад","few":"{0} месяца назад","many":"{0} месяцев назад","other":"{0} месяца назад"}}},"year":{"displayName":"Год","relative":{"0":"в этому году","1":"в следующем году","-1":"в прошлом году"},"relativeTime":{"future":{"one":"Через {0} год","few":"Через {0} года","many":"Через {0} лет","other":"Через {0} года"},"past":{"one":"{0} год назад","few":"{0} года назад","many":"{0} лет назад","other":"{0} года назад"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"rwk","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakyika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mfiri","relative":{"0":"Inu","1":"Ngama","-1":"Ukou"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mori","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Maka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sah","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Сөкүүндэ","relative":{"0":"now"},"relativeTime":{"future":{"other":"{0} сөкүүндэннэн"},"past":{"other":"{0} сөкүүндэ ынараа өттүгэр"}}},"minute":{"displayName":"Мүнүүтэ","relativeTime":{"future":{"other":"{0} мүнүүтэннэн"},"past":{"other":"{0} мүнүүтэ ынараа өттүгэр"}}},"hour":{"displayName":"Чаас","relativeTime":{"future":{"other":"{0} чааһынан"},"past":{"other":"{0} чаас ынараа өттүгэр"}}},"day":{"displayName":"Күн","relative":{"0":"Бүгүн","1":"Сарсын","2":"Өйүүн","-2":"Иллэрээ күн","-1":"Бэҕэһээ"},"relativeTime":{"future":{"other":"{0} күнүнэн"},"past":{"other":"{0} күн ынараа өттүгэр"}}},"month":{"displayName":"Ый","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"{0} ыйынан"},"past":{"other":"{0} ый ынараа өттүгэр"}}},"year":{"displayName":"Сыл","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"{0} сылынан"},"past":{"other":"{0} сыл ынараа өттүгэр"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"saq","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Isekondi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Idakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saai","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mpari","relative":{"0":"Duo","1":"Taisere","-1":"Ng'ole"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Lapa","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Lari","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"se","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";if(n===2)return"two";return"other";},"fields":{"second":{"displayName":"sekunda","relative":{"0":"now"},"relativeTime":{"future":{"one":"{0} sekunda maŋŋilit","two":"{0} sekundda maŋŋilit","other":"{0} sekundda maŋŋilit"},"past":{"one":"{0} sekunda árat","two":"{0} sekundda árat","other":"{0} sekundda árat"}}},"minute":{"displayName":"minuhtta","relativeTime":{"future":{"one":"{0} minuhta maŋŋilit","two":"{0} minuhtta maŋŋilit","other":"{0} minuhtta maŋŋilit"},"past":{"one":"{0} minuhta árat","two":"{0} minuhtta árat","other":"{0} minuhtta árat"}}},"hour":{"displayName":"diibmu","relativeTime":{"future":{"one":"{0} diibmu maŋŋilit","two":"{0} diibmur maŋŋilit","other":"{0} diibmur maŋŋilit"},"past":{"one":"{0} diibmu árat","two":"{0} diibmur árat","other":"{0} diibmur árat"}}},"day":{"displayName":"beaivi","relative":{"0":"odne","1":"ihttin","2":"paijeelittáá","-2":"oovdebpeivvi","-1":"ikte"},"relativeTime":{"future":{"one":"{0} jándor maŋŋilit","two":"{0} jándor amaŋŋilit","other":"{0} jándora maŋŋilit"},"past":{"one":"{0} jándor árat","two":"{0} jándora árat","other":"{0} jándora árat"}}},"month":{"displayName":"mánnu","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"{0} mánotbadji maŋŋilit","two":"{0} mánotbadji maŋŋilit","other":"{0} mánotbadji maŋŋilit"},"past":{"one":"{0} mánotbadji árat","two":"{0} mánotbadji árat","other":"{0} mánotbadji árat"}}},"year":{"displayName":"jáhki","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"{0} jahki maŋŋilit","two":"{0} jahkki maŋŋilit","other":"{0} jahkki maŋŋilit"},"past":{"one":"{0} jahki árat","two":"{0} jahkki árat","other":"{0} jahkki árat"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"seh","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Segundo","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minuto","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hora","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ntsiku","relative":{"0":"Lero","1":"Manguana","-1":"Zuro"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mwezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Chaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ses","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Miti","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Miniti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Guuru","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Zaari","relative":{"0":"Hõo","1":"Suba","-1":"Bi"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Handu","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Jiiri","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sg","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Nzîna ngbonga","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Ndurü ngbonga","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Ngbonga","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Lâ","relative":{"0":"Lâsô","1":"Kêkerêke","-1":"Bîrï"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Nze","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Ngû","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"shi","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";if(n===Math.floor(n)&&n>=2&&n<=10)return"few";return"other";},"fields":{"second":{"displayName":"ⵜⴰⵙⵉⵏⵜ","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"ⵜⵓⵙⴷⵉⴷⵜ","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"ⵜⴰⵙⵔⴰⴳⵜ","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"ⴰⵙⵙ","relative":{"0":"ⴰⵙⵙⴰ","1":"ⴰⵙⴽⴽⴰ","-1":"ⵉⴹⵍⵍⵉ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"ⴰⵢⵢⵓⵔ","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"ⴰⵙⴳⴳⵯⴰⵙ","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"si","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(n===0||n===1||i===0&&f===1)return"one";return"other";},"fields":{"second":{"displayName":"තත්පරය","relative":{"0":"දැන්"},"relativeTime":{"future":{"one":"තත්පර {0} කින්","other":"තත්පර {0} කින්"},"past":{"one":"තත්පර {0}කට පෙර","other":"තත්පර {0}කට පෙර"}}},"minute":{"displayName":"මිනිත්තුව","relativeTime":{"future":{"one":"මිනිත්තු {0} කින්","other":"මිනිත්තු {0} කින්"},"past":{"one":"මිනිත්තු {0}ට පෙර","other":"මිනිත්තු {0}ට පෙර"}}},"hour":{"displayName":"පැය","relativeTime":{"future":{"one":"පැය {0} කින්","other":"පැය {0} කින්"},"past":{"one":"පැය {0}ට පෙර","other":"පැය {0}ට පෙර"}}},"day":{"displayName":"දිනය","relative":{"0":"අද","1":"හෙට","2":"අනිද්දා","-2":"පෙරේදා","-1":"ඊයෙ"},"relativeTime":{"future":{"one":"දින {0}න්","other":"දින {0}න්"},"past":{"one":"දින {0} ට පෙර","other":"දින {0} ට පෙර"}}},"month":{"displayName":"මාසය","relative":{"0":"මෙම මාසය","1":"ඊළඟ මාසය","-1":"පසුගිය මාසය"},"relativeTime":{"future":{"one":"මාස {0}කින්","other":"මාස {0}කින්"},"past":{"one":"මාස {0}කට පෙර","other":"මාස {0}කට පෙර"}}},"year":{"displayName":"වර්ෂය","relative":{"0":"මෙම වසර","1":"ඊළඟ වසර","-1":"පසුගිය වසර"},"relativeTime":{"future":{"one":"වසර {0} කින්","other":"වසර {0} කින්"},"past":{"one":"වසර {0}ට පෙර","other":"වසර {0}ට පෙර"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sk","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";if(i===Math.floor(i)&&i>=2&&i<=4&&v===0)return"few";if((v!==0))return"many";return"other";},"fields":{"second":{"displayName":"Sekunda","relative":{"0":"teraz"},"relativeTime":{"future":{"one":"O {0} sekundu","few":"O {0} sekundy","many":"O {0} sekundy","other":"O {0} sekúnd"},"past":{"one":"Pred {0} sekundou","few":"Pred {0} sekundami","many":"Pred {0} sekundami","other":"Pred {0} sekundami"}}},"minute":{"displayName":"Minúta","relativeTime":{"future":{"one":"O {0} minútu","few":"O {0} minúty","many":"O {0} minúty","other":"O {0} minút"},"past":{"one":"Pred {0} minútou","few":"Pred {0} minútami","many":"Pred {0} minútami","other":"Pred {0} minútami"}}},"hour":{"displayName":"Hodina","relativeTime":{"future":{"one":"O {0} hodinu","few":"O {0} hodiny","many":"O {0} hodiny","other":"O {0} hodín"},"past":{"one":"Pred {0} hodinou","few":"Pred {0} hodinami","many":"Pred {0} hodinami","other":"Pred {0} hodinami"}}},"day":{"displayName":"Deň","relative":{"0":"Dnes","1":"Zajtra","2":"Pozajtra","-2":"Predvčerom","-1":"Včera"},"relativeTime":{"future":{"one":"O {0} deň","few":"O {0} dni","many":"O {0} dňa","other":"O {0} dní"},"past":{"one":"Pred {0} dňom","few":"Pred {0} dňami","many":"Pred {0} dňami","other":"Pred {0} dňami"}}},"month":{"displayName":"Mesiac","relative":{"0":"Tento mesiac","1":"Budúci mesiac","-1":"Posledný mesiac"},"relativeTime":{"future":{"one":"O {0} mesiac","few":"O {0} mesiace","many":"O {0} mesiaca","other":"O {0} mesiacov"},"past":{"one":"Pred {0} mesiacom","few":"Pred {0} mesiacmi","many":"Pred {0} mesiacmi","other":"Pred {0} mesiacmi"}}},"year":{"displayName":"Rok","relative":{"0":"Tento rok","1":"Budúci rok","-1":"Minulý rok"},"relativeTime":{"future":{"one":"O {0} rok","few":"O {0} roky","many":"O {0} roka","other":"O {0} rokov"},"past":{"one":"Pred {0} rokom","few":"Pred {0} rokmi","many":"Pred {0} rokmi","other":"Pred {0} rokmi"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sl","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(v===0&&i%100===1)return"one";if(v===0&&i%100===2)return"two";if(v===0&&(i%100===Math.floor(i%100)&&i%100>=3&&i%100<=4||(v!==0)))return"few";return"other";},"fields":{"second":{"displayName":"Sekunda","relative":{"0":"zdaj"},"relativeTime":{"future":{"one":"Čez {0} sekundo","two":"Čez {0} sekundi","few":"Čez {0} sekunde","other":"Čez {0} sekundi"},"past":{"one":"Pred {0} sekundo","two":"Pred {0} sekundama","few":"Pred {0} sekundami","other":"Pred {0} sekundami"}}},"minute":{"displayName":"Minuta","relativeTime":{"future":{"one":"Čez {0} min.","two":"Čez {0} min.","few":"Čez {0} min.","other":"Čez {0} min."},"past":{"one":"Pred {0} min.","two":"Pred {0} min.","few":"Pred {0} min.","other":"Pred {0} min."}}},"hour":{"displayName":"Ura","relativeTime":{"future":{"one":"Čez {0} h","two":"Čez {0} h","few":"Čez {0} h","other":"Čez {0} h"},"past":{"one":"Pred {0} h","two":"Pred {0} h","few":"Pred {0} h","other":"Pred {0} h"}}},"day":{"displayName":"Dan","relative":{"0":"Danes","1":"Jutri","2":"Pojutrišnjem","-2":"Predvčerajšnjim","-1":"Včeraj"},"relativeTime":{"future":{"one":"Čez {0} dan","two":"Čez {0} dni","few":"Čez {0} dni","other":"Čez {0} dni"},"past":{"one":"Pred {0} dnevom","two":"Pred {0} dnevoma","few":"Pred {0} dnevi","other":"Pred {0} dnevi"}}},"month":{"displayName":"Mesec","relative":{"0":"Ta mesec","1":"Naslednji mesec","-1":"Prejšnji mesec"},"relativeTime":{"future":{"one":"Čez {0} mesec","two":"Čez {0} meseca","few":"Čez {0} mesece","other":"Čez {0} mesecev"},"past":{"one":"Pred {0} mesecem","two":"Pred {0} meseci","few":"Pred {0} meseci","other":"Pred {0} meseci"}}},"year":{"displayName":"Leto","relative":{"0":"Letos","1":"Naslednje leto","-1":"Lani"},"relativeTime":{"future":{"one":"Čez {0} leto","two":"Čez {0} leti","few":"Čez {0} leta","other":"Čez {0} let"},"past":{"one":"Pred {0} letom","two":"Pred {0} leti","few":"Pred {0} leti","other":"Pred {0} leti"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sn","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekondi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Mineti","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Awa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Zuva","relative":{"0":"Nhasi","1":"Mangwana","-1":"Nezuro"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mwedzi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Gore","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"so","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Il biriqsi","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Daqiiqad","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saacad","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Maalin","relative":{"0":"Maanta","1":"Berri","-1":"Shalay"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Bil","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Sanad","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sq","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekondë","relative":{"0":"tani"},"relativeTime":{"future":{"one":"pas {0} sekonde","other":"pas {0} sekondash"},"past":{"one":"para {0} sekonde","other":"para {0} sekondash"}}},"minute":{"displayName":"minutë","relativeTime":{"future":{"one":"pas {0} minute","other":"pas {0} minutash"},"past":{"one":"para {0} minute","other":"para {0} minutash"}}},"hour":{"displayName":"orë","relativeTime":{"future":{"one":"pas {0} ore","other":"pas {0} orësh"},"past":{"one":"para {0} ore","other":"para {0} orësh"}}},"day":{"displayName":"ditë","relative":{"0":"sot","1":"nesër","-1":"dje"},"relativeTime":{"future":{"one":"pas {0} dite","other":"pas {0} ditësh"},"past":{"one":"para {0} dite","other":"para {0} ditësh"}}},"month":{"displayName":"muaj","relative":{"0":"këtë muaj","1":"muajin e ardhshëm","-1":"muajin e kaluar"},"relativeTime":{"future":{"one":"pas {0} muaji","other":"pas {0} muajsh"},"past":{"one":"para {0} muaji","other":"para {0} muajsh"}}},"year":{"displayName":"vit","relative":{"0":"këtë vit","1":"vitin e ardhshëm","-1":"vitin e kaluar"},"relativeTime":{"future":{"one":"pas {0} viti","other":"pas {0} vjetësh"},"past":{"one":"para {0} viti","other":"para {0} vjetësh"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sr","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length,f=parseInt(n.toString().replace(/^[^.]*\.?/,""),10);n=Math.floor(n);if(v===0&&i%10===1&&((i%100!==11)||f%10===1&&(f%100!==11)))return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&(!(i%100>=12&&i%100<=14)||f%10===Math.floor(f%10)&&f%10>=2&&f%10<=4&&!(f%100>=12&&f%100<=14)))return"few";return"other";},"fields":{"second":{"displayName":"секунд","relative":{"0":"сада"},"relativeTime":{"future":{"one":"за {0} секунду","few":"за {0} секунде","other":"за {0} секунди"},"past":{"one":"пре {0} секунде","few":"пре {0} секунде","other":"пре {0} секунди"}}},"minute":{"displayName":"минут","relativeTime":{"future":{"one":"за {0} минут","few":"за {0} минута","other":"за {0} минута"},"past":{"one":"пре {0} минута","few":"пре {0} минута","other":"пре {0} минута"}}},"hour":{"displayName":"час","relativeTime":{"future":{"one":"за {0} сат","few":"за {0} сата","other":"за {0} сати"},"past":{"one":"пре {0} сата","few":"пре {0} сата","other":"пре {0} сати"}}},"day":{"displayName":"дан","relative":{"0":"данас","1":"сутра","2":"прекосутра","-2":"прекјуче","-1":"јуче"},"relativeTime":{"future":{"one":"за {0} дан","few":"за {0} дана","other":"за {0} дана"},"past":{"one":"пре {0} дана","few":"пре {0} дана","other":"пре {0} дана"}}},"month":{"displayName":"месец","relative":{"0":"Овог месеца","1":"Следећег месеца","-1":"Прошлог месеца"},"relativeTime":{"future":{"one":"за {0} месец","few":"за {0} месеца","other":"за {0} месеци"},"past":{"one":"пре {0} месеца","few":"пре {0} месеца","other":"пре {0} месеци"}}},"year":{"displayName":"година","relative":{"0":"Ове године","1":"Следеће године","-1":"Прошле године"},"relativeTime":{"future":{"one":"за {0} годину","few":"за {0} године","other":"за {0} година"},"past":{"one":"пре {0} године","few":"пре {0} године","other":"пре {0} година"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ss","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ssy","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"st","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sv","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Sekund","relative":{"0":"nu"},"relativeTime":{"future":{"one":"om {0} sekund","other":"om {0} sekunder"},"past":{"one":"för {0} sekund sedan","other":"för {0} sekunder sedan"}}},"minute":{"displayName":"Minut","relativeTime":{"future":{"one":"om {0} minut","other":"om {0} minuter"},"past":{"one":"för {0} minut sedan","other":"för {0} minuter sedan"}}},"hour":{"displayName":"timme","relativeTime":{"future":{"one":"om {0} timme","other":"om {0} timmar"},"past":{"one":"för {0} timme sedan","other":"för {0} timmar sedan"}}},"day":{"displayName":"Dag","relative":{"0":"i dag","1":"i morgon","2":"i övermorgon","-2":"i förrgår","-1":"i går"},"relativeTime":{"future":{"one":"om {0} dag","other":"om {0} dagar"},"past":{"one":"för {0} dag sedan","other":"för {0} dagar sedan"}}},"month":{"displayName":"Månad","relative":{"0":"denna månad","1":"nästa månad","-1":"förra månaden"},"relativeTime":{"future":{"one":"om {0} månad","other":"om {0} månader"},"past":{"one":"för {0} månad sedan","other":"för {0} månader sedan"}}},"year":{"displayName":"År","relative":{"0":"i år","1":"nästa år","-1":"i fjol"},"relativeTime":{"future":{"one":"om {0} år","other":"om {0} år"},"past":{"one":"för {0} år sedan","other":"för {0} år sedan"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"sw","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"sasa"},"relativeTime":{"future":{"one":"Baada ya sekunde {0}","other":"Baada ya sekunde {0}"},"past":{"one":"Sekunde {0} iliyopita","other":"Sekunde {0} zilizopita"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"one":"Baada ya dakika {0}","other":"Baada ya dakika {0}"},"past":{"one":"Dakika {0} iliyopita","other":"Dakika {0} zilizopita"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"one":"Baada ya saa {0}","other":"Baada ya saa {0}"},"past":{"one":"Saa {0} iliyopita","other":"Saa {0} zilizopita"}}},"day":{"displayName":"Siku","relative":{"0":"leo","1":"kesho","2":"kesho kutwa","-2":"juzi","-1":"jana"},"relativeTime":{"future":{"one":"Baada ya siku {0}","other":"Baada ya siku {0}"},"past":{"one":"Siku {0} iliyopita","other":"Siku {0} zilizopita"}}},"month":{"displayName":"Mwezi","relative":{"0":"mwezi huu","1":"mwezi ujao","-1":"mwezi uliopita"},"relativeTime":{"future":{"one":"Baada ya mwezi {0}","other":"Baada ya miezi {0}"},"past":{"one":"Miezi {0} iliyopita","other":"Miezi {0} iliyopita"}}},"year":{"displayName":"Mwaka","relative":{"0":"mwaka huu","1":"mwaka ujao","-1":"mwaka uliopita"},"relativeTime":{"future":{"one":"Baada ya mwaka {0}","other":"Baada ya miaka {0}"},"past":{"one":"Mwaka {0} uliopita","other":"Miaka {0} iliyopita"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ta","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"வினாடி","relative":{"0":"இப்போது"},"relativeTime":{"future":{"one":"{0} வினாடியில்","other":"{0} விநாடிகளில்"},"past":{"one":"{0} வினாடிக்கு முன்","other":"{0} வினாடிக்கு முன்"}}},"minute":{"displayName":"நிமிடம்","relativeTime":{"future":{"one":"{0} நிமிடத்தில்","other":"{0} நிமிடங்களில்"},"past":{"one":"{0} நிமிடத்திற்கு முன்","other":"{0} நிமிடங்களுக்கு முன்"}}},"hour":{"displayName":"மணி","relativeTime":{"future":{"one":"{0} மணிநேரத்தில்","other":"{0} மணிநேரத்தில்"},"past":{"one":"{0} மணிநேரம் முன்","other":"{0} மணிநேரம் முன்"}}},"day":{"displayName":"நாள்","relative":{"0":"இன்று","1":"நாளை","2":"நாளை மறுநாள்","-2":"நேற்று முன் தினம்","-1":"நேற்று"},"relativeTime":{"future":{"one":"{0} நாளில்","other":"{0} நாட்களில்"},"past":{"one":"{0} நாளுக்கு முன்","other":"{0} நாட்களுக்கு முன்"}}},"month":{"displayName":"மாதம்","relative":{"0":"இந்த மாதம்","1":"அடுத்த மாதம்","-1":"கடந்த மாதம்"},"relativeTime":{"future":{"one":"{0} மாதத்தில்","other":"{0} மாதங்களில்"},"past":{"one":"{0} மாதத்துக்கு முன்","other":"{0} மாதங்களுக்கு முன்"}}},"year":{"displayName":"ஆண்டு","relative":{"0":"இந்த ஆண்டு","1":"அடுத்த ஆண்டு","-1":"கடந்த ஆண்டு"},"relativeTime":{"future":{"one":"{0} ஆண்டில்","other":"{0} ஆண்டுகளில்"},"past":{"one":"{0} ஆண்டிற்கு முன்","other":"{0} ஆண்டுகளுக்கு முன்"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"te","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"క్షణం","relative":{"0":"ప్రస్తుతం"},"relativeTime":{"future":{"one":"{0} సెకన్లో","other":"{0} సెకన్లలో"},"past":{"one":"{0} సెకను క్రితం","other":"{0} సెకన్ల క్రితం"}}},"minute":{"displayName":"నిమిషము","relativeTime":{"future":{"one":"{0} నిమిషంలో","other":"{0} నిమిషాల్లో"},"past":{"one":"{0} నిమిషం క్రితం","other":"{0} నిమిషాల క్రితం"}}},"hour":{"displayName":"గంట","relativeTime":{"future":{"one":"{0} గంటలో","other":"{0} గంటల్లో"},"past":{"one":"{0} గంట క్రితం","other":"{0} గంటల క్రితం"}}},"day":{"displayName":"దినం","relative":{"0":"ఈ రోజు","1":"రేపు","2":"ఎల్లుండి","-2":"మొన్న","-1":"నిన్న"},"relativeTime":{"future":{"one":"{0} రోజులో","other":"{0} రోజుల్లో"},"past":{"one":"{0} రోజు క్రితం","other":"{0} రోజుల క్రితం"}}},"month":{"displayName":"నెల","relative":{"0":"ఈ నెల","1":"తదుపరి నెల","-1":"గత నెల"},"relativeTime":{"future":{"one":"{0} నెలలో","other":"{0} నెలల్లో"},"past":{"one":"{0} నెల క్రితం","other":"{0} నెలల క్రితం"}}},"year":{"displayName":"సంవత్సరం","relative":{"0":"ఈ సంవత్సరం","1":"తదుపరి సంవత్సరం","-1":"గత సంవత్సరం"},"relativeTime":{"future":{"one":"{0} సంవత్సరంలో","other":"{0} సంవత్సరాల్లో"},"past":{"one":"{0} సంవత్సరం క్రితం","other":"{0} సంవత్సరాల క్రితం"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"teo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Isekonde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Idakika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Esaa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Aparan","relative":{"0":"Lolo","1":"Moi","-1":"Jaan"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Elap","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Ekan","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"th","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"วินาที","relative":{"0":"ขณะนี้"},"relativeTime":{"future":{"other":"ในอีก {0} วินาที"},"past":{"other":"{0} วินาทีที่ผ่านมา"}}},"minute":{"displayName":"นาที","relativeTime":{"future":{"other":"ในอีก {0} นาที"},"past":{"other":"{0} นาทีที่ผ่านมา"}}},"hour":{"displayName":"ชั่วโมง","relativeTime":{"future":{"other":"ในอีก {0} ชั่วโมง"},"past":{"other":"{0} ชั่วโมงที่ผ่านมา"}}},"day":{"displayName":"วัน","relative":{"0":"วันนี้","1":"พรุ่งนี้","2":"มะรืนนี้","-2":"เมื่อวานซืน","-1":"เมื่อวาน"},"relativeTime":{"future":{"other":"ในอีก {0} วัน"},"past":{"other":"{0} วันที่ผ่านมา"}}},"month":{"displayName":"เดือน","relative":{"0":"เดือนนี้","1":"เดือนหน้า","-1":"เดือนที่แล้ว"},"relativeTime":{"future":{"other":"ในอีก {0} เดือน"},"past":{"other":"{0} เดือนที่ผ่านมา"}}},"year":{"displayName":"ปี","relative":{"0":"ปีนี้","1":"ปีหน้า","-1":"ปีที่แล้ว"},"relativeTime":{"future":{"other":"ในอีก {0} ปี"},"past":{"other":"{0} ปีที่แล้ว"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ti","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"tig","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"tn","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"to","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"sekoni","relative":{"0":"taimiʻni"},"relativeTime":{"future":{"other":"ʻi he sekoni ʻe {0}"},"past":{"other":"sekoni ʻe {0} kuoʻosi"}}},"minute":{"displayName":"miniti","relativeTime":{"future":{"other":"ʻi he miniti ʻe {0}"},"past":{"other":"miniti ʻe {0} kuoʻosi"}}},"hour":{"displayName":"houa","relativeTime":{"future":{"other":"ʻi he houa ʻe {0}"},"past":{"other":"houa ʻe {0} kuoʻosi"}}},"day":{"displayName":"ʻaho","relative":{"0":"ʻaho⸍ni","1":"ʻapongipongi","2":"ʻahepongipongi","-2":"ʻaneheafi","-1":"ʻaneafi"},"relativeTime":{"future":{"other":"ʻi he ʻaho ʻe {0}"},"past":{"other":"ʻaho ʻe {0} kuoʻosi"}}},"month":{"displayName":"māhina","relative":{"0":"māhina⸍ni","1":"māhina kahaʻu","-1":"māhina kuoʻosi"},"relativeTime":{"future":{"other":"ʻi he māhina ʻe {0}"},"past":{"other":"māhina ʻe {0} kuoʻosi"}}},"year":{"displayName":"taʻu","relative":{"0":"taʻu⸍ni","1":"taʻu kahaʻu","-1":"taʻu kuoʻosi"},"relativeTime":{"future":{"other":"ʻi he taʻu ʻe {0}"},"past":{"other":"taʻu ʻe {0} kuo hili"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"tr","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Saniye","relative":{"0":"şimdi"},"relativeTime":{"future":{"one":"{0} saniye sonra","other":"{0} saniye sonra"},"past":{"one":"{0} saniye önce","other":"{0} saniye önce"}}},"minute":{"displayName":"Dakika","relativeTime":{"future":{"one":"{0} dakika sonra","other":"{0} dakika sonra"},"past":{"one":"{0} dakika önce","other":"{0} dakika önce"}}},"hour":{"displayName":"Saat","relativeTime":{"future":{"one":"{0} saat sonra","other":"{0} saat sonra"},"past":{"one":"{0} saat önce","other":"{0} saat önce"}}},"day":{"displayName":"Gün","relative":{"0":"bugün","1":"yarın","2":"öbür gün","-2":"evvelsi gün","-1":"dün"},"relativeTime":{"future":{"one":"{0} gün sonra","other":"{0} gün sonra"},"past":{"one":"{0} gün önce","other":"{0} gün önce"}}},"month":{"displayName":"Ay","relative":{"0":"bu ay","1":"gelecek ay","-1":"geçen ay"},"relativeTime":{"future":{"one":"{0} ay sonra","other":"{0} ay sonra"},"past":{"one":"{0} ay önce","other":"{0} ay önce"}}},"year":{"displayName":"Yıl","relative":{"0":"bu yıl","1":"gelecek yıl","-1":"geçen yıl"},"relativeTime":{"future":{"one":"{0} yıl sonra","other":"{0} yıl sonra"},"past":{"one":"{0} yıl önce","other":"{0} yıl önce"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ts","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"tzm","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99)return"one";return"other";},"fields":{"second":{"displayName":"Tusnat","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Tusdat","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Tasragt","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ass","relative":{"0":"Assa","1":"Asekka","-1":"Assenaṭ"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Ayur","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Asseggas","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ug","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"سېكۇنت","relative":{"0":"now"},"relativeTime":{"future":{"one":"{0} سېكۇنتتىن كېيىن","other":"{0} سېكۇنتتىن كېيىن"},"past":{"one":"{0} سېكۇنت ئىلگىرى","other":"{0} سېكۇنت ئىلگىرى"}}},"minute":{"displayName":"مىنۇت","relativeTime":{"future":{"one":"{0} مىنۇتتىن كېيىن","other":"{0} مىنۇتتىن كېيىن"},"past":{"one":"{0} مىنۇت ئىلگىرى","other":"{0} مىنۇت ئىلگىرى"}}},"hour":{"displayName":"سائەت","relativeTime":{"future":{"one":"{0} سائەتتىن كېيىن","other":"{0} سائەتتىن كېيىن"},"past":{"one":"{0} سائەت ئىلگىرى","other":"{0} سائەت ئىلگىرى"}}},"day":{"displayName":"كۈن","relative":{"0":"بۈگۈن","1":"ئەتە","-1":"تۈنۈگۈن"},"relativeTime":{"future":{"one":"{0} كۈندىن كېيىن","other":"{0} كۈندىن كېيىن"},"past":{"one":"{0} كۈن ئىلگىرى","other":"{0} كۈن ئىلگىرى"}}},"month":{"displayName":"ئاي","relative":{"0":"بۇ ئاي","1":"كېلەر ئاي","-1":"ئۆتكەن ئاي"},"relativeTime":{"future":{"one":"{0} ئايدىن كېيىن","other":"{0} ئايدىن كېيىن"},"past":{"one":"{0} ئاي ئىلگىرى","other":"{0} ئاي ئىلگىرى"}}},"year":{"displayName":"يىل","relative":{"0":"بۇ يىل","1":"كېلەر يىل","-1":"ئۆتكەن يىل"},"relativeTime":{"future":{"one":"{0} يىلدىن كېيىن","other":"{0} يىلدىن كېيىن"},"past":{"one":"{0} يىل ئىلگىرى","other":"{0} يىل ئىلگىرى"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"uk","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(v===0&&i%10===1&&(i%100!==11))return"one";if(v===0&&i%10===Math.floor(i%10)&&i%10>=2&&i%10<=4&&!(i%100>=12&&i%100<=14))return"few";if(v===0&&(i%10===0||v===0&&(i%10===Math.floor(i%10)&&i%10>=5&&i%10<=9||v===0&&i%100===Math.floor(i%100)&&i%100>=11&&i%100<=14)))return"many";return"other";},"fields":{"second":{"displayName":"Секунда","relative":{"0":"зараз"},"relativeTime":{"future":{"one":"Через {0} секунду","few":"Через {0} секунди","many":"Через {0} секунд","other":"Через {0} секунди"},"past":{"one":"{0} секунду тому","few":"{0} секунди тому","many":"{0} секунд тому","other":"{0} секунди тому"}}},"minute":{"displayName":"Хвилина","relativeTime":{"future":{"one":"Через {0} хвилину","few":"Через {0} хвилини","many":"Через {0} хвилин","other":"Через {0} хвилини"},"past":{"one":"{0} хвилину тому","few":"{0} хвилини тому","many":"{0} хвилин тому","other":"{0} хвилини тому"}}},"hour":{"displayName":"Година","relativeTime":{"future":{"one":"Через {0} годину","few":"Через {0} години","many":"Через {0} годин","other":"Через {0} години"},"past":{"one":"{0} годину тому","few":"{0} години тому","many":"{0} годин тому","other":"{0} години тому"}}},"day":{"displayName":"День","relative":{"0":"сьогодні","1":"завтра","2":"післязавтра","-2":"позавчора","-1":"учора"},"relativeTime":{"future":{"one":"Через {0} день","few":"Через {0} дні","many":"Через {0} днів","other":"Через {0} дня"},"past":{"one":"{0} день тому","few":"{0} дні тому","many":"{0} днів тому","other":"{0} дня тому"}}},"month":{"displayName":"Місяць","relative":{"0":"цього місяця","1":"наступного місяця","-1":"минулого місяця"},"relativeTime":{"future":{"one":"Через {0} місяць","few":"Через {0} місяці","many":"Через {0} місяців","other":"Через {0} місяця"},"past":{"one":"{0} місяць тому","few":"{0} місяці тому","many":"{0} місяців тому","other":"{0} місяця тому"}}},"year":{"displayName":"Рік","relative":{"0":"цього року","1":"наступного року","-1":"минулого року"},"relativeTime":{"future":{"one":"Через {0} рік","few":"Через {0} роки","many":"Через {0} років","other":"Через {0} року"},"past":{"one":"{0} рік тому","few":"{0} роки тому","many":"{0} років тому","other":"{0} року тому"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ur","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"سیکنڈ","relative":{"0":"اب"},"relativeTime":{"future":{"one":"{0} سیکنڈ میں","other":"{0} سیکنڈ میں"},"past":{"one":"{0} سیکنڈ پہلے","other":"{0} سیکنڈ پہلے"}}},"minute":{"displayName":"منٹ","relativeTime":{"future":{"one":"{0} منٹ میں","other":"{0} منٹ میں"},"past":{"one":"{0} منٹ پہلے","other":"{0} منٹ پہلے"}}},"hour":{"displayName":"گھنٹہ","relativeTime":{"future":{"one":"{0} گھنٹہ میں","other":"{0} گھنٹے میں"},"past":{"one":"{0} گھنٹہ پہلے","other":"{0} گھنٹے پہلے"}}},"day":{"displayName":"دن","relative":{"0":"آج","1":"آئندہ کل","2":"آنے والا پرسوں","-2":"گزشتہ پرسوں","-1":"گزشتہ کل"},"relativeTime":{"future":{"one":"{0} دن میں","other":"{0} دن میں"},"past":{"one":"{0} دن پہلے","other":"{0} دن پہلے"}}},"month":{"displayName":"مہینہ","relative":{"0":"اس مہینہ","1":"اگلے مہینہ","-1":"پچھلے مہینہ"},"relativeTime":{"future":{"one":"{0} مہینہ میں","other":"{0} مہینے میں"},"past":{"one":"{0} مہینہ پہلے","other":"{0} مہینے پہلے"}}},"year":{"displayName":"سال","relative":{"0":"اس سال","1":"اگلے سال","-1":"پچھلے سال"},"relativeTime":{"future":{"one":"{0} سال میں","other":"{0} سال میں"},"past":{"one":"{0} سال پہلے","other":"{0} سال پہلے"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"uz","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Soniya","relative":{"0":"hozir"},"relativeTime":{"future":{"one":"{0} soniyadan soʻng","other":"{0} soniyadan soʻng"},"past":{"one":"{0} soniya oldin","other":"{0} soniya oldin"}}},"minute":{"displayName":"Daqiqa","relativeTime":{"future":{"one":"{0} daqiqadan soʻng","other":"{0} daqiqadan soʻng"},"past":{"one":"{0} daqiqa oldin","other":"{0} daqiqa oldin"}}},"hour":{"displayName":"Soat","relativeTime":{"future":{"one":"{0} soatdan soʻng","other":"{0} soatdan soʻng"},"past":{"one":"{0} soat oldin","other":"{0} soat oldin"}}},"day":{"displayName":"Kun","relative":{"0":"bugun","1":"ertaga","-1":"kecha"},"relativeTime":{"future":{"one":"{0} kundan soʻng","other":"{0} kundan soʻng"},"past":{"one":"{0} kun oldin","other":"{0} kun oldin"}}},"month":{"displayName":"Oy","relative":{"0":"bu oy","1":"keyingi oy","-1":"oʻtgan oy"},"relativeTime":{"future":{"one":"{0} oydan soʻng","other":"{0} oydan soʻng"},"past":{"one":"{0} oy avval","other":"{0} oy avval"}}},"year":{"displayName":"Yil","relative":{"0":"bu yil","1":"keyingi yil","-1":"oʻtgan yil"},"relativeTime":{"future":{"one":"{0} yildan soʻng","other":"{0} yildan soʻng"},"past":{"one":"{0} yil avval","other":"{0} yil avval"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"ve","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"vi","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Giây","relative":{"0":"bây giờ"},"relativeTime":{"future":{"other":"Trong {0} giây nữa"},"past":{"other":"{0} giây trước"}}},"minute":{"displayName":"Phút","relativeTime":{"future":{"other":"Trong {0} phút nữa"},"past":{"other":"{0} phút trước"}}},"hour":{"displayName":"Giờ","relativeTime":{"future":{"other":"Trong {0} giờ nữa"},"past":{"other":"{0} giờ trước"}}},"day":{"displayName":"Ngày","relative":{"0":"Hôm nay","1":"Ngày mai","2":"Ngày kia","-2":"Hôm kia","-1":"Hôm qua"},"relativeTime":{"future":{"other":"Trong {0} ngày nữa"},"past":{"other":"{0} ngày trước"}}},"month":{"displayName":"Tháng","relative":{"0":"tháng này","1":"tháng sau","-1":"tháng trước"},"relativeTime":{"future":{"other":"Trong {0} tháng nữa"},"past":{"other":"{0} tháng trước"}}},"year":{"displayName":"Năm","relative":{"0":"năm nay","1":"năm sau","-1":"năm ngoái"},"relativeTime":{"future":{"other":"Trong {0} năm nữa"},"past":{"other":"{0} năm trước"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"vo","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"sekun","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"minut","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"düp","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Tag","relative":{"0":"adelo","1":"odelo","2":"udelo","-2":"edelo","-1":"ädelo"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"mul","relative":{"0":"amulo","1":"omulo","-1":"ämulo"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"yel","relative":{"0":"ayelo","1":"oyelo","-1":"äyelo"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"vun","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunde","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Dakyika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Saa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Mfiri","relative":{"0":"Inu","1":"Ngama","-1":"Ukou"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Mori","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Maka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"wae","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Sekunda","relative":{"0":"now"},"relativeTime":{"future":{"one":"i {0} sekund","other":"i {0} sekunde"},"past":{"one":"vor {0} sekund","other":"vor {0} sekunde"}}},"minute":{"displayName":"Mínütta","relativeTime":{"future":{"one":"i {0} minüta","other":"i {0} minüte"},"past":{"one":"vor {0} minüta","other":"vor {0} minüte"}}},"hour":{"displayName":"Schtund","relativeTime":{"future":{"one":"i {0} stund","other":"i {0} stunde"},"past":{"one":"vor {0} stund","other":"vor {0} stunde"}}},"day":{"displayName":"Tag","relative":{"0":"Hitte","1":"Móre","2":"Ubermóre","-2":"Vorgešter","-1":"Gešter"},"relativeTime":{"future":{"one":"i {0} tag","other":"i {0} täg"},"past":{"one":"vor {0} tag","other":"vor {0} täg"}}},"month":{"displayName":"Mánet","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"I {0} mánet","other":"I {0} mánet"},"past":{"one":"vor {0} mánet","other":"vor {0} mánet"}}},"year":{"displayName":"Jár","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"I {0} jár","other":"I {0} jár"},"past":{"one":"vor {0} jár","other":"cor {0} jár"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"xh","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"xog","pluralRuleFunction":function (n) {n=Math.floor(n);if(n===1)return"one";return"other";},"fields":{"second":{"displayName":"Obutikitiki","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Edakiika","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"Essawa","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Olunaku","relative":{"0":"Olwaleelo (leelo)","1":"Enkyo","-1":"Edho"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Omwezi","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Omwaka","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"yo","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"Ìsẹ́jú Ààyá","relative":{"0":"now"},"relativeTime":{"future":{"other":"+{0} s"},"past":{"other":"-{0} s"}}},"minute":{"displayName":"Ìsẹ́jú","relativeTime":{"future":{"other":"+{0} min"},"past":{"other":"-{0} min"}}},"hour":{"displayName":"wákàtí","relativeTime":{"future":{"other":"+{0} h"},"past":{"other":"-{0} h"}}},"day":{"displayName":"Ọjọ́","relative":{"0":"Òní","1":"Ọ̀la","2":"òtúùnla","-2":"íjẹta","-1":"Àná"},"relativeTime":{"future":{"other":"+{0} d"},"past":{"other":"-{0} d"}}},"month":{"displayName":"Osù","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"other":"+{0} m"},"past":{"other":"-{0} m"}}},"year":{"displayName":"Ọdún","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"other":"+{0} y"},"past":{"other":"-{0} y"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"zh","pluralRuleFunction":function (n) {return"other";},"fields":{"second":{"displayName":"秒钟","relative":{"0":"现在"},"relativeTime":{"future":{"other":"{0}秒钟后"},"past":{"other":"{0}秒钟前"}}},"minute":{"displayName":"分钟","relativeTime":{"future":{"other":"{0}分钟后"},"past":{"other":"{0}分钟前"}}},"hour":{"displayName":"小时","relativeTime":{"future":{"other":"{0}小时后"},"past":{"other":"{0}小时前"}}},"day":{"displayName":"日","relative":{"0":"今天","1":"明天","2":"后天","-2":"前天","-1":"昨天"},"relativeTime":{"future":{"other":"{0}天后"},"past":{"other":"{0}天前"}}},"month":{"displayName":"月","relative":{"0":"本月","1":"下个月","-1":"上个月"},"relativeTime":{"future":{"other":"{0}个月后"},"past":{"other":"{0}个月前"}}},"year":{"displayName":"年","relative":{"0":"今年","1":"明年","-1":"去年"},"relativeTime":{"future":{"other":"{0}年后"},"past":{"other":"{0}年前"}}}}});
ReactIntlMixin.__addLocaleData({"locale":"zu","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n));n=Math.floor(n);if(i===0||n===1)return"one";return"other";},"fields":{"second":{"displayName":"Isekhondi","relative":{"0":"manje"},"relativeTime":{"future":{"one":"Kusekhondi elingu-{0}","other":"Kumasekhondi angu-{0}"},"past":{"one":"isekhondi elingu-{0} eledlule","other":"amasekhondi angu-{0} adlule"}}},"minute":{"displayName":"Iminithi","relativeTime":{"future":{"one":"Kumunithi engu-{0}","other":"Emaminithini angu-{0}"},"past":{"one":"eminithini elingu-{0} eledlule","other":"amaminithi angu-{0} adlule"}}},"hour":{"displayName":"Ihora","relativeTime":{"future":{"one":"Ehoreni elingu-{0}","other":"Emahoreni angu-{0}"},"past":{"one":"ehoreni eligu-{0} eledluli","other":"emahoreni angu-{0} edlule"}}},"day":{"displayName":"Usuku","relative":{"0":"namhlanje","1":"kusasa","2":"Usuku olulandela olakusasa","-2":"Usuku olwandulela olwayizolo","-1":"izolo"},"relativeTime":{"future":{"one":"Osukwini olungu-{0}","other":"Ezinsukwini ezingu-{0}"},"past":{"one":"osukwini olungu-{0} olwedlule","other":"ezinsukwini ezingu-{0} ezedlule."}}},"month":{"displayName":"Inyanga","relative":{"0":"le nyanga","1":"inyanga ezayo","-1":"inyanga edlule"},"relativeTime":{"future":{"one":"Enyangeni engu-{0}","other":"Ezinyangeni ezingu-{0}"},"past":{"one":"enyangeni engu-{0} eyedlule","other":"ezinyangeni ezingu-{0} ezedlule"}}},"year":{"displayName":"Unyaka","relative":{"0":"kulo nyaka","1":"unyaka ozayo","-1":"onyakeni odlule"},"relativeTime":{"future":{"one":"Onyakeni ongu-{0}","other":"Eminyakeni engu-{0}"},"past":{"one":"enyakeni ongu-{0} owedlule","other":"iminyaka engu-{0} eyedlule"}}}}});
//# sourceMappingURL=react-intl-with-locales.js.map |
ajax/libs/zxcvbn/1.0.4/zxcvbn.js | dakshshah96/cdnjs | (function(){var y,p,s,z,I,J,K,L,M,N,O,P,A,q,B,Q,R,S,T,U,V;O=function(b){var a,c;c=[];for(a in b)c.push(a);return 0===c.length};A=function(b,a){return b.push.apply(b,a)};U=function(b,a){var c,e,f,d,g;d=b.split("");g=[];e=0;for(f=d.length;e<f;e++)c=d[e],g.push(a[c]||c);return g.join("")};Q=function(b,a){var c,e,f,d;d=[];c=0;for(e=a.length;c<e;c++)f=a[c],A(d,f(b));return d.sort(function(a,b){return a.i-b.i||a.j-b.j})};M=function(b,a){var c,e,f,d,g,h,j,i,k,l,m;l=[];d=b.length;h=b.toLowerCase();for(c=
f=0;0<=d?f<d:f>d;c=0<=d?++f:--f){e=g=i=c;for(k=d;i<=k?g<k:g>k;e=i<=k?++g:--g)if(h.slice(c,+e+1||9E9)in a)m=h.slice(c,+e+1||9E9),j=a[m],l.push({pattern:"dictionary",i:c,j:e,token:b.slice(c,+e+1||9E9),matched_word:m,rank:j})}return l};s=function(b){var a,c,e,f,d;f={};a=1;c=0;for(e=b.length;c<e;c++)d=b[c],f[d]=a,a+=1;return f};p=function(b,a){return function(c){var e,f,d;d=M(c,a);c=0;for(e=d.length;c<e;c++)f=d[c],f.dictionary_name=b;return d}};B={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6",
"9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]};R=function(b){var a,c,e,f,d;f={};d=b.split("");a=0;for(c=d.length;a<c;a++)b=d[a],f[b]=!0;b={};for(e in B){c=B[e];var g=d=void 0,h=void 0,h=[],g=0;for(d=c.length;g<d;g++)a=c[g],a in f&&h.push(a);a=h;0<a.length&&(b[e]=a)}return b};P=function(b){var a,c,e,f,d,g,h,j,i,k,l,m,r;d=function(){var a;a=[];for(f in b)a.push(f);return a}();r=[[]];c=function(a){var b,c,d,e,g,j,h,i;c=[];j={};d=0;for(g=a.length;d<g;d++)h=a[d],
b=function(){var a,b,c;c=[];i=b=0;for(a=h.length;b<a;i=++b)f=h[i],c.push([f,i]);return c}(),b.sort(),e=function(){var a,c,d;d=[];i=c=0;for(a=b.length;c<a;i=++c)f=b[i],d.push(f+","+i);return d}().join("-"),e in j||(j[e]=!0,c.push(h));return c};e=function(a){var d,f,g,i,h,j,k,l,m,n,p,s,q;if(a.length){f=a[0];s=a.slice(1);l=[];n=b[f];a=0;for(h=n.length;a<h;a++){i=n[a];k=0;for(j=r.length;k<j;k++){q=r[k];d=-1;g=m=0;for(p=q.length;0<=p?m<p:m>p;g=0<=p?++m:--m)if(q[g][0]===i){d=g;break}-1===d?(d=q.concat([[i,
f]]),l.push(d)):(g=q.slice(0),g.splice(d,1),g.push([i,f]),l.push(q),l.push(g))}}r=c(l);return e(s)}};e(d);m=[];d=0;for(h=r.length;d<h;d++){k=r[d];l={};i=0;for(j=k.length;i<j;i++)a=k[i],g=a[0],a=a[1],l[g]=a;m.push(l)}return m};T=function(b,a,c){var e,f,d,g,h,j,i,k,l,m,r,o,n;r=[];for(j=0;j<b.length-1;){i=j+1;l=null;for(o=n=0;;){e=b.charAt(i-1);h=!1;g=-1;f=a[e]||[];if(i<b.length){d=b.charAt(i);k=0;for(m=f.length;k<m;k++)if(e=f[k],g+=1,e&&-1!==e.indexOf(d)){h=!0;1===e.indexOf(d)&&(o+=1);l!==g&&(n+=1,
l=g);break}}if(h)i+=1;else{2<i-j&&r.push({pattern:"spatial",i:j,j:i-1,token:b.slice(j,i),graph:c,turns:n,shifted_count:o});j=i;break}}}return r};y={lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digits:"01234567890"};S=function(b,a){var c,e;e=[];for(c=1;1<=a?c<=a:c>=a;1<=a?++c:--c)e.push(b);return e.join("")};q=function(b,a){var c,e;for(e=[];;){c=b.match(a);if(!c)break;c.i=c.index;c.j=c.index+c[0].length-1;e.push(c);b=b.replace(c[0],S(" ",c[0].length))}return e};N=/\d{3,}/;
V=/19\d\d|200\d|201\d/;L=function(b){var a,c,e,f,d,g,h,j,i,k,l,m,r,o;f=[];r=q(b,/\d{4,8}/);j=0;for(i=r.length;j<i;j++){g=r[j];h=[g.i,g.j];g=h[0];h=h[1];e=b.slice(g,+h+1||9E9);a=e.length;c=[];6>=e.length&&(c.push({daymonth:e.slice(2),year:e.slice(0,2),i:g,j:h}),c.push({daymonth:e.slice(0,a-2),year:e.slice(a-2),i:g,j:h}));6<=e.length&&(c.push({daymonth:e.slice(4),year:e.slice(0,4),i:g,j:h}),c.push({daymonth:e.slice(0,a-4),year:e.slice(a-4),i:g,j:h}));e=[];l=0;for(k=c.length;l<k;l++)switch(a=c[l],a.daymonth.length){case 2:e.push({day:a.daymonth[0],
month:a.daymonth[1],year:a.year,i:a.i,j:a.j});break;case 3:e.push({day:a.daymonth.slice(0,2),month:a.daymonth[2],year:a.year,i:a.i,j:a.j});e.push({day:a.daymonth[0],month:a.daymonth.slice(1,3),year:a.year,i:a.i,j:a.j});break;case 4:e.push({day:a.daymonth.slice(0,2),month:a.daymonth.slice(2,4),year:a.year,i:a.i,j:a.j})}k=0;for(c=e.length;k<c;k++)a=e[k],d=parseInt(a.day),m=parseInt(a.month),o=parseInt(a.year),d=z(d,m,o),l=d[0],o=d[1],d=o[0],m=o[1],o=o[2],l&&f.push({pattern:"date",i:a.i,j:a.j,token:b.slice(g,
+h+1||9E9),separator:"",day:d,month:m,year:o})}return f};J=/(\d{1,2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(19\d{2}|200\d|201\d|\d{2})/;I=/(19\d{2}|200\d|201\d|\d{2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(\d{1,2})/;K=function(b){var a,c,e,f,d,g,h,j,i,k;g=[];j=q(b,J);e=0;for(f=j.length;e<f;e++)d=j[e],i=function(){var a,b,e,f;e=[1,3,4];f=[];b=0;for(a=e.length;b<a;b++)c=e[b],f.push(parseInt(d[c]));return f}(),d.day=i[0],d.month=i[1],d.year=i[2],d.sep=d[2],g.push(d);j=q(b,I);f=0;for(e=j.length;f<e;f++)d=j[f],i=function(){var a,
b,e,f;e=[4,3,1];f=[];b=0;for(a=e.length;b<a;b++)c=e[b],f.push(parseInt(d[c]));return f}(),d.day=i[0],d.month=i[1],d.year=i[2],d.sep=d[2],g.push(d);j=[];f=0;for(e=g.length;f<e;f++)d=g[f],a=z(d.day,d.month,d.year),i=a[0],k=a[1],a=k[0],h=k[1],k=k[2],i&&j.push({pattern:"date",i:d.i,j:d.j,token:b.slice(d.i,+d.j+1||9E9),separator:d.sep,day:a,month:h,year:k});return j};z=function(b,a,c){12<=a&&31>=a&&12>=b&&(a=[a,b],b=a[0],a=a[1]);return 31<b||12<a||!(1900<=c&&2019>=c)?[!1,[]]:[!0,[b,a,c]]};var W,X,Y,Z,
C,$,aa,ba,ca,da,ea,fa,ga,ha,n,ia,v,ja,D,ka,la,ma;v=function(b,a){var c,e,f;if(a>b)return 0;if(0===a)return 1;for(c=e=f=1;1<=a?e<=a:e>=a;c=1<=a?++e:--e)f*=b,f/=c,b-=1;return f};n=function(b){return Math.log(b)/Math.log(2)};ia=function(b,a){var c,e,f,d,g,h,j,i,k,l,m;e=C(b);m=[];c=[];d=h=0;for(l=b.length;0<=l?h<l:h>l;d=0<=l?++h:--h){m[d]=(m[d-1]||0)+n(e);c[d]=null;i=0;for(j=a.length;i<j;i++)k=a[i],k.j===d&&(g=[k.i,k.j],f=g[0],g=g[1],f=(m[f-1]||0)+$(k),f<m[g]&&(m[g]=f,c[g]=k))}h=[];for(d=b.length-1;0<=
d;)(k=c[d])?(h.push(k),d=k.i-1):d-=1;h.reverse();j=function(a,c){return{pattern:"bruteforce",i:a,j:c,token:b.slice(a,+c+1||9E9),entropy:n(Math.pow(e,c-a+1)),cardinality:e}};d=0;i=[];l=0;for(c=h.length;l<c;l++)k=h[l],g=[k.i,k.j],f=g[0],g=g[1],0<f-d&&i.push(j(d,f-1)),d=g+1,i.push(k);d<b.length&&i.push(j(d,b.length-1));h=i;k=m[b.length-1]||0;d=fa(k);return{password:b,entropy:D(k,3),match_sequence:h,crack_time:D(d,3),crack_time_display:ea(d),score:aa(d)}};D=function(b,a){return Math.round(b*Math.pow(10,
a))/Math.pow(10,a)};fa=function(b){return 5.0E-5*Math.pow(2,b)};aa=function(b){return b<Math.pow(10,2)?0:b<Math.pow(10,4)?1:b<Math.pow(10,6)?2:b<Math.pow(10,8)?3:4};$=function(b){var a;if(null!=b.entropy)return b.entropy;a=function(){switch(b.pattern){case "repeat":return ja;case "sequence":return ka;case "digits":return da;case "year":return ma;case "date":return ba;case "spatial":return la;case "dictionary":return ca}}();return b.entropy=a(b)};ja=function(b){var a;a=C(b.token);return n(a*b.token.length)};
ka=function(b){var a;a=b.token.charAt(0);a="a"===a||"1"===a?1:a.match(/\d/)?n(10):a.match(/[a-z]/)?n(26):n(26)+1;b.ascending||(a+=1);return a+n(b.token.length)};da=function(b){return n(Math.pow(10,b.token.length))};ma=function(){return n(119)};ba=function(b){var a;a=100>b.year?n(37200):n(44268);b.separator&&(a+=2);return a};la=function(b){var a,c,e,f,d,g,h,j,i,k;"qwerty"===(e=b.graph)||"dvorak"===e?(i=na,c=oa):(i=pa,c=qa);h=0;a=b.token.length;k=b.turns;for(e=d=2;2<=a?d<=a:d>=a;e=2<=a?++d:--d){j=Math.min(k,
e-1);for(f=g=1;1<=j?g<=j:g>=j;f=1<=j?++g:--g)h+=v(e-1,f-1)*i*Math.pow(c,f)}c=n(h);if(b.shifted_count){a=b.shifted_count;b=b.token.length-b.shifted_count;e=f=h=0;for(d=Math.min(a,b);0<=d?f<=d:f>=d;e=0<=d?++f:--f)h+=v(a+b,e);c+=n(h)}return c};ca=function(b){b.base_entropy=n(b.rank);b.uppercase_entropy=ha(b);b.l33t_entropy=ga(b);return b.base_entropy+b.uppercase_entropy+b.l33t_entropy};Z=/^[A-Z][^A-Z]+$/;Y=/^[^A-Z]+[A-Z]$/;X=/^[^a-z]+$/;W=/^[^A-Z]+$/;ha=function(b){var a,c,e,f,d,g,h;h=b.token;if(h.match(W))return 0;
e=[Z,Y,X];b=0;for(a=e.length;b<a;b++)if(f=e[b],h.match(f))return 1;a=function(){var a,b,d,e;d=h.split("");e=[];b=0;for(a=d.length;b<a;b++)c=d[b],c.match(/[A-Z]/)&&e.push(c);return e}().length;b=function(){var a,b,d,e;d=h.split("");e=[];b=0;for(a=d.length;b<a;b++)c=d[b],c.match(/[a-z]/)&&e.push(c);return e}().length;e=f=d=0;for(g=Math.min(a,b);0<=g?f<=g:f>=g;e=0<=g?++f:--f)d+=v(a+b,e);return n(d)};ga=function(b){var a,c,e,f,d,g,h,j,i,k;if(!b.l33t)return 0;g=0;h=b.sub;for(i in h){k=h[i];a=function(){var a,
d,c,f;c=b.token.split("");f=[];a=0;for(d=c.length;a<d;a++)e=c[a],e===i&&f.push(e);return f}().length;c=function(){var a,d,c,f;c=b.token.split("");f=[];a=0;for(d=c.length;a<d;a++)e=c[a],e===k&&f.push(e);return f}().length;f=d=0;for(j=Math.min(c,a);0<=j?d<=j:d>=j;f=0<=j?++d:--d)g+=v(c+a,f)}return n(g)||1};C=function(b){var a,c,e,f,d,g,h,j;d=[!1,!1,!1,!1,!1];f=d[0];j=d[1];c=d[2];h=d[3];d=d[4];g=b.split("");b=0;for(e=g.length;b<e;b++)a=g[b],a=a.charCodeAt(0),48<=a&&57>=a?c=!0:65<=a&&90>=a?j=!0:97<=a&&
122>=a?f=!0:127>=a?h=!0:d=!0;b=0;c&&(b+=10);j&&(b+=26);f&&(b+=26);h&&(b+=33);d&&(b+=100);return b};ea=function(b){return 60>b?"instant":3600>b?1+Math.ceil(b/60)+" minutes":86400>b?1+Math.ceil(b/3600)+" hours":2678400>b?1+Math.ceil(b/86400)+" days":32140800>b?1+Math.ceil(b/2678400)+" months":321408E4>b?1+Math.ceil(b/32140800)+" years":"centuries"};var E={"!":["`~",null,null,"2@","qQ",null],'"':[";:","[{","]}",null,null,"/?"],"#":["2@",null,null,"4$","eE","wW"],$:["3#",null,null,"5%","rR","eE"],"%":["4$",
null,null,"6^","tT","rR"],"&":["6^",null,null,"8*","uU","yY"],"'":[";:","[{","]}",null,null,"/?"],"(":["8*",null,null,"0)","oO","iI"],")":["9(",null,null,"-_","pP","oO"],"*":["7&",null,null,"9(","iI","uU"],"+":["-_",null,null,null,"]}","[{"],",":["mM","kK","lL",".>",null,null],"-":["0)",null,null,"=+","[{","pP"],".":[",<","lL",";:","/?",null,null],"/":[".>",";:","'\"",null,null,null],"0":["9(",null,null,"-_","pP","oO"],1:["`~",null,null,"2@","qQ",null],2:["1!",null,null,"3#","wW","qQ"],3:["2@",null,
null,"4$","eE","wW"],4:["3#",null,null,"5%","rR","eE"],5:["4$",null,null,"6^","tT","rR"],6:["5%",null,null,"7&","yY","tT"],7:["6^",null,null,"8*","uU","yY"],8:["7&",null,null,"9(","iI","uU"],9:["8*",null,null,"0)","oO","iI"],":":"lL,pP,[{,'\",/?,.>".split(","),";":"lL,pP,[{,'\",/?,.>".split(","),"<":["mM","kK","lL",".>",null,null],"=":["-_",null,null,null,"]}","[{"],">":[",<","lL",";:","/?",null,null],"?":[".>",";:","'\"",null,null,null],"@":["1!",null,null,"3#","wW","qQ"],A:[null,"qQ","wW","sS",
"zZ",null],B:["vV","gG","hH","nN",null,null],C:["xX","dD","fF","vV",null,null],D:"sS,eE,rR,fF,cC,xX".split(","),E:"wW,3#,4$,rR,dD,sS".split(","),F:"dD,rR,tT,gG,vV,cC".split(","),G:"fF,tT,yY,hH,bB,vV".split(","),H:"gG,yY,uU,jJ,nN,bB".split(","),I:"uU,8*,9(,oO,kK,jJ".split(","),J:"hH,uU,iI,kK,mM,nN".split(","),K:"jJ iI oO lL ,< mM".split(" "),L:"kK oO pP ;: .> ,<".split(" "),M:["nN","jJ","kK",",<",null,null],N:["bB","hH","jJ","mM",null,null],O:"iI,9(,0),pP,lL,kK".split(","),P:"oO,0),-_,[{,;:,lL".split(","),
Q:[null,"1!","2@","wW","aA",null],R:"eE,4$,5%,tT,fF,dD".split(","),S:"aA,wW,eE,dD,xX,zZ".split(","),T:"rR,5%,6^,yY,gG,fF".split(","),U:"yY,7&,8*,iI,jJ,hH".split(","),V:["cC","fF","gG","bB",null,null],W:"qQ,2@,3#,eE,sS,aA".split(","),X:["zZ","sS","dD","cC",null,null],Y:"tT,6^,7&,uU,hH,gG".split(","),Z:[null,"aA","sS","xX",null,null],"[":"pP,-_,=+,]},'\",;:".split(","),"\\":["]}",null,null,null,null,null],"]":["[{","=+",null,"\\|",null,"'\""],"^":["5%",null,null,"7&","yY","tT"],_:["0)",null,null,"=+",
"[{","pP"],"`":[null,null,null,"1!",null,null],a:[null,"qQ","wW","sS","zZ",null],b:["vV","gG","hH","nN",null,null],c:["xX","dD","fF","vV",null,null],d:"sS,eE,rR,fF,cC,xX".split(","),e:"wW,3#,4$,rR,dD,sS".split(","),f:"dD,rR,tT,gG,vV,cC".split(","),g:"fF,tT,yY,hH,bB,vV".split(","),h:"gG,yY,uU,jJ,nN,bB".split(","),i:"uU,8*,9(,oO,kK,jJ".split(","),j:"hH,uU,iI,kK,mM,nN".split(","),k:"jJ iI oO lL ,< mM".split(" "),l:"kK oO pP ;: .> ,<".split(" "),m:["nN","jJ","kK",",<",null,null],n:["bB","hH","jJ","mM",
null,null],o:"iI,9(,0),pP,lL,kK".split(","),p:"oO,0),-_,[{,;:,lL".split(","),q:[null,"1!","2@","wW","aA",null],r:"eE,4$,5%,tT,fF,dD".split(","),s:"aA,wW,eE,dD,xX,zZ".split(","),t:"rR,5%,6^,yY,gG,fF".split(","),u:"yY,7&,8*,iI,jJ,hH".split(","),v:["cC","fF","gG","bB",null,null],w:"qQ,2@,3#,eE,sS,aA".split(","),x:["zZ","sS","dD","cC",null,null],y:"tT,6^,7&,uU,hH,gG".split(","),z:[null,"aA","sS","xX",null,null],"{":"pP,-_,=+,]},'\",;:".split(","),"|":["]}",null,null,null,null,null],"}":["[{","=+",null,
"\\|",null,"'\""],"~":[null,null,null,"1!",null,null]},F={"*":["/",null,null,null,"-","+","9","8"],"+":["9","*","-",null,null,null,null,"6"],"-":["*",null,null,null,null,null,"+","9"],".":["0","2","3",null,null,null,null,null],"/":[null,null,null,null,"*","9","8","7"],"0":[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6",null,null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5",
"8","9","+",null,null,"3","2"],7:[null,null,null,"/","8","5","4",null],8:["7",null,"/","*","9","6","5","4"],9:["8","/","*","-","+",null,"6","5"]},w,G,oa,na,qa,pa,ra,u,x,H;w=[p("passwords",s("password,123456,12345678,1234,qwerty,12345,dragon,pussy,baseball,football,letmein,monkey,696969,abc123,mustang,shadow,master,111111,2000,jordan,superman,harley,1234567,fuckme,hunter,fuckyou,trustno1,ranger,buster,tigger,soccer,fuck,batman,test,pass,killer,hockey,charlie,love,sunshine,asshole,6969,pepper,access,123456789,654321,maggie,starwars,silver,dallas,yankees,123123,666666,hello,orange,biteme,freedom,computer,sexy,thunder,ginger,hammer,summer,corvette,fucker,austin,1111,merlin,121212,golfer,cheese,princess,chelsea,diamond,yellow,bigdog,secret,asdfgh,sparky,cowboy,camaro,matrix,falcon,iloveyou,guitar,purple,scooter,phoenix,aaaaaa,tigers,porsche,mickey,maverick,cookie,nascar,peanut,131313,money,horny,samantha,panties,steelers,snoopy,boomer,whatever,iceman,smokey,gateway,dakota,cowboys,eagles,chicken,dick,black,zxcvbn,ferrari,knight,hardcore,compaq,coffee,booboo,bitch,bulldog,xxxxxx,welcome,player,ncc1701,wizard,scooby,junior,internet,bigdick,brandy,tennis,blowjob,banana,monster,spider,lakers,rabbit,enter,mercedes,fender,yamaha,diablo,boston,tiger,marine,chicago,rangers,gandalf,winter,bigtits,barney,raiders,porn,badboy,blowme,spanky,bigdaddy,chester,london,midnight,blue,fishing,000000,hannah,slayer,11111111,sexsex,redsox,thx1138,asdf,marlboro,panther,zxcvbnm,arsenal,qazwsx,mother,7777777,jasper,winner,golden,butthead,viking,iwantu,angels,prince,cameron,girls,madison,hooters,startrek,captain,maddog,jasmine,butter,booger,golf,rocket,theman,liverpoo,flower,forever,muffin,turtle,sophie,redskins,toyota,sierra,winston,giants,packers,newyork,casper,bubba,112233,lovers,mountain,united,driver,helpme,fucking,pookie,lucky,maxwell,8675309,bear,suckit,gators,5150,222222,shithead,fuckoff,jaguar,hotdog,tits,gemini,lover,xxxxxxxx,777777,canada,florida,88888888,rosebud,metallic,doctor,trouble,success,stupid,tomcat,warrior,peaches,apples,fish,qwertyui,magic,buddy,dolphins,rainbow,gunner,987654,freddy,alexis,braves,cock,2112,1212,cocacola,xavier,dolphin,testing,bond007,member,voodoo,7777,samson,apollo,fire,tester,beavis,voyager,porno,rush2112,beer,apple,scorpio,skippy,sydney,red123,power,beaver,star,jackass,flyers,boobs,232323,zzzzzz,scorpion,doggie,legend,ou812,yankee,blazer,runner,birdie,bitches,555555,topgun,asdfasdf,heaven,viper,animal,2222,bigboy,4444,private,godzilla,lifehack,phantom,rock,august,sammy,cool,platinum,jake,bronco,heka6w2,copper,cumshot,garfield,willow,cunt,slut,69696969,kitten,super,jordan23,eagle1,shelby,america,11111,free,123321,chevy,bullshit,broncos,horney,surfer,nissan,999999,saturn,airborne,elephant,shit,action,adidas,qwert,1313,explorer,police,christin,december,wolf,sweet,therock,online,dickhead,brooklyn,cricket,racing,penis,0000,teens,redwings,dreams,michigan,hentai,magnum,87654321,donkey,trinity,digital,333333,cartman,guinness,123abc,speedy,buffalo,kitty,pimpin,eagle,einstein,nirvana,vampire,xxxx,playboy,pumpkin,snowball,test123,sucker,mexico,beatles,fantasy,celtic,cherry,cassie,888888,sniper,genesis,hotrod,reddog,alexande,college,jester,passw0rd,bigcock,lasvegas,slipknot,3333,death,1q2w3e,eclipse,1q2w3e4r,drummer,montana,music,aaaa,carolina,colorado,creative,hello1,goober,friday,bollocks,scotty,abcdef,bubbles,hawaii,fluffy,horses,thumper,5555,pussies,darkness,asdfghjk,boobies,buddha,sandman,naughty,honda,azerty,6666,shorty,money1,beach,loveme,4321,simple,poohbear,444444,badass,destiny,vikings,lizard,assman,nintendo,123qwe,november,xxxxx,october,leather,bastard,101010,extreme,password1,pussy1,lacrosse,hotmail,spooky,amateur,alaska,badger,paradise,maryjane,poop,mozart,video,vagina,spitfire,cherokee,cougar,420420,horse,enigma,raider,brazil,blonde,55555,dude,drowssap,lovely,1qaz2wsx,booty,snickers,nipples,diesel,rocks,eminem,westside,suzuki,passion,hummer,ladies,alpha,suckme,147147,pirate,semperfi,jupiter,redrum,freeuser,wanker,stinky,ducati,paris,babygirl,windows,spirit,pantera,monday,patches,brutus,smooth,penguin,marley,forest,cream,212121,flash,maximus,nipple,vision,pokemon,champion,fireman,indian,softball,picard,system,cobra,enjoy,lucky1,boogie,marines,security,dirty,admin,wildcats,pimp,dancer,hardon,fucked,abcd1234,abcdefg,ironman,wolverin,freepass,bigred,squirt,justice,hobbes,pearljam,mercury,domino,9999,rascal,hitman,mistress,bbbbbb,peekaboo,naked,budlight,electric,sluts,stargate,saints,bondage,bigman,zombie,swimming,duke,qwerty1,babes,scotland,disney,rooster,mookie,swordfis,hunting,blink182,8888,samsung,bubba1,whore,general,passport,aaaaaaaa,erotic,liberty,arizona,abcd,newport,skipper,rolltide,balls,happy1,galore,christ,weasel,242424,wombat,digger,classic,bulldogs,poopoo,accord,popcorn,turkey,bunny,mouse,007007,titanic,liverpool,dreamer,everton,chevelle,psycho,nemesis,pontiac,connor,eatme,lickme,cumming,ireland,spiderma,patriots,goblue,devils,empire,asdfg,cardinal,shaggy,froggy,qwer,kawasaki,kodiak,phpbb,54321,chopper,hooker,whynot,lesbian,snake,teen,ncc1701d,qqqqqq,airplane,britney,avalon,sugar,sublime,wildcat,raven,scarface,elizabet,123654,trucks,wolfpack,pervert,redhead,american,bambam,woody,shaved,snowman,tiger1,chicks,raptor,1969,stingray,shooter,france,stars,madmax,sports,789456,simpsons,lights,chronic,hahaha,packard,hendrix,service,spring,srinivas,spike,252525,bigmac,suck,single,popeye,tattoo,texas,bullet,taurus,sailor,wolves,panthers,japan,strike,pussycat,chris1,loverboy,berlin,sticky,tarheels,russia,wolfgang,testtest,mature,catch22,juice,michael1,nigger,159753,alpha1,trooper,hawkeye,freaky,dodgers,pakistan,machine,pyramid,vegeta,katana,moose,tinker,coyote,infinity,pepsi,letmein1,bang,hercules,james1,tickle,outlaw,browns,billybob,pickle,test1,sucks,pavilion,changeme,caesar,prelude,darkside,bowling,wutang,sunset,alabama,danger,zeppelin,pppppp,2001,ping,darkstar,madonna,qwe123,bigone,casino,charlie1,mmmmmm,integra,wrangler,apache,tweety,qwerty12,bobafett,transam,2323,seattle,ssssss,openup,pandora,pussys,trucker,indigo,storm,malibu,weed,review,babydoll,doggy,dilbert,pegasus,joker,catfish,flipper,fuckit,detroit,cheyenne,bruins,smoke,marino,fetish,xfiles,stinger,pizza,babe,stealth,manutd,gundam,cessna,longhorn,presario,mnbvcxz,wicked,mustang1,victory,21122112,awesome,athena,q1w2e3r4,holiday,knicks,redneck,12341234,gizmo,scully,dragon1,devildog,triumph,bluebird,shotgun,peewee,angel1,metallica,madman,impala,lennon,omega,access14,enterpri,search,smitty,blizzard,unicorn,tight,asdf1234,trigger,truck,beauty,thailand,1234567890,cadillac,castle,bobcat,buddy1,sunny,stones,asian,butt,loveyou,hellfire,hotsex,indiana,panzer,lonewolf,trumpet,colors,blaster,12121212,fireball,precious,jungle,atlanta,gold,corona,polaris,timber,theone,baller,chipper,skyline,dragons,dogs,licker,engineer,kong,pencil,basketba,hornet,barbie,wetpussy,indians,redman,foobar,travel,morpheus,target,141414,hotstuff,photos,rocky1,fuck_inside,dollar,turbo,design,hottie,202020,blondes,4128,lestat,avatar,goforit,random,abgrtyu,jjjjjj,cancer,q1w2e3,smiley,express,virgin,zipper,wrinkle1,babylon,consumer,monkey1,serenity,samurai,99999999,bigboobs,skeeter,joejoe,master1,aaaaa,chocolat,christia,stephani,tang,1234qwer,98765432,sexual,maxima,77777777,buckeye,highland,seminole,reaper,bassman,nugget,lucifer,airforce,nasty,warlock,2121,dodge,chrissy,burger,snatch,pink,gang,maddie,huskers,piglet,photo,dodger,paladin,chubby,buckeyes,hamlet,abcdefgh,bigfoot,sunday,manson,goldfish,garden,deftones,icecream,blondie,spartan,charger,stormy,juventus,galaxy,escort,zxcvb,planet,blues,david1,ncc1701e,1966,51505150,cavalier,gambit,ripper,oicu812,nylons,aardvark,whiskey,bing,plastic,anal,babylon5,loser,racecar,insane,yankees1,mememe,hansolo,chiefs,fredfred,freak,frog,salmon,concrete,zxcv,shamrock,atlantis,wordpass,rommel,1010,predator,massive,cats,sammy1,mister,stud,marathon,rubber,ding,trunks,desire,montreal,justme,faster,irish,1999,jessica1,alpine,diamonds,00000,swinger,shan,stallion,pitbull,letmein2,ming,shadow1,clitoris,fuckers,jackoff,bluesky,sundance,renegade,hollywoo,151515,wolfman,soldier,ling,goddess,manager,sweety,titans,fang,ficken,niners,bubble,hello123,ibanez,sweetpea,stocking,323232,tornado,content,aragorn,trojan,christop,rockstar,geronimo,pascal,crimson,google,fatcat,lovelove,cunts,stimpy,finger,wheels,viper1,latin,greenday,987654321,creampie,hiphop,snapper,funtime,duck,trombone,adult,cookies,mulder,westham,latino,jeep,ravens,drizzt,madness,energy,kinky,314159,slick,rocker,55555555,mongoose,speed,dddddd,catdog,cheng,ghost,gogogo,tottenha,curious,butterfl,mission,january,shark,techno,lancer,lalala,chichi,orion,trixie,delta,bobbob,bomber,kang,1968,spunky,liquid,beagle,granny,network,kkkkkk,1973,biggie,beetle,teacher,toronto,anakin,genius,cocks,dang,karate,snakes,bangkok,fuckyou2,pacific,daytona,infantry,skywalke,sailing,raistlin,vanhalen,huang,blackie,tarzan,strider,sherlock,gong,dietcoke,ultimate,shai,sprite,ting,artist,chai,chao,devil,python,ninja,ytrewq,superfly,456789,tian,jing,jesus1,freedom1,drpepper,chou,hobbit,shen,nolimit,mylove,biscuit,yahoo,shasta,sex4me,smoker,pebbles,pics,philly,tong,tintin,lesbians,cactus,frank1,tttttt,chun,danni,emerald,showme,pirates,lian,dogg,xiao,xian,tazman,tanker,toshiba,gotcha,rang,keng,jazz,bigguy,yuan,tomtom,chaos,fossil,racerx,creamy,bobo,musicman,warcraft,blade,shuang,shun,lick,jian,microsoft,rong,feng,getsome,quality,1977,beng,wwwwww,yoyoyo,zhang,seng,harder,qazxsw,qian,cong,chuan,deng,nang,boeing,keeper,western,1963,subaru,sheng,thuglife,teng,jiong,miao,mang,maniac,pussie,a1b2c3,zhou,zhuang,xing,stonecol,spyder,liang,jiang,memphis,ceng,magic1,logitech,chuang,sesame,shao,poison,titty,kuan,kuai,mian,guan,hamster,guai,ferret,geng,duan,pang,maiden,quan,velvet,nong,neng,nookie,buttons,bian,bingo,biao,zhong,zeng,zhun,ying,zong,xuan,zang,0.0.000,suan,shei,shui,sharks,shang,shua,peng,pian,piao,liao,meng,miami,reng,guang,cang,ruan,diao,luan,qing,chui,chuo,cuan,nuan,ning,heng,huan,kansas,muscle,weng,1passwor,bluemoon,zhui,zhua,xiang,zheng,zhen,zhei,zhao,zhan,yomama,zhai,zhuo,zuan,tarheel,shou,shuo,tiao,leng,kuang,jiao,13579,basket,qiao,qiong,qiang,chuai,nian,niao,niang,huai,22222222,zhuan,zhuai,shuan,shuai,stardust,jumper,66666666,charlott,qwertz,bones,waterloo,2002,11223344,oldman,trains,vertigo,246810,black1,swallow,smiles,standard,alexandr,parrot,user,1976,surfing,pioneer,apple1,asdasd,auburn,hannibal,frontier,panama,welcome1,vette,blue22,shemale,111222,baggins,groovy,global,181818,1979,blades,spanking,byteme,lobster,dawg,japanese,1970,1964,2424,polo,coco,deedee,mikey,1972,171717,1701,strip,jersey,green1,capital,putter,vader,seven7,banshee,grendel,dicks,hidden,iloveu,1980,ledzep,147258,female,bugger,buffett,molson,2020,wookie,sprint,jericho,102030,ranger1,trebor,deepthroat,bonehead,molly1,mirage,models,1984,2468,showtime,squirrel,pentium,anime,gator,powder,twister,connect,neptune,engine,eatshit,mustangs,woody1,shogun,septembe,pooh,jimbo,russian,sabine,voyeur,2525,363636,camel,germany,giant,qqqq,nudist,bone,sleepy,tequila,fighter,obiwan,makaveli,vacation,walnut,1974,ladybug,cantona,ccbill,satan,rusty1,passwor1,columbia,kissme,motorola,william1,1967,zzzz,skater,smut,matthew1,valley,coolio,dagger,boner,bull,horndog,jason1,penguins,rescue,griffey,8j4ye3uz,californ,champs,qwertyuiop,portland,colt45,xxxxxxx,xanadu,tacoma,carpet,gggggg,safety,palace,italia,picturs,picasso,thongs,tempest,asd123,hairy,foxtrot,nimrod,hotboy,343434,1111111,asdfghjkl,goose,overlord,stranger,454545,shaolin,sooners,socrates,spiderman,peanuts,13131313,andrew1,filthy,ohyeah,africa,intrepid,pickles,assass,fright,potato,hhhhhh,kingdom,weezer,424242,pepsi1,throat,looker,puppy,butch,sweets,megadeth,analsex,nymets,ddddddd,bigballs,oakland,oooooo,qweasd,chucky,carrot,chargers,discover,dookie,condor,horny1,sunrise,sinner,jojo,megapass,martini,assfuck,ffffff,mushroom,jamaica,7654321,77777,cccccc,gizmodo,tractor,mypass,hongkong,1975,blue123,pissing,thomas1,redred,basketball,satan666,dublin,bollox,kingkong,1971,22222,272727,sexx,bbbb,grizzly,passat,defiant,bowler,knickers,monitor,wisdom,slappy,thor,letsgo,robert1,brownie,098765,playtime,lightnin,atomic,goku,llllll,qwaszx,cosmos,bosco,knights,beast,slapshot,assword,frosty,dumbass,mallard,dddd,159357,titleist,aussie,golfing,doobie,loveit,werewolf,vipers,1965,blabla,surf,sucking,tardis,thegame,legion,rebels,sarah1,onelove,loulou,toto,blackcat,0007,tacobell,soccer1,jedi,method,poopie,boob,breast,kittycat,belly,pikachu,thunder1,thankyou,celtics,frogger,scoobydo,sabbath,coltrane,budman,jackal,zzzzz,licking,gopher,geheim,lonestar,primus,pooper,newpass,brasil,heather1,husker,element,moomoo,beefcake,zzzzzzzz,shitty,smokin,jjjj,anthony1,anubis,backup,gorilla,fuckface,lowrider,punkrock,traffic,delta1,amazon,fatass,dodgeram,dingdong,qqqqqqqq,breasts,boots,honda1,spidey,poker,temp,johnjohn,147852,asshole1,dogdog,tricky,crusader,syracuse,spankme,speaker,meridian,amadeus,harley1,falcons,turkey50,kenwood,keyboard,ilovesex,1978,shazam,shalom,lickit,jimbob,roller,fatman,sandiego,magnus,cooldude,clover,mobile,plumber,texas1,tool,topper,mariners,rebel,caliente,celica,oxford,osiris,orgasm,punkin,porsche9,tuesday,breeze,bossman,kangaroo,latinas,astros,scruffy,qwertyu,hearts,jammer,java,1122,goodtime,chelsea1,freckles,flyboy,doodle,nebraska,bootie,kicker,webmaster,vulcan,191919,blueeyes,321321,farside,rugby,director,pussy69,power1,hershey,hermes,monopoly,birdman,blessed,blackjac,southern,peterpan,thumbs,fuckyou1,rrrrrr,a1b2c3d4,coke,bohica,elvis1,blacky,sentinel,snake1,richard1,1234abcd,guardian,candyman,fisting,scarlet,dildo,pancho,mandingo,lucky7,condom,munchkin,billyboy,summer1,sword,skiing,site,sony,thong,rootbeer,assassin,fffff,fitness,durango,postal,achilles,kisses,warriors,plymouth,topdog,asterix,hallo,cameltoe,fuckfuck,eeeeee,sithlord,theking,avenger,backdoor,chevrole,trance,cosworth,houses,homers,eternity,kingpin,verbatim,incubus,1961,blond,zaphod,shiloh,spurs,mighty,aliens,charly,dogman,omega1,printer,aggies,deadhead,bitch1,stone55,pineappl,thekid,rockets,camels,formula,oracle,pussey,porkchop,abcde,clancy,mystic,inferno,blackdog,steve1,alfa,grumpy,flames,puffy,proxy,valhalla,unreal,herbie,engage,yyyyyy,010101,pistol,celeb,gggg,portugal,a12345,newbie,mmmm,1qazxsw2,zorro,writer,stripper,sebastia,spread,links,metal,1221,565656,funfun,trojans,cyber,hurrican,moneys,1x2zkg8w,zeus,tomato,lion,atlantic,usa123,trans,aaaaaaa,homerun,hyperion,kevin1,blacks,44444444,skittles,fart,gangbang,fubar,sailboat,oilers,buster1,hithere,immortal,sticks,pilot,lexmark,jerkoff,maryland,cheers,possum,cutter,muppet,swordfish,sport,sonic,peter1,jethro,rockon,asdfghj,pass123,pornos,ncc1701a,bootys,buttman,bonjour,1960,bears,362436,spartans,tinman,threesom,maxmax,1414,bbbbb,camelot,chewie,gogo,fusion,saint,dilligaf,nopass,hustler,hunter1,whitey,beast1,yesyes,spank,smudge,pinkfloy,patriot,lespaul,hammers,formula1,sausage,scooter1,orioles,oscar1,colombia,cramps,exotic,iguana,suckers,slave,topcat,lancelot,magelan,racer,crunch,british,steph,456123,skinny,seeking,rockhard,filter,freaks,sakura,pacman,poontang,newlife,homer1,klingon,watcher,walleye,tasty,sinatra,starship,steel,starbuck,poncho,amber1,gonzo,catherin,candle,firefly,goblin,scotch,diver,usmc,huskies,kentucky,kitkat,beckham,bicycle,yourmom,studio,33333333,splash,jimmy1,12344321,sapphire,mailman,raiders1,ddddd,excalibu,illini,imperial,lansing,maxx,gothic,golfball,facial,front242,macdaddy,qwer1234,vectra,cowboys1,crazy1,dannyboy,aquarius,franky,ffff,sassy,pppp,pppppppp,prodigy,noodle,eatpussy,vortex,wanking,billy1,siemens,phillies,groups,chevy1,cccc,gggggggg,doughboy,dracula,nurses,loco,lollipop,utopia,chrono,cooler,nevada,wibble,summit,1225,capone,fugazi,panda,qazwsxed,puppies,triton,9876,nnnnnn,momoney,iforgot,wolfie,studly,hamburg,81fukkc,741852,catman,china,gagging,scott1,oregon,qweqwe,crazybab,daniel1,cutlass,holes,mothers,music1,walrus,1957,bigtime,xtreme,simba,ssss,rookie,bathing,rotten,maestro,turbo1,99999,butthole,hhhh,yoda,shania,phish,thecat,rightnow,baddog,greatone,gateway1,abstr,napster,brian1,bogart,hitler,wildfire,jackson1,1981,beaner,yoyo,0.0.0.000,super1,select,snuggles,slutty,phoenix1,technics,toon,raven1,rayray,123789,1066,albion,greens,gesperrt,brucelee,hehehe,kelly1,mojo,1998,bikini,woofwoof,yyyy,strap,sites,central,f**k,nyjets,punisher,username,vanilla,twisted,bunghole,viagra,veritas,pony,titts,labtec,jenny1,masterbate,mayhem,redbull,govols,gremlin,505050,gmoney,rovers,diamond1,trident,abnormal,deskjet,cuddles,bristol,milano,vh5150,jarhead,1982,bigbird,bizkit,sixers,slider,star69,starfish,penetration,tommy1,john316,caligula,flicks,films,railroad,cosmo,cthulhu,br0d3r,bearbear,swedish,spawn,patrick1,reds,anarchy,groove,fuckher,oooo,airbus,cobra1,clips,delete,duster,kitty1,mouse1,monkeys,jazzman,1919,262626,swinging,stroke,stocks,sting,pippen,labrador,jordan1,justdoit,meatball,females,vector,cooter,defender,nike,bubbas,bonkers,kahuna,wildman,4121,sirius,static,piercing,terror,teenage,leelee,microsof,mechanic,robotech,rated,chaser,salsero,macross,quantum,tsunami,daddy1,cruise,newpass6,nudes,hellyeah,1959,zaq12wsx,striker,spice,spectrum,smegma,thumb,jjjjjjjj,mellow,cancun,cartoon,sabres,samiam,oranges,oklahoma,lust,denali,nude,noodles,brest,hooter,mmmmmmmm,warthog,blueblue,zappa,wolverine,sniffing,jjjjj,calico,freee,rover,pooter,closeup,bonsai,emily1,keystone,iiii,1955,yzerman,theboss,tolkien,megaman,rasta,bbbbbbbb,hal9000,goofy,gringo,gofish,gizmo1,samsam,scuba,onlyme,tttttttt,corrado,clown,clapton,bulls,jayhawk,wwww,sharky,seeker,ssssssss,pillow,thesims,lighter,lkjhgf,melissa1,marcius2,guiness,gymnast,casey1,goalie,godsmack,lolo,rangers1,poppy,clemson,clipper,deeznuts,holly1,eeee,kingston,yosemite,sucked,sex123,sexy69,pic\\'s,tommyboy,masterbating,gretzky,happyday,frisco,orchid,orange1,manchest,aberdeen,ne1469,boxing,korn,intercourse,161616,1985,ziggy,supersta,stoney,amature,babyboy,bcfields,goliath,hack,hardrock,frodo,scout,scrappy,qazqaz,tracker,active,craving,commando,cohiba,cyclone,bubba69,katie1,mpegs,vsegda,irish1,sexy1,smelly,squerting,lions,jokers,jojojo,meathead,ashley1,groucho,cheetah,champ,firefox,gandalf1,packer,love69,tyler1,typhoon,tundra,bobby1,kenworth,village,volley,wolf359,0420,000007,swimmer,skydive,smokes,peugeot,pompey,legolas,redhot,rodman,redalert,grapes,4runner,carrera,floppy,ou8122,quattro,cloud9,davids,nofear,busty,homemade,mmmmm,whisper,vermont,webmaste,wives,insertion,jayjay,philips,topher,temptress,midget,ripken,havefun,canon,celebrity,ghetto,ragnarok,usnavy,conover,cruiser,dalshe,nicole1,buzzard,hottest,kingfish,misfit,milfnew,warlord,wassup,bigsexy,blackhaw,zippy,tights,kungfu,labia,meatloaf,area51,batman1,bananas,636363,ggggg,paradox,queens,adults,aikido,cigars,hoosier,eeyore,moose1,warez,interacial,streaming,313131,pertinant,pool6123,mayday,animated,banker,baddest,gordon24,ccccc,fantasies,aisan,deadman,homepage,ejaculation,whocares,iscool,jamesbon,1956,1pussy,womam,sweden,skidoo,spock,sssss,pepper1,pinhead,micron,allsop,amsterda,gunnar,666999,february,fletch,george1,sapper,sasha1,luckydog,lover1,magick,popopo,ultima,cypress,businessbabe,brandon1,vulva,vvvv,jabroni,bigbear,yummy,010203,searay,secret1,sinbad,sexxxx,soleil,software,piccolo,thirteen,leopard,legacy,memorex,redwing,rasputin,134679,anfield,greenbay,catcat,feather,scanner,pa55word,contortionist,danzig,daisy1,hores,exodus,iiiiii,1001,subway,snapple,sneakers,sonyfuck,picks,poodle,test1234,llll,junebug,marker,mellon,ronaldo,roadkill,amanda1,asdfjkl,beaches,great1,cheerleaers,doitnow,ozzy,boxster,brighton,housewifes,kkkk,mnbvcx,moocow,vides,1717,bigmoney,blonds,1000,storys,stereo,4545,420247,seductive,sexygirl,lesbean,justin1,124578,cabbage,canadian,gangbanged,dodge1,dimas,malaka,puss,probes,coolman,nacked,hotpussy,erotica,kool,implants,intruder,bigass,zenith,woohoo,womans,tango,pisces,laguna,maxell,andyod22,barcelon,chainsaw,chickens,flash1,orgasms,magicman,profit,pusyy,pothead,coconut,chuckie,clevelan,builder,budweise,hotshot,horizon,experienced,mondeo,wifes,1962,stumpy,smiths,slacker,pitchers,passwords,laptop,allmine,alliance,bbbbbbb,asscock,halflife,88888,chacha,saratoga,sandy1,doogie,qwert40,transexual,close-up,ib6ub9,volvo,jacob1,iiiii,beastie,sunnyday,stoned,sonics,starfire,snapon,pictuers,pepe,testing1,tiberius,lisalisa,lesbain,litle,retard,ripple,austin1,badgirl,golfgolf,flounder,royals,dragoon,dickie,passwor,majestic,poppop,trailers,nokia,bobobo,br549,minime,mikemike,whitesox,1954,3232,353535,seamus,solo,sluttey,pictere,titten,lback,1024,goodluck,fingerig,gallaries,goat,passme,oasis,lockerroom,logan1,rainman,treasure,custom,cyclops,nipper,bucket,homepage-,hhhhh,momsuck,indain,2345,beerbeer,bimmer,stunner,456456,tootsie,testerer,reefer,1012,harcore,gollum,545454,chico,caveman,fordf150,fishes,gaymen,saleen,doodoo,pa55w0rd,presto,qqqqq,cigar,bogey,helloo,dutch,kamikaze,wasser,vietnam,visa,japanees,0123,swords,slapper,peach,masterbaiting,redwood,1005,ametuer,chiks,fucing,sadie1,panasoni,mamas,rambo,unknown,absolut,dallas1,housewife,keywest,kipper,18436572,1515,zxczxc,303030,shaman,terrapin,masturbation,mick,redfish,1492,angus,goirish,hardcock,forfun,galary,freeporn,duchess,olivier,lotus,pornographic,ramses,purdue,traveler,crave,brando,enter1,killme,moneyman,welder,windsor,wifey,indon,yyyyy,taylor1,4417,picher,pickup,thumbnils,johnboy,jets,ameteur,amateurs,apollo13,hambone,goldwing,5050,sally1,doghouse,padres,pounding,quest,truelove,underdog,trader,climber,bolitas,hohoho,beanie,beretta,wrestlin,stroker,sexyman,jewels,johannes,mets,rhino,bdsm,balloons,grils,happy123,flamingo,route66,devo,outkast,paintbal,magpie,llllllll,twilight,critter,cupcake,nickel,bullseye,knickerless,videoes,binladen,xerxes,slim,slinky,pinky,thanatos,meister,menace,retired,albatros,balloon,goten,5551212,getsdown,donuts,nwo4life,tttt,comet,deer,dddddddd,deeznutz,nasty1,nonono,enterprise,eeeee,misfit99,milkman,vvvvvv,1818,blueboy,bigbutt,tech,toolman,juggalo,jetski,barefoot,50spanks,gobears,scandinavian,cubbies,nitram,kings,bilbo,yumyum,zzzzzzz,stylus,321654,shannon1,server,squash,starman,steeler,phrases,techniques,laser,135790,athens,cbr600,chemical,fester,gangsta,fucku2,droopy,objects,passwd,lllll,manchester,vedder,clit,chunky,darkman,buckshot,buddah,boobed,henti,winter1,bigmike,beta,zidane,talon,slave1,pissoff,thegreat,lexus,matador,readers,armani,goldstar,5656,fmale,fuking,fucku,ggggggg,sauron,diggler,pacers,looser,pounded,premier,triangle,cosmic,depeche,norway,helmet,mustard,misty1,jagger,3x7pxr,silver1,snowboar,penetrating,photoes,lesbens,lindros,roadking,rockford,1357,143143,asasas,goodboy,898989,chicago1,ferrari1,galeries,godfathe,gawker,gargoyle,gangster,rubble,rrrr,onetime,pussyman,pooppoop,trapper,cinder,newcastl,boricua,bunny1,boxer,hotred,hockey1,edward1,moscow,mortgage,bigtit,snoopdog,joshua1,july,1230,assholes,frisky,sanity,divine,dharma,lucky13,akira,butterfly,hotbox,hootie,howdy,earthlink,kiteboy,westwood,1988,blackbir,biggles,wrench,wrestle,slippery,pheonix,penny1,pianoman,thedude,jenn,jonjon,jones1,roadrunn,arrow,azzer,seahawks,diehard,dotcom,tunafish,chivas,cinnamon,clouds,deluxe,northern,boobie,momomo,modles,volume,23232323,bluedog,wwwwwww,zerocool,yousuck,pluto,limewire,joung,awnyce,gonavy,haha,films+pic+galeries,girsl,fuckthis,girfriend,uncencored,a123456,chrisbln,combat,cygnus,cupoi,netscape,hhhhhhhh,eagles1,elite,knockers,1958,tazmania,shonuf,pharmacy,thedog,midway,arsenal1,anaconda,australi,gromit,gotohell,787878,66666,carmex2,camber,gator1,ginger1,fuzzy,seadoo,lovesex,rancid,uuuuuu,911911,bulldog1,heater,monalisa,mmmmmmm,whiteout,virtual,jamie1,japanes,james007,2727,2469,blam,bitchass,zephyr,stiffy,sweet1,southpar,spectre,tigger1,tekken,lakota,lionking,jjjjjjj,megatron,1369,hawaiian,gymnastic,golfer1,gunners,7779311,515151,sanfran,optimus,panther1,love1,maggie1,pudding,aaron1,delphi,niceass,bounce,house1,killer1,momo,musashi,jammin,2003,234567,wp2003wp,submit,sssssss,spikes,sleeper,passwort,kume,meme,medusa,mantis,reebok,1017,artemis,harry1,cafc91,fettish,oceans,oooooooo,mango,ppppp,trainer,uuuu,909090,death1,bullfrog,hokies,holyshit,eeeeeee,jasmine1,&,&,spinner,jockey,babyblue,gooner,474747,cheeks,pass1234,parola,okokok,poseidon,989898,crusher,cubswin,nnnn,kotaku,mittens,whatsup,vvvvv,iomega,insertions,bengals,biit,yellow1,012345,spike1,sowhat,pitures,pecker,theend,hayabusa,hawkeyes,florian,qaz123,usarmy,twinkle,chuckles,hounddog,hover,hothot,europa,kenshin,kojak,mikey1,water1,196969,wraith,zebra,wwwww,33333,simon1,spider1,snuffy,philippe,thunderb,teddy1,marino13,maria1,redline,renault,aloha,handyman,cerberus,gamecock,gobucks,freesex,duffman,ooooo,nuggets,magician,longbow,preacher,porno1,chrysler,contains,dalejr,navy,buffy1,hedgehog,hoosiers,honey1,hott,heyhey,dutchess,everest,wareagle,ihateyou,sunflowe,3434,senators,shag,spoon,sonoma,stalker,poochie,terminal,terefon,maradona,1007,142536,alibaba,america1,bartman,astro,goth,chicken1,cheater,ghost1,passpass,oral,r2d2c3po,civic,cicero,myxworld,kkkkk,missouri,wishbone,infiniti,1a2b3c,1qwerty,wonderboy,shojou,sparky1,smeghead,poiuy,titanium,lantern,jelly,1213,bayern,basset,gsxr750,cattle,fishing1,fullmoon,gilles,dima,obelix,popo,prissy,ramrod,bummer,hotone,dynasty,entry,konyor,missy1,282828,xyz123,426hemi,404040,seinfeld,pingpong,lazarus,marine1,12345a,beamer,babyface,greece,gustav,7007,ccccccc,faggot,foxy,gladiato,duckie,dogfood,packers1,longjohn,radical,tuna,clarinet,danny1,novell,bonbon,kashmir,kiki,mortimer,modelsne,moondog,vladimir,insert,1953,zxc123,supreme,3131,sexxx,softail,poipoi,pong,mars,martin1,rogue,avalanch,audia4,55bgates,cccccccc,came11,figaro,dogboy,dnsadm,dipshit,paradigm,othello,operator,tripod,chopin,coucou,cocksuck,borussia,heritage,hiziad,homerj,mullet,whisky,4242,speedo,starcraf,skylar,spaceman,piggy,tiger2,legos,jezebel,joker1,mazda,727272,chester1,rrrrrrrr,dundee,lumber,ppppppp,tranny,aaliyah,admiral,comics,delight,buttfuck,homeboy,eternal,kilroy,violin,wingman,walmart,bigblue,blaze,beemer,beowulf,bigfish,yyyyyyy,woodie,yeahbaby,0123456,tbone,syzygy,starter,linda1,merlot,mexican,11235813,banner,bangbang,badman,barfly,grease,charles1,ffffffff,doberman,dogshit,overkill,coolguy,claymore,demo,nomore,hhhhhhh,hondas,iamgod,enterme,electron,eastside,minimoni,mybaby,wildbill,wildcard,ipswich,200000,bearcat,zigzag,yyyyyyyy,sweetnes,369369,skyler,skywalker,pigeon,tipper,asdf123,alphabet,asdzxc,babybaby,banane,guyver,graphics,chinook,florida1,flexible,fuckinside,ursitesux,tototo,adam12,christma,chrome,buddie,bombers,hippie,misfits,292929,woofer,wwwwwwww,stubby,sheep,sparta,stang,spud,sporty,pinball,just4fun,maxxxx,rebecca1,fffffff,freeway,garion,rrrrr,sancho,outback,maggot,puddin,987456,hoops,mydick,19691969,bigcat,shiner,silverad,templar,lamer,juicy,mike1,maximum,1223,10101010,arrows,alucard,haggis,cheech,safari,dog123,orion1,paloma,qwerasdf,presiden,vegitto,969696,adonis,cookie1,newyork1,buddyboy,hellos,heineken,eraser,moritz,millwall,visual,jaybird,1983,beautifu,zodiac,steven1,sinister,slammer,smashing,slick1,sponge,teddybea,ticklish,jonny,1211,aptiva,applepie,bailey1,guitar1,canyon,gagged,fuckme1,digital1,dinosaur,98765,90210,clowns,cubs,deejay,nigga,naruto,boxcar,icehouse,hotties,electra,widget,1986,2004,bluefish,bingo1,*****,stratus,sultan,storm1,44444,4200,sentnece,sexyboy,sigma,smokie,spam,pippo,temppass,manman,1022,bacchus,aztnm,axio,bamboo,hakr,gregor,hahahaha,5678,camero1,dolphin1,paddle,magnet,qwert1,pyon,porsche1,tripper,noway,burrito,bozo,highheel,hookem,eddie1,entropy,kkkkkkkk,kkkkkkk,illinois,1945,1951,24680,21212121,100000,stonecold,taco,subzero,sexxxy,skolko,skyhawk,spurs1,sputnik,testpass,jiggaman,1224,hannah1,525252,4ever,carbon,scorpio1,rt6ytere,madison1,loki,coolness,coldbeer,citadel,monarch,morgan1,washingt,1997,bella1,yaya,superb,taxman,studman,3636,pizzas,tiffany1,lassie,larry1,joseph1,mephisto,reptile,razor,1013,hammer1,gypsy,grande,camper,chippy,cat123,chimera,fiesta,glock,domain,dieter,dragonba,onetwo,nygiants,password2,quartz,prowler,prophet,towers,ultra,cocker,corleone,dakota1,cumm,nnnnnnn,boxers,heynow,iceberg,kittykat,wasabi,vikings1,beerman,splinter,snoopy1,pipeline,mickey1,mermaid,micro,meowmeow,redbird,baura,chevys,caravan,frogman,diving,dogger,draven,drifter,oatmeal,paris1,longdong,quant4307s,rachel1,vegitta,cobras,corsair,dadada,mylife,bowwow,hotrats,eastwood,moonligh,modena,illusion,iiiiiii,jayhawks,swingers,shocker,shrimp,sexgod,squall,poiu,tigers1,toejam,tickler,julie1,jimbo1,jefferso,michael2,rodeo,robot,1023,annie1,bball,happy2,charter,flasher,falcon1,fiction,fastball,gadget,scrabble,diaper,dirtbike,oliver1,paco,macman,poopy,popper,postman,ttttttt,acura,cowboy1,conan,daewoo,nemrac58,nnnnn,nextel,bobdylan,eureka,kimmie,kcj9wx5n,killbill,musica,volkswag,wage,windmill,wert,vintage,iloveyou1,itsme,zippo,311311,starligh,smokey1,snappy,soulmate,plasma,krusty,just4me,marius,rebel1,1123,audi,fick,goaway,rusty2,dogbone,doofus,ooooooo,oblivion,mankind,mahler,lllllll,pumper,puck,pulsar,valkyrie,tupac,compass,concorde,cougars,delaware,niceguy,nocturne,bob123,boating,bronze,herewego,hewlett,houhou,earnhard,eeeeeeee,mingus,mobydick,venture,verizon,imation,1950,1948,1949,223344,bigbig,wowwow,sissy,spiker,snooker,sluggo,player1,jsbach,jumbo,medic,reddevil,reckless,123456a,1125,1031,astra,gumby,757575,585858,chillin,fuck1,radiohea,upyours,trek,coolcool,classics,choochoo,nikki1,nitro,boytoy,excite,kirsty,wingnut,wireless,icu812,1master,beatle,bigblock,wolfen,summer99,sugar1,tartar,sexysexy,senna,sexman,soprano,platypus,pixies,telephon,laura1,laurent,rimmer,1020,12qwaszx,hamish,halifax,fishhead,forum,dododo,doit,paramedi,lonesome,mandy1,uuuuu,uranus,ttttt,bruce1,helper,hopeful,eduard,dusty1,kathy1,moonbeam,muscles,monster1,monkeybo,windsurf,vvvvvvv,vivid,install,1947,187187,1941,1952,susan1,31415926,sinned,sexxy,smoothie,snowflak,playstat,playa,playboy1,toaster,jerry1,marie1,mason1,merlin1,roger1,roadster,112358,1121,andrea1,bacardi,hardware,789789,5555555,captain1,fergus,sascha,rrrrrrr,dome,onion,lololo,qqqqqqq,undertak,uuuuuuuu,uuuuuuu,cobain,cindy1,coors,descent,nimbus,nomad,nanook,norwich,bombay,broker,hookup,kiwi,winners,jackpot,1a2b3c4d,1776,beardog,bighead,bird33,0987,spooge,pelican,peepee,titan,thedoors,jeremy1,altima,baba,hardone,5454,catwoman,finance,farmboy,farscape,genesis1,salomon,loser1,r2d2,pumpkins,chriss,cumcum,ninjas,ninja1,killers,miller1,islander,jamesbond,intel,19841984,2626,bizzare,blue12,biker,yoyoma,sushi,shitface,spanker,steffi,sphinx,please1,paulie,pistons,tiburon,maxwell1,mdogg,rockies,armstron,alejandr,arctic,banger,audio,asimov,753951,4you,chilly,care1839,flyfish,fantasia,freefall,sandrine,oreo,ohshit,macbeth,madcat,loveya,qwerqwer,colnago,chocha,cobalt,crystal1,dabears,nevets,nineinch,broncos1,epsilon,kestrel,winston1,warrior1,iiiiiiii,iloveyou2,1616,woowoo,sloppy,specialk,tinkerbe,jellybea,reader,redsox1,1215,1112,arcadia,baggio,555666,cayman,cbr900rr,gabriell,glennwei,sausages,disco,pass1,lovebug,macmac,puffin,vanguard,trinitro,airwolf,aaa111,cocaine,cisco,datsun,bricks,bumper,eldorado,kidrock,wizard1,whiskers,wildwood,istheman,25802580,bigones,woodland,wolfpac,strawber,3030,sheba1,sixpack,peace1,physics,tigger2,toad,megan1,meow,ringo,amsterdam,717171,686868,5424,canuck,football1,footjob,fulham,seagull,orgy,lobo,mancity,vancouve,vauxhall,acidburn,derf,myspace1,boozer,buttercu,hola,minemine,munch,1dragon,biology,bestbuy,bigpoppa,blackout,blowfish,bmw325,bigbob,stream,talisman,tazz,sundevil,3333333,skate,shutup,shanghai,spencer1,slowhand,pinky1,tootie,thecrow,jubilee,jingle,matrix1,manowar,messiah,resident,redbaron,romans,andromed,athlon,beach1,badgers,guitars,harald,harddick,gotribe,6996,7grout,5wr2i7h8,635241,chase1,fallout,fiddle,fenris,francesc,fortuna,fairlane,felix1,gasman,fucks,sahara,sassy1,dogpound,dogbert,divx1,manila,pornporn,quasar,venom,987987,access1,clippers,daman,crusty,nathan1,nnnnnnnn,bruno1,budapest,kittens,kerouac,mother1,waldo1,whistler,whatwhat,wanderer,idontkno,1942,1946,bigdawg,bigpimp,zaqwsx,414141,3000gt,434343,serpent,smurf,pasword,thisisit,john1,robotics,redeye,rebelz,1011,alatam,asians,bama,banzai,harvest,575757,5329,fatty,fender1,flower2,funky,sambo,drummer1,dogcat,oedipus,osama,prozac,private1,rampage,concord,cinema,cornwall,cleaner,ciccio,clutch,corvet07,daemon,bruiser,boiler,hjkl,egghead,mordor,jamess,iverson3,bluesman,zouzou,090909,1002,stone1,4040,sexo,smith1,sperma,sneaky,polska,thewho,terminat,krypton,lekker,johnson1,johann,rockie,aspire,goodie,cheese1,fenway,fishon,fishin,fuckoff1,girls1,doomsday,pornking,ramones,rabbits,transit,aaaaa1,boyz,bookworm,bongo,bunnies,buceta,highbury,henry1,eastern,mischief,mopar,ministry,vienna,wildone,bigbooty,beavis1,xxxxxx1,yogibear,000001,0815,zulu,420000,sigmar,sprout,stalin,lkjhgfds,lagnaf,rolex,redfox,referee,123123123,1231,angus1,ballin,attila,greedy,grunt,747474,carpedie,caramel,foxylady,gatorade,futbol,frosch,saiyan,drums,donner,doggy1,drum,doudou,nutmeg,quebec,valdepen,tosser,tuscl,comein,cola,deadpool,bremen,hotass,hotmail1,eskimo,eggman,koko,kieran,katrin,kordell1,komodo,mone,munich,vvvvvvvv,jackson5,2222222,bergkamp,bigben,zanzibar,xxx123,sunny1,373737,slayer1,snoop,peachy,thecure,little1,jennaj,rasta69,1114,aries,havana,gratis,calgary,checkers,flanker,salope,dirty1,draco,dogface,luv2epus,rainbow6,qwerty123,umpire,turnip,vbnm,tucson,troll,codered,commande,neon,nico,nightwin,boomer1,bushido,hotmail0,enternow,keepout,karen1,mnbv,viewsoni,volcom,wizards,1995,berkeley,woodstoc,tarpon,shinobi,starstar,phat,toolbox,julien,johnny1,joebob,riders,reflex,120676,1235,angelus,anthrax,atlas,grandam,harlem,hawaii50,655321,cabron,challeng,callisto,firewall,firefire,flyer,flower1,gambler,frodo1,sam123,scania,dingo,papito,passmast,ou8123,randy1,twiggy,travis1,treetop,addict,admin1,963852,aceace,cirrus,bobdole,bonjovi,bootsy,boater,elway7,kenny1,moonshin,montag,wayne1,white1,jazzy,jakejake,1994,1991,2828,bluejays,belmont,sensei,southpark,peeper,pharao,pigpen,tomahawk,teensex,leedsutd,jeepster,jimjim,josephin,melons,matthias,robocop,1003,1027,antelope,azsxdc,gordo,hazard,granada,8989,7894,ceasar,cabernet,cheshire,chelle,candy1,fergie,fidelio,giorgio,fuckhead,dominion,qawsed,trucking,chloe1,daddyo,nostromo,boyboy,booster,bucky,honolulu,esquire,dynamite,mollydog,windows1,waffle,wealth,vincent1,jabber,jaguars,javelin,irishman,idefix,bigdog1,blue42,blanked,blue32,biteme1,bearcats,yessir,sylveste,sunfire,tbird,stryker,3ip76k2,sevens,pilgrim,tenchi,titman,leeds,lithium,linkin,marijuan,mariner,markie,midnite,reddwarf,1129,123asd,12312312,allstar,albany,asdf12,aspen,hardball,goldfing,7734,49ers,carnage,callum,carlos1,fitter,fandango,gofast,gamma,fucmy69,scrapper,dogwood,django,magneto,premium,9999999,abc1234,newyear,bookie,bounty,brown1,bologna,elway,killjoy,klondike,mouser,wayer,impreza,insomnia,24682468,2580,24242424,billbill,bellaco,blues1,blunts,teaser,sf49ers,shovel,solitude,spikey,pimpdadd,timeout,toffee,lefty,johndoe,johndeer,mega,manolo,ratman,robin1,1124,1210,1028,1226,babylove,barbados,gramma,646464,carpente,chaos1,fishbone,fireblad,frogs,screamer,scuba1,ducks,doggies,dicky,obsidian,rams,tottenham,aikman,comanche,corolla,cumslut,cyborg,boston1,houdini,helmut,elvisp,keksa12,monty1,wetter,watford,wiseguy,1989,1987,20202020,biatch,beezer,bigguns,blueball,bitchy,wyoming,yankees2,wrestler,stupid1,sealteam,sidekick,simple1,smackdow,sporting,spiral,smeller,plato,tophat,test2,toomuch,jello,junkie,maxim,maxime,meadow,remingto,roofer,124038,1018,1269,1227,123457,arkansas,aramis,beaker,barcelona,baltimor,googoo,goochi,852456,4711,catcher,champ1,fortress,fishfish,firefigh,geezer,rsalinas,samuel1,saigon,scooby1,dick1,doom,dontknow,magpies,manfred,vader1,universa,tulips,mygirl,bowtie,holycow,honeys,enforcer,waterboy,1992,23skidoo,bimbo,blue11,birddog,zildjian,030303,stinker,stoppedby,sexybabe,speakers,slugger,spotty,smoke1,polopolo,perfect1,torpedo,lakeside,jimmys,junior1,masamune,1214,april1,grinch,767676,5252,cherries,chipmunk,cezer121,carnival,capecod,finder,fearless,goats,funstuff,gideon,savior,seabee,sandro,schalke,salasana,disney1,duckman,pancake,pantera1,malice,love123,qwert123,tracer,creation,cwoui,nascar24,hookers,erection,ericsson,edthom,kokoko,kokomo,mooses,inter,1michael,1993,19781978,25252525,shibby,shamus,skibum,sheepdog,sex69,spliff,slipper,spoons,spanner,snowbird,toriamos,temp123,tennesse,lakers1,jomama,mazdarx7,recon,revolver,1025,1101,barney1,babycake,gotham,gravity,hallowee,616161,515000,caca,cannabis,chilli,fdsa,getout,fuck69,gators1,sable,rumble,dolemite,dork,duffer,dodgers1,onions,logger,lookout,magic32,poon,twat,coventry,citroen,civicsi,cocksucker,coochie,compaq1,nancy1,buzzer,boulder,butkus,bungle,hogtied,hotgirls,heidi1,eggplant,mustang6,monkey12,wapapapa,wendy1,volleyba,vibrate,blink,birthday4,xxxxx1,stephen1,suburban,sheeba,start1,soccer10,starcraft,soccer12,peanut1,plastics,penthous,peterbil,tetsuo,torino,tennis1,termite,lemmein,lakewood,jughead,melrose,megane,redone,angela1,goodgirl,gonzo1,golden1,gotyoass,656565,626262,capricor,chains,calvin1,getmoney,gabber,runaway,salami,dungeon,dudedude,opus,paragon,panhead,pasadena,opendoor,odyssey,magellan,printing,prince1,trustme,nono,buffet,hound,kajak,killkill,moto,winner1,vixen,whiteboy,versace,voyager1,indy,jackjack,bigal,beech,biggun,blake1,blue99,big1,synergy,success1,336699,sixty9,shark1,simba1,sebring,spongebo,spunk,springs,sliver,phialpha,password9,pizza1,pookey,tickling,lexingky,lawman,joe123,mike123,romeo1,redheads,apple123,backbone,aviation,green123,carlitos,byebye,cartman1,camden,chewy,camaross,favorite6,forumwp,ginscoot,fruity,sabrina1,devil666,doughnut,pantie,oldone,paintball,lumina,rainbow1,prosper,umbrella,ajax,951753,achtung,abc12345,compact,corndog,deerhunt,darklord,dank,nimitz,brandy1,hetfield,holein1,hillbill,hugetits,evolutio,kenobi,whiplash,wg8e3wjf,istanbul,invis,1996,bigjohn,bluebell,beater,benji,bluejay,xyzzy,suckdick,taichi,stellar,shaker,semper,splurge,squeak,pearls,playball,pooky,titfuck,joemama,johnny5,marcello,maxi,rhubarb,ratboy,reload,1029,1030,1220,bbking,baritone,gryphon,57chevy,494949,celeron,fishy,gladiator,fucker1,roswell,dougie,dicker,diva,donjuan,nympho,racers,truck1,trample,acer,cricket1,climax,denmark,cuervo,notnow,nittany,neutron,bosco1,buffa,breaker,hello2,hydro,kisskiss,kittys,montecar,modem,mississi,20012001,bigdick1,benfica,yahoo1,striper,tabasco,supra,383838,456654,seneca,shuttle,penguin1,pathfind,testibil,thethe,jeter2,marma,mark1,metoo,republic,rollin,redleg,redbone,redskin,1245,anthony7,altoids,barley,asswipe,bauhaus,bbbbbb1,gohome,harrier,golfpro,goldeney,818181,6666666,5000,5rxypn,cameron1,checker,calibra,freefree,faith1,fdm7ed,giraffe,giggles,fringe,scamper,rrpass1,screwyou,dimples,pacino,ontario,passthie,oberon,quest1,postov1000,puppydog,puffer,qwerty7,tribal,adam25,a1234567,collie,cleopatr,davide,namaste,buffalo1,bonovox,bukkake,burner,bordeaux,burly,hun999,enters,mohawk,vgirl,jayden,1812,1943,222333,bigjim,bigd,zoom,wordup,ziggy1,yahooo,workout,young1,xmas,zzzzzz1,surfer1,strife,sunlight,tasha1,skunk,sprinter,peaches1,pinetree,plum,pimping,theforce,thedon,toocool,laddie,lkjh,jupiter1,matty,redrose,1200,102938,antares,austin31,goose1,737373,78945612,789987,6464,calimero,caster,casper1,cement,chevrolet,chessie,caddy,canucks,fellatio,f00tball,gateway2,gamecube,rugby1,scheisse,dshade,dixie1,offshore,lucas1,macaroni,manga,pringles,puff,trouble1,ussy,coolhand,colonial,colt,darthvad,cygnusx1,natalie1,newark,hiking,errors,elcamino,koolaid,knight1,murphy1,volcano,idunno,2005,2233,blueberr,biguns,yamahar1,zapper,zorro1,0911,3006,sixsix,shopper,sextoy,snowboard,speedway,pokey,playboy2,titi,toonarmy,lambda,joecool,juniper,max123,mariposa,met2002,reggae,ricky1,1236,1228,1016,all4one,baberuth,asgard,484848,5683,6669,catnip,charisma,capslock,cashmone,galant,frenchy,gizmodo1,girlies,screwy,doubled,divers,dte4uw,dragonfl,treble,twinkie,tropical,crescent,cococo,dabomb,daffy,dandfa,cyrano,nathanie,boners,helium,hellas,espresso,killa,kikimora,w4g8at,ilikeit,iforget,1944,20002000,birthday1,beatles1,blue1,bigdicks,beethove,blacklab,blazers,benny1,woodwork,0069,0101,taffy,4567,shodan,pavlov,pinnacle,petunia,tito,teenie,lemonade,lalakers,lebowski,lalalala,ladyboy,jeeper,joyjoy,mercury1,mantle,mannn,rocknrol,riversid,123aaa,11112222,121314,1021,1004,1120,allen1,ambers,amstel,alice1,alleycat,allegro,ambrosia,gspot,goodsex,hattrick,harpoon,878787,8inches,4wwvte,cassandr,charlie123,gatsby,generic,gareth,fuckme2,samm,seadog,satchmo,scxakv,santafe,dipper,outoutout,madmad,london1,qbg26i,pussy123,tzpvaw,vamp,comp,cowgirl,coldplay,dawgs,nt5d27,novifarm,notredam,newness,mykids,bryan1,bouncer,hihihi,honeybee,iceman1,hotlips,dynamo,kappa,kahlua,muffy,mizzou,wannabe,wednesda,whatup,waterfal,willy1,bear1,billabon,youknow,yyyyyy1,zachary1,01234567,070462,zurich,superstar,stiletto,strat,427900,sigmachi,shells,sexy123,smile1,sophie1,stayout,somerset,playmate,pinkfloyd,phish1,payday,thebear,telefon,laetitia,kswbdu,jerky,metro,revoluti,1216,1201,1204,1222,1115,archange,barry1,handball,676767,chewbacc,furball,gocubs,fullback,gman,dewalt,dominiqu,diver1,dhip6a,olemiss,mandrake,mangos,pretzel,pusssy,tripleh,vagabond,clovis,dandan,csfbr5yy,deadspin,ninguna,ncc74656,bootsie,bp2002,bourbon,bumble,heyyou,houston1,hemlock,hippo,hornets,horseman,excess,extensa,muffin1,virginie,werdna,idontknow,jack1,1bitch,151nxjmt,bendover,bmwbmw,zaq123,wxcvbn,supernov,tahoe,shakur,sexyone,seviyi,smart1,speed1,pepito,phantom1,playoffs,terry1,terrier,laser1,lite,lancia,johngalt,jenjen,midori,maserati,matteo,miami1,riffraff,ronald1,1218,1026,123987,1015,1103,armada,architec,austria,gotmilk,cambridg,camero,flex,foreplay,getoff,glacier,glotest,froggie,gerbil,rugger,sanity72,donna1,orchard,oyster,palmtree,pajero,m5wkqf,magenta,luckyone,treefrog,vantage,usmarine,tyvugq,uptown,abacab,aaaaaa1,chuck1,darkange,cyclones,navajo,bubba123,iawgk2,hrfzlz,dylan1,enrico,encore,eclipse1,mutant,mizuno,mustang2,video1,viewer,weed420,whales,jaguar1,1990,159159,1love,bears1,bigtruck,bigboss,blitz,xqgann,yeahyeah,zeke,zardoz,stickman,3825,sentra,shiva,skipper1,singapor,southpaw,sonora,squid,slamdunk,slimjim,placid,photon,placebo,pearl1,test12,therock1,tiger123,leinad,legman,jeepers,joeblow,mike23,redcar,rhinos,rjw7x4,1102,13576479,112211,gwju3g,greywolf,7bgiqk,7878,535353,4snz9g,candyass,cccccc1,catfight,cali,fister,fosters,finland,frankie1,gizzmo,royalty,rugrat,dodo,oemdlg,out3xf,paddy,opennow,puppy1,qazwsxedc,ramjet,abraxas,cn42qj,dancer1,death666,nudity,nimda2k,buick,bobb,braves1,henrik,hooligan,everlast,karachi,mortis,monies,motocros,wally1,willie1,inspiron,1test,2929,bigblack,xytfu7,yackwin,zaq1xsw2,yy5rbfsc,100100,0660,tahiti,takehana,332211,3535,sedona,seawolf,skydiver,spleen,slash,spjfet,special1,slimshad,sopranos,spock1,penis1,patches1,thierry,thething,toohot,limpone,mash4077,matchbox,masterp,maxdog,ribbit,rockin,redhat,1113,14789632,1331,allday,aladin,andrey,amethyst,baseball1,athome,goofy1,greenman,goofball,ha8fyp,goodday,778899,charon,chappy,caracas,cardiff,capitals,canada1,cajun,catter,freddy1,favorite2,forme,forsaken,feelgood,gfxqx686,saskia,sanjose,salsa,dilbert1,dukeduke,downhill,longhair,locutus,lockdown,malachi,mamacita,lolipop,rainyday,pumpkin1,punker,prospect,rambo1,rainbows,quake,trinity1,trooper1,citation,coolcat,default,deniro,d9ungl,daddys,nautica,nermal,bukowski,bubbles1,bogota,buds,hulk,hitachi,ender,export,kikiki,kcchiefs,kram,morticia,montrose,mongo,waqw3p,wizzard,whdbtp,whkzyc,154ugeiu,1fuck,binky,bigred1,blubber,becky1,year2005,wonderfu,xrated,0001,tampabay,survey,tammy1,stuffer,3mpz4r,3000,3some,sierra1,shampoo,shyshy,slapnuts,standby,spartan1,sprocket,stanley1,poker1,theshit,lavalamp,light1,laserjet,jediknig,jjjjj1,mazda626,menthol,margaux,medic1,rhino1,1209,1234321,amigos,apricot,asdfgh1,hairball,hatter,grimace,7xm5rq,6789,cartoons,capcom,cashflow,carrots,fanatic,format,girlie,safeway,dogfart,dondon,outsider,odin,opiate,lollol,love12,mallrats,prague,primetime21,pugsley,r29hqq,valleywa,airman,abcdefg1,darkone,cummer,natedogg,nineball,ndeyl5,natchez,newone,normandy,nicetits,buddy123,buddys,homely,husky,iceland,hr3ytm,highlife,holla,earthlin,exeter,eatmenow,kimkim,k2trix,kernel,money123,moonman,miles1,mufasa,mousey,whites,warhamme,jackass1,2277,20spanks,blobby,blinky,bikers,blackjack,becca,blue23,xman,wyvern,085tzzqi,zxzxzx,zsmj2v,suede,t26gn4,sugars,tantra,swoosh,4226,4271,321123,383pdjvl,shane1,shelby1,spades,smother,sparhawk,pisser,photo1,pebble,peavey,pavement,thistle,kronos,lilbit,linux,melanie1,marbles,redlight,1208,1138,1008,alchemy,aolsucks,alexalex,atticus,auditt,b929ezzh,goodyear,gubber,863abgsg,7474,797979,464646,543210,4zqauf,4949,ch5nmk,carlito,chewey,carebear,checkmat,cheddar,chachi,forgetit,forlife,giants1,getit,gerhard,galileo,g3ujwg,ganja,rufus1,rushmore,discus,dudeman,olympus,oscars,osprey,madcow,locust,loyola,mammoth,proton,rabbit1,ptfe3xxp,pwxd5x,purple1,punkass,prophecy,uyxnyd,tyson1,aircraft,access99,abcabc,colts,civilwar,claudia1,contour,dddddd1,cypher,dapzu455,daisydog,noles,hoochie,hoser,eldiablo,kingrich,mudvayne,motown,mp8o6d,vipergts,italiano,2055,2211,bloke,blade1,yamato,zooropa,yqlgr667,050505,zxcvbnm1,zw6syj,suckcock,tango1,swampy,445566,333666,380zliki,sexpot,sexylady,sixtynin,sickboy,spiffy,skylark,sparkles,pintail,phreak,teller,timtim,thighs,latex,letsdoit,lkjhg,landmark,lizzard,marlins,marauder,metal1,manu,righton,1127,alain,alcat,amigo,basebal1,azertyui,azrael,hamper,gotenks,golfgti,hawkwind,h2slca,grace1,6chid8,789654,canine,casio,cazzo,cbr900,cabrio,calypso,capetown,feline,flathead,fisherma,flipmode,fungus,g9zns4,giggle,gabriel1,fuck123,saffron,dogmeat,dreamcas,dirtydog,douche,dresden,dickdick,destiny1,pappy,oaktree,luft4,puta,ramada,trumpet1,vcradq,tulip,tracy71,tycoon,aaaaaaa1,conquest,chitown,creepers,cornhole,danman,dada,density,d9ebk7,darth,nirvana1,nestle,brenda1,bonanza,hotspur,hufmqw,electro,erasure,elisabet,etvww4,ewyuza,eric1,kenken,kismet,klaatu,milamber,willi,isacs155,igor,1million,1letmein,x35v8l,yogi,ywvxpz,xngwoj,zippy1,020202,****,stonewal,sentry,sexsexsex,sonysony,smirnoff,star12,solace,star1,pkxe62,pilot1,pommes,paulpaul,tical,tictac,lighthou,lemans,kubrick,letmein22,letmesee,jys6wz,jonesy,jjjjjj1,jigga,redstorm,riley1,14141414,1126,allison1,badboy1,asthma,auggie,hardwood,gumbo,616913,57np39,56qhxs,4mnveh,fatluvr69,fqkw5m,fidelity,feathers,fresno,godiva,gecko,gibson1,gogators,general1,saxman,rowing,sammys,scotts,scout1,sasasa,samoht,dragon69,ducky,dragonball,driller,p3wqaw,papillon,oneone,openit,optimist,longshot,rapier,pussy2,ralphie,tuxedo,undertow,copenhag,delldell,culinary,deltas,mytime,noname,noles1,bucker,bopper,burnout,ibilltes,hihje863,hitter,ekim,espana,eatme69,elpaso,express1,eeeeee1,eatme1,karaoke,mustang5,wellingt,willem,waterski,webcam,jasons,infinite,iloveyou!,jakarta,belair,bigdad,beerme,yoshi,yinyang,x24ik3,063dyjuy,0000007,ztmfcq,stopit,stooges,symow8,strato,2hot4u,skins,shakes,sex1,snacks,softtail,slimed123,pizzaman,tigercat,tonton,lager,lizzy,juju,john123,jesse1,jingles,martian,mario1,rootedit,rochard,redwine,requiem,riverrat,1117,1014,1205,amor,amiga,alpina,atreides,banana1,bahamut,golfman,happines,7uftyx,5432,5353,5151,4747,foxfire,ffvdj474,foreskin,gayboy,gggggg1,gameover,glitter,funny1,scoobydoo,saxophon,dingbat,digimon,omicron,panda1,loloxx,macintos,lululu,lollypop,racer1,queen1,qwertzui,upnfmc,tyrant,trout1,9skw5g,aceman,acls2h,aaabbb,acapulco,aggie,comcast,cloudy,cq2kph,d6o8pm,cybersex,davecole,darian,crumbs,davedave,dasani,mzepab,myporn,narnia,booger1,bravo1,budgie,btnjey,highlander,hotel6,humbug,ewtosi,kristin1,kobe,knuckles,keith1,katarina,muff,muschi,montana1,wingchun,wiggle,whatthe,vette1,vols,virago,intj3a,ishmael,jachin,illmatic,199999,2010,blender,bigpenis,bengal,blue1234,zaqxsw,xray,xxxxxxx1,zebras,yanks,tadpole,stripes,3737,4343,3728,4444444,368ejhih,solar,sonne,sniffer,sonata,squirts,playstation,pktmxr,pescator,texaco,lesbos,l8v53x,jo9k2jw2,jimbeam,jimi,jupiter2,jurassic,marines1,rocket1,14725836,12345679,1219,123098,1233,alessand,althor,arch,alpha123,basher,barefeet,balboa,bbbbb1,badabing,gopack,golfnut,gsxr1000,gregory1,766rglqy,8520,753159,8dihc6,69camaro,666777,cheeba,chino,cheeky,camel1,fishcake,flubber,gianni,gnasher23,frisbee,fuzzy1,fuzzball,save13tx,russell1,sandra1,scrotum,scumbag,sabre,samdog,dripping,dragon12,dragster,orwell,mainland,maine,qn632o,poophead,rapper,porn4life,rapunzel,velocity,vanessa1,trueblue,vampire1,abacus,902100,crispy,chooch,d6wnro,dabulls,dehpye,navyseal,njqcw4,nownow,nigger1,nightowl,nonenone,nightmar,bustle,buddy2,boingo,bugman,bosshog,hybrid,hillside,hilltop,hotlegs,hzze929b,hhhhh1,hellohel,evilone,edgewise,e5pftu,eded,embalmer,excalibur,elefant,kenzie,killah,kleenex,mouses,mounta1n,motors,mutley,muffdive,vivitron,w00t88,iloveit,jarjar,incest,indycar,17171717,1664,17011701,222777,2663,beelch,benben,yitbos,yyyyy1,zzzzz1,stooge,tangerin,taztaz,stewart1,summer69,system1,surveyor,stirling,3qvqod,3way,456321,sizzle,simhrq,sparty,ssptx452,sphere,persian,ploppy,pn5jvw,poobear,pianos,plaster,testme,tiff,thriller,master12,rockey,1229,1217,1478,1009,anastasi,amonra,argentin,albino,azazel,grinder,6uldv8,83y6pv,8888888,4tlved,515051,carsten,flyers88,ffffff1,firehawk,firedog,flashman,ggggg1,godspeed,galway,giveitup,funtimes,gohan,giveme,geryfe,frenchie,sayang,rudeboy,sandals,dougal,drag0n,dga9la,desktop,onlyone,otter,pandas,mafia,luckys,lovelife,manders,qqh92r,qcmfd454,radar1,punani,ptbdhw,turtles,undertaker,trs8f7,ugejvp,abba,911turbo,acdc,abcd123,crash1,colony,delboy,davinci,notebook,nitrox,borabora,bonzai,brisbane,heeled,hooyah,hotgirl,i62gbq,horse1,hpk2qc,epvjb6,mnbvc,mommy1,munster,wiccan,2369,bettyboo,blondy,bismark,beanbag,bjhgfi,blackice,yvtte545,ynot,yess,zlzfrh,wolvie,007bond,******,tailgate,tanya1,sxhq65,stinky1,3234412,3ki42x,seville,shimmer,sienna,shitshit,skillet,sooners1,solaris,smartass,pedros,pennywis,pfloyd,tobydog,thetruth,letme1n,mario66,micky,rocky2,rewq,reindeer,1128,1207,1104,1432,aprilia,allstate,bagels,baggies,barrage,guru,72d5tn,606060,4wcqjn,chance1,flange,fartman,geil,gbhcf2,fussball,fuaqz4,gameboy,geneviev,rotary,seahawk,saab,samadams,devlt4,ditto,drevil,drinker,deuce,dipstick,octopus,ottawa,losangel,loverman,porky,q9umoz,rapture,pussy4me,triplex,ue8fpw,turbos,aaa340,churchil,crazyman,cutiepie,ddddd1,dejavu,cuxldv,nbvibt,nikon,niko,nascar1,bubba2,boobear,boogers,bullwink,bulldawg,horsemen,escalade,eagle2,dynamic,efyreg,minnesot,mogwai,msnxbi,mwq6qlzo,werder,verygood,voodoo1,iiiiii1,159951,1624,1911a1,2244,bellagio,bedlam,belkin,bill1,xirt2k,??????,susieq,sundown,sukebe,swifty,2fast4u,sexe,shroom,seaweed,skeeter1,snicker,spanky1,spook,phaedrus,pilots,peddler,thumper1,tiger7,tmjxn151,thematri,l2g7k3,letmeinn,jeffjeff,johnmish,mantra,mike69,mazda6,riptide,robots,1107,1130,142857,11001001,1134,armored,allnight,amatuers,bartok,astral,baboon,balls1,bassoon,hcleeb,happyman,granite,graywolf,golf1,gomets,8vjzus,7890,789123,8uiazp,5757,474jdvff,551scasi,50cent,camaro1,cherry1,chemist,firenze,fishtank,freewill,glendale,frogfrog,ganesh,scirocco,devilman,doodles,okinawa,olympic,orpheus,ohmygod,paisley,pallmall,lunchbox,manhatta,mahalo,mandarin,qwqwqw,qguvyt,pxx3eftp,rambler,poppy1,turk182,vdlxuc,tugboat,valiant,uwrl7c,chris123,cmfnpu,decimal,debbie1,dandy,daedalus,natasha1,nissan1,nancy123,nevermin,napalm,newcastle,bonghit,ibxnsm,hhhhhh1,holger,edmonton,equinox,dvader,kimmy,knulla,mustafa,monsoon,mistral,morgana,monica1,mojave,monterey,mrbill,vkaxcs,victor1,violator,vfdhif,wilson1,wavpzt,wildstar,winter99,iqzzt580,imback,1914,19741974,1monkey,1q2w3e4r5t,2500,2255,bigshow,bigbucks,blackcoc,zoomer,wtcacq,wobble,xmen,xjznq5,yesterda,yhwnqc,zzzxxx,393939,2fchbg,skinhead,skilled,shadow12,seaside,sinful,silicon,smk7366,snapshot,sniper1,soccer11,smutty,peepers,plokij,pdiddy,pimpdaddy,thrust,terran,topaz,today1,lionhear,littlema,lauren1,lincoln1,lgnu9d,juneau,methos,rogue1,romulus,redshift,1202,1469,12locked,arizona1,alfarome,al9agd,aol123,altec,apollo1,arse,baker1,bbb747,axeman,astro1,hawthorn,goodfell,hawks1,gstring,hannes,8543852,868686,4ng62t,554uzpad,5401,567890,5232,catfood,fire1,flipflop,fffff1,fozzie,fluff,fzappa,rustydog,scarab,satin,ruger,samsung1,destin,diablo2,dreamer1,detectiv,doqvq3,drywall,paladin1,papabear,offroad,panasonic,nyyankee,luetdi,qcfmtz,pyf8ah,puddles,pussyeat,ralph1,princeto,trivia,trewq,tri5a3,advent,9898,agyvorc,clarkie,coach1,courier,christo,chowder,cyzkhw,davidb,dad2ownu,daredevi,de7mdf,nazgul,booboo1,bonzo,butch1,huskers1,hgfdsa,hornyman,elektra,england1,elodie,kermit1,kaboom,morten,mocha,monday1,morgoth,weewee,weenie,vorlon,wahoo,ilovegod,insider,jayman,1911,1dallas,1900,1ranger,201jedlz,2501,1qaz,bignuts,bigbad,beebee,billows,belize,wvj5np,wu4etd,yamaha1,wrinkle5,zebra1,yankee1,zoomzoom,09876543,0311,?????,stjabn,tainted,3tmnej,skooter,skelter,starlite,spice1,stacey1,smithy,pollux,peternorth,pixie,piston,poets,toons,topspin,kugm7b,legends,jeepjeep,joystick,junkmail,jojojojo,jonboy,midland,mayfair,riches,reznor,rockrock,reboot,renee1,roadway,rasta220,1411,1478963,1019,archery,andyandy,barks,bagpuss,auckland,gooseman,hazmat,gucci,grammy,happydog,7kbe9d,7676,6bjvpe,5lyedn,5858,5291,charlie2,c7lrwu,candys,chateau,ccccc1,cardinals,fihdfv,fortune12,gocats,gaelic,fwsadn,godboy,gldmeo,fx3tuo,fubar1,generals,gforce,rxmtkp,rulz,sairam,dunhill,dogggg,ozlq6qwm,ov3ajy,lockout,makayla,macgyver,mallorca,prima,pvjegu,qhxbij,prelude1,totoro,tusymo,trousers,tulane,turtle1,tracy1,aerosmit,abbey1,clticic,cooper1,comets,delpiero,cyprus,dante1,dave1,nounours,nexus6,nogard,norfolk,brent1,booyah,bootleg,bulls23,bulls1,booper,heretic,icecube,hellno,hounds,honeydew,hooters1,hoes,hevnm4,hugohugo,epson,evangeli,eeeee1,eyphed".split(","))),
p("english",s("you,i,to,the,a,and,that,it,of,me,what,is,in,this,know,i'm,for,no,have,my,don't,just,not,do,be,on,your,was,we,it's,with,so,but,all,well,are,he,oh,about,right,you're,get,here,out,going,like,yeah,if,her,she,can,up,want,think,that's,now,go,him,at,how,got,there,one,did,why,see,come,good,they,really,as,would,look,when,time,will,okay,back,can't,mean,tell,i'll,from,hey,were,he's,could,didn't,yes,his,been,or,something,who,because,some,had,then,say,ok,take,an,way,us,little,make,need,gonna,never,we're,too,she's,i've,sure,them,more,over,our,sorry,where,what's,let,thing,am,maybe,down,man,has,uh,very,by,there's,should,anything,said,much,any,life,even,off,doing,thank,give,only,thought,help,two,talk,people,god,still,wait,into,find,nothing,again,things,let's,doesn't,call,told,great,before,better,ever,night,than,away,first,believe,other,feel,everything,work,you've,fine,home,after,last,these,day,keep,does,put,around,stop,they're,i'd,guy,isn't,always,listen,wanted,mr,guys,huh,those,big,lot,happened,thanks,won't,trying,kind,wrong,through,talking,made,new,being,guess,hi,care,bad,mom,remember,getting,we'll,together,dad,leave,place,understand,wouldn't,actually,hear,baby,nice,father,else,stay,done,wasn't,their,course,might,mind,every,enough,try,hell,came,someone,you'll,own,family,whole,another,house,yourself,idea,ask,best,must,coming,old,looking,woman,which,years,room,left,knew,tonight,real,son,hope,name,same,went,um,hmm,happy,pretty,saw,girl,sir,show,friend,already,saying,next,three,job,problem,minute,found,world,thinking,haven't,heard,honey,matter,myself,couldn't,exactly,having,ah,probably,happen,we've,hurt,boy,both,while,dead,gotta,alone,since,excuse,start,kill,hard,you'd,today,car,ready,until,without,wants,hold,wanna,yet,seen,deal,took,once,gone,called,morning,supposed,friends,head,stuff,most,used,worry,second,part,live,truth,school,face,forget,true,business,each,cause,soon,knows,few,telling,wife,who's,use,chance,run,move,anyone,person,bye,somebody,dr,heart,such,miss,married,point,later,making,meet,anyway,many,phone,reason,damn,lost,looks,bring,case,turn,wish,tomorrow,kids,trust,check,change,end,late,anymore,five,least,town,aren't,ha,working,year,makes,taking,means,brother,play,hate,ago,says,beautiful,gave,fact,crazy,party,sit,open,afraid,between,important,rest,fun,kid,word,watch,glad,everyone,days,sister,minutes,everybody,bit,couple,whoa,either,mrs,feeling,daughter,wow,gets,asked,under,break,promise,door,set,close,hand,easy,question,tried,far,walk,needs,mine,though,times,different,killed,hospital,anybody,alright,wedding,shut,able,die,perfect,stand,comes,hit,story,ya,mm,waiting,dinner,against,funny,husband,almost,pay,answer,four,office,eyes,news,child,shouldn't,half,side,yours,moment,sleep,read,where's,started,men,sounds,sonny,pick,sometimes,em,bed,also,date,line,plan,hours,lose,hands,serious,behind,inside,high,ahead,week,wonderful,fight,past,cut,quite,number,he'll,sick,it'll,game,eat,nobody,goes,along,save,seems,finally,lives,worried,upset,carly,met,book,brought,seem,sort,safe,living,children,weren't,leaving,front,shot,loved,asking,running,clear,figure,hot,felt,six,parents,drink,absolutely,how's,daddy,alive,sense,meant,happens,special,bet,blood,ain't,kidding,lie,full,meeting,dear,seeing,sound,fault,water,ten,women,buy,months,hour,speak,lady,jen,thinks,christmas,body,order,outside,hang,possible,worse,company,mistake,ooh,handle,spend,totally,giving,control,here's,marriage,realize,president,unless,sex,send,needed,taken,died,scared,picture,talked,ass,hundred,changed,completely,explain,playing,certainly,sign,boys,relationship,loves,hair,lying,choice,anywhere,future,weird,luck,she'll,turned,known,touch,kiss,crane,questions,obviously,wonder,pain,calling,somewhere,throw,straight,cold,fast,words,food,none,drive,feelings,they'll,worked,marry,light,drop,cannot,sent,city,dream,protect,twenty,class,surprise,its,sweetheart,poor,looked,mad,except,gun,y'know,dance,takes,appreciate,especially,situation,besides,pull,himself,hasn't,act,worth,sheridan,amazing,top,given,expect,rather,involved,swear,piece,busy,law,decided,happening,movie,we'd,catch,country,less,perhaps,step,fall,watching,kept,darling,dog,win,air,honor,personal,moving,till,admit,problems,murder,he'd,evil,definitely,feels,information,honest,eye,broke,missed,longer,dollars,tired,evening,human,starting,red,entire,trip,club,niles,suppose,calm,imagine,fair,caught,blame,street,sitting,favor,apartment,court,terrible,clean,learn,works,frasier,relax,million,accident,wake,prove,smart,message,missing,forgot,interested,table,nbsp,become,mouth,pregnant,middle,ring,careful,shall,team,ride,figured,wear,shoot,stick,follow,angry,instead,write,stopped,early,ran,war,standing,forgive,jail,wearing,kinda,lunch,cristian,eight,greenlee,gotten,hoping,phoebe,thousand,ridge,paper,tough,tape,state,count,boyfriend,proud,agree,birthday,seven,they've,history,share,offer,hurry,feet,wondering,decision,building,ones,finish,voice,herself,would've,list,mess,deserve,evidence,cute,dress,interesting,hotel,quiet,concerned,road,staying,beat,sweetie,mention,clothes,finished,fell,neither,mmm,fix,respect,spent,prison,attention,holding,calls,near,surprised,bar,keeping,gift,hadn't,putting,dark,self,owe,using,ice,helping,normal,aunt,lawyer,apart,certain,plans,jax,girlfriend,floor,whether,everything's,present,earth,box,cover,judge,upstairs,sake,mommy,possibly,worst,station,acting,accept,blow,strange,saved,conversation,plane,mama,yesterday,lied,quick,lately,stuck,report,difference,rid,store,she'd,bag,bought,doubt,listening,walking,cops,deep,dangerous,buffy,sleeping,chloe,rafe,shh,record,lord,moved,join,card,crime,gentlemen,willing,window,return,walked,guilty,likes,fighting,difficult,soul,joke,favorite,uncle,promised,public,bother,island,seriously,cell,lead,knowing,broken,advice,somehow,paid,losing,push,helped,killing,usually,earlier,boss,beginning,liked,innocent,doc,rules,cop,learned,thirty,risk,letting,speaking,officer,ridiculous,support,afternoon,born,apologize,seat,nervous,across,song,charge,patient,boat,how'd,hide,detective,planning,nine,huge,breakfast,horrible,age,awful,pleasure,driving,hanging,picked,sell,quit,apparently,dying,notice,congratulations,chief,one's,month,visit,could've,c'mon,letter,decide,double,sad,press,forward,fool,showed,smell,seemed,spell,memory,pictures,slow,seconds,hungry,board,position,hearing,roz,kitchen,ma'am,force,fly,during,space,should've,realized,experience,kick,others,grab,mother's,discuss,third,cat,fifty,responsible,fat,reading,idiot,yep,suddenly,agent,destroy,bucks,track,shoes,scene,peace,arms,demon,low,livvie,consider,papers,medical,incredible,witch,drunk,attorney,tells,knock,ways,gives,department,nose,skye,turns,keeps,jealous,drug,sooner,cares,plenty,extra,tea,won,attack,ground,whose,outta,weekend,matters,wrote,type,father's,gosh,opportunity,impossible,books,waste,pretend,named,jump,eating,proof,complete,slept,career,arrest,breathe,perfectly,warm,pulled,twice,easier,goin,dating,suit,romantic,drugs,comfortable,finds,checked,fit,divorce,begin,ourselves,closer,ruin,although,smile,laugh,treat,god's,fear,what'd,guy's,otherwise,excited,mail,hiding,cost,stole,pacey,noticed,fired,excellent,lived,bringing,pop,bottom,note,sudden,bathroom,flight,honestly,sing,foot,games,remind,bank,charges,witness,finding,places,tree,dare,hardly,that'll,interest,steal,silly,contact,teach,shop,plus,colonel,fresh,trial,invited,roll,radio,reach,heh,choose,emergency,dropped,credit,obvious,cry,locked,loving,positive,nuts,agreed,prue,goodbye,condition,guard,fuckin,grow,cake,mood,dad's,total,crap,crying,belong,lay,partner,trick,pressure,ohh,arm,dressed,cup,lies,bus,taste,neck,south,something's,nurse,raise,lots,carry,group,whoever,drinking,they'd,breaking,file,lock,wine,closed,writing,spot,paying,study,assume,asleep,man's,turning,legal,viki,bedroom,shower,nikolas,camera,fill,reasons,forty,bigger,nope,breath,doctors,pants,level,movies,gee,area,folks,ugh,continue,focus,wild,truly,desk,convince,client,threw,band,hurts,spending,allow,grand,answers,shirt,chair,allowed,rough,doin,sees,government,ought,empty,round,hat,wind,shows,aware,dealing,pack,meaning,hurting,ship,subject,guest,mom's,pal,match,arrested,salem,confused,surgery,expecting,deacon,unfortunately,goddamn,lab,passed,bottle,beyond,whenever,pool,opinion,held,common,starts,jerk,secrets,falling,played,necessary,barely,dancing,health,tests,copy,cousin,planned,dry,ahem,twelve,simply,tess,skin,often,fifteen,speech,names,issue,orders,nah,final,results,code,believed,complicated,umm,research,nowhere,escape,biggest,restaurant,grateful,usual,burn,address,within,someplace,screw,everywhere,train,film,regret,goodness,mistakes,details,responsibility,suspect,corner,hero,dumb,terrific,further,gas,whoo,hole,memories,o'clock,following,ended,nobody's,teeth,ruined,split,airport,bite,stenbeck,older,liar,showing,project,cards,desperate,themselves,pathetic,damage,spoke,quickly,scare,marah,afford,vote,settle,mentioned,due,stayed,rule,checking,tie,hired,upon,heads,concern,blew,natural,alcazar,champagne,connection,tickets,happiness,form,saving,kissing,hated,personally,suggest,prepared,build,leg,onto,leaves,downstairs,ticket,it'd,taught,loose,holy,staff,sea,duty,convinced,throwing,defense,kissed,legs,according,loud,practice,saturday,babies,army,where'd,warning,miracle,carrying,flying,blind,ugly,shopping,hates,someone's,sight,bride,coat,account,states,clearly,celebrate,brilliant,wanting,add,forrester,lips,custody,center,screwed,buying,size,toast,thoughts,student,stories,however,professional,reality,birth,lexie,attitude,advantage,grandfather,sami,sold,opened,grandma,beg,changes,someday,grade,roof,brothers,signed,ahh,marrying,powerful,grown,grandmother,fake,opening,expected,eventually,must've,ideas,exciting,covered,familiar,bomb,bout,television,harmony,color,heavy,schedule,records,capable,practically,including,correct,clue,forgotten,immediately,appointment,social,nature,deserves,threat,bloody,lonely,ordered,shame,local,jacket,hook,destroyed,scary,investigation,above,invite,shooting,port,lesson,criminal,growing,caused,victim,professor,followed,funeral,nothing's,considering,burning,strength,loss,view,gia,sisters,everybody's,several,pushed,written,somebody's,shock,pushing,heat,chocolate,greatest,miserable,corinthos,nightmare,brings,zander,character,became,famous,enemy,crash,chances,sending,recognize,healthy,boring,feed,engaged,percent,headed,lines,treated,purpose,knife,rights,drag,san,fan,badly,hire,paint,pardon,built,behavior,closet,warn,gorgeous,milk,survive,forced,operation,offered,ends,dump,rent,remembered,lieutenant,trade,thanksgiving,rain,revenge,physical,available,program,prefer,baby's,spare,pray,disappeared,aside,statement,sometime,meat,fantastic,breathing,laughing,itself,tip,stood,market,affair,ours,depends,main,protecting,jury,national,brave,large,jack's,interview,fingers,murdered,explanation,process,picking,based,style,pieces,blah,assistant,stronger,aah,pie,handsome,unbelievable,anytime,nearly,shake,everyone's,oakdale,cars,wherever,serve,pulling,points,medicine,facts,waited,lousy,circumstances,stage,disappointed,weak,trusted,license,nothin,community,trash,understanding,slip,cab,sounded,awake,friendship,stomach,weapon,threatened,mystery,official,regular,river,vegas,understood,contract,race,basically,switch,frankly,issues,cheap,lifetime,deny,painting,ear,clock,weight,garbage,why'd,tear,ears,dig,selling,setting,indeed,changing,singing,tiny,particular,draw,decent,avoid,messed,filled,touched,score,people's,disappear,exact,pills,kicked,harm,recently,fortune,pretending,raised,insurance,fancy,drove,cared,belongs,nights,shape,lorelai,base,lift,stock,sonny's,fashion,timing,guarantee,chest,bridge,woke,source,patients,theory,original,burned,watched,heading,selfish,oil,drinks,failed,period,doll,committed,elevator,freeze,noise,exist,science,pair,edge,wasting,sat,ceremony,pig,uncomfortable,peg,guns,staring,files,bike,weather,name's,mostly,stress,permission,arrived,thrown,possibility,example,borrow,release,ate,notes,hoo,library,property,negative,fabulous,event,doors,screaming,xander,term,what're,meal,fellow,apology,anger,honeymoon,wet,bail,parking,non,protection,fixed,families,chinese,campaign,map,wash,stolen,sensitive,stealing,chose,lets,comfort,worrying,whom,pocket,mateo,bleeding,students,shoulder,ignore,fourth,neighborhood,fbi,talent,tied,garage,dies,demons,dumped,witches,training,rude,crack,model,bothering,radar,grew,remain,soft,meantime,gimme,connected,kinds,cast,sky,likely,fate,buried,hug,brother's,concentrate,prom,messages,east,unit,intend,crew,ashamed,somethin,manage,guilt,weapons,terms,interrupt,guts,tongue,distance,conference,treatment,shoe,basement,sentence,purse,glasses,cabin,universe,towards,repeat,mirror,wound,travers,tall,reaction,odd,engagement,therapy,letters,emotional,runs,magazine,jeez,decisions,soup,daughter's,thrilled,society,managed,stake,chef,moves,extremely,entirely,moments,expensive,counting,shots,kidnapped,square,son's,cleaning,shift,plate,impressed,smells,trapped,male,tour,aidan,knocked,charming,attractive,argue,puts,whip,language,embarrassed,settled,package,laid,animals,hitting,disease,bust,stairs,alarm,pure,nail,nerve,incredibly,walks,dirt,stamp,sister's,becoming,terribly,friendly,easily,damned,jobs,suffering,disgusting,stopping,deliver,riding,helps,federal,disaster,bars,dna,crossed,rate,create,trap,claim,california,talks,eggs,effect,chick,threatening,spoken,introduce,confession,embarrassing,bags,impression,gate,year's,reputation,attacked,among,knowledge,presents,inn,europe,chat,suffer,argument,talkin,crowd,homework,fought,coincidence,cancel,accepted,rip,pride,solve,hopefully,pounds,pine,mate,illegal,generous,streets,con,separate,outfit,maid,bath,punch,mayor,freaked,begging,recall,enjoying,bug,woman's,prepare,parts,wheel,signal,direction,defend,signs,painful,yourselves,rat,maris,amount,that'd,suspicious,flat,cooking,button,warned,sixty,pity,parties,crisis,coach,row,yelling,leads,awhile,pen,confidence,offering,falls,image,farm,pleased,panic,hers,gettin,role,refuse,determined,hell's,grandpa,progress,testify,passing,military,choices,uhh,gym,cruel,wings,bodies,mental,gentleman,coma,cutting,proteus,guests,girl's,expert,benefit,faces,cases,led,jumped,toilet,secretary,sneak,mix,firm,halloween,agreement,privacy,dates,anniversary,smoking,reminds,pot,created,twins,swing,successful,season,scream,considered,solid,options,commitment,senior,ill,else's,crush,ambulance,wallet,discovered,officially,til,rise,reached,eleven,option,laundry,former,assure,stays,skip,fail,accused,wide,challenge,popular,learning,discussion,clinic,plant,exchange,betrayed,bro,sticking,university,members,lower,bored,mansion,soda,sheriff,suite,handled,busted,senator,load,happier,younger,studying,romance,procedure,ocean,section,sec,commit,assignment,suicide,minds,swim,ending,bat,yell,llanview,league,chasing,seats,proper,command,believes,humor,hopes,fifth,winning,solution,leader,theresa's,sale,lawyers,nor,material,latest,highly,escaped,audience,parent,tricks,insist,dropping,cheer,medication,higher,flesh,district,routine,century,shared,sandwich,handed,false,beating,appear,warrant,family's,awfully,odds,article,treating,thin,suggesting,fever,sweat,silent,specific,clever,sweater,request,prize,mall,tries,mile,fully,estate,union,sharing,assuming,judgment,goodnight,divorced,despite,surely,steps,jet,confess,math,listened,comin,answered,vulnerable,bless,dreaming,rooms,chip,zero,potential,pissed,nate,kills,tears,knees,chill,carly's,brains,agency,harvard,degree,unusual,wife's,joint,packed,dreamed,cure,covering,newspaper,lookin,coast,grave,egg,direct,cheating,breaks,quarter,mixed,locker,husband's,gifts,awkward,toy,thursday,rare,policy,kid's,joking,competition,classes,assumed,reasonable,dozen,curse,quartermaine,millions,dessert,rolling,detail,alien,served,delicious,closing,vampires,released,ancient,wore,value,tail,secure,salad,murderer,hits,toward,spit,screen,offense,dust,conscience,bread,answering,admitted,lame,invitation,grief,smiling,path,stands,bowl,pregnancy,hollywood,prisoner,delivery,guards,virus,shrink,influence,freezing,concert,wreck,partners,massimo,chain,birds,life's,wire,technically,presence,blown,anxious,cave,version,holidays,cleared,wishes,survived,caring,candles,bound,related,charm,yup,pulse,jumping,jokes,frame,boom,vice,performance,occasion,silence,opera,nonsense,frightened,downtown,americans,slipped,dimera,blowing,world's,session,relationships,kidnapping,actual,spin,civil,roxy,packing,education,blaming,wrap,obsessed,fruit,torture,personality,location,effort,daddy's,commander,trees,there'll,owner,fairy,per,other's,necessarily,county,contest,seventy,print,motel,fallen,directly,underwear,grams,exhausted,believing,particularly,freaking,carefully,trace,touching,messing,committee,recovery,intention,consequences,belt,sacrifice,courage,officers,enjoyed,lack,attracted,appears,bay,yard,returned,remove,nut,carried,today's,testimony,intense,granted,violence,heal,defending,attempt,unfair,relieved,political,loyal,approach,slowly,plays,normally,buzz,alcohol,actor,surprises,psychiatrist,pre,plain,attic,who'd,uniform,terrified,sons,pet,cleaned,zach,threaten,teaching,mum,motion,fella,enemies,desert,collection,incident,failure,satisfied,imagination,hooked,headache,forgetting,counselor,andie,acted,opposite,highest,equipment,badge,italian,visiting,naturally,frozen,commissioner,sakes,labor,appropriate,trunk,armed,thousands,received,dunno,costume,temporary,sixteen,impressive,zone,kicking,junk,hon,grabbed,unlike,understands,describe,clients,owns,affect,witnesses,starving,instincts,happily,discussing,deserved,strangers,leading,intelligence,host,authority,surveillance,cow,commercial,admire,questioning,fund,dragged,barn,object,deeply,amp,wrapped,wasted,tense,route,reports,hoped,fellas,election,roommate,mortal,fascinating,chosen,stops,shown,arranged,abandoned,sides,delivered,becomes,arrangements,agenda,began,theater,series,literally,propose,honesty,underneath,forces,services,sauce,promises,lecture,eighty,torn,shocked,relief,explained,counter,circle,victims,transfer,response,channel,identity,differently,campus,spy,ninety,interests,guide,deck,biological,pheebs,ease,creep,will's,waitress,skills,telephone,ripped,raising,scratch,rings,prints,wave,thee,arguing,figures,ephram,asks,reception,pin,oops,diner,annoying,agents,taggert,goal,mass,ability,sergeant,julian's,international,gig,blast,basic,tradition,towel,earned,rub,president's,habit,customers,creature,bermuda,actions,snap,react,prime,paranoid,wha,handling,eaten,therapist,comment,charged,tax,sink,reporter,beats,priority,interrupting,gain,fed,warehouse,shy,pattern,loyalty,inspector,events,pleasant,media,excuses,threats,permanent,guessing,financial,demand,assault,tend,praying,motive,los,unconscious,trained,museum,tracks,range,nap,mysterious,unhappy,tone,switched,rappaport,award,sookie,neighbor,loaded,gut,childhood,causing,swore,piss,hundreds,balance,background,toss,mob,misery,valentine's,thief,squeeze,lobby,hah,goa'uld,geez,exercise,ego,drama,al's,forth,facing,booked,boo,songs,sandburg,eighteen,d'you,bury,perform,everyday,digging,creepy,compared,wondered,trail,liver,hmmm,drawn,device,magical,journey,fits,discussed,supply,moral,helpful,attached,timmy's,searching,flew,depressed,aisle,underground,pro,daughters,cris,amen,vows,proposal,pit,neighbors,darn,cents,arrange,annulment,uses,useless,squad,represent,product,joined,afterwards,adventure,resist,protected,net,fourteen,celebrating,piano,inch,flag,debt,violent,tag,sand,gum,dammit,teal'c,hip,celebration,below,reminded,claims,tonight's,replace,phones,paperwork,emotions,typical,stubborn,stable,sheridan's,pound,papa,lap,designed,current,bum,tension,tank,suffered,steady,provide,overnight,meanwhile,chips,beef,wins,suits,boxes,salt,cassadine,collect,boy's,tragedy,therefore,spoil,realm,profile,degrees,wipe,surgeon,stretch,stepped,nephew,neat,limo,confident,anti,perspective,designer,climb,title,suggested,punishment,finest,ethan's,springfield,occurred,hint,furniture,blanket,twist,surrounded,surface,proceed,lip,fries,worries,refused,niece,gloves,soap,signature,disappoint,crawl,convicted,zoo,result,pages,lit,flip,counsel,doubts,crimes,accusing,when's,shaking,remembering,phase,hallway,halfway,bothered,useful,makeup,madam,gather,concerns,cia,cameras,blackmail,symptoms,rope,ordinary,imagined,concept,cigarette,supportive,memorial,explosion,yay,woo,trauma,ouch,leo's,furious,cheat,avoiding,whew,thick,oooh,boarding,approve,urgent,shhh,misunderstanding,minister,drawer,sin,phony,joining,jam,interfere,governor,chapter,catching,bargain,tragic,schools,respond,punish,penthouse,hop,thou,remains,rach,ohhh,insult,doctor's,bugs,beside,begged,absolute,strictly,stefano,socks,senses,ups,sneaking,yah,serving,reward,polite,checks,tale,physically,instructions,fooled,blows,tabby,internal,bitter,adorable,y'all,tested,suggestion,string,jewelry,debate,com,alike,pitch,fax,distracted,shelter,lessons,foreign,average,twin,friend's,damnit,constable,circus,audition,tune,shoulders,mud,mask,helpless,feeding,explains,dated,robbery,objection,behave,valuable,shadows,courtroom,confusing,tub,talented,struck,smarter,mistaken,italy,customer,bizarre,scaring,punk,motherfucker,holds,focused,alert,activity,vecchio,reverend,highway,foolish,compliment,bastards,attend,scheme,aid,worker,wheelchair,protective,poetry,gentle,script,reverse,picnic,knee,intended,construction,cage,wednesday,voices,toes,stink,scares,pour,effects,cheated,tower,time's,slide,ruining,recent,jewish,filling,exit,cottage,corporate,upside,supplies,proves,parked,instance,grounds,diary,complaining,basis,wounded,thing's,politics,confessed,pipe,merely,massage,data,chop,budget,brief,spill,prayer,costs,betray,begins,arrangement,waiter,scam,rats,fraud,flu,brush,anyone's,adopted,tables,sympathy,pill,pee,web,seventeen,landed,expression,entrance,employee,drawing,cap,bracelet,principal,pays,jen's,fairly,facility,dru,deeper,arrive,unique,tracking,spite,shed,recommend,oughta,nanny,naive,menu,grades,diet,corn,authorities,separated,roses,patch,dime,devastated,description,tap,subtle,include,citizen,bullets,beans,ric,pile,las,executive,confirm,toe,strings,parade,harbor,charity's,bow,borrowed,toys,straighten,steak,status,remote,premonition,poem,planted,honored,youth,specifically,meetings,exam,convenient,traveling,matches,laying,insisted,apply,units,technology,dish,aitoro,sis,kindly,grandson,donor,temper,teenager,strategy,richard's,proven,iron,denial,couples,backwards,tent,swell,noon,happiest,episode,drives,thinkin,spirits,potion,fence,affairs,acts,whatsoever,rehearsal,proved,overheard,nuclear,lemme,hostage,faced,constant,bench,tryin,taxi,shove,sets,moron,limits,impress,entitled,needle,limit,lad,intelligent,instant,forms,disagree,stinks,rianna,recover,paul's,losers,groom,gesture,developed,constantly,blocks,bartender,tunnel,suspects,sealed,removed,legally,illness,hears,dresses,aye,vehicle,thy,teachers,sheet,receive,psychic,night's,denied,knocking,judging,bible,behalf,accidentally,waking,ton,superior,seek,rumor,natalie's,manners,homeless,hollow,desperately,critical,theme,tapes,referring,personnel,item,genoa,gear,majesty,fans,exposed,cried,tons,spells,producer,launch,instinct,belief,quote,motorcycle,convincing,appeal,advance,greater,fashioned,aids,accomplished,mommy's,grip,bump,upsetting,soldiers,scheduled,production,needing,invisible,forgiveness,feds,complex,compare,bothers,tooth,territory,sacred,mon,jessica's,inviting,inner,earn,compromise,cocktail,tramp,temperature,signing,landing,jabot,intimate,dignity,dealt,souls,informed,gods,entertainment,dressing,cigarettes,blessing,billion,alistair,upper,manner,lightning,leak,heaven's,fond,corky,alternative,seduce,players,operate,modern,liquor,fingerprints,enchantment,butters,stuffed,stavros,rome,filed,emotionally,division,conditions,uhm,transplant,tips,passes,oxygen,nicely,lunatic,hid,drill,designs,complain,announcement,visitors,unfortunate,slap,prayers,plug,organization,opens,oath,o'neill,mutual,graduate,confirmed,broad,yacht,spa,remembers,fried,extraordinary,bait,appearance,abuse,warton,sworn,stare,safely,reunion,plot,burst,aha,might've,experiment,dive,commission,cells,aboard,returning,independent,expose,environment,buddies,trusting,smaller,mountains,booze,sweep,sore,scudder,properly,parole,manhattan,effective,ditch,decides,canceled,bra,antonio's,speaks,spanish,reaching,glow,foundation,women's,wears,thirsty,skull,ringing,dorm,dining,bend,unexpected,systems,sob,pancakes,michael's,harsh,flattered,existence,ahhh,troubles,proposed,fights,favourite,eats,driven,computers,rage,luke's,causes,border,undercover,spoiled,sloane,shine,rug,identify,destroying,deputy,deliberately,conspiracy,clothing,thoughtful,similar,sandwiches,plates,nails,miracles,investment,fridge,drank,contrary,beloved,allergic,washed,stalking,solved,sack,misses,hope's,forgiven,erica's,cuz,bent,approval,practical,organized,maciver,involve,industry,fuel,dragging,cooked,possession,pointing,foul,editor,dull,beneath,ages,horror,heels,grass,faking,deaf,stunt,portrait,painted,jealousy,hopeless,fears,cuts,conclusion,volunteer,scenario,satellite,necklace,men's,crashed,chapel,accuse,restraining,jason's,humans,homicide,helicopter,formal,firing,shortly,safer,devoted,auction,videotape,tore,stores,reservations,pops,appetite,anybody's,wounds,vanquish,symbol,prevent,patrol,ironic,flow,fathers,excitement,anyhow,tearing,sends,sam's,rape,laughed,function,core,charmed,whatever's,sub,lucy's,dealer,cooperate,bachelor,accomplish,wakes,struggle,spotted,sorts,reservation,ashes,yards,votes,tastes,supposedly,loft,intentions,integrity,wished,towels,suspected,slightly,qualified,log,investigating,inappropriate,immediate,companies,backed,pan,owned,lipstick,lawn,compassion,cafeteria,belonged,affected,scarf,precisely,obsession,management,loses,lighten,jake's,infection,granddaughter,explode,chemistry,balcony,this'll,storage,spying,publicity,exists,employees,depend,cue,cracked,conscious,aww,ally,ace,accounts,absurd,vicious,tools,strongly,rap,invented,forbid,directions,defendant,bare,announce,alcazar's,screwing,salesman,robbed,leap,lakeview,insanity,injury,genetic,document,why's,reveal,religious,possibilities,kidnap,gown,entering,chairs,wishing,statue,setup,serial,punished,dramatic,dismissed,criminals,seventh,regrets,raped,quarters,produce,lamp,dentist,anyways,anonymous,added,semester,risks,regarding,owes,magazines,machines,lungs,explaining,delicate,child's,tricked,oldest,liv,eager,doomed,cafe,bureau,adoption,traditional,surrender,stab,sickness,scum,loop,independence,generation,floating,envelope,entered,combination,chamber,worn,vault,sorel,pretended,potatoes,plea,photograph,payback,misunderstood,kiddo,healing,cascade,capeside,application,stabbed,remarkable,cabinet,brat,wrestling,sixth,scale,privilege,passionate,nerves,lawsuit,kidney,disturbed,crossing,cozy,associate,tire,shirts,required,posted,oven,ordering,mill,journal,gallery,delay,clubs,risky,nest,monsters,honorable,grounded,favour,culture,closest,brenda's,breakdown,attempted,tony's,placed,conflict,bald,actress,abandon,steam,scar,pole,duh,collar,worthless,standards,resources,photographs,introduced,injured,graduation,enormous,disturbing,disturb,distract,deals,conclusions,vodka,situations,require,mid,measure,dishes,crawling,congress,children's,briefcase,wiped,whistle,sits,roast,rented,pigs,greek,flirting,existed,deposit,damaged,bottles,vanessa's,types,topic,riot,overreacting,minimum,logical,impact,hostile,embarrass,casual,beacon,amusing,altar,values,recognized,maintain,goods,covers,claus,battery,survival,skirt,shave,prisoners,porch,med,ghosts,favors,drops,dizzy,chili,begun,beaten,advise,transferred,strikes,rehab,raw,photographer,peaceful,leery,heavens,fortunately,fooling,expectations,draft,citizens,weakness,ski,ships,ranch,practicing,musical,movement,individual,homes,executed,examine,documents,cranes,column,bribe,task,species,sail,rum,resort,prescription,operating,hush,fragile,forensics,expense,drugged,differences,cows,conduct,comic,bells,avenue,attacking,assigned,visitor,suitcase,sources,sorta,scan,payment,motor,mini,manticore,inspired,insecure,imagining,hardest,clerk,yea,wrist,what'll,tube,starters,silk,pump,pale,nicer,haul,flies,demands,boot,arts,african,there'd,limited,how're,elders,connections,quietly,pulls,idiots,factor,erase,denying,attacks,ankle,amnesia,accepting,ooo,heartbeat,gal,devane,confront,backing,phrase,operations,minus,meets,legitimate,hurricane,fixing,communication,boats,auto,arrogant,supper,studies,slightest,sins,sayin,recipe,pier,paternity,humiliating,genuine,catholic,snack,rational,pointed,minded,guessed,grace's,display,dip,brooke's,advanced,weddings,unh,tumor,teams,reported,humiliated,destruction,copies,closely,bid,aspirin,academy,wig,throughout,spray,occur,logic,eyed,equal,drowning,contacts,shakespeare,ritual,perfume,kelly's,hiring,hating,generally,error,elected,docks,creatures,visions,thanking,thankful,sock,replaced,nineteen,nick's,fork,comedy,analysis,yale,throws,teenagers,studied,stressed,slice,rolls,requires,plead,ladder,kicks,detectives,assured,alison's,widow,tomorrow's,tissue,tellin,shallow,responsibilities,repay,rejected,permanently,girlfriends,deadly,comforting,ceiling,bonus,verdict,maintenance,jar,insensitive,factory,aim,triple,spilled,respected,recovered,messy,interrupted,halliwell,car's,bleed,benefits,wardrobe,takin,significant,objective,murders,doo,chart,backs,workers,waves,underestimate,ties,registered,multiple,justify,harmless,frustrated,fold,enzo,convention,communicate,bugging,attraction,arson,whack,salary,rumors,residence,party's,obligation,medium,liking,laura's,development,develop,dearest,david's,danny's,congratulate,vengeance,switzerland,severe,rack,puzzle,puerto,guidance,fires,courtesy,caller,blamed,tops,repair,quiz,prep,now's,involves,headquarters,curiosity,codes,circles,barbecue,troops,sunnydale,spinning,scores,pursue,psychotic,cough,claimed,accusations,shares,resent,money's,laughs,gathered,freshman,envy,drown,cristian's,bartlet,asses,sofa,scientist,poster,islands,highness,dock,apologies,welfare,victor's,theirs,stat,stall,spots,somewhat,ryan's,realizes,psych,fools,finishing,album,wee,understandable,unable,treats,theatre,succeed,stir,relaxed,makin,inches,gratitude,faithful,bin,accent,zip,witter,wandering,regardless,que,locate,inevitable,gretel,deed,crushed,controlling,taxes,smelled,settlement,robe,poet,opposed,marked,greenlee's,gossip,gambling,determine,cuba,cosmetics,cent,accidents,surprising,stiff,sincere,shield,rushed,resume,reporting,refrigerator,reference,preparing,nightmares,mijo,ignoring,hunch,fog,fireworks,drowned,crown,cooperation,brass,accurate,whispering,sophisticated,religion,luggage,investigate,hike,explore,emotion,creek,crashing,contacted,complications,ceo,acid,shining,rolled,righteous,reconsider,inspiration,goody,geek,frightening,festival,ethics,creeps,courthouse,camping,assistance,affection,vow,smythe,protest,lodge,haircut,forcing,essay,chairman,baked,apologized,vibe,respects,receipt,mami,includes,hats,exclusive,destructive,define,defeat,adore,adopt,voted,tracked,signals,shorts,rory's,reminding,relative,ninth,floors,dough,creations,continues,cancelled,cabot,barrel,adam's,snuck,slight,reporters,rear,pressing,novel,newspapers,magnificent,madame,lazy,glorious,fiancee,candidate,brick,bits,australia,activities,visitation,scholarship,sane,previous,kindness,ivy's,shoulda,rescued,mattress,maria's,lounge,lifted,label,importantly,glove,enterprises,driver's,disappointment,condo,cemetery,beings,admitting,yelled,waving,screech,satisfaction,requested,reads,plants,nun,nailed,described,dedicated,certificate,centuries,annual,worm,tick,resting,primary,polish,marvelous,fuss,funds,defensive,cortlandt,compete,chased,provided,pockets,luckily,lilith,filing,depression,conversations,consideration,consciousness,worlds,innocence,indicate,grandmother's,forehead,bam,appeared,aggressive,trailer,slam,retirement,quitting,pry,person's,narrow,levels,kay's,inform,encourage,dug,delighted,daylight,danced,currently,confidential,billy's,ben's,aunts,washing,vic,tossed,spectra,rick's,permit,marrow,lined,implying,hatred,grill,efforts,corpse,clues,sober,relatives,promotion,offended,morgue,larger,infected,humanity,eww,emily's,electricity,electrical,distraction,cart,broadcast,wired,violation,suspended,promising,harassment,glue,gathering,d'angelo,cursed,controlled,calendar,brutal,assets,warlocks,wagon,unpleasant,proving,priorities,observation,mustn't,lease,grows,flame,domestic,disappearance,depressing,thrill,sitter,ribs,offers,naw,flush,exception,earrings,deadline,corporal,collapsed,update,snapped,smack,orleans,offices,melt,figuring,delusional,coulda,burnt,actors,trips,tender,sperm,specialist,scientific,realise,pork,popped,planes,kev,interrogation,institution,included,esteem,communications,choosing,choir,undo,pres,prayed,plague,manipulate,lifestyle,insulting,honour,detention,delightful,coffeehouse,chess,betrayal,apologizing,adjust,wrecked,wont,whipped,rides,reminder,psychological,principle,monsieur,injuries,fame,faint,confusion,christ's,bon,bake,nearest,korea,industries,execution,distress,definition,creating,correctly,complaint,blocked,trophy,tortured,structure,rot,risking,pointless,household,heir,handing,eighth,dumping,cups,chloe's,alibi,absence,vital,tokyo,thus,struggling,shiny,risked,refer,mummy,mint,joey's,involvement,hose,hobby,fortunate,fleischman,fitting,curtain,counseling,addition,wit,transport,technical,rode,puppet,opportunities,modeling,memo,irresponsible,humiliation,hiya,freakin,fez,felony,choke,blackmailing,appreciated,tabloid,suspicion,recovering,rally,psychology,pledge,panicked,nursery,louder,jeans,investigator,identified,homecoming,helena's,height,graduated,frustrating,fabric,distant,buys,busting,buff,wax,sleeve,products,philosophy,irony,hospitals,dope,declare,autopsy,workin,torch,substitute,scandal,prick,limb,leaf,lady's,hysterical,growth,goddamnit,fetch,dimension,day's,crowded,clip,climbing,bonding,approved,yeh,woah,ultimately,trusts,returns,negotiate,millennium,majority,lethal,length,iced,deeds,bore,babysitter,questioned,outrageous,medal,kiriakis,insulted,grudge,established,driveway,deserted,definite,capture,beep,wires,suggestions,searched,owed,originally,nickname,lighting,lend,drunken,demanding,costanza,conviction,characters,bumped,weigh,touches,tempted,shout,resolve,relate,poisoned,pip,phoebe's,pete's,occasionally,molly's,meals,maker,invitations,haunted,fur,footage,depending,bogus,autograph,affects,tolerate,stepping,spontaneous,sleeps,probation,presentation,performed,manny,identical,fist,cycle,associates,aaron's,streak,spectacular,sector,lasted,isaac's,increase,hostages,heroin,havin,habits,encouraging,cult,consult,burgers,boyfriends,bailed,baggage,association,wealthy,watches,versus,troubled,torturing,teasing,sweetest,stations,sip,shawn's,rag,qualities,postpone,pad,overwhelmed,malkovich,impulse,hut,follows,classy,charging,barbara's,angel's,amazed,scenes,rising,revealed,representing,policeman,offensive,mug,hypocrite,humiliate,hideous,finals,experiences,d'ya,courts,costumes,captured,bluffing,betting,bein,bedtime,alcoholic,vegetable,tray,suspicions,spreading,splendid,shouting,roots,pressed,nooo,liza's,jew,intent,grieving,gladly,fling,eliminate,disorder,courtney's,cereal,arrives,aaah,yum,technique,statements,sonofabitch,servant,roads,republican,paralyzed,orb,lotta,locks,guaranteed,european,dummy,discipline,despise,dental,corporation,carries,briefing,bluff,batteries,atmosphere,whatta,tux,sounding,servants,rifle,presume,kevin's,handwriting,goals,gin,fainted,elements,dried,cape,allright,allowing,acknowledge,whacked,toxic,skating,reliable,quicker,penalty,panel,overwhelming,nearby,lining,importance,harassing,fatal,endless,elsewhere,dolls,convict,bold,ballet,whatcha,unlikely,spiritual,shutting,separation,recording,positively,overcome,goddam,failing,essence,dose,diagnosis,cured,claiming,bully,airline,ahold,yearbook,various,tempting,shelf,rig,pursuit,prosecution,pouring,possessed,partnership,miguel's,lindsay's,countries,wonders,tsk,thorough,spine,rath,psychiatric,meaningless,latte,jammed,ignored,fiance,exposure,exhibit,evidently,duties,contempt,compromised,capacity,cans,weekends,urge,theft,suing,shipment,scissors,responding,refuses,proposition,noises,matching,located,ink,hormones,hiv,hail,grandchildren,godfather,gently,establish,crane's,contracts,compound,buffy's,worldwide,smashed,sexually,sentimental,senor,scored,patient's,nicest,marketing,manipulated,jaw,intern,handcuffs,framed,errands,entertaining,discovery,crib,carriage,barge,awards,attending,ambassador,videos,tab,spends,slipping,seated,rubbing,rely,reject,recommendation,reckon,ratings,headaches,float,embrace,corners,whining,sweating,sole,skipped,restore,receiving,population,pep,mountie,motives,mama's,listens,korean,heroes,heart's,cristobel,controls,cheerleader,balsom,unnecessary,stunning,shipping,scent,santa's,quartermaines,praise,pose,montega,luxury,loosen,kyle's,keri's,info,hum,haunt,gracious,git,forgiving,fleet,errand,emperor,cakes,blames,abortion,worship,theories,strict,sketch,shifts,plotting,physician,perimeter,passage,pals,mere,mattered,lonigan,longest,jews,interference,eyewitness,enthusiasm,encounter,diapers,craig's,artists,strongest,shaken,serves,punched,projects,portal,outer,nazi,hal's,colleagues,catches,bearing,backyard,academic,winds,terrorists,sabotage,pea,organs,needy,mentor,measures,listed,lex,cuff,civilization,caribbean,articles,writes,woof,who'll,viki's,valid,rarely,rabbi,prank,performing,obnoxious,mates,improve,hereby,gabby,faked,cellar,whitelighter,void,substance,strangle,sour,skill,senate,purchase,native,muffins,interfering,hoh,gina's,demonic,colored,clearing,civilian,buildings,boutique,barrington,trading,terrace,smoked,seed,righty,relations,quack,published,preliminary,petey,pact,outstanding,opinions,knot,ketchup,items,examined,disappearing,cordy,coin,circuit,assist,administration,walt,uptight,ticking,terrifying,tease,tabitha's,syd,swamp,secretly,rejection,reflection,realizing,rays,pennsylvania,partly,mentally,marone,jurisdiction,frasier's,doubted,deception,crucial,congressman,cheesy,arrival,visited,supporting,stalling,scouts,scoop,ribbon,reserve,raid,notion,income,immune,grandma's,expects,edition,destined,constitution,classroom,bets,appreciation,appointed,accomplice,whitney's,wander,shoved,sewer,scroll,retire,paintings,lasts,fugitive,freezer,discount,cranky,crank,clearance,bodyguard,anxiety,accountant,abby's,whoops,volunteered,terrorist,tales,talents,stinking,resolved,remotely,protocol,livvie's,garlic,decency,cord,beds,asa's,areas,altogether,uniforms,tremendous,restaurants,rank,profession,popping,philadelphia,outa,observe,lung,largest,hangs,feelin,experts,enforcement,encouraged,economy,dudes,donation,disguise,diane's,curb,continued,competitive,businessman,bites,antique,advertising,ads,toothbrush,retreat,represents,realistic,profits,predict,nora's,lid,landlord,hourglass,hesitate,frank's,focusing,equally,consolation,boyfriend's,babbling,aged,troy's,tipped,stranded,smartest,sabrina's,rhythm,replacement,repeating,puke,psst,paycheck,overreacted,macho,leadership,kendall's,juvenile,john's,images,grocery,freshen,disposal,cuffs,consent,caffeine,arguments,agrees,abigail's,vanished,unfinished,tobacco,tin,syndrome,ripping,pinch,missiles,isolated,flattering,expenses,dinners,cos,colleague,ciao,buh,belthazor,belle's,attorneys,amber's,woulda,whereabouts,wars,waitin,visits,truce,tripped,tee,tasted,stu,steer,ruling,poisoning,nursing,manipulative,immature,husbands,heel,granddad,delivering,deaths,condoms,automatically,anchor,trashed,tournament,throne,raining,prices,pasta,needles,leaning,leaders,judges,ideal,detector,coolest,casting,batch,approximately,appointments,almighty,achieve,vegetables,sum,spark,ruled,revolution,principles,perfection,pains,momma,mole,interviews,initiative,hairs,getaway,employment,den,cracking,counted,compliments,behold,verge,tougher,timer,tapped,taped,stakes,specialty,snooping,shoots,semi,rendezvous,pentagon,passenger,leverage,jeopardize,janitor,grandparents,forbidden,examination,communist,clueless,cities,bidding,arriving,adding,ungrateful,unacceptable,tutor,soviet,shaped,serum,scuse,savings,pub,pajamas,mouths,modest,methods,lure,irrational,depth,cries,classified,bombs,beautifully,arresting,approaching,vessel,variety,traitor,sympathetic,smug,smash,rental,prostitute,premonitions,mild,jumps,inventory,ing,improved,grandfather's,developing,darlin,committing,caleb's,banging,asap,amendment,worms,violated,vent,traumatic,traced,tow,swiss,sweaty,shaft,recommended,overboard,literature,insight,healed,grasp,fluid,experiencing,crappy,crab,connecticut,chunk,chandler's,awww,applied,witnessed,traveled,stain,shack,reacted,pronounce,presented,poured,occupied,moms,marriages,jabez,invested,handful,gob,gag,flipped,fireplace,expertise,embarrassment,disappears,concussion,bruises,brakes,anything's,week's,twisting,tide,swept,summon,splitting,settling,scientists,reschedule,regard,purposes,ohio,notch,mike's,improvement,hooray,grabbing,extend,exquisite,disrespect,complaints,colin's,armor,voting,thornhart,sustained,straw,slapped,simon's,shipped,shattered,ruthless,reva's,refill,recorded,payroll,numb,mourning,marijuana,manly,jerry's,involving,hunk,entertain,earthquake,drift,dreadful,doorstep,confirmation,chops,bridget's,appreciates,announced,vague,tires,stressful,stem,stashed,stash,sensed,preoccupied,predictable,noticing,madly,halls,gunshot,embassy,dozens,dinner's,confuse,cleaners,charade,chalk,cappuccino,breed,bouquet,amulet,addiction,who've,warming,unlock,transition,satisfy,sacrificed,relaxing,lone,input,hampshire,girlfriend's,elaborate,concerning,completed,channels,category,cal,blocking,blend,blankets,america's,addicted,yuck,voters,professionals,positions,monica's,mode,initial,hunger,hamburger,greeting,greet,gravy,gram,dreamt,dice,declared,collecting,caution,brady's,backpack,agreeing,writers,whale,tribe,taller,supervisor,sacrifices,radiation,poo,phew,outcome,ounce,missile,meter,likewise,irrelevant,gran,felon,feature,favorites,farther,fade,experiments,erased,easiest,disk,convenience,conceived,compassionate,challenged,cane,blair's,backstage,agony,adores,veins,tweek,thieves,surgical,strangely,stetson,recital,proposing,productive,meaningful,marching,immunity,hassle,goddamned,frighten,directors,dearly,comments,closure,cease,ambition,wisconsin,unstable,sweetness,salvage,richer,refusing,raging,pumping,pressuring,petition,mortals,lowlife,jus,intimidated,intentionally,inspire,forgave,eric's,devotion,despicable,deciding,dash,comfy,breach,bo's,bark,alternate,aaaah,switching,swallowed,stove,slot,screamed,scars,russians,relevant,poof,pipes,persons,pawn,losses,legit,invest,generations,farewell,experimental,difficulty,curtains,civilized,championship,caviar,boost,token,tends,temporarily,superstition,supernatural,sunk,sadness,reduced,recorder,psyched,presidential,owners,motivated,microwave,lands,karen's,hallelujah,gap,fraternity,engines,dryer,cocoa,chewing,additional,acceptable,unbelievably,survivor,smiled,smelling,sized,simpler,sentenced,respectable,remarks,registration,premises,passengers,organ,occasional,khasinau,indication,gutter,grabs,goo,fulfill,flashlight,ellenor,courses,blooded,blessings,beware,beth's,bands,advised,water's,uhhh,turf,swings,slips,shocking,resistance,privately,olivia's,mirrors,lyrics,locking,instrument,historical,heartless,fras,decades,comparison,childish,cassie's,cardiac,admission,utterly,tuscany,ticked,suspension,stunned,statesville,sadly,resolution,reserved,purely,opponent,noted,lowest,kiddin,jerks,hitch,flirt,fare,extension,establishment,equals,dismiss,delayed,decade,christening,casket,c'mere,breakup,brad's,biting,antibiotics,accusation,abducted,witchcraft,whoever's,traded,thread,spelling,so's,school's,runnin,remaining,punching,protein,printed,paramedics,newest,murdering,mine's,masks,lawndale,intact,ins,initials,heights,grampa,democracy,deceased,colleen's,choking,charms,careless,bushes,buns,bummed,accounting,travels,taylor's,shred,saves,saddle,rethink,regards,references,precinct,persuade,patterns,meds,manipulating,llanfair,leash,kenny's,housing,hearted,guarantees,flown,feast,extent,educated,disgrace,determination,deposition,coverage,corridor,burial,bookstore,boil,abilities,vitals,veil,trespassing,teaches,sidewalk,sensible,punishing,overtime,optimistic,occasions,obsessing,oak,notify,mornin,jeopardy,jaffa,injection,hilarious,distinct,directed,desires,curve,confide,challenging,cautious,alter,yada,wilderness,where're,vindictive,vial,tomb,teeny,subjects,stroll,sittin,scrub,rebuild,rachel's,posters,parallel,ordeal,orbit,o'brien,nuns,max's,jennifer's,intimacy,inheritance,fails,exploded,donate,distracting,despair,democratic,defended,crackers,commercials,bryant's,ammunition,wildwind,virtue,thoroughly,tails,spicy,sketches,sights,sheer,shaving,seize,scarecrow,refreshing,prosecute,possess,platter,phillip's,napkin,misplaced,merchandise,membership,loony,jinx,heroic,frankenstein,fag,efficient,devil's,corps,clan,boundaries,attract,ambitious,virtually,syrup,solitary,resignation,resemblance,reacting,pursuing,premature,pod,liz's,lavery,journalist,honors,harvey's,genes,flashes,erm,contribution,company's,client's,cheque,charts,cargo,awright,acquainted,wrapping,untie,salute,ruins,resign,realised,priceless,partying,myth,moonlight,lightly,lifting,kasnoff,insisting,glowing,generator,flowing,explosives,employer,cutie,confronted,clause,buts,breakthrough,blouse,ballistic,antidote,analyze,allowance,adjourned,vet,unto,understatement,tucked,touchy,toll,subconscious,sequence,screws,sarge,roommates,reaches,rambaldi,programs,offend,nerd,knives,kin,irresistible,inherited,incapable,hostility,goddammit,fuse,frat,equation,curfew,centered,blackmailed,allows,alleged,walkin,transmission,text,starve,sleigh,sarcastic,recess,rebound,procedures,pinned,parlor,outfits,livin,issued,institute,industrial,heartache,head's,haired,fundraiser,doorman,documentary,discreet,dilucca,detect,cracks,cracker,considerate,climbed,catering,author,apophis,zoey,vacuum,urine,tunnels,todd's,tanks,strung,stitches,sordid,sark,referred,protector,portion,phoned,pets,paths,mat,lengths,kindergarten,hostess,flaw,flavor,discharge,deveraux,consumed,confidentiality,automatic,amongst,viktor,victim's,tactics,straightened,specials,spaghetti,soil,prettier,powerless,por,poems,playin,playground,parker's,paranoia,nsa,mainly,mac's,joe's,instantly,havoc,exaggerating,evaluation,eavesdropping,doughnuts,diversion,deepest,cutest,companion,comb,bela,behaving,avoided,anyplace,agh,accessory,zap,whereas,translate,stuffing,speeding,slime,polls,personalities,payments,musician,marital,lurking,lottery,journalism,interior,imaginary,hog,guinea,greetings,game's,fairwinds,ethical,equipped,environmental,elegant,elbow,customs,cuban,credibility,credentials,consistent,collapse,cloth,claws,chopped,challenges,bridal,boards,bedside,babysitting,authorized,assumption,ant,youngest,witty,vast,unforgivable,underworld,tempt,tabs,succeeded,sophomore,selfless,secrecy,runway,restless,programming,professionally,okey,movin,metaphor,messes,meltdown,lecter,incoming,hence,gasoline,gained,funding,episodes,diefenbaker,contain,comedian,collected,cam,buckle,assembly,ancestors,admired,adjustment,acceptance,weekly,warmth,throats,seduced,ridge's,reform,rebecca's,queer,poll,parenting,noses,luckiest,graveyard,gifted,footsteps,dimeras,cynical,assassination,wedded,voyage,volunteers,verbal,unpredictable,tuned,stoop,slides,sinking,show's,rio,rigged,regulations,region,promoted,plumbing,lingerie,layer,katie's,hankey,greed,everwood,essential,elope,dresser,departure,dat,dances,coup,chauffeur,bulletin,bugged,bouncing,website,tubes,temptation,supported,strangest,sorel's,slammed,selection,sarcasm,rib,primitive,platform,pending,partial,packages,orderly,obsessive,nevertheless,nbc,murderers,motto,meteor,inconvenience,glimpse,froze,fiber,execute,etc,ensure,drivers,dispute,damages,crop,courageous,consulate,closes,bosses,bees,amends,wuss,wolfram,wacky,unemployed,traces,town's,testifying,tendency,syringe,symphony,stew,startled,sorrow,sleazy,shaky,screams,rsquo,remark,poke,phone's,philip's,nutty,nobel,mentioning,mend,mayor's,iowa,inspiring,impulsive,housekeeper,germans,formed,foam,fingernails,economic,divide,conditioning,baking,whine,thug,starved,sedative,rose's,reversed,publishing,programmed,picket,paged,nowadays,newman's,mines,margo's,invasion,homosexual,homo,hips,forgets,flipping,flea,flatter,dwell,dumpster,consultant,choo,banking,assignments,apartments,ants,affecting,advisor,vile,unreasonable,tossing,thanked,steals,souvenir,screening,scratched,rep,psychopath,proportion,outs,operative,obstruction,obey,neutral,lump,lily's,insists,ian's,harass,gloat,flights,filth,extended,electronic,edgy,diseases,didn,coroner,confessing,cologne,cedar,bruise,betraying,bailing,attempting,appealing,adebisi,wrath,wandered,waist,vain,traps,transportation,stepfather,publicly,presidents,poking,obligated,marshal,lexie's,instructed,heavenly,halt,employed,diplomatic,dilemma,crazed,contagious,coaster,cheering,carved,bundle,approached,appearances,vomit,thingy,stadium,speeches,robbing,reflect,raft,qualify,pumped,pillows,peep,pageant,packs,neo,neglected,m'kay,loneliness,liberal,intrude,indicates,helluva,gardener,freely,forresters,err,drooling,continuing,betcha,alan's,addressed,acquired,vase,supermarket,squat,spitting,spaces,slaves,rhyme,relieve,receipts,racket,purchased,preserve,pictured,pause,overdue,officials,nod,motivation,morgendorffer,lucky's,lacking,kidnapper,introduction,insect,hunters,horns,feminine,eyeballs,dumps,disc,disappointing,difficulties,crock,convertible,context,claw,clamp,canned,cambias,bathtub,avanya,artery,weep,warmer,vendetta,tenth,suspense,summoned,stuff's,spiders,sings,reiber,raving,pushy,produced,poverty,postponed,ohhhh,noooo,mold,mice,laughter,incompetent,hugging,groceries,frequency,fastest,drip,differ,daphne's,communicating,body's,beliefs,bats,bases,auntie,adios,wraps,willingly,weirdest,voila,timmih,thinner,swelling,swat,steroids,sensitivity,scrape,rehearse,quarterback,organic,matched,ledge,justified,insults,increased,heavily,hateful,handles,feared,doorway,decorations,colour,chatting,buyer,buckaroo,bedrooms,batting,askin,ammo,tutoring,subpoena,span,scratching,requests,privileges,pager,mart,kel,intriguing,idiotic,hotels,grape,enlighten,dum,door's,dixie's,demonstrate,dairy,corrupt,combined,brunch,bridesmaid,barking,architect,applause,alongside,ale,acquaintance,yuh,wretched,superficial,sufficient,sued,soak,smoothly,sensing,restraint,quo,pow,posing,pleading,pittsburgh,peru,payoff,participate,organize,oprah,nemo,morals,loans,loaf,lists,laboratory,jumpy,intervention,ignorant,herbal,hangin,germs,generosity,flashing,country's,convent,clumsy,chocolates,captive,bianca's,behaved,apologise,vanity,trials,stumbled,republicans,represented,recognition,preview,poisonous,perjury,parental,onboard,mugged,minding,linen,learns,knots,interviewing,inmates,ingredients,humour,grind,greasy,goons,estimate,elementary,edmund's,drastic,database,coop,comparing,cocky,clearer,bruised,brag,bind,axe,asset,apparent,ann's,worthwhile,whoop,wedding's,vanquishing,tabloids,survivors,stenbeck's,sprung,spotlight,shops,sentencing,sentences,revealing,reduce,ram,racist,provoke,piper's,pining,overly,oui,ops,mop,louisiana,locket,king's,jab,imply,impatient,hovering,hotter,fest,endure,dots,doren,dim,diagnosed,debts,cultures,crawled,contained,condemned,chained,brit,breaths,adds,weirdo,warmed,wand,utah,troubling,tok'ra,stripped,strapped,soaked,skipping,sharon's,scrambled,rattle,profound,musta,mocking,mnh,misunderstand,merit,loading,linked,limousine,kacl,investors,interviewed,hustle,forensic,foods,enthusiastic,duct,drawers,devastating,democrats,conquer,concentration,comeback,clarify,chores,cheerleaders,cheaper,charlie's,callin,blushing,barging,abused,yoga,wrecking,wits,waffles,virginity,vibes,uninvited,unfaithful,underwater,tribute,strangled,state's,scheming,ropes,responded,residents,rescuing,rave,priests,postcard,overseas,orientation,ongoing,o'reily,newly,neil's,morphine,lotion,limitations,lesser,lectures,lads,kidneys,judgement,jog,itch,intellectual,installed,infant,indefinitely,grenade,glamorous,genetically,freud,faculty,engineering,doh,discretion,delusions,declaration,crate,competent,commonwealth,catalog,bakery,attempts,asylum,argh,applying,ahhhh,yesterday's,wedge,wager,unfit,tripping,treatments,torment,superhero,stirring,spinal,sorority,seminar,scenery,repairs,rabble,pneumonia,perks,owl,override,ooooh,moo,mija,manslaughter,mailed,love's,lime,lettuce,intimidate,instructor,guarded,grieve,grad,globe,frustration,extensive,exploring,exercises,eve's,doorbell,devices,deal's,dam,cultural,ctu,credits,commerce,chinatown,chemicals,baltimore,authentic,arraignment,annulled,altered,allergies,wanta,verify,vegetarian,tunes,tourist,tighter,telegram,suitable,stalk,specimen,spared,solving,shoo,satisfying,saddam,requesting,publisher,pens,overprotective,obstacles,notified,negro,nasedo,judged,jill's,identification,grandchild,genuinely,founded,flushed,fluids,floss,escaping,ditched,demon's,decorated,criticism,cramp,corny,contribute,connecting,bunk,bombing,bitten,billions,bankrupt,yikes,wrists,ultrasound,ultimatum,thirst,spelled,sniff,scope,ross's,room's,retrieve,releasing,reassuring,pumps,properties,predicted,neurotic,negotiating,needn't,multi,monitors,millionaire,microphone,mechanical,lydecker,limp,incriminating,hatchet,gracias,gordie,fills,feeds,egypt,doubting,dedication,decaf,dawson's,competing,cellular,biopsy,whiz,voluntarily,visible,ventilator,unpack,unload,universal,tomatoes,targets,suggests,strawberry,spooked,snitch,schillinger,sap,reassure,providing,prey,pressure's,persuasive,mystical,mysteries,mri,moment's,mixing,matrimony,mary's,mails,lighthouse,liability,kgb,jock,headline,frankie's,factors,explosive,explanations,dispatch,detailed,curly,cupid,condolences,comrade,cassadines,bulb,brittany's,bragging,awaits,assaulted,ambush,adolescent,adjusted,abort,yank,whit,verse,vaguely,undermine,tying,trim,swamped,stitch,stan's,stabbing,slippers,skye's,sincerely,sigh,setback,secondly,rotting,rev,retail,proceedings,preparation,precaution,pox,pcpd,nonetheless,melting,materials,mar,liaison,hots,hooking,headlines,hag,ganz,fury,felicity,fangs,expelled,encouragement,earring,dreidel,draws,dory,donut,dog's,dis,dictate,dependent,decorating,coordinates,cocktails,bumps,blueberry,believable,backfired,backfire,apron,anticipated,adjusting,activated,vous,vouch,vitamins,vista,urn,uncertain,ummm,tourists,tattoos,surrounding,sponsor,slimy,singles,sibling,shhhh,restored,representative,renting,reign,publish,planets,peculiar,parasite,paddington,noo,marries,mailbox,magically,lovebirds,listeners,knocks,kane's,informant,grain,exits,elf,drazen,distractions,disconnected,dinosaurs,designing,dashwood,crooked,conveniently,contents,argued,wink,warped,underestimated,testified,tacky,substantial,steve's,steering,staged,stability,shoving,seizure,reset,repeatedly,radius,pushes,pitching,pairs,opener,mornings,mississippi,matthew's,mash,investigations,invent,indulge,horribly,hallucinating,festive,eyebrows,expand,enjoys,dictionary,dialogue,desperation,dealers,darkest,daph,critic,consulting,cartman's,canal,boragora,belts,bagel,authorization,auditions,associated,ape,amy's,agitated,adventures,withdraw,wishful,wimp,vehicles,vanish,unbearable,tonic,tom's,tackle,suffice,suction,slaying,singapore,safest,rosanna's,rocking,relive,rates,puttin,prettiest,oval,noisy,newlyweds,nauseous,moi,misguided,mildly,midst,maps,liable,kristina's,judgmental,introducing,individuals,hunted,hen,givin,frequent,fisherman,fascinated,elephants,dislike,diploma,deluded,decorate,crummy,contractions,carve,careers,bottled,bonded,bahamas,unavailable,twenties,trustworthy,translation,traditions,surviving,surgeons,stupidity,skies,secured,salvation,remorse,rafe's,princeton,preferably,pies,photography,operational,nuh,northwest,nausea,napkins,mule,mourn,melted,mechanism,mashed,julia's,inherit,holdings,hel,greatness,golly,excused,edges,dumbo,drifting,delirious,damaging,cubicle,compelled,comm,colleges,cole's,chooses,checkup,chad's,certified,candidates,boredom,bob's,bandages,baldwin's,bah,automobile,athletic,alarms,absorbed,absent,windshield,who're,whaddya,vitamin,transparent,surprisingly,sunglasses,starring,slit,sided,schemes,roar,relatively,reade,quarry,prosecutor,prognosis,probe,potentially,pitiful,persistent,perception,percentage,peas,oww,nosy,neighbourhood,nagging,morons,molecular,meters,masterpiece,martinis,limbo,liars,jax's,irritating,inclined,hump,hoynes,haw,gauge,functions,fiasco,educational,eatin,donated,destination,dense,cubans,continent,concentrating,commanding,colorful,clam,cider,brochure,behaviour,barto,bargaining,awe,artistic,welcoming,weighing,villain,vein,vanquished,striking,stains,sooo,smear,sire,simone's,secondary,roughly,rituals,resentment,psychologist,preferred,pint,pension,passive,overhear,origin,orchestra,negotiations,mounted,morality,landingham,labs,kisser,jackson's,icy,hoot,holling,handshake,grilled,functioning,formality,elevators,edward's,depths,confirms,civilians,bypass,briefly,boathouse,binding,acres,accidental,westbridge,wacko,ulterior,transferring,tis,thugs,tangled,stirred,stefano's,sought,snag,smallest,sling,sleaze,seeds,rumour,ripe,remarried,reluctant,regularly,puddle,promote,precise,popularity,pins,perceptive,miraculous,memorable,maternal,lucinda's,longing,lockup,locals,librarian,job's,inspection,impressions,immoral,hypothetically,guarding,gourmet,gabe,fighters,fees,features,faxed,extortion,expressed,essentially,downright,digest,der,crosses,cranberry,city's,chorus,casualties,bygones,buzzing,burying,bikes,attended,allah,all's,weary,viewing,viewers,transmitter,taping,takeout,sweeping,stepmother,stating,stale,seating,seaborn,resigned,rating,prue's,pros,pepperoni,ownership,occurs,nicole's,newborn,merger,mandatory,malcolm's,ludicrous,jan's,injected,holden's,henry's,heating,geeks,forged,faults,expressing,eddie's,drue,dire,dief,desi,deceiving,centre,celebrities,caterer,calmed,businesses,budge,ashley's,applications,ankles,vending,typing,tribbiani,there're,squared,speculation,snowing,shades,sexist,scudder's,scattered,sanctuary,rewrite,regretted,regain,raises,processing,picky,orphan,mural,misjudged,miscarriage,memorize,marshall's,mark's,licensed,lens,leaking,launched,larry's,languages,judge's,jitters,invade,interruption,implied,illegally,handicapped,glitch,gittes,finer,fewer,engineered,distraught,dispose,dishonest,digs,dahlia's,dads,cruelty,conducting,clinical,circling,champions,canceling,butterflies,belongings,barbrady,amusement,allegations,alias,aging,zombies,where've,unborn,tri,swearing,stables,squeezed,spaulding's,slavery,sew,sensational,revolutionary,resisting,removing,radioactive,races,questionable,privileged,portofino,par,owning,overlook,overhead,orson,oddly,nazis,musicians,interrogate,instruments,imperative,impeccable,icu,hurtful,hors,heap,harley's,graduating,graders,glance,endangered,disgust,devious,destruct,demonstration,creates,crazier,countdown,coffee's,chump,cheeseburger,cat's,burglar,brotherhood,berries,ballroom,assumptions,ark,annoyed,allies,allergy,advantages,admirer,admirable,addresses,activate,accompany,wed,victoria's,valve,underpants,twit,triggered,teacher's,tack,strokes,stool,starr's,sham,seasons,sculpture,scrap,sailed,retarded,resourceful,remarkably,refresh,ranks,pressured,precautions,pointy,obligations,nightclub,mustache,month's,minority,mind's,maui,lace,isabella's,improving,iii,hunh,hubby,flare,fierce,farmers,dont,dokey,divided,demise,demanded,dangerously,crushing,considerable,complained,clinging,choked,chem,cheerleading,checkbook,cashmere,calmly,blush,believer,aspect,amazingly,alas,acute,a's,yak,whores,what've,tuition,trey's,tolerance,toilets,tactical,tacos,stairwell,spur,spirited,slower,sewing,separately,rubbed,restricted,punches,protects,partially,ole,nuisance,niagara,motherfuckers,mingle,mia's,kynaston,knack,kinkle,impose,hosting,harry's,gullible,grid,godmother,funniest,friggin,folding,financially,filming,fashions,eater,dysfunctional,drool,distinguished,defence,defeated,cruising,crude,criticize,corruption,contractor,conceive,clone,circulation,cedars,caliber,brighter,blinded,birthdays,bio,bill's,banquet,artificial,anticipate,annoy,achievement,whim,whichever,volatile,veto,vested,uncle's,supports,successfully,shroud,severely,rests,representation,quarantine,premiere,pleases,parent's,painless,pads,orphans,orphanage,offence,obliged,nip,niggers,negotiation,narcotics,nag,mistletoe,meddling,manifest,lookit,loo,lilah,investigated,intrigued,injustice,homicidal,hayward's,gigantic,exposing,elves,disturbance,disastrous,depended,demented,correction,cooped,colby's,cheerful,buyers,brownies,beverage,basics,attorney's,atm,arvin,arcade,weighs,upsets,unethical,tidy,swollen,sweaters,swap,stupidest,sensation,scalpel,rail,prototype,props,prescribed,pompous,poetic,ploy,paws,operates,objections,mushrooms,mulwray,monitoring,manipulation,lured,lays,lasting,kung,keg,jell,internship,insignificant,inmate,incentive,gandhi,fulfilled,flooded,expedition,evolution,discharged,disagreement,dine,dean's,crypt,coroner's,cornered,copied,confrontation,cds,catalogue,brightest,beethoven,banned,attendant,athlete,amaze,airlines,yogurt,wyndemere,wool,vocabulary,vcr,tulsa,tags,tactic,stuffy,slug,sexuality,seniors,segment,revelation,respirator,pulp,prop,producing,processed,pretends,polygraph,perp,pennies,ordinarily,opposition,olives,necks,morally,martyr,martial,lisa's,leftovers,joints,jimmy's,irs,invaded,imported,hopping,homey,hints,helicopters,heed,heated,heartbroken,gulf,greatly,forge,florist,firsthand,fiend,expanding,emma's,defenses,crippled,cousin's,corrected,conniving,conditioner,clears,chemo,bubbly,bladder,beeper,baptism,apb,answer's,anna's,angles,ache,womb,wiring,wench,weaknesses,volunteering,violating,unlocked,unemployment,tummy,tibet,threshold,surrogate,submarine,subid,stray,stated,startle,specifics,snob,slowing,sled,scoot,robbers,rightful,richest,quid,qfxmjrie,puffs,probable,pitched,pierced,pencils,paralysis,nuke,managing,makeover,luncheon,lords,linksynergy,jury's,jacuzzi,ish,interstate,hitched,historic,hangover,gasp,fracture,flock,firemen,drawings,disgusted,darned,coal,clams,chez,cables,broadcasting,brew,borrowing,banged,achieved,wildest,weirder,unauthorized,stunts,sleeves,sixties,shush,shalt,senora,rises,retro,quits,pupils,politicians,pegged,painfully,paging,outlet,omelet,observed,ned's,memorized,lawfully,jackets,interpretation,intercept,ingredient,grownup,glued,gaining,fulfilling,flee,enchanted,dvd,delusion,daring,conservative,conducted,compelling,charitable,carton,bronx,bridesmaids,bribed,boiling,bathrooms,bandage,awareness,awaiting,assign,arrogance,antiques,ainsley,turkeys,travelling,trashing,tic,takeover,sync,supervision,stockings,stalked,stabilized,spacecraft,slob,skates,sirs,sedated,robes,reviews,respecting,rat's,psyche,prominent,prizes,presumptuous,prejudice,platoon,permitted,paragraph,mush,mum's,movements,mist,missions,mints,mating,mantan,lorne,lord's,loads,listener,legendary,itinerary,hugs,hepatitis,heave,guesses,gender,flags,fading,exams,examining,elizabeth's,egyptian,dumbest,dishwasher,dimera's,describing,deceive,cunning,cripple,cove,convictions,congressional,confided,compulsive,compromising,burglary,bun,bumpy,brainwashed,benes,arnie,alvy,affirmative,adrenaline,adamant,watchin,waitresses,uncommon,treaty,transgenic,toughest,toby's,surround,stormed,spree,spilling,spectacle,soaking,significance,shreds,sewers,severed,scarce,scamming,scalp,sami's,salem's,rewind,rehearsing,pretentious,potions,possessions,planner,placing,periods,overrated,obstacle,notices,nerds,meems,medieval,mcmurphy,maturity,maternity,masses,maneuver,lyin,loathe,lawyer's,irv,investigators,hep,grin,gospel,gals,formation,fertility,facilities,exterior,epidemic,eloping,ecstatic,ecstasy,duly,divorcing,distribution,dignan,debut,costing,coaching,clubhouse,clot,clocks,classical,candid,bursting,breather,braces,bennett's,bending,australian,attendance,arsonist,applies,adored,accepts,absorb,vacant,uuh,uphold,unarmed,turd,topolsky,thrilling,thigh,terminate,tempo,sustain,spaceship,snore,sneeze,smuggling,shrine,sera,scott's,salty,salon,ramp,quaint,prostitution,prof,policies,patronize,patio,nasa,morbid,marlo's,mamma,locations,licence,kettle,joyous,invincible,interpret,insecurities,insects,inquiry,infamous,impulses,illusions,holed,glen's,fragments,forrester's,exploit,economics,drivin,des,defy,defenseless,dedicate,cradle,cpr,coupon,countless,conjure,confined,celebrated,cardboard,booking,blur,bleach,ban,backseat,austin's,alternatives,afterward,accomplishment,wordsworth,wisely,wildlife,valet,vaccine,urges,unnatural,unlucky,truths,traumatized,tit,tennessee,tasting,swears,strawberries,steaks,stats,skank,seducing,secretive,screwdriver,schedules,rooting,rightfully,rattled,qualifies,puppets,provides,prospects,pronto,prevented,powered,posse,poorly,polling,pedestal,palms,muddy,morty,miniature,microscope,merci,margin,lecturing,inject,incriminate,hygiene,hospital's,grapefruit,gazebo,funnier,freight,flooding,equivalent,eliminated,elaine's,dios,deacon's,cuter,continental,container,cons,compensation,clap,cbs,cavity,caves,capricorn,canvas,calculations,bossy,booby,bacteria,aides,zende,winthrop,wider,warrants,valentines,undressed,underage,truthfully,tampered,suffers,stored,statute,speechless,sparkling,sod,socially,sidelines,shrek,sank,roy's,raul's,railing,puberty,practices,pesky,parachute,outrage,outdoors,operated,openly,nominated,motions,moods,lunches,litter,kidnappers,itching,intuition,index,imitation,icky,humility,hassling,gallons,firmly,excessive,evolved,employ,eligible,elections,elderly,drugstore,dosage,disrupt,directing,dipping,deranged,debating,cuckoo,cremated,craziness,cooperating,compatible,circumstantial,chimney,bonnie's,blinking,biscuits,belgium,arise,analyzed,admiring,acquire,accounted,willow's,weeping,volumes,views,triad,trashy,transaction,tilt,soothing,slumber,slayers,skirts,siren,ship's,shindig,sentiment,sally's,rosco,riddance,rewarded,quaid,purity,proceeding,pretzels,practiced,politician,polar,panicking,overall,occupation,naming,minimal,mckechnie,massacre,marah's,lovin,leaked,layers,isolation,intruding,impersonating,ignorance,hoop,hamburgers,gwen's,fruits,footprints,fluke,fleas,festivities,fences,feisty,evacuate,emergencies,diabetes,detained,democrat,deceived,creeping,craziest,corpses,conned,coincidences,charleston,bums,brussels,bounced,bodyguards,blasted,bitterness,baloney,ashtray,apocalypse,advances,zillion,watergate,wallpaper,viable,tory's,tenants,telesave,sympathize,sweeter,swam,sup,startin,stages,spencer's,sodas,snowed,sleepover,signor,seein,reviewing,reunited,retainer,restroom,rested,replacing,repercussions,reliving,reef,reconciliation,reconcile,recognise,prevail,preaching,planting,overreact,oof,omen,o'neil,numerous,noose,moustache,morning's,manicure,maids,mah,lorelei's,landlady,hypothetical,hopped,homesick,hives,hesitation,herbs,hectic,heartbreak,haunting,gangs,frown,fingerprint,extract,expired,exhausting,exchanged,exceptional,everytime,encountered,disregard,daytime,cooperative,constitutional,cling,chevron,chaperone,buenos,blinding,bitty,beads,battling,badgering,anticipation,advocate,zander's,waterfront,upstanding,unprofessional,unity,unhealthy,undead,turmoil,truthful,toothpaste,tippin,thoughtless,tagataya,stretching,strategic,spun,shortage,shooters,sheriff's,shady,senseless,sailors,rewarding,refuge,rapid,rah,pun,propane,pronounced,preposterous,pottery,portable,pigeons,pastry,overhearing,ogre,obscene,novels,negotiable,mtv,morgan's,monthly,loner,leisure,leagues,jogging,jaws,itchy,insinuating,insides,induced,immigration,hospitality,hormone,hilda's,hearst,grandpa's,frequently,forthcoming,fists,fifties,etiquette,endings,elevated,editing,dunk,distinction,disabled,dibs,destroys,despises,desired,designers,deprived,dancers,dah,cuddy,crust,conductor,communists,cloak,circumstance,chewed,casserole,bora,bidder,bearer,assessment,artoo,applaud,appalling,amounts,admissions,withdrawal,weights,vowed,virgins,vigilante,vatican,undone,trench,touchdown,throttle,thaw,tha,testosterone,tailor,symptom,swoop,suited,suitcases,stomp,sticker,stakeout,spoiling,snatched,smoochy,smitten,shameless,restraints,researching,renew,relay,regional,refund,reclaim,rapids,raoul,rags,puzzles,purposely,punks,prosecuted,plaid,pineapple,picturing,pickin,pbs,parasites,offspring,nyah,mysteriously,multiply,mineral,masculine,mascara,laps,kramer's,jukebox,interruptions,hoax,gunfire,gays,furnace,exceptions,engraved,elbows,duplicate,drapes,designated,deliberate,deli,decoy,cub,cryptic,crowds,critics,coupla,convert,conventional,condemn,complicate,combine,colossal,clerks,clarity,cassadine's,byes,brushed,bride's,banished,arrests,argon,andy's,alarmed,worships,versa,uncanny,troop,treasury,transformation,terminated,telescope,technicality,sydney's,sundae,stumble,stripping,shuts,separating,schmuck,saliva,robber,retain,remained,relentless,reconnect,recipes,rearrange,ray's,rainy,psychiatrists,producers,policemen,plunge,plugged,patched,overload,ofc,obtained,obsolete,o'malley,numbered,number's,nay,moth,module,mkay,mindless,menus,lullaby,lotte,leavin,layout,knob,killin,karinsky,irregular,invalid,hides,grownups,griff,flaws,flashy,flaming,fettes,evicted,epic,encoded,dread,dil,degrassi,dealings,dangers,cushion,console,concluded,casey's,bowel,beginnings,barged,apes,announcing,amanda's,admits,abroad,abide,abandoning,workshop,wonderfully,woak,warfare,wait'll,wad,violate,turkish,tim's,ter,targeted,susan's,suicidal,stayin,sorted,slamming,sketchy,shoplifting,shapes,selected,sarah's,retiring,raiser,quizmaster,pursued,pupkin,profitable,prefers,politically,phenomenon,palmer's,olympics,needless,nature's,mutt,motherhood,momentarily,migraine,lizzie's,lilo,lifts,leukemia,leftover,law's,keepin,idol,hinks,hellhole,h'mm,gowns,goodies,gallon,futures,friction,finale,farms,extraction,entertained,electronics,eighties,earth's,dmv,darker,daniel's,cum,conspiring,consequence,cheery,caps,calf,cadet,builds,benign,barney's,aspects,artillery,apiece,allison's,aggression,adjustments,abusive,abduction,wiping,whipping,welles,unspeakable,unlimited,unidentified,trivial,transcripts,threatens,textbook,tenant,supervise,superstitious,stricken,stretched,story's,stimulating,steep,statistics,spielberg,sodium,slices,shelves,scratches,saudi,sabotaged,roxy's,retrieval,repressed,relation,rejecting,quickie,promoting,ponies,peeking,paw,paolo,outraged,observer,o'connell,moping,moaning,mausoleum,males,licked,kovich,klutz,iraq,interrogating,interfered,intensive,insulin,infested,incompetence,hyper,horrified,handedly,hacked,guiding,glamour,geoff,gekko,fraid,fractured,formerly,flour,firearms,fend,executives,examiner,evaluate,eloped,duke's,disoriented,delivers,dashing,crystals,crossroads,crashdown,court's,conclude,coffees,cockroach,climate,chipped,camps,brushing,boulevard,bombed,bolts,begs,baths,baptized,astronaut,assurance,anemia,allegiance,aiming,abuela,abiding,workplace,withholding,weave,wearin,weaker,warnings,usa,tours,thesis,terrorism,suffocating,straws,straightforward,stench,steamed,starboard,sideways,shrinks,shortcut,sean's,scram,roasted,roaming,riviera,respectfully,repulsive,recognizes,receiver,psychiatry,provoked,penitentiary,peed,pas,painkillers,oink,norm,ninotchka,muslim,montgomery's,mitzvah,milligrams,mil,midge,marshmallows,markets,macy's,looky,lapse,kubelik,knit,jeb,investments,intellect,improvise,implant,hometown,hanged,handicap,halo,governor's,goa'ulds,giddy,gia's,geniuses,fruitcake,footing,flop,findings,fightin,fib,editorial,drinkin,doork,discovering,detour,danish,cuddle,crashes,coordinate,combo,colonnade,collector,cheats,cetera,canadians,bip,bailiff,auditioning,assed,amused,alienate,algebra,alexi,aiding,aching,woe,wah,unwanted,typically,tug,topless,tongues,tiniest,them's,symbols,superiors,soy,soften,sheldrake,sensors,seller,seas,ruler,rival,rips,renowned,recruiting,reasoning,rawley,raisins,racial,presses,preservation,portfolio,oversight,organizing,obtain,observing,nessa,narrowed,minions,midwest,meth,merciful,manages,magistrate,lawsuits,labour,invention,intimidating,infirmary,indicated,inconvenient,imposter,hugged,honoring,holdin,hades,godforsaken,fumes,forgery,foremost,foolproof,folder,folded,flattery,fingertips,financing,fifteenth,exterminator,explodes,eccentric,drained,dodging,documented,disguised,developments,currency,crafts,constructive,concealed,compartment,chute,chinpokomon,captains,capitol,calculated,buses,bodily,astronauts,alimony,accustomed,accessories,abdominal,zen,zach's,wrinkle,wallow,viv,vicinity,venue,valued,valium,valerie's,upgrade,upcoming,untrue,uncover,twig,twelfth,trembling,treasures,torched,toenails,timed,termites,telly,taunting,taransky,tar,talker,succubus,statues,smarts,sliding,sizes,sighting,semen,seizures,scarred,savvy,sauna,saddest,sacrificing,rubbish,riled,ricky's,rican,revive,recruit,ratted,rationally,provenance,professors,prestigious,pms,phonse,perky,pedal,overdose,organism,nasal,nanites,mushy,movers,moot,missus,midterm,merits,melodramatic,manure,magnetic,knockout,knitting,jig,invading,interpol,incapacitated,idle,hotline,horse's,highlight,hauling,hair's,gunpoint,greenwich,grail,ganza,framing,formally,fleeing,flap,flannel,fin,fibers,faded,existing,email,eavesdrop,dwelling,dwarf,donations,detected,desserts,dar,corporations,constellation,collision,chic,calories,businessmen,buchanan's,breathtaking,bleak,blacked,batter,balanced,ante,aggravated,agencies,abu,yanked,wuh,withdrawn,wigand,whoah,wham,vocal,unwind,undoubtedly,unattractive,twitch,trimester,torrance,timetable,taxpayers,strained,stationed,stared,slapping,sincerity,signatures,siding,siblings,shit's,shenanigans,shacking,seer,satellites,sappy,samaritan,rune,regained,rebellion,proceeds,privy,power's,poorer,politely,paste,oysters,overruled,olaf,nightcap,networks,necessity,mosquito,millimeter,michelle's,merrier,massachusetts,manuscript,manufacture,manhood,lunar,lug,lucked,loaned,kilos,ignition,hurl,hauled,harmed,goodwill,freshmen,forming,fenmore,fasten,farce,failures,exploding,erratic,elm,drunks,ditching,d'artagnan,crops,cramped,contacting,coalition,closets,clientele,chimp,cavalry,casa,cabs,bled,bargained,arranging,archives,anesthesia,amuse,altering,afternoons,accountable,abetting,wrinkles,wolek,waved,unite,uneasy,unaware,ufo,toot,toddy,tens,tattooed,tad's,sway,stained,spauldings,solely,sliced,sirens,schibetta,scatter,rumours,roger's,robbie's,rinse,remo,remedy,redemption,queen's,progressive,pleasures,picture's,philosopher,pacey's,optimism,oblige,natives,muy,measuring,measured,masked,mascot,malicious,mailing,luca,lifelong,kosher,koji,kiddies,judas,isolate,intercepted,insecurity,initially,inferior,incidentally,ifs,hun,heals,headlights,guided,growl,grilling,glazed,gem,gel,gaps,fundamental,flunk,floats,fiery,fairness,exercising,excellency,evenings,ere,enrolled,disclosure,det,department's,damp,curling,cupboard,counterfeit,cooling,condescending,conclusive,clicked,cleans,cholesterol,chap,cashed,brow,broccoli,brats,blueprints,blindfold,biz,billing,barracks,attach,aquarium,appalled,altitude,alrighty,aimed,yawn,xander's,wynant,winslow's,welcomed,violations,upright,unsolved,unreliable,toots,tighten,symbolic,sweatshirt,steinbrenner,steamy,spouse,sox,sonogram,slowed,slots,sleepless,skeleton,shines,roles,retaliate,representatives,rephrase,repeated,renaissance,redeem,rapidly,rambling,quilt,quarrel,prying,proverbial,priced,presiding,presidency,prescribe,prepped,pranks,possessive,plaintiff,philosophical,pest,persuaded,perk,pediatrics,paige's,overlooked,outcast,oop,odor,notorious,nightgown,mythology,mumbo,monitored,mediocre,master's,mademoiselle,lunchtime,lifesaver,legislation,leaned,lambs,lag,killings,interns,intensity,increasing,identities,hounding,hem,hellmouth,goon,goner,ghoul,germ,gardening,frenzy,foyer,food's,extras,extinct,exhibition,exaggerate,everlasting,enlightened,drilling,doubles,digits,dialed,devote,defined,deceitful,d'oeuvres,csi,cosmetic,contaminated,conspired,conning,colonies,cerebral,cavern,cathedral,carving,butting,boiled,blurry,beams,barf,babysit,assistants,ascension,architecture,approaches,albums,albanian,aaaaah,wildly,whoopee,whiny,weiskopf,walkie,vultures,veteran,vacations,upfront,unresolved,tile,tampering,struggled,stockholders,specially,snaps,sleepwalking,shrunk,sermon,seeks,seduction,scenarios,scams,ridden,revolve,repaired,regulation,reasonably,reactor,quotes,preserved,phenomenal,patrolling,paranormal,ounces,omigod,offs,nonstop,nightfall,nat,militia,meeting's,logs,lineup,libby's,lava,lashing,labels,kilometers,kate's,invites,investigative,innocents,infierno,incision,import,implications,humming,highlights,haunts,greeks,gloss,gloating,general's,frannie,flute,fled,fitted,finishes,fiji,fetal,feeny,entrapment,edit,dyin,download,discomfort,dimensions,detonator,dependable,deke,decree,dax,cot,confiscated,concludes,concede,complication,commotion,commence,chulak,caucasian,casually,canary,brainer,bolie,ballpark,arm's,anwar,anatomy,analyzing,accommodations,yukon,youse,wring,wharf,wallowing,uranium,unclear,treason,transgenics,thrive,think's,thermal,territories,tedious,survives,stylish,strippers,sterile,squeezing,squeaky,sprained,solemn,snoring,sic,shifting,shattering,shabby,seams,scrawny,rotation,risen,revoked,residue,reeks,recite,reap,ranting,quoting,primal,pressures,predicament,precision,plugs,pits,pinpoint,petrified,petite,persona,pathological,passports,oughtta,nods,nighter,navigate,nashville,namely,museums,morale,milwaukee,meditation,mathematics,martin's,malta,logan's,latter,kippie,jackie's,intrigue,intentional,insufferable,incomplete,inability,imprisoned,hup,hunky,how've,horrifying,hearty,headmaster,hath,har,hank's,handbook,hamptons,grazie,goof,george's,funerals,fuck's,fraction,forks,finances,fetched,excruciating,enjoyable,enhanced,enhance,endanger,efficiency,dumber,drying,diabolical,destroyer,desirable,defendants,debris,darts,cuisine,cucumber,cube,crossword,contestant,considers,comprehend,club's,clipped,classmates,choppers,certificates,carmen's,canoe,candlelight,building's,brutally,brutality,boarded,bathrobe,backward,authorize,audrey's,atom,assemble,appeals,airports,aerobics,ado,abbott's,wholesome,whiff,vessels,vermin,varsity,trophies,trait,tragically,toying,titles,tissues,testy,team's,tasteful,surge,sun's,studios,strips,stocked,stephen's,staircase,squares,spinach,sow,southwest,southeast,sookie's,slayer's,sipping,singers,sidetracked,seldom,scrubbing,scraping,sanctity,russell's,ruse,robberies,rink,ridin,retribution,reinstated,refrain,rec,realities,readings,radiant,protesting,projector,posed,plutonium,plaque,pilar's,payin,parting,pans,o'reilly,nooooo,motorcycles,motherfucking,mein,measly,marv,manic,line's,lice,liam,lenses,lama,lalita,juggling,jerking,jamie's,intro,inevitably,imprisonment,hypnosis,huddle,horrendous,hobbies,heavier,heartfelt,harlin,hairdresser,grub,gramps,gonorrhea,gardens,fussing,fragment,fleeting,flawless,flashed,fetus,exclusively,eulogy,equality,enforce,distinctly,disrespectful,denies,crossbow,crest,cregg,crabs,cowardly,countess,contrast,contraction,contingency,consulted,connects,confirming,condone,coffins,cleansing,cheesecake,certainty,captain's,cages,c'est,briefed,brewing,bravest,bosom,boils,binoculars,bachelorette,aunt's,atta,assess,appetizer,ambushed,alerted,woozy,withhold,weighed,vulgar,viral,utmost,unusually,unleashed,unholy,unhappiness,underway,uncovered,unconditional,typewriter,typed,twists,sweeps,supervised,supermodel,suburbs,subpoenaed,stringing,snyder's,snot,skeptical,skateboard,shifted,secret's,scottish,schoolgirl,romantically,rocked,revoir,reviewed,respiratory,reopen,regiment,reflects,refined,puncture,pta,prone,produces,preach,pools,polished,pods,planetarium,penicillin,peacefully,partner's,nurturing,nation's,more'n,monastery,mmhmm,midgets,marklar,machinery,lodged,lifeline,joanna's,jer,jellyfish,infiltrate,implies,illegitimate,hutch,horseback,henri,heist,gents,frickin,freezes,forfeit,followers,flakes,flair,fathered,fascist,eternally,eta,epiphany,enlisted,eleventh,elect,effectively,dos,disgruntled,discrimination,discouraged,delinquent,decipher,danvers,dab,cubes,credible,coping,concession,cnn,clash,chills,cherished,catastrophe,caretaker,bulk,bras,branches,bombshell,birthright,billionaire,awol,ample,alumni,affections,admiration,abbotts,zelda's,whatnot,watering,vinegar,vietnamese,unthinkable,unseen,unprepared,unorthodox,underhanded,uncool,transmitted,traits,timeless,thump,thermometer,theoretically,theoretical,testament,tapping,tagged,tac,synthetic,syndicate,swung,surplus,supplier,stares,spiked,soviets,solves,smuggle,scheduling,scarier,saucer,reinforcements,recruited,rant,quitter,prudent,projection,previously,powdered,poked,pointers,placement,peril,penetrate,penance,patriotic,passions,opium,nudge,nostrils,nevermind,neurological,muslims,mow,momentum,mockery,mobster,mining,medically,magnitude,maggie's,loudly,listing,killer's,kar,jim's,insights,indicted,implicate,hypocritical,humanly,holiness,healthier,hammered,haldeman,gunman,graphic,gloom,geography,gary's,freshly,francs,formidable,flunked,flawed,feminist,faux,ewww,escorted,escapes,emptiness,emerge,drugging,dozer,doc's,directorate,diana's,derevko,deprive,deodorant,cryin,crusade,crocodile,creativity,controversial,commands,coloring,colder,cognac,clocked,clippings,christine's,chit,charades,chanting,certifiable,caterers,brute,brochures,briefs,bran,botched,blinders,bitchin,bauer's,banter,babu,appearing,adequate,accompanied,abrupt,abdomen,zones,wooo,woken,winding,vip,venezuela,unanimous,ulcer,tread,thirteenth,thankfully,tame,tabby's,swine,swimsuit,swans,suv,stressing,steaming,stamped,stabilize,squirm,spokesman,snooze,shuffle,shredded,seoul,seized,seafood,scratchy,savor,sadistic,roster,rica,rhetorical,revlon,realist,reactions,prosecuting,prophecies,prisons,precedent,polyester,petals,persuasion,paddles,o'leary,nuthin,neighbour,negroes,naval,mute,muster,muck,minnesota,meningitis,matron,mastered,markers,maris's,manufactured,lot's,lockers,letterman,legged,launching,lanes,journals,indictment,indicating,hypnotized,housekeeping,hopelessly,hmph,hallucinations,grader,goldilocks,girly,furthermore,frames,flask,expansion,envelopes,engaging,downside,doves,doorknob,distinctive,dissolve,discourage,disapprove,diabetic,departed,deliveries,decorator,deaq,crossfire,criminally,containment,comrades,complimentary,commitments,chum,chatter,chapters,catchy,cashier,cartel,caribou,cardiologist,bull's,buffer,brawl,bowls,booted,boat's,billboard,biblical,barbershop,awakening,aryan,angst,administer,acquitted,acquisition,aces,accommodate,zellie,yield,wreak,witch's,william's,whistles,wart,vandalism,vamps,uterus,upstate,unstoppable,unrelated,understudy,tristin,transporting,transcript,tranquilizer,trails,trafficking,toxins,tonsils,timing's,therapeutic,tex,subscription,submitted,stephanie's,stempel,spotting,spectator,spatula,soho,softer,snotty,slinging,showered,sexiest,sensual,scoring,sadder,roam,rimbaud,rim,rewards,restrain,resilient,remission,reinstate,rehash,recollection,rabies,quinn's,presenting,preference,prairie,popsicle,plausible,plantation,pharmaceutical,pediatric,patronizing,patent,participation,outdoor,ostrich,ortolani,oooooh,omelette,neighbor's,neglect,nachos,movie's,mixture,mistrial,mio,mcginty's,marseilles,mare,mandate,malt,luv,loophole,literary,liberation,laughin,lacey's,kevvy,jah,irritated,intends,initiation,initiated,initiate,influenced,infidelity,indigenous,inc,idaho,hypothermia,horrific,hive,heroine,groupie,grinding,graceful,government's,goodspeed,gestures,gah,frantic,extradition,evil's,engineers,echelon,earning,disks,discussions,demolition,definitive,dawnie,dave's,date's,dared,dan's,damsel,curled,courtyard,constitutes,combustion,collective,collateral,collage,col,chant,cassette,carol's,carl's,calculating,bumping,britain,bribes,boardwalk,blinds,blindly,bleeds,blake's,bickering,beasts,battlefield,bankruptcy,backside,avenge,apprehended,annie's,anguish,afghanistan,acknowledged,abusing,youthful,yells,yanking,whomever,when'd,waterfall,vomiting,vine,vengeful,utility,unpacking,unfamiliar,undying,tumble,trolls,treacherous,todo,tipping,tantrum,tanked,summons,strategies,straps,stomped,stinkin,stings,stance,staked,squirrels,sprinkles,speculate,specialists,sorting,skinned,sicko,sicker,shootin,shep,shatter,seeya,schnapps,s'posed,rows,rounded,ronee,rite,revolves,respectful,resource,reply,rendered,regroup,regretting,reeling,reckoned,rebuilding,randy's,ramifications,qualifications,pulitzer,puddy,projections,preschool,pots,potassium,plissken,platonic,peter's,permalash,performer,peasant,outdone,outburst,ogh,obscure,mutants,mugging,molecules,misfortune,miserably,miraculously,medications,medals,margaritas,manpower,lovemaking,long's,logo,logically,leeches,latrine,lamps,lacks,kneel,johnny's,jenny's,inflict,impostor,icon,hypocrisy,hype,hosts,hippies,heterosexual,heightened,hecuba's,hecuba,healer,habitat,gunned,grooming,groo,groin,gras,gory,gooey,gloomy,frying,friendships,fredo,foil,fishermen,firepower,fess,fathom,exhaustion,evils,epi,endeavor,ehh,eggnog,dreaded,drafted,dimensional,detached,deficit,d'arcy,crotch,coughing,coronary,cookin,contributed,consummate,congrats,concerts,companionship,caved,caspar,bulletproof,bris,brilliance,breakin,brash,blasting,beak,arabia,analyst,aluminum,aloud,alligator,airtight,advising,advertise,adultery,administered,aches,abstract,aahh,wronged,wal,voluntary,ventilation,upbeat,uncertainty,trot,trillion,tricia's,trades,tots,tol,tightly,thingies,tending,technician,tarts,surreal,summer's,strengths,specs,specialize,spat,spade,slogan,sloane's,shrew,shaping,seth's,selves,seemingly,schoolwork,roomie,requirements,redundant,redo,recuperating,recommendations,ratio,rabid,quart,pseudo,provocative,proudly,principal's,pretenses,prenatal,pillar,photographers,photographed,pharmaceuticals,patron,pacing,overworked,originals,nicotine,newsletter,neighbours,murderous,miller's,mileage,mechanics,mayonnaise,massages,maroon,lucrative,losin,lil,lending,legislative,kat,juno,iran,interrogated,instruction,injunction,impartial,homing,heartbreaker,harm's,hacks,glands,giver,fraizh,flows,flips,flaunt,excellence,estimated,espionage,englishman,electrocuted,eisenhower,dusting,ducking,drifted,donna's,donating,dom,distribute,diem,daydream,cylon,curves,crutches,crates,cowards,covenant,converted,contributions,composed,comfortably,cod,cockpit,chummy,chitchat,childbirth,charities,businesswoman,brood,brewery,bp's,blatant,bethy,barring,bagged,awakened,assumes,assembled,asbestos,arty,artwork,arc,anthony's,aka,airplanes,accelerated,worshipped,winnings,why're,whilst,wesley's,volleyball,visualize,unprotected,unleash,unexpectedly,twentieth,turnpike,trays,translated,tones,three's,thicker,therapists,takeoff,sums,stub,streisand,storm's,storeroom,stethoscope,stacked,sponsors,spiteful,solutions,sneaks,snapping,slaughtered,slashed,simplest,silverware,shits,secluded,scruples,scrubs,scraps,scholar,ruptured,rubs,roaring,relying,reflected,refers,receptionist,recap,reborn,raisin,rainforest,rae's,raditch,radiator,pushover,pout,plastered,pharmacist,petroleum,perverse,perpetrator,passages,ornament,ointment,occupy,nineties,napping,nannies,mousse,mort,morocco,moors,momentary,modified,mitch's,misunderstandings,marina's,marcy's,marched,manipulator,malfunction,loot,limbs,latitude,lapd,laced,kivar,kickin,interface,infuriating,impressionable,imposing,holdup,hires,hick,hesitated,hebrew,hearings,headphones,hammering,groundwork,grotesque,greenhouse,gradually,graces,genetics,gauze,garter,gangsters,g's,frivolous,freelance,freeing,fours,forwarding,feud,ferrars,faulty,fantasizing,extracurricular,exhaust,empathy,educate,divorces,detonate,depraved,demeaning,declaring,deadlines,dea,daria's,dalai,cursing,cufflink,crows,coupons,countryside,coo,consultation,composer,comply,comforted,clive,claustrophobic,chef's,casinos,caroline's,capsule,camped,cairo,busboy,bred,bravery,bluth,biography,berserk,bennetts,baskets,attacker,aplastic,angrier,affectionate,zit,zapped,yorker,yarn,wormhole,weaken,vat,unrealistic,unravel,unimportant,unforgettable,twain,tv's,tush,turnout,trio,towed,tofu,textbooks,territorial,suspend,supplied,superbowl,sundays,stutter,stewardess,stepson,standin,sshh,specializes,spandex,souvenirs,sociopath,snails,slope,skeletons,shivering,sexier,sequel,sensory,selfishness,scrapbook,romania,riverside,rites,ritalin,rift,ribbons,reunite,remarry,relaxation,reduction,realization,rattling,rapist,quad,pup,psychosis,promotions,presumed,prepping,posture,poses,pleasing,pisses,piling,photographic,pfft,persecuted,pear,part's,pantyhose,padded,outline,organizations,operatives,oohh,obituary,northeast,nina's,neural,negotiator,nba,natty,nathan's,minimize,merl,menopause,mennihan,marty's,martimmys,makers,loyalties,literal,lest,laynie,lando,justifies,josh's,intimately,interact,integrated,inning,inexperienced,impotent,immortality,imminent,ich,horrors,hooky,holders,hinges,heartbreaking,handcuffed,gypsies,guacamole,grovel,graziella,goggles,gestapo,fussy,functional,filmmaker,ferragamo,feeble,eyesight,explosions,experimenting,enzo's,endorsement,enchanting,eee,ed's,duration,doubtful,dizziness,dismantle,disciplinary,disability,detectors,deserving,depot,defective,decor,decline,dangling,dancin,crumble,criteria,creamed,cramping,cooled,conceal,component,competitors,clockwork,clark's,circuits,chrissakes,chrissake,chopping,cabinets,buttercup,brooding,bonfire,blurt,bluestar,bloated,blackmailer,beforehand,bathed,bathe,barcode,banjo,banish,badges,babble,await,attentive,artifacts,aroused,antibodies,animosity,administrator,accomplishments,ya'll,wrinkled,wonderland,willed,whisk,waltzing,waitressing,vis,vin,vila,vigilant,upbringing,unselfish,unpopular,unmarried,uncles,trendy,trajectory,targeting,surroundings,stun,striped,starbucks,stamina,stalled,staking,stag,spoils,snuff,snooty,snide,shrinking,senorita,securities,secretaries,scrutiny,scoundrel,saline,salads,sails,rundown,roz's,roommate's,riddles,responses,resistant,requirement,relapse,refugees,recommending,raspberry,raced,prosperity,programme,presumably,preparations,posts,pom,plight,pleaded,pilot's,peers,pecan,particles,pantry,overturned,overslept,ornaments,opposing,niner,nfl,negligent,negligence,nailing,mutually,mucho,mouthed,monstrous,monarchy,minsk,matt's,mateo's,marking,manufacturing,manager's,malpractice,maintaining,lowly,loitering,logged,lingering,light's,lettin,lattes,kim's,kamal,justification,juror,junction,julie's,joys,johnson's,jillefsky,jacked,irritate,intrusion,inscription,insatiable,infect,inadequate,impromptu,icing,hmmmm,hefty,grammar,generate,gdc,gasket,frightens,flapping,firstborn,fire's,fig,faucet,exaggerated,estranged,envious,eighteenth,edible,downward,dopey,doesn,disposition,disposable,disasters,disappointments,dipped,diminished,dignified,diaries,deported,deficiency,deceit,dealership,deadbeat,curses,coven,counselors,convey,consume,concierge,clutches,christians,cdc,casbah,carefree,callous,cahoots,caf,brotherly,britches,brides,bop,bona,bethie,beige,barrels,ballot,ave,autographed,attendants,attachment,attaboy,astonishing,ashore,appreciative,antibiotic,aneurysm,afterlife,affidavit,zuko,zoning,work's,whats,whaddaya,weakened,watermelon,vasectomy,unsuspecting,trial's,trailing,toula,topanga,tonio,toasted,tiring,thereby,terrorized,tenderness,tch,tailing,syllable,sweats,suffocated,sucky,subconsciously,starvin,staging,sprouts,spineless,sorrows,snowstorm,smirk,slicery,sledding,slander,simmer,signora,sigmund,siege,siberia,seventies,sedate,scented,sampling,sal's,rowdy,rollers,rodent,revenue,retraction,resurrection,resigning,relocate,releases,refusal,referendum,recuperate,receptive,ranking,racketeering,queasy,proximity,provoking,promptly,probability,priors,princes,prerogative,premed,pornography,porcelain,poles,podium,pinched,pig's,pendant,packet,owner's,outsiders,outpost,orbing,opportunist,olanov,observations,nurse's,nobility,neurologist,nate's,nanobot,muscular,mommies,molested,misread,melon,mediterranean,mea,mastermind,mannered,maintained,mackenzie's,liberated,lesions,lee's,laundromat,landscape,lagoon,labeled,jolt,intercom,inspect,insanely,infrared,infatuation,indulgent,indiscretion,inconsiderate,incidents,impaired,hurrah,hungarian,howling,honorary,herpes,hasta,harassed,hanukkah,guides,groveling,groosalug,geographic,gaze,gander,galactica,futile,fridays,flier,fixes,fide,fer,feedback,exploiting,exorcism,exile,evasive,ensemble,endorse,emptied,dreary,dreamy,downloaded,dodged,doctored,displayed,disobeyed,disneyland,disable,diego's,dehydrated,defect,customary,csc,criticizing,contracted,contemplating,consists,concepts,compensate,commonly,colours,coins,coconuts,cockroaches,clogged,cincinnati,churches,chronicle,chilling,chaperon,ceremonies,catalina's,cant,cameraman,bulbs,bucklands,bribing,brava,bracelets,bowels,bobby's,bmw,bluepoint,baton,barred,balm,audit,astronomy,aruba,appetizers,appendix,antics,anointed,analogy,almonds,albuquerque,abruptly,yore,yammering,winch,white's,weston's,weirdness,wangler,vibrations,vendor,unmarked,unannounced,twerp,trespass,tres,travesty,transported,transfusion,trainee,towelie,topics,tock,tiresome,thru,theatrical,terrain,suspect's,straightening,staggering,spaced,sonar,socializing,sitcom,sinus,sinners,shambles,serene,scraped,scones,scepter,sarris,saberhagen,rouge,rigid,ridiculously,ridicule,reveals,rents,reflecting,reconciled,rate's,radios,quota,quixote,publicist,pubes,prune,prude,provider,propaganda,prolonged,projecting,prestige,precrime,postponing,pluck,perpetual,permits,perish,peppermint,peeled,particle,parliament,overdo,oriented,optional,nutshell,notre,notions,nostalgic,nomination,mulan,mouthing,monkey's,mistook,mis,milhouse,mel's,meddle,maybourne,martimmy,loon,lobotomy,livelihood,litigation,lippman,likeness,laurie's,kindest,kare,kaffee,jocks,jerked,jeopardizing,jazzed,investing,insured,inquisition,inhale,ingenious,inflation,incorrect,igby,ideals,holier,highways,hereditary,helmets,heirloom,heinous,haste,harmsway,hardship,hanky,gutters,gruesome,groping,governments,goofing,godson,glare,garment,founding,fortunes,foe,finesse,figuratively,ferrie,fda,external,examples,evacuation,ethnic,est,endangerment,enclosed,emphasis,dyed,dud,dreading,dozed,dorky,dmitri,divert,dissertation,discredit,director's,dialing,describes,decks,cufflinks,crutch,creator,craps,corrupted,coronation,contemporary,consumption,considerably,comprehensive,cocoon,cleavage,chile,carriers,carcass,cannery,bystander,brushes,bruising,bribery,brainstorm,bolted,binge,bart's,barracuda,baroness,ballistics,b's,astute,arroway,arabian,ambitions,alexandra's,afar,adventurous,adoptive,addicts,addictive,accessible,yadda,wilson's,wigs,whitelighters,wematanye,weeds,wedlock,wallets,walker's,vulnerability,vroom,vibrant,vertical,vents,uuuh,urgh,upped,unsettling,unofficial,unharmed,underlying,trippin,trifle,tracing,tox,tormenting,timothy's,threads,theaters,thats,tavern,taiwan,syphilis,susceptible,summary,suites,subtext,stickin,spices,sores,smacked,slumming,sixteenth,sinks,signore,shitting,shameful,shacked,sergei,septic,seedy,security's,searches,righteousness,removal,relish,relevance,rectify,recruits,recipient,ravishing,quickest,pupil,productions,precedence,potent,pooch,pledged,phoebs,perverted,peeing,pedicure,pastrami,passionately,ozone,overlooking,outnumbered,outlook,oregano,offender,nukes,novelty,nosed,nighty,nifty,mugs,mounties,motivate,moons,misinterpreted,miners,mercenary,mentality,mas,marsellus,mapped,malls,lupus,lumbar,lovesick,longitude,lobsters,likelihood,leaky,laundering,latch,japs,jafar,instinctively,inspires,inflicted,inflammation,indoors,incarcerated,imagery,hundredth,hula,hemisphere,handkerchief,hand's,gynecologist,guittierez,groundhog,grinning,graduates,goodbyes,georgetown,geese,fullest,ftl,floral,flashback,eyelashes,eyelash,excluded,evening's,evacuated,enquirer,endlessly,encounters,elusive,disarm,detest,deluding,dangle,crabby,cotillion,corsage,copenhagen,conjugal,confessional,cones,commandment,coded,coals,chuckle,christmastime,christina's,cheeseburgers,chardonnay,ceremonial,cept,cello,celery,carter's,campfire,calming,burritos,burp,buggy,brundle,broflovski,brighten,bows,borderline,blinked,bling,beauties,bauers,battered,athletes,assisting,articulate,alot,alienated,aleksandr,ahhhhh,agreements,agamemnon,accountants,zat,y'see,wrongful,writer's,wrapper,workaholic,wok,winnebago,whispered,warts,vikki's,verified,vacate,updated,unworthy,unprecedented,unanswered,trend,transformed,transform,trademark,tote,tonane,tolerated,throwin,throbbing,thriving,thrills,thorns,thereof,there've,terminator,tendencies,tarot,tailed,swab,sunscreen,stretcher,stereotype,spike's,soggy,sobbing,slopes,skis,skim,sizable,sightings,shucks,shrapnel,sever,senile,sections,seaboard,scripts,scorned,saver,roxanne's,resemble,red's,rebellious,rained,putty,proposals,prenup,positioned,portuguese,pores,pinching,pilgrims,pertinent,peeping,pamphlet,paints,ovulating,outbreak,oppression,opposites,occult,nutcracker,nutcase,nominee,newt,newsstand,newfound,nepal,mocked,midterms,marshmallow,manufacturer,managers,majesty's,maclaren,luscious,lowered,loops,leans,laurence's,krudski,knowingly,keycard,katherine's,junkies,juilliard,judicial,jolinar,jase,irritable,invaluable,inuit,intoxicating,instruct,insolent,inexcusable,induce,incubator,illustrious,hydrogen,hunsecker,hub,houseguest,honk,homosexuals,homeroom,holly's,hindu,hernia,harming,handgun,hallways,hallucination,gunshots,gums,guineas,groupies,groggy,goiter,gingerbread,giggling,geometry,genre,funded,frontal,frigging,fledged,fedex,feat,fairies,eyeball,extending,exchanging,exaggeration,esteemed,ergo,enlist,enlightenment,encyclopedia,drags,disrupted,dispense,disloyal,disconnect,dimitri,desks,dentists,delhi,delacroix,degenerate,deemed,decay,daydreaming,cushions,cuddly,corroborate,contender,congregation,conflicts,confessions,complexion,completion,compensated,cobbler,closeness,chilled,checkmate,channing,carousel,calms,bylaws,bud's,benefactor,belonging,ballgame,baiting,backstabbing,assassins,artifact,armies,appoint,anthropology,anthropologist,alzheimer's,allegedly,alex's,airspace,adversary,adolf,actin,acre,aced,accuses,accelerant,abundantly,abstinence,abc,zsa,zissou,zandt,yom,yapping,wop,witchy,winter's,willows,whee,whadaya,want's,walter's,waah,viruses,vilandra,veiled,unwilling,undress,undivided,underestimating,ultimatums,twirl,truckload,tremble,traditionally,touring,touche,toasting,tingling,tiles,tents,tempered,sussex,sulking,stunk,stretches,sponges,spills,softly,snipers,slid,sedan,screens,scourge,rooftop,rog,rivalry,rifles,riana,revolting,revisit,resisted,rejects,refreshments,redecorating,recurring,recapture,raysy,randomly,purchases,prostitutes,proportions,proceeded,prevents,pretense,prejudiced,precogs,pouting,poppie,poofs,pimple,piles,pediatrician,patrick's,pathology,padre,packets,paces,orvelle,oblivious,objectivity,nikki's,nighttime,nervosa,navigation,moist,moan,minors,mic,mexicans,meurice,melts,mau,mats,matchmaker,markings,maeby,lugosi,lipnik,leprechaun,kissy,kafka,italians,introductions,intestines,intervene,inspirational,insightful,inseparable,injections,informal,influential,inadvertently,illustrated,hussy,huckabees,hmo,hittin,hiss,hemorrhaging,headin,hazy,haystack,hallowed,haiti,haa,grudges,grenades,granilith,grandkids,grading,gracefully,godsend,gobbles,fyi,future's,fun's,fret,frau,fragrance,fliers,firms,finchley,fbi's,farts,eyewitnesses,expendable,existential,endured,embraced,elk,ekg,dude's,dragonfly,dorms,domination,directory,depart,demonstrated,delaying,degrading,deduction,darlings,dante's,danes,cylons,counsellor,cortex,cop's,coordinator,contraire,consensus,consciously,conjuring,congratulating,compares,commentary,commandant,cokes,centimeters,cc's,caucus,casablanca,buffay,buddy's,brooch,bony,boggle,blood's,bitching,bistro,bijou,bewitched,benevolent,bends,bearings,barren,arr,aptitude,antenna,amish,amazes,alcatraz,acquisitions,abomination,worldly,woodstock,withstand,whispers,whadda,wayward,wayne's,wailing,vinyl,variables,vanishing,upscale,untouchable,unspoken,uncontrollable,unavoidable,unattended,tuning,trite,transvestite,toupee,timid,timers,themes,terrorizing,teamed,taipei,t's,swana,surrendered,suppressed,suppress,stumped,strolling,stripe,storybook,storming,stomachs,stoked,stationery,springtime,spontaneity,sponsored,spits,spins,soiree,sociology,soaps,smarty,shootout,shar,settings,sentiments,senator's,scramble,scouting,scone,runners,rooftops,retract,restrictions,residency,replay,remainder,regime,reflexes,recycling,rcmp,rawdon,ragged,quirky,quantico,psychologically,prodigal,primo,pounce,potty,portraits,pleasantries,plane's,pints,phd,petting,perceive,patrons,parameters,outright,outgoing,onstage,officer's,o'connor,notwithstanding,noah's,nibble,newmans,neutralize,mutilated,mortality,monumental,ministers,millionaires,mentions,mcdonald's,mayflower,masquerade,mangy,macreedy,lunatics,luau,lover's,lovable,louie's,locating,lizards,limping,lasagna,largely,kwang,keepers,juvie,jaded,ironing,intuitive,intensely,insure,installation,increases,incantation,identifying,hysteria,hypnotize,humping,heavyweight,happenin,gung,griet,grasping,glorified,glib,ganging,g'night,fueled,focker,flunking,flimsy,flaunting,fixated,fitzwallace,fictional,fearing,fainting,eyebrow,exonerated,ether,ers,electrician,egotistical,earthly,dusted,dues,donors,divisions,distinguish,displays,dismissal,dignify,detonation,deploy,departments,debrief,dazzling,dawn's,dan'l,damnedest,daisies,crushes,crucify,cordelia's,controversy,contraband,contestants,confronting,communion,collapsing,cocked,clock's,clicks,cliche,circular,circled,chord,characteristics,chandelier,casualty,carburetor,callers,bup,broads,breathes,boca,bobbie's,bloodshed,blindsided,blabbing,binary,bialystock,bashing,ballerina,ball's,aviva,avalanche,arteries,appliances,anthem,anomaly,anglo,airstrip,agonizing,adjourn,abandonment,zack's,you's,yearning,yams,wrecker,word's,witnessing,winged,whence,wept,warsaw,warp,warhead,wagons,visibility,usc,unsure,unions,unheard,unfreeze,unfold,unbalanced,ugliest,troublemaker,tolerant,toddler,tiptoe,threesome,thirties,thermostat,tampa,sycamore,switches,swipe,surgically,supervising,subtlety,stung,stumbling,stubs,struggles,stride,strangling,stamp's,spruce,sprayed,socket,snuggle,smuggled,skulls,simplicity,showering,shhhhh,sensor,sci,sac,sabotaging,rumson,rounding,risotto,riots,revival,responds,reserves,reps,reproduction,repairman,rematch,rehearsed,reelection,redi,recognizing,ratty,ragging,radiology,racquetball,racking,quieter,quicksand,pyramids,pulmonary,puh,publication,prowl,provisions,prompt,premeditated,prematurely,prancing,porcupine,plated,pinocchio,perceived,peeked,peddle,pasture,panting,overweight,oversee,overrun,outing,outgrown,obsess,o'donnell,nyu,nursed,northwestern,norma's,nodding,negativity,negatives,musketeers,mugger,mounting,motorcade,monument,merrily,matured,massimo's,masquerading,marvellous,marlena's,margins,maniacs,mag,lumpy,lovey,louse,linger,lilies,libido,lawful,kudos,knuckle,kitchen's,kennedy's,juices,judgments,joshua's,jars,jams,jamal's,jag,itches,intolerable,intermission,interaction,institutions,infectious,inept,incentives,incarceration,improper,implication,imaginative,ight,hussein,humanitarian,huckleberry,horatio,holster,heiress,heartburn,hayley's,hap,gunna,guitarist,groomed,greta's,granting,graciously,glee,gentleman's,fulfillment,fugitives,fronts,founder,forsaking,forgives,foreseeable,flavors,flares,fixation,figment,fickle,featuring,featured,fantasize,famished,faith's,fades,expiration,exclamation,evolve,euro,erasing,emphasize,elevator's,eiffel,eerie,earful,duped,dulles,distributor,distorted,dissing,dissect,dispenser,dilated,digit,differential,diagnostic,detergent,desdemona,debriefing,dazzle,damper,cylinder,curing,crowbar,crispina,crafty,crackpot,courting,corrections,cordial,copying,consuming,conjunction,conflicted,comprehension,commie,collects,cleanup,chiropractor,charmer,chariot,charcoal,chaplain,challenger,census,cd's,cauldron,catatonic,capabilities,calculate,bullied,buckets,brilliantly,breathed,boss's,booths,bombings,boardroom,blowout,blower,blip,blindness,blazing,birthday's,biologically,bibles,biased,beseech,barbaric,band's,balraj,auditorium,audacity,assisted,appropriations,applicants,anticipating,alcoholics,airhead,agendas,aft,admittedly,adapt,absolution,abbot,zing,youre,yippee,wittlesey,withheld,willingness,willful,whammy,webber's,weakest,washes,virtuous,violently,videotapes,vials,vee,unplugged,unpacked,unfairly,und,turbulence,tumbling,troopers,tricking,trenches,tremendously,travelled,travelers,traitors,torches,tommy's,tinga,thyroid,texture,temperatures,teased,tawdry,tat,taker,sympathies,swiped,swallows,sundaes,suave,strut,structural,stone's,stewie,stepdad,spewing,spasm,socialize,slither,sky's,simulator,sighted,shutters,shrewd,shocks,sherry's,sgc,semantics,scout's,schizophrenic,scans,savages,satisfactory,rya'c,runny,ruckus,royally,roadblocks,riff,rewriting,revoke,reversal,repent,renovation,relating,rehearsals,regal,redecorate,recovers,recourse,reconnaissance,receives,ratched,ramali,racquet,quince,quiche,puppeteer,puking,puffed,prospective,projected,problemo,preventing,praises,pouch,posting,postcards,pooped,poised,piled,phoney,phobia,performances,patty's,patching,participating,parenthood,pardner,oppose,oozing,oils,ohm,ohhhhh,nypd,numbing,novelist,nostril,nosey,nominate,noir,neatly,nato,naps,nappa,nameless,muzzle,muh,mortuary,moronic,modesty,mitz,missionary,mimi's,midwife,mercenaries,mcclane,maxie's,matuka,mano,mam,maitre,lush,lumps,lucid,loosened,loosely,loins,lawnmower,lane's,lamotta,kroehner,kristen's,juggle,jude's,joins,jinxy,jessep,jaya,jamming,jailhouse,jacking,ironically,intruders,inhuman,infections,infatuated,indoor,indigestion,improvements,implore,implanted,id's,hormonal,hoboken,hillbilly,heartwarming,headway,headless,haute,hatched,hartmans,harping,hari,grapevine,graffiti,gps,gon,gogh,gnome,ged,forties,foreigners,fool's,flyin,flirted,fingernail,fdr,exploration,expectation,exhilarating,entrusted,enjoyment,embark,earliest,dumper,duel,dubious,drell,dormant,docking,disqualified,disillusioned,dishonor,disbarred,directive,dicey,denny's,deleted,del's,declined,custodial,crunchy,crises,counterproductive,correspondent,corned,cords,cor,coot,contributing,contemplate,containers,concur,conceivable,commissioned,cobblepot,cliffs,clad,chief's,chickened,chewbacca,checkout,carpe,cap'n,campers,calcium,buyin,buttocks,bullies,brown's,brigade,brain's,braid,boxed,bouncy,blueberries,blubbering,bloodstream,bigamy,bel,beeped,bearable,bank's,awarded,autographs,attracts,attracting,asteroid,arbor,arab,apprentice,announces,andie's,ammonia,alarming,aidan's,ahoy,ahm,zan,wretch,wimps,widows,widower,whirlwind,whirl,weather's,warms,war's,wack,villagers,vie,vandelay,unveiling,uno,undoing,unbecoming,ucla,turnaround,tribunal,togetherness,tickles,ticker,tended,teensy,taunt,system's,sweethearts,superintendent,subcommittee,strengthen,stomach's,stitched,standpoint,staffers,spotless,splits,soothe,sonnet,smothered,sickening,showdown,shouted,shepherds,shelters,shawl,seriousness,separates,sen,schooled,schoolboy,scat,sats,sacramento,s'mores,roped,ritchie's,resembles,reminders,regulars,refinery,raggedy,profiles,preemptive,plucked,pheromones,particulars,pardoned,overpriced,overbearing,outrun,outlets,onward,oho,ohmigod,nosing,norwegian,nightly,nicked,neanderthal,mosquitoes,mortified,moisture,moat,mime,milky,messin,mecha,markinson,marivellas,mannequin,manderley,maid's,madder,macready,maciver's,lookie,locusts,lisbon,lifetimes,leg's,lanna,lakhi,kholi,joke's,invasive,impersonate,impending,immigrants,ick,i's,hyperdrive,horrid,hopin,hombre,hogging,hens,hearsay,haze,harpy,harboring,hairdo,hafta,hacking,gun's,guardians,grasshopper,graded,gobble,gatehouse,fourteenth,foosball,floozy,fitzgerald's,fished,firewood,finalize,fever's,fencing,felons,falsely,fad,exploited,euphemism,entourage,enlarged,ell,elitist,elegance,eldest,duo,drought,drokken,drier,dredge,dramas,dossier,doses,diseased,dictator,diarrhea,diagnose,despised,defuse,defendant's,d'amour,crowned,cooper's,continually,contesting,consistently,conserve,conscientious,conjured,completing,commune,commissioner's,collars,coaches,clogs,chenille,chatty,chartered,chamomile,casing,calculus,calculator,brittle,breached,boycott,blurted,birthing,bikinis,bankers,balancing,astounding,assaulting,aroma,arbitration,appliance,antsy,amnio,alienating,aliases,aires,adolescence,administrative,addressing,achieving,xerox,wrongs,workload,willona,whistling,werewolves,wallaby,veterans,usin,updates,unwelcome,unsuccessful,unseemly,unplug,undermining,ugliness,tyranny,tuesdays,trumpets,transference,traction,ticks,tete,tangible,tagging,swallowing,superheroes,sufficiently,studs,strep,stowed,stow,stomping,steffy,stature,stairway,sssh,sprain,spouting,sponsoring,snug,sneezing,smeared,slop,slink,slew,skid,simultaneously,simulation,sheltered,shakin,sewed,sewage,seatbelt,scariest,scammed,scab,sanctimonious,samir,rushes,rugged,routes,romanov,roasting,rightly,retinal,rethinking,resulted,resented,reruns,replica,renewed,remover,raiding,raided,racks,quantity,purest,progressing,primarily,presidente,prehistoric,preeclampsia,postponement,portals,poppa,pop's,pollution,polka,pliers,playful,pinning,pharaoh,perv,pennant,pelvic,paved,patented,paso,parted,paramedic,panels,pampered,painters,padding,overjoyed,orthodox,organizer,one'll,octavius,occupational,oakdale's,nous,nite,nicknames,neurosurgeon,narrows,mitt,misled,mislead,mishap,milltown,milking,microscopic,meticulous,mediocrity,meatballs,measurements,mandy's,malaria,machete,lydecker's,lurch,lorelai's,linda's,layin,lavish,lard,knockin,khruschev,kelso's,jurors,jumpin,jugular,journalists,jour,jeweler,jabba,intersection,intellectually,integral,installment,inquiries,indulging,indestructible,indebted,implicated,imitate,ignores,hyperventilating,hyenas,hurrying,huron,horizontal,hermano,hellish,heheh,header,hazardous,hart's,harshly,harper's,handout,handbag,grunemann,gots,glum,gland,glances,giveaway,getup,gerome,furthest,funhouse,frosting,franchise,frail,fowl,forwarded,forceful,flavored,flank,flammable,flaky,fingered,finalists,fatherly,famine,fags,facilitate,exempt,exceptionally,ethic,essays,equity,entrepreneur,enduring,empowered,employers,embezzlement,eels,dusk,duffel,downfall,dotted,doth,doke,distressed,disobey,disappearances,disadvantage,dinky,diminish,diaphragm,deuces,deployed,delia's,davidson's,curriculum,curator,creme,courteous,correspondence,conquered,comforts,coerced,coached,clots,clarification,cite,chunks,chickie,chick's,chases,chaperoning,ceramic,ceased,cartons,capri,caper,cannons,cameron's,calves,caged,bustin,bungee,bulging,bringin,brie,boomhauer,blowin,blindfolded,blab,biscotti,bird's,beneficial,bastard's,ballplayer,bagging,automated,auster,assurances,aschen,arraigned,anonymity,annex,animation,andi,anchorage,alters,alistair's,albatross,agreeable,advancement,adoring,accurately,abduct,wolfi,width,weirded,watchers,washroom,warheads,voltage,vincennes,villains,victorian,urgency,upward,understandably,uncomplicated,uhuh,uhhhh,twitching,trig,treadmill,transactions,topped,tiffany's,they's,thermos,termination,tenorman,tater,tangle,talkative,swarm,surrendering,summoning,substances,strive,stilts,stickers,stationary,squish,squashed,spraying,spew,sparring,sorrel's,soaring,snout,snort,sneezed,slaps,skanky,singin,sidle,shreck,shortness,shorthand,shepherd's,sharper,shamed,sculptures,scanning,saga,sadist,rydell,rusik,roulette,rodi's,rockefeller,revised,resumes,restoring,respiration,reiber's,reek,recycle,recount,reacts,rabbit's,purge,purgatory,purchasing,providence,prostate,princesses,presentable,poultry,ponytail,plotted,playwright,pinot,pigtails,pianist,phillippe,philippines,peddling,paroled,owww,orchestrated,orbed,opted,offends,o'hara,noticeable,nominations,nancy's,myrtle's,music's,mope,moonlit,moines,minefield,metaphors,memoirs,mecca,maureen's,manning's,malignant,mainframe,magicks,maggots,maclaine,lobe,loathing,linking,leper,leaps,leaping,lashed,larch,larceny,lapses,ladyship,juncture,jiffy,jane's,jakov,invoke,interpreted,internally,intake,infantile,increasingly,inadmissible,implement,immense,howl,horoscope,hoof,homage,histories,hinting,hideaway,hesitating,hellbent,heddy,heckles,hat's,harmony's,hairline,gunpowder,guidelines,guatemala,gripe,gratifying,grants,governess,gorge,goebbels,gigolo,generated,gears,fuzz,frigid,freddo,freddie's,foresee,filters,filmed,fertile,fellowship,feeling's,fascination,extinction,exemplary,executioner,evident,etcetera,estimates,escorts,entity,endearing,encourages,electoral,eaters,earplugs,draped,distributors,disrupting,disagrees,dimes,devastate,detain,deposits,depositions,delicacy,delays,darklighter,dana's,cynicism,cyanide,cutters,cronus,convoy,continuous,continuance,conquering,confiding,concentrated,compartments,companions,commodity,combing,cofell,clingy,cleanse,christmases,cheered,cheekbones,charismatic,cabaret,buttle,burdened,buddhist,bruenell,broomstick,brin,brained,bozos,bontecou,bluntman,blazes,blameless,bizarro,benny's,bellboy,beaucoup,barry's,barkeep,bali,bala,bacterial,axis,awaken,astray,assailant,aslan,arlington,aria,appease,aphrodisiac,announcements,alleys,albania,aitoro's,activation,acme,yesss,wrecks,woodpecker,wondrous,window's,wimpy,willpower,widowed,wheeling,weepy,waxing,waive,vulture,videotaped,veritable,vascular,variations,untouched,unlisted,unfounded,unforeseen,two's,twinge,truffles,triggers,traipsing,toxin,tombstone,titties,tidal,thumping,thor's,thirds,therein,testicles,tenure,tenor,telephones,technicians,tarmac,talby,tackled,systematically,swirling,suicides,suckered,subtitles,sturdy,strangler,stockbroker,stitching,steered,staple,standup,squeal,sprinkler,spontaneously,splendor,spiking,spender,sovereign,snipe,snip,snagged,slum,skimming,significantly,siddown,showroom,showcase,shovels,shotguns,shoelaces,shitload,shifty,shellfish,sharpest,shadowy,sewn,seizing,seekers,scrounge,scapegoat,sayonara,satan's,saddled,rung,rummaging,roomful,romp,retained,residual,requiring,reproductive,renounce,reggie's,reformed,reconsidered,recharge,realistically,radioed,quirks,quadrant,punctual,public's,presently,practising,pours,possesses,poolhouse,poltergeist,pocketbook,plural,plots,pleasure's,plainly,plagued,pity's,pillars,picnics,pesto,pawing,passageway,partied,para,owing,openings,oneself,oats,numero,nostalgia,nocturnal,nitwit,nile,nexus,neuro,negotiated,muss,moths,mono,molecule,mixer,medicines,meanest,mcbeal,matinee,margate,marce,manipulations,manhunt,manger,magicians,maddie's,loafers,litvack,lightheaded,lifeguard,lawns,laughingstock,kodak,kink,jewellery,jessie's,jacko,itty,inhibitor,ingested,informing,indignation,incorporate,inconceivable,imposition,impersonal,imbecile,ichabod,huddled,housewarming,horizons,homicides,hobo,historically,hiccups,helsinki,hehe,hearse,harmful,hardened,gushing,gushie,greased,goddamit,gigs,freelancer,forging,fonzie,fondue,flustered,flung,flinch,flicker,flak,fixin,finalized,fibre,festivus,fertilizer,fenmore's,farted,faggots,expanded,exonerate,exceeded,evict,establishing,enormously,enforced,encrypted,emdash,embracing,embedded,elliot's,elimination,dynamics,duress,dupres,dowser,doormat,dominant,districts,dissatisfied,disfigured,disciplined,discarded,dibbs,diagram,detailing,descend,depository,defining,decorative,decoration,deathbed,death's,dazzled,da's,cuttin,cures,crowding,crepe,crater,crammed,costly,cosmopolitan,cortlandt's,copycat,coordinated,conversion,contradict,containing,constructed,confidant,condemning,conceited,computer's,commute,comatose,coleman's,coherent,clinics,clapping,circumference,chuppah,chore,choksondik,chestnuts,catastrophic,capitalist,campaigning,cabins,briault,bottomless,boop,bonnet,board's,bloomingdale's,blokes,blob,bids,berluti,beret,behavioral,beggars,bar's,bankroll,bania,athos,assassinate,arsenic,apperantly,ancestor,akron,ahhhhhh,afloat,adjacent,actresses,accordingly,accents,abe's,zipped,zeros,zeroes,zamir,yuppie,youngsters,yorkers,writ,wisest,wipes,wield,whyn't,weirdos,wednesdays,villages,vicksburg,variable,upchuck,untraceable,unsupervised,unpleasantness,unpaid,unhook,unconscionable,uncalled,turks,tumors,trappings,translating,tragedies,townie,timely,tiki,thurgood,things'll,thine,tetanus,terrorize,temptations,teamwork,tanning,tampons,tact,swarming,surfaced,supporter,stuart's,stranger's,straitjacket,stint,stimulation,steroid,statistically,startling,starry,squander,speculating,source's,sollozzo,sobriety,soar,sneaked,smithsonian,slugs,slaw,skit,skedaddle,sinker,similarities,silky,shortcomings,shipments,sheila's,severity,sellin,selective,seattle's,seasoned,scrubbed,scrooge,screwup,scrapes,schooling,scarves,saturdays,satchel,sandburg's,sandbox,salesmen,rooming,romances,revolving,revere,resulting,reptiles,reproach,reprieve,recreational,rearranging,realtor,ravine,rationalize,raffle,quoted,punchy,psychobabble,provocation,profoundly,problematic,prescriptions,preferable,praised,polishing,poached,plow,pledges,planetary,plan's,pirelli,perverts,peaked,pastures,pant,oversized,overdressed,outdid,outdated,oriental,ordinance,orbs,opponents,occurrence,nuptials,nominees,nineteenth,nefarious,mutiny,mouthpiece,motels,mopping,moon's,mongrel,monetary,mommie,missin,metaphorically,merv,mertin,memos,memento,melodrama,melancholy,measles,meaner,marches,mantel,maneuvers,maneuvering,mailroom,machine's,luring,listenin,lion's,lifeless,liege,licks,libraries,liberties,levon,legwork,lanka,lacked,kneecaps,kippur,kiddie,kaput,justifiable,jigsaw,issuing,islamic,insistent,insidious,innuendo,innit,inhabitants,individually,indicator,indecent,imaginable,illicit,hymn,hurling,humane,hospitalized,horseshit,hops,hondo,hemorrhoid,hella,healthiest,haywire,hamsters,halibut,hairbrush,hackers,guam,grouchy,grisly,griffin's,gratuitous,glutton,glimmer,gibberish,ghastly,geologist,gentler,generously,generators,geeky,gaga,furs,fuhrer,fronting,forklift,foolin,fluorescent,flats,flan,financed,filmmaking,fight's,faxes,faceless,extinguisher,expressions,expel,etched,entertainer,engagements,endangering,empress,egos,educator,ducked,dual,dramatically,dodgeball,dives,diverted,dissolved,dislocated,discrepancy,discovers,dink,devour,destroyers,derail,deputies,dementia,decisive,daycare,daft,cynic,crumbling,cowardice,cow's,covet,cornwallis,corkscrew,cookbook,conditioned,commendation,commandments,columns,coincidental,cobwebs,clouded,clogging,clicking,clasp,citizenship,chopsticks,chefs,chaps,catherine's,castles,cashing,carat,calmer,burgundy,bulldog's,brightly,brazen,brainwashing,bradys,bowing,booties,bookcase,boned,bloodsucking,blending,bleachers,bleached,belgian,bedpan,bearded,barrenger,bachelors,awwww,atop,assures,assigning,asparagus,arabs,apprehend,anecdote,amoral,alterations,alli,aladdin,aggravation,afoot,acquaintances,accommodating,accelerate,yakking,wreckage,worshipping,wladek,willya,willies,wigged,whoosh,whisked,wavelength,watered,warpath,warehouses,volts,vitro,violates,viewed,vicar,valuables,users,urging,uphill,unwise,untimely,unsavory,unresponsive,unpunished,unexplained,unconventional,tubby,trolling,treasurer,transfers,toxicology,totaled,tortoise,tormented,toothache,tingly,tina's,timmiihh,tibetan,thursdays,thoreau,terrifies,temperature's,temperamental,telegrams,ted's,technologies,teaming,teal'c's,talkie,takers,table's,symbiote,swirl,suffocate,subsequently,stupider,strapping,store's,steckler,standardized,stampede,stainless,springing,spreads,spokesperson,speeds,someway,snowflake,sleepyhead,sledgehammer,slant,slams,situation's,showgirl,shoveling,shmoopy,sharkbait,shan't,seminars,scrambling,schizophrenia,schematics,schedule's,scenic,sanitary,sandeman,saloon,sabbatical,rural,runt,rummy,rotate,reykjavik,revert,retrieved,responsive,rescheduled,requisition,renovations,remake,relinquish,rejoice,rehabilitation,recreation,reckoning,recant,rebuilt,rebadow,reassurance,reassigned,rattlesnake,ramble,racism,quor,prowess,prob,primed,pricey,predictions,prance,pothole,pocus,plains,pitches,pistols,persist,perpetrated,penal,pekar,peeling,patter,pastime,parmesan,paper's,papa's,panty,pail,pacemaker,overdrive,optic,operas,ominous,offa,observant,nothings,noooooo,nonexistent,nodded,nieces,neia,neglecting,nauseating,mutton,mutated,musket,munson's,mumbling,mowing,mouthful,mooseport,monologue,momma's,moly,mistrust,meetin,maximize,masseuse,martha's,marigold,mantini,mailer,madre,lowlifes,locksmith,livid,liven,limos,licenses,liberating,lhasa,lenin,leniency,leering,learnt,laughable,lashes,lasagne,laceration,korben,katan,kalen,jordan's,jittery,jesse's,jammies,irreplaceable,intubate,intolerant,inhaler,inhaled,indifferent,indifference,impound,imposed,impolite,humbly,holocaust,heroics,heigh,gunk,guillotine,guesthouse,grounding,groundbreaking,groom's,grips,grant's,gossiping,goatee,gnomes,gellar,fusion's,fumble,frutt,frobisher,freudian,frenchman,foolishness,flagged,fixture,femme,feeder,favored,favorable,fatso,fatigue,fatherhood,farmer's,fantasized,fairest,faintest,factories,eyelids,extravagant,extraterrestrial,extraordinarily,explicit,escalator,eros,endurance,encryption,enchantment's,eliminating,elevate,editors,dysfunction,drivel,dribble,dominican,dissed,dispatched,dismal,disarray,dinnertime,devastation,dermatologist,delicately,defrost,debutante,debacle,damone,dainty,cuvee,culpa,crucified,creeped,crayons,courtship,counsel's,convene,continents,conspicuous,congresswoman,confinement,conferences,confederate,concocted,compromises,comprende,composition,communism,comma,collectors,coleslaw,clothed,clinically,chug,chickenshit,checkin,chaotic,cesspool,caskets,cancellation,calzone,brothel,boomerang,bodega,bloods,blasphemy,black's,bitsy,bink,biff,bicentennial,berlini,beatin,beards,barbas,barbarians,backpacking,audiences,artist's,arrhythmia,array,arousing,arbitrator,aqui,appropriately,antagonize,angling,anesthetic,altercation,alice's,aggressor,adversity,adopting,acne,accordance,acathla,aaahhh,wreaking,workup,workings,wonderin,wolf's,wither,wielding,whopper,what'm,what'cha,waxed,vibrating,veterinarian,versions,venting,vasey,valor,validate,urged,upholstery,upgraded,untied,unscathed,unsafe,unlawful,uninterrupted,unforgiving,undies,uncut,twinkies,tucking,tuba,truffle,truck's,triplets,treatable,treasured,transmit,tranquility,townspeople,torso,tomei,tipsy,tinsel,timeline,tidings,thirtieth,tensions,teapot,tasks,tantrums,tamper,talky,swayed,swapping,sven,sulk,suitor,subjected,stylist,stroller,storing,stirs,statistical,standoff,staffed,squadron,sprinklers,springsteen,specimens,sparkly,song's,snowy,snobby,snatcher,smoother,smith's,sleepin,shrug,shortest,shoebox,shel,sheesh,shee,shackles,setbacks,sedatives,screeching,scorched,scanned,satyr,sammy's,sahib,rosemary's,rooted,rods,roadblock,riverbank,rivals,ridiculed,resentful,repellent,relates,registry,regarded,refugee,recreate,reconvene,recalled,rebuttal,realmedia,quizzes,questionnaire,quartet,pusher,punctured,pucker,propulsion,promo,prolong,professionalism,prized,premise,predators,portions,pleasantly,planet's,pigsty,physicist,phil's,penniless,pedestrian,paychecks,patiently,paternal,parading,pa's,overactive,ovaries,orderlies,oracles,omaha,oiled,offending,nudie,neonatal,neighborly,nectar,nautical,naught,moops,moonlighting,mobilize,mite,misleading,milkshake,mickey's,metropolitan,menial,meats,mayan,maxed,marketplace,mangled,magua,lunacy,luckier,llanview's,livestock,liters,liter,licorice,libyan,legislature,lasers,lansbury,kremlin,koreans,kooky,knowin,kilt,junkyard,jiggle,jest,jeopardized,jags,intending,inkling,inhalation,influences,inflated,inflammatory,infecting,incense,inbound,impractical,impenetrable,iffy,idealistic,i'mma,hypocrites,hurtin,humbled,hosted,homosexuality,hologram,hokey,hocus,hitchhiking,hemorrhoids,headhunter,hassled,harts,hardworking,haircuts,hacksaw,guerrilla,genitals,gazillion,gatherings,ganza's,gammy,gamesphere,fugue,fuels,forests,footwear,folly,folds,flexibility,flattened,flashlights,fives,filet,field's,famously,extenuating,explored,exceed,estrogen,envisioned,entails,emerged,embezzled,eloquent,egomaniac,dummies,duds,ducts,drowsy,drones,dragon's,drafts,doree,donovon,donny's,docked,dixon's,distributed,disorders,disguises,disclose,diggin,dickie's,detachment,deserting,depriving,demographic,delegation,defying,deductible,decorum,decked,daylights,daybreak,dashboard,darien,damnation,d'angelo's,cuddling,crunching,crickets,crazies,crayon,councilman,coughed,coordination,conundrum,contractors,contend,considerations,compose,complimented,compliance,cohaagen,clutching,cluster,clued,climbs,clader,chuck's,chromosome,cheques,checkpoint,chats,channeling,ceases,catholics,cassius,carver's,carasco,capped,capisce,cantaloupe,cancelling,campsite,camouflage,cambodia,burglars,bureaucracy,breakfasts,branding,bra'tac,book's,blueprint,bleedin,blaze's,blabbed,bisexual,bile,big's,beverages,beneficiary,battery's,basing,avert,avail,autobiography,atone,army's,arlyn,ares,architectural,approves,apothecary,anus,antiseptic,analytical,amnesty,alphabetical,alignment,aligned,aleikuum,advisory,advisors,advisement,adulthood,acquiring,accessed,zombie's,zadir,wrestled,wobbly,withnail,wheeled,whattaya,whacking,wedged,wanders,walkman,visionary,virtues,vincent's,vega's,vaginal,usage,unnamed,uniquely,unimaginable,undeniable,unconditionally,uncharted,unbridled,tweezers,tvmegasite,trumped,triumphant,trimming,tribes,treading,translates,tranquilizers,towing,tout,toontown,thunk,taps,taboo,suture,suppressing,succeeding,submission,strays,stonewall,stogie,stepdaughter,stalls,stace,squint,spouses,splashed,speakin,sounder,sorrier,sorrel,sorcerer,sombrero,solemnly,softened,socialist,snobs,snippy,snare,smoothing,slump,slimeball,slaving,sips,singular,silently,sicily,shiller,shayne's,shareholders,shakedown,sensations,seagulls,scrying,scrumptious,screamin,saucy,santoses,santos's,sanctions,roundup,roughed,rosary,robechaux,roadside,riley's,retrospect,resurrected,restoration,reside,researched,rescind,reproduce,reprehensible,repel,rendering,remodeling,religions,reconsidering,reciprocate,ratchet,rambaldi's,railroaded,raccoon,quasi,psychics,psat,promos,proclamation,problem's,prob'ly,pristine,printout,priestess,prenuptial,prediction,precedes,pouty,potter's,phoning,petersburg,peppy,pariah,parched,parcel,panes,overloaded,overdoing,operators,oldies,obesity,nymphs,nother,notebooks,nook,nikolai,nearing,nearer,mutation,municipal,monstrosity,minister's,milady,mieke,mephesto,memory's,melissa's,medicated,marshals,manilow,mammogram,mainstream,madhouse,m'lady,luxurious,luck's,lucas's,lotsa,loopy,logging,liquids,lifeboat,lesion,lenient,learner,lateral,laszlo,larva,kross,kinks,jinxed,involuntary,inventor,interim,insubordination,inherent,ingrate,inflatable,independently,incarnate,inane,imaging,hypoglycemia,huntin,humorous,humongous,hoodlum,honoured,honking,hitler's,hemorrhage,helpin,hearing's,hathor,hatching,hangar,halftime,guise,guggenheim,grrr,grotto,grandson's,grandmama,gorillas,godless,girlish,ghouls,gershwin,frosted,friday's,forwards,flutter,flourish,flagpole,finely,finder's,fetching,fatter,fated,faithfully,faction,fabrics,exposition,expo,exploits,exert,exclude,eviction,everwood's,evasion,espn,escorting,escalate,enticing,enroll,enhancement,endowed,enchantress,emerging,elopement,drills,drat,downtime,downloading,dorks,doorways,doctorate,divulge,dissociative,diss,disgraceful,disconcerting,dirtbag,deteriorating,deteriorate,destinies,depressive,dented,denim,defeating,decruz,decidedly,deactivate,daydreams,czar,curls,culprit,cues,crybaby,cruelest,critique,crippling,cretin,cranberries,cous,coupled,corvis,copped,convicts,converts,contingent,contests,complement,commend,commemorate,combinations,coastguard,cloning,cirque,churning,chock,chivalry,chemotherapy,charlotte's,chancellor's,catalogues,cartwheels,carpets,carols,canister,camera's,buttered,bureaucratic,bundt,buljanoff,bubbling,brokers,broaden,brimstone,brainless,borneo,bores,boing,bodied,billie's,biceps,beijing,bead,badmouthing,bad's,avec,autopilot,attractions,attire,atoms,atheist,ascertain,artificially,archbishop,aorta,amps,ampata,amok,alloy,allied,allenby,align,albeit,aired,aint,adjoining,accosted,abyss,absolve,aborted,aaagh,aaaaaah,your's,yonder,yellin,yearly,wyndham,wrongdoing,woodsboro,wigging,whup,wasteland,warranty,waltzed,walnuts,wallace's,vividly,vibration,verses,veggie,variation,validation,unnecessarily,unloaded,unicorns,understated,undefeated,unclean,umbrellas,tyke,twirling,turpentine,turnover,tupperware,tugger,triangles,triage,treehouse,tract,toil,tidbit,tickled,thud,threes,thousandth,thingie,terminally,temporal,teething,tassel,talkies,syndication,syllables,swoon,switchboard,swerved,suspiciously,superiority,successor,subsequentlyne,subsequent,subscribe,strudel,stroking,strictest,steven's,stensland,stefan's,starsky,starin,stannart,squirming,squealing,sorely,solidarity,softie,snookums,sniveling,snail,smidge,smallpox,sloth,slab,skulking,singled,simian,silo,sightseeing,siamese,shudder,shoppers,shax,sharpen,shannen,semtex,sellout,secondhand,season's,seance,screenplay,scowl,scorn,scandals,santiago's,safekeeping,sacked,russe,rummage,rosie's,roshman,roomies,roaches,rinds,retrace,retires,resuscitate,restrained,residential,reservoir,rerun,reputations,rekall,rejoin,refreshment,reenactment,recluse,ravioli,raves,ranked,rampant,rama,rallies,raking,purses,punishable,punchline,puked,provincial,prosky,prompted,processor,previews,prepares,poughkeepsie,poppins,polluted,placenta,pissy,petulant,peterson's,perseverance,persecution,pent,peasants,pears,pawns,patrols,pastries,partake,paramount,panky,palate,overzealous,overthrow,overs,oswald's,oskar,originated,orchids,optical,onset,offenses,obstructing,objectively,obituaries,obedient,obedience,novice,nothingness,nitrate,newer,nets,mwah,musty,mung,motherly,mooning,monique's,momentous,moby,mistaking,mistakenly,minutemen,milos,microchip,meself,merciless,menelaus,mazel,mauser,masturbate,marsh's,manufacturers,mahogany,lysistrata,lillienfield,likable,lightweight,liberate,leveled,letdown,leer,leeloo,larynx,lardass,lainey,lagged,lab's,klorel,klan,kidnappings,keyed,karmic,jive,jiggy,jeebies,isabel's,irate,iraqi,iota,iodine,invulnerable,investor,intrusive,intricate,intimidation,interestingly,inserted,insemination,inquire,innate,injecting,inhabited,informative,informants,incorporation,inclination,impure,impasse,imbalance,illiterate,i'ma,i'ii,hurled,hunts,hispanic,hematoma,help's,helen's,headstrong,harmonica,hark,handmade,handiwork,gymnasium,growling,governors,govern,gorky,gook,girdle,getcha,gesundheit,gazing,gazette,garde,galley,funnel,fred's,fossils,foolishly,fondness,flushing,floris,firearm,ferocious,feathered,fateful,fancies,fakes,faker,expressway,expire,exec,ever'body,estates,essentials,eskimos,equations,eons,enlightening,energetic,enchilada,emmi,emissary,embolism,elsinore,ecklie,drenched,drazi,doped,dogging,documentation,doable,diverse,disposed,dislikes,dishonesty,disengage,discouraging,diplomat,diplomacy,deviant,descended,derailed,depleted,demi,deformed,deflect,defines,defer,defcon,deactivated,crips,creditors,counters,corridors,cordy's,conversation's,constellations,congressmen,congo,complimenting,colombian,clubbing,clog,clint's,clawing,chromium,chimes,chicken's,chews,cheatin,chaste,ceremony's,cellblock,ceilings,cece,caving,catered,catacombs,calamari,cabbie,bursts,bullying,bucking,brulee,brits,brisk,breezes,brandon's,bounces,boudoir,blockbuster,binks,better'n,beluga,bellied,behrani,behaves,bedding,battalion,barriers,banderas,balmy,bakersfield,badmouth,backers,avenging,atat,aspiring,aromatherapy,armpit,armoire,anythin,another's,anonymously,anniversaries,alonzo's,aftershave,affordable,affliction,adrift,admissible,adieu,activist,acquittal,yucky,yearn,wrongly,wino,whitter,whirlpool,wendigo,watchdog,wannabes,walkers,wakey,vomited,voicemail,verb,vans,valedictorian,vacancy,uttered,up's,unwed,unrequited,unnoticed,unnerving,unkind,unjust,uniformed,unconfirmed,unadulterated,unaccounted,uglier,tyler's,twix,turnoff,trough,trolley,trampled,tramell,traci's,tort,toads,titled,timbuktu,thwarted,throwback,thon,thinker,thimble,tasteless,tarantula,tammy's,tamale,takeovers,symposium,symmetry,swish,supposing,supporters,suns,sully,streaking,strands,statutory,starlight,stargher,starch,stanzi,stabs,squeamish,spokane,splattered,spiritually,spilt,sped,speciality,spacious,soundtrack,smacking,slain,slag,slacking,skywire,skips,skeet,skaara,simpatico,shredding,showin,shortcuts,shite,shielding,sheep's,shamelessly,serafine,sentimentality,sect,secretary's,seasick,scientifically,scholars,schemer,scandalous,saturday's,salts,saks,sainted,rustic,rugs,riedenschneider,ric's,rhyming,rhetoric,revolt,reversing,revel,retractor,retards,retaliation,resurrect,remiss,reminiscing,remanded,reluctance,relocating,relied,reiben,regions,regains,refuel,refresher,redoing,redheaded,redeemed,recycled,reassured,rearranged,rapport,qumar,prowling,promotional,promoter,preserving,prejudices,precarious,powwow,pondering,plunger,plunged,pleasantville,playpen,playback,pioneers,physicians,phlegm,perfected,pancreas,pakistani,oxide,ovary,output,outbursts,oppressed,opal's,ooohhh,omoroca,offed,o'toole,nurture,nursemaid,nosebleed,nixon's,necktie,muttering,munchies,mucking,mogul,mitosis,misdemeanor,miscarried,minx,millionth,migraines,midler,methane,metabolism,merchants,medicinal,margaret's,manifestation,manicurist,mandelbaum,manageable,mambo,malfunctioned,mais,magnesium,magnanimous,loudmouth,longed,lifestyles,liddy,lickety,leprechauns,lengthy,komako,koji's,klute,kennel,kathy's,justifying,jerusalem,israelis,isle,irreversible,inventing,invariably,intervals,intergalactic,instrumental,instability,insinuate,inquiring,ingenuity,inconclusive,incessant,improv,impersonation,impeachment,immigrant,id'd,hyena,humperdinck,humm,hubba,housework,homeland,holistic,hoffa,hither,hissy,hippy,hijacked,hero's,heparin,hellooo,heat's,hearth,hassles,handcuff,hairstyle,hadda,gymnastics,guys'll,gutted,gulp,gulls,guard's,gritty,grievous,gravitational,graft,gossamer,gooder,glory's,gere,gash,gaming,gambled,galaxies,gadgets,fundamentals,frustrations,frolicking,frock,frilly,fraser's,francais,foreseen,footloose,fondly,fluent,flirtation,flinched,flight's,flatten,fiscal,fiercely,felicia's,fashionable,farting,farthest,farming,facade,extends,exposer,exercised,evading,escrow,errr,enzymes,energies,empathize,embryos,embodiment,ellsberg,electromagnetic,ebola,earnings,dulcinea,dreamin,drawbacks,drains,doyle's,doubling,doting,doose's,doose,doofy,dominated,dividing,diversity,disturbs,disorderly,disliked,disgusts,devoid,detox,descriptions,denominator,demonstrating,demeanor,deliriously,decode,debauchery,dartmouth,d'oh,croissant,cravings,cranked,coworkers,councilor,council's,convergence,conventions,consistency,consist,conquests,conglomerate,confuses,confiscate,confines,confesses,conduit,compress,committee's,commanded,combed,colonel's,coated,clouding,clamps,circulating,circa,cinch,chinnery,celebratory,catalogs,carpenters,carnal,carla's,captures,capitan,capability,canin,canes,caitlin's,cadets,cadaver,cable's,bundys,bulldozer,buggers,bueller,bruno's,breakers,brazilian,branded,brainy,booming,bookstores,bloodbath,blister,bittersweet,biologist,billed,betty's,bellhop,beeping,beaut,beanstalk,beady,baudelaire,bartenders,bargains,ballad,backgrounds,averted,avatar's,atmospheric,assert,assassinated,armadillo,archive,appreciating,appraised,antlers,anterior,alps,aloof,allowances,alleyway,agriculture,agent's,affleck,acknowledging,achievements,accordion,accelerator,abracadabra,abject,zinc,zilch,yule,yemen,xanax,wrenching,wreath,wouldn,witted,widely,wicca,whorehouse,whooo,whips,westchester,websites,weaponry,wasn,walsh's,vouchers,vigorous,viet,victimized,vicodin,untested,unsolicited,unofficially,unfocused,unfettered,unfeeling,unexplainable,uneven,understaffed,underbelly,tutorial,tuberculosis,tryst,trois,trix,transmitting,trampoline,towering,topeka,tirade,thieving,thang,tentacles,teflon,teachings,tablets,swimmin,swiftly,swayzak,suspecting,supplying,suppliers,superstitions,superhuman,subs,stubbornness,structures,streamers,strattman,stonewalling,stimulate,stiffs,station's,stacking,squishy,spout,splice,spec,sonrisa,smarmy,slows,slicing,sisterly,sierra's,sicilian,shrill,shined,shift's,seniority,seine,seeming,sedley,seatbelts,scour,scold,schoolyard,scarring,sash,sark's,salieri,rustling,roxbury,richly,rexy,rex's,rewire,revved,retriever,respective,reputable,repulsed,repeats,rendition,remodel,relocated,reins,reincarnation,regression,reconstruction,readiness,rationale,rance,rafters,radiohead,radio's,rackets,quarterly,quadruple,pumbaa,prosperous,propeller,proclaim,probing,privates,pried,prewedding,premeditation,posturing,posterity,posh,pleasurable,pizzeria,pish,piranha,pimps,penmanship,penchant,penalties,pelvis,patriotism,pasa,papaya,packaging,overturn,overture,overstepped,overcoat,ovens,outsmart,outed,orient,ordained,ooohh,oncologist,omission,olly,offhand,odour,occurring,nyazian,notarized,nobody'll,nightie,nightclubs,newsweek,nesting,navel,nationwide,nabbed,naah,mystique,musk,mover,mortician,morose,moratorium,monster's,moderate,mockingbird,mobsters,misconduct,mingling,mikey's,methinks,metaphysical,messengered,merge,merde,medallion,mathematical,mater,mason's,masochist,martouf,martians,marinara,manray,manned,mammal,majorly,magnifying,mackerel,mabel's,lyme,lurid,lugging,lonnegan,loathsome,llantano,liszt,listings,limiting,liberace,leprosy,latinos,lanterns,lamest,laferette,ladybird,kraut,kook,kits,kipling,joyride,inward,intestine,innocencia,inhibitions,ineffectual,indisposed,incurable,incumbent,incorporated,inconvenienced,inanimate,improbable,implode,idea's,hypothesis,hydrant,hustling,hustled,huevos,how'm,horseshoe,hooey,hoods,honcho,hinge,hijack,heroism,hermit,heimlich,harvesting,hamunaptra,haladki,haiku,haggle,haaa,gutsy,grunting,grueling,grit,grifter,grievances,gribbs,greevy,greeted,green's,grandstanding,godparents,glows,glistening,glider,gimmick,genocide,gaping,fraiser,formalities,foreigner,forecast,footprint,folders,foggy,flaps,fitty,fiends,femmes,fearful,fe'nos,favours,fabio,eyeing,extort,experimentation,expedite,escalating,erect,epinephrine,entitles,entice,enriched,enable,emissions,eminence,eights,ehhh,educating,eden's,earthquakes,earthlings,eagerly,dunville,dugout,draining,doublemeat,doling,disperse,dispensing,dispatches,dispatcher,discoloration,disapproval,diners,dieu,diddly,dictates,diazepam,descendants,derogatory,deposited,delights,defies,decoder,debates,dealio,danson,cutthroat,crumbles,crud,croissants,crematorium,craftsmanship,crafted,could'a,correctional,cordless,cools,contradiction,constitute,conked,confine,concealing,composite,complicates,communique,columbian,cockamamie,coasters,clusters,clobbered,clipping,clipboard,clergy,clemenza,cleanser,circumcision,cindy's,chisel,character's,chanukah,certainaly,centerpiece,cellmate,cartoonist,cancels,cadmium,buzzed,busiest,bumstead,bucko,browsing,broth,broader,break's,braver,boundary,boggling,bobbing,blurred,birkhead,bethesda,benet,belvedere,bellies,begrudge,beckworth,bebe's,banky,baldness,bagpipes,baggy,babysitters,aversion,auxiliary,attributes,attain,astonished,asta,assorted,aspirations,arnold's,area's,appetites,apparel,apocalyptic,apartment's,announcer,angina,amiss,ambulances,allo,alleviate,alibis,algeria,alaskan,airway,affiliated,aerial,advocating,adrenalin,admires,adhesive,actively,accompanying,zeta,yoyou,yoke,yachts,wreaked,wracking,woooo,wooing,wised,winnie's,wind's,wilshire,wedgie,watson's,warden's,waging,violets,vincey,victorious,victories,velcro,vastly,valves,valley's,uplifting,untrustworthy,unmitigated,universities,uneventful,undressing,underprivileged,unburden,umbilical,twigs,tweet,tweaking,turquoise,trustees,truckers,trimmed,triggering,treachery,trapping,tourism,tosses,torching,toothpick,toga,toasty,toasts,tiamat,thickens,ther,tereza,tenacious,temperament,televised,teldar,taxis,taint,swill,sweatin,sustaining,surgery's,surgeries,succeeds,subtly,subterranean,subject's,subdural,streep,stopwatch,stockholder,stillwater,steamer,stang's,stalkers,squished,squeegee,splinters,spliced,splat,spied,specialized,spaz,spackle,sophistication,snapshots,smoky,smite,sluggish,slithered,skin's,skeeters,sidewalks,sickly,shrugs,shrubbery,shrieking,shitless,shithole,settin,servers,serge,sentinels,selfishly,segments,scarcely,sawdust,sanitation,sangria,sanctum,samantha's,sahjhan,sacrament,saber,rustle,rupture,rump,roving,rousing,rosomorf,rosario's,rodents,robust,rigs,riddled,rhythms,revelations,restart,responsibly,repression,reporter's,replied,repairing,renoir,remoray,remedial,relocation,relies,reinforcement,refundable,redirect,recheck,ravenwood,rationalizing,ramus,ramsey's,ramelle,rails,radish,quivering,pyjamas,puny,psychos,prussian,provocations,prouder,protestors,protesters,prohibited,prohibit,progression,prodded,proctologist,proclaimed,primordial,pricks,prickly,predatory,precedents,praising,pragmatic,powerhouse,posterior,postage,porthos,populated,poly,pointe,pivotal,pinata,persistence,performers,pentangeli,pele,pecs,pathetically,parka,parakeet,panicky,pandora's,pamphlets,paired,overthruster,outsmarted,ottoman,orthopedic,oncoming,oily,offing,nutritious,nuthouse,nourishment,nietzsche,nibbling,newlywed,newcomers,need's,nautilus,narcissist,myths,mythical,mutilation,mundane,mummy's,mummies,mumble,mowed,morvern,mortem,mortal's,mopes,mongolian,molasses,modification,misplace,miscommunication,miney,militant,midlife,mens,menacing,memorizing,memorabilia,membrane,massaging,masking,maritime,mapping,manually,magnets,ma's,luxuries,lows,lowering,lowdown,lounging,lothario,longtime,liposuction,lieutenant's,lidocaine,libbets,lewd,levitate,leslie's,leeway,lectured,lauren's,launcher,launcelot,latent,larek,lagos,lackeys,kumbaya,kryptonite,knapsack,keyhole,kensington,katarangura,kann,junior's,juiced,jugs,joyful,jihad,janitor's,jakey,ironclad,invoice,intertwined,interlude,interferes,insurrection,injure,initiating,infernal,india's,indeedy,incur,incorrigible,incantations,imprint,impediment,immersion,immensely,illustrate,ike's,igloo,idly,ideally,hysterectomy,hyah,house's,hour's,hounded,hooch,honeymoon's,hollering,hogs,hindsight,highs,high's,hiatus,helix,heirs,heebie,havesham,hassan's,hasenfuss,hankering,hangers,hakuna,gutless,gusto,grubbing,grrrr,greg's,grazed,gratification,grandeur,gorak,godammit,gnawing,glanced,gladiators,generating,galahad,gaius,furnished,funeral's,fundamentally,frostbite,frees,frazzled,fraulein,fraternizing,fortuneteller,formaldehyde,followup,foggiest,flunky,flickering,flashbacks,fixtures,firecrackers,fines,filly,figger,fetuses,fella's,feasible,fates,eyeliner,extremities,extradited,expires,experimented,exiting,exhibits,exhibited,exes,excursion,exceedingly,evaporate,erupt,equilibrium,epileptic,ephram's,entrails,entities,emporium,egregious,eggshells,easing,duwayne,drone,droll,dreyfuss,drastically,dovey,doubly,doozy,donkeys,donde,dominate,distrust,distributing,distressing,disintegrate,discreetly,disagreements,diff,dick's,devised,determines,descending,deprivation,delegate,dela,degradation,decision's,decapitated,dealin,deader,dashed,darkroom,dares,daddies,dabble,cycles,cushy,currents,cupcakes,cuffed,croupier,croak,criticized,crapped,coursing,cornerstone,copyright,coolers,continuum,contaminate,cont,consummated,construed,construct,condos,concoction,compulsion,committees,commish,columnist,collapses,coercion,coed,coastal,clemency,clairvoyant,circulate,chords,chesterton,checkered,charlatan,chaperones,categorically,cataracts,carano,capsules,capitalize,cache,butcher's,burdon,bullshitting,bulge,buck's,brewed,brethren,bren,breathless,breasted,brainstorming,bossing,borealis,bonsoir,bobka,boast,blimp,bleu,bleep,bleeder,blackouts,bisque,binford's,billboards,bernie's,beecher's,beatings,bayberry,bashed,bartlet's,bapu,bamboozled,ballon,balding,baklava,baffled,backfires,babak,awkwardness,attributed,attest,attachments,assembling,assaults,asphalt,arthur's,arthritis,armenian,arbitrary,apologizes,anyhoo,antiquated,alcante,agency's,advisable,advertisement,adventurer,abundance,aahhh,aaahh,zatarc,yous,york's,yeti,yellowstone,yearbooks,yakuza,wuddya,wringing,woogie,womanhood,witless,winging,whatsa,wetting,wessex,wendy's,way's,waterproof,wastin,washington's,wary,voom,volition,volcanic,vogelman,vocation,visually,violinist,vindicated,vigilance,viewpoint,vicariously,venza,vasily,validity,vacuuming,utensils,uplink,unveil,unloved,unloading,uninhibited,unattached,ukraine,typo,tweaked,twas,turnips,tunisia,tsch,trinkets,tribune,transmitters,translator,train's,toured,toughen,toting,topside,topical,toothed,tippy,tides,theology,terrors,terrify,tentative,technologically,tarnish,target's,tallest,tailored,tagliati,szpilman,swimmers,swanky,susie's,surly,supple,sunken,summation,suds,suckin,substantially,structured,stockholm,stepmom,squeaking,springfield's,spooks,splashmore,spanked,souffle,solitaire,solicitation,solarium,smooch,smokers,smog,slugged,slobbering,skylight,skimpy,situated,sinuses,simplify,silenced,sideburns,sid's,shutdown,shrinkage,shoddy,shhhhhh,shelling,shelled,shareef,shangri,shakey's,seuss,servicing,serenade,securing,scuffle,scrolls,scoff,scholarships,scanners,sauerkraut,satisfies,satanic,sars,sardines,sarcophagus,santino,sandi's,salvy,rusted,russells,ruby's,rowboat,routines,routed,rotating,rolfsky,ringside,rigging,revered,retreated,respectability,resonance,resembling,reparations,reopened,renewal,renegotiate,reminisce,reluctantly,reimburse,regimen,regaining,rectum,recommends,recognizable,realism,reactive,rawhide,rappaport's,raincoat,quibble,puzzled,pursuits,purposefully,puns,pubic,psychotherapy,prosecution's,proofs,proofing,professor's,prevention,prescribing,prelim,positioning,pore,poisons,poaching,pizza's,pertaining,personalized,personable,peroxide,performs,pentonville,penetrated,peggy's,payphone,payoffs,participated,park's,parisian,palp,paleontology,overhaul,overflowing,organised,oompa,ojai,offenders,oddest,objecting,o'hare,o'daniel,notches,noggin,nobody'd,nitrogen,nightstand,niece's,nicky's,neutralized,nervousness,nerdy,needlessly,navigational,narrative,narc,naquadah,nappy,nantucket,nambla,myriad,mussolini,mulberry,mountaineer,mound,motherfuckin,morrie,monopolizing,mohel,mistreated,misreading,misbehave,miramax,minstrel,minivan,milligram,milkshakes,milestone,middleweight,michelangelo,metamorphosis,mesh,medics,mckinnon's,mattresses,mathesar,matchbook,matata,marys,marco's,malucci,majored,magilla,magic's,lymphoma,lowers,lordy,logistics,linens,lineage,lindenmeyer,limelight,libel,leery's,leased,leapt,laxative,lather,lapel,lamppost,laguardia,labyrinth,kindling,key's,kegs,kegger,kawalsky,juries,judo,jokin,jesminder,janine's,izzy,israeli,interning,insulation,institutionalized,inspected,innings,innermost,injun,infallible,industrious,indulgence,indonesia,incinerator,impossibility,imports,impart,illuminate,iguanas,hypnotic,hyped,huns,housed,hostilities,hospitable,hoses,horton's,homemaker,history's,historian,hirschmuller,highlighted,hideout,helpers,headset,guardianship,guapo,guantanamo,grubby,greyhound,grazing,granola,granddaddy,gotham's,goren,goblet,gluttony,glucose,globes,giorno,gillian's,getter,geritol,gassed,gang's,gaggle,freighter,freebie,frederick's,fractures,foxhole,foundations,fouled,foretold,forcibly,folklore,floorboards,floods,floated,flippers,flavour,flaked,firstly,fireflies,feedings,fashionably,fascism,farragut,fallback,factions,facials,exterminate,exited,existent,exiled,exhibiting,excites,everything'll,evenin,evaluated,ethically,entree,entirety,ensue,enema,empath,embryo,eluded,eloquently,elle,eliminates,eject,edited,edema,echoes,earns,dumpling,drumming,droppings,drazen's,drab,dolled,doll's,doctrine,distasteful,disputing,disputes,displeasure,disdain,disciples,diamond's,develops,deterrent,detection,dehydration,defied,defiance,decomposing,debated,dawned,darken,daredevil,dailies,cyst,custodian,crusts,crucifix,crowning,crier,crept,credited,craze,crawls,coveted,couple's,couldn,corresponding,correcting,corkmaster,copperfield,cooties,coopers,cooperated,controller,contraption,consumes,constituents,conspire,consenting,consented,conquers,congeniality,computerized,compute,completes,complains,communicator,communal,commits,commendable,colonels,collide,coladas,colada,clout,clooney,classmate,classifieds,clammy,claire's,civility,cirrhosis,chink,chemically,characterize,censor,catskills,cath,caterpillar,catalyst,carvers,carts,carpool,carelessness,career's,cardio,carbs,captivity,capeside's,capades,butabi,busmalis,bushel,burping,buren,burdens,bunks,buncha,bulldozers,browse,brockovich,bria,breezy,breeds,breakthroughs,bravado,brandy's,bracket,boogety,bolshevik,blossoms,bloomington,blooming,bloodsucker,blockade,blight,blacksmith,betterton,betrayer,bestseller,bennigan's,belittle,beeps,bawling,barts,bartending,barbed,bankbooks,back's,babs,babish,authors,authenticity,atropine,astronomical,assertive,arterial,armbrust,armageddon,aristotle,arches,anyanka,annoyance,anemic,anck,anago,ali's,algiers,airways,airwaves,air's,aimlessly,ails,ahab,afflicted,adverse,adhere,accuracy,aaargh,aaand,zest,yoghurt,yeast,wyndham's,writings,writhing,woven,workable,winking,winded,widen,whooping,whiter,whip's,whatya,whacko,we's,wazoo,wasp,waived,vlad,virile,vino,vic's,veterinary,vests,vestibule,versed,venetian,vaughn's,vanishes,vacancies,urkel,upwards,uproot,unwarranted,unscheduled,unparalleled,undertaking,undergrad,tweedle,turtleneck,turban,trickery,travolta,transylvania,transponder,toyed,townhouse,tonto,toed,tion,tier,thyself,thunderstorm,thnk,thinning,thinkers,theatres,thawed,tether,tempus,telegraph,technicalities,tau'ri,tarp,tarnished,tara's,taggert's,taffeta,tada,tacked,systolic,symbolize,swerve,sweepstakes,swami,swabs,suspenders,surfers,superwoman,sunsets,sumo,summertime,succulent,successes,subpoenas,stumper,stosh,stomachache,stewed,steppin,stepatech,stateside,starvation,staff's,squads,spicoli,spic,sparing,soulless,soul's,sonnets,sockets,snit,sneaker,snatching,smothering,slush,sloman,slashing,sitters,simpson's,simpleton,signify,signal's,sighs,sidra,sideshow,sickens,shunned,shrunken,showbiz,shopped,shootings,shimmering,shakespeare's,shagging,seventeenth,semblance,segue,sedation,scuzzlebutt,scumbags,scribble,screwin,scoundrels,scarsdale,scamp,scabs,saucers,sanctioned,saintly,saddened,runaways,runaround,rumored,rudimentary,rubies,rsvp,rots,roman's,ripley's,rheya,revived,residing,resenting,researcher,repertoire,rehashing,rehabilitated,regrettable,regimental,refreshed,reese's,redial,reconnecting,rebirth,ravenous,raping,ralph's,railroads,rafting,rache,quandary,pylea,putrid,punitive,puffing,psychopathic,prunes,protests,protestant,prosecutors,proportional,progressed,prod,probate,prince's,primate,predicting,prayin,practitioner,possessing,pomegranate,polgara,plummeting,planners,planing,plaintiffs,plagues,pitt's,pithy,photographer's,philharmonic,petrol,perversion,personals,perpetrators,perm,peripheral,periodic,perfecto,perched,pees,peeps,pedigree,peckish,pavarotti,partnered,palette,pajama,packin,pacifier,oyez,overstepping,outpatient,optimum,okama,obstetrician,nutso,nuance,noun,noting,normalcy,normal's,nonnegotiable,nomak,nobleman,ninny,nines,nicey,newsflash,nevermore,neutered,nether,nephew's,negligee,necrosis,nebula,navigating,narcissistic,namesake,mylie,muses,munitions,motivational,momento,moisturizer,moderation,mmph,misinformed,misconception,minnifield,mikkos,methodical,mechanisms,mebbe,meager,maybes,matchmaking,masry,markovic,manifesto,malakai,madagascar,m'am,luzhin,lusting,lumberjack,louvre,loopholes,loaning,lightening,liberals,lesbo,leotard,leafs,leader's,layman's,launder,lamaze,kubla,kneeling,kilo,kibosh,kelp,keith's,jumpsuit,joy's,jovi,joliet,jogger,janover,jakovasaurs,irreparable,intervened,inspectors,innovation,innocently,inigo,infomercial,inexplicable,indispensable,indicative,incognito,impregnated,impossibly,imperfect,immaculate,imitating,illnesses,icarus,hunches,hummus,humidity,housewives,houmfort,hothead,hostiles,hooves,hoopla,hooligans,homos,homie,hisself,himalayas,hidy,hickory,heyyy,hesitant,hangout,handsomest,handouts,haitian,hairless,gwennie,guzzling,guinevere,grungy,grunge,grenada,gout,gordon's,goading,gliders,glaring,geology,gems,gavel,garments,gardino,gannon's,gangrene,gaff,gabrielle's,fundraising,fruitful,friendlier,frequencies,freckle,freakish,forthright,forearm,footnote,footer,foot's,flops,flamenco,fixer,firm's,firecracker,finito,figgered,fezzik,favourites,fastened,farfetched,fanciful,familiarize,faire,failsafe,fahrenheit,fabrication,extravaganza,extracted,expulsion,exploratory,exploitation,explanatory,exclusion,evolutionary,everglades,evenly,eunuch,estas,escapade,erasers,entries,enforcing,endorsements,enabling,emptying,emperor's,emblem,embarassing,ecosystem,ebby,ebay,dweeb,dutiful,dumplings,drilled,drafty,doug's,dolt,dollhouse,displaced,dismissing,disgraced,discrepancies,disbelief,disagreeing,disagreed,digestion,didnt,deviled,deviated,deterioration,departmental,departing,demoted,demerol,delectable,deco,decaying,decadent,dears,daze,dateless,d'algout,cultured,cultivating,cryto,crusades,crumpled,crumbled,cronies,critters,crew's,crease,craves,cozying,cortland,corduroy,cook's,consumers,congratulated,conflicting,confidante,condensed,concessions,compressor,compressions,compression,complicating,complexity,compadre,communicated,coerce,coding,coating,coarse,clown's,clockwise,clerk's,classier,clandestine,chums,chumash,christopher's,choreography,choirs,chivalrous,chinpoko,chilean,chihuahua,cheerio,charred,chafing,celibacy,casts,caste,cashier's,carted,carryin,carpeting,carp,carotid,cannibals,candor,caen,cab's,butterscotch,busts,busier,bullcrap,buggin,budding,brookside,brodski,bristow's,brig,bridesmaid's,brassiere,brainwash,brainiac,botrelle,boatload,blimey,blaring,blackness,bipolar,bipartisan,bins,bimbos,bigamist,biebe,biding,betrayals,bestow,bellerophon,beefy,bedpans,battleship,bathroom's,bassinet,basking,basin,barzini,barnyard,barfed,barbarian,bandit,balances,baker's,backups,avid,augh,audited,attribute,attitudes,at's,astor,asteroids,assortment,associations,asinine,asalaam,arouse,architects,aqua,applejack,apparatus,antiquities,annoys,angela's,anew,anchovies,anchors,analysts,ampule,alphabetically,aloe,allure,alameida,aisles,airfield,ahah,aggressively,aggravate,aftermath,affiliation,aesthetic,advertised,advancing,adept,adage,accomplices,accessing,academics,aagh,zoned,zoey's,zeal,yokel,y'ever,wynant's,wringer,witwer,withdrew,withdrawing,withdrawals,windward,wimbledon,wily,willfully,whorfin,whimsical,whimpering,welding,weddin,weathered,wealthiest,weakening,warmest,wanton,waif,volant,vivo,vive,visceral,vindication,vikram,vigorously,verification,veggies,urinate,uproar,upload,unwritten,unwrap,unsung,unsubstantiated,unspeakably,unscrupulous,unraveling,unquote,unqualified,unfulfilled,undetectable,underlined,unconstitutional,unattainable,unappreciated,ummmm,ulcers,tylenol,tweak,tutu,turnin,turk's,tucker's,tuatha,tropez,trends,trellis,traffic's,torque,toppings,tootin,toodles,toodle,tivo,tinkering,thursday's,thrives,thorne's,thespis,thereafter,theatrics,thatherton,texts,testicle,terr,tempers,teammates,taxpayer,tavington,tampon,tackling,systematic,syndicated,synagogue,swelled,sweeney's,sutures,sustenance,surfaces,superstars,sunflowers,sumatra,sublet,subjective,stubbins,strutting,strewn,streams,stowaway,stoic,sternin,stereotypes,steadily,star's,stalker's,stabilizing,sprang,spotter,spiraling,spinster,spell's,speedometer,specified,speakeasy,sparked,soooo,songwriter,soiled,sneakin,smithereens,smelt,smacks,sloan's,slaughterhouse,slang,slacks,skids,sketching,skateboards,sizzling,sixes,sirree,simplistic,sift,side's,shouts,shorted,shoelace,sheeit,shaw's,shards,shackled,sequestered,selmak,seduces,seclusion,seasonal,seamstress,seabeas,scry,scripted,scotia,scoops,scooped,schillinger's,scavenger,saturation,satch,salaries,safety's,s'more,s'il,rudeness,rostov,romanian,romancing,robo,robert's,rioja,rifkin,rieper,revise,reunions,repugnant,replicating,replacements,repaid,renewing,remembrance,relic,relaxes,rekindle,regulate,regrettably,registering,regenerate,referenced,reels,reducing,reconstruct,reciting,reared,reappear,readin,ratting,rapes,rancho,rancher,rammed,rainstorm,railroading,queers,punxsutawney,punishes,pssst,prudy,proudest,protectors,prohibits,profiling,productivity,procrastinating,procession,proactive,priss,primaries,potomac,postmortem,pompoms,polio,poise,piping,pickups,pickings,physiology,philanthropist,phenomena,pheasant,perfectionist,peretti,people'll,peninsula,pecking,peaks,pave,patrolman,participant,paralegal,paragraphs,paparazzi,pankot,pampering,pain's,overstep,overpower,ovation,outweigh,outlawed,orion's,openness,omnipotent,oleg,okra,okie,odious,nuwanda,nurtured,niles's,newsroom,netherlands,nephews,neeson,needlepoint,necklaces,neato,nationals,muggers,muffler,mousy,mourned,mosey,morn,mormon,mopey,mongolians,moldy,moderately,modelling,misinterpret,minneapolis,minion,minibar,millenium,microfilm,metals,mendola,mended,melissande,me's,mathematician,masturbating,massacred,masbath,marler's,manipulates,manifold,malp,maimed,mailboxes,magnetism,magna,m'lord,m'honey,lymph,lunge,lull,luka,lt's,lovelier,loser's,lonigan's,lode,locally,literacy,liners,linear,lefferts,leezak,ledgers,larraby,lamborghini,laloosh,kundun,kozinski,knockoff,kissin,kiosk,khasinau's,kennedys,kellman,karlo,kaleidoscope,jumble,juggernaut,joseph's,jiminy,jesuits,jeffy,jaywalking,jailbird,itsy,irregularities,inventive,introduces,interpreter,instructing,installing,inquest,inhabit,infraction,informer,infarction,incidence,impulsively,impressing,importing,impersonated,impeach,idiocy,hyperbole,hydra,hurray,hungary,humped,huhuh,hsing,hotspot,horsepower,hordes,hoodlums,honky,hitchhiker,hind,hideously,henchmen,heaving,heathrow,heather's,heathcliff,healthcare,headgear,headboard,hazing,hawking,harem,handprint,halves,hairspray,gutiurrez,greener,grandstand,goosebumps,good's,gondola,gnaw,gnat,glitches,glide,gees,gasping,gases,garrison's,frolic,fresca,freeways,frayed,fortnight,fortitude,forgetful,forefathers,foley's,foiled,focuses,foaming,flossing,flailing,fitzgeralds,firehouse,finders,filmmakers,fiftieth,fiddler,fellah,feats,fawning,farquaad,faraway,fancied,extremists,extremes,expresses,exorcist,exhale,excel,evaluations,ethros,escalated,epilepsy,entrust,enraged,ennui,energized,endowment,encephalitis,empties,embezzling,elster,ellie's,ellen's,elixir,electrolytes,elective,elastic,edged,econ,eclectic,eagle's,duplex,dryers,drexl,dredging,drawback,drafting,don'ts,docs,dobisch,divorcee,ditches,distinguishing,distances,disrespected,disprove,disobeying,disobedience,disinfectant,discs,discoveries,dips,diplomas,dingy,digress,dignitaries,digestive,dieting,dictatorship,dictating,devoured,devise,devane's,detonators,detecting,desist,deserter,derriere,deron,derive,derivative,delegates,defects,defeats,deceptive,debilitating,deathwok,dat's,darryl's,dago,daffodils,curtsy,cursory,cuppa,cumin,cultivate,cujo,cubic,cronkite,cremation,credence,cranking,coverup,courted,countin,counselling,cornball,converting,contentment,contention,contamination,consortium,consequently,consensual,consecutive,compressed,compounds,compost,components,comparative,comparable,commenting,color's,collections,coleridge,coincidentally,cluett,cleverly,cleansed,cleanliness,clea,clare's,citizen's,chopec,chomp,cholera,chins,chime,cheswick,chessler,cheapest,chatted,cauliflower,catharsis,categories,catchin,caress,cardigan,capitalism,canopy,cana,camcorder,calorie,cackling,cabot's,bystanders,buttoned,buttering,butted,buries,burgel,bullpen,buffoon,brogna,brah,bragged,boutros,boosted,bohemian,bogeyman,boar,blurting,blurb,blowup,bloodhound,blissful,birthmark,biotech,bigot,bestest,benefited,belted,belligerent,bell's,beggin,befall,beeswax,beer's,becky's,beatnik,beaming,bazaar,bashful,barricade,banners,bangers,baja,baggoli,badness,awry,awoke,autonomy,automobiles,attica,astoria,assessing,ashram,artsy,artful,aroun,armpits,arming,arithmetic,annihilate,anise,angiogram,andre's,anaesthetic,amorous,ambiguous,ambiance,alligators,afforded,adoration,admittance,administering,adama,aclu,abydos,absorption,zonked,zhivago,zealand,zazu,youngster,yorkin,wrongfully,writin,wrappers,worrywart,woops,wonderfalls,womanly,wickedness,wichita,whoopie,wholesale,wholeheartedly,whimper,which'll,wherein,wheelchairs,what'ya,west's,wellness,welcomes,wavy,warren's,warranted,wankers,waltham,wallop,wading,wade's,wacked,vogue,virginal,vill,vets,vermouth,vermeil,verger,verbs,verbally,ventriss,veneer,vecchio's,vampira,utero,ushers,urgently,untoward,unshakable,unsettled,unruly,unrest,unmanned,unlocks,unified,ungodly,undue,undermined,undergoing,undergo,uncooperative,uncontrollably,unbeatable,twitchy,tunh,tumbler,tubs,truest,troublesome,triumphs,triplicate,tribbey,trent's,transmissions,tortures,torpedoes,torah,tongaree,tommi,tightening,thunderbolt,thunderbird,thorazine,thinly,theta,theres,testifies,terre,teenaged,technological,tearful,taxing,taldor,takashi,tach,symbolizes,symbolism,syllabus,swoops,swingin,swede,sutra,suspending,supplement,sunday's,sunburn,succumbed,subtitled,substituting,subsidiary,subdued,stuttering,stupor,stumps,strummer,strides,strategize,strangulation,stooped,stipulation,stingy,stigma,stewart's,statistic,startup,starlet,stapled,squeaks,squawking,spoilsport,splicing,spiel,spencers,specifications,spawned,spasms,spaniard,sous,softener,sodding,soapbox,snow's,smoldering,smithbauer,slogans,slicker,slasher,skittish,skepticism,simulated,similarity,silvio,signifies,signaling,sifting,sickest,sicilians,shuffling,shrivel,shortstop,sensibility,sender,seminary,selecting,segretti,seeping,securely,scurrying,scrunch,scrote,screwups,schoolteacher,schibetta's,schenkman,sawing,savin,satine,saps,sapiens,salvaging,salmonella,safeguard,sacrilege,rumpus,ruffle,rube,routing,roughing,rotted,roshman's,rondall,road's,ridding,rickshaw,rialto,rhinestone,reversible,revenues,retina,restrooms,resides,reroute,requisite,repress,replicate,repetition,removes,relationship's,regent,regatta,reflective,rednecks,redeeming,rectory,recordings,reasoned,rayed,ravell,raked,rainstorm's,raincheck,raids,raffi,racked,query,quantities,pushin,prototypes,proprietor,promotes,prometheus,promenade,projectile,progeny,profess,prodding,procure,primetime,presuming,preppy,prednisone,predecessor,potted,posttraumatic,poppies,poorhouse,pool's,polaroid,podiatrist,plucky,plowed,pledging,playroom,playhouse,play's,plait,placate,pitchfork,pissant,pinback,picketing,photographing,pharoah,petrak,petal,persecuting,perchance,penny's,pellets,peeved,peerless,payable,pauses,pathways,pathologist,pat's,parchment,papi,pagliacci,owls,overwrought,overwhelmingly,overreaction,overqualified,overheated,outward,outlines,outcasts,otherworldly,originality,organisms,opinionated,oodles,oftentimes,octane,occured,obstinate,observatory,o'er,nutritionist,nutrition,numbness,nubile,notification,notary,nooooooo,nodes,nobodies,nepotism,neighborhoods,neanderthals,musicals,mushu,murphy's,multimedia,mucus,mothering,mothballs,monogrammed,monk's,molesting,misspoke,misspelled,misconstrued,miscellaneous,miscalculated,minimums,mince,mildew,mighta,middleman,metabolic,messengers,mementos,mellowed,meditate,medicare,mayol,maximilian,mauled,massaged,marmalade,mardi,mannie,mandates,mammals,malaysia,makings,major's,maim,lundegaard,lovingly,lout,louisville,loudest,lotto,loosing,loompa,looming,longs,lodging,loathes,littlest,littering,linebacker,lifelike,li'l,legalities,lavery's,laundered,lapdog,lacerations,kopalski,knobs,knitted,kittridge,kidnaps,kerosene,katya,karras,jungles,juke,joes,jockeys,jeremy's,jefe,janeiro,jacqueline's,ithaca,irrigation,iranoff,invoices,invigorating,intestinal,interactive,integration,insolence,insincere,insectopia,inhumane,inhaling,ingrates,infrastructure,infestation,infants,individuality,indianapolis,indeterminate,indefinite,inconsistent,incomprehensible,inaugural,inadequacy,impropriety,importer,imaginations,illuminating,ignited,ignite,iggy,i'da,hysterics,hypodermic,hyperventilate,hypertension,hyperactive,humoring,hotdogs,honeymooning,honed,hoist,hoarding,hitching,hinted,hill's,hiker,hijo,hightail,highlands,hemoglobin,helo,hell'd,heinie,hanoi,hags,gush,guerrillas,growin,grog,grissom's,gregory's,grasped,grandparent,granddaughters,gouged,goblins,gleam,glades,gigantor,get'em,geriatric,geared,gawk,gawd,gatekeeper,gargoyles,gardenias,garcon,garbo,gallows,gabe's,gabby's,gabbing,futon,fulla,frightful,freshener,freedoms,fountains,fortuitous,formulas,forceps,fogged,fodder,foamy,flogging,flaun,flared,fireplaces,firefighters,fins,filtered,feverish,favell,fattest,fattening,fate's,fallow,faculties,fabricated,extraordinaire,expressly,expressive,explorers,evade,evacuating,euclid,ethanol,errant,envied,enchant,enamored,enact,embarking,election's,egocentric,eeny,dussander,dunwitty,dullest,dru's,dropout,dredged,dorsia,dormitory,doot,doornail,dongs,dogged,dodgy,do's,ditty,dishonorable,discriminating,discontinue,dings,dilly,diffuse,diets,dictation,dialysis,deteriorated,delly,delightfully,definitions,decreased,declining,deadliest,daryll,dandruff,cynthia's,cush,cruddy,croquet,crocodiles,cringe,crimp,credo,cranial,crackling,coyotes,courtside,coupling,counteroffer,counterfeiting,corrupting,corrective,copter,copping,conway's,conveyor,contusions,contusion,conspirator,consoling,connoisseur,conjecture,confetti,composure,competitor,compel,commanders,coloured,collector's,colic,coldest,coincide,coddle,cocksuckers,coax,coattails,cloned,cliff's,clerical,claustrophobia,classrooms,clamoring,civics,churn,chugga,chromosomes,christened,chopper's,chirping,chasin,characterized,chapped,chalkboard,centimeter,caymans,catheter,caspian,casings,cartilage,carlton's,card's,caprica,capelli,cannolis,cannoli,canals,campaigns,camogli,camembert,butchers,butchered,busboys,bureaucrats,bungalow,buildup,budweiser,buckled,bubbe,brownstone,bravely,brackley,bouquets,botox,boozing,boosters,bodhi,blunders,blunder,blockage,blended,blackberry,bitch's,birthplace,biocyte,biking,bike's,betrays,bestowed,bested,beryllium,beheading,beginner's,beggar,begbie,beamed,bayou,bastille,bask,barstool,barricades,baron's,barbecues,barbecued,barb's,bandwagon,bandits,ballots,ballads,backfiring,bacarra,avoidance,avenged,autopsies,austrian,aunties,attache,atrium,associating,artichoke,arrowhead,arrivals,arose,armory,appendage,apostrophe,apostles,apathy,antacid,ansel,anon,annul,annihilation,andrew's,anderson's,anastasia's,amuses,amped,amicable,amendments,amberg,alluring,allotted,alfalfa,alcoholism,airs,ailing,affinity,adversaries,admirers,adlai,adjective,acupuncture,acorn,abnormality,aaaahhhh,zooming,zippity,zipping,zeroed,yuletide,yoyodyne,yengeese,yeahhh,xena,wrinkly,wracked,wording,withered,winks,windmills,widow's,whopping,wholly,wendle,weigart,weekend's,waterworks,waterford,waterbed,watchful,wantin,wally's,wail,wagging,waal,waaah,vying,voter,ville,vertebrae,versatile,ventures,ventricle,varnish,vacuumed,uugh,utilities,uptake,updating,unreachable,unprovoked,unmistakable,unky,unfriendly,unfolding,undesirable,undertake,underpaid,uncuff,unchanged,unappealing,unabomber,ufos,tyres,typhoid,tweek's,tuxedos,tushie,turret,turds,tumnus,tude,truman's,troubadour,tropic,trinium,treaters,treads,transpired,transient,transgression,tournaments,tought,touchdowns,totem,tolstoy,thready,thins,thinners,thas,terrible's,television's,techs,teary,tattaglia,tassels,tarzana,tape's,tanking,tallahassee,tablecloths,synonymous,synchronize,symptomatic,symmetrical,sycophant,swimmingly,sweatshop,surrounds,surfboard,superpowers,sunroom,sunflower,sunblock,sugarplum,sudan,subsidies,stupidly,strumpet,streetcar,strategically,strapless,straits,stooping,stools,stifler,stems,stealthy,stalks,stairmaster,staffer,sshhh,squatting,squatters,spores,spelt,spectacularly,spaniel,soulful,sorbet,socked,society's,sociable,snubbed,snub,snorting,sniffles,snazzy,snakebite,smuggler,smorgasbord,smooching,slurping,sludge,slouch,slingshot,slicer,slaved,skimmed,skier,sisterhood,silliest,sideline,sidarthur,shrink's,shipwreck,shimmy,sheraton,shebang,sharpening,shanghaied,shakers,sendoff,scurvy,scoliosis,scaredy,scaled,scagnetti,saxophone,sawchuk,saviour,saugus,saturated,sasquatch,sandbag,saltines,s'pose,royalties,routinely,roundabout,roston,rostle,riveting,ristle,righ,rifling,revulsion,reverently,retrograde,restriction,restful,resolving,resents,rescinded,reptilian,repository,reorganize,rentals,rent's,renovating,renal,remedies,reiterate,reinvent,reinmar,reibers,reechard,recuse,recorders,record's,reconciling,recognizance,recognised,reclaiming,recitation,recieved,rebate,reacquainted,rations,rascals,raptors,railly,quintuplets,quahog,pygmies,puzzling,punctuality,psychoanalysis,psalm,prosthetic,proposes,proms,proliferation,prohibition,probie,printers,preys,pretext,preserver,preppie,prag,practise,postmaster,portrayed,pollen,polled,poachers,plummet,plumbers,pled,plannin,pitying,pitfalls,piqued,pinecrest,pinches,pillage,pigheaded,pied,physique,pessimistic,persecute,perjure,perch,percentile,pentothal,pensky,penises,peking,peini,peacetime,pazzi,pastels,partisan,parlour,parkway,parallels,paperweight,pamper,palsy,palaces,pained,overwhelm,overview,overalls,ovarian,outrank,outpouring,outhouse,outage,ouija,orbital,old's,offset,offer's,occupying,obstructed,obsessions,objectives,obeying,obese,o'riley,o'neal,o'higgins,nylon,notoriously,nosebleeds,norman's,norad,noooooooo,nononono,nonchalant,nominal,nome,nitrous,nippy,neurosis,nekhorvich,necronomicon,nativity,naquada,nano,nani,n'est,mystik,mystified,mums,mumps,multinational,muddle,mothership,moped,monumentally,monogamous,mondesi,molded,mixes,misogynistic,misinterpreting,miranda's,mindlock,mimic,midtown,microphones,mending,megaphone,meeny,medicating,meanings,meanie,masseur,maru,marshal's,markstrom,marklars,mariachi,margueritas,manifesting,maintains,mail's,maharajah,lurk,lulu's,lukewarm,loveliest,loveable,lordship,looting,lizardo,liquored,lipped,lingers,limey,limestone,lieutenants,lemkin,leisurely,laureate,lathe,latched,lars,lapping,ladle,kuala,krevlorneswath,kosygin,khakis,kenaru,keats,kath,kaitlan,justin's,julliard,juliet's,journeys,jollies,jiff,jaundice,jargon,jackals,jabot's,invoked,invisibility,interacting,instituted,insipid,innovative,inflamed,infinitely,inferiority,inexperience,indirectly,indications,incompatible,incinerated,incinerate,incidental,incendiary,incan,inbred,implicitly,implicating,impersonator,impacted,ida's,ichiro,iago,hypo,hurricanes,hunks,host's,hospice,horsing,hooded,honey's,homestead,hippopotamus,hindus,hiked,hetson,hetero,hessian,henslowe,hendler,hellstrom,hecate,headstone,hayloft,hater,hast,harold's,harbucks,handguns,hallucinate,halliwell's,haldol,hailing,haggling,hadj,gynaecologist,gumball,gulag,guilder,guaranteeing,groundskeeper,ground's,grindstone,grimoir,grievance,griddle,gribbit,greystone,graceland,gooders,goeth,glossy,glam,giddyup,gentlemanly,gels,gelatin,gazelle,gawking,gaulle,gate's,ganged,fused,fukes,fromby,frenchmen,franny,foursome,forsley,foreman's,forbids,footwork,foothold,fonz,fois,foie,floater,flinging,flicking,fittest,fistfight,fireballs,filtration,fillings,fiddling,festivals,fertilization,fennyman,felonious,felonies,feces,favoritism,fatten,fanfare,fanatics,faceman,extensions,executions,executing,excusing,excepted,examiner's,ex's,evaluating,eugh,erroneous,enzyme,envoy,entwined,entrances,ensconced,enrollment,england's,enemy's,emit,emerges,embankment,em's,ellison's,electrons,eladio,ehrlichman,easterland,dylan's,dwellers,dueling,dubbed,dribbling,drape,doze,downtrodden,doused,dosed,dorleen,dopamine,domesticated,dokie,doggone,disturbances,distort,displeased,disown,dismount,disinherited,disarmed,disapproves,disabilities,diperna,dioxide,dined,diligent,dicaprio,diameter,dialect,detonated,destitute,designate,depress,demolish,demographics,degraded,deficient,decoded,debatable,dealey,darsh,dapper,damsels,damning,daisy's,dad'll,d'oeuvre,cutter's,curlers,curie,cubed,cryo,critically,crikey,crepes,crackhead,countrymen,count's,correlation,cornfield,coppers,copilot,copier,coordinating,cooing,converge,contributor,conspiracies,consolidated,consigliere,consecrated,configuration,conducts,condoning,condemnation,communities,commoner,commies,commented,comical,combust,comas,colds,clod,clique,clay's,clawed,clamped,cici,christianity,choosy,chomping,chimps,chigorin,chianti,cheval,chet's,cheep,checkups,check's,cheaters,chase's,charted,celibate,cautiously,cautionary,castell,carpentry,caroling,carjacking,caritas,caregiver,cardiology,carb,capturing,canteen,candlesticks,candies,candidacy,canasta,calendars,cain't,caboose,buster's,burro,burnin,buon,bunking,bumming,bullwinkle,budgets,brummel,brooms,broadcasts,britt's,brews,breech,breathin,braslow,bracing,bouts,botulism,bosnia,boorish,bluenote,bloodless,blayne,blatantly,blankie,birdy,bene,beetles,bedbugs,becuase,becks,bearers,bazooka,baywatch,bavarian,baseman,bartender's,barrister,barmaid,barges,bared,baracus,banal,bambino,baltic,baku,bakes,badminton,bacon's,backpacks,authorizing,aurelius,attentions,atrocious,ativan,athame,asunder,astound,assuring,aspirins,asphyxiation,ashtrays,aryans,artistry,arnon,aren,approximate,apprehension,appraisal,applauding,anya's,anvil,antiquing,antidepressants,annoyingly,amputate,altruistic,alotta,allegation,alienation,algerian,algae,alerting,airport's,aided,agricultural,afterthought,affront,affirm,adapted,actuality,acoustics,acoustic,accumulate,accountability,abysmal,absentee,zimm,yves,yoohoo,ymca,yeller,yakushova,wuzzy,wriggle,worrier,workmen,woogyman,womanizer,windpipe,windex,windbag,willy's,willin,widening,whisking,whimsy,wendall,weeny,weensy,weasels,watery,watcha,wasteful,waski,washcloth,wartime,waaay,vowel,vouched,volkswagen,viznick,visuals,visitor's,veteran's,ventriloquist,venomous,vendors,vendettas,veils,vehicular,vayhue,vary,varies,van's,vamanos,vadimus,uuhh,upstage,uppity,upheaval,unsaid,unlocking,universally,unintentionally,undisputed,undetected,undergraduate,undergone,undecided,uncaring,unbearably,twos,tween,tuscan,turkey's,tumor's,tryout,trotting,tropics,trini,trimmings,trickier,tree's,treatin,treadstone,trashcan,transports,transistor,transcendent,tramps,toxicity,townsfolk,torturous,torrid,toothpicks,tombs,tolerable,toenail,tireless,tiptoeing,tins,tinkerbell,tink,timmay,tillinghouse,tidying,tibia,thumbing,thrusters,thrashing,thompson's,these'll,testicular,terminology,teriyaki,tenors,tenacity,tellers,telemetry,teas,tea's,tarragon,taliban,switchblade,swicker,swells,sweatshirts,swatches,swatch,swapped,suzanne's,surging,supremely,suntan,sump'n,suga,succumb,subsidize,subordinate,stumbles,stuffs,stronghold,stoppin,stipulate,stewie's,stenographer,steamroll,stds,stately,stasis,stagger,squandered,splint,splendidly,splatter,splashy,splashing,spectra's,specter,sorry's,sorcerers,soot,somewheres,somber,solvent,soldier's,soir,snuggled,snowmobile,snowball's,sniffed,snake's,snags,smugglers,smudged,smirking,smearing,slings,sleet,sleepovers,sleek,slackers,skirmish,siree,siphoning,singed,sincerest,signifying,sidney's,sickened,shuffled,shriveled,shorthanded,shittin,shish,shipwrecked,shins,shingle,sheetrock,shawshank,shamu,sha're,servitude,sequins,seinfeld's,seat's,seascape,seam,sculptor,scripture,scrapings,scoured,scoreboard,scorching,sciences,sara's,sandpaper,salvaged,saluting,salud,salamander,rugrats,ruffles,ruffled,rudolph's,router,roughnecks,rougher,rosslyn,rosses,rosco's,roost,roomy,romping,romeo's,robs,roadie,ride's,riddler,rianna's,revolutionize,revisions,reuniting,retake,retaining,restitution,restaurant's,resorts,reputed,reprimanded,replies,renovate,remnants,refute,refrigerated,reforms,reeled,reefs,reed's,redundancies,rectangle,rectal,recklessly,receding,reassignment,rearing,reapers,realms,readout,ration,raring,ramblings,racetrack,raccoons,quoi,quell,quarantined,quaker,pursuant,purr,purging,punters,pulpit,publishers,publications,psychologists,psychically,provinces,proust,protocols,prose,prophets,project's,priesthood,prevailed,premarital,pregnancies,predisposed,precautionary,poppin,pollute,pollo,podunk,plums,plaything,plateau,pixilated,pivot,pitting,piranhas,pieced,piddles,pickled,picker,photogenic,phosphorous,phases,pffft,petey's,pests,pestilence,pessimist,pesos,peruvian,perspiration,perps,penticoff,pedals,payload,passageways,pardons,paprika,paperboy,panics,pancamo,pam's,paleontologist,painting's,pacifist,ozzie,overwhelms,overstating,overseeing,overpaid,overlap,overflow,overdid,outspoken,outlive,outlaws,orthodontist,orin,orgies,oreos,ordover,ordinates,ooooooh,oooohhh,omelettes,officiate,obtuse,obits,oakwood,nymph,nutritional,nuremberg,nozzle,novocaine,notable,noooooooooo,node,nipping,nilly,nikko,nightstick,nicaragua,neurology,nelson's,negate,neatness,natured,narrowly,narcotic,narcissism,napoleon's,nana's,namun,nakatomi,murky,muchacho,mouthwash,motzah,motherfucker's,mortar,morsel,morrison's,morph,morlocks,moreover,mooch,monoxide,moloch,molest,molding,mohra,modus,modicum,mockolate,mobility,missionaries,misdemeanors,miscalculation,minorities,middies,metric,mermaids,meringue,mercilessly,merchandising,ment,meditating,me'n,mayakovsky,maximillian,martinique,marlee,markovski,marissa's,marginal,mansions,manitoba,maniacal,maneuvered,mags,magnificence,maddening,lyrical,lutze,lunged,lovelies,lou's,lorry,loosening,lookee,liver's,liva,littered,lilac,lightened,lighted,licensing,lexington,lettering,legality,launches,larvae,laredo,landings,lancelot's,laker,ladyship's,laces,kurzon,kurtzweil,kobo,knowledgeable,kinship,kind've,kimono,kenji,kembu,keanu,kazuo,kayaking,juniors,jonesing,joad,jilted,jiggling,jewelers,jewbilee,jeffrey's,jamey's,jacqnoud,jacksons,jabs,ivories,isnt,irritation,iraqis,intellectuals,insurmountable,instances,installments,innocuous,innkeeper,inna,influencing,infantery,indulged,indescribable,incorrectly,incoherent,inactive,inaccurate,improperly,impervious,impertinent,imperfections,imhotep,ideology,identifies,i'il,hymns,huts,hurdles,hunnert,humpty,huffy,hourly,horsies,horseradish,hooo,honours,honduras,hollowed,hogwash,hockley,hissing,hiromitsu,hierarchy,hidin,hereafter,helpmann,haughty,happenings,hankie,handsomely,halliwells,haklar,haise,gunsights,gunn's,grossly,grossed,grope,grocer,grits,gripping,greenpeace,granddad's,grabby,glorificus,gizzard,gilardi,gibarian,geminon,gasses,garnish,galloping,galactic,gairwyn,gail's,futterman,futility,fumigated,fruitless,friendless,freon,fraternities,franc,fractions,foxes,foregone,forego,foliage,flux,floored,flighty,fleshy,flapjacks,fizzled,fittings,fisherman's,finalist,ficus,festering,ferragamo's,federation,fatalities,farbman,familial,famed,factual,fabricate,eyghon,extricate,exchanges,exalted,evolving,eventful,esophagus,eruption,envision,entre,enterprising,entail,ensuring,enrolling,endor,emphatically,eminent,embarrasses,electroshock,electronically,electrodes,efficiently,edinburgh,ecstacy,ecological,easel,dwarves,duffle,drumsticks,drake's,downstream,downed,dollface,divas,distortion,dissent,dissection,dissected,disruptive,disposing,disparaging,disorientation,disintegrated,discounts,disarming,dictated,devoting,deviation,detective's,dessaline,deprecating,deplorable,delve,deity,degenerative,deficiencies,deduct,decomposed,deceased's,debbie's,deathly,dearie,daunting,dankova,czechoslovakia,cyclotron,cyberspace,cutbacks,cusp,culpable,cuddled,crypto,crumpets,cruises,cruisers,cruelly,crowns,crouching,cristo,crip,criminology,cranium,cramming,cowering,couric,counties,cosy,corky's,cordesh,conversational,conservatory,conklin's,conducive,conclusively,competitions,compatibility,coeur,clung,cloud's,clotting,cleanest,classify,clambake,civilizations,cited,cipher,cinematic,chlorine,chipping,china's,chimpanzee,chests,checkpoints,cheapen,chainsaws,censure,censorship,cemeteries,celebrates,ceej,cavities,catapult,cassettes,cartridge,caravaggio,carats,captivating,cancers,campuses,campbell's,calrissian,calibre,calcutta,calamity,butt's,butlers,busybody,bussing,bureau's,bunion,bundy's,bulimic,bulgaria,budging,brung,browbeat,brokerage,brokenhearted,brecher,breakdowns,braun's,bracebridge,boyhood,botanical,bonuses,boning,blowhard,bloc,blisters,blackboard,blackbird,births,birdies,bigotry,biggy,bibliography,bialy,bhamra,bethlehem,bet's,bended,belgrade,begat,bayonet,bawl,battering,baste,basquiat,barrymore,barrington's,barricaded,barometer,balsom's,balled,ballast,baited,badenweiler,backhand,aztec,axle,auschwitz,astrophysics,ascenscion,argumentative,arguably,arby's,arboretum,aramaic,appendicitis,apparition,aphrodite,anxiously,antagonistic,anomalies,anne's,angora,anecdotes,anand,anacott,amniotic,amenities,ambience,alonna,aleck,albert's,akashic,airing,ageless,afro,affiliates,advertisers,adobe,adjustable,acrobat,accommodation,accelerating,absorbing,abouts,abortions,abnormalities,aawwww,aaaaarrrrrrggghhh,zuko's,zoloft,zendi,zamboni,yuppies,yodel,y'hear,wyck,wrangle,wounding,worshippers,worker's,worf,wombosi,wittle,withstanding,wisecracks,williamsburg,wilder's,wiggly,wiggling,wierd,whittlesley,whipper,whattya,whatsamatter,whatchamacallit,whassup,whad'ya,weighted,weakling,waxy,waverly,wasps,warhol,warfarin,waponis,wampum,walled,wadn't,waco,vorash,vogler's,vizzini,visas,virtucon,viridiana,veve,vetoed,vertically,veracity,ventricular,ventilated,varicose,varcon,vandalized,vampire's,vamos,vamoose,val's,vaccinated,vacationing,usted,urinal,uppers,upkeep,unwittingly,unsigned,unsealed,unplanned,unhinged,unhand,unfathomable,unequivocally,unearthed,unbreakable,unanimously,unadvisedly,udall,tynacorp,twisty,tuxes,tussle,turati,tunic,tubing,tsavo,trussed,troublemakers,trollop,trip's,trinket,trilogy,tremors,trekkie,transsexual,transitional,transfusions,tractors,toothbrushes,toned,toke,toddlers,titan's,tita,tinted,timon,timeslot,tightened,thundering,thorpey,thoracic,this'd,thespian,therapist's,theorem,thaddius,texan,tenuous,tenths,tenement,telethon,teleprompter,technicolor,teaspoon,teammate,teacup,taunted,tattle,tardiness,taraka,tappy,tapioca,tapeworm,tanith,tandem,talons,talcum,tais,tacks,synchronized,swivel,swig,swaying,swann's,suppression,supplements,superpower,summed,summarize,sumbitch,sultry,sulfur,sues,subversive,suburbia,substantive,styrofoam,stylings,struts,strolls,strobe,streaks,strategist,stockpile,stewardesses,sterilized,sterilize,stealin,starred,stakeouts,stad,squawk,squalor,squabble,sprinkled,sportsmanship,spokes,spiritus,spectators,specialties,sparklers,spareribs,sowing,sororities,sorbonne,sonovabitch,solicit,softy,softness,softening,socialite,snuggling,snatchers,snarling,snarky,snacking,smythe's,smears,slumped,slowest,slithering,sleepers,sleazebag,slayed,slaughtering,skynet,skidded,skated,sivapathasundaram,sitter's,sitcoms,sissies,sinai,silliness,silences,sidecar,sicced,siam,shylock,shtick,shrugged,shriek,shredder,shoves,should'a,shorten,shortcake,shockingly,shirking,shelly's,shedding,shaves,shatner,sharpener,shapely,shafted,sexless,sequencing,septum,semitic,selflessness,sega,sectors,seabea,scuff,screwball,screened,scoping,scooch,scolding,scholarly,schnitzel,schemed,scalper,sayings,saws,sashimi,santy,sankara,sanest,sanatorium,sampled,samoan,salzburg,saltwater,salma,salesperson,sakulos,safehouse,sabers,rwanda,ruth's,runes,rumblings,rumbling,ruijven,roxie's,round's,ringers,rigorous,righto,rhinestones,reviving,retrieving,resorted,reneging,remodelling,reliance,relentlessly,relegated,relativity,reinforced,reigning,regurgitate,regulated,refills,referencing,reeking,reduces,recreated,reclusive,recklessness,recanted,ranges,ranchers,rallied,rafer,racy,quintet,quaking,quacks,pulses,provision,prophesied,propensity,pronunciation,programmer,profusely,procedural,problema,principals,prided,prerequisite,preferences,preceded,preached,prays,postmark,popsicles,poodles,pollyanna,policing,policeman's,polecat,polaroids,polarity,pokes,poignant,poconos,pocketful,plunging,plugging,pleeease,pleaser,platters,pitied,pinetti,piercings,phyllis's,phooey,phonies,pestering,periscope,perennial,perceptions,pentagram,pelts,patronized,parliamentary,paramour,paralyze,paraguay,parachutes,pancreatic,pales,paella,paducci,oxymoron,owatta,overpass,overgrown,overdone,overcrowded,overcompensating,overcoming,ostracized,orphaned,organise,organisation,ordinate,orbiting,optometrist,oprah's,operandi,oncology,on's,omoc,omens,okayed,oedipal,occupants,obscured,oboe,nuys,nuttier,nuptial,nunheim,noxious,nourish,notepad,notation,nordic,nitroglycerin,niki's,nightmare's,nightlife,nibblet,neuroses,neighbour's,navy's,nationally,nassau,nanosecond,nabbit,mythic,murdock's,munchkins,multiplied,multimillion,mulroney,mulch,mucous,muchas,moxie,mouth's,mountaintop,mounds,morlin,mongorians,moneymaker,moneybags,monde,mom'll,molto,mixup,mitchell's,misgivings,misery's,minerals,mindset,milo's,michalchuk,mesquite,mesmerized,merman,mensa,megan's,media's,meaty,mbwun,materialize,materialistic,mastery,masterminded,mastercard,mario's,marginally,mapuhe,manuscripts,manny's,malvern,malfunctioning,mahatma,mahal,magnify,macnamara,macinerney,machinations,macarena,macadamia,lysol,luxembourg,lurks,lumpur,luminous,lube,lovelorn,lopsided,locator,lobbying,litback,litany,linea,limousines,limo's,limes,lighters,liechtenstein,liebkind,lids,libya,levity,levelheaded,letterhead,lester's,lesabre,leron,lepers,legions,lefts,leftenant,learner's,laziness,layaway,laughlan,lascivious,laryngitis,laptops,lapsed,laos,landok,landfill,laminated,laden,ladders,labelled,kyoto,kurten,kobol,koala,knucklehead,knowed,knotted,kit's,kinsa,kiln,kickboxing,karnovsky,karat,kacl's,judiciary,judaism,journalistic,jolla,joked,jimson,jettison,jet's,jeric,jeeves,jay's,jawed,jankis,janitors,janice's,jango,jamaican,jalopy,jailbreak,jackers,jackasses,j'ai,ivig,invalidate,intoxicated,interstellar,internationally,intercepting,intercede,integrate,instructors,insinuations,insignia,inn's,inflicting,infiltrated,infertile,ineffective,indies,indie,impetuous,imperialist,impaled,immerse,immaterial,imbeciles,imam,imagines,idyllic,idolized,icebox,i'd've,hypochondriac,hyphen,hydraulic,hurtling,hurried,hunchback,hums,humid,hullo,hugger,hubby's,howard's,hostel,horsting,horned,hoooo,homies,homeboys,hollywood's,hollandaise,hoity,hijinks,heya,hesitates,herrero,herndorff,hemp,helplessly,heeyy,heathen,hearin,headband,harv,harrassment,harpies,harmonious,harcourt,harbors,hannah's,hamstring,halstrom,hahahahaha,hackett's,hacer,gunmen,guff,grumbling,grimlocks,grift,greets,grandmothers,grander,granddaughter's,gran's,grafts,governing,gordievsky,gondorff,godorsky,goddesses,glscripts,gillman's,geyser,gettysburg,geological,gentlemen's,genome,gauntlet,gaudy,gastric,gardeners,gardener's,gandolf,gale's,gainful,fuses,fukienese,fucker's,frizzy,freshness,freshening,freb,fraught,frantically,fran's,foxbooks,fortieth,forked,forfeited,forbidding,footed,foibles,flunkies,fleur,fleece,flatbed,flagship,fisted,firefight,fingerpaint,fined,filibuster,fiancee's,fhloston,ferrets,fenceline,femur,fellow's,fatigues,farmhouse,fanucci,fantastically,familiars,falafel,fabulously,eyesore,extracting,extermination,expedient,expectancy,exiles,executor,excluding,ewwww,eviscerated,eventual,evac,eucalyptus,ethnicity,erogenous,equestrian,equator,epidural,enrich,endeavors,enchante,embroidered,embarassed,embarass,embalming,emails,elude,elspeth,electrocute,electrified,eigth,eheh,eggshell,eeyy,echinacea,eases,earpiece,earlobe,dwarfs,dumpsters,dumbshit,dumbasses,duloc,duisberg,drummed,drinkers,dressy,drainage,dracula's,dorma,dolittle,doily,divvy,diverting,ditz,dissuade,disrespecting,displacement,displace,disorganized,dismantled,disgustingly,discriminate,discord,disapproving,dinero,dimwit,diligence,digitally,didja,diddy,dickless,diced,devouring,devlin's,detach,destructing,desperado,desolate,designation,derek's,deposed,dependency,dentist's,demonstrates,demerits,delirium,degrade,deevak,deemesa,deductions,deduce,debriefed,deadbeats,dazs,dateline,darndest,damnable,dalliance,daiquiri,d'agosta,cuvee's,cussing,curate,cryss,cripes,cretins,creature's,crapper,crackerjack,cower,coveting,couriers,countermission,cotswolds,cornholio,copa,convinces,convertibles,conversationalist,contributes,conspirators,consorting,consoled,conservation,consarn,confronts,conformity,confides,confidentially,confederacy,concise,competence,commited,commissioners,commiserate,commencing,comme,commandos,comforter,comeuppance,combative,comanches,colosseum,colling,collaboration,coli,coexist,coaxing,cliffside,clayton's,clauses,cia's,chuy,chutes,chucked,christian's,chokes,chinaman,childlike,childhoods,chickening,chicano,chenowith,chassis,charmingly,changin,championships,chameleon,ceos,catsup,carvings,carlotta's,captioning,capsize,cappucino,capiche,cannonball,cannibal,candlewell,cams,call's,calculation,cakewalk,cagey,caesar's,caddie,buxley,bumbling,bulky,bulgarian,bugle,buggered,brussel,brunettes,brumby,brotha,bros,bronck,brisket,bridegroom,breathing's,breakout,braveheart,braided,bowled,bowed,bovary,bordering,bookkeeper,bluster,bluh,blue's,blot,bloodline,blissfully,blarney,binds,billionaires,billiard,bide,bicycles,bicker,berrisford,bereft,berating,berate,bendy,benches,bellevue,belive,believers,belated,beikoku,beens,bedspread,bed's,bear's,bawdy,barrett's,barreling,baptize,banya,balthazar,balmoral,bakshi,bails,badgered,backstreet,backdrop,awkwardly,avoids,avocado,auras,attuned,attends,atheists,astaire,assuredly,art's,arrivederci,armaments,arises,argyle,argument's,argentine,appetit,appendectomy,appealed,apologetic,antihistamine,antigua,anesthesiologist,amulets,algonquin,alexander's,ales,albie,alarmist,aiight,agility,aforementioned,adstream,adolescents,admirably,adjectives,addison's,activists,acquaint,acids,abound,abominable,abolish,abode,abfc,aaaaaaah,zorg,zoltan,zoe's,zekes,zatunica,yama,wussy,wrcw,worded,wooed,woodrell,wiretap,windowsill,windjammer,windfall,whitey's,whitaker's,whisker,whims,whatiya,whadya,westerns,welded,weirdly,weenies,webster's,waunt,washout,wanto,waning,vitality,vineyards,victimless,vicki's,verdad,veranda,vegan,veer,vandaley,vancouver,vancomycin,valise,validated,vaguest,usefulness,upshot,uprising,upgrading,unzip,unwashed,untrained,unsuitable,unstuck,unprincipled,unmentionables,unjustly,unit's,unfolds,unemployable,uneducated,unduly,undercut,uncovering,unconsciousness,unconsciously,unbeknownst,unaffected,ubiquitous,tyndareus,tutors,turncoat,turlock,tulle,tuesday's,tryouts,truth's,trouper,triplette,trepkos,tremor,treeger,treatment's,traveller,traveler's,trapeze,traipse,tradeoff,trach,torin,tommorow,tollan,toity,timpani,tilted,thumbprint,throat's,this's,theater's,thankless,terrestrial,tenney's,tell'em,telepathy,telemarketing,telekinesis,teevee,teeming,tc's,tarred,tankers,tambourine,talentless,taki,takagi,swooped,switcheroo,swirly,sweatpants,surpassed,surgeon's,supermarkets,sunstroke,suitors,suggestive,sugarcoat,succession,subways,subterfuge,subservient,submitting,subletting,stunningly,student's,strongbox,striptease,stravanavitch,stradling,stoolie,stodgy,stocky,stimuli,stigmata,stifle,stealer,statewide,stark's,stardom,stalemate,staggered,squeezes,squatter,squarely,sprouted,spool,spirit's,spindly,spellman's,speedos,specify,specializing,spacey,soups,soundly,soulmates,somethin's,somebody'll,soliciting,solenoid,sobering,snowflakes,snowballs,snores,slung,slimming,slender,skyscrapers,skulk,skivvies,skillful,skewered,skewer,skaters,sizing,sistine,sidebar,sickos,shushing,shunt,shugga,shone,shol'va,shiv,shifter,sharply,sharpened,shareholder,shapeshifter,shadowing,shadoe,serviced,selwyn,selectman,sefelt,seared,seamen,scrounging,scribbling,scotty's,scooping,scintillating,schmoozing,schenectady,scene's,scattering,scampi,scallops,sat's,sapphires,sans,sanitarium,sanded,sanction,safes,sacrificial,rudely,roust,rosebush,rosasharn,rondell,roadhouse,riveted,rile,ricochet,rhinoceros,rewrote,reverence,revamp,retaliatory,rescues,reprimand,reportedly,replicators,replaceable,repeal,reopening,renown,remo's,remedied,rembrandt,relinquishing,relieving,rejoicing,reincarnated,reimbursed,refinement,referral,reevaluate,redundancy,redid,redefine,recreating,reconnected,recession,rebelling,reassign,rearview,reappeared,readily,rayne,ravings,ravage,ratso,rambunctious,rallying,radiologist,quiver,quiero,queef,quark,qualms,pyrotechnics,pyro,puritan,punky,pulsating,publisher's,psychosomatic,provisional,proverb,protested,proprietary,promiscuous,profanity,prisoner's,prioritize,preying,predisposition,precocious,precludes,preceding,prattling,prankster,povich,potting,postpartum,portray,porter's,porridge,polluting,pogo,plowing,plating,plankton,pistachio,pissin,pinecone,pickpocket,physicists,physicals,pesticides,peruse,pertains,personified,personalize,permitting,perjured,perished,pericles,perfecting,percentages,pepys,pepperdine,pembry,peering,peels,pedophile,patties,pathogen,passkey,parrots,paratroopers,paratrooper,paraphernalia,paralyzing,panned,pandering,paltry,palpable,painkiller,pagers,pachyderm,paced,overtaken,overstay,overestimated,overbite,outwit,outskirts,outgrow,outbid,origins,ordnance,ooze,ooops,oomph,oohhh,omni,oldie,olas,oddball,observers,obscurity,obliterate,oblique,objectionable,objected,oars,o'keefe,nygma,nyet,nouveau,notting,nothin's,noches,nnno,nitty,nighters,nigger's,niche,newsstands,newfoundland,newborns,neurosurgery,networking,nellie's,nein,neighboring,negligible,necron,nauseated,nastiest,nasedo's,narrowing,narrator,narcolepsy,napa,nala,nairobi,mutilate,muscled,murmur,mulva,multitude,multiplex,mulling,mules,mukada,muffled,mueller's,motorized,motif,mortgages,morgues,moonbeams,monogamy,mondays,mollusk,molester,molestation,molars,modifications,modeled,moans,misuse,misprint,mismatched,mirth,minnow,mindful,mimosas,millander,mikhail,mescaline,mercutio,menstrual,menage,mellowing,medicaid,mediator,medevac,meddlesome,mcgarry's,matey,massively,massacres,marky,many's,manifests,manifested,manicures,malevolent,malaysian,majoring,madmen,mache,macarthur's,macaroons,lydell,lycra,lunchroom,lunching,lozenges,lorenzo's,looped,look's,lolly,lofty,lobbyist,litigious,liquidate,linoleum,lingk,lincoln's,limitless,limitation,limber,lilacs,ligature,liftoff,lifeboats,lemmiwinks,leggo,learnin,lazarre,lawyered,landmarks,lament,lambchop,lactose,kringle,knocker,knelt,kirk's,kins,kiev,keynote,kenyon's,kenosha,kemosabe,kazi,kayak,kaon,kama,jussy,junky,joyce's,journey's,jordy,jo's,jimmies,jetson,jeriko,jean's,janet's,jakovasaur,jailed,jace,issacs,isotopes,isabela,irresponsibility,ironed,intravenous,intoxication,intermittent,insufficient,insinuated,inhibitors,inherits,inherently,ingest,ingenue,informs,influenza,inflexible,inflame,inevitability,inefficient,inedible,inducement,indignant,indictments,indentured,indefensible,inconsistencies,incomparable,incommunicado,in's,improvising,impounded,illogical,ignoramus,igneous,idlewild,hydrochloric,hydrate,hungover,humorless,humiliations,humanoid,huhh,hugest,hudson's,hoverdrone,hovel,honor's,hoagie,hmmph,hitters,hitchhike,hit's,hindenburg,hibernating,hermione,herds,henchman,helloooo,heirlooms,heaviest,heartsick,headshot,headdress,hatches,hastily,hartsfield's,harrison's,harrisburg,harebrained,hardships,hapless,hanen,handsomer,hallows,habitual,habeas,guten,gus's,gummy,guiltier,guidebook,gstaad,grunts,gruff,griss,grieved,grids,grey's,greenville,grata,granny's,gorignak,goosed,goofed,goat's,gnarly,glowed,glitz,glimpses,glancing,gilmores,gilligan's,gianelli,geraniums,georgie's,genitalia,gaydar,gart,garroway,gardenia,gangbusters,gamblers,gamble's,galls,fuddy,frumpy,frowning,frothy,fro'tak,friars,frere,freddy's,fragrances,founders,forgettin,footsie,follicles,foes,flowery,flophouse,floor's,floatin,flirts,flings,flatfoot,firefighter,fingerprinting,fingerprinted,fingering,finald,film's,fillet,file's,fianc,femoral,fellini,federated,federales,faze,fawkes,fatally,fascists,fascinates,farfel,familiarity,fambly,falsified,fait,fabricating,fables,extremist,exterminators,extensively,expectant,excusez,excrement,excercises,excavation,examinations,evian,evah,etins,esther's,esque,esophageal,equivalency,equate,equalizer,environmentally,entrees,enquire,enough's,engine's,endorsed,endearment,emulate,empathetic,embodies,emailed,eggroll,edna's,economist,ecology,eased,earmuffs,eared,dyslexic,duper,dupe,dungeons,duncan's,duesouth,drunker,drummers,druggie,dreadfully,dramatics,dragnet,dragline,dowry,downplay,downers,doritos,dominatrix,doers,docket,docile,diversify,distracts,disruption,disloyalty,disinterested,disciple,discharging,disagreeable,dirtier,diplomats,dinghy,diner's,dimwitted,dimoxinil,dimmy,dietary,didi,diatribe,dialects,diagrams,diagnostics,devonshire,devising,deviate,detriment,desertion,derp,derm,dept,depressants,depravity,dependence,denounced,deniability,demolished,delinquents,defiled,defends,defamation,deepcore,deductive,decrease,declares,declarations,decimated,decimate,deb's,deadbolt,dauthuille,dastardly,darla's,dans,daiquiris,daggers,dachau,d'ah,cymbals,customized,curved,curiouser,curdled,cupid's,cults,cucamonga,cruller,cruces,crow's,crosswalk,crossover,crinkle,crescendo,cremate,creeper,craftsman,cox's,counteract,counseled,couches,coronet,cornea,cornbread,corday,copernicus,conveyed,contrition,contracting,contested,contemptible,consultants,constructing,constipated,conqueror,connor's,conjoined,congenital,confounded,condescend,concubine,concoct,conch,concerto,conceded,compounded,compensating,comparisons,commoners,committment,commencement,commandeered,comely,coined,cognitive,codex,coddled,cockfight,cluttered,clunky,clownfish,cloaked,cliches,clenched,cleft,cleanin,cleaner's,civilised,circumcised,cimmeria,cilantro,chutzpah,chutney,chucking,chucker,chronicles,chiseled,chicka,chicago's,chattering,charting,characteristic,chaise,chair's,cervix,cereals,cayenne,carrey,carpal,carnations,caricature,cappuccinos,candy's,candied,cancer's,cameo,calluses,calisthenics,cadre,buzzsaw,bushy,burners,bundled,bum's,budington,buchanans,brock's,britons,brimming,breeders,breakaway,braids,bradley's,boycotting,bouncers,botticelli,botherin,boosting,bookkeeping,booga,bogyman,bogged,bluepoint's,bloodthirsty,blintzes,blanky,blak,biosphere,binturong,billable,bigboote,bewildered,betas,bernard's,bequeath,beirut,behoove,beheaded,beginners,beginner,befriend,beet,bedpost,bedded,bay's,baudelaires,barty,barreled,barboni,barbeque,bangin,baltus,bailout,bag's,backstabber,baccarat,awning,awaited,avenues,austen,augie,auditioned,auctions,astrology,assistant's,assassinations,aspiration,armenians,aristocrat,arguillo,archway,archaeologist,arcane,arabic,apricots,applicant,apologising,antennas,annyong,angered,andretti,anchorman,anchored,amritsar,amour,amidst,amid,americana,amenable,ambassadors,ambassador's,amazement,allspice,alannis,airliner,airfare,airbags,ahhhhhhhhh,ahhhhhhhh,ahhhhhhh,agitator,afternoon's,afghan,affirmation,affiliate,aegean,adrenal,actor's,acidosis,achy,achoo,accessorizing,accentuate,academically,abuses,abrasions,abilene,abductor,aaaahhh,zuzu,zoot,zeroing,zelner,zeldy,yo's,yevgeny,yeup,yeska,yellows,yeesh,yeahh,yamuri,yaks,wyatt's,wspr,writing's,wrestlers,wouldn't've,workmanship,woodsman,winnin,winked,wildness,widespread,whoring,whitewash,whiney,when're,wheezer,wheelman,wheelbarrow,whaling,westerburg,wegener's,weekdays,weeding,weaving,watermelons,watcher's,washboard,warmly,wards,waltzes,walt's,walkway,waged,wafting,voulez,voluptuous,vitone,vision's,villa's,vigilantes,videotaping,viciously,vices,veruca,vermeer,verifying,ventured,vaya,vaults,vases,vasculitis,varieties,vapor,valets,upriver,upholstered,upholding,unwavering,unused,untold,unsympathetic,unromantic,unrecognizable,unpredictability,unmask,unleashing,unintentional,unilaterally,unglued,unequivocal,underside,underrated,underfoot,unchecked,unbutton,unbind,unbiased,unagi,uhhhhh,turnovers,tugging,trouble's,triads,trespasses,treehorn,traviata,trappers,transplants,transforming,trannie,tramping,trainers,traders,tracheotomy,tourniquet,tooty,toothless,tomarrow,toasters,tine,tilting,thruster,thoughtfulness,thornwood,therapies,thanksgiving's,tha's,terri's,tengo,tenfold,telltale,telephoto,telephoned,telemarketer,teddy's,tearin,tastic,tastefully,tasking,taser,tamed,tallow,taketh,taillight,tadpoles,tachibana,syringes,sweated,swarthy,swagger,surrey,surges,surf's,supermodels,superhighway,sunup,sun'll,summaries,sumerian,sulu,sulphur,sullivan's,sulfa,suis,sugarless,sufficed,substituted,subside,submerged,subdue,styling,strolled,stringy,strengthens,street's,straightest,straightens,storyteller,storefront,stopper,stockpiling,stimulant,stiffed,steyne,sternum,stereotypical,stepladder,stepbrother,steers,steeple,steelheads,steakhouse,statue's,stathis,stankylecartmankennymr,standoffish,stalwart,stallions,stacy's,squirted,squeaker,squad's,spuds,spritz,sprig,sprawl,spousal,sportsman,sphincter,spenders,spearmint,spatter,sparrows,spangled,southey,soured,sonuvabitch,somethng,societies,snuffed,snowfall,snowboarding,sniffs,snafu,smokescreen,smilin,slurred,slurpee,slums,slobs,sleepwalker,sleds,slays,slayage,skydiving,sketched,skateboarding,skanks,sixed,siri,sired,siphoned,siphon,singer's,simpering,silencer,sigfried,siena,sidearm,siddons,sickie,siberian,shuteye,shuk,shuffleboard,shrubberies,shrouded,showmanship,shower's,shouldn't've,shortwave,shoplift,shooter's,shiatsu,sheriffs,shak,shafts,serendipity,serena's,sentries,sentance,sensuality,semesters,seething,sedition,secular,secretions,searing,scuttlebutt,sculpt,scowling,scouring,scorecard,schwarzenegger,schoolers,schmucks,scepters,scaly,scalps,scaling,scaffolding,sauces,sartorius,santen,sampler,salivating,salinger,sainthood,said's,saget,saddens,rygalski,rusting,rumson's,ruination,rueland,rudabaga,rubles,rowr,rottweiler,rotations,roofies,romantics,rollerblading,roldy,rob's,roadshow,rike,rickets,rible,rheza,revisiting,revisited,reverted,retrospective,retentive,resurface,restores,respite,resounding,resorting,resolutions,resists,repulse,repressing,repaying,reneged,relays,relayed,reinforce,regulator,registers,refunds,reflections,rediscover,redecorated,recruitment,reconstructive,reconstructed,recommitted,recollect,recoil,recited,receptor,receptacle,receivers,reassess,reanimation,realtors,razinin,ravaged,ratios,rationalization,ratified,ratatouille,rashum,rasczak,rarer,rapping,rancheros,rampler,rain's,railway,racehorse,quotient,quizzing,quips,question's,quartered,qualification,purring,pummeling,puede,publicized,psychedelic,proximo,proteins,protege,prospectus,pronouncing,pronoun,prolonging,program's,proficient,procreation,proclamations,prio,principled,prides,pricing,presbyterian,preoccupation,prego,preferential,predicts,precog,prattle,pounced,potshots,potpourri,portsmouth,porque,poppie's,poms,pomeranian,pomegranates,polynesian,polymer,polenta,plying,plume,plumber's,pluie,plough,plesac,playoff,playmates,planter,plantains,plaintiff's,pituitary,pisano's,pillowcase,piddle,pickers,phys,photocopied,philistine,pfeiffer's,peyton's,petitioned,persuading,perpetuate,perpetually,periodically,perilous,pensacola,pawned,pausing,pauper,patterned,pats,patronage,passover,partition,parter,parlez,parlay,parkinson's,parades,paperwork's,pally,pairing,ovulation,overtake,overstate,overpowering,overpowered,overconfident,overbooked,ovaltine,ouzo,outweighs,outings,outfit's,out's,ottos,orrin,originate,orifice,orangutan,optimal,optics,opportunistic,ooww,oopsy,ooooooooh,ooohhhh,onyx,onslaught,oldsmobile,ocular,ocean's,obstruct,obscenely,o'dwyer,o'brien's,nutjob,nunur,notifying,nostrand,nonny,nonfat,noblest,nimble,nikes,nicht,newsworthy,network's,nestled,nessie,necessities,nearsighted,ne'er,nazareth,navidad,nastier,nasa's,narco,nakedness,muted,mummified,multiplying,mudda,mtv's,mozzarella,moxica,motorists,motivator,motility,mothafucka,mortmain,mortgaged,mortally,moroccan,mores,moonshine,mongers,moe's,modify,mobster's,mobilization,mobbed,mitigating,mistah,misrepresented,mishke,misfortunes,misdirection,mischievous,mirrored,mineshaft,mimosa,millers,millaney,miho,midday,microwaves,mick's,metzenbaum,metres,merc,mentoring,medicine's,mccovey,maya's,mau's,masterful,masochistic,martie,marliston,market's,marijawana,marie's,marian's,manya,manuals,mantumbi,mannheim,mania,mane,mami's,malarkey,magnifique,magics,magician's,madrona,madox,madison's,machida,m'mm,m'hm,m'hidi,lyric,luxe,luther's,lusty,lullabies,loveliness,lotions,looka,lompoc,loader,litterbug,litigator,lithe,liquorice,lins,linguistics,linds,limericks,lightbulb,lewises,letch,lemec,lecter's,leavenworth,leasing,leases,layover,layered,lavatory,laurels,launchers,laude,latvian,lateness,lasky's,laparotomy,landlord's,laboring,la's,kumquat,kuato,kroff,krispy,kree,krauts,kona,knuckleheads,knighthood,kiva,kitschy,kippers,kip's,kimbrow,kike,keypad,keepsake,kebab,keane's,kazakhstan,karloff,justices,junket,juicer,judy's,judgemental,jsut,jointed,jogs,jezzie,jetting,jekyll,jehovah's,jeff's,jeeze,jeeter,jeesus,jeebs,janeane,jalapeno,jails,jailbait,jagged,jackin,jackhammer,jacket's,ixnay,ivanovich,issue's,isotope,island's,irritates,irritability,irrevocable,irrefutable,irma's,irked,invoking,intricacies,interferon,intents,inte,insubordinate,instructive,instinctive,inspector's,inserting,inscribed,inquisitive,inlay,injuns,inhibited,infringement,information's,infer,inebriated,indignity,indecisive,incisors,incacha,inauguration,inalienable,impresses,impregnate,impregnable,implosion,immersed,ikea,idolizes,ideological,idealism,icepick,hypothyroidism,hypoglycemic,hyde's,hutz,huseni,humvee,hummingbird,hugely,huddling,housekeeper's,honing,hobnobbing,hobnob,histrionics,histamine,hirohito,hippocratic,hindquarters,hinder,himalayan,hikita,hikes,hightailed,hieroglyphics,heyy,heuh,heretofore,herbalist,her's,henryk,henceforth,hehey,hedriks,heartstrings,headmistress,headlight,harvested,hardheaded,happend,handlers,handlebars,hagitha,habla,gyroscope,guys'd,guy'd,guttersnipe,grump,growed,grovelling,grooves,groan,greenbacks,greats,gravedigger,grating,grasshoppers,grappling,graph,granger's,grandiose,grandest,gram's,grains,grafted,gradual,grabthar's,goop,gooood,goood,gooks,godsakes,goaded,gloria's,glamorama,giveth,gingham,ghostbusters,germane,georgy,geisha,gazzo,gazelles,gargle,garbled,galgenstein,galapagos,gaffe,g'day,fyarl,furnish,furies,fulfills,frowns,frowned,frommer's,frighteningly,fresco,freebies,freakshow,freakishly,fraudulent,fragrant,forewarned,foreclose,forearms,fordson,ford's,fonics,follies,foghorn,fly's,flushes,fluffy's,flitting,flintstone,flemmer,flatline,flamboyant,flabby,fishbowl,firsts,finger's,financier,figs,fidgeting,fictitious,fevers,feur,ferns,feminism,fema,feigning,faxing,fatigued,fathoms,fatherless,fares,fancier,fanatical,fairs,factored,eyelid,eyeglasses,eye's,expresso,exponentially,expletive,expectin,excruciatingly,evidentiary,ever'thing,evelyn's,eurotrash,euphoria,eugene's,eubie,ethiopian,ethiopia,estrangement,espanol,erupted,ernie's,erlich,eres,epitome,epitaph,environments,environmentalists,entrap,enthusiastically,entertainers,entangled,enclose,encased,empowering,empires,emphysema,embers,embargo,emasculating,elizabethan,elephant's,eighths,egyptians,effigy,editions,echoing,eardrum,dyslexia,duplicitous,duplicated,dumpty,dumbledore,dufus,dudley's,duddy,duck's,duchamp,drunkenness,drumlin,drowns,droid,drinky,drifts,drawbridge,dramamine,downey's,douggie,douchebag,dostoyevsky,dorian's,doodling,don'tcha,domo,domineering,doings,dogcatcher,documenting,doctoring,doctoral,dockers,divides,ditzy,dissimilar,dissecting,disparage,disliking,disintegrating,dishwalla,dishonored,dishing,disengaged,discretionary,discard,disavowed,directives,dippy,diorama,dimmed,diminishing,dilate,dijon,digitalis,diggory,dicing,diagnosing,devout,devola,developmental,deter,destiny's,desolation,descendant,derived,derevko's,deployment,dennings,denials,deliverance,deliciously,delicacies,degenerates,degas,deflector,defile,deference,defenders,deduced,decrepit,decreed,decoding,deciphered,dazed,dawdle,dauphine,daresay,dangles,dampen,damndest,customer's,curricular,cucumbers,cucaracha,cryogenically,cruella,crowd's,croaks,croaked,criticise,crit,crisper,creepiest,creep's,credit's,creams,crawford's,crackle,crackin,covertly,cover's,county's,counterintelligence,corrosive,corpsman,cordially,cops'll,convulsions,convoluted,convincingly,conversing,contradictions,conga,confucius,confrontational,confab,condolence,conditional,condition's,condiments,composing,complicit,compiled,compile,compiegne,commuter,commodus,commissions,comings,cometh,combining,colossus,collusion,collared,cockeyed,coastline,clobber,clemonds,clashes,clarithromycin,clarified,cinq,cienega,chronological,christmasy,christmassy,chloroform,chippie,childless,chested,chemistry's,cheerios,cheeco,checklist,chaz,chauvinist,char,chang's,chandlers,chamois,chambermaid,chakras,chak,censored,cemented,cellophane,celestial,celebrations,caveat,catholicism,cataloguing,cartmanland,carples,carny,carded,caramels,captors,caption,cappy,caped,canvassing,cannibalism,canada's,camille's,callback,calibrated,calamine,cal's,cabo,bypassed,buzzy,buttermilk,butterfingers,bushed,burlesque,bunsen,bung,bulimia,bukatari,buildin,budged,bronck's,brom,brobich,bringer,brine,brendell,brawling,bratty,brasi,braking,braised,brackett's,braced,boyish,boundless,botch,borough,boosh,bookies,bonbons,bois,bodes,bobunk,bluntly,blossoming,bloopers,bloomers,bloodstains,bloodhounds,blitzen,blinker,blech,blasts,blanca's,bitterly,biter,biometric,bioethics,bilk,bijan,bigoted,bicep,betrothed,bergdorf's,bereaved,bequeathed,belo,bellowing,belching,beholden,befriended,beached,bawk,battled,batmobile,batman's,baseline,baseball's,barcodes,barch,barbie's,barbecuing,bandanna,baldy,bailey's,baghdad,backwater,backtrack,backdraft,ayuh,awgh,augustino,auctioned,attaching,attaches,atrophy,atrocity,atley,athletics,atchoo,asymmetrical,asthmatic,assoc,assists,ascending,ascend,articulated,arrr,armstrong's,armchair,arisen,archeology,archeological,arachnids,aptly,applesauce,appetizing,antisocial,antagonizing,anorexia,anini,angie's,andersons,anarchist,anagram,amputation,amherst,alleluia,algorithms,albemarle,ajar,airlock,airbag,aims,aimless,ailments,agua,agonized,agitate,aggravating,affirming,aerosol,aerosmith,aeroplane,acing,accumulated,accomplishing,accolades,accidently,academia,abuser,abstain,abso,abnormally,aberration,abandons,aaww,aaaaahh,zlotys,zesty,zerzura,zapruder,zany,zantopia,yugoslavia,youo,yoru,yipe,yeow,yello,yelburton,yeess,yaah,y'knowwhati'msayin,wwhat,wussies,wrenched,would'a,worryin,wormser,wooooo,wookiee,wolfe's,wolchek,woes,wishin,wiseguys,winston's,winky,wine's,windbreaker,wiggy,wieners,wiedersehen,whoopin,whittled,whey,whet,wherefore,wharvey,welts,welt,wellstone,weee,wednesday's,wedges,wavered,watchit,wastebasket,ward's,wank,wango,wallet's,wall's,waken,waiver,waitressed,wacquiem,wabbit,vrykolaka,voula,vote's,volt,volga,volcanoes,vocals,vitally,visualizing,viscous,virgo,virg,violet's,viciousness,vewy,vespers,vertes,verily,vegetarians,vater,vaseline,varied,vaporize,vannacutt,vallens,valenti's,vacated,uterine,usta,ussher,urns,urinating,urchin,upping,upheld,unwitting,untreated,untangle,untamed,unsanitary,unraveled,unopened,unisex,uninvolved,uninteresting,unintelligible,unimaginative,undisclosed,undeserving,undermines,undergarments,unconcerned,unbroken,ukrainian,tyrants,typist,tykes,tybalt,twosome,twits,tutti,turndown,tularemia,tuberculoma,tsimshian,truffaut,truer,truant,trove,triumphed,tripe,trigonometry,trifled,trifecta,tricycle,trickle,tribulations,trevor's,tremont,tremoille,treaties,trawler,translators,transcends,trafficker,touchin,tonnage,tomfoolery,tolls,tokens,tinkered,tinfoil,tightrope,ticket's,thth,thousan,thoracotomy,theses,thesaurus,theologian,themed,thawing,thatta,thar,textiles,testimonies,tessio,terminating,temps,taxidermist,tator,tarkin,tangent,tactile,tachycardia,t'akaya,synthesize,symbolically,swelco,sweetbreads,swedes,swatting,swastika,swamps,suze,supernova,supercollider,sunbathing,summarily,suffocation,sueleen,succinct,subtitle,subsided,submissive,subjecting,subbing,subatomic,stupendous,stunted,stubble,stubbed,striving,streetwalker,strategizing,straining,straightaway,storyline,stoli,stock's,stipulated,stimulus,stiffer,stickup,stens,steamroller,steadwell,steadfast,stave,statutes,stateroom,stans,stacey's,sshhhh,squishing,squinting,squealed,sprouting,sprimp,spreadsheets,sprawled,spotlights,spooning,spoiler,spirals,spinner's,speedboat,spectacles,speakerphone,spar,spaniards,spacing,sovereignty,southglen,souse,soundproof,soothsayer,soon's,sommes,somethings,solidify,soars,snorted,snorkeling,snitches,sniping,sniper's,snifter,sniffin,snickering,sneer,snarl,smila,slinking,sleuth,slater's,slated,slanted,slanderous,slammin,skyscraper,skimp,skilosh,skeletal,skag,siteid,sirloin,singe,simulate,signaled,sighing,sidekicks,sicken,shrubs,shrub,showstopper,shot's,shostakovich,shoreline,shoppin,shoplifter,shop's,shoe's,shoal,shitter,shirt's,shimokawa,sherborne,sheds,shawna's,shavadai,sharpshooters,sharking,shane's,shakespearean,shagged,shaddup,sexism,sexes,sesterces,serotonin,sequences,sentient,sensuous,seminal,selections,seismic,seashell,seaplane,sealing,seahaven,seagrave,scuttled,scullery,scow,scots,scorcher,scorch,schotzie,schnoz,schmooze,schlep,schizo,schindler's,scents,scalping,scalped,scallop,scalding,sayeth,saybrooke,sawed,savoring,sardine,sandy's,sandstorm,sandalwood,samoa,samo,salutations,salad's,saki,sailor's,sagman,s'okay,rudy's,rsvp'd,royale,rousted,rootin,roofs,romper,romanovs,rollercoaster,rolfie,rockers,rock's,robinsons,ritzy,ritualistic,ringwald,rhymed,rheingold,rewrites,revolved,revolutionaries,revoking,reviewer,reverts,retrofit,retort,retinas,resurfaced,respirations,respectively,resolute,resin,reprobate,replaying,repayment,repaint,renquist,renege,renders,rename,remarked,relapsing,rekindled,rejuvenating,rejuvenated,reinstating,reinstatement,reigns,referendums,recriminations,recitals,rechecked,reception's,recaptured,rebounds,reassemble,rears,reamed,realty,reader's,reacquaint,rayanne,ravish,rava,rathole,raspail,rarest,rapists,rants,ramone,ragnar,radiating,radial,racketeer,quotation,quittin,quitters,quintessential,quincy's,queremos,quellek,quelle,quasimodo,quarterbacks,quarter's,pyromaniac,puttanesca,puritanical,purged,purer,puree,punishments,pungent,pummel,puedo,pudge,puce,psychotherapist,psycho's,prosecutorial,prosciutto,propositioning,propellers,pronouns,progresses,procured,procrastination,processes,probationary,primping,primates,priest's,preventative,prevails,presided,preserves,preservatives,prefix,predecessors,preachy,prancer,praetorians,practicality,powders,potus,pot's,postop,positives,poser,portolano,portokalos,poolside,poltergeists,pocketed,poach,plunder,plummeted,plucking,plop,plimpton,plethora,playthings,player's,playboys,plastique,plainclothes,pious,pinpointed,pinkus,pinks,pilgrimage,pigskin,piffle,pictionary,piccata,photocopy,phobias,persia,permissible,perils,perignon,perfumes,peon,penned,penalized,peg's,pecks,pecked,paving,patriarch,patents,patently,passable,participants,parasitic,parasailing,paramus,paramilitary,parabolic,parable,papier,paperback,paintbrush,pacer,paaiint,oxen,owen's,overtures,overthink,overstayed,overrule,overlapping,overestimate,overcooked,outlandish,outgrew,outdoorsy,outdo,outbound,ostensibly,originating,orchestrate,orally,oppress,opposable,opponent's,operation's,oooohh,oomupwah,omitted,okeydokey,okaaay,ohashi,offerings,of'em,od'd,occurrences,occupant,observable,obscenities,obligatory,oakie,o'malley's,o'gar,nyah's,nurection,nun's,nougat,nostradamus,norther,norcom,nooch,nonviolent,nonsensical,nominating,nomadic,noel's,nkay,nipped,nimbala,nigeria,nigel's,nicklaus,newscast,nervously,nell's,nehru,neckline,nebbleman,navigator,nasdaq,narwhal,nametag,n'n't,mycenae,myanmar,muzak,muumuu,murderer's,mumbled,mulvehill,multiplication,multiples,muggings,muffet,mozart's,mouthy,motorbike,motivations,motivates,motaba,mortars,mordred,mops,moocher,moniker,mongi,mondo,monday's,moley,molds,moisturize,mohair,mocky,mmkay,mistuh,missis,mission's,misdeeds,minuscule,minty,mined,mincemeat,milton's,milt,millennia,mikes,miggs,miffed,mieke's,midwestern,methadone,metaphysics,messieur,merging,mergers,menopausal,menagerie,meee,mckenna's,mcgillicuddy,mayflowers,maxim's,matrimonial,matisse,matick,masculinity,mascots,masai,marzipan,marika,maplewood,manzelle,manufactures,manticore's,mannequins,manhole,manhandle,manatee,mallory's,malfunctions,mainline,magua's,madwoman,madeline's,machiavelli,lynley,lynching,lynched,lurconis,lujack,lubricant,looove,loons,loom,loofah,longevity,lonelyhearts,lollipops,loca,llama,liquidation,lineswoman,lindsey's,lindbergh,lilith's,lila's,lifers,lichen,liberty's,lias,lexter,levee,letter's,lessen,lepner,leonard's,lemony,leggy,leafy,leaflets,leadeth,lazerus,lazare,lawford,languishing,langford's,landslide,landlords,lagoda,ladman,lad's,kuwait,kundera,krist's,krinkle,krendler,kreigel,kowolski,kosovo,knockdown,knifed,kneed,kneecap,kids'll,kevlar,kennie,keeled,kazootie,kaufman's,katzenmoyer,kasdan,karl's,karak,kapowski,kakistos,jumpers,julyan,juanito,jockstrap,jobless,jiggly,jesuit,jaunt,jarring,jabbering,israelites,irrigate,irrevocably,irrationally,ironies,ions,invitro,inventions,intrigues,intimated,interview's,intervening,interchangeable,intently,intentioned,intelligently,insulated,institutional,instill,instigator,instigated,instep,inopportune,innuendoes,inheriting,inflate,infiltration,infects,infamy,inducing,indiscretions,indiscreet,indio,indignities,indict,indecision,incurred,incubation,inconspicuous,inappropriately,impunity,impudent,improves,impotence,implicates,implausible,imperfection,impatience,immutable,immobilize,illustration,illumination,idiot's,idealized,idealist,icelandic,iambic,hysterically,hyperspace,hygienist,hydraulics,hydrated,huzzah,husks,hurricane's,hunt's,hunched,huffed,hubris,hubbub,hovercraft,houngan,hotel's,hosed,horoscopes,hoppy,hopelessness,hoodwinked,honourable,honorably,honeysuckle,homeowners,homegirl,holiest,hoisted,hoho,ho's,hippity,hildie,hikers,hieroglyphs,hexton,herein,helicopter's,heckle,heats,heartbeat's,heaping,healthilizer,headmaster's,headfirst,hawk's,haviland's,hatsue,harlot,hardwired,hanno's,hams,hamilton's,halothane,hairstyles,hails,hailed,haagen,haaaaa,gyno,gutting,gurl,gumshoe,gummi,gull,guerilla,gttk,grover's,grouping,groundless,groaning,gristle,grills,graynamore,grassy,graham's,grabbin,governmental,goodes,goggle,godlike,glittering,glint,gliding,gleaming,glassy,girth,gimbal,gilmore's,gibson's,giblets,gert,geometric,geographical,genealogy,gellers,geller's,geezers,geeze,garshaw,gargantuan,garfunkel,gardner's,garcia's,garb,gangway,gandarium,gamut,galoshes,gallivanting,galleries,gainfully,gack,gachnar,fusionlips,fusilli,furiously,fulfil,fugu,frugal,fron,friendship's,fricking,frederika,freckling,frauds,fraternal,fountainhead,forthwith,forgo,forgettable,foresight,foresaw,footnotes,fondling,fondled,fondle,folksy,fluttering,flutie,fluffing,floundering,florin,florentine,flirtatious,flexing,flatterer,flaring,fizz,fixating,five's,fishnet,firs,firestorm,finchy,figurehead,fifths,fiendish,fertilize,ferment,fending,fellahs,feeny's,feelers,feeders,fatality,fascinate,fantabulous,falsify,fallopian,faithless,fairy's,fairer,fair's,fainter,failings,facto,facets,facetious,eyepatch,exxon,extraterrestrials,extradite,extracurriculars,extinguish,expunged,exports,expenditure,expelling,exorbitant,exigent,exhilarated,exertion,exerting,exemption,excursions,excludes,excessively,excercise,exceeds,exceeding,everbody,evaporated,euthanasia,euros,europeans,escargot,escapee,erases,epizootics,epithelials,ephrum,enthusiast,entanglements,enslaved,enslave,engrossed,endeavour,enables,enabled,empowerment,employer's,emphatic,emeralds,embroiled,embraces,ember,embellished,emancipated,ello,elisa's,elevates,ejaculate,ego's,effeminate,economically,eccentricities,easygoing,earshot,durp,dunks,dunes,dullness,dulli,dulled,drumstick,dropper,driftwood,dregs,dreck,dreamboat,draggin,downsizing,dost,doofer,donowitz,dominoes,dominance,doe's,diversions,distinctions,distillery,distended,dissolving,dissipate,disraeli,disqualify,disowned,dishwashing,discusses,discontent,disclosed,disciplining,discerning,disappoints,dinged,diluted,digested,dicking,diablos,deux,detonating,destinations,despising,designer's,deserts,derelict,depressor,depose,deport,dents,demonstrations,deliberations,defused,deflection,deflecting,decryption,decoys,decoupage,decompress,decibel,decadence,dealer's,deafening,deadlock,dawning,dater,darkened,darcy's,dappy,dancing's,damon's,dallying,dagon,d'etat,czechoslovakians,cuticles,cuteness,curacao,cupboards,cumulative,culottes,culmination,culminating,csi's,cruisin,crosshairs,cronyn,croc,criminalistics,crimean,creatively,creaming,crapping,cranny,cowed,countermeasures,corsica,corinne's,corey's,cooker,convened,contradicting,continuity,constitutionally,constipation,consort,consolidate,consisted,connection's,confining,confidences,confessor,confederates,condensation,concluding,conceiving,conceivably,concealment,compulsively,complainin,complacent,compiling,compels,communing,commonplace,commode,commission's,commissary,comming,commensurate,columnists,colonoscopy,colonists,collagen,collaborate,colchicine,coddling,clump,clubbed,clowning,closet's,clones,clinton's,clinic's,cliffhanger,classification,clang,citrus,cissy,circuitry,chronology,christophe,choosers,choker,chloride,chippewa,chip's,chiffon,chesty,chesapeake,chernobyl,chants,channeled,champagne's,chalet,chaka,cervical,cellphone,cellmates,caverns,catwalk,cathartic,catcher's,cassandra's,caseload,carpenter's,carolyn's,carnivorous,carjack,carbohydrates,capt,capitalists,canvass,cantonese,canisters,candlestick,candlelit,canaries,camry,camel's,calzones,calitri,caldy,cabin's,byline,butterball,bustier,burmese,burlap,burgeoning,bureaucrat,buffoons,buenas,bryan's,brookline,bronzed,broiled,broda,briss,brioche,briar,breathable,brea,brays,brassieres,braille,brahms,braddock's,boysenberry,bowman's,bowline,boutiques,botticelli's,boooo,boonies,booklets,bookish,boogeyman,boogey,bomb's,boldly,bogs,bogas,boardinghouse,bluuch,blundering,bluffs,bluer,blowed,blotto,blotchy,blossomed,blooms,bloodwork,bloodied,blithering,blinks,blathering,blasphemous,blacking,bison,birdson,bings,bilateral,bfmid,bfast,berserker,berkshires,bequest,benjamins,benevolence,benched,benatar,belthazor's,bellybutton,belabor,bela's,behooves,beddy,beaujolais,beattle,baxworth,batted,baseless,baring,barfing,barbi,bannish,bankrolled,banek,ballsy,ballpoint,balkans,balconies,bakers,bahama,baffling,badder,badda,bada,bactine,backgammon,baako,aztreonam,aztecs,awed,avon,autobiographical,autistic,authoritah,auspicious,august's,auditing,audible,auctioning,attitude's,atrocities,athlete's,astronomer,assessed,ascot,aristocratic,arid,argues,arachtoids,arachnid,aquaman,apropos,aprons,apprised,apprehensive,apex,anythng,antivenin,antichrist,antennae,anorexic,anoint,annum,annihilated,animal's,anguished,angioplasty,angio,amply,ampicillin,amphetamines,amino,american's,ambiguity,ambient,amarillo,alyssa's,alternator,alcove,albacore,alarm's,alabaster,airlifted,ahta,agrabah,affidavits,advocacy,advises,adversely,admonished,admonish,adler's,addled,addendum,acknowledgement,accuser,accompli,acclaim,acceleration,abut,abundant,absurdity,absolved,abrusso,abreast,abrasive,aboot,abductions,abducting,abbots,aback,ababwa,aand,aaahhhh,zorin,zinthar,zinfandel,zimbabwe,zillions,zephyrs,zatarcs,zacks,youuu,youths,yokels,yech,yardstick,yammer,y'understand,wynette,wrung,wrought,wreaths,wowed,wouldn'ta,worshiped,worming,wormed,workday,wops,woolly,wooh,woodsy,woodshed,woodchuck,wojadubakowski,withering,witching,wiseass,wiretaps,winner's,wining,willoby,wiccaning,whupped,whoopi,whoomp,wholesaler,whiteness,whiner,whatchya,wharves,whah,wetlands,westward,wenus,weirdoes,weds,webs,weaver's,wearer,weaning,watusi,wastes,warlock's,warfield's,waponi,waiting's,waistband,waht,wackos,vouching,votre,voight's,voiced,vivica,viveca,vivant,vivacious,visor,visitin,visage,virgil's,violins,vinny,vinci's,villas,vigor,video's,vicrum,vibrator,vetted,versailles,vernon's,venues,ventriloquism,venison,venerable,varnsen,variant,variance,vaporized,vapid,vanstock,vandals,vader's,vaccination,uuuuh,utilize,ushering,usda,usable,urur,urologist,urination,urinary,upstart,uprooted,unsubtitled,unspoiled,unseat,unseasonably,unseal,unsatisfying,unnerve,unlikable,unleaded,university's,universe's,uninsured,uninspired,uniformity,unicycle,unhooked,ungh,unfunny,unfreezing,unflattering,unfairness,unexpressed,unending,unencumbered,unearth,undiscovered,undisciplined,undertaken,understan,undershirt,underlings,underline,undercurrent,uncontrolled,uncivilized,uncharacteristic,umpteenth,uglies,u're,tut's,turner's,turbine,tunnel's,tuney,trustee,trumps,truckasaurus,trubshaw,trouser,trippy,tringle,trifling,trickster,triangular,trespassers,trespasser,traverse,traumas,trattoria,trashes,transgressions,tranquil,trampling,trainees,tracy's,tp'ed,toxoplasmosis,tounge,tortillas,torrent,torpedoed,topsy,topple,topnotch,top's,tonsil,tippin's,tions,timmuh,timithious,tilney,tighty,tightness,tightens,tidbits,ticketed,thyme,thrones,threepio,thoughtfully,thornhart's,thorkel,thommo,thing'll,theological,thel,theh,thefts,that've,thanksgivings,tetherball,testikov,terraforming,terminus,tepid,tendonitis,tenboom,telex,teleport,telepathic,teenybopper,taxicab,taxed,taut,tattered,tattaglias,tapered,tantric,tanneke,takedown,tailspin,tacs,tacit,tablet,tablecloth,systemic,syria,syphon,synthesis,symbiotic,swooping,swizzle,swiping,swindled,swilling,swerving,sweatshops,swayzak's,swaddling,swackhammer,svetkoff,suzie's,surpass,supossed,superdad,super's,sumptuous,sula,suit's,sugary,sugar's,sugai,suey,subvert,suburb,substantiate,subsidy,submersible,sublimating,subjugation,styx,stymied,stuntman,studded,strychnine,strikingly,strenuous,streetlights,strassmans,stranglehold,strangeness,straddling,straddle,stowaways,stotch,stockbrokers,stifling,stepford,stepdad's,steerage,steena,staunch,statuary,starlets,stanza,stanley's,stagnant,staggeringly,ssshhh,squaw,spurt,spungeon,sprightly,sprays,sportswear,spoonful,splittin,splitsville,spirituality,spiny,spider's,speedily,speculative,specialise,spatial,spastic,spas,sparrin,soybean,souvlaki,southie,southampton,sourpuss,soupy,soup's,soundstage,sophie's,soothes,somebody'd,solicited,softest,sociopathic,socialized,socialism,snyders,snowmobiles,snowballed,snatches,smugness,smoothest,smashes,slurp,slur,sloshed,sleight,skyrocket,skied,skewed,sizeable,sixpence,sipowicz,singling,simulations,simulates,similarly,silvery,silverstone,siesta,siempre,sidewinder,shyness,shuvanis,showoff,shortsighted,shopkeeper,shoehorn,shithouse,shirtless,shipshape,shingles,shifu,shes,sherman's,shelve,shelbyville,sheepskin,shat,sharpens,shaquille,shaq,shanshu,shania's,set's,servings,serpico,sequined,sensibilities,seizes,seesaw,seep,seconded,sebastian's,seashells,scrapped,scrambler,scorpions,scopes,schnauzer,schmo,schizoid,scampered,scag,savagely,saudis,satire,santas,sanskrit,sandovals,sanding,sandal,salient,saleswoman,sagging,s'cuse,rutting,ruthlessly,runoff,runneth,rulers,ruffians,rubes,roughriders,rotates,rotated,roswell's,rosalita,rookies,ron's,rollerblades,rohypnol,rogues,robinson's,roasts,roadies,river's,ritten,rippling,ripples,ring's,rigor,rigoletto,richardo,ribbed,revolutions,revlon's,reverend's,retreating,retractable,rethought,retaliated,retailers,reshoot,reserving,reseda,researchers,rescuer,reread,requisitions,repute,reprogram,representations,report's,replenish,repetitive,repetitious,repentance,reorganizing,renton,renee's,remodeled,religiously,relics,reinventing,reinvented,reheat,rehabilitate,registrar,regeneration,refueling,refrigerators,refining,reenter,redress,recruiter,recliner,reciprocal,reappears,razors,rawdy,rashes,rarity,ranging,rajeski,raison,raisers,rainier,ragtime,rages,radar's,quinine,questscape,queller,quartermaine's,pyre,pygmalion,pushers,pusan,purview,purification,pumpin,puller,pubescent,psychiatrist's,prudes,provolone,protestants,prospero,propriety,propped,prom's,procrastinate,processors,processional,princely,preyed,preventive,pretrial,preside,premiums,preface,preachers,pounder,ports,portrays,portrayal,portent,populations,poorest,pooling,poofy,pontoon,pompeii,polymerization,polloi,policia,poacher,pluses,pleasuring,pleads,playgrounds,platitudes,platforms,plateaued,plate's,plantations,plaguing,pittance,pitcher's,pinky's,pinheads,pincushion,pimply,pimped,piggyback,pierce's,piecing,physiological,physician's,phosphate,phillipe,philipse,philby,phased,pharaohs,petyr,petitioner,peshtigo,pesaram,perspectives,persnickety,perpetrate,percolating,pepto,pensions,penne,penell,pemmican,peeks,pedaling,peacemaker,pawnshop,patting,pathologically,patchouli,pasts,pasties,passin,parlors,panda's,panache,paltrow,palamon,padlock,paddy's,paddling,oversleep,overheating,overdosed,overcharge,overcame,overblown,outset,outrageously,outfitted,orsini's,ornery,origami,orgasmic,orga,order's,opportune,ooow,oooooooooh,oohhhh,olympian,olfactory,okum,ohhhhhh,ogres,odysseus,odorless,occupations,occupancy,obscenity,obliterated,nyong,nymphomaniac,nutsack,numa,ntozake,novocain,nough,noth,nosh,norwegians,northstar,nonnie,nonissue,nodules,nightmarish,nightline,nighthawk,niggas,nicu,nicolae,nicknamed,niceties,newsman,neverland,negatively,needra,nedry,necking,navour,nauseam,nauls,narim,nanda,namath,nagged,nads,naboo,n'sync,mythological,mysticism,myslexia,mutator,mustafi,mussels,muskie,musketeer,murtaugh,murderess,murder's,murals,munching,mumsy,muley,mouseville,mosque,mosh,mortifying,morgendorffers,moola,montel,mongoloid,molten,molestered,moldings,mocarbies,mo'ss,mixers,misrell,misnomer,misheard,mishandled,miscreant,misconceptions,miniscule,minimalist,millie's,millgate,migrate,michelangelo's,mettle,metricconverter,methodology,meter's,meteors,mesozoic,menorah,mengele,mendy's,membranes,melding,meanness,mcneil's,mcgruff,mcarnold,matzoh,matted,mathematically,materialized,mated,masterpieces,mastectomy,massager,masons,marveling,marta's,marquee,marooned,marone's,marmaduke,marick,marcie's,manhandled,mangoes,manatees,managerial,man'll,maltin,maliciously,malfeasance,malahide,maketh,makeshift,makeovers,maiming,magazine's,machismo,maarten,lutheran,lumpectomy,lumbering,luigi's,luge,lubrication,lording,lorca,lookouts,loogie,loners,london's,loin,lodgings,locomotive,lobes,loathed,lissen,linus,lighthearted,ligament,lifetime's,lifer,lier,lido,lickin,lewen,levitation,lestercorp,lessee,lentils,lena's,lemur,lein,legislate,legalizing,lederhosen,lawmen,laundry's,lasskopf,lardner,landscapes,landfall,lambeau,lamagra,lagging,ladonn,lactic,lacquer,laborers,labatier,kwan's,krit,krabappel,kpxy,kooks,knobby,knickknacks,klutzy,kleynach,klendathu,kinross,kinko's,kinkaid,kind'a,kimberly's,kilometer,khruschev's,khaki,keyboards,kewl,ketch,kesher,ken's,karikos,karenina,kanamits,junshi,juno's,jumbled,jujitsu,judith's,jt's,joust,journeyed,jotted,jonathan's,jizz,jingling,jigalong,jerseys,jerries,jellybean,jellies,jeeps,jeannie's,javna,jamestown,james's,jamboree,jail's,islanders,irresistable,irene's,ious,investigation's,investigates,invaders,inundated,introductory,interviewer,interrupts,interpreting,interplanetary,internist,intercranial,inspections,inspecting,inseminated,inquisitor,inland,infused,infuriate,influx,inflating,infidelities,inference,inexpensive,industrialist,incessantly,inception,incensed,incase,incapacitate,inca,inasmuch,inaccuracies,imus,improvised,imploding,impeding,impediments,immaturity,ills,illegible,idols,iditarod,identifiable,id'n,icicles,ibuprofen,i'i'm,hymie,hydrolase,hybrids,hunsecker's,hunker,humps,humons,humidor,humdinger,humbling,humankind,huggin,huffing,households,housecleaning,hothouse,hotcakes,hosty,hootenanny,hootchie,hoosegow,honouring,honks,honeymooners,homophobic,homily,homeopathic,hoffman's,hnnn,hitchhikers,hissed,hispanics,hillnigger,hexavalent,hewwo,heston's,hershe,herodotus,hermey,hergott,heresy,henny,hennigans,henhouse,hemolytic,hells,helipad,heifer,hebrews,hebbing,heaved,heartland,heah,headlock,hatchback,harvard's,harrowing,harnessed,harding's,happy's,hannibal's,hangovers,handi,handbasket,handbags,halloween's,hall's,halfrek,halfback,hagrid,hacene,gyges,guys're,gut's,gundersons,gumption,guardia,gruntmaster,grubs,group's,grouch,grossie,grosser,groped,grins,grime,grigio,griff's,greaseball,gravesite,gratuity,graphite,granma,grandfathers,grandbaby,gradski,gracing,got's,gossips,goonie,gooble,goobers,goners,golitsyn,gofer,godsake,goddaughter,gnats,gluing,glub,global's,glares,gizmos,givers,ginza,gimmie,gimmee,georgia's,gennero,gazpacho,gazed,gato,gated,gassy,gargling,gandhiji,galvanized,gallery's,gallbladder,gabriel's,gaaah,furtive,furthering,fungal,fumigation,fudd,fucka,fronkonsteen,fromby's,frills,fresher,freezin,freewald,freeloader,franklin's,framework,frailty,fortified,forger,forestry,foreclosure,forbade,foray,football's,foolhardy,fondest,fomin,followin,follower,follicle,flue,flowering,flotation,flopping,floodgates,flogged,flog,flicked,flenders,fleabag,flanks,fixings,fixable,fistful,firewater,firestarter,firelight,fingerbang,finalizing,fillin,filipov,fido,fiderer,feminists,felling,feldberg,feign,favorably,fave,faunia,faun,fatale,fasting,farkus,fared,fallible,faithfulness,factoring,facilitated,fable,eyeful,extramarital,extracts,extinguished,exterminated,exposes,exporter,exponential,exhumed,exhume,exasperated,eviscerate,evidenced,evanston,estoy,estimating,esmerelda,esme,escapades,erosion,erie,equitable,epsom,epoxy,enticed,enthused,entendre,ensued,enhances,engulfed,engrossing,engraving,endorphins,enamel,emptive,empirical,emmys,emission,eminently,embody,embezzler,embarressed,embarrassingly,embalmed,emancipation,eludes,eling,elevation,electorate,elated,eirie,egotitis,effecting,eerily,eeew,eecom,editorials,edict,eczema,ecumenical,ecklie's,earthy,earlobes,eally,dyeing,dwells,dvds,duvet,duncans,dulcet,duckling,droves,droppin,drools,drey'auc,dreamers,dowser's,downriver,downgraded,doping,doodie,dominicans,dominating,domesticity,dollop,doesnt,doer,dobler,divulged,divisional,diversionary,distancing,dissolves,dissipated,displaying,dispensers,dispensation,disorienting,disneyworld,dismissive,dismantling,disingenuous,disheveled,disfiguring,discourse,discontinued,disallowed,dinning,dimming,diminutive,diligently,dilettante,dilation,diggity,diggers,dickensian,diaphragms,diagnoses,dewy,developer,devastatingly,determining,destabilize,desecrate,derives,deposing,denzel,denouncing,denominations,denominational,deniece,demony,delving,delt,delicates,deigned,degrassi's,degeneration,defraud,deflower,defibrillator,defiantly,deferred,defenceless,defacing,dedicating,deconstruction,decompose,deciphering,decibels,deceptively,deceptions,decapitation,debutantes,debonair,deadlier,dawdling,davic,databases,darwinism,darnit,darks,danke,danieljackson,dangled,daimler,cytoxan,cylinders,cutout,cutlery,cuss,cushing's,curveball,curiously,curfews,cummerbund,cuckoo's,crunches,crucifixion,crouched,croix,criterion,crisps,cripples,crilly,cribs,crewman,cretaceous,creepin,creeds,credenza,creak,crawly,crawlin,crawlers,crated,crasher,crackheads,coworker,counterpart,councillor,coun,couldn't've,cots,costanza's,cosgrove's,corwins,corset,correspondents,coriander,copiously,convenes,contraceptives,continuously,contingencies,contaminating,consul,constantinople,conniption,connie's,conk,conjugate,condiment,concurrently,concocting,conclave,concert's,con's,comprehending,compliant,complacency,compilation,competitiveness,commendatore,comedies,comedians,comebacks,combines,com'on,colonized,colonization,collided,collectively,collarbone,collaborating,collaborated,colitis,coldly,coiffure,coffers,coeds,codependent,cocksucking,cockney,cockles,clutched,cluett's,cloverleaf,closeted,cloistered,clinched,clicker,cleve,clergyman,cleats,clarifying,clapped,citations,cinnabar,cinco,chunnel,chumps,chucks,christof,cholinesterase,choirboy,chocolatey,chlamydia,chili's,chigliak,cheesie,cheeses,chechnya,chauvinistic,chasm,chartreuse,charnier,chapil,chapel's,chalked,chadway,cerveza,cerulean,certifiably,celsius,cellulite,celled,ceiling's,cavalry's,cavalcade,catty,caters,cataloging,casy,castrated,cassio,cashman's,cashews,carwash,cartouche,carnivore,carcinogens,carasco's,carano's,capulet,captives,captivated,capt'n,capsized,canoes,cannes,candidate's,cancellations,camshaft,campin,callate,callar,calendar's,calculators,cair,caffeinated,cadavers,cacophony,cackle,byproduct,bwana,buzzes,buyout,buttoning,busload,burglaries,burbs,bura,buona,bunions,bungalows,bundles,bunches,bullheaded,buffs,bucyk,buckling,bruschetta,browbeating,broomsticks,broody,bromly,brolin,brigadier,briefings,bridgeport,brewskies,breathalyzer,breakups,breadth,bratwurst,brania,branching,braiding,brags,braggin,bradywood,bozo's,bottomed,bottom's,bottling,botany,boston's,bossa,bordello,booo,bookshelf,boogida,bondsman,bolsheviks,bolder,boggles,boarder,boar's,bludgeoned,blowtorch,blotter,blips,blends,blemish,bleaching,blainetologists,blading,blabbermouth,bismarck,bishops,biscayne,birdseed,birdcage,bionic,biographies,biographical,bimmel,biloxi,biggly,bianchinni,bette's,betadine,berg's,berenson,belus,belt's,belly's,belloq,bella's,belfast,behavior's,begets,befitting,beethoven's,beepers,beelzebub,beefed,bedroom's,bedrock,bedridden,bedevere,beckons,beckett's,beauty's,beaded,baubles,bauble,battlestar,battleground,battle's,bathrobes,basketballs,basements,barroom,barnacle,barkin,barked,barium,baretta,bangles,bangler,banality,bambang,baltar,ballplayers,baio,bahrain,bagman,baffles,backstroke,backroom,bachelor's,babysat,babylonian,baboons,aviv,avez,averse,availability,augmentation,auditory,auditor,audiotape,auctioneer,atten,attained,attackers,atcha,astonishment,asshole's,assembler,arugula,arsonist's,arroz,arigato,arif,ardent,archaic,approximation,approving,appointing,apartheid,antihistamines,antarctica,annoyances,annals,annabelle's,angrily,angelou,angelo's,anesthesiology,android,anatomically,anarchists,analyse,anachronism,amiable,amex,ambivalent,amassed,amaretto,alumnus,alternating,alternates,alteration,aloft,alluding,allen's,allahu,alight,alfred's,alfie,airlift,aimin,ailment,aground,agile,ageing,afterglow,africans,affronte,affectionately,aerobic,adviser,advil,adventist,advancements,adrenals,admiral's,administrators,adjutant,adherence,adequately,additives,additions,adapting,adaptable,actualization,activating,acrost,ached,accursed,accoutrements,absconded,aboveboard,abou,abetted,abbot's,abbey's,aargh,aaaahh,zuzu's,zuwicky,zolda,zits,ziploc,zakamatak,yutz,yumm,youve,yolk,yippie,yields,yiddish,yesterdays,yella,yearns,yearnings,yearned,yawning,yalta,yahtzee,yacht's,y'mean,y'are,xand,wuthering,wreaks,woul,worsened,worrisome,workstation,workiiing,worcestershire,woop,wooooooo,wooded,wonky,womanizing,wolodarsky,wnkw,wnat,wiwith,withdraws,wishy,wisht,wipers,wiper,winos,winery,windthorne,windsurfing,windermere,wiggles,wiggled,wiggen,whys,whwhat,whuh,whos,whore's,whodunit,whoaaa,whittling,whitesnake,whirling,whereof,wheezing,wheeze,whatley's,whatd'ya,whataya,whammo,whackin,wets,westbound,wellll,wellesley,welch's,weirdo's,weightless,weevil,wedgies,webbing,weasly,weapon's,wean,wayside,waxes,wavelengths,waturi,washy,washrooms,warton's,wandell,wakeup,waitaminute,waddya,wabash,waaaah,vornac,voir,voicing,vocational,vocalist,vixens,vishnoor,viscount,virulent,virtuoso,vindictiveness,vinceres,vince's,villier,viii,vigeous,viennese,viceroy,vestigial,vernacular,venza's,ventilate,vented,venereal,vell,vegetative,veering,veered,veddy,vaslova,valosky,vailsburg,vaginas,vagas,vacation's,uuml,urethra,upstaged,uploading,upgrades,unwrapping,unwieldy,untenable,untapped,unsatisfied,unsatisfactory,unquenchable,unnerved,unmentionable,unlovable,unknowns,universes,uninformed,unimpressed,unhappily,unguarded,unexplored,underpass,undergarment,underdeveloped,undeniably,uncompromising,unclench,unclaimed,uncharacteristically,unbuttoned,unblemished,unas,umpa,ululd,uhhhm,tweeze,tutsami,tusk,tushy,tuscarora,turkle,turghan,turbulent,turbinium,tuffy,tubers,tsun,trucoat,troxa,trou,tropicana,triquetra,tripled,trimmers,triceps,tribeca,trespassed,traya,travellers,traumatizing,transvestites,transatlantic,tran's,trainors,tradin,trackers,townies,tourelles,toughness,toucha,totals,totalled,tossin,tortious,topshop,topes,tonics,tongs,tomsk,tomorrows,toiling,toddle,tobs,tizzy,tiramisu,tippers,timmi,timbre,thwap,thusly,ththe,thruway,thrusts,throwers,throwed,throughway,thrice,thomas's,thickening,thia,thermonuclear,therapy's,thelwall,thataway,th's,textile,texans,terry's,terrifically,tenets,tendons,tendon,telescopic,teleportation,telepathically,telekinetic,teetering,teaspoons,teamsters,taunts,tatoo,tarantulas,tapas,tanzania,tanned,tank's,tangling,tangerine,tamales,tallied,tailors,tai's,tahitian,tag's,tactful,tackles,tachy,tablespoon,tableau,syrah,syne,synchronicity,synch,synaptic,synapses,swooning,switchman,swimsuits,swimmer's,sweltering,swelling's,sweetly,sweeper,suvolte,suss,suslov,surname,surfed,supremacy,supposition,suppertime,supervillains,superman's,superfluous,superego,sunspots,sunnydale's,sunny's,sunning,sunless,sundress,sump,suki,suffolk,sue's,suckah,succotash,substation,subscriptions,submarines,sublevel,subbasement,styled,studious,studio's,striping,stresses,strenuously,streamlined,strains,straights,stony,stonewalled,stonehenge,stomper,stipulates,stinging,stimulated,stillness,stilettos,stewards,stevesy,steno,sten,stemmed,steenwyck,statesmen,statehood,stargates,standstill,stammering,staedert,squiggly,squiggle,squashing,squaring,spurred,sprints,spreadsheet,spramp,spotters,sporto,spooking,sponsorship,splendido,spittin,spirulina,spiky,speculations,spectral,spate,spartacus,spans,spacerun,sown,southbound,sorr,sorcery,soonest,sono,sondheim,something'll,someth,somepin,someone'll,solicitor,sofas,sodomy,sobs,soberly,sobered,soared,soapy,snowmen,snowbank,snowballing,snorkel,snivelling,sniffling,snakeskin,snagging,smush,smooter,smidgen,smackers,smackdown,slumlord,slugging,slossum,slimmer,slighted,sleepwalk,sleazeball,skokie,skirmishes,skipper's,skeptic,sitka,sitarides,sistah,sipped,sindell,simpletons,simp,simony,simba's,silkwood,silks,silken,silicone,sightless,sideboard,shuttles,shrugging,shrouds,showy,shoveled,shouldn'ta,shoplifters,shitstorm,shipyard,shielded,sheldon's,sheeny,shaven,shapetype,shankar,shaming,shallows,shale,shading,shackle,shabbily,shabbas,severus,settlements,seppuku,senility,semite,semiautomatic,semester's,selznick,secretarial,sebacio,sear,seamless,scuzzy,scummy,scud,scrutinized,scrunchie,scriptures,scribbled,scouted,scotches,scolded,scissor,schooner,schmidt's,schlub,scavenging,scarin,scarfing,scarecrow's,scant,scallions,scald,scabby,say's,savour,savored,sarcoidosis,sandbar,saluted,salted,salish,saith,sailboats,sagittarius,sagan,safeguards,sacre,saccharine,sacamano,sabe,rushdie,rumpled,rumba,rulebook,rubbers,roughage,rotterdam,roto,rotisserie,rosebuds,rootie,roosters,roosevelt's,rooney's,roofy,roofie,romanticize,roma's,rolodex,rolf's,roland's,rodney's,robotic,robin's,rittle,ristorante,rippin,rioting,rinsing,ringin,rincess,rickety,rewritten,revising,reveling,rety,retreats,retest,retaliating,resumed,restructuring,restrict,restorative,reston,restaurateur,residences,reshoots,resetting,resentments,rescuers,rerouted,reprogramming,reprisals,reprisal,repossess,repartee,renzo,renfield,remore,remitting,remeber,reliability,relaxants,rejuvenate,rejections,rehu,regularity,registrar's,regionals,regimes,regenerated,regency,refocus,referrals,reeno,reelected,redevelopment,recycles,recrimination,recombinant,reclining,recanting,recalling,reattach,reassigning,realises,reactors,reactionary,rbis,razor's,razgul,raved,rattlesnakes,rattles,rashly,raquetball,rappers,rapido,ransack,rankings,rajah,raisinettes,raheem,radisson,radishes,radically,radiance,rabbi's,raban,quoth,qumari,quints,quilts,quilting,quien,queue,quarreled,qualifying,pygmy,purty,puritans,purblind,puppy's,punctuation,punchbowl,puget,publically,psychotics,psychopaths,psychoanalyze,pruning,provasik,protruding,protracted,protons,protections,protectin,prospector,prosecutor's,propping,proportioned,prophylactic,propelled,proofed,prompting,prompter,professed,procreate,proclivities,prioritizing,prinze,princess's,pricked,press'll,presets,prescribes,preocupe,prejudicial,prefex,preconceived,precipice,preamble,pram,pralines,pragmatist,powering,powerbar,pottie,pottersville,potsie,potholes,potency,posses,posner's,posies,portkey,porterhouse,pornographers,poring,poppycock,poppet,poppers,poopsie,pomponi,pokin,poitier,poes,podiatry,plush,pleeze,pleadings,playbook,platelets,plane'arium,placebos,place'll,pj's,pixels,pitted,pistachios,pisa,pirated,pirate's,pinochle,pineapples,pinafore,pimples,piggly,piggies,pie's,piddling,picon,pickpockets,picchu,physiologically,physic,photo's,phobic,philosophies,philosophers,philly's,philandering,phenomenally,pheasants,phasing,phantoms,pewter,petticoat,petronis,petitioning,perturbed,perth,persists,persians,perpetuating,permutat,perishable,periphery,perimeters,perfumed,percocet,per'sus,pepperjack,pensioners,penalize,pelting,pellet,peignoir,pedicures,pedestrians,peckers,pecans,payback's,pay's,pawning,paulsson,pattycake,patrolmen,patrolled,patois,pathos,pasted,passer,partnerships,parp,parishioners,parishioner,parcheesi,parachuting,pappa,paperclip,papayas,paolo's,pantheon,pantaloons,panhandle,pampers,palpitations,paler,palantine,paintballing,pago,owow,overtired,overstress,oversensitive,overnights,overexcited,overanxious,overachiever,outwitted,outvoted,outnumber,outlived,outlined,outlast,outlander,outfield,out've,ortolani's,orphey,ornate,ornamental,orienteering,orchestrating,orator,oppressive,operator's,openers,opec,ooky,oliver's,olde,okies,okee,ohhhhhhhhh,ohhhhhhhh,ogling,offline,offbeat,oceanographic,obsessively,obeyed,oaths,o'leary's,o'hana,o'bannon,o'bannion,numpce,nummy,nuked,nuff,nuances,nourishing,noticeably,notably,nosedive,northeastern,norbu,nomlies,nomine,nomads,noge,nixed,niro,nihilist,nightshift,newmeat,nevis,nemo's,neighborhood's,neglectful,neediness,needin,necromancer,neck's,ncic,nathaniel's,nashua,naphthalene,nanotechnology,nanocytes,nanite,naivete,nacho,n'yeah,mystifying,myhnegon,mutating,muskrat,musing,museum's,muppets,mumbles,mulled,muggy,muerto,muckraker,muchachos,mris,move's,mourners,mountainside,moulin,mould,motherless,motherfuck,mosquitos,morphed,mopped,moodoo,montage,monsignor,moncho,monarchs,mollem,moisturiser,moil,mohicans,moderator,mocks,mobs,mizz,mites,mistresses,misspent,misinterpretation,mishka,miscarry,minuses,minotaur,minoan,mindee,mimicking,millisecond,milked,militants,migration,mightn't,mightier,mierzwiak,midwives,micronesia,microchips,microbes,michele's,mhmm,mezzanine,meyerling,meticulously,meteorite,metaphorical,mesmerizing,mershaw,meir,meg's,meecrob,medicate,medea,meddled,mckinnons,mcgewan,mcdunnough,mcats,mbien,maytag,mayors,matzah,matriarch,matic,mathematicians,masturbated,masselin,marxist,martyrs,martini's,martialed,marten's,marlboros,marksmanship,marishka,marion's,marinate,marge's,marchin,manifestations,manicured,mandela,mamma's,mame,malnourished,malk,malign,majorek,maidens,mahoney's,magnon,magnificently,maestro's,macking,machiavellian,macdougal,macchiato,macaws,macanaw,m'self,lynx,lynn's,lyman's,lydells,lusts,lures,luna's,ludwig's,lucite,lubricants,louise's,lopper,lopped,loneliest,lonelier,lomez,lojack,localized,locale,loath,lloyd's,literate,liquidated,liquefy,lippy,linguistic,limps,lillian's,likin,lightness,liesl,liebchen,licious,libris,libation,lhamo,lewis's,leveraged,leticia's,leotards,leopards,leonid,leonardo's,lemmings,leland's,legitimacy,leanin,laxatives,lavished,latka,later's,larval,lanyard,lans,lanky,landscaping,landmines,lameness,lakeshore,laddies,lackluster,lacerated,labored,laboratories,l'amour,kyrgyzstan,kreskin,krazy,kovitch,kournikova,kootchy,konoss,know's,knknow,knickety,knackety,kmart,klicks,kiwanis,kitty's,kitties,kites,kissable,kirby's,kingdoms,kindergartners,kimota,kimble's,kilter,kidnet,kidman,kid'll,kicky,kickbacks,kickback,kickass,khrushchev,kholokov,kewpie,kent's,keno,kendo,keller's,kcdm,katrina's,katra,kareoke,kaia,kafelnikov,kabob,ka's,junjun,jumba,julep,jordie,jondy,jolson,jinnah,jeweler's,jerkin,jenoff,jefferson's,jaye's,jawbone,janitorial,janiro,janie's,iron's,ipecac,invigorated,inverted,intruded,intros,intravenously,interruptus,interrogations,interracial,interpretive,internment,intermediate,intermediary,interject,interfacing,interestin,insuring,instilled,instantaneous,insistence,insensitivity,inscrutable,inroads,innards,inlaid,injector,initiatives,inhe,ingratitude,infuriates,infra,informational,infliction,infighting,induction,indonesian,indochina,indistinguishable,indicators,indian's,indelicate,incubators,incrimination,increments,inconveniencing,inconsolable,incite,incestuous,incas,incarnation,incarcerate,inbreeding,inaccessible,impudence,impressionists,implemented,impeached,impassioned,impacts,imipenem,idling,idiosyncrasies,icicle,icebreaker,icebergs,i'se,hyundai,hypotensive,hydrochloride,huuh,hushed,humus,humph,hummm,hulking,hubcaps,hubald,http,howya,howbout,how'll,houseguests,housebroken,hotwire,hotspots,hotheaded,horticulture,horrace,horde,horace's,hopsfield,honto,honkin,honeymoons,homophobia,homewrecker,hombres,hollow's,hollers,hollerin,hokkaido,hohh,hogwarts,hoedown,hoboes,hobbling,hobble,hoarse,hinky,himmler,hillcrest,hijacking,highlighters,hiccup,hibernation,hexes,heru'ur,hernias,herding,heppleman,henderson's,hell're,heine's,heighten,heheheheheh,heheheh,hedging,heckling,heckled,heavyset,heatshield,heathens,heartthrob,headpiece,headliner,he'p,hazelnut,hazards,hayseed,haveo,hauls,hattie's,hathor's,hasten,harriers,harridan,harpoons,harlin's,hardens,harcesis,harbouring,hangouts,hangman,handheld,halkein,haleh,halberstam,hairpin,hairnet,hairdressers,hacky,haah,haaaa,h'yah,gyms,gusta,gushy,gusher,gurgling,gunnery,guilted,guilt's,gruel,grudging,grrrrrr,grouse,grossing,grosses,groomsmen,griping,gretchen's,gregorian,gray's,gravest,gratified,grated,graphs,grandad,goulash,goopy,goonies,goona,goodman's,goodly,goldwater,godliness,godawful,godamn,gobs,gob's,glycerin,glutes,glowy,glop,globetrotters,glimpsed,glenville,glaucoma,girlscout,giraffes,gimp,gilbey,gil's,gigglepuss,ghora,gestating,geologists,geographically,gelato,gekko's,geishas,geek's,gearshift,gear's,gayness,gasped,gaslighting,garretts,garba,gams,gags,gablyczyck,g'head,fungi,fumigating,fumbling,fulton's,fudged,fuckwad,fuck're,fuchsia,fruition,freud's,fretting,freshest,frenchies,freezers,fredrica,fraziers,francesca's,fraidy,foxholes,fourty,fossilized,forsake,formulate,forfeits,foreword,foreclosed,foreal,foraging,footsies,focussed,focal,florists,flopped,floorshow,floorboard,flinching,flecks,flavours,flaubert,flatware,flatulence,flatlined,flashdance,flail,flagging,fizzle,fiver,fitzy,fishsticks,finster,finetti,finelli,finagle,filko,filipino,figurines,figurative,fifi,fieldstone,fibber,fiance's,feuds,feta,ferrini,female's,feedin,fedora,fect,feasting,favore,fathering,farrouhk,farmin,far's,fanny's,fajita,fairytale,fairservice,fairgrounds,fads,factoid,facet,facedown,fabled,eyeballin,extortionist,exquisitely,exporting,explicitly,expenditures,expedited,expands,exorcise,existentialist,exhaustive,execs,exculpatory,excommunicated,exacerbate,everthing,eventuality,evander,eustace,euphoric,euphemisms,eton,esto,estimation,estamos,establishes,erred,environmentalist,entrepreneurial,entitle,enquiries,enormity,engages,enfants,enen,endive,end's,encyclopedias,emulating,emts,employee's,emphasized,embossed,embittered,embassies,eliot,elicit,electrolyte,ejection,effortless,effectiveness,edvard,educators,edmonton's,ecuador,ectopic,ecirc,easely,earphones,earmarks,earmarked,earl's,dysentery,dwindling,dwight's,dweller,dusky,durslar,durned,dunois,dunking,dunked,dumdum,dullard,dudleys,duce,druthers,druggist,drug's,drossos,drosophila,drooled,driveways,drippy,dreamless,drawstring,drang,drainpipe,dragoons,dozing,down's,dour,dougie's,dotes,dorsal,dorkface,doorknobs,doohickey,donnell's,donnatella,doncha,don's,dominates,domicile,dokos,dobermans,djez,dizzying,divola,dividends,ditsy,distaste,disservice,disregarded,dispensed,dismay,dislodged,dislodge,disinherit,disinformation,discrete,discounting,disciplines,disapproved,dirtball,dinka,dimly,dilute,dilucca's,digesting,diello,diddling,dictatorships,dictators,diagonal,diagnostician,devours,devilishly,detract,detoxing,detours,detente,destructs,desecrated,descends,derris,deplore,deplete,depicts,depiction,depicted,denver's,denounce,demure,demolitions,demean,deluge,dell's,delish,deliberation,delbruck,delaford,deities,degaulle,deftly,deft,deformity,deflate,definatly,defense's,defector,deducted,decrypted,decontamination,decker's,decapitate,decanter,deadline's,dardis,danger's,dampener,damme,daddy'll,dabbling,dabbled,d'etre,d'argent,d'alene,d'agnasti,czechs,czechoslovakian,cyrillic,cymbal,cyberdyne,cutoffs,cuticle,cut's,curvaceous,curiousity,curfew's,culturally,cued,cubby,cruised,crucible,crowing,crowed,croutons,cropped,croaker,cristobel's,criminy,crested,crescentis,cred,cream's,crashers,crapola,cranwell,coverin,cousteau,courtrooms,counterattack,countenance,counselor's,cottages,cosmically,cosign,cosa,corroboration,corresponds,correspond,coroners,coro,cornflakes,corbett's,copy's,copperpot,copperhead,copacetic,coordsize,convulsing,contradicted,contract's,continuation,consults,consultations,constraints,conjures,congenial,confluence,conferring,confederation,condominium,concourse,concealer,compulsory,complexities,comparatively,compactor,commodities,commercialism,colleague's,collaborator,cokey,coiled,cognizant,cofell's,cobweb,co's,cnbc,clyde's,clunkers,clumsily,clucking,cloves,cloven,cloths,clothe,clop,clods,clocking,clings,climbers,clef,clearances,clavicle,claudia's,classless,clashing,clanking,clanging,clamping,civvies,citywide,citing,circulatory,circuited,circ,chung's,chronisters,chromic,choppy,choos,chongo,chloroformed,chilton's,chillun,chil,chicky,cheetos,cheesed,chatterbox,charlies,chaperoned,channukah,chamberlain's,chairman's,chaim,cessation,cerebellum,centred,centerpieces,centerfold,cellars,ceecee,ccedil,cavorting,cavemen,cavaliers,cauterized,caustic,cauldwell,catting,cathy's,caterine,castor's,cassiopeia,cascade's,carves,cartwheel,cartridges,carpeted,carob,carlsbad,caressing,carelessly,careening,carcinoma,capricious,capitalistic,capillaries,capes,candle's,candidly,canaan,camaraderie,calumet,callously,calligraphy,calfskin,cake's,caddies,cabinet's,buzzers,buttholes,butler's,busywork,busses,burps,burgomeister,buoy,bunny's,bunkhouse,bungchow,bulkhead,builders,bugler,buffets,buffed,buckaroo's,brutish,brusque,browser,bronchitis,bromden,brolly,brody's,broached,brewskis,brewski,brewin,brewers,brean,breadwinner,brana,brackets,bozz,bountiful,bounder,bouncin,bosoms,borgnine,bopping,bootlegs,booing,bons,boneyard,bombosity,bolting,bolivia,boilerplate,boba,bluey,blowback,blouses,bloodsuckers,bloodstained,blonde's,bloat,bleeth,blazed,blaine's,blackhawk,blackface,blackest,blackened,blacken,blackballed,blabs,blabbering,birdbrain,bipartisanship,biodegradable,binghamton,biltmore,billiards,bilked,big'uns,bidwell's,bidet,bessie's,besotted,beset,berth,bernheim,benson's,beni,benegas,bendiga,belushi,beltway,bellboys,belittling,belinda's,behinds,behemoth,begone,beeline,beehive,bedsheets,beckoning,beaute,beaudine,beastly,beachfront,be's,bauk,bathes,batak,bastion,baser,baseballs,barker's,barber's,barbella,bans,bankrolling,bangladesh,bandaged,bamba,bally's,bagpipe,bagger,baerly,backlog,backin,babying,azkaban,ayatollah,axes,awwwww,awakens,aviary,avery's,autonomic,authorizes,austero,aunty,augustine's,attics,atreus,astronomers,astounded,astonish,assertion,asserting,assailants,asha's,artemus,arses,arousal,armin,arintero,argon's,arduous,archers,archdiocese,archaeology,arbitrarily,ararat,appropriated,appraiser,applicable,apathetic,anybody'd,anxieties,anwar's,anticlimactic,antar,ankle's,anima,anglos,angleman,anesthetist,androscoggin,andromeda,andover,andolini,andale,anan,amway,amuck,amphibian,amniocentesis,amnesiac,ammonium,americano,amara,alway,alvah,alum,altruism,alternapalooza,alphabetize,alpaca,almanac,ally's,allus,alluded,allocation,alliances,allergist,alleges,alexandros,alec's,alaikum,alabam,akimbo,airy,ahab's,agoraphobia,agides,aggrhh,agatha's,aftertaste,affiliations,aegis,adoptions,adjuster,addictions,adamantium,acumen,activator,activates,acrylic,accomplishes,acclaimed,absorbs,aberrant,abbu,aarp,aaaaargh,aaaaaaaaaaaaa,a'ight,zucchini,zoos,zookeeper,zirconia,zippers,zequiel,zephyr's,zellary,zeitgeist,zanuck,zambia,zagat,ylang,yielded,yes'm,yenta,yegg,yecchh,yecch,yayo,yawp,yawns,yankin,yahdah,yaaah,y'got,xeroxed,wwooww,wristwatch,wrangled,wouldst,worthiness,wort,worshiping,worsen,wormy,wormtail,wormholes,woosh,woodworking,wonka,womens,wolverines,wollsten,wolfing,woefully,wobbling,witter's,wisp,wiry,wire's,wintry,wingding,windstorm,windowtext,wiluna,wilting,wilted,willick,willenholly,wildflowers,wildebeest,wilco,wiggum,wields,widened,whyyy,whoppers,whoaa,whizzing,whizz,whitest,whitefish,whistled,whist,whinny,whereupon,whereby,wheelies,wheaties,whazzup,whatwhatwhaaat,whato,whatdya,what'dya,whar,whacks,wexler's,wewell,wewe,wetsuit,wetland,westport,welluh,weight's,weeps,webpage,waylander,wavin,watercolors,wassail,wasnt,warships,warns,warneford,warbucks,waltons,wallbanger,waiving,waitwait,vowing,voucher,vornoff,vork,vorhees,voldemort,vivre,vittles,vishnu,vips,vindaloo,videogames,victors,vicky's,vichyssoise,vicarious,vet's,vesuvius,verve,verguenza,venturing,ventura's,venezuelan,ven't,velveteen,velour,velociraptor,vegetation,vaudeville,vastness,vasectomies,vapors,vanderhof,valmont,validates,valiantly,valerian,vacuums,vaccines,uzbekistan,usurp,usernum,us'll,urinals,unyielding,unwillingness,unvarnished,unturned,untouchables,untangled,unsecured,unscramble,unreturned,unremarkable,unregistered,unpublished,unpretentious,unopposed,unnerstand,unmade,unlicensed,unites,union's,uninhabited,unimpeachable,unilateral,unicef,unfolded,unfashionable,undisturbed,underwriting,underwrite,underlining,underling,underestimates,underappreciated,undamaged,uncouth,uncork,uncontested,uncommonly,unclog,uncircumcised,unchallenged,uncas,unbuttoning,unapproved,unamerican,unafraid,umpteen,umhmm,uhwhy,uhmm,ughuh,ughh,ufo's,typewriters,twitches,twitched,twirly,twinkling,twink,twinges,twiddling,twiddle,tutored,tutelage,turners,turnabout,ture,tunisian,tumultuous,tumour,tumblin,tryed,truckin,trubshaw's,trowel,trousseau,trivialize,trifles,tribianni,trib,triangulation,trenchcoat,trembled,traumatize,transplanted,translations,transitory,transients,transfuse,transforms,transcribing,transcend,tranq,trampy,traipsed,trainin,trail's,trafalgar,trachea,traceable,touristy,toughie,totality,totaling,toscanini,tortola,tortilla,tories,toreador,tooo,tonka,tommorrow,tollbooth,tollans,toidy,togs,togas,tofurkey,toddling,toddies,tobruk,toasties,toadstool,to've,tive,tingles,timin,timey,timetables,tightest,tide's,tibetans,thunderstorms,thuggee,thrusting,thrombus,throes,throated,thrifty,thoroughbred,thornharts,thinnest,thicket,thetas,thesulac,tethered,testimonial,testaburger,tersenadine,terrif,teresa's,terdlington,tepui,tenured,tentacle,temping,temperance,temp's,teller's,televisions,telefono,tele,teddies,tector,taxidermy,taxi's,taxation,tastebuds,tasker's,tartlets,tartabull,tard,tar'd,tantamount,tans,tangy,tangles,tamer,talmud,taiwan's,tabula,tabletops,tabithia,tabernacle,szechwan,syrian,synthedyne,synopsis,synonyms,swaps,swahili,svenjolly,svengali,suvs,sush,survivalists,surmise,surfboards,surefire,suprise,supremacists,suppositories,supervisors,superstore,supermen,supercop,supercilious,suntac,sunburned,summercliff,sullied,suite's,sugared,sufficiency,suerte,suckle,sucker's,sucka,succumbing,subtleties,substantiated,subsidiaries,subsides,subliminal,subhuman,stst,strowman,stroked,stroganoff,strikers,strengthening,streetlight,straying,strainer,straighter,straightener,storytelling,stoplight,stockade,stirrups,stink's,sting's,stimulates,stifler's,stewing,stetson's,stereotyping,ster,stepmommy,stephano,steeped,statesman,stashing,starshine,stand's,stamping,stamford,stairwells,stabilization,squatsie,squandering,squalid,squabbling,squab,sprinkling,spring's,spreader,spongy,spongebob,spokeswoman,spokesmen,splintered,spittle,spitter,spiced,spews,spendin,spect,speckled,spearchucker,spatulas,sparse,sparking,spares,spaceboy,soybeans,southtown,southside,southport,southland,soused,sotheby's,soshi,sorter,sorrowful,sorceress,sooth,songwriters,some'in,solstice,soliloquy,sods,sodomized,sode,sociologist,sobriki,soaping,snows,snowcone,snowcat,snitching,snitched,sneering,snausages,snaking,smoothed,smoochies,smolensk,smarten,smallish,slushy,slurring,sluman,slobber,slithers,slippin,sleuthing,sleeveless,slade's,skinner's,skinless,skillfully,sketchbook,skagnetti,sista,sioux,sinning,sinjin,singularly,sinewy,sinclair's,simultaneous,silverlake,silva's,siguto,signorina,signature's,signalling,sieve,sids,sidearms,shyster,shying,shunning,shtud,shrooms,shrieks,shorting,shortbread,shopkeepers,shmuck,shmancy,shizzit,shitheads,shitfaced,shitbag,shipmates,shiftless,sherpa,shelving,shelley's,sheik,shedlow,shecky,sheath,shavings,shatters,sharifa,shampoos,shallots,shafter,sha'nauc,sextant,settlers,setter,seti,serviceable,serrated,serbian,sequentially,sepsis,senores,sendin,semis,semanski,seller's,selflessly,selects,selectively,seinfelds,seers,seer's,seeps,see's,seductress,sedimentary,sediment,second's,secaucus,seater,seashore,sealant,seaborn's,scuttling,scusa,sculpting,scrunched,scrimmage,screenwriter,scotsman,scorer,sclerosis,scissorhands,schreber,scholastic,schmancy,schlong,scathing,scandinavia,scamps,scalloped,savoir,savagery,sasha's,sarong,sarnia,santangel,samool,samba,salons,sallow,salino,safecracker,sadism,saddles,sacrilegious,sabrini,sabath,s'aright,ruttheimer,russia's,rudest,rubbery,rousting,rotarian,roslin,rosey,rosa's,roomed,romari,romanticism,romanica,rolltop,rolfski,rod's,rockland,rockettes,roared,riverfront,rinpoche,ringleader,rims,riker's,riffing,ricans,ribcage,riana's,rhythmic,rhah,rewired,retroactive,retrial,reting,reticulum,resuscitated,resuming,restricting,restorations,restock,resilience,reservoirs,resembled,resale,requisitioned,reprogrammed,reproducing,repressive,replicant,repentant,repellant,repays,repainting,reorganization,renounced,renegotiating,rendez,renamed,reminiscent,remem,remade,relived,relinquishes,reliant,relearn,relaxant,rekindling,rehydrate,regulatory,regiments,regan's,refueled,refrigeration,refreshingly,reflector,refine,refilling,reexamine,reeseman,redness,redirected,redeemable,redder,redcoats,rectangles,recoup,reconstituted,reciprocated,recipients,recessed,recalls,rebounded,reassessing,realy,reality's,realisation,realer,reachin,re'kali,rawlston,ravages,rattlers,rasa,raps,rappaports,ramoray,ramming,ramadan,raindrops,rahesh,radioactivity,radials,racists,racin,rabartu,quotas,quintus,quiches,ques,queries,quench,quel,quarrels,quarreling,quaintly,quagmire,quadrants,pylon,putumayo,put'em,purifier,purified,pureed,punitis,pullout,pukin,pudgy,puddings,puckering,puccini,pterodactyl,psychodrama,pseudonym,psats,proximal,providers,protestations,protectee,prospered,prosaic,propositioned,prolific,progressively,proficiency,professions,prodigious,proclivity,probed,probabilities,pro's,prison's,printouts,principally,prig,prevision,prevailing,presumptive,pressers,preset,presentations,preposition,preparatory,preliminaries,preempt,preemie,predetermined,preconceptions,precipitate,prancan,powerpuff,powerfully,potties,potters,potpie,poseur,portraying,portico,porthole,portfolios,poops,pooping,pone,pomp,pomade,polyps,polymerized,politic,politeness,polisher,polack,pokers,pocketknife,poatia,plebeian,playgroup,platonically,plato's,platitude,platelet,plastering,plasmapheresis,plaques,plaids,placemats,place's,pizzazz,piracy,pipelines,pip's,pintauro,pinstripes,pinpoints,pinkner,pincer,pimento,pillaged,pileup,pilates,pigment,pigmen,pieter,pieeee,picturesque,piano's,phrasing,phrased,photojournalist,photocopies,phosphorus,phonograph,phoebes,phoe,philistines,philippine,philanderer,pheromone,phasers,pharaoh's,pfff,pfeffernuesse,petrov,petitions,peterman's,peso,pervs,perspire,personify,perservere,perplexed,perpetrating,perp's,perkiness,perjurer,periodontist,perfunctory,performa,perdido,percodan,penzance,pentameter,pentagon's,pentacle,pensive,pensione,pennybaker,pennbrooke,penhall,pengin,penetti,penetrates,pegs,pegnoir,peeve,peephole,pectorals,peckin,peaky,peaksville,payout,paxcow,paused,pauline's,patted,pasteur,passe,parochial,parkland,parkishoff,parkers,pardoning,paraplegic,paraphrasing,parapet,paperers,papered,panoramic,pangs,paneling,pander,pandemonium,pamela's,palooza,palmed,palmdale,palisades,palestinian,paleolithic,palatable,pakistanis,pageants,packaged,pacify,pacified,oyes,owwwww,overthrown,overt,oversexed,overriding,overrides,overpaying,overdrawn,overcompensate,overcomes,overcharged,outtakes,outmaneuver,outlying,outlining,outfoxed,ousted,oust,ouse,ould,oughtn't,ough,othe,ostentatious,oshun,oscillation,orthopedist,organizational,organization's,orca,orbits,or'derves,opting,ophthalmologist,operatic,operagirl,oozes,oooooooh,only's,onesie,omnis,omelets,oktoberfest,okeydoke,ofthe,ofher,obstetrics,obstetrical,obeys,obeah,o'rourke,o'reily's,o'henry,nyquil,nyanyanyanyah,nuttin,nutsy,nutrients,nutball,nurhachi,numbskull,nullifies,nullification,nucking,nubbin,ntnt,nourished,notoriety,northland,nonspecific,nonfiction,noing,noinch,nohoho,nobler,nitwits,nitric,nips,nibs,nibbles,newton's,newsprint,newspaperman,newspaper's,newscaster,never's,neuter,neuropathy,netherworld,nests,nerf,neee,neediest,neath,navasky,naturalization,nat's,narcissists,napped,nando,nags,nafta,myocardial,mylie's,mykonos,mutilating,mutherfucker,mutha,mutations,mutates,mutate,musn't,muskets,murray's,murchy,mulwray's,multitasking,muldoon's,mujeeb,muerte,mudslinging,muckraking,mrsa,mown,mousie,mousetrap,mourns,mournful,motivating,motherland,motherf,mostro,mosaic,morphing,morphate,mormons,moralistic,moored,moochy,mooching,monotonous,monorail,monopolize,monogram,monocle,molehill,molar,moland,mofet,modestly,mockup,moca,mobilizing,mitzvahs,mitre,mistreating,misstep,misrepresentation,misjudge,misinformation,miserables,misdirected,miscarriages,minute's,miniskirt,minimizing,mindwarped,minced,milquetoast,millimeters,miguelito,migrating,mightily,midsummer,midstream,midriff,mideast,midas,microbe,metropolis,methuselah,mesdames,mescal,mercury's,menudo,menu's,mentors,men'll,memorial's,memma,melvins,melanie's,megaton,megara,megalomaniac,meeee,medulla,medivac,mediate,meaninglessness,mcnuggets,mccarthyism,maypole,may've,mauve,maturing,matter's,mateys,mate's,mastering,masher,marxism,martimmy's,marshack,marseille,markles,marketed,marketable,mansiere,manservant,manse,manhandling,manco's,manana,maman,malnutrition,mallomars,malkovich's,malcontent,malaise,makeup's,majesties,mainsail,mailmen,mahandra,magnolias,magnified,magev,maelstrom,madcap,mack's,machu,macfarlane's,macado,ma'm,m'boy,m'appelle,lying's,lustrous,lureen,lunges,lumped,lumberyard,lulled,luego,lucks,lubricated,loveseat,loused,lounger,loski,lorre,loora,looong,loonies,lonnegan's,lola's,loire,loincloth,logistical,lofts,lodges,lodgers,lobbing,loaner,livered,lithuania,liqueur,linkage,ling's,lillienfield's,ligourin,lighter's,lifesaving,lifeguards,lifeblood,library's,liberte,liaisons,liabilities,let'em,lesbianism,lenny's,lennart,lence,lemonlyman,legz,legitimize,legalized,legalization,leadin,lazars,lazarro,layoffs,lawyering,lawson's,lawndale's,laugher,laudanum,latte's,latrines,lations,laters,lastly,lapels,lansing's,lan's,lakefront,lait,lahit,lafortunata,lachrymose,laborer,l'italien,l'il,kwaini,kuzmich,kuato's,kruczynski,kramerica,krakatoa,kowtow,kovinsky,koufax,korsekov,kopek,knoxville,knowakowski,knievel,knacks,klux,klein's,kiran,kiowas,kinshasa,kinkle's,kincaid's,killington,kidnapper's,kickoff,kickball,khan's,keyworth,keymaster,kevie,keveral,kenyons,keggers,keepsakes,kechner,keaty,kavorka,katmandu,katan's,karajan,kamerev,kamal's,kaggs,juvi,jurisdictional,jujyfruit,judeo,jostled,joni's,jonestown,jokey,joists,joint's,johnnie's,jocko,jimmied,jiggled,jig's,jests,jessy,jenzen,jensen's,jenko,jellyman,jeet,jedediah,jealitosis,jaya's,jaunty,jarmel,jankle,jagoff,jagielski,jacky,jackrabbits,jabbing,jabberjaw,izzat,iuml,isolating,irreverent,irresponsibly,irrepressible,irregularity,irredeemable,investigator's,inuvik,intuitions,intubated,introspective,intrinsically,intra,intimates,interval,intersections,interred,interned,interminable,interloper,intercostal,interchange,integer,intangible,instyle,instrumentation,instigate,instantaneously,innumerable,inns,injustices,ining,inhabits,ings,ingrown,inglewood,ingestion,ingesting,infusion,infusing,infringing,infringe,inflection,infinitum,infact,inexplicably,inequities,ineligible,industry's,induces,indubitably,indisputable,indirect,indescribably,independents,indentation,indefinable,incursion,incontrovertible,inconsequential,incompletes,incoherently,inclement,inciting,incidentals,inarticulate,inadequacies,imprudent,improvisation,improprieties,imprison,imprinted,impressively,impostors,importante,implicit,imperious,impale,immortalized,immodest,immobile,imbued,imbedded,imbecilic,illustrates,illegals,iliad,idn't,idiom,icons,hysteric,hypotenuse,hygienic,hyeah,hushpuppies,hunhh,hungarians,humpback,humored,hummed,humiliates,humidifier,huggy,huggers,huckster,html,hows,howlin,hoth,hotbed,hosing,hosers,horsehair,homegrown,homebody,homebake,holographic,holing,holies,hoisting,hogwallop,hogan's,hocks,hobbits,hoaxes,hmmmmm,hisses,hippos,hippest,hindrance,hindi,him's,hillbillies,hilarity,highball,hibiscus,heyday,heurh,hershey's,herniated,hermaphrodite,hera,hennifer,hemlines,hemline,hemery,helplessness,helmsley,hellhound,heheheheh,heey,heeey,hedda,heck's,heartbeats,heaped,healers,headstart,headsets,headlong,headlining,hawkland,havta,havana's,haulin,hastened,hasn,harvey'll,harpo,hardass,haps,hanta,hansom,hangnail,handstand,handrail,handoff,hander,han's,hamlet's,hallucinogen,hallor,halitosis,halen,hahah,hado,haberdashery,gypped,guy'll,guni,gumbel,gulch,gues,guerillas,guava,guatemalan,guardrail,guadalajara,grunther,grunick,grunemann's,growers,groppi,groomer,grodin,gris,gripes,grinds,grimaldi's,grifters,griffins,gridlock,gretch,greevey,greasing,graveyards,grandkid,grainy,graced,governed,gouging,gordie's,gooney,googly,golfers,goldmuff,goldenrod,goingo,godly,gobbledygook,gobbledegook,goa'uld's,glues,gloriously,glengarry,glassware,glamor,glaciers,ginseng,gimmicks,gimlet,gilded,giggly,gig's,giambetti,ghoulish,ghettos,ghandi,ghali,gether,get's,gestation,geriatrics,gerbils,gerace's,geosynchronous,georgio,geopolitical,genus,gente,genital,geneticist,generation's,generates,gendarme,gelbman,gazillionth,gayest,gauging,gastro,gaslight,gasbag,garters,garish,garas,garages,gantu,gangy,gangly,gangland,gamer,galling,galilee,galactica's,gaiety,gadda,gacy,futuristic,futs,furrowed,funny's,funnies,funkytown,fundraisers,fundamentalist,fulcrum,fugimotto,fuente,fueling,fudging,fuckup,fuckeen,frutt's,frustrates,froufrou,froot,frontiers,fromberge,frog's,frizzies,fritters,fringes,frightfully,frigate,friendliest,freeloading,freelancing,fredonia,freakazoid,fraternization,frankfurter,francine's,franchises,framers,fostered,fortune's,fornication,fornicating,formulating,formations,forman's,forgeries,forethought,forage,footstool,foisting,focussing,focking,foal,flutes,flurries,fluffed,flourished,florida's,floe,flintstones,fleischman's,fledgling,fledermaus,flayed,flay,flawlessly,flatters,flashbang,flapped,flanking,flamer,fission,fishies,firmer,fireproof,fireman's,firebug,firebird,fingerpainting,finessed,findin,financials,finality,fillets,fighter's,fiercest,fiefdom,fibrosis,fiberglass,fibbing,feudal,festus,fervor,fervent,fentanyl,fenelon,fenders,fedorchuk,feckless,feathering,fearsome,fauna,faucets,farmland,farewells,fantasyland,fanaticism,faltered,fallacy,fairway,faggy,faberge,extremism,extorting,extorted,exterminating,exhumation,exhilaration,exhausts,exfoliate,exemptions,excesses,excels,exasperating,exacting,evoked,evocative,everyman,everybody'd,evasions,evangelical,establishments,espressos,esoteric,esmail,errrr,erratically,eroding,erode,ernswiler,episcopalian,ephemeral,epcot,entrenched,entomology,entomologist,enthralled,ensuing,ensenada,enriching,enrage,enlisting,enhancer,enhancements,endorsing,endear,encrusted,encino,enacted,employing,emperors,empathic,embodied,embezzle,embarked,emanates,elton's,eloquence,eloi,elmwood,elliptical,ellenor's,elemental,electricians,electing,elapsed,eking,egomaniacal,eggo,egging,effected,effacing,eeww,edits,editor's,edging,ectoplasm,economical,ecch,eavesdropped,eastbound,earwig,e'er,durable,dunbar's,dummkopf,dugray,duchaisne,duality,drusilla's,drunkard,drudge,drucilla's,droop,droids,drips,dripped,dribbles,drew's,dressings,drazens,downy,downsize,downpour,dowager,dote,dosages,dorothy's,doppler,doppelganger,dopes,doorman's,doohicky,doof,dontcha,donovon's,doneghy,domi,domes,dojo,documentaries,divinity,divining,divest,diuretics,diuretic,distrustful,distortions,dissident,disrupts,disruptions,disproportionate,dispensary,disparity,dismemberment,dismember,disinfect,disillusionment,disheartening,discriminated,discourteous,discotheque,discolored,disassembled,disabling,dirtiest,diphtheria,dinks,dimpled,digg,diffusion,differs,didya,dickweed,dickwad,dickson's,diatribes,diathesis,diabetics,dewars,deviants,detrimental,detonates,detests,detestable,detaining,despondent,desecration,descriptive,derision,derailing,deputized,depressors,depo,depicting,depict,dependant,dentures,denominators,demur,demonstrators,demonology,delts,dellarte,delinquency,delacour,deflated,definitively,defib,defected,defaced,deeded,decorators,debit,deaqon,davola,datin,dasilva's,darwinian,darling's,darklighters,dandelions,dandelion,dancer's,dampened,dame's,damaskinos,dama,dalrimple,dagobah,dack,d'peshu,d'hoffryn,d'astier,cystic,cynics,cybernetic,cutoff,cutesy,cutaway,customarily,curtain's,cursive,curmudgeon,curdle,cuneiform,cultivated,culpability,culo,cuisinart,cuffing,crypts,cryptid,cryogenic,crux,crunched,crumblers,crudely,crosscheck,croon,crissake,crime's,cribbage,crevasse,creswood,creepo,creases,creased,creaky,cranks,cran,craftsmen,crafting,crabgrass,cowboy's,coveralls,couple'a,councilors,coughs,cotton's,cosmology,coslaw,corresponded,corporeal,corollary,cornucopia,cornering,corks,cordoned,coolly,coolin,cooley's,coolant,cookbooks,converging,contrived,contrite,contributors,contradictory,contra,contours,contented,contenders,contemplated,contact's,constrictor,congressman's,congestion,confrontations,confound,conform,confit,confiscating,conferred,condoned,conditioners,concussions,concentric,conceding,coms,comprised,comprise,comprendo,composers,commuted,commercially,commentator,commentaries,commemorating,commander's,comers,comedic,combustible,combusted,columbo,columbia's,colourful,colonials,collingswood,coliseum,coldness,cojones,coitus,cohesive,cohesion,cohen's,coffey's,codicil,cochran's,coasting,clydesdale,cluttering,clunker,clunk,clumsiness,clumps,clotted,clothesline,clinches,clincher,cleverness,clench,clein,cleave,cleanses,claymores,clarisse,clarissa's,clammed,civilisation,ciudad,circumvent,circulated,circuit's,cinnamon's,cind,church's,chugging,chronically,christsakes,chris's,choque,chompers,choco,chiseling,chirpy,chirp,chinks,chingachgook,chigger,chicklet,chickenpox,chickadee,chewin,chessboard,cherub,chemo's,chauffeur's,chaucer,chariots,chargin,characterizing,chanteuse,chandeliers,chamdo,chalupa,chagrined,chaff,certs,certify,certification,certainties,cerreno,cerebrum,cerebro,century's,centennial,censured,cemetary,cellist,celine's,cedar's,cayo,caterwauling,caterpillars,categorized,catchers,cataclysmic,cassidy's,casitas,casino's,cased,carvel,cartographers,carting,cartels,carriages,carrear,carr's,carolling,carolinas,carolers,carnie,carne,cardiovascular,cardiogram,carbuncle,caramba,capulets,capping,canyons,canines,candaules,canape,canadiens,campaigned,cambodian,camberwell,caldecott,calamitous,caff,cadillacs,cachet,cabeza,cabdriver,byzantium,buzzkill,buzzards,buzz's,buyer's,butai,bustling,businesswomen,bunyan,bungled,bumpkins,bummers,bulletins,bullet's,bulldoze,bulbous,bug's,buffybot,budgeted,budda,bubut,bubbies,brunei,brrrrr,brownout,brouhaha,bronzing,bronchial,broiler,broadening,briskly,briefcases,bricked,breezing,breeher,breckinridge,breakwater,breakable,breadstick,bravenet,braved,brass's,brandies,brandeis,branched,brainwaves,brainiest,braggart,bradlee,boys're,boys'll,boys'd,boyd's,boutonniere,bottle's,bossed,bosomy,bosnian,borans,boosts,boombox,bookshelves,bookmark,booklet,bookends,bontecou's,bongos,boneless,bone's,bond's,bombarding,bombarded,bollo,boinked,boink,boilers,bogart's,bobbo,bobbin,bluest,bluebells,blowjobs,bloodshot,blondie's,blockhead,blockbusters,blithely,blim,bleh,blather,blasters,blankly,bladders,blackhawks,blackbeard,bjorn,bitte,bippy,bios,biohazard,biogenetics,biochemistry,biochemist,bilingual,bilge,bigmouth,bighorn,bigglesworth,bicuspids,beususe,betaseron,besmirch,besieged,bernece,bergman's,bereavement,bentonville,benthic,benjie,benji's,benefactors,benchley,benching,bembe,bellyaching,bellhops,belie,beleaguered,being's,behrle,beginnin,begining,beenie,beefs,beechwood,bee's,bedbug,becau,beaverhausen,beakers,beacon's,bazillion,baudouin,bat's,bartlett's,barrytown,barringtons,baroque,baronet,barneys,barbs,barbers,barbatus,baptists,bankrupted,banker's,bamn,bambi's,ballon's,balinese,bakeries,bailiffs,backslide,baby'd,baaad,b'fore,awwwk,aways,awakes,averages,avengers,avatars,autonomous,automotive,automaton,automatics,autism,authoritative,authenticated,authenticate,aught,audition's,aubyn,attired,attagirl,atrophied,atonement,atherton's,asystole,astroturf,assimilated,assimilate,assertiveness,assemblies,assassin's,artiste,article's,artichokes,arsehole,arrears,arquillians,arnie's,aright,archenemy,arched,arcade's,aquatic,apps,appraise,applauded,appendages,appeased,apostle,apollo's,antwerp,antler,antiquity,antin,antidepressant,antibody,anthropologists,anthology,anthea,antagonism,ant's,anspaugh,annually,anka,angola,anesthetics,anda,ancients,anchoring,anaphylactic,anaheim,ana's,amtrak,amscray,amputated,amounted,americas,amended,ambivalence,amalio,amah,altoid,alriiight,alphabetized,alpena,alouette,allowable,allora,alliteration,allenwood,alleging,allegiances,aligning,algerians,alerts,alchemist,alcerro,alastor,airway's,airmen,ahaha,ah'm,agitators,agitation,aforethought,afis,aesthetics,aerospace,aerodynamics,advertises,advert,advantageous,admonition,administration's,adirondacks,adenoids,adebisi's,acupuncturist,acula,actuarial,activators,actionable,acme's,acknowledges,achmed,achingly,acetate,accusers,accumulation,accorded,acclimated,acclimate,absurdly,absorbent,absolvo,absolutes,absences,abraham's,aboriginal,ablaze,abdomenizer,aaaaaaaaah,aaaaaaaaaa,a'right".split(","))),
p("male_names",s("james,john,robert,michael,william,david,richard,charles,joseph,thomas,christopher,daniel,paul,mark,donald,george,kenneth,steven,edward,brian,ronald,anthony,kevin,jason,matthew,gary,timothy,jose,larry,jeffrey,frank,scott,eric,stephen,andrew,raymond,gregory,joshua,jerry,dennis,walter,patrick,peter,harold,douglas,henry,carl,arthur,ryan,roger,joe,juan,jack,albert,jonathan,justin,terry,gerald,keith,samuel,willie,ralph,lawrence,nicholas,roy,benjamin,bruce,brandon,adam,harry,fred,wayne,billy,steve,louis,jeremy,aaron,randy,eugene,carlos,russell,bobby,victor,ernest,phillip,todd,jesse,craig,alan,shawn,clarence,sean,philip,chris,johnny,earl,jimmy,antonio,danny,bryan,tony,luis,mike,stanley,leonard,nathan,dale,manuel,rodney,curtis,norman,marvin,vincent,glenn,jeffery,travis,jeff,chad,jacob,melvin,alfred,kyle,francis,bradley,jesus,herbert,frederick,ray,joel,edwin,don,eddie,ricky,troy,randall,barry,bernard,mario,leroy,francisco,marcus,micheal,theodore,clifford,miguel,oscar,jay,jim,tom,calvin,alex,jon,ronnie,bill,lloyd,tommy,leon,derek,darrell,jerome,floyd,leo,alvin,tim,wesley,dean,greg,jorge,dustin,pedro,derrick,dan,zachary,corey,herman,maurice,vernon,roberto,clyde,glen,hector,shane,ricardo,sam,rick,lester,brent,ramon,tyler,gilbert,gene,marc,reginald,ruben,brett,angel,nathaniel,rafael,edgar,milton,raul,ben,cecil,duane,andre,elmer,brad,gabriel,ron,roland,jared,adrian,karl,cory,claude,erik,darryl,neil,christian,javier,fernando,clinton,ted,mathew,tyrone,darren,lonnie,lance,cody,julio,kurt,allan,clayton,hugh,max,dwayne,dwight,armando,felix,jimmie,everett,ian,ken,bob,jaime,casey,alfredo,alberto,dave,ivan,johnnie,sidney,byron,julian,isaac,clifton,willard,daryl,virgil,andy,salvador,kirk,sergio,seth,kent,terrance,rene,eduardo,terrence,enrique,freddie,stuart,fredrick,arturo,alejandro,joey,nick,luther,wendell,jeremiah,evan,julius,donnie,otis,trevor,luke,homer,gerard,doug,kenny,hubert,angelo,shaun,lyle,matt,alfonso,orlando,rex,carlton,ernesto,pablo,lorenzo,omar,wilbur,blake,horace,roderick,kerry,abraham,rickey,ira,andres,cesar,johnathan,malcolm,rudolph,damon,kelvin,rudy,preston,alton,archie,marco,wm,pete,randolph,garry,geoffrey,jonathon,felipe,bennie,gerardo,ed,dominic,loren,delbert,colin,guillermo,earnest,benny,noel,rodolfo,myron,edmund,salvatore,cedric,lowell,gregg,sherman,devin,sylvester,roosevelt,israel,jermaine,forrest,wilbert,leland,simon,irving,owen,rufus,woodrow,kristopher,levi,marcos,gustavo,lionel,marty,gilberto,clint,nicolas,laurence,ismael,orville,drew,ervin,dewey,al,wilfred,josh,hugo,ignacio,caleb,tomas,sheldon,erick,frankie,darrel,rogelio,terence,alonzo,elias,bert,elbert,ramiro,conrad,noah,grady,phil,cornelius,lamar,rolando,clay,percy,dexter,bradford,merle,darin,amos,terrell,moses,irvin,saul,roman,darnell,randal,tommie,timmy,darrin,brendan,toby,van,abel,dominick,emilio,elijah,cary,domingo,aubrey,emmett,marlon,emanuel,jerald,edmond,emil,dewayne,otto,teddy,reynaldo,bret,jess,trent,humberto,emmanuel,stephan,louie,vicente,lamont,garland,micah,efrain,heath,rodger,demetrius,ethan,eldon,rocky,pierre,eli,bryce,antoine,robbie,kendall,royce,sterling,grover,elton,cleveland,dylan,chuck,damian,reuben,stan,leonardo,russel,erwin,benito,hans,monte,blaine,ernie,curt,quentin,agustin,jamal,devon,adolfo,tyson,wilfredo,bart,jarrod,vance,denis,damien,joaquin,harlan,desmond,elliot,darwin,gregorio,kermit,roscoe,esteban,anton,solomon,norbert,elvin,nolan,carey,rod,quinton,hal,brain,rob,elwood,kendrick,darius,moises,marlin,fidel,thaddeus,cliff,marcel,ali,raphael,bryon,armand,alvaro,jeffry,dane,joesph,thurman,ned,sammie,rusty,michel,monty,rory,fabian,reggie,kris,isaiah,gus,avery,loyd,diego,adolph,millard,rocco,gonzalo,derick,rodrigo,gerry,rigoberto,alphonso,ty,rickie,noe,vern,elvis,bernardo,mauricio,hiram,donovan,basil,nickolas,scot,vince,quincy,eddy,sebastian,federico,ulysses,heriberto,donnell,denny,gavin,emery,romeo,jayson,dion,dante,clement,coy,odell,jarvis,bruno,issac,dudley,sanford,colby,carmelo,nestor,hollis,stefan,donny,art,linwood,beau,weldon,galen,isidro,truman,delmar,johnathon,silas,frederic,irwin,merrill,charley,marcelino,carlo,trenton,kurtis,aurelio,winfred,vito,collin,denver,leonel,emory,pasquale,mohammad,mariano,danial,landon,dirk,branden,adan,numbers,clair,buford,german,bernie,wilmer,emerson,zachery,jacques,errol,josue,edwardo,wilford,theron,raymundo,daren,tristan,robby,lincoln,jame,genaro,octavio,cornell,hung,arron,antony,herschel,alva,giovanni,garth,cyrus,cyril,ronny,stevie,lon,kennith,carmine,augustine,erich,chadwick,wilburn,russ,myles,jonas,mitchel,mervin,zane,jamel,lazaro,alphonse,randell,major,johnie,jarrett,ariel,abdul,dusty,luciano,seymour,scottie,eugenio,mohammed,valentin,arnulfo,lucien,ferdinand,thad,ezra,aldo,rubin,royal,mitch,earle,abe,marquis,lanny,kareem,jamar,boris,isiah,emile,elmo,aron,leopoldo,everette,josef,eloy,dorian,rodrick,reinaldo,lucio,jerrod,weston,hershel,lemuel,lavern,burt,jules,gil,eliseo,ahmad,nigel,efren,antwan,alden,margarito,refugio,dino,osvaldo,les,deandre,normand,kieth,ivory,trey,norberto,napoleon,jerold,fritz,rosendo,milford,sang,deon,christoper,alfonzo,lyman,josiah,brant,wilton,rico,jamaal,dewitt,brenton,yong,olin,faustino,claudio,judson,gino,edgardo,alec,jarred,donn,trinidad,tad,porfirio,odis,lenard,chauncey,tod,mel,marcelo,kory,augustus,keven,hilario,bud,sal,orval,mauro,dannie,zachariah,olen,anibal,milo,jed,thanh,amado,lenny,tory,richie,horacio,brice,mohamed,delmer,dario,mac,jonah,jerrold,robt,hank,sung,rupert,rolland,kenton,damion,chi,antone,waldo,fredric,bradly,kip,burl,tyree,jefferey,ahmed,willy,stanford,oren,moshe,mikel,enoch,brendon,quintin,jamison,florencio,darrick,tobias,minh,hassan,giuseppe,demarcus,cletus,tyrell,lyndon,keenan,werner,theo,geraldo,columbus,chet,bertram,markus,huey,hilton,dwain,donte,tyron,omer,isaias,hipolito,fermin,chung,adalberto,jamey,teodoro,mckinley,maximo,sol,raleigh,lawerence,abram,rashad,emmitt,daron,chong,samual,otha,miquel,eusebio,dong,domenic,darron,wilber,renato,hoyt,haywood,ezekiel,chas,florentino,elroy,clemente,arden,neville,edison,deshawn,carrol,shayne,nathanial,jordon,danilo,claud,val,sherwood,raymon,rayford,cristobal,ambrose,titus,hyman,felton,ezequiel,erasmo,lonny,len,ike,milan,lino,jarod,herb,andreas,rhett,jude,douglass,cordell,oswaldo,ellsworth,virgilio,toney,nathanael,del,benedict,mose,hong,isreal,garret,fausto,asa,arlen,zack,modesto,francesco,manual,jae,gaylord,gaston,filiberto,deangelo,michale,granville,wes,malik,zackary,tuan,nicky,cristopher,antione,malcom,korey,jospeh,colton,waylon,von,hosea,shad,santo,rudolf,rolf,rey,renaldo,marcellus,lucius,kristofer,harland,arnoldo,rueben,leandro,kraig,jerrell,jeromy,hobert,cedrick,arlie,winford,wally,luigi,keneth,jacinto,graig,franklyn,edmundo,sid,leif,jeramy,willian,vincenzo,shon,michal,lynwood,jere,hai,elden,darell,broderick,alonso".split(","))),
p("female_names",s("mary,patricia,linda,barbara,elizabeth,jennifer,maria,susan,margaret,dorothy,lisa,nancy,karen,betty,helen,sandra,donna,carol,ruth,sharon,michelle,laura,sarah,kimberly,deborah,jessica,shirley,cynthia,angela,melissa,brenda,amy,anna,rebecca,virginia,kathleen,pamela,martha,debra,amanda,stephanie,carolyn,christine,marie,janet,catherine,frances,ann,joyce,diane,alice,julie,heather,teresa,doris,gloria,evelyn,jean,cheryl,mildred,katherine,joan,ashley,judith,rose,janice,kelly,nicole,judy,christina,kathy,theresa,beverly,denise,tammy,irene,jane,lori,rachel,marilyn,andrea,kathryn,louise,sara,anne,jacqueline,wanda,bonnie,julia,ruby,lois,tina,phyllis,norma,paula,diana,annie,lillian,emily,robin,peggy,crystal,gladys,rita,dawn,connie,florence,tracy,edna,tiffany,carmen,rosa,cindy,grace,wendy,victoria,edith,kim,sherry,sylvia,josephine,thelma,shannon,sheila,ethel,ellen,elaine,marjorie,carrie,charlotte,monica,esther,pauline,emma,juanita,anita,rhonda,hazel,amber,eva,debbie,april,leslie,clara,lucille,jamie,joanne,eleanor,valerie,danielle,megan,alicia,suzanne,michele,gail,bertha,darlene,veronica,jill,erin,geraldine,lauren,cathy,joann,lorraine,lynn,sally,regina,erica,beatrice,dolores,bernice,audrey,yvonne,annette,june,marion,dana,stacy,ana,renee,ida,vivian,roberta,holly,brittany,melanie,loretta,yolanda,jeanette,laurie,katie,kristen,vanessa,alma,sue,elsie,beth,jeanne,vicki,carla,tara,rosemary,eileen,terri,gertrude,lucy,tonya,ella,stacey,wilma,gina,kristin,jessie,natalie,agnes,vera,charlene,bessie,delores,melinda,pearl,arlene,maureen,colleen,allison,tamara,joy,georgia,constance,lillie,claudia,jackie,marcia,tanya,nellie,minnie,marlene,heidi,glenda,lydia,viola,courtney,marian,stella,caroline,dora,jo,vickie,mattie,maxine,irma,mabel,marsha,myrtle,lena,christy,deanna,patsy,hilda,gwendolyn,jennie,nora,margie,nina,cassandra,leah,penny,kay,priscilla,naomi,carole,olga,billie,dianne,tracey,leona,jenny,felicia,sonia,miriam,velma,becky,bobbie,violet,kristina,toni,misty,mae,shelly,daisy,ramona,sherri,erika,katrina,claire,lindsey,lindsay,geneva,guadalupe,belinda,margarita,sheryl,cora,faye,ada,natasha,sabrina,isabel,marguerite,hattie,harriet,molly,cecilia,kristi,brandi,blanche,sandy,rosie,joanna,iris,eunice,angie,inez,lynda,madeline,amelia,alberta,genevieve,monique,jodi,janie,kayla,sonya,jan,kristine,candace,fannie,maryann,opal,alison,yvette,melody,luz,susie,olivia,flora,shelley,kristy,mamie,lula,lola,verna,beulah,antoinette,candice,juana,jeannette,pam,kelli,whitney,bridget,karla,celia,latoya,patty,shelia,gayle,della,vicky,lynne,sheri,marianne,kara,jacquelyn,erma,blanca,myra,leticia,pat,krista,roxanne,angelica,robyn,adrienne,rosalie,alexandra,brooke,bethany,sadie,bernadette,traci,jody,kendra,nichole,rachael,mable,ernestine,muriel,marcella,elena,krystal,angelina,nadine,kari,estelle,dianna,paulette,lora,mona,doreen,rosemarie,desiree,antonia,janis,betsy,christie,freda,meredith,lynette,teri,cristina,eula,leigh,meghan,sophia,eloise,rochelle,gretchen,cecelia,raquel,henrietta,alyssa,jana,gwen,jenna,tricia,laverne,olive,tasha,silvia,elvira,delia,kate,patti,lorena,kellie,sonja,lila,lana,darla,mindy,essie,mandy,lorene,elsa,josefina,jeannie,miranda,dixie,lucia,marta,faith,lela,johanna,shari,camille,tami,shawna,elisa,ebony,melba,ora,nettie,tabitha,ollie,winifred,kristie,marina,alisha,aimee,rena,myrna,marla,tammie,latasha,bonita,patrice,ronda,sherrie,addie,francine,deloris,stacie,adriana,cheri,abigail,celeste,jewel,cara,adele,rebekah,lucinda,dorthy,effie,trina,reba,sallie,aurora,lenora,etta,lottie,kerri,trisha,nikki,estella,francisca,josie,tracie,marissa,karin,brittney,janelle,lourdes,laurel,helene,fern,elva,corinne,kelsey,ina,bettie,elisabeth,aida,caitlin,ingrid,iva,eugenia,christa,goldie,maude,jenifer,therese,dena,lorna,janette,latonya,candy,consuelo,tamika,rosetta,debora,cherie,polly,dina,jewell,fay,jillian,dorothea,nell,trudy,esperanza,patrica,kimberley,shanna,helena,cleo,stefanie,rosario,ola,janine,mollie,lupe,alisa,lou,maribel,susanne,bette,susana,elise,cecile,isabelle,lesley,jocelyn,paige,joni,rachelle,leola,daphne,alta,ester,petra,graciela,imogene,jolene,keisha,lacey,glenna,gabriela,keri,ursula,lizzie,kirsten,shana,adeline,mayra,jayne,jaclyn,gracie,sondra,carmela,marisa,rosalind,charity,tonia,beatriz,marisol,clarice,jeanine,sheena,angeline,frieda,lily,shauna,millie,claudette,cathleen,angelia,gabrielle,autumn,katharine,jodie,staci,lea,christi,justine,elma,luella,margret,dominique,socorro,martina,margo,mavis,callie,bobbi,maritza,lucile,leanne,jeannine,deana,aileen,lorie,ladonna,willa,manuela,gale,selma,dolly,sybil,abby,ivy,dee,winnie,marcy,luisa,jeri,magdalena,ofelia,meagan,audra,matilda,leila,cornelia,bianca,simone,bettye,randi,virgie,latisha,barbra,georgina,eliza,leann,bridgette,rhoda,haley,adela,nola,bernadine,flossie,ila,greta,ruthie,nelda,minerva,lilly,terrie,letha,hilary,estela,valarie,brianna,rosalyn,earline,catalina,ava,mia,clarissa,lidia,corrine,alexandria,concepcion,tia,sharron,rae,dona,ericka,jami,elnora,chandra,lenore,neva,marylou,melisa,tabatha,serena,avis,allie,sofia,jeanie,odessa,nannie,harriett,loraine,penelope,milagros,emilia,benita,allyson,ashlee,tania,esmeralda,karina,eve,pearlie,zelma,malinda,noreen,tameka,saundra,hillary,amie,althea,rosalinda,lilia,alana,clare,alejandra,elinor,lorrie,jerri,darcy,earnestine,carmella,noemi,marcie,liza,annabelle,louisa,earlene,mallory,carlene,nita,selena,tanisha,katy,julianne,lakisha,edwina,maricela,margery,kenya,dollie,roxie,roslyn,kathrine,nanette,charmaine,lavonne,ilene,tammi,suzette,corine,kaye,chrystal,lina,deanne,lilian,juliana,aline,luann,kasey,maryanne,evangeline,colette,melva,lawanda,yesenia,nadia,madge,kathie,ophelia,valeria,nona,mitzi,mari,georgette,claudine,fran,alissa,roseann,lakeisha,susanna,reva,deidre,chasity,sheree,elvia,alyce,deirdre,gena,briana,araceli,katelyn,rosanne,wendi,tessa,berta,marva,imelda,marietta,marci,leonor,arline,sasha,madelyn,janna,juliette,deena,aurelia,josefa,augusta,liliana,lessie,amalia,savannah,anastasia,vilma,natalia,rosella,lynnette,corina,alfreda,leanna,amparo,coleen,tamra,aisha,wilda,karyn,queen,maura,mai,evangelina,rosanna,hallie,erna,enid,mariana,lacy,juliet,jacklyn,freida,madeleine,mara,cathryn,lelia,casandra,bridgett,angelita,jannie,dionne,annmarie,katina,beryl,millicent,katheryn,diann,carissa,maryellen,liz,lauri,helga,gilda,rhea,marquita,hollie,tisha,tamera,angelique,francesca,kaitlin,lolita,florine,rowena,reyna,twila,fanny,janell,ines,concetta,bertie,alba,brigitte,alyson,vonda,pansy,elba,noelle,letitia,deann,brandie,louella,leta,felecia,sharlene,lesa,beverley,isabella,herminia,terra,celina,tori,octavia,jade,denice,germaine,michell,cortney,nelly,doretha,deidra,monika,lashonda,judi,chelsey,antionette,margot,adelaide,nan,leeann,elisha,dessie,libby,kathi,gayla,latanya,mina,mellisa,kimberlee,jasmin,renae,zelda,elda,justina,gussie,emilie,camilla,abbie,rocio,kaitlyn,edythe,ashleigh,selina,lakesha,geri,allene,pamala,michaela,dayna,caryn,rosalia,sun,jacquline,rebeca,marybeth,krystle,iola,dottie,belle,griselda,ernestina,elida,adrianne,demetria,delma,jaqueline,arleen,virgina,retha,fatima,tillie,eleanore,cari,treva,wilhelmina,rosalee,maurine,latrice,jena,taryn,elia,debby,maudie,jeanna,delilah,catrina,shonda,hortencia,theodora,teresita,robbin,danette,delphine,brianne,nilda,danna,cindi,bess,iona,winona,vida,rosita,marianna,racheal,guillermina,eloisa,celestine,caren,malissa,lona,chantel,shellie,marisela,leora,agatha,soledad,migdalia,ivette,christen,janel,veda,pattie,tessie,tera,marilynn,lucretia,karrie,dinah,daniela,alecia,adelina,vernice,shiela,portia,merry,lashawn,dara,tawana,oma,verda,alene,zella,sandi,rafaela,maya,kira,candida,alvina,suzan,shayla,lyn,lettie,samatha,oralia,matilde,larissa,vesta,renita,india,delois,shanda,phillis,lorri,erlinda,cathrine,barb,zoe,isabell,ione,gisela,roxanna,mayme,kisha,ellie,mellissa,dorris,dalia,bella,annetta,zoila,reta,reina,lauretta,kylie,christal,pilar,charla,elissa,tiffani,tana,paulina,leota,breanna,jayme,carmel,vernell,tomasa,mandi,dominga,santa,melodie,lura,alexa,tamela,mirna,kerrie,venus,felicita,cristy,carmelita,berniece,annemarie,tiara,roseanne,missy,cori,roxana,pricilla,kristal,jung,elyse,haydee,aletha,bettina,marge,gillian,filomena,zenaida,harriette,caridad,vada,una,aretha,pearline,marjory,marcela,flor,evette,elouise,alina,damaris,catharine,belva,nakia,marlena,luanne,lorine,karon,dorene,danita,brenna,tatiana,louann,julianna,andria,philomena,lucila,leonora,dovie,romona,mimi,jacquelin,gaye,tonja,misti,chastity,stacia,roxann,micaela,nikita,mei,velda,marlys,johnna,aura,ivonne,hayley,nicki,majorie,herlinda,yadira,perla,gregoria,antonette,shelli,mozelle,mariah,joelle,cordelia,josette,chiquita,trista,laquita,georgiana,candi,shanon,hildegard,valentina,stephany,magda,karol,gabriella,tiana,roma,richelle,oleta,jacque,idella,alaina,suzanna,jovita,tosha,nereida,marlyn,kyla,delfina,tena,stephenie,sabina,nathalie,marcelle,gertie,darleen,thea,sharonda,shantel,belen,venessa,rosalina,ona,genoveva,clementine,rosalba,renate,renata,georgianna,floy,dorcas,ariana,tyra,theda,mariam,juli,jesica,vikki,verla,roselyn,melvina,jannette,ginny,debrah,corrie,asia,violeta,myrtis,latricia,collette,charleen,anissa,viviana,twyla,nedra,latonia,lan,hellen,fabiola,annamarie,adell,sharyn,chantal,niki,maud,lizette,lindy,kia,kesha,jeana,danelle,charline,chanel,valorie,lia,dortha,cristal,leone,leilani,gerri,debi,andra,keshia,ima,eulalia,easter,dulce,natividad,linnie,kami,georgie,catina,brook,alda,winnifred,sharla,ruthann,meaghan,magdalene,lissette,adelaida,venita,trena,shirlene,shameka,elizebeth,dian,shanta,latosha,carlotta,windy,rosina,mariann,leisa,jonnie,dawna,cathie,astrid,laureen,janeen,holli,fawn,vickey,teressa,shante,rubye,marcelina,chanda,terese,scarlett,marnie,lulu,lisette,jeniffer,elenor,dorinda,donita,carman,bernita,altagracia,aleta,adrianna,zoraida,nicola,lyndsey,janina,ami,starla,phylis,phuong,kyra,charisse,blanch,sanjuanita,rona,nanci,marilee,maranda,brigette,sanjuana,marita,kassandra,joycelyn,felipa,chelsie,bonny,mireya,lorenza,kyong,ileana,candelaria,sherie,lucie,leatrice,lakeshia,gerda,edie,bambi,marylin,lavon,hortense,garnet,evie,tressa,shayna,lavina,kyung,jeanetta,sherrill,shara,phyliss,mittie,anabel,alesia,thuy,tawanda,joanie,tiffanie,lashanda,karissa,enriqueta,daria,daniella,corinna,alanna,abbey,roxane,roseanna,magnolia,lida,joellen,era,coral,carleen,tresa,peggie,novella,nila,maybelle,jenelle,carina,nova,melina,marquerite,margarette,josephina,evonne,cinthia,albina,toya,tawnya,sherita,myriam,lizabeth,lise,keely,jenni,giselle,cheryle,ardith,ardis,alesha,adriane,shaina,linnea,karolyn,felisha,dori,darci,artie,armida,zola,xiomara,vergie,shamika,nena,nannette,maxie,lovie,jeane,jaimie,inge,farrah,elaina,caitlyn,felicitas,cherly,caryl,yolonda,yasmin,teena,prudence,pennie,nydia,mackenzie,orpha,marvel,lizbeth,laurette,jerrie,hermelinda,carolee,tierra,mirian,meta,melony,kori,jennette,jamila,ena,anh,yoshiko,susannah,salina,rhiannon,joleen,cristine,ashton,aracely,tomeka,shalonda,marti,lacie,kala,jada,ilse,hailey,brittani,zona,syble,sherryl,nidia,marlo,kandice,kandi,deb,alycia,ronna,norene,mercy,ingeborg,giovanna,gemma,christel,audry,zora,vita,trish,stephaine,shirlee,shanika,melonie,mazie,jazmin,inga,hoa,hettie,geralyn,fonda,estrella,adella,sarita,rina,milissa,maribeth,golda,evon,ethelyn,enedina,cherise,chana,velva,tawanna,sade,mirta,karie,jacinta,elna,davina,cierra,ashlie,albertha,tanesha,nelle,mindi,lorinda,larue,florene,demetra,dedra,ciara,chantelle,ashly,suzy,rosalva,noelia,lyda,leatha,krystyna,kristan,karri,darline,darcie,cinda,cherrie,awilda,almeda,rolanda,lanette,jerilyn,gisele,evalyn,cyndi,cleta,carin,zina,zena,velia,tanika,charissa,talia,margarete,lavonda,kaylee,kathlene,jonna,irena,ilona,idalia,candis,candance,brandee,anitra,alida,sigrid,nicolette,maryjo,linette,hedwig,christiana,alexia,tressie,modesta,lupita,lita,gladis,evelia,davida,cherri,cecily,ashely,annabel,agustina,wanita,shirly,rosaura,hulda,eun,yetta,verona,thomasina,sibyl,shannan,mechelle,lue,leandra,lani,kylee,kandy,jolynn,ferne,eboni,corene,alysia,zula,nada,moira,lyndsay,lorretta,jammie,hortensia,gaynell,adria,vina,vicenta,tangela,stephine,norine,nella,liana,leslee,kimberely,iliana,glory,felica,emogene,elfriede,eden,eartha,carma,bea,ocie,lennie,kiara,jacalyn,carlota,arielle,otilia,kirstin,kacey,johnetta,joetta,jeraldine,jaunita,elana,dorthea,cami,amada,adelia,vernita,tamar,siobhan,renea,rashida,ouida,nilsa,meryl,kristyn,julieta,danica,breanne,aurea,anglea,sherron,odette,malia,lorelei,leesa,kenna,kathlyn,fiona,charlette,suzie,shantell,sabra,racquel,myong,mira,martine,lucienne,lavada,juliann,elvera,delphia,christiane,charolette,carri,asha,angella,paola,ninfa,leda,lai,eda,stefani,shanell,palma,machelle,lissa,kecia,kathryne,karlene,julissa,jettie,jenniffer,hui,corrina,carolann,alena,rosaria,myrtice,marylee,liane,kenyatta,judie,janey,elmira,eldora,denna,cristi,cathi,zaida,vonnie,viva,vernie,rosaline,mariela,luciana,lesli,karan,felice,deneen,adina,wynona,tarsha,sheron,shanita,shani,shandra,randa,pinkie,nelida,marilou,lyla,laurene,laci,joi,janene,dorotha,daniele,dani,carolynn,carlyn,berenice,ayesha,anneliese,alethea,thersa,tamiko,rufina,oliva,mozell,marylyn,kristian,kathyrn,kasandra,kandace,janae,domenica,debbra,dannielle,arcelia,aja,zenobia,sharen,sharee,lavinia,kum,kacie,jackeline,huong,felisa,emelia,eleanora,cythia,cristin,claribel,anastacia,zulma,zandra,yoko,tenisha,susann,sherilyn,shay,shawanda,romana,mathilda,linsey,keiko,joana,isela,gretta,georgetta,eugenie,desirae,delora,corazon,antonina,anika,willene,tracee,tamatha,nichelle,mickie,maegan,luana,lanita,kelsie,edelmira,bree,afton,teodora,tamie,shena,meg,linh,keli,kaci,danyelle,arlette,albertine,adelle,tiffiny,simona,nicolasa,nichol,nia,nakisha,mee,maira,loreen,kizzy,fallon,christene,bobbye,vincenza,tanja,rubie,roni,queenie,margarett,kimberli,irmgard,idell,hilma,evelina,esta,emilee,dennise,dania,carie,wai,risa,rikki,particia,mui,masako,luvenia,loree,loni,lien,gigi,florencia,denita,billye,tomika,sharita,rana,nikole,neoma,margarite,madalyn,lucina,laila,kali,jenette,gabriele,evelyne,elenora,clementina,alejandrina,zulema,violette,vannessa,thresa,retta,pia,patience,noella,nickie,jonell,chaya,camelia,bethel,anya,suzann,shu,mila,lilla,laverna,keesha,kattie,georgene,eveline,estell,elizbeth,vivienne,vallie,trudie,stephane,magaly,madie,kenyetta,karren,janetta,hermine,drucilla,debbi,celestina,candie,britni,beckie,amina,zita,yun,yolande,vivien,vernetta,trudi,sommer,pearle,patrina,ossie,nicolle,loyce,letty,larisa,katharina,joselyn,jonelle,jenell,iesha,heide,florinda,florentina,flo,elodia,dorine,brunilda,brigid,ashli,ardella,twana,thu,tarah,shavon,serina,rayna,ramonita,nga,margurite,lucrecia,kourtney,kati,jesenia,crista,ayana,alica,alia,vinnie,suellen,romelia,rachell,olympia,michiko,kathaleen,jolie,jessi,janessa,hana,elease,carletta,britany,shona,salome,rosamond,regena,raina,ngoc,nelia,louvenia,lesia,latrina,laticia,larhonda,jina,jacki,emmy,deeann,coretta,arnetta,thalia,shanice,neta,mikki,micki,lonna,leana,lashunda,kiley,joye,jacqulyn,ignacia,hyun,hiroko,henriette,elayne,delinda,dahlia,coreen,consuela,conchita,celine,babette,ayanna,anette,albertina,shawnee,shaneka,quiana,pamelia,min,merri,merlene,margit,kiesha,kiera,kaylene,jodee,jenise,erlene,emmie,dalila,daisey,casie,belia,babara,versie,vanesa,shelba,shawnda,nikia,naoma,marna,margeret,madaline,lawana,kindra,jutta,jazmine,janett,hannelore,glendora,gertrud,garnett,freeda,frederica,florance,flavia,carline,beverlee,anjanette,valda,tamala,shonna,sha,sarina,oneida,merilyn,marleen,lurline,lenna,katherin,jin,jeni,hae,gracia,glady,farah,enola,ema,dominque,devona,delana,cecila,caprice,alysha,alethia,vena,theresia,tawny,shakira,samara,sachiko,rachele,pamella,marni,mariel,maren,malisa,ligia,lera,latoria,larae,kimber,kathern,karey,jennefer,janeth,halina,fredia,delisa,debroah,ciera,angelika,andree,altha,yen,vivan,terresa,tanna,suk,sudie,soo,signe,salena,ronni,rebbecca,myrtie,malika,maida,loan,leonarda,kayleigh,ethyl,ellyn,dayle,cammie,brittni,birgit,avelina,asuncion,arianna,akiko,venice,tyesha,tonie,tiesha,takisha,steffanie,sindy,meghann,manda,macie,kellye,kellee,joslyn,inger,indira,glinda,glennis,fernanda,faustina,eneida,elicia,dot,digna,dell,arletta,willia,tammara,tabetha,sherrell,sari,rebbeca,pauletta,natosha,nakita,mammie,kenisha,kazuko,kassie,earlean,daphine,corliss,clotilde,carolyne,bernetta,augustina,audrea,annis,annabell,yan,tennille,tamica,selene,rosana,regenia,qiana,markita,macy,leeanne,laurine,kym,jessenia,janita,georgine,genie,emiko,elvie,deandra,dagmar,corie,collen,cherish,romaine,porsha,pearlene,micheline,merna,margorie,margaretta,lore,jenine,hermina,fredericka,elke,drusilla,dorathy,dione,celena,brigida,angeles,allegra,tamekia,synthia,sook,slyvia,rosann,reatha,raye,marquetta,margart,layla,kymberly,kiana,kayleen,katlyn,karmen,joella,irina,emelda,eleni,detra,clemmie,cheryll,chantell,cathey,arnita,arla,angle,angelic,alyse,zofia,thomasine,tennie,sherly,sherley,sharyl,remedios,petrina,nickole,myung,myrle,mozella,louanne,lisha,latia,krysta,julienne,jeanene,jacqualine,isaura,gwenda,earleen,cleopatra,carlie,audie,antonietta,alise,verdell,tomoko,thao,talisha,shemika,savanna,santina,rosia,raeann,odilia,nana,minna,magan,lynelle,karma,joeann,ivana,inell,ilana,hye,hee,gudrun,dreama,crissy,chante,carmelina,arvilla,annamae,alvera,aleida,yanira,vanda,tianna,tam,stefania,shira,nicol,nancie,monserrate,melynda,melany,lovella,laure,kacy,jacquelynn,hyon,gertha,eliana,christena,christeen,charise,caterina,carley,candyce,arlena,ammie,willette,vanita,tuyet,syreeta,penney,nyla,maryam,marya,magen,ludie,loma,livia,lanell,kimberlie,julee,donetta,diedra,denisha,deane,dawne,clarine,cherryl,bronwyn,alla,valery,tonda,sueann,soraya,shoshana,shela,sharleen,shanelle,nerissa,meridith,mellie,maye,maple,magaret,lili,leonila,leonie,leeanna,lavonia,lavera,kristel,kathey,kathe,jann,ilda,hildred,hildegarde,genia,fumiko,evelin,ermelinda,elly,dung,doloris,dionna,danae,berneice,annice,alix,verena,verdie,shawnna,shawana,shaunna,rozella,randee,ranae,milagro,lynell,luise,loida,lisbeth,karleen,junita,jona,isis,hyacinth,hedy,gwenn,ethelene,erline,donya,domonique,delicia,dannette,cicely,branda,blythe,bethann,ashlyn,annalee,alline,yuko,vella,trang,towanda,tesha,sherlyn,narcisa,miguelina,meri,maybell,marlana,marguerita,madlyn,lory,loriann,leonore,leighann,laurice,latesha,laronda,katrice,kasie,kaley,jadwiga,glennie,gearldine,francina,epifania,dyan,dorie,diedre,denese,demetrice,delena,cristie,cleora,catarina,carisa,barbera,almeta,trula,tereasa,solange,sheilah,shavonne,sanora,rochell,mathilde,margareta,maia,lynsey,lawanna,launa,kena,keena,katia,glynda,gaylene,elvina,elanor,danuta,danika,cristen,cordie,coletta,clarita,carmon,brynn,azucena,aundrea,angele,verlie,verlene,tamesha,silvana,sebrina,samira,reda,raylene,penni,norah,noma,mireille,melissia,maryalice,laraine,kimbery,karyl,karine,kam,jolanda,johana,jesusa,jaleesa,jacquelyne,iluminada,hilaria,hanh,gennie,francie,floretta,exie,edda,drema,delpha,bev,barbar,assunta,ardell,annalisa,alisia,yukiko,yolando,wonda,wei,waltraud,veta,temeka,tameika,shirleen,shenita,piedad,ozella,mirtha,marilu,kimiko,juliane,jenice,janay,jacquiline,hilde,fae,elois,echo,devorah,chau,brinda,betsey,arminda,aracelis,apryl,annett,alishia,veola,usha,toshiko,theola,tashia,talitha,shery,renetta,reiko,rasheeda,obdulia,mika,melaine,meggan,marlen,marget,marceline,mana,magdalen,librada,lezlie,latashia,lasandra,kelle,isidra,isa,inocencia,gwyn,francoise,erminia,erinn,dimple,devora,criselda,armanda,arie,ariane,angelena,aliza,adriene,adaline,xochitl,twanna,tomiko,tamisha,taisha,susy,siu,rutha,rhona,noriko,natashia,merrie,marinda,mariko,margert,loris,lizzette,leisha,kaila,joannie,jerrica,jene,jannet,janee,jacinda,herta,elenore,doretta,delaine,daniell,claudie,britta,apolonia,amberly,alease,yuri,yuk,wen,waneta,ute,tomi,sharri,sandie,roselle,reynalda,raguel,phylicia,patria,olimpia,odelia,mitzie,minda,mignon,mica,mendy,marivel,maile,lynetta,lavette,lauryn,latrisha,lakiesha,kiersten,kary,josphine,jolyn,jetta,janise,jacquie,ivelisse,glynis,gianna,gaynelle,danyell,danille,dacia,coralee,cher,ceola,arianne,aleshia,yung,williemae,trinh,thora,tai,svetlana,sherika,shemeka,shaunda,roseline,ricki,melda,mallie,lavonna,latina,laquanda,lala,lachelle,klara,kandis,johna,jeanmarie,jaye,grayce,gertude,emerita,ebonie,clorinda,ching,chery,carola,breann,blossom,bernardine,becki,arletha,argelia,ara,alita,yulanda,yon,yessenia,tobi,tasia,sylvie,shirl,shirely,shella,shantelle,sacha,rebecka,providencia,paulene,misha,miki,marline,marica,lorita,latoyia,lasonya,kerstin,kenda,keitha,kathrin,jaymie,gricelda,ginette,eryn,elina,elfrieda,danyel,cheree,chanelle,barrie,aurore,annamaria,alleen,ailene,aide,yasmine,vashti,treasa,tiffaney,sheryll,sharie,shanae,sau,raisa,neda,mitsuko,mirella,milda,maryanna,maragret,mabelle,luetta,lorina,letisha,latarsha,lanelle,lajuana,krissy,karly,karena,jessika,jerica,jeanelle,jalisa,jacelyn,izola,euna,etha,domitila,dominica,daina,creola,carli,camie,brittny,ashanti,anisha,aleen,adah,yasuko,valrie,tona,tinisha,thi,terisa,taneka,simonne,shalanda,serita,ressie,refugia,olene,margherita,mandie,maire,lyndia,luci,lorriane,loreta,leonia,lavona,lashawnda,lakia,kyoko,krystina,krysten,kenia,kelsi,jeanice,isobel,georgiann,genny,felicidad,eilene,deloise,conception,clora,cherilyn,calandra,armandina,anisa,ula,tiera,theressa,stephania,sima,shyla,shonta,shera,shaquita,shala,rossana,nohemi,nery,moriah,melita,melida,melani,marylynn,marisha,mariette,malorie,madelene,ludivina,loria,lorette,loralee,lianne,lavenia,laurinda,lashon,kit,kimi,keila,katelynn,kai,jone,joane,jayna,janella,hue,hertha,francene,elinore,despina,delsie,deedra,clemencia,carolin,bulah,brittanie,bok,blondell,bibi,beaulah,beata,annita,agripina,virgen,valene,twanda,tommye,toi,tarra,tari,tammera,shakia,sadye,ruthanne,rochel,rivka,pura,nenita,natisha,merrilee,melodee,marvis,lucilla,leena,laveta,larita,lanie,keren,ileen,georgeann,genna,frida,ewa,eufemia,emely,ela,edyth,deonna,deadra,darlena,chanell,cathern,cassondra,cassaundra,bernarda,berna,arlinda,anamaria,vertie,valeri,torri,tatyana,stasia,sherise,sherill,sanda,ruthe,rosy,robbi,ranee,quyen,pearly,palmira,onita,nisha,niesha,nida,nam,merlyn,mayola,marylouise,marth,margene,madelaine,londa,leontine,leoma,leia,lauralee,lanora,lakita,kiyoko,keturah,katelin,kareen,jonie,johnette,jenee,jeanett,izetta,hiedi,heike,hassie,giuseppina,georgann,fidela,fernande,elwanda,ellamae,eliz,dusti,dotty,cyndy,coralie,celesta,argentina,alverta,xenia,wava,vanetta,torrie,tashina,tandy,tambra,tama,stepanie,shila,shaunta,sharan,shaniqua,shae,setsuko,serafina,sandee,rosamaria,priscila,olinda,nadene,muoi,michelina,mercedez,maryrose,marcene,mao,magali,mafalda,lannie,kayce,karoline,kamilah,kamala,justa,joline,jennine,jacquetta,iraida,georgeanna,franchesca,emeline,elane,ehtel,earlie,dulcie,dalene,classie,chere,charis,caroyln,carmina,carita,bethanie,ayako,arica,alysa,alessandra,akilah,adrien,zetta,youlanda,yelena,yahaira,wendolyn,tijuana,terina,teresia,suzi,sherell,shavonda,shaunte,sharda,shakita,sena,ryann,rubi,riva,reginia,rachal,parthenia,pamula,monnie,monet,michaele,melia,malka,maisha,lisandra,lekisha,lean,lakendra,krystin,kortney,kizzie,kittie,kera,kendal,kemberly,kanisha,julene,jule,johanne,jamee,halley,gidget,galina,fredricka,fleta,fatimah,eusebia,elza,eleonore,dorthey,doria,donella,dinorah,delorse,claretha,christinia,charlyn,bong,belkis,azzie,andera,aiko,adena,yer,yajaira,wan,vania,ulrike,toshia,tifany,stefany,shizue,shenika,shawanna,sharolyn,sharilyn,shaquana,shantay,rozanne,roselee,remona,reanna,raelene,phung,petronila,natacha,nancey,myrl,miyoko,miesha,merideth,marvella,marquitta,marhta,marchelle,lizeth,libbie,lahoma,ladawn,kina,katheleen,katharyn,karisa,kaleigh,junie,julieann,johnsie,janean,jaimee,jackqueline,hisako,herma,helaine,gwyneth,gita,eustolia,emelina,elin,edris,donnette,donnetta,dierdre,denae,darcel,clarisa,cinderella,chia,charlesetta,charita,celsa,cassy,cassi,carlee,bruna,brittaney,brande,billi,bao,antonetta,angla,angelyn,analisa,alane,wenona,wendie,veronique,vannesa,tobie,tempie,sumiko,sulema,sparkle,somer,sheba,sharice,shanel,shalon,rosio,roselia,renay,rema,reena,ozie,oretha,oralee,oda,ngan,nakesha,milly,marybelle,margrett,maragaret,manie,lurlene,lillia,lieselotte,lavelle,lashaunda,lakeesha,kaycee,kalyn,joya,joette,jenae,janiece,illa,grisel,glayds,genevie,gala,fredda,eleonor,debera,deandrea,corrinne,cordia,contessa,colene,cleotilde,chantay,cecille,beatris,azalee,arlean,ardath,anjelica,anja,alfredia,aleisha,zada,yuonne,willodean,vennie,vanna,tyisha,tova,torie,tonisha,tilda,tien,sirena,sherril,shanti,senaida,samella,robbyn,renda,reita,phebe,paulita,nobuko,nguyet,neomi,mikaela,melania,maximina,marg,maisie,lynna,lilli,lashaun,lakenya,lael,kirstie,kathline,kasha,karlyn,karima,jovan,josefine,jennell,jacqui,jackelyn,hyo,hien,grazyna,florrie,floria,eleonora,dwana,dorla,delmy,deja,dede,dann,crysta,clelia,claris,chieko,cherlyn,cherelle,charmain,chara,cammy,bee,arnette,ardelle,annika,amiee,amee,allena,yvone,yuki,yoshie,yevette,yael,willetta,voncile,venetta,tula,tonette,timika,temika,telma,teisha,taren,stacee,shawnta,saturnina,ricarda,pok,pasty,onie,nubia,marielle,mariella,marianela,mardell,luanna,loise,lisabeth,lindsy,lilliana,lilliam,lelah,leigha,leanora,kristeen,khalilah,keeley,kandra,junko,joaquina,jerlene,jani,jamika,hsiu,hermila,genevive,evia,eugena,emmaline,elfreda,elene,donette,delcie,deeanna,darcey,cuc,clarinda,cira,chae,celinda,catheryn,casimira,carmelia,camellia,breana,bobette,bernardina,bebe,basilia,arlyne,amal,alayna,zonia,zenia,yuriko,yaeko,wynell,willena,vernia,tora,terrilyn,terica,tenesha,tawna,tajuana,taina,stephnie,sona,sina,shondra,shizuko,sherlene,sherice,sharika,rossie,rosena,rima,ria,rheba,renna,natalya,nancee,melodi,meda,matha,marketta,maricruz,marcelene,malvina,luba,louetta,leida,lecia,lauran,lashawna,laine,khadijah,katerine,kasi,kallie,julietta,jesusita,jestine,jessia,jeffie,janyce,isadora,georgianne,fidelia,evita,eura,eulah,estefana,elsy,eladia,dodie,dia,denisse,deloras,delila,daysi,crystle,concha,claretta,charlsie,charlena,carylon,bettyann,asley,ashlea,amira,agueda,agnus,yuette,vinita,victorina,tynisha,treena,toccara,tish,thomasena,tegan,soila,shenna,sharmaine,shantae,shandi,september,saran,sarai,sana,rosette,rolande,regine,otelia,olevia,nicholle,necole,naida,myrta,myesha,mitsue,minta,mertie,margy,mahalia,madalene,loura,lorean,lesha,leonida,lenita,lavone,lashell,lashandra,lamonica,kimbra,katherina,karry,kanesha,jong,jeneva,jaquelyn,hwa,gilma,ghislaine,gertrudis,fransisca,fermina,ettie,etsuko,ellan,elidia,edra,dorethea,doreatha,denyse,deetta,daine,cyrstal,corrin,cayla,carlita,camila,burma,bula,buena,barabara,avril,alaine,zana,wilhemina,wanetta,veronika,verline,vasiliki,tonita,tisa,teofila,tayna,taunya,tandra,takako,sunni,suanne,sixta,sharell,seema,rosenda,robena,raymonde,pei,pamila,ozell,neida,mistie,micha,merissa,maurita,maryln,maryetta,marcell,malena,makeda,lovetta,lourie,lorrine,lorilee,laurena,lashay,larraine,laree,lacresha,kristle,krishna,keva,keira,karole,joie,jinny,jeannetta,jama,heidy,gilberte,gema,faviola,evelynn,enda,elli,ellena,divina,dagny,collene,codi,cindie,chassidy,chasidy,catrice,catherina,cassey,caroll,carlena,candra,calista,bryanna,britteny,beula,bari,audrie,audria,ardelia,annelle,angila,alona,allyn".split(","))),
p("surnames",s("smith,johnson,williams,jones,brown,davis,miller,wilson,moore,taylor,anderson,jackson,white,harris,martin,thompson,garcia,martinez,robinson,clark,rodriguez,lewis,lee,walker,hall,allen,young,hernandez,king,wright,lopez,hill,green,adams,baker,gonzalez,nelson,carter,mitchell,perez,roberts,turner,phillips,campbell,parker,evans,edwards,collins,stewart,sanchez,morris,rogers,reed,cook,morgan,bell,murphy,bailey,rivera,cooper,richardson,cox,howard,ward,torres,peterson,gray,ramirez,watson,brooks,sanders,price,bennett,wood,barnes,ross,henderson,coleman,jenkins,perry,powell,long,patterson,hughes,flores,washington,butler,simmons,foster,gonzales,bryant,alexander,griffin,diaz,hayes,myers,ford,hamilton,graham,sullivan,wallace,woods,cole,west,owens,reynolds,fisher,ellis,harrison,gibson,mcdonald,cruz,marshall,ortiz,gomez,murray,freeman,wells,webb,simpson,stevens,tucker,porter,hicks,crawford,boyd,mason,morales,kennedy,warren,dixon,ramos,reyes,burns,gordon,shaw,holmes,rice,robertson,hunt,daniels,palmer,mills,nichols,grant,ferguson,stone,hawkins,dunn,perkins,hudson,spencer,gardner,stephens,payne,pierce,berry,matthews,arnold,wagner,willis,watkins,olson,carroll,duncan,snyder,hart,cunningham,lane,andrews,ruiz,harper,fox,riley,armstrong,carpenter,weaver,greene,elliott,chavez,sims,peters,kelley,franklin,lawson,fields,gutierrez,schmidt,carr,vasquez,castillo,wheeler,chapman,oliver,montgomery,richards,williamson,johnston,banks,meyer,bishop,mccoy,howell,alvarez,morrison,hansen,fernandez,garza,burton,nguyen,jacobs,reid,fuller,lynch,garrett,romero,welch,larson,frazier,burke,hanson,mendoza,moreno,bowman,medina,fowler,brewer,hoffman,carlson,silva,pearson,holland,fleming,jensen,vargas,byrd,davidson,hopkins,may,herrera,wade,soto,walters,neal,caldwell,lowe,jennings,barnett,graves,jimenez,horton,shelton,barrett,obrien,castro,sutton,mckinney,lucas,miles,rodriquez,chambers,holt,lambert,fletcher,watts,bates,hale,rhodes,pena,beck,newman,haynes,mcdaniel,mendez,bush,vaughn,parks,dawson,santiago,norris,hardy,steele,curry,powers,schultz,barker,guzman,page,munoz,ball,keller,chandler,weber,walsh,lyons,ramsey,wolfe,schneider,mullins,benson,sharp,bowen,barber,cummings,hines,baldwin,griffith,valdez,hubbard,salazar,reeves,warner,stevenson,burgess,santos,tate,cross,garner,mann,mack,moss,thornton,mcgee,farmer,delgado,aguilar,vega,glover,manning,cohen,harmon,rodgers,robbins,newton,blair,higgins,ingram,reese,cannon,strickland,townsend,potter,goodwin,walton,rowe,hampton,ortega,patton,swanson,goodman,maldonado,yates,becker,erickson,hodges,rios,conner,adkins,webster,malone,hammond,flowers,cobb,moody,quinn,pope,osborne,mccarthy,guerrero,estrada,sandoval,gibbs,gross,fitzgerald,stokes,doyle,saunders,wise,colon,gill,alvarado,greer,padilla,waters,nunez,ballard,schwartz,mcbride,houston,christensen,klein,pratt,briggs,parsons,mclaughlin,zimmerman,french,buchanan,moran,copeland,pittman,brady,mccormick,holloway,brock,poole,logan,bass,marsh,drake,wong,jefferson,park,morton,abbott,sparks,norton,huff,massey,figueroa,carson,bowers,roberson,barton,tran,lamb,harrington,boone,cortez,clarke,mathis,singleton,wilkins,cain,underwood,hogan,mckenzie,collier,luna,phelps,mcguire,bridges,wilkerson,nash,summers,atkins,wilcox,pitts,conley,marquez,burnett,cochran,chase,davenport,hood,gates,ayala,sawyer,vazquez,dickerson,hodge,acosta,flynn,espinoza,nicholson,monroe,morrow,whitaker,oconnor,skinner,ware,molina,kirby,huffman,gilmore,dominguez,oneal,lang,combs,kramer,hancock,gallagher,gaines,shaffer,short,wiggins,mathews,mcclain,fischer,wall,small,melton,hensley,bond,dyer,grimes,contreras,wyatt,baxter,snow,mosley,shepherd,larsen,hoover,beasley,petersen,whitehead,meyers,garrison,shields,horn,savage,olsen,schroeder,hartman,woodard,mueller,kemp,deleon,booth,patel,calhoun,wiley,eaton,cline,navarro,harrell,humphrey,parrish,duran,hutchinson,hess,dorsey,bullock,robles,beard,dalton,avila,rich,blackwell,york,johns,blankenship,trevino,salinas,campos,pruitt,callahan,montoya,hardin,guerra,mcdowell,stafford,gallegos,henson,wilkinson,booker,merritt,atkinson,orr,decker,hobbs,tanner,knox,pacheco,stephenson,glass,rojas,serrano,marks,hickman,english,sweeney,strong,mcclure,conway,roth,maynard,farrell,lowery,hurst,nixon,weiss,trujillo,ellison,sloan,juarez,winters,mclean,boyer,villarreal,mccall,gentry,carrillo,ayers,lara,sexton,pace,hull,leblanc,browning,velasquez,leach,chang,sellers,herring,noble,foley,bartlett,mercado,landry,durham,walls,barr,mckee,bauer,rivers,bradshaw,pugh,velez,rush,estes,dodson,morse,sheppard,weeks,camacho,bean,barron,livingston,middleton,spears,branch,blevins,chen,kerr,mcconnell,hatfield,harding,solis,frost,giles,blackburn,pennington,woodward,finley,mcintosh,koch,mccullough,blanchard,rivas,brennan,mejia,kane,benton,buckley,valentine,maddox,russo,mcknight,buck,moon,mcmillan,crosby,berg,dotson,mays,roach,church,chan,richmond,meadows,faulkner,oneill,knapp,kline,ochoa,jacobson,gay,hendricks,horne,shepard,hebert,cardenas,mcintyre,waller,holman,donaldson,cantu,morin,gillespie,fuentes,tillman,bentley,peck,key,salas,rollins,gamble,dickson,battle,santana,cabrera,cervantes,howe,hinton,hurley,spence,zamora,yang,mcneil,suarez,petty,gould,mcfarland,sampson,carver,bray,macdonald,stout,hester,melendez,dillon,farley,hopper,galloway,potts,joyner,stein,aguirre,osborn,mercer,bender,franco,rowland,sykes,pickett,sears,mayo,dunlap,hayden,wilder,mckay,coffey,mccarty,ewing,cooley,vaughan,bonner,cotton,holder,stark,ferrell,cantrell,fulton,lott,calderon,pollard,hooper,burch,mullen,fry,riddle,levy,odonnell,britt,daugherty,berger,dillard,alston,frye,riggs,chaney,odom,duffy,fitzpatrick,valenzuela,mayer,alford,mcpherson,acevedo,barrera,cote,reilly,compton,mooney,mcgowan,craft,clemons,wynn,nielsen,baird,stanton,snider,rosales,bright,witt,hays,holden,rutledge,kinney,clements,castaneda,slater,hahn,burks,delaney,pate,lancaster,sharpe,whitfield,talley,macias,burris,ratliff,mccray,madden,kaufman,goff,cash,bolton,mcfadden,levine,byers,kirkland,kidd,workman,carney,mcleod,holcomb,england,finch,sosa,haney,franks,sargent,nieves,downs,rasmussen,bird,hewitt,foreman,valencia,oneil,delacruz,vinson,dejesus,hyde,forbes,gilliam,guthrie,wooten,huber,barlow,boyle,mcmahon,buckner,rocha,puckett,langley,knowles,cooke,velazquez,whitley,vang,shea,rouse,hartley,mayfield,elder,rankin,hanna,cowan,lucero,arroyo,slaughter,haas,oconnell,minor,boucher,archer,boggs,dougherty,andersen,newell,crowe,wang,friedman,bland,swain,holley,pearce,childs,yarbrough,galvan,proctor,meeks,lozano,mora,rangel,bacon,villanueva,schaefer,rosado,helms,boyce,goss,stinson,lake,ibarra,hutchins,covington,crowley,hatcher,mackey,bunch,womack,polk,dodd,childress,childers,camp,villa,dye,springer,mahoney,dailey,belcher,lockhart,griggs,costa,brandt,walden,moser,tatum,mccann,akers,lutz,pryor,orozco,mcallister,lugo,davies,shoemaker,rutherford,newsome,magee,chamberlain,blanton,simms,godfrey,flanagan,crum,cordova,escobar,downing,sinclair,donahue,krueger,mcginnis,gore,farris,webber,corbett,andrade,starr,lyon,yoder,hastings,mcgrath,spivey,krause,harden,crabtree,kirkpatrick,arrington,ritter,mcghee,bolden,maloney,gagnon,dunbar,ponce,pike,mayes,beatty,mobley,kimball,butts,montes,eldridge,braun,hamm,gibbons,moyer,manley,herron,plummer,elmore,cramer,rucker,pierson,fontenot,field,rubio,goldstein,elkins,wills,novak,hickey,worley,gorman,katz,dickinson,broussard,woodruff,crow,britton,nance,lehman,bingham,zuniga,whaley,shafer,coffman,steward,delarosa,nix,neely,mata,davila,mccabe,kessler,hinkle,welsh,pagan,goldberg,goins,crouch,cuevas,quinones,mcdermott,hendrickson,samuels,denton,bergeron,lam,ivey,locke,haines,snell,hoskins,byrne,arias,roe,corbin,beltran,chappell,downey,dooley,tuttle,couch,payton,mcelroy,crockett,groves,cartwright,dickey,mcgill,dubois,muniz,tolbert,dempsey,cisneros,sewell,latham,vigil,tapia,rainey,norwood,stroud,meade,tipton,kuhn,hilliard,bonilla,teague,gunn,greenwood,correa,reece,poe,pineda,phipps,frey,kaiser,ames,gunter,schmitt,milligan,espinosa,bowden,vickers,lowry,pritchard,costello,piper,mcclellan,lovell,sheehan,hatch,dobson,singh,jeffries,hollingsworth,sorensen,meza,fink,donnelly,burrell,tomlinson,colbert,billings,ritchie,helton,sutherland,peoples,mcqueen,thomason,givens,crocker,vogel,robison,dunham,coker,swartz,keys,ladner,richter,hargrove,edmonds,brantley,albright,murdock,boswell,muller,quintero,padgett,kenney,daly,connolly,inman,quintana,lund,barnard,villegas,simons,land,huggins,tidwell,sanderson,bullard,mcclendon,duarte,draper,marrero,dwyer,abrams,stover,goode,fraser,crews,bernal,godwin,conklin,mcneal,baca,esparza,crowder,bower,brewster,mcneill,rodrigues,leal,coates,raines,mccain,mccord,miner,holbrook,swift,dukes,carlisle,aldridge,ackerman,starks,ricks,holliday,ferris,hairston,sheffield,lange,fountain,doss,betts,kaplan,carmichael,bloom,ruffin,penn,kern,bowles,sizemore,larkin,dupree,seals,metcalf,hutchison,henley,farr,mccauley,hankins,gustafson,curran,ash,waddell,ramey,cates,pollock,cummins,messer,heller,lin,funk,cornett,palacios,galindo,cano,hathaway,singer,pham,enriquez,salgado,pelletier,painter,wiseman,blount,feliciano,temple,houser,doherty,mead,mcgraw,swan,capps,blanco,blackmon,thomson,mcmanus,burkett,post,gleason,ott,dickens,cormier,voss,rushing,rosenberg,hurd,dumas,benitez,arellano,marin,caudill,bragg,jaramillo,huerta,gipson,colvin,biggs,vela,platt,cassidy,tompkins,mccollum,dolan,daley,crump,sneed,kilgore,grove,grimm,davison,brunson,prater,marcum,devine,stratton,rosas,choi,tripp,ledbetter,hightower,feldman,epps,yeager,posey,scruggs,cope,stubbs,richey,overton,trotter,sprague,cordero,butcher,stiles,burgos,woodson,horner,bassett,purcell,haskins,akins,ziegler,spaulding,hadley,grubbs,sumner,murillo,zavala,shook,lockwood,driscoll,dahl,thorpe,redmond,putnam,mcwilliams,mcrae,romano,joiner,sadler,hedrick,hager,hagen,fitch,coulter,thacker,mansfield,langston,guidry,ferreira,corley,conn,rossi,lackey,baez,saenz,mcnamara,mcmullen,mckenna,mcdonough,link,engel,browne,roper,peacock,eubanks,drummond,stringer,pritchett,parham,mims,landers,ham,grayson,schafer,egan,timmons,ohara,keen,hamlin,finn,cortes,mcnair,nadeau,moseley,michaud,rosen,oakes,kurtz,jeffers,calloway,beal,bautista,winn,suggs,stern,stapleton,lyles,laird,montano,dawkins,hagan,goldman,bryson,barajas,lovett,segura,metz,lockett,langford,hinson,eastman,hooks,smallwood,shapiro,crowell,whalen,triplett,chatman,aldrich,cahill,youngblood,ybarra,stallings,sheets,reeder,connelly,bateman,abernathy,winkler,wilkes,masters,hackett,granger,gillis,schmitz,sapp,napier,souza,lanier,gomes,weir,otero,ledford,burroughs,babcock,ventura,siegel,dugan,bledsoe,atwood,wray,varner,spangler,anaya,staley,kraft,fournier,belanger,wolff,thorne,bynum,burnette,boykin,swenson,purvis,pina,khan,duvall,darby,xiong,kauffman,healy,engle,benoit,valle,steiner,spicer,shaver,randle,lundy,dow,chin,calvert,staton,neff,kearney,darden,oakley,medeiros,mccracken,crenshaw,block,perdue,dill,whittaker,tobin,washburn,hogue,goodrich,easley,bravo,dennison,shipley,kerns,jorgensen,crain,villalobos,maurer,longoria,keene,coon,witherspoon,staples,pettit,kincaid,eason,madrid,echols,lusk,stahl,currie,thayer,shultz,mcnally,seay,north,maher,gagne,barrow,nava,moreland,honeycutt,hearn,diggs,caron,whitten,westbrook,stovall,ragland,munson,meier,looney,kimble,jolly,hobson,goddard,culver,burr,presley,negron,connell,tovar,huddleston,ashby,salter,root,pendleton,oleary,nickerson,myrick,judd,jacobsen,bain,adair,starnes,matos,busby,herndon,hanley,bellamy,doty,bartley,yazzie,rowell,parson,gifford,cullen,christiansen,benavides,barnhart,talbot,mock,crandall,connors,bonds,whitt,gage,bergman,arredondo,addison,lujan,dowdy,jernigan,huynh,bouchard,dutton,rhoades,ouellette,kiser,herrington,hare,blackman,babb,allred,rudd,paulson,ogden,koenig,geiger,begay,parra,lassiter,hawk,esposito,cho,waldron,ransom,prather,chacon,vick,sands,roark,parr,mayberry,greenberg,coley,bruner,whitman,skaggs,shipman,leary,hutton,romo,medrano,ladd,kruse,askew,schulz,alfaro,tabor,mohr,gallo,bermudez,pereira,bliss,reaves,flint,comer,woodall,naquin,guevara,delong,carrier,pickens,brand,tilley,schaffer,lim,knutson,fenton,doran,chu,vogt,vann,prescott,mclain,landis,corcoran,zapata,hyatt,hemphill,faulk,dove,boudreaux,aragon,whitlock,trejo,tackett,shearer,saldana,hanks,mckinnon,koehler,bourgeois,keyes,goodson,foote,lunsford,goldsmith,flood,winslow,sams,reagan,mccloud,hough,esquivel,naylor,loomis,coronado,ludwig,braswell,bearden,fagan,ezell,edmondson,cyr,cronin,nunn,lemon,guillory,grier,dubose,traylor,ryder,dobbins,coyle,aponte,whitmore,smalls,rowan,malloy,cardona,braxton,borden,humphries,carrasco,ruff,metzger,huntley,hinojosa,finney,madsen,hills,ernst,dozier,burkhart,bowser,peralta,daigle,whittington,sorenson,saucedo,roche,redding,fugate,avalos,waite,lind,huston,hay,hawthorne,hamby,boyles,boles,regan,faust,crook,beam,barger,hinds,gallardo,willoughby,willingham,eckert,busch,zepeda,worthington,tinsley,hoff,hawley,carmona,varela,rector,newcomb,kinsey,dube,whatley,ragsdale,bernstein,becerra,yost,mattson,felder,cheek,handy,grossman,gauthier,escobedo,braden,beckman,mott,hillman,flaherty,dykes,doe,stockton,stearns,lofton,coats,cavazos,beavers,barrios,parish,mosher,cardwell,coles,burnham,weller,lemons,beebe,aguilera,parnell,harman,couture,alley,schumacher,redd,dobbs,blum,blalock,merchant,ennis,denson,cottrell,brannon,bagley,aviles,watt,sousa,rosenthal,rooney,dietz,blank,paquette,mcclelland,duff,velasco,lentz,grubb,burrows,barbour,ulrich,shockley,rader,beyer,mixon,layton,altman,weathers,stoner,squires,shipp,priest,lipscomb,cutler,caballero,zimmer,willett,thurston,storey,medley,epperson,shah,mcmillian,baggett,torrez,laws,hirsch,dent,poirier,peachey,farrar,creech,barth,trimble,dupre,albrecht,sample,lawler,crisp,conroy,wetzel,nesbitt,murry,jameson,wilhelm,patten,minton,matson,kimbrough,iverson,guinn,croft,toth,pulliam,nugent,newby,littlejohn,dias,canales,bernier,baron,singletary,renteria,pruett,mchugh,mabry,landrum,brower,stoddard,cagle,stjohn,scales,kohler,kellogg,hopson,gant,tharp,gann,zeigler,pringle,hammons,fairchild,deaton,chavis,carnes,rowley,matlock,kearns,irizarry,carrington,starkey,lopes,jarrell,craven,baum,spain,littlefield,linn,humphreys,etheridge,cuellar,chastain,bundy,speer,skelton,quiroz,pyle,portillo,ponder,moulton,machado,liu,killian,hutson,hitchcock,dowling,cloud,burdick,spann,pedersen,levin,leggett,hayward,hacker,dietrich,beaulieu,barksdale,wakefield,snowden,briscoe,bowie,berman,ogle,mcgregor,laughlin,helm,burden,wheatley,schreiber,pressley,parris,alaniz,agee,urban,swann,snodgrass,schuster,radford,monk,mattingly,harp,girard,cheney,yancey,wagoner,ridley,lombardo,lau,hudgins,gaskins,duckworth,coe,coburn,willey,prado,newberry,magana,hammonds,elam,whipple,slade,serna,ojeda,liles,dorman,diehl,upton,reardon,michaels,goetz,eller,bauman,baer,layne,hummel,brenner,amaya,adamson,ornelas,dowell,cloutier,castellanos,wing,wellman,saylor,orourke,moya,montalvo,kilpatrick,durbin,shell,oldham,garvin,foss,branham,bartholomew,templeton,maguire,holton,rider,monahan,mccormack,beaty,anders,streeter,nieto,nielson,moffett,lankford,keating,heck,gatlin,delatorre,callaway,adcock,worrell,unger,robinette,nowak,jeter,brunner,steen,parrott,overstreet,nobles,montanez,clevenger,brinkley,trahan,quarles,pickering,pederson,jansen,grantham,gilchrist,crespo,aiken,schell,schaeffer,lorenz,leyva,harms,dyson,wallis,pease,leavitt,cavanaugh,batts,warden,seaman,rockwell,quezada,paxton,linder,houck,fontaine,durant,caruso,adler,pimentel,mize,lytle,cleary,cason,acker,switzer,isaacs,higginbotham,han,waterman,vandyke,stamper,sisk,shuler,riddick,mcmahan,levesque,hatton,bronson,bollinger,arnett,okeefe,gerber,gannon,farnsworth,baughman,silverman,satterfield,mccrary,kowalski,grigsby,greco,cabral,trout,rinehart,mahon,linton,gooden,curley,baugh,wyman,weiner,schwab,schuler,morrissey,mahan,bunn,thrasher,spear,waggoner,qualls,purdy,mcwhorter,mauldin,gilman,perryman,newsom,menard,martino,graf,billingsley,artis,simpkins,salisbury,quintanilla,gilliland,fraley,foust,crouse,scarborough,ngo,grissom,fultz,marlow,markham,madrigal,lawton,barfield,whiting,varney,schwarz,gooch,arce,wheat,truong,poulin,hurtado,selby,gaither,fortner,culpepper,coughlin,brinson,boudreau,barkley,bales,stepp,holm,tan,schilling,morrell,kahn,heaton,gamez,causey,turpin,shanks,schrader,meek,isom,hardison,carranza,yanez,scroggins,schofield,runyon,ratcliff,murrell,moeller,irby,currier,butterfield,yee,ralston,pullen,pinson,estep,carbone,hawks,ellington,casillas,spurlock,sikes,motley,mccartney,kruger,isbell,houle,burk,tomlin,quigley,neumann,lovelace,fennell,cheatham,bustamante,skidmore,hidalgo,forman,culp,bowens,betancourt,aquino,robb,rea,milner,martel,gresham,wiles,ricketts,dowd,collazo,bostic,blakely,sherrod,kenyon,gandy,ebert,deloach,allard,sauer,robins,olivares,gillette,chestnut,bourque,paine,hite,hauser,devore,crawley,chapa,talbert,poindexter,meador,mcduffie,mattox,kraus,harkins,choate,wren,sledge,sanborn,kinder,geary,cornwell,barclay,abney,seward,rhoads,howland,fortier,benner,vines,tubbs,troutman,rapp,mccurdy,deluca,westmoreland,havens,guajardo,ely,clary,seal,meehan,herzog,guillen,ashcraft,waugh,renner,milam,elrod,churchill,breaux,bolin,asher,windham,tirado,pemberton,nolen,noland,knott,emmons,cornish,christenson,brownlee,barbee,waldrop,pitt,olvera,lombardi,gruber,gaffney,eggleston,banda,archuleta,slone,prewitt,pfeiffer,nettles,mena,mcadams,henning,gardiner,cromwell,chisholm,burleson,vest,oglesby,mccarter,lumpkin,grey,wofford,vanhorn,thorn,teel,swafford,stclair,stanfield,ocampo,herrmann,hannon,arsenault,roush,mcalister,hiatt,gunderson,forsythe,duggan,delvalle,cintron,wilks,weinstein,uribe,rizzo,noyes,mclendon,gurley,bethea,winstead,maples,guyton,giordano,alderman,valdes,polanco,pappas,lively,grogan,griffiths,arevalo,whitson,sowell,rendon,fernandes,farrow,benavidez,ayres,alicea,stump,smalley,seitz,schulte,gilley,gallant,canfield,wolford,omalley,mcnutt,mcnulty,mcgovern,hardman,harbin,cowart,chavarria,brink,beckett,bagwell,armstead,anglin,abreu,reynoso,krebs,jett,hoffmann,greenfield,forte,burney,broome,sisson,trammell,partridge,mace,lomax,lemieux,gossett,frantz,fogle,cooney,broughton,pence,paulsen,muncy,mcarthur,hollins,beauchamp,withers,osorio,mulligan,hoyle,foy,dockery,cockrell,begley,amador,roby,rains,lindquist,gentile,everhart,bohannon,wylie,sommers,purnell,fortin,dunning,breeden,vail,phelan,phan,marx,cosby,colburn,boling,biddle,ledesma,gaddis,denney,chow,bueno,berrios,wicker,tolliver,thibodeaux,nagle,lavoie,fisk,crist,barbosa,reedy,march,locklear,kolb,himes,behrens,beckwith,weems,wahl,shorter,shackelford,rees,muse,cerda,valadez,thibodeau,saavedra,ridgeway,reiter,mchenry,majors,lachance,keaton,ferrara,clemens,blocker,applegate,paz,needham,mojica,kuykendall,hamel,escamilla,doughty,burchett,ainsworth,vidal,upchurch,thigpen,strauss,spruill,sowers,riggins,ricker,mccombs,harlow,buffington,sotelo,olivas,negrete,morey,macon,logsdon,lapointe,bigelow,bello,westfall,stubblefield,peak,lindley,hein,hawes,farrington,breen,birch,wilde,steed,sepulveda,reinhardt,proffitt,minter,messina,mcnabb,maier,keeler,gamboa,donohue,basham,shinn,crooks,cota,borders,bills,bachman,tisdale,tavares,schmid,pickard,gulley,fonseca,delossantos,condon,batista,wicks,wadsworth,martell,littleton,ison,haag,folsom,brumfield,broyles,brito,mireles,mcdonnell,leclair,hamblin,gough,fanning,binder,winfield,whitworth,soriano,palumbo,newkirk,mangum,hutcherson,comstock,carlin,beall,bair,wendt,watters,walling,putman,otoole,morley,mares,lemus,keener,hundley,dial,damico,billups,strother,mcfarlane,lamm,eaves,crutcher,caraballo,canty,atwell,taft,siler,rust,rawls,rawlings,prieto,mcneely,mcafee,hulsey,hackney,galvez,escalante,delagarza,crider,charlton,bandy,wilbanks,stowe,steinberg,renfro,masterson,massie,lanham,haskell,hamrick,fort,dehart,burdette,branson,bourne,babin,aleman,worthy,tibbs,smoot,slack,paradis,mull,luce,houghton,gantt,furman,danner,christianson,burge,ashford,arndt,almeida,stallworth,shade,searcy,sager,noonan,mclemore,mcintire,maxey,lavigne,jobe,ferrer,falk,coffin,byrnes,aranda,apodaca,stamps,rounds,peek,olmstead,lewandowski,kaminski,dunaway,bruns,brackett,amato,reich,mcclung,lacroix,koontz,herrick,hardesty,flanders,cousins,cato,cade,vickery,shank,nagel,dupuis,croteau,cotter,cable,stuckey,stine,porterfield,pauley,nye,moffitt,knudsen,hardwick,goforth,dupont,blunt,barrows,barnhill,shull,rash,loftis,lemay,kitchens,horvath,grenier,fuchs,fairbanks,culbertson,calkins,burnside,beattie,ashworth,albertson,wertz,vaught,vallejo,turk,tuck,tijerina,sage,peterman,marroquin,marr,lantz,hoang,demarco,daily,cone,berube,barnette,wharton,stinnett,slocum,scanlon,sander,pinto,mancuso,lima,headley,epstein,counts,clarkson,carnahan,boren,arteaga,adame,zook,whittle,whitehurst,wenzel,saxton,reddick,puente,handley,haggerty,earley,devlin,chaffin,cady,acuna,solano,sigler,pollack,pendergrass,ostrander,janes,francois,crutchfield,chamberlin,brubaker,baptiste,willson,reis,neeley,mullin,mercier,lira,layman,keeling,higdon,espinal,chapin,warfield,toledo,pulido,peebles,nagy,montague,mello,lear,jaeger,hogg,graff,furr,soliz,poore,mendenhall,mclaurin,maestas,gable,barraza,tillery,snead,pond,neill,mcculloch,mccorkle,lightfoot,hutchings,holloman,harness,dorn,council,bock,zielinski,turley,treadwell,stpierre,starling,somers,oswald,merrick,easterling,bivens,truitt,poston,parry,ontiveros,olivarez,moreau,medlin,lenz,knowlton,fairley,cobbs,chisolm,bannister,woodworth,toler,ocasio,noriega,neuman,moye,milburn,mcclanahan,lilley,hanes,flannery,dellinger,danielson,conti,blodgett,beers,weatherford,strain,karr,hitt,denham,custer,coble,clough,casteel,bolduc,batchelor,ammons,whitlow,tierney,staten,sibley,seifert,schubert,salcedo,mattison,laney,haggard,grooms,dix,dees,cromer,cooks,colson,caswell,zarate,swisher,shin,ragan,pridgen,mcvey,matheny,lafleur,franz,ferraro,dugger,whiteside,rigsby,mcmurray,lehmann,jacoby,hildebrand,hendrick,headrick,goad,fincher,drury,borges,archibald,albers,woodcock,trapp,soares,seaton,monson,luckett,lindberg,kopp,keeton,hsu,healey,garvey,gaddy,fain,burchfield,wentworth,strand,stack,spooner,saucier,sales,ricci,plunkett,pannell,ness,leger,hoy,freitas,fong,elizondo,duval,beaudoin,urbina,rickard,partin,moe,mcgrew,mcclintock,ledoux,forsyth,faison,devries,bertrand,wasson,tilton,scarbrough,leung,irvine,garber,denning,corral,colley,castleberry,bowlin,bogan,beale,baines,trice,rayburn,parkinson,pak,nunes,mcmillen,leahy,kimmel,higgs,fulmer,carden,bedford,taggart,spearman,register,prichard,morrill,koonce,heinz,hedges,guenther,grice,findley,dover,creighton,boothe,bayer,arreola,vitale,valles,raney,osgood,hanlon,burley,bounds,worden,weatherly,vetter,tanaka,stiltner,nevarez,mosby,montero,melancon,harter,hamer,goble,gladden,gist,ginn,akin,zaragoza,towns,tarver,sammons,royster,oreilly,muir,morehead,luster,kingsley,kelso,grisham,glynn,baumann,alves,yount,tamayo,paterson,oates,menendez,longo,hargis,gillen,desantis,breedlove,sumpter,scherer,rupp,reichert,heredia,creel,cohn,clemmons,casas,bickford,belton,bach,williford,whitcomb,tennant,sutter,stull,sessions,mccallum,langlois,keel,keegan,dangelo,dancy,damron,clapp,clanton,bankston,oliveira,mintz,mcinnis,martens,mabe,laster,jolley,hildreth,hefner,glaser,duckett,demers,brockman,blais,alcorn,agnew,toliver,tice,seeley,najera,musser,mcfall,laplante,galvin,fajardo,doan,coyne,copley,clawson,cheung,barone,wynne,woodley,tremblay,stoll,sparrow,sparkman,schweitzer,sasser,samples,roney,legg,heim,farias,colwell,christman,bratcher,winchester,upshaw,southerland,sorrell,sells,mount,mccloskey,martindale,luttrell,loveless,lovejoy,linares,latimer,embry,coombs,bratton,bostick,venable,tuggle,toro,staggs,sandlin,jefferies,heckman,griffis,crayton,clem,browder,thorton,sturgill,sprouse,royer,rousseau,ridenour,pogue,perales,peeples,metzler,mesa,mccutcheon,mcbee,hornsby,heffner,corrigan,armijo,vue,plante,peyton,paredes,macklin,hussey,hodgson,granados,frias,becnel,batten,almanza,turney,teal,sturgeon,meeker,mcdaniels,limon,keeney,kee,hutto,holguin,gorham,fishman,fierro,blanchette,rodrigue,reddy,osburn,oden,lerma,kirkwood,keefer,haugen,hammett,chalmers,brinkman,baumgartner,valerio,tellez,steffen,shumate,sauls,ripley,kemper,jacks,guffey,evers,craddock,carvalho,blaylock,banuelos,balderas,wooden,wheaton,turnbull,shuman,pointer,mosier,mccue,ligon,kozlowski,johansen,ingle,herr,briones,snipes,rickman,pipkin,pantoja,orosco,moniz,lawless,kunkel,hibbard,galarza,enos,bussey,schott,salcido,perreault,mcdougal,mccool,haight,garris,ferry,easton,conyers,atherton,wimberly,utley,spellman,smithson,slagle,ritchey,rand,petit,osullivan,oaks,nutt,mcvay,mccreary,mayhew,knoll,jewett,harwood,cardoza,ashe,arriaga,zeller,wirth,whitmire,stauffer,rountree,redden,mccaffrey,martz,larose,langdon,humes,gaskin,faber,devito,cass,almond,wingfield,wingate,villareal,tyner,smothers,severson,reno,pennell,maupin,leighton,janssen,hassell,hallman,halcomb,folse,fitzsimmons,fahey,cranford,bolen,battles,battaglia,wooldridge,trask,rosser,regalado,mcewen,keefe,fuqua,echevarria,caro,boynton,andrus,viera,vanmeter,taber,spradlin,seibert,provost,prentice,oliphant,laporte,hwang,hatchett,hass,greiner,freedman,covert,chilton,byars,wiese,venegas,swank,shrader,roberge,mullis,mortensen,mccune,marlowe,kirchner,keck,isaacson,hostetler,halverson,gunther,griswold,fenner,durden,blackwood,ahrens,sawyers,savoy,nabors,mcswain,mackay,loy,lavender,lash,labbe,jessup,fullerton,cruse,crittenden,correia,centeno,caudle,canady,callender,alarcon,ahern,winfrey,tribble,styles,salley,roden,musgrove,minnick,fortenberry,carrion,bunting,batiste,whited,underhill,stillwell,rauch,pippin,perrin,messenger,mancini,lister,kinard,hartmann,fleck,broadway,wilt,treadway,thornhill,spalding,rafferty,pitre,patino,ordonez,linkous,kelleher,homan,galbraith,feeney,curtin,coward,camarillo,buss,bunnell,bolt,beeler,autry,alcala,witte,wentz,stidham,shively,nunley,meacham,martins,lemke,lefebvre,hynes,horowitz,hoppe,holcombe,dunne,derr,cochrane,brittain,bedard,beauregard,torrence,strunk,soria,simonson,shumaker,scoggins,oconner,moriarty,kuntz,ives,hutcheson,horan,hales,garmon,fitts,bohn,atchison,wisniewski,vanwinkle,sturm,sallee,prosser,moen,lundberg,kunz,kohl,keane,jorgenson,jaynes,funderburk,freed,durr,creamer,cosgrove,batson,vanhoose,thomsen,teeter,smyth,redmon,orellana,maness,heflin,goulet,frick,forney,bunker,asbury,aguiar,talbott,southard,mowery,mears,lemmon,krieger,hickson,elston,duong,delgadillo,dayton,dasilva,conaway,catron,bruton,bradbury,bordelon,bivins,bittner,bergstrom,beals,abell,whelan,tejada,pulley,pino,norfleet,nealy,maes,loper,gatewood,frierson,freund,finnegan,cupp,covey,catalano,boehm,bader,yoon,walston,tenney,sipes,rawlins,medlock,mccaskill,mccallister,marcotte,maclean,hughey,henke,harwell,gladney,gilson,dew,chism,caskey,brandenburg,baylor,villasenor,veal,thatcher,stegall,shore,petrie,nowlin,navarrete,muhammad,lombard,loftin,lemaster,kroll,kovach,kimbrell,kidwell,hershberger,fulcher,eng,cantwell,bustos,boland,bobbitt,binkley,wester,weis,verdin,tiller,sisco,sharkey,seymore,rosenbaum,rohr,quinonez,pinkston,nation,malley,logue,lessard,lerner,lebron,krauss,klinger,halstead,haller,getz,burrow,alger,shores,pfeifer,perron,nelms,munn,mcmaster,mckenney,manns,knudson,hutchens,huskey,goebel,flagg,cushman,click,castellano,carder,bumgarner,wampler,spinks,robson,neel,mcreynolds,mathias,maas,loera,kasper,jenson,florez,coons,buckingham,brogan,berryman,wilmoth,wilhite,thrash,shephard,seidel,schulze,roldan,pettis,obryan,maki,mackie,hatley,frazer,fiore,chesser,bui,bottoms,bisson,benefield,allman,wilke,trudeau,timm,shifflett,rau,mundy,milliken,mayers,leake,kohn,huntington,horsley,hermann,guerin,fryer,frizzell,foret,flemming,fife,criswell,carbajal,bozeman,boisvert,angulo,wallen,tapp,silvers,ramsay,oshea,orta,moll,mckeever,mcgehee,linville,kiefer,ketchum,howerton,groce,gass,fusco,corbitt,betz,bartels,amaral,aiello,yoo,weddle,sperry,seiler,runyan,raley,overby,osteen,olds,mckeown,matney,lauer,lattimore,hindman,hartwell,fredrickson,fredericks,espino,clegg,carswell,cambell,burkholder,woodbury,welker,totten,thornburg,theriault,stitt,stamm,stackhouse,scholl,saxon,rife,razo,quinlan,pinkerton,olivo,nesmith,nall,mattos,lafferty,justus,giron,geer,fielder,drayton,dortch,conners,conger,boatwright,billiot,barden,armenta,tibbetts,steadman,slattery,rinaldi,raynor,pinckney,pettigrew,milne,matteson,halsey,gonsalves,fellows,durand,desimone,cowley,cowles,brill,barham,barela,barba,ashmore,withrow,valenti,tejeda,spriggs,sayre,salerno,peltier,peel,merriman,matheson,lowman,lindstrom,hyland,giroux,earls,dugas,dabney,collado,briseno,baxley,whyte,wenger,vanover,vanburen,thiel,schindler,schiller,rigby,pomeroy,passmore,marble,manzo,mahaffey,lindgren,laflamme,greathouse,fite,calabrese,bayne,yamamoto,wick,townes,thames,reinhart,peeler,naranjo,montez,mcdade,mast,markley,marchand,leeper,kellum,hudgens,hennessey,hadden,gainey,coppola,borrego,bolling,beane,ault,slaton,poland,pape,null,mulkey,lightner,langer,hillard,glasgow,ethridge,enright,derosa,baskin,weinberg,turman,somerville,pardo,noll,lashley,ingraham,hiller,hendon,glaze,cothran,cooksey,conte,carrico,abner,wooley,swope,summerlin,sturgis,sturdivant,stott,spurgeon,spillman,speight,roussel,popp,nutter,mckeon,mazza,magnuson,lanning,kozak,jankowski,heyward,forster,corwin,callaghan,bays,wortham,usher,theriot,sayers,sabo,poling,loya,lieberman,laroche,labelle,howes,harr,garay,fogarty,everson,durkin,dominquez,chaves,chambliss,witcher,vieira,vandiver,terrill,stoker,schreiner,moorman,liddell,lew,lawhorn,krug,irons,hylton,hollenbeck,herrin,hembree,goolsby,goodin,gilmer,foltz,dinkins,daughtry,caban,brim,briley,bilodeau,wyant,vergara,tallent,swearingen,stroup,scribner,quillen,pitman,monaco,mccants,maxfield,martinson,holtz,flournoy,brookins,brody,baumgardner,straub,sills,roybal,roundtree,oswalt,mcgriff,mcdougall,mccleary,maggard,gragg,gooding,godinez,doolittle,donato,cowell,cassell,bracken,appel,zambrano,reuter,perea,nakamura,monaghan,mickens,mcclinton,mcclary,marler,kish,judkins,gilbreath,freese,flanigan,felts,erdmann,dodds,chew,brownell,boatright,barreto,slayton,sandberg,saldivar,pettway,odum,narvaez,moultrie,montemayor,merrell,lees,keyser,hoke,hardaway,hannan,gilbertson,fogg,dumont,deberry,coggins,buxton,bucher,broadnax,beeson,araujo,appleton,amundson,aguayo,ackley,yocum,worsham,shivers,sanches,sacco,robey,rhoden,pender,ochs,mccurry,madera,luong,knotts,jackman,heinrich,hargrave,gault,comeaux,chitwood,caraway,boettcher,bernhardt,barrientos,zink,wickham,whiteman,thorp,stillman,settles,schoonover,roque,riddell,pilcher,phifer,novotny,macleod,hardee,haase,grider,doucette,clausen,bevins,beamon,badillo,tolley,tindall,soule,snook,seale,pitcher,pinkney,pellegrino,nowell,nemeth,mondragon,mclane,lundgren,ingalls,hudspeth,hixson,gearhart,furlong,downes,dibble,deyoung,cornejo,camara,brookshire,boyette,wolcott,surratt,sellars,segal,salyer,reeve,rausch,labonte,haro,gower,freeland,fawcett,eads,driggers,donley,collett,bromley,boatman,ballinger,baldridge,volz,trombley,stonge,shanahan,rivard,rhyne,pedroza,matias,jamieson,hedgepeth,hartnett,estevez,eskridge,denman,chiu,chinn,catlett,carmack,buie,bechtel,beardsley,bard,ballou,ulmer,skeen,robledo,rincon,reitz,piazza,munger,moten,mcmichael,loftus,ledet,kersey,groff,fowlkes,folk,crumpton,clouse,bettis,villagomez,timmerman,strom,santoro,roddy,penrod,musselman,macpherson,leboeuf,harless,haddad,guido,golding,fulkerson,fannin,dulaney,dowdell,cottle,ceja,cate,bosley,benge,albritton,voigt,trowbridge,soileau,seely,rohde,pearsall,paulk,orth,nason,mota,mcmullin,marquardt,madigan,hoag,gillum,gabbard,fenwick,eck,danforth,cushing,cress,creed,cazares,casanova,bey,bettencourt,barringer,baber,stansberry,schramm,rutter,rivero,oquendo,necaise,mouton,montenegro,miley,mcgough,marra,macmillan,lamontagne,jasso,horst,hetrick,heilman,gaytan,gall,fortney,dingle,desjardins,dabbs,burbank,brigham,breland,beaman,arriola,yarborough,wallin,toscano,stowers,reiss,pichardo,orton,michels,mcnamee,mccrory,leatherman,kell,keister,horning,hargett,guay,ferro,deboer,dagostino,carper,blanks,beaudry,towle,tafoya,stricklin,strader,soper,sonnier,sigmon,schenk,saddler,pedigo,mendes,lunn,lohr,lahr,kingsbury,jarman,hume,holliman,hofmann,haworth,harrelson,hambrick,flick,edmunds,dacosta,crossman,colston,chaplin,carrell,budd,weiler,waits,valentino,trantham,tarr,solorio,roebuck,powe,plank,pettus,palm,pagano,mink,luker,leathers,joslin,hartzell,gambrell,deutsch,cepeda,carty,caputo,brewington,bedell,ballew,applewhite,warnock,walz,urena,tudor,reel,pigg,parton,mickelson,meagher,mclellan,mcculley,mandel,leech,lavallee,kraemer,kling,kipp,kehoe,hochstetler,harriman,gregoire,grabowski,gosselin,gammon,fancher,edens,desai,brannan,armendariz,woolsey,whitehouse,whetstone,ussery,towne,testa,tallman,studer,strait,steinmetz,sorrells,sauceda,rolfe,paddock,mitchem,mcginn,mccrea,lovato,hazen,gilpin,gaynor,fike,devoe,delrio,curiel,burkhardt,bode,backus,zinn,watanabe,wachter,vanpelt,turnage,shaner,schroder,sato,riordan,quimby,portis,natale,mckoy,mccown,kilmer,hotchkiss,hesse,halbert,gwinn,godsey,delisle,chrisman,canter,arbogast,angell,acree,yancy,woolley,wesson,weatherspoon,trainor,stockman,spiller,sipe,rooks,reavis,propst,porras,neilson,mullens,loucks,llewellyn,kumar,koester,klingensmith,kirsch,kester,honaker,hodson,hennessy,helmick,garrity,garibay,fee,drain,casarez,callis,botello,aycock,avant,wingard,wayman,tully,theisen,szymanski,stansbury,segovia,rainwater,preece,pirtle,padron,mincey,mckelvey,mathes,larrabee,kornegay,klug,ingersoll,hecht,germain,eggers,dykstra,deering,decoteau,deason,dearing,cofield,carrigan,bonham,bahr,aucoin,appleby,almonte,yager,womble,wimmer,weimer,vanderpool,stancil,sprinkle,romine,remington,pfaff,peckham,olivera,meraz,maze,lathrop,koehn,hazelton,halvorson,hallock,haddock,ducharme,dehaven,caruthers,brehm,bosworth,bost,bias,beeman,basile,bane,aikens,wold,walther,tabb,suber,strawn,stocker,shirey,schlosser,riedel,rembert,reimer,pyles,peele,merriweather,letourneau,latta,kidder,hixon,hillis,hight,herbst,henriquez,haygood,hamill,gabel,fritts,eubank,dawes,correll,cha,bushey,buchholz,brotherton,botts,barnwell,auger,atchley,westphal,veilleux,ulloa,stutzman,shriver,ryals,prior,pilkington,moyers,marrs,mangrum,maddux,lockard,laing,kuhl,harney,hammock,hamlett,felker,doerr,depriest,carrasquillo,carothers,bogle,bischoff,bergen,albanese,wyckoff,vermillion,vansickle,thibault,tetreault,stickney,shoemake,ruggiero,rawson,racine,philpot,paschal,mcelhaney,mathison,legrand,lapierre,kwan,kremer,jiles,hilbert,geyer,faircloth,ehlers,egbert,desrosiers,dalrymple,cotten,cashman,cadena,breeding,boardman,alcaraz,ahn,wyrick,therrien,tankersley,strickler,puryear,plourde,pattison,pardue,mcginty,mcevoy,landreth,kuhns,koon,hewett,giddens,emerick,eades,deangelis,cosme,ceballos,birdsong,benham,bemis,armour,anguiano,welborn,tsosie,storms,shoup,sessoms,samaniego,rood,rojo,rhinehart,raby,northcutt,myer,munguia,morehouse,mcdevitt,mallett,lozada,lemoine,kuehn,hallett,grim,gillard,gaylor,garman,gallaher,feaster,faris,darrow,dardar,coney,carreon,braithwaite,boylan,boyett,bixler,bigham,benford,barragan,barnum,zuber,wyche,westcott,vining,stoltzfus,simonds,shupe,sabin,ruble,rittenhouse,richman,perrone,mulholland,millan,lomeli,kite,jemison,hulett,holler,hickerson,herold,hazelwood,griffen,gause,forde,eisenberg,dilworth,charron,chaisson,brodie,bristow,breunig,brace,boutwell,bentz,belk,bayless,batchelder,baran,baeza,zimmermann,weathersby,volk,toole,theis,tedesco,searle,schenck,satterwhite,ruelas,rankins,partida,nesbit,morel,menchaca,levasseur,kaylor,johnstone,hulse,hollar,hersey,harrigan,harbison,guyer,gish,giese,gerlach,geller,geisler,falcone,elwell,doucet,deese,darr,corder,chafin,byler,bussell,burdett,brasher,bowe,bellinger,bastian,barner,alleyne,wilborn,weil,wegner,wales,tatro,spitzer,smithers,schoen,resendez,parisi,overman,obrian,mudd,moy,mclaren,maggio,lindner,lalonde,lacasse,laboy,killion,kahl,jessen,jamerson,houk,henshaw,gustin,graber,durst,duenas,davey,cundiff,conlon,colunga,coakley,chiles,capers,buell,bricker,bissonnette,birmingham,bartz,bagby,zayas,volpe,treece,toombs,thom,terrazas,swinney,skiles,silveira,shouse,senn,ramage,nez,moua,langham,kyles,holston,hoagland,herd,feller,denison,carraway,burford,bickel,ambriz,abercrombie,yamada,weidner,waddle,verduzco,thurmond,swindle,schrock,sanabria,rosenberger,probst,peabody,olinger,nazario,mccafferty,mcbroom,mcabee,mazur,matherne,mapes,leverett,killingsworth,heisler,griego,gosnell,frankel,franke,ferrante,fenn,ehrlich,christopherso,chasse,chancellor,caton,brunelle,bly,bloomfield,babbitt,azevedo,abramson,ables,abeyta,youmans,wozniak,wainwright,stowell,smitherman,samuelson,runge,rothman,rosenfeld,peake,owings,olmos,munro,moreira,leatherwood,larkins,krantz,kovacs,kizer,kindred,karnes,jaffe,hubbell,hosey,hauck,goodell,erdman,dvorak,doane,cureton,cofer,buehler,bierman,berndt,banta,abdullah,warwick,waltz,turcotte,torrey,stith,seger,sachs,quesada,pinder,peppers,pascual,paschall,parkhurst,ozuna,oster,nicholls,lheureux,lavalley,kimura,jablonski,haun,gourley,gilligan,derby,croy,cotto,cargill,burwell,burgett,buckman,booher,adorno,wrenn,whittemore,urias,szabo,sayles,saiz,rutland,rael,pharr,pelkey,ogrady,nickell,musick,moats,mather,massa,kirschner,kieffer,kellar,hendershot,gott,godoy,gadson,furtado,fiedler,erskine,dutcher,dever,daggett,chevalier,brake,ballesteros,amerson,wingo,waldon,trott,silvey,showers,schlegel,rue,ritz,pepin,pelayo,parsley,palermo,moorehead,mchale,lett,kocher,kilburn,iglesias,humble,hulbert,huckaby,hix,haven,hartford,hardiman,gurney,grigg,grasso,goings,fillmore,farber,depew,dandrea,dame,cowen,covarrubias,burrus,bracy,ardoin,thompkins,standley,radcliffe,pohl,persaud,parenteau,pabon,newson,newhouse,napolitano,mulcahy,malave,keim,hooten,hernandes,heffernan,hearne,greenleaf,glick,fuhrman,fetter,faria,dishman,dickenson,crites,criss,clapper,chenault,castor,casto,bugg,bove,bonney,ard,anderton,allgood,alderson,woodman,warrick,toomey,tooley,tarrant,summerville,stebbins,sokol,searles,schutz,schumann,scheer,remillard,raper,proulx,palmore,monroy,messier,melo,melanson,mashburn,manzano,lussier,jenks,huneycutt,hartwig,grimsley,fulk,fielding,fidler,engstrom,eldred,dantzler,crandell,calder,brumley,breton,brann,bramlett,boykins,bianco,bancroft,almaraz,alcantar,whitmer,whitener,welton,vineyard,rahn,paquin,mizell,mcmillin,mckean,marston,maciel,lundquist,liggins,lampkin,kranz,koski,kirkham,jiminez,hazzard,harrod,graziano,grammer,gendron,garrido,fordham,englert,dryden,demoss,deluna,crabb,comeau,brummett,blume,benally,wessel,vanbuskirk,thorson,stumpf,stockwell,reams,radtke,rackley,pelton,niemi,newland,nelsen,morrissette,miramontes,mcginley,mccluskey,marchant,luevano,lampe,lail,jeffcoat,infante,hinman,gaona,erb,eady,desmarais,decosta,dansby,choe,breckenridge,bostwick,borg,bianchi,alberts,wilkie,whorton,vargo,tait,soucy,schuman,ousley,mumford,lum,lippert,leath,lavergne,laliberte,kirksey,kenner,johnsen,izzo,hiles,gullett,greenwell,gaspar,galbreath,gaitan,ericson,delapaz,croom,cottingham,clift,bushnell,bice,beason,arrowood,waring,voorhees,truax,shreve,shockey,schatz,sandifer,rubino,rozier,roseberry,pieper,peden,nester,nave,murphey,malinowski,macgregor,lafrance,kunkle,kirkman,hipp,hasty,haddix,gervais,gerdes,gamache,fouts,fitzwater,dillingham,deming,deanda,cedeno,cannady,burson,bouldin,arceneaux,woodhouse,whitford,wescott,welty,weigel,torgerson,toms,surber,sunderland,sterner,setzer,riojas,pumphrey,puga,metts,mcgarry,mccandless,magill,lupo,loveland,llamas,leclerc,koons,kahler,huss,holbert,heintz,haupt,grimmett,gaskill,ellingson,dorr,dingess,deweese,desilva,crossley,cordeiro,converse,conde,caldera,cairns,burmeister,burkhalter,brawner,bott,youngs,vierra,valladares,shrum,shropshire,sevilla,rusk,rodarte,pedraza,nino,merino,mcminn,markle,mapp,lajoie,koerner,kittrell,kato,hyder,hollifield,heiser,hazlett,greenwald,fant,eldredge,dreher,delafuente,cravens,claypool,beecher,aronson,alanis,worthen,wojcik,winger,whitacre,wellington,valverde,valdivia,troupe,thrower,swindell,suttles,suh,stroman,spires,slate,shealy,sarver,sartin,sadowski,rondeau,rolon,rascon,priddy,paulino,nolte,munroe,molloy,mciver,lykins,loggins,lenoir,klotz,kempf,hupp,hollowell,hollander,haynie,harkness,harker,gottlieb,frith,eddins,driskell,doggett,densmore,charette,cassady,byrum,burcham,buggs,benn,whitted,warrington,vandusen,vaillancourt,steger,siebert,scofield,quirk,purser,plumb,orcutt,nordstrom,mosely,michalski,mcphail,mcdavid,mccraw,marchese,mannino,lefevre,largent,lanza,kress,isham,hunsaker,hoch,hildebrandt,guarino,grijalva,graybill,ewell,ewald,cusick,crumley,coston,cathcart,carruthers,bullington,bowes,blain,blackford,barboza,yingling,weiland,varga,silverstein,sievers,shuster,shumway,runnels,rumsey,renfroe,provencher,polley,mohler,middlebrooks,kutz,koster,groth,glidden,fazio,deen,chipman,chenoweth,champlin,cedillo,carrero,carmody,buckles,brien,boutin,bosch,berkowitz,altamirano,wilfong,wiegand,waites,truesdale,toussaint,tobey,tedder,steelman,sirois,schnell,robichaud,richburg,plumley,pizarro,piercy,ortego,oberg,neace,mertz,mcnew,matta,lapp,lair,kibler,howlett,hollister,hofer,hatten,hagler,falgoust,engelhardt,eberle,dombrowski,dinsmore,daye,casares,braud,balch,autrey,wendel,tyndall,strobel,stoltz,spinelli,serrato,rochester,reber,rathbone,palomino,nickels,mayle,mathers,mach,loeffler,littrell,levinson,leong,lemire,lejeune,lazo,lasley,koller,kennard,hoelscher,hintz,hagerman,greaves,fore,eudy,engler,corrales,cordes,brunet,bidwell,bennet,tyrrell,tharpe,swinton,stribling,southworth,sisneros,savoie,samons,ruvalcaba,ries,ramer,omara,mosqueda,millar,mcpeak,macomber,luckey,litton,lehr,lavin,hubbs,hoard,hibbs,hagans,futrell,exum,evenson,culler,carbaugh,callen,brashear,bloomer,blakeney,bigler,addington,woodford,unruh,tolentino,sumrall,stgermain,smock,sherer,rayner,pooler,oquinn,nero,mcglothlin,linden,kowal,kerrigan,ibrahim,harvell,hanrahan,goodall,geist,fussell,fung,ferebee,eley,eggert,dorsett,dingman,destefano,colucci,clemmer,burnell,brumbaugh,boddie,berryhill,avelar,alcantara,winder,winchell,vandenberg,trotman,thurber,thibeault,stlouis,stilwell,sperling,shattuck,sarmiento,ruppert,rumph,renaud,randazzo,rademacher,quiles,pearman,palomo,mercurio,lowrey,lindeman,lawlor,larosa,lander,labrecque,hovis,holifield,henninger,hawkes,hartfield,hann,hague,genovese,garrick,fudge,frink,eddings,dinh,cribbs,calvillo,bunton,brodeur,bolding,blanding,agosto,zahn,wiener,trussell,tew,tello,teixeira,speck,sharma,shanklin,sealy,scanlan,santamaria,roundy,robichaux,ringer,rigney,prevost,polson,nord,moxley,medford,mccaslin,mcardle,macarthur,lewin,lasher,ketcham,keiser,heine,hackworth,grose,grizzle,gillman,gartner,frazee,fleury,edson,edmonson,derry,cronk,conant,burress,burgin,broom,brockington,bolick,boger,birchfield,billington,baily,bahena,armbruster,anson,yoho,wilcher,tinney,timberlake,thoma,thielen,sutphin,stultz,sikora,serra,schulman,scheffler,santillan,rego,preciado,pinkham,mickle,luu,lomas,lizotte,lent,kellerman,keil,johanson,hernadez,hartsfield,haber,gorski,farkas,eberhardt,duquette,delano,cropper,cozart,cockerham,chamblee,cartagena,cahoon,buzzell,brister,brewton,blackshear,benfield,aston,ashburn,arruda,wetmore,weise,vaccaro,tucci,sudduth,stromberg,stoops,showalter,shears,runion,rowden,rosenblum,riffle,renfrow,peres,obryant,leftwich,lark,landeros,kistler,killough,kerley,kastner,hoggard,hartung,guertin,govan,gatling,gailey,fullmer,fulford,flatt,esquibel,endicott,edmiston,edelstein,dufresne,dressler,dickman,chee,busse,bonnett,berard,arena,yoshida,velarde,veach,vanhouten,vachon,tolson,tolman,tennyson,stites,soler,shutt,ruggles,rhone,pegues,ong,neese,muro,moncrief,mefford,mcphee,mcmorris,mceachern,mcclurg,mansour,mader,leija,lecompte,lafountain,labrie,jaquez,heald,hash,hartle,gainer,frisby,farina,eidson,edgerton,dyke,durrett,duhon,cuomo,cobos,cervantez,bybee,brockway,borowski,binion,beery,arguello,amaro,acton,yuen,winton,wigfall,weekley,vidrine,vannoy,tardiff,shoop,shilling,schick,safford,prendergast,pellerin,osuna,nissen,nalley,moller,messner,messick,merrifield,mcguinness,matherly,marcano,mahone,lemos,lebrun,jara,hoffer,herren,hecker,haws,haug,gwin,gober,gilliard,fredette,favela,echeverria,downer,donofrio,desrochers,crozier,corson,bechtold,argueta,aparicio,zamudio,westover,westerman,utter,troyer,thies,tapley,slavin,shirk,sandler,roop,raymer,radcliff,otten,moorer,millet,mckibben,mccutchen,mcavoy,mcadoo,mayorga,mastin,martineau,marek,madore,leflore,kroeger,kennon,jimerson,hostetter,hornback,hendley,hance,guardado,granado,gowen,goodale,flinn,fleetwood,fitz,durkee,duprey,dipietro,dilley,clyburn,brawley,beckley,arana,weatherby,vollmer,vestal,tunnell,trigg,tingle,takahashi,sweatt,storer,snapp,shiver,rooker,rathbun,poisson,perrine,perri,pastor,parmer,parke,pare,palmieri,nottingham,midkiff,mecham,mccomas,mcalpine,lovelady,lillard,lally,knopp,kile,kiger,haile,gupta,goldsberry,gilreath,fulks,friesen,franzen,flack,findlay,ferland,dreyer,dore,dennard,deckard,debose,crim,coulombe,cork,chancey,cantor,branton,bissell,barns,woolard,witham,wasserman,spiegel,shoffner,scholz,ruch,rossman,petry,palacio,paez,neary,mortenson,millsap,miele,menke,mckim,mcanally,martines,manor,lemley,larochelle,klaus,klatt,kaufmann,kapp,helmer,hedge,halloran,glisson,frechette,fontana,eagan,distefano,danley,creekmore,chartier,chaffee,carillo,burg,bolinger,berkley,benz,basso,bash,barrier,zelaya,woodring,witkowski,wilmot,wilkens,wieland,verdugo,urquhart,tsai,timms,swiger,swaim,sussman,pires,molnar,mcatee,lowder,loos,linker,landes,kingery,hufford,higa,hendren,hammack,hamann,gillam,gerhardt,edelman,eby,delk,deans,curl,constantine,cleaver,claar,casiano,carruth,carlyle,brophy,bolanos,bibbs,bessette,beggs,baugher,bartel,averill,andresen,amin,adames,via,valente,turnbow,tse,swink,sublett,stroh,stringfellow,ridgway,pugliese,poteat,ohare,neubauer,murchison,mingo,lemmons,kwon,kellam,kean,jarmon,hyden,hudak,hollinger,henkel,hemingway,hasson,hansel,halter,haire,ginsberg,gillispie,fogel,flory,etter,elledge,eckman,deas,currin,crafton,coomer,colter,claxton,bulter,braddock,bowyer,binns,bellows,baskerville,barros,ansley,woolf,wight,waldman,wadley,tull,trull,tesch,stouffer,stadler,slay,shubert,sedillo,santacruz,reinke,poynter,neri,neale,mowry,moralez,monger,mitchum,merryman,manion,macdougall,lux,litchfield,ley,levitt,lepage,lasalle,khoury,kavanagh,karns,ivie,huebner,hodgkins,halpin,garica,eversole,dutra,dunagan,duffey,dillman,dillion,deville,dearborn,damato,courson,coulson,burdine,bousquet,bonin,bish,atencio,westbrooks,wages,vaca,tye,toner,tillis,swett,struble,stanfill,solorzano,slusher,sipple,sim,silvas,shults,schexnayder,saez,rodas,rager,pulver,plaza,penton,paniagua,meneses,mcfarlin,mcauley,matz,maloy,magruder,lohman,landa,lacombe,jaimes,hom,holzer,holst,heil,hackler,grundy,gilkey,farnham,durfee,dunton,dunston,duda,dews,craver,corriveau,conwell,colella,chambless,bremer,boutte,bourassa,blaisdell,backman,babineaux,audette,alleman,towner,taveras,tarango,sullins,suiter,stallard,solberg,schlueter,poulos,pimental,owsley,okelley,nations,moffatt,metcalfe,meekins,medellin,mcglynn,mccowan,marriott,marable,lennox,lamoureux,koss,kerby,karp,isenberg,howze,hockenberry,highsmith,harbour,hallmark,gusman,greeley,giddings,gaudet,gallup,fleenor,eicher,edington,dimaggio,dement,demello,decastro,bushman,brundage,brooker,bourg,blackstock,bergmann,beaton,banister,argo,appling,wortman,watterson,villalpando,tillotson,tighe,sundberg,sternberg,stamey,shipe,seeger,scarberry,sattler,sain,rothstein,poteet,plowman,pettiford,penland,partain,pankey,oyler,ogletree,ogburn,moton,merkel,lucier,lakey,kratz,kinser,kershaw,josephson,imhoff,hendry,hammon,frisbie,friedrich,frawley,fraga,forester,eskew,emmert,drennan,doyon,dandridge,cawley,carvajal,bracey,belisle,batey,ahner,wysocki,weiser,veliz,tincher,sansone,sankey,sandstrom,rohrer,risner,pridemore,pfeffer,persinger,peery,oubre,nowicki,musgrave,murdoch,mullinax,mccary,mathieu,livengood,kyser,klink,kimes,kellner,kavanaugh,kasten,imes,hoey,hinshaw,hake,gurule,grube,grillo,geter,gatto,garver,garretson,farwell,eiland,dunford,decarlo,corso,colman,collard,cleghorn,chasteen,cavender,carlile,calvo,byerly,brogdon,broadwater,breault,bono,bergin,behr,ballenger,amick,tamez,stiffler,steinke,simmon,shankle,schaller,salmons,sackett,saad,rideout,ratcliffe,rao,ranson,plascencia,petterson,olszewski,olney,olguin,nilsson,nevels,morelli,montiel,monge,michaelson,mertens,mcchesney,mcalpin,mathewson,loudermilk,lineberry,liggett,kinlaw,kight,jost,hereford,hardeman,halpern,halliday,hafer,gaul,friel,freitag,forsberg,evangelista,doering,dicarlo,dendy,delp,deguzman,dameron,curtiss,cosper,cauthen,cao,bradberry,bouton,bonnell,bixby,bieber,beveridge,bedwell,barhorst,bannon,baltazar,baier,ayotte,attaway,arenas,abrego,turgeon,tunstall,thaxton,thai,tenorio,stotts,sthilaire,shedd,seabolt,scalf,salyers,ruhl,rowlett,robinett,pfister,perlman,parkman,nunnally,norvell,napper,modlin,mckellar,mcclean,mascarenas,leibowitz,ledezma,kuhlman,kobayashi,hunley,holmquist,hinkley,hartsell,gribble,gravely,fifield,eliason,doak,crossland,carleton,bridgeman,bojorquez,boggess,auten,woosley,whiteley,wexler,twomey,tullis,townley,standridge,santoyo,rueda,riendeau,revell,pless,ottinger,nigro,nickles,mulvey,menefee,mcshane,mcloughlin,mckinzie,markey,lockridge,lipsey,knisley,knepper,kitts,kiel,jinks,hathcock,godin,gallego,fikes,fecteau,estabrook,ellinger,dunlop,dudek,countryman,chauvin,chatham,bullins,brownfield,boughton,bloodworth,bibb,baucom,barbieri,aubin,armitage,alessi,absher,abbate,zito,woolery,wiggs,wacker,tynes,tolle,telles,tarter,swarey,strode,stockdale,stalnaker,spina,schiff,saari,risley,rameriz,rakes,pettaway,penner,paulus,palladino,omeara,montelongo,melnick,mehta,mcgary,mccourt,mccollough,marchetti,manzanares,lowther,leiva,lauderdale,lafontaine,kowalczyk,knighton,joubert,jaworski,ide,huth,hurdle,housley,hackman,gulick,gordy,gilstrap,gehrke,gebhart,gaudette,foxworth,essex,endres,dunkle,cimino,caddell,brauer,braley,bodine,blackmore,belden,backer,ayer,andress,wisner,vuong,valliere,twigg,tso,tavarez,strahan,steib,staub,sowder,seiber,schutt,scharf,schade,rodriques,risinger,renshaw,rahman,presnell,piatt,nieman,nevins,mcilwain,mcgaha,mccully,mccomb,massengale,macedo,lesher,kearse,jauregui,husted,hudnall,holmberg,hertel,hardie,glidewell,frausto,fassett,dalessandro,dahlgren,corum,constantino,conlin,colquitt,colombo,claycomb,cardin,buller,boney,bocanegra,biggers,benedetto,araiza,andino,albin,zorn,werth,weisman,walley,vanegas,ulibarri,towe,tedford,teasley,suttle,steffens,stcyr,squire,singley,sifuentes,shuck,schram,sass,rieger,ridenhour,rickert,richerson,rayborn,rabe,raab,pendley,pastore,ordway,moynihan,mellott,mckissick,mcgann,mccready,mauney,marrufo,lenhart,lazar,lafave,keele,kautz,jardine,jahnke,jacobo,hord,hardcastle,hageman,giglio,gehring,fortson,duque,duplessis,dicken,derosier,deitz,dalessio,cram,castleman,candelario,callison,caceres,bozarth,biles,bejarano,bashaw,avina,armentrout,alverez,acord,waterhouse,vereen,vanlandingham,uhl,strawser,shotwell,severance,seltzer,schoonmaker,schock,schaub,schaffner,roeder,rodrigez,riffe,rhine,rasberry,rancourt,railey,quade,pursley,prouty,perdomo,oxley,osterman,nickens,murphree,mounts,merida,maus,mattern,masse,martinelli,mangan,lutes,ludwick,loney,laureano,lasater,knighten,kissinger,kimsey,kessinger,honea,hollingshead,hockett,heyer,heron,gurrola,gove,glasscock,gillett,galan,featherstone,eckhardt,duron,dunson,dasher,culbreth,cowden,cowans,claypoole,churchwell,chabot,caviness,cater,caston,callan,byington,burkey,boden,beckford,atwater,archambault,alvey,alsup,whisenant,weese,voyles,verret,tsang,tessier,sweitzer,sherwin,shaughnessy,revis,remy,prine,philpott,peavy,paynter,parmenter,ovalle,offutt,nightingale,newlin,nakano,myatt,muth,mohan,mcmillon,mccarley,mccaleb,maxson,marinelli,maley,liston,letendre,kain,huntsman,hirst,hagerty,gulledge,greenway,grajeda,gorton,goines,gittens,frederickson,fanelli,embree,eichelberger,dunkin,dixson,dillow,defelice,chumley,burleigh,borkowski,binette,biggerstaff,berglund,beller,audet,arbuckle,allain,alfano,youngman,wittman,weintraub,vanzant,vaden,twitty,stollings,standifer,sines,shope,scalise,saville,posada,pisano,otte,nolasco,napoli,mier,merkle,mendiola,melcher,mejias,mcmurry,mccalla,markowitz,manis,mallette,macfarlane,lough,looper,landin,kittle,kinsella,kinnard,hobart,herald,helman,hellman,hartsock,halford,hage,gordan,glasser,gayton,gattis,gastelum,gaspard,frisch,fitzhugh,eckstein,eberly,dowden,despain,crumpler,crotty,cornelison,chouinard,chamness,catlin,cann,bumgardner,budde,branum,bradfield,braddy,borst,birdwell,bazan,banas,bade,arango,ahearn,addis,zumwalt,wurth,wilk,widener,wagstaff,urrutia,terwilliger,tart,steinman,staats,sloat,rives,riggle,revels,reichard,prickett,poff,pitzer,petro,pell,northrup,nicks,moline,mielke,maynor,mallon,magness,lingle,lindell,lieb,lesko,lebeau,lammers,lafond,kiernan,ketron,jurado,holmgren,hilburn,hayashi,hashimoto,harbaugh,guillot,gard,froehlich,feinberg,falco,dufour,drees,doney,diep,delao,daves,dail,crowson,coss,congdon,carner,camarena,butterworth,burlingame,bouffard,bloch,bilyeu,barta,bakke,baillargeon,avent,aquilar,ake,aho,zeringue,yarber,wolfson,vogler,voelker,truss,troxell,thrift,strouse,spielman,sistrunk,sevigny,schuller,schaaf,ruffner,routh,roseman,ricciardi,peraza,pegram,overturf,olander,odaniel,neu,millner,melchor,maroney,machuca,macaluso,livesay,layfield,laskowski,kwiatkowski,kilby,hovey,heywood,hayman,havard,harville,haigh,hagood,grieco,glassman,gebhardt,fleischer,fann,elson,eccles,cunha,crumb,blakley,bardwell,abshire,woodham,wines,welter,wargo,varnado,tutt,traynor,swaney,svoboda,stricker,stoffel,stambaugh,sickler,shackleford,selman,seaver,sansom,sanmiguel,royston,rourke,rockett,rioux,puleo,pitchford,nardi,mulvaney,middaugh,malek,leos,lathan,kujawa,kimbro,killebrew,houlihan,hinckley,herod,hepler,hamner,hammel,hallowell,gonsalez,gingerich,gambill,funkhouser,fricke,fewell,falkner,endsley,dulin,drennen,deaver,dambrosio,chadwell,castanon,burkes,brune,brisco,brinker,bowker,boldt,berner,beaumont,beaird,bazemore,barrick,albano,younts,wunderlich,weidman,vanness,toland,theobald,stickler,steiger,stanger,spies,spector,sollars,smedley,seibel,scoville,saito,rye,rummel,rowles,rouleau,roos,rogan,roemer,ream,raya,purkey,priester,perreira,penick,paulin,parkins,overcash,oleson,neves,muldrow,minard,midgett,michalak,melgar,mcentire,mcauliffe,marte,lydon,lindholm,leyba,langevin,lagasse,lafayette,kesler,kelton,kao,kaminsky,jaggers,humbert,huck,howarth,hinrichs,higley,gupton,guimond,gravois,giguere,fretwell,fontes,feeley,faucher,eichhorn,ecker,earp,dole,dinger,derryberry,demars,deel,copenhaver,collinsworth,colangelo,cloyd,claiborne,caulfield,carlsen,calzada,caffey,broadus,brenneman,bouie,bodnar,blaney,blanc,beltz,behling,barahona,yockey,winkle,windom,wimer,villatoro,trexler,teran,taliaferro,sydnor,swinson,snelling,smtih,simonton,simoneaux,simoneau,sherrer,seavey,scheel,rushton,rupe,ruano,rippy,reiner,reiff,rabinowitz,quach,penley,odle,nock,minnich,mckown,mccarver,mcandrew,longley,laux,lamothe,lafreniere,kropp,krick,kates,jepson,huie,howse,howie,henriques,haydon,haught,hartzog,harkey,grimaldo,goshorn,gormley,gluck,gilroy,gillenwater,giffin,fluker,feder,eyre,eshelman,eakins,detwiler,delrosario,davisson,catalan,canning,calton,brammer,botelho,blakney,bartell,averett,askins,aker,zak,worcester,witmer,wiser,winkelman,widmer,whittier,weitzel,wardell,wagers,ullman,tupper,tingley,tilghman,talton,simard,seda,scheller,sala,rundell,rost,roa,ribeiro,rabideau,primm,pinon,peart,ostrom,ober,nystrom,nussbaum,naughton,murr,moorhead,monti,monteiro,melson,meissner,mclin,mcgruder,marotta,makowski,majewski,madewell,lunt,lukens,leininger,lebel,lakin,kepler,jaques,hunnicutt,hungerford,hoopes,hertz,heins,halliburton,grosso,gravitt,glasper,gallman,gallaway,funke,fulbright,falgout,eakin,dostie,dorado,dewberry,derose,cutshall,crampton,costanzo,colletti,cloninger,claytor,chiang,canterbury,campagna,burd,brokaw,broaddus,bretz,brainard,binford,bilbrey,alpert,aitken,ahlers,zajac,woolfolk,witten,windle,wayland,tramel,tittle,talavera,suter,straley,specht,sommerville,soloman,skeens,sigman,sibert,shavers,schuck,schmit,sartain,sabol,rosenblatt,rollo,rashid,rabb,province,polston,nyberg,northrop,navarra,muldoon,mikesell,mcdougald,mcburney,mariscal,lui,lozier,lingerfelt,legere,latour,lagunas,lacour,kurth,killen,kiely,kayser,kahle,isley,huertas,hower,hinz,haugh,gumm,galicia,fortunato,flake,dunleavy,duggins,doby,digiovanni,devaney,deltoro,cribb,corpuz,coronel,coen,charbonneau,caine,burchette,blakey,blakemore,bergquist,beene,beaudette,bayles,ballance,bakker,bailes,asberry,arwood,zucker,willman,whitesell,wald,walcott,vancleave,trump,strasser,simas,shick,schleicher,schaal,saleh,rotz,resnick,rainer,partee,ollis,oller,oday,munday,mong,millican,merwin,mazzola,mansell,magallanes,llanes,lewellen,lepore,kisner,keesee,jeanlouis,ingham,hornbeck,hawn,hartz,harber,haffner,gutshall,guth,grays,gowan,finlay,finkelstein,eyler,enloe,dungan,diez,dearman,cull,crosson,chronister,cassity,campion,callihan,butz,breazeale,blumenthal,berkey,batty,batton,arvizu,alderete,aldana,albaugh,abernethy,wolter,wille,tweed,tollefson,thomasson,teter,testerman,sproul,spates,southwick,soukup,skelly,senter,sealey,sawicki,sargeant,rossiter,rosemond,repp,pifer,ormsby,nickelson,naumann,morabito,monzon,millsaps,millen,mcelrath,marcoux,mantooth,madson,macneil,mackinnon,louque,leister,lampley,kushner,krouse,kirwan,jessee,janson,jahn,jacquez,islas,hutt,holladay,hillyer,hepburn,hensel,harrold,gingrich,geis,gales,fults,finnell,ferri,featherston,epley,ebersole,eames,dunigan,drye,dismuke,devaughn,delorenzo,damiano,confer,collum,clower,clow,claussen,clack,caylor,cawthon,casias,carreno,bluhm,bingaman,bewley,belew,beckner,auld,amey,wolfenbarger,wilkey,wicklund,waltman,villalba,valero,valdovinos,ung,ullrich,tyus,twyman,trost,tardif,tanguay,stripling,steinbach,shumpert,sasaki,sappington,sandusky,reinhold,reinert,quijano,pye,placencia,pinkard,phinney,perrotta,pernell,parrett,oxendine,owensby,orman,nuno,mori,mcroberts,mcneese,mckamey,mccullum,markel,mardis,maines,lueck,lubin,lefler,leffler,larios,labarbera,kershner,josey,jeanbaptiste,izaguirre,hermosillo,haviland,hartshorn,hafner,ginter,getty,franck,fiske,dufrene,doody,davie,dangerfield,dahlberg,cuthbertson,crone,coffelt,chidester,chesson,cauley,caudell,cantara,campo,caines,bullis,bucci,brochu,bogard,bickerstaff,benning,arzola,antonelli,adkinson,zellers,wulf,worsley,woolridge,whitton,westerfield,walczak,vassar,truett,trueblood,trawick,townsley,topping,tobar,telford,steverson,stagg,sitton,sill,sergent,schoenfeld,sarabia,rutkowski,rubenstein,rigdon,prentiss,pomerleau,plumlee,philbrick,peer,patnode,oloughlin,obregon,nuss,morell,mikell,mele,mcinerney,mcguigan,mcbrayer,lor,lollar,lakes,kuehl,kinzer,kamp,joplin,jacobi,howells,holstein,hedden,hassler,harty,halle,greig,gouge,goodrum,gerhart,geier,geddes,gast,forehand,ferree,fendley,feltner,esqueda,encarnacion,eichler,egger,edmundson,eatmon,doud,donohoe,donelson,dilorenzo,digiacomo,diggins,delozier,dejong,danford,crippen,coppage,cogswell,clardy,cioffi,cabe,brunette,bresnahan,bramble,blomquist,blackstone,biller,bevis,bevan,bethune,benbow,baty,basinger,balcom,andes,aman,aguero,adkisson,yandell,wilds,whisenhunt,weigand,weeden,voight,villar,trottier,tillett,suazo,setser,scurry,schuh,schreck,schauer,samora,roane,rinker,reimers,ratchford,popovich,parkin,natal,melville,mcbryde,magdaleno,loehr,lockman,lingo,leduc,larocca,lao,lamere,laclair,krall,korte,koger,jalbert,hughs,higbee,henton,heaney,haith,gump,greeson,goodloe,gholston,gasper,gagliardi,fregoso,farthing,fabrizio,ensor,elswick,elgin,eklund,eaddy,drouin,dorton,dizon,derouen,deherrera,davy,dampier,cullum,culley,cowgill,cardoso,cardinale,brodsky,broadbent,brimmer,briceno,branscum,bolyard,boley,bennington,beadle,baur,ballentine,azure,aultman,arciniega,aguila,aceves,yepez,yap,woodrum,wethington,weissman,veloz,trusty,troup,trammel,tarpley,stivers,steck,sprayberry,spraggins,spitler,spiers,sohn,seagraves,schiffman,rudnick,rizo,riccio,rennie,quackenbush,puma,plott,pearcy,parada,paiz,munford,moskowitz,mease,mcnary,mccusker,lozoya,longmire,loesch,lasky,kuhlmann,krieg,koziol,kowalewski,konrad,kindle,jowers,jolin,jaco,hua,horgan,hine,hileman,hepner,heise,heady,hawkinson,hannigan,haberman,guilford,grimaldi,garton,gagliano,fruge,follett,fiscus,ferretti,ebner,easterday,eanes,dirks,dimarco,depalma,deforest,cruce,craighead,christner,candler,cadwell,burchell,buettner,brinton,brazier,brannen,brame,bova,bomar,blakeslee,belknap,bangs,balzer,athey,armes,alvis,alverson,alvardo,yeung,wheelock,westlund,wessels,volkman,threadgill,thelen,tague,symons,swinford,sturtevant,straka,stier,stagner,segarra,seawright,rutan,roux,ringler,riker,ramsdell,quattlebaum,purifoy,poulson,permenter,peloquin,pasley,pagel,osman,obannon,nygaard,newcomer,munos,motta,meadors,mcquiston,mcniel,mcmann,mccrae,mayne,matte,legault,lechner,kucera,krohn,kratzer,koopman,jeske,horrocks,hock,hibbler,hesson,hersh,harvin,halvorsen,griner,grindle,gladstone,garofalo,frampton,forbis,eddington,diorio,dingus,dewar,desalvo,curcio,creasy,cortese,cordoba,connally,cluff,cascio,capuano,canaday,calabro,bussard,brayton,borja,bigley,arnone,arguelles,acuff,zamarripa,wooton,widner,wideman,threatt,thiele,templin,teeters,synder,swint,swick,sturges,stogner,stedman,spratt,siegfried,shetler,scull,savino,sather,rothwell,rook,rone,rhee,quevedo,privett,pouliot,poche,pickel,petrillo,pellegrini,peaslee,partlow,otey,nunnery,morelock,morello,meunier,messinger,mckie,mccubbin,mccarron,lerch,lavine,laverty,lariviere,lamkin,kugler,krol,kissel,keeter,hubble,hickox,hetzel,hayner,hagy,hadlock,groh,gottschalk,goodsell,gassaway,garrard,galligan,fye,firth,fenderson,feinstein,etienne,engleman,emrick,ellender,drews,doiron,degraw,deegan,dart,crissman,corr,cookson,coil,cleaves,charest,chapple,chaparro,castano,carpio,byer,bufford,bridgewater,bridgers,brandes,borrero,bonanno,aube,ancheta,abarca,abad,yim,wooster,wimbush,willhite,willams,wigley,weisberg,wardlaw,vigue,vanhook,unknow,torre,tasker,tarbox,strachan,slover,shamblin,semple,schuyler,schrimsher,sayer,salzman,rubalcava,riles,reneau,reichel,rayfield,rabon,pyatt,prindle,poss,polito,plemmons,pesce,perrault,pereyra,ostrowski,nilsen,niemeyer,munsey,mundell,moncada,miceli,meader,mcmasters,mckeehan,matsumoto,marron,marden,lizarraga,lingenfelter,lewallen,langan,lamanna,kovac,kinsler,kephart,keown,kass,kammerer,jeffreys,hysell,householder,hosmer,hardnett,hanner,guyette,greening,glazer,ginder,fromm,fluellen,finkle,fey,fessler,essary,eisele,duren,dittmer,crochet,cosentino,cogan,coelho,cavin,carrizales,campuzano,brough,bopp,bookman,blouin,beesley,battista,bascom,bakken,badgett,arneson,anselmo,ahumada,woodyard,wolters,wireman,willison,warman,waldrup,vowell,vantassel,vale,twombly,toomer,tennison,teets,tedeschi,swanner,stutz,stelly,sheehy,schermerhorn,scala,sandidge,salters,salo,saechao,roseboro,rolle,ressler,renz,renn,redford,raposa,rainbolt,pelfrey,orndorff,oney,nolin,nimmons,ney,nardone,myhre,morman,menjivar,mcglone,mccammon,maxon,marciano,manus,lowrance,lorenzen,lonergan,lollis,littles,lindahl,lamas,lach,kuster,krawczyk,knuth,knecht,kirkendall,keitt,keever,kantor,jarboe,hoye,houchens,holter,holsinger,hickok,helwig,helgeson,hassett,harner,hamman,hames,hadfield,goree,goldfarb,gaughan,gaudreau,gantz,gallion,frady,foti,flesher,ferrin,faught,engram,donegan,desouza,degroot,cutright,crowl,criner,coan,clinkscales,chewning,chavira,catchings,carlock,bulger,buenrostro,bramblett,brack,boulware,bookout,bitner,birt,baranowski,baisden,augustin,allmon,acklin,yoakum,wilbourn,whisler,weinberger,washer,vasques,vanzandt,vanatta,troxler,tomes,tindle,tims,throckmorton,thach,stpeter,stlaurent,stenson,spry,spitz,songer,snavely,sly,shroyer,shortridge,shenk,sevier,seabrook,scrivner,saltzman,rosenberry,rockwood,robeson,roan,reiser,ramires,raber,posner,popham,piotrowski,pinard,peterkin,pelham,peiffer,peay,nadler,musso,millett,mestas,mcgowen,marques,marasco,manriquez,manos,mair,lipps,leiker,krumm,knorr,kinslow,kessel,kendricks,kelm,ito,irick,ickes,hurlburt,horta,hoekstra,heuer,helmuth,heatherly,hampson,hagar,haga,greenlaw,grau,godbey,gingras,gillies,gibb,gayden,gauvin,garrow,fontanez,florio,finke,fasano,ezzell,ewers,eveland,eckenrode,duclos,drumm,dimmick,delancey,defazio,dashiell,cusack,crowther,crigger,cray,coolidge,coldiron,cleland,chalfant,cassel,camire,cabrales,broomfield,brittingham,brisson,brickey,braziel,brazell,bragdon,boulanger,bos,boman,bohannan,beem,barre,baptist,azar,ashbaugh,armistead,almazan,adamski,zendejas,winburn,willaims,wilhoit,westberry,wentzel,wendling,visser,vanscoy,vankirk,vallee,tweedy,thornberry,sweeny,spradling,spano,smelser,shim,sechrist,schall,scaife,rugg,rothrock,roesler,riehl,ridings,render,ransdell,radke,pinero,petree,pendergast,peluso,pecoraro,pascoe,panek,oshiro,navarrette,murguia,moores,moberg,michaelis,mcwhirter,mcsweeney,mcquade,mccay,mauk,mariani,marceau,mandeville,maeda,lunde,ludlow,loeb,lindo,linderman,leveille,leith,larock,lambrecht,kulp,kinsley,kimberlin,kesterson,hoyos,helfrich,hanke,grisby,goyette,gouveia,glazier,gile,gerena,gelinas,gasaway,funches,fujimoto,flynt,fenske,fellers,fehr,eslinger,escalera,enciso,duley,dittman,dineen,diller,devault,dao,collings,clymer,clowers,chavers,charland,castorena,castello,camargo,bunce,bullen,boyes,borchers,borchardt,birnbaum,birdsall,billman,benites,bankhead,ange,ammerman,adkison,winegar,wickman,warr,warnke,villeneuve,veasey,vassallo,vannatta,vadnais,twilley,towery,tomblin,tippett,theiss,talkington,talamantes,swart,swanger,streit,stines,stabler,spurling,sobel,sine,simmers,shippy,shiflett,shearin,sauter,sanderlin,rusch,runkle,ruckman,rorie,roesch,richert,rehm,randel,ragin,quesenberry,puentes,plyler,plotkin,paugh,oshaughnessy,ohalloran,norsworthy,niemann,nader,moorefield,mooneyham,modica,miyamoto,mickel,mebane,mckinnie,mazurek,mancilla,lukas,lovins,loughlin,lotz,lindsley,liddle,levan,lederman,leclaire,lasseter,lapoint,lamoreaux,lafollette,kubiak,kirtley,keffer,kaczmarek,housman,hiers,hibbert,herrod,hegarty,hathorn,greenhaw,grafton,govea,futch,furst,franko,forcier,foran,flickinger,fairfield,eure,emrich,embrey,edgington,ecklund,eckard,durante,deyo,delvecchio,dade,currey,creswell,cottrill,casavant,cartier,cargile,capel,cammack,calfee,burse,burruss,brust,brousseau,bridwell,braaten,borkholder,bloomquist,bjork,bartelt,arp,amburgey,yeary,yao,whitefield,vinyard,vanvalkenburg,twitchell,timmins,tapper,stringham,starcher,spotts,slaugh,simonsen,sheffer,sequeira,rosati,rhymes,reza,quint,pollak,peirce,patillo,parkerson,paiva,nilson,nevin,narcisse,nair,mitton,merriam,merced,meiners,mckain,mcelveen,mcbeth,marsden,marez,manke,mahurin,mabrey,luper,krull,kees,iles,hunsicker,hornbuckle,holtzclaw,hirt,hinnant,heston,hering,hemenway,hegwood,hearns,halterman,guiterrez,grote,granillo,grainger,glasco,gilder,garren,garlock,garey,fryar,fredricks,fraizer,foxx,foshee,ferrel,felty,everitt,evens,esser,elkin,eberhart,durso,duguay,driskill,doster,dewall,deveau,demps,demaio,delreal,deleo,deem,darrah,cumberbatch,culberson,cranmer,cordle,colgan,chesley,cavallo,castellon,castelli,carreras,carnell,carlucci,bontrager,blumberg,blasingame,becton,ayon,artrip,andujar,alkire,alder,agan,zukowski,zuckerman,zehr,wroblewski,wrigley,woodside,wigginton,westman,westgate,werts,washam,wardlow,walser,waiters,tadlock,stringfield,stimpson,stickley,standish,spurlin,spindler,speller,spaeth,sotomayor,sok,sluder,shryock,shepardson,shatley,scannell,santistevan,rosner,rhode,resto,reinhard,rathburn,prisco,poulsen,pinney,phares,pennock,pastrana,oviedo,ostler,noto,nauman,mulford,moise,moberly,mirabal,metoyer,metheny,mentzer,meldrum,mcinturff,mcelyea,mcdougle,massaro,lumpkins,loveday,lofgren,loe,lirette,lesperance,lefkowitz,ledger,lauzon,lain,lachapelle,kurz,klassen,keough,kempton,kaelin,jeffords,huot,hsieh,hoyer,horwitz,hopp,hoeft,hennig,haskin,gourdine,golightly,girouard,fulgham,fritsch,freer,frasher,foulk,firestone,fiorentino,fedor,ensley,englehart,eells,ebel,dunphy,donahoe,dileo,dibenedetto,dabrowski,crick,coonrod,conder,coddington,chunn,choy,chaput,cerna,carreiro,calahan,braggs,bourdon,bollman,bittle,behm,bauder,batt,barreras,aubuchon,anzalone,adamo,zerbe,wirt,willcox,westberg,weikel,waymire,vroman,vinci,vallejos,truesdell,troutt,trotta,tollison,toles,tichenor,symonds,surles,strayer,stgeorge,sroka,sorrentino,solares,snelson,silvestri,sikorski,shawver,schumaker,schorr,schooley,scates,satterlee,satchell,sacks,rymer,roselli,robitaille,riegel,regis,reames,provenzano,priestley,plaisance,pettey,palomares,oman,nowakowski,nace,monette,minyard,mclamb,mchone,mccarroll,masson,magoon,maddy,lundin,loza,licata,leonhardt,lema,landwehr,kircher,kinch,karpinski,johannsen,hussain,houghtaling,hoskinson,hollaway,holeman,hobgood,hilt,hiebert,gros,goggin,geissler,gadbois,gabaldon,fleshman,flannigan,fairman,epp,eilers,dycus,dunmire,duffield,dowler,deloatch,dehaan,deemer,clayborn,christofferso,chilson,chesney,chatfield,carron,canale,brigman,branstetter,bosse,borton,bonar,blau,biron,barroso,arispe,zacharias,zabel,yaeger,woolford,whetzel,weakley,veatch,vandeusen,tufts,troxel,troche,traver,townsel,tosh,talarico,swilley,sterrett,stenger,speakman,sowards,sours,souders,souder,soles,sobers,snoddy,smither,sias,shute,shoaf,shahan,schuetz,scaggs,santini,rosson,rolen,robidoux,rentas,recio,pixley,pawlowski,pawlak,paull,overbey,orear,oliveri,oldenburg,nutting,naugle,mote,mossman,moor,misner,milazzo,michelson,mcentee,mccullar,mccree,mcaleer,mazzone,mandell,manahan,malott,maisonet,mailloux,lumley,lowrie,louviere,lipinski,lindemann,leppert,leopold,leasure,labarge,kubik,knisely,knepp,kenworthy,kennelly,kelch,karg,kanter,hyer,houchin,hosley,hosler,hollon,holleman,heitman,hebb,haggins,gwaltney,guin,goulding,gorden,geraci,georges,gathers,frison,feagin,falconer,espada,erving,erikson,eisenhauer,eder,ebeling,durgin,dowdle,dinwiddie,delcastillo,dedrick,crimmins,covell,cournoyer,coria,cohan,cataldo,carpentier,canas,campa,brode,brashears,blaser,bicknell,berk,bednar,barwick,ascencio,althoff,almodovar,alamo,zirkle,zabala,wolverton,winebrenner,wetherell,westlake,wegener,weddington,vong,tuten,trosclair,tressler,theroux,teske,swinehart,swensen,sundquist,southall,socha,sizer,silverberg,shortt,shimizu,sherrard,shaeffer,scheid,scheetz,saravia,sanner,rubinstein,rozell,romer,rheaume,reisinger,randles,pullum,petrella,payan,papp,nordin,norcross,nicoletti,nicholes,newbold,nakagawa,mraz,monteith,milstead,milliner,mellen,mccardle,luft,liptak,lipp,leitch,latimore,larrison,landau,laborde,koval,izquierdo,hymel,hoskin,holte,hoefer,hayworth,hausman,harrill,harrel,hardt,gully,groover,grinnell,greenspan,graver,grandberry,gorrell,goldenberg,goguen,gilleland,garr,fuson,foye,feldmann,everly,dyess,dyal,dunnigan,downie,dolby,deatherage,cosey,cheever,celaya,caver,cashion,caplinger,cansler,byrge,bruder,breuer,breslin,brazelton,botkin,bonneau,bondurant,bohanan,bogue,boes,bodner,boatner,blatt,bickley,belliveau,beiler,beier,beckstead,bachmann,atkin,altizer,alloway,allaire,albro,abron,zellmer,yetter,yelverton,wiltshire,wiens,whidden,viramontes,vanwormer,tarantino,tanksley,sumlin,strauch,strang,stice,spahn,sosebee,sigala,shrout,seamon,schrum,schneck,schantz,ruddy,romig,roehl,renninger,reding,pyne,polak,pohlman,pasillas,oldfield,oldaker,ohanlon,ogilvie,norberg,nolette,nies,neufeld,nellis,mummert,mulvihill,mullaney,monteleone,mendonca,meisner,mcmullan,mccluney,mattis,massengill,manfredi,luedtke,lounsbury,liberatore,leek,lamphere,laforge,kuo,koo,jourdan,ismail,iorio,iniguez,ikeda,hubler,hodgdon,hocking,heacock,haslam,haralson,hanshaw,hannum,hallam,haden,garnes,garces,gammage,gambino,finkel,faucett,fahy,ehrhardt,eggen,dusek,durrant,dubay,dones,dey,depasquale,delucia,degraff,decamp,davalos,cullins,conard,clouser,clontz,cifuentes,chappel,chaffins,celis,carwile,byram,bruggeman,bressler,brathwaite,brasfield,bradburn,boose,boon,bodie,blosser,blas,bise,bertsch,bernardi,bernabe,bengtson,barrette,astorga,alday,albee,abrahamson,yarnell,wiltse,wile,wiebe,waguespack,vasser,upham,tyre,turek,traxler,torain,tomaszewski,tinnin,tiner,tindell,teed,styron,stahlman,staab,skiba,shih,sheperd,seidl,secor,schutte,sanfilippo,ruder,rondon,rearick,procter,prochaska,pettengill,pauly,neilsen,nally,mutter,mullenax,morano,meads,mcnaughton,mcmurtry,mcmath,mckinsey,matthes,massenburg,marlar,margolis,malin,magallon,mackin,lovette,loughran,loring,longstreet,loiselle,lenihan,laub,kunze,kull,koepke,kerwin,kalinowski,kagan,innis,innes,holtzman,heinemann,harshman,haider,haack,guss,grondin,grissett,greenawalt,gravel,goudy,goodlett,goldston,gokey,gardea,galaviz,gafford,gabrielson,furlow,fritch,fordyce,folger,elizalde,ehlert,eckhoff,eccleston,ealey,dubin,diemer,deschamps,delapena,decicco,debolt,daum,cullinan,crittendon,crase,cossey,coppock,coots,colyer,cluck,chamberland,burkhead,bumpus,buchan,borman,bork,boe,birkholz,berardi,benda,behnke,barter,auer,amezquita,wotring,wirtz,wingert,wiesner,whitesides,weyant,wainscott,venezia,varnell,tussey,thurlow,tabares,stiver,stell,starke,stanhope,stanek,sisler,sinnott,siciliano,shehan,selph,seager,scurlock,scranton,santucci,santangelo,saltsman,ruel,ropp,rogge,rettig,renwick,reidy,reider,redfield,quam,premo,peet,parente,paolucci,palmquist,orme,ohler,ogg,netherton,mutchler,morita,mistretta,minnis,middendorf,menzel,mendosa,mendelson,meaux,mcspadden,mcquaid,mcnatt,manigault,maney,mager,lukes,lopresti,liriano,lipton,letson,lechuga,lazenby,lauria,larimore,kwok,kwak,krupp,krupa,krum,kopec,kinchen,kifer,kerney,kerner,kennison,kegley,kays,karcher,justis,johson,jellison,janke,huskins,holzman,hinojos,hefley,hatmaker,harte,halloway,hallenbeck,goodwyn,glaspie,geise,fullwood,fryman,frew,frakes,fraire,farrer,enlow,engen,ellzey,eckles,earles,ealy,dunkley,drinkard,dreiling,draeger,dinardo,dills,desroches,desantiago,curlee,crumbley,critchlow,coury,courtright,coffield,cleek,charpentier,cardone,caples,cantin,buntin,bugbee,brinkerhoff,brackin,bourland,bohl,bogdan,blassingame,beacham,banning,auguste,andreasen,amann,almon,alejo,adelman,abston,zeno,yerger,wymer,woodberry,windley,whiteaker,westfield,weibel,wanner,waldrep,villani,vanarsdale,utterback,updike,triggs,topete,tolar,tigner,thoms,tauber,tarvin,tally,swiney,sweatman,studebaker,stennett,starrett,stannard,stalvey,sonnenberg,smithey,sieber,sickles,shinault,segars,sanger,salmeron,rothe,rizzi,rine,ricard,restrepo,ralls,ragusa,quiroga,pero,pegg,pavlik,papenfuss,oropeza,okane,neer,nee,mudge,mozingo,molinaro,mcvicker,mcgarvey,mcfalls,mccraney,matus,magers,llanos,livermore,liss,linehan,leto,leitner,laymon,lawing,lacourse,kwong,kollar,kneeland,keo,kennett,kellett,kangas,janzen,hutter,huse,huling,hoss,hohn,hofmeister,hewes,hern,harjo,habib,gust,guice,grullon,greggs,grayer,granier,grable,gowdy,giannini,getchell,gartman,garnica,ganey,gallimore,fray,fetters,fergerson,farlow,fagundes,exley,esteves,enders,edenfield,easterwood,drakeford,dipasquale,desousa,deshields,deeter,dedmon,debord,daughtery,cutts,courtemanche,coursey,copple,coomes,collis,coll,cogburn,clopton,choquette,chaidez,castrejon,calhoon,burbach,bulloch,buchman,bruhn,bohon,blough,bien,baynes,barstow,zeman,zackery,yardley,yamashita,wulff,wilken,wiliams,wickersham,wible,whipkey,wedgeworth,walmsley,walkup,vreeland,verrill,valera,umana,traub,swingle,summey,stroupe,stockstill,steffey,stefanski,statler,stapp,speights,solari,soderberg,shunk,shorey,shewmaker,sheilds,schiffer,schank,schaff,sagers,rochon,riser,rickett,reale,raglin,polen,plata,pitcock,percival,palen,pahl,orona,oberle,nocera,navas,nault,mullings,moos,montejano,monreal,minick,middlebrook,meece,mcmillion,mccullen,mauck,marshburn,maillet,mahaney,magner,maclin,lucey,litteral,lippincott,leite,leis,leaks,lamarre,kost,jurgens,jerkins,jager,hurwitz,hughley,hotaling,horstman,hohman,hocker,hively,hipps,hile,hessler,hermanson,hepworth,henn,helland,hedlund,harkless,haigler,gutierez,grindstaff,glantz,giardina,gerken,gadsden,finnerty,feld,farnum,encinas,drakes,dennie,cutlip,curtsinger,couto,cortinas,corby,chiasson,carle,carballo,brindle,borum,bober,blagg,birk,berthiaume,beahm,batres,basnight,backes,axtell,aust,atterberry,alvares,alt,alegria,yow,yip,woodell,wojciechowski,winfree,winbush,wiest,wesner,wamsley,wakeman,verner,truex,trafton,toman,thorsen,theus,tellier,tallant,szeto,strope,stills,sorg,simkins,shuey,shaul,servin,serio,serafin,salguero,saba,ryerson,rudder,ruark,rother,rohrbaugh,rohrbach,rohan,rogerson,risher,rigg,reeser,pryce,prokop,prins,priebe,prejean,pinheiro,petrone,petri,penson,pearlman,parikh,natoli,murakami,mullikin,mullane,motes,morningstar,monks,mcveigh,mcgrady,mcgaughey,mccurley,masi,marchan,manske,maez,lusby,linde,lile,likens,licon,leroux,lemaire,legette,lax,laskey,laprade,laplant,kolar,kittredge,kinley,kerber,kanagy,jetton,janik,ippolito,inouye,hunsinger,howley,howery,horrell,holthaus,hiner,hilson,hilderbrand,hasan,hartzler,harnish,harada,hansford,halligan,hagedorn,gwynn,gudino,greenstein,greear,gracey,goudeau,gose,goodner,ginsburg,gerth,gerner,fyfe,fujii,frier,frenette,folmar,fleisher,fleischmann,fetzer,eisenman,earhart,dupuy,dunkelberger,drexler,dillinger,dilbeck,dewald,demby,deford,dake,craine,como,chesnut,casady,carstens,carrick,carino,carignan,canchola,cale,bushong,burman,buono,brownlow,broach,britten,brickhouse,boyden,boulton,borne,borland,bohrer,blubaugh,bever,berggren,benevides,arocho,arends,amezcua,almendarez,zalewski,witzel,winkfield,wilhoite,vara,vangundy,vanfleet,vanetten,vandergriff,urbanski,troiano,thibodaux,straus,stoneking,stjean,stillings,stange,speicher,speegle,sowa,smeltzer,slawson,simmonds,shuttleworth,serpa,senger,seidman,schweiger,schloss,schimmel,schechter,sayler,sabb,sabatini,ronan,rodiguez,riggleman,richins,reep,reamer,prunty,porath,plunk,piland,philbrook,pettitt,perna,peralez,pascale,padula,oboyle,nivens,nickols,murph,mundt,munden,montijo,mcmanis,mcgrane,mccrimmon,manzi,mangold,malick,mahar,maddock,losey,litten,liner,leff,leedy,leavell,ladue,krahn,kluge,junker,iversen,imler,hurtt,huizar,hubbert,howington,hollomon,holdren,hoisington,hise,heiden,hauge,hartigan,gutirrez,griffie,greenhill,gratton,granata,gottfried,gertz,gautreaux,furry,furey,funderburg,flippen,fitzgibbon,dyar,drucker,donoghue,dildy,devers,detweiler,despres,denby,degeorge,cueto,cranston,courville,clukey,cirillo,chon,chivers,caudillo,catt,butera,bulluck,buckmaster,braunstein,bracamonte,bourdeau,bonnette,bobadilla,boaz,blackledge,beshears,bernhard,bergeson,baver,barthel,balsamo,bak,aziz,awad,authement,altom,altieri,abels,zigler,zhu,younker,yeomans,yearwood,wurster,winget,whitsett,wechsler,weatherwax,wathen,warriner,wanamaker,walraven,viens,vandemark,vancamp,uchida,triana,tinoco,terpstra,tellis,tarin,taranto,takacs,studdard,struthers,strout,stiller,spataro,soderquist,sliger,silberman,shurtleff,sheetz,ritch,reif,raybon,ratzlaff,radley,putt,putney,pinette,piner,petrin,parise,osbourne,nyman,northington,noblitt,nishimura,neher,nalls,naccarato,mucha,mounce,miron,millis,meaney,mcnichols,mckinnis,mcjunkin,mcduffy,manrique,mannion,mangual,malveaux,mains,lumsden,lohmann,lipe,lightsey,lemasters,leist,laxton,laverriere,latorre,lamons,kral,kopf,knauer,kitt,kaul,karas,kamps,jusino,islam,hullinger,huges,hornung,hiser,hempel,helsel,hassinger,hargraves,hammes,hallberg,gutman,gumbs,gruver,graddy,gonsales,goncalves,glennon,gilford,geno,freshour,flippo,fifer,fason,farrish,fallin,ewert,estepp,escudero,ensminger,emberton,elms,ellerbe,eide,dysart,dougan,dierking,dicus,detrick,deroche,depue,demartino,delosreyes,dalke,culbreath,crownover,crisler,crass,corsi,chagnon,centers,cavanagh,casson,carollo,cadwallader,burnley,burciaga,burchard,broadhead,bolte,berens,bellman,bellard,baril,antonucci,wolfgram,winsor,wimbish,wier,wallach,viveros,vento,varley,vanslyke,vangorder,touchstone,tomko,tiemann,throop,tamura,talmadge,swayze,sturdevant,strauser,stolz,stenberg,stayton,spohn,spillers,spillane,sluss,slavens,simonetti,shofner,shead,senecal,seales,schueler,schley,schacht,sauve,sarno,salsbury,rothschild,rosier,rines,reveles,rein,redus,redfern,reck,ranney,raggs,prout,prill,preble,prager,plemons,pilon,piccirillo,pewitt,pesina,pecora,otani,orsini,oestreich,odea,ocallaghan,northup,niehaus,newberg,nasser,narron,monarrez,mishler,mcsherry,mcelfresh,mayon,mauer,mattice,marrone,marmolejo,marini,malm,machen,lunceford,loewen,liverman,litwin,linscott,levins,lenox,legaspi,leeman,leavy,lannon,lamson,lambdin,labarre,knouse,klemm,kleinschmidt,kirklin,keels,juliano,howser,hosier,hopwood,holyfield,hodnett,hirsh,heimann,heckel,harger,hamil,hajek,gurganus,gunning,grange,gonzalas,goggins,gerow,gaydos,garduno,ganley,galey,farner,engles,emond,emert,ellenburg,edick,duell,dorazio,dimond,diederich,depuy,dempster,demaria,dehoyos,dearth,dealba,czech,crose,crespin,cogdill,clinard,cipriano,chretien,cerny,ceniceros,celestin,caple,cacho,burrill,buhr,buckland,branam,boysen,bovee,boos,boler,blom,blasko,beyers,belz,belmonte,bednarz,beckmann,beaudin,bazile,barbeau,balentine,abrahams,zielke,yunker,yeates,wrobel,wike,whisnant,wherry,wagnon,vogan,vansant,vannest,vallo,ullery,towles,towell,thill,taormina,tannehill,taing,storrs,stickles,stetler,sparling,solt,silcox,sheard,shadle,seman,selleck,schlemmer,scher,sapien,sainz,roye,romain,rizzuto,resch,rentz,rasch,ranieri,purtell,primmer,portwood,pontius,pons,pletcher,pledger,pirkle,pillsbury,pentecost,paxson,ortez,oles,mullett,muirhead,mouzon,mork,mollett,mohn,mitcham,melillo,medders,mcmiller,mccleery,mccaughey,mak,maciejewski,macaulay,lute,lipman,lewter,larocque,langton,kriner,knipp,killeen,karn,kalish,kaczor,jonson,jerez,jarrard,janda,hymes,hollman,hollandsworth,holl,hobdy,hennen,hemmer,hagins,haddox,guitierrez,guernsey,gorsuch,gholson,genova,gazaway,gauna,gammons,freels,fonville,fetterman,fava,farquhar,farish,fabela,escoto,eisen,dossett,dority,dorfman,demmer,dehn,dawley,darbonne,damore,damm,crosley,cron,crompton,crichton,cotner,cordon,conerly,colvard,clauson,cheeseman,cavallaro,castille,cabello,burgan,buffum,bruss,brassfield,bowerman,bothwell,borgen,bonaparte,bombard,boivin,boissonneault,bogner,bodden,boan,bittinger,bickham,bedolla,bale,bainbridge,aybar,avendano,ashlock,amidon,almanzar,akridge,ackermann,zager,worrall,winans,wilsey,wightman,westrick,wenner,warne,warford,verville,utecht,upson,tuma,tseng,troncoso,trollinger,torbert,taulbee,sutterfield,stough,storch,stonebraker,stolle,stilson,stiefel,steptoe,stepney,stender,stemple,staggers,spurrier,spinney,spengler,smartt,skoog,silvis,sieg,shuford,selfridge,seguin,sedgwick,sease,scotti,schroer,schlenker,schill,savarese,sapienza,sanson,sandefur,salamone,rusnak,rudisill,rothermel,roca,resendiz,reliford,rasco,raiford,quisenberry,quijada,pullins,puccio,postell,poppe,pinter,piche,petrucci,pellegrin,pelaez,paton,pasco,parkes,paden,pabst,olmsted,newlon,mynatt,mower,morrone,moree,moffat,mixson,minner,millette,mederos,mcgahan,mcconville,maughan,massingill,marano,macri,lovern,lichtenstein,leonetti,lehner,lawley,laramie,lappin,lahti,lago,lacayo,kuester,kincade,juhl,jiron,jessop,jarosz,jain,hults,hoge,hodgins,hoban,hinkson,hillyard,herzig,hervey,henriksen,hawker,hause,hankerson,gregson,golliday,gilcrease,gessner,gerace,garwood,garst,gaillard,flinchum,fishel,fishback,filkins,fentress,fabre,ethier,eisner,ehrhart,efird,drennon,dominy,domingue,dipaolo,dinan,dimartino,deskins,dengler,defreitas,defranco,dahlin,cutshaw,cuthbert,croyle,crothers,critchfield,cowie,costner,coppedge,copes,ciccone,caufield,capo,cambron,cambridge,buser,burnes,buhl,buendia,brindley,brecht,bourgoin,blackshire,birge,benninger,bembry,beil,begaye,barrentine,banton,balmer,baity,auerbach,ambler,alexandre,ackerson,zurcher,zell,wynkoop,wallick,waid,vos,vizcaino,vester,veale,vandermark,vanderford,tuthill,trivette,thiessen,tewksbury,tao,tabron,swasey,swanigan,stoughton,stoudt,stimson,stecker,stead,spady,souther,smoak,sklar,simcox,sidwell,seybert,sesco,seeman,schwenk,schmeling,rossignol,robillard,robicheaux,riveria,rippeon,ridgley,remaley,rehkop,reddish,rauscher,quirion,pusey,pruden,pressler,potvin,pospisil,paradiso,pangburn,palmateer,ownby,otwell,osterberg,osmond,olsson,oberlander,nusbaum,novack,nokes,nicastro,nehls,naber,mulhern,motter,moretz,milian,mckeel,mcclay,mccart,matsuda,martucci,marple,marko,marciniak,manes,mancia,macrae,lybarger,lint,lineberger,levingston,lecroy,lattimer,laseter,kulick,krier,knutsen,klem,kinne,kinkade,ketterman,kerstetter,kersten,karam,joshi,jent,jefcoat,hillier,hillhouse,hettinger,henthorn,henline,helzer,heitzman,heineman,heenan,haughton,haris,harbert,haman,grinstead,gremillion,gorby,giraldo,gioia,gerardi,geraghty,gaunt,gatson,gardin,gans,gammill,friedlander,frahm,fossett,fosdick,forbush,fondren,fleckenstein,fitchett,filer,feliz,feist,ewart,esters,elsner,edgin,easterly,dussault,durazo,devereaux,deshotel,deckert,dargan,cornman,conkle,condit,claunch,clabaugh,cheesman,chea,charney,casella,carone,carbonell,canipe,campana,calles,cabezas,cabell,buttram,bustillos,buskirk,boyland,bourke,blakeley,berumen,berrier,belli,behrendt,baumbach,bartsch,baney,arambula,alldredge,allbritton,ziemba,zanders,youngquist,yoshioka,yohe,wunder,woodfin,wojtowicz,winkel,wilmore,willbanks,wesolowski,wendland,walko,votaw,vanek,uriarte,urbano,turnipseed,triche,trautman,towler,tokarz,temples,tefft,teegarden,syed,swigart,stoller,stapler,stansfield,smit,smelley,sicard,shulman,shew,shear,sheahan,sharpton,selvidge,schlesinger,savell,sandford,sabatino,rosenbloom,roepke,rish,rhames,renken,reger,quarterman,puig,prasad,poplar,pizano,pigott,phair,petrick,patt,pascua,paramore,papineau,olivieri,ogren,norden,noga,nisbet,munk,morvant,moro,moloney,merz,meltzer,mellinger,mehl,mcnealy,mckernan,mchaney,mccleskey,mcandrews,mayton,markert,maresca,maner,mandujano,malpass,macintyre,lytton,lyall,lummus,longshore,longfellow,lokey,locher,leverette,lepe,lefever,leeson,lederer,lampert,lagrone,kreider,korth,knopf,kleist,keltner,kelling,kaspar,kappler,josephs,huckins,holub,hofstetter,hoehn,higginson,hennings,heid,havel,hauer,harnden,hargreaves,hanger,guild,guidi,grate,grandy,grandstaff,goza,goodridge,goodfellow,goggans,godley,giusti,gilyard,geoghegan,galyon,gaeta,funes,font,flanary,fales,erlandson,ellett,edinger,dziedzic,duerr,draughn,donoho,dimatteo,devos,dematteo,degnan,darlington,danis,dahlstrom,dahlke,czajkowski,cumbie,culbert,crosier,croley,corry,clinger,chalker,cephas,caywood,capehart,cales,cadiz,bussiere,burriss,burkart,brundidge,bronstein,bradt,boydston,bostrom,borel,bolles,blay,blackwelder,bissett,bevers,bester,bernardino,benefiel,belote,beedle,beckles,baysinger,bassler,bartee,barlett,bargas,barefield,baptista,arterburn,armas,apperson,amoroso,amedee,zullo,zellner,yelton,willems,wilkin,wiggin,widman,welk,weingarten,walla,viers,vess,verdi,veazey,vannote,tullos,trudell,trower,trosper,trimm,trew,tousignant,topp,tocco,thoreson,terhune,tatom,suniga,sumter,steeves,stansell,soltis,sloss,slaven,shisler,shanley,servantes,selders,segrest,seese,seeber,schaible,savala,sartor,rutt,rumbaugh,ruis,roten,roessler,ritenour,riney,restivo,renard,rakestraw,rake,quiros,pullin,prudhomme,primeaux,prestridge,presswood,ponte,polzin,poarch,pittenger,piggott,pickell,phaneuf,parvin,parmley,palmeri,ozment,ormond,ordaz,ono,olea,obanion,oakman,novick,nicklas,nemec,nappi,mund,morfin,mera,melgoza,melby,mcgoldrick,mcelwain,mcchristian,mccaw,marquart,marlatt,markovich,mahr,lupton,lucus,lorusso,lerman,leddy,leaman,leachman,lavalle,laduke,kummer,koury,konopka,koh,koepp,kloss,klock,khalil,kernan,kappel,jakes,inoue,hutsell,howle,honore,hockman,hockaday,hiltz,hetherington,hesser,hershman,heffron,headen,haskett,hartline,harned,guillemette,guglielmo,guercio,greenbaum,goris,glines,gilmour,gardella,gadd,gabler,gabbert,fuselier,freudenburg,fragoso,follis,flemings,feltman,febus,farren,fallis,evert,ekstrom,eastridge,dyck,dufault,dubreuil,drapeau,domingues,dolezal,dinkel,didonato,devitt,demott,daughtrey,daubert,das,creason,crary,costilla,chipps,cheatwood,carmean,canton,caffrey,burgher,buker,brunk,brodbeck,brantner,bolivar,boerner,bodkin,biel,bencomo,bellino,beliveau,beauvais,beaupre,baylis,baskett,barcus,baltz,asay,arney,arcuri,ankney,agostini,addy,zwilling,zubia,zollinger,zeitz,yanes,winship,winningham,wickline,webre,waddington,vosburgh,verrett,varnum,vandeventer,vacca,usry,towry,touchet,tookes,tonkin,timko,tibbitts,thedford,tarleton,talty,talamantez,tafolla,sugg,strecker,steffan,spiva,slape,shatzer,seyler,seamans,schmaltz,schipper,sasso,ruppe,roudebush,riemer,richarson,revilla,reichenbach,ratley,railsback,quayle,poplin,poorman,ponton,pollitt,poitras,piscitelli,piedra,pew,perera,penwell,pelt,parkhill,paladino,ore,oram,olmo,oliveras,olivarria,ogorman,naron,muncie,mowbray,morones,moretti,monn,mitts,minks,minarik,mimms,milliron,millington,millhouse,messersmith,mcnett,mckinstry,mcgeorge,mcdill,mcateer,mazzeo,matchett,mahood,mabery,lundell,louden,losoya,lisk,lezama,leib,lebo,lanoue,lanford,lafortune,kump,krone,kreps,kott,kopecky,kolodziej,kinman,kimmons,kelty,kaster,karlson,kania,joyal,jenner,jasinski,jandreau,isenhour,hunziker,huhn,houde,houchins,holtman,hodo,heyman,hentges,hedberg,hayne,haycraft,harshbarger,harshaw,harriss,haring,hansell,hanford,handler,hamblen,gunnell,groat,gorecki,gochenour,gleeson,genest,geiser,fulghum,friese,fridley,freeborn,frailey,flaugher,fiala,ettinger,etheredge,espitia,eriksen,engelbrecht,engebretson,elie,eickhoff,edney,edelen,eberhard,eastin,eakes,driggs,doner,donaghy,disalvo,deshong,dahms,dahlquist,curren,cripe,cree,creager,corle,conatser,commons,coggin,coder,coaxum,closson,clodfelter,classen,chittenden,castilleja,casale,cartee,carriere,canup,canizales,burgoon,bunger,bugarin,buchanon,bruning,bruck,brookes,broadwell,brier,brekke,breese,bracero,bowley,bowersox,bose,bogar,blauser,blacker,bjorklund,baumer,basler,baize,baden,auman,amundsen,amore,alvarenga,adamczyk,yerkes,yerby,yamaguchi,worthey,wolk,wixom,wiersma,wieczorek,whiddon,weyer,wetherington,wein,watchman,warf,wansley,vesely,velazco,vannorman,valasquez,utz,urso,turco,turbeville,trivett,toothaker,toohey,tondreau,thaler,sylvain,swindler,swigert,swider,stiner,stever,steffes,stampley,stair,smidt,skeete,silvestre,shutts,shealey,seigler,schweizer,schuldt,schlichting,scherr,saulsberry,saner,rosin,rosato,roling,rohn,rix,rister,remley,remick,recinos,ramm,raabe,pursell,poythress,poli,pokorny,pettry,petrey,petitt,penman,payson,paquet,pappalardo,outland,orenstein,nuttall,nuckols,nott,nimmo,murtagh,mousseau,moulder,mooneyhan,moak,minch,miera,mercuri,meighan,mcnelly,mcguffin,mccreery,mcclaskey,mainor,luongo,lundstrom,loughman,lobb,linhart,lever,leu,leiter,lehoux,lehn,lares,lapan,langhorne,lamon,ladwig,ladson,kuzma,kreitzer,knop,keech,kea,kadlec,jhonson,jantz,inglis,husk,hulme,housel,hofman,hillery,heidenreich,heaps,haslett,harting,hartig,hamler,halton,hallum,gutierres,guida,guerrier,grossi,gress,greenhalgh,gravelle,gow,goslin,gonyea,gipe,gerstner,gasser,garceau,gannaway,gama,gallop,gaiser,fullilove,foutz,fossum,flannagan,farrior,faller,ericksen,entrekin,enochs,englund,ellenberger,eastland,earwood,dudash,drozd,desoto,delph,dekker,dejohn,degarmo,defeo,defalco,deblois,dacus,cudd,crossen,crooms,cronan,costin,cordray,comerford,colegrove,coldwell,claassen,chartrand,castiglione,carte,cardella,carberry,capp,capobianco,cangelosi,buch,brunell,brucker,brockett,brizendine,brinegar,brimer,brase,bosque,bonk,bolger,bohanon,bohan,blazek,berning,bergan,bennette,beauchemin,battiste,barra,balogh,avallone,aubry,ashcroft,asencio,arledge,anchondo,alvord,acheson,zaleski,yonker,wyss,wycoff,woodburn,wininger,winders,willmon,wiechmann,westley,weatherholt,warnick,wardle,warburton,volkert,villanveva,veit,vass,vanallen,tung,toribio,toothman,tiggs,thornsberry,thome,tepper,teeple,tebo,tassone,tann,stucker,stotler,stoneman,stehle,stanback,stallcup,spurr,speers,spada,solum,smolen,sinn,silvernail,sholes,shives,shain,secrest,seagle,schuette,schoch,schnieders,schild,schiavone,schiavo,scharff,santee,sandell,salvo,rollings,rivenburg,ritzman,rist,reynosa,retana,regnier,rarick,ransome,rall,propes,prall,poyner,ponds,poitra,pippins,pinion,phu,perillo,penrose,pendergraft,pelchat,patenaude,palko,odoms,oddo,novoa,noone,newburn,negri,nantz,mosser,moshier,molter,molinari,moler,millman,meurer,mendel,mcray,mcnicholas,mcnerney,mckillip,mcilvain,mcadory,marmol,marinez,manzer,mankin,makris,majeski,maffei,luoma,luman,luebke,luby,lomonaco,loar,litchford,lintz,licht,levenson,legge,lanigan,krom,kreger,koop,kober,klima,kitterman,kinkead,kimbell,kilian,kibbe,kendig,kemmer,kash,jenkin,inniss,hurlbut,hunsucker,huckabee,hoxie,hoglund,hockensmith,hoadley,hinkel,higuera,herrman,heiner,hausmann,haubrich,hassen,hanlin,hallinan,haglund,hagberg,gullo,gullion,groner,greenwalt,gobert,glowacki,glessner,gines,gildersleeve,gildea,gerke,gebhard,gatton,gately,galasso,fralick,fouse,fluharty,faucette,fairfax,evanoff,elser,ellard,egerton,ector,ebling,dunkel,duhart,drysdale,dostal,dorey,dolph,doles,dismukes,digregorio,digby,dewees,deramus,denniston,dennett,deloney,delaughter,cuneo,cumberland,crotts,crosswhite,cremeans,creasey,cottman,cothern,costales,cosner,corpus,colligan,cobble,clutter,chupp,chevez,chatmon,chaires,caplan,caffee,cabana,burrough,burditt,buckler,brunswick,brouillard,broady,bowlby,bouley,borgman,boltz,boddy,blackston,birdsell,bedgood,bate,bartos,barriga,barna,barcenas,banach,baccus,auclair,ashman,arter,arendt,ansell,allums,allender,alber,albarran,adelson,zoll,wysong,wimbley,wildes,whitis,whitehill,whicker,weymouth,weldy,wark,wareham,waddy,viveiros,vath,vandoren,vanderhoof,unrein,uecker,tsan,trepanier,tregre,torkelson,tobler,tineo,timmer,swopes,swofford,sweeten,swarts,summerfield,sumler,stucky,strozier,stigall,stickel,stennis,stelzer,steely,slayden,skillern,shurtz,shelor,shellenbarger,shand,shabazz,seo,scroggs,schwandt,schrecengost,schoenrock,schirmer,sandridge,ruzicka,rozek,rowlands,roser,rosendahl,romanowski,rolston,riggio,reichman,redondo,reay,rawlinson,raskin,raine,quandt,purpura,pruneda,prevatte,prettyman,pinedo,pierro,pidgeon,phillippi,pfeil,penix,peasley,paro,ospina,ortegon,ogata,ogara,normandin,nordman,nims,nassar,motz,morlan,mooring,moles,moir,mizrahi,mire,minaya,millwood,mikula,messmer,meikle,mctaggart,mcgonagle,mcewan,mccasland,mccane,mccaffery,mcalexander,mattocks,matranga,martone,markland,maravilla,manno,mancha,mallery,magno,lorentz,locklin,livingstone,lipford,lininger,lepley,leming,lemelin,leadbetter,lawhon,lattin,langworthy,lampman,lambeth,lamarr,lahey,krajewski,klopp,kinnison,kestner,kennell,karim,jozwiak,jakubowski,ivery,iliff,iddings,hudkins,houseman,holz,holderman,hoehne,highfill,hiett,heskett,heldt,hedman,hayslett,hatchell,hasse,hamon,hamada,hakala,haislip,haffey,hackbarth,guo,gullickson,guerrette,greenblatt,goudreau,gongora,godbout,glaude,gills,gillison,gigliotti,gargano,gallucci,galli,galante,frasure,fodor,fizer,fishburn,finkbeiner,finck,fager,estey,espiritu,eppinger,epperly,emig,eckley,dray,dorsch,dille,devita,deslauriers,demery,delorme,delbosque,dauphin,dantonio,curd,crume,cozad,cossette,comacho,climer,chadbourne,cespedes,cayton,castaldo,carpino,carls,capozzi,canela,buzard,busick,burlison,brinkmann,bridgeforth,bourbeau,bornstein,bonfiglio,boice,boese,biondi,bilski,betton,berwick,berlanga,behan,becraft,barrientez,banh,balke,balderrama,bahe,bachand,armer,arceo,aliff,alatorre,zermeno,younce,yeoman,yamasaki,wroten,woodby,winer,willits,wilcoxon,wehmeyer,waterbury,wass,wann,wachtel,vizcarra,veitch,vanderbilt,vallone,vallery,ureno,tyer,tipps,tiedeman,theberge,texeira,taub,tapscott,stutts,stults,stukes,spink,sottile,smithwick,slane,simeone,silvester,siegrist,shiffer,sheedy,sheaffer,severin,sellman,scotto,schupp,schueller,schreier,schoolcraft,schoenberger,schnabel,sangster,samford,saliba,ryles,ryans,rossetti,rodriguz,risch,riel,rezendes,rester,rencher,recker,rathjen,profitt,poteete,polizzi,perrigo,patridge,osby,orvis,opperman,oppenheim,onorato,olaughlin,ohagan,ogles,oehler,obyrne,nuzzo,nickle,nease,neagle,navarette,nagata,musto,morison,montz,mogensen,mizer,miraglia,migliore,menges,mellor,mcnear,mcnab,mcloud,mcelligott,mccollom,maynes,marquette,markowski,marcantonio,maldanado,macey,lundeen,longino,lisle,linthicum,limones,lesure,lesage,lauver,laubach,latshaw,lary,lapham,lacoste,lacher,kutcher,knickerbocker,klos,klingler,kleiman,kittleson,kimbrel,kemmerer,kelson,keese,kallas,jurgensen,junkins,juergens,jolliff,jelks,janicki,jang,ingles,huguley,huggard,howton,hone,holford,hogle,hipple,heimbach,heider,heidel,havener,hattaway,harrah,hanscom,hankinson,hamdan,gridley,goulette,goulart,goodrow,girardi,gent,gautreau,gandara,gamblin,galipeau,fyffe,furrow,fulp,fricks,frase,frandsen,fout,foulks,fouche,foskey,forgey,foor,fobbs,finklea,fincham,figueiredo,festa,ferrier,fellman,eslick,eilerman,eckart,eaglin,dunfee,dumond,drewry,douse,dimick,diener,dickert,deines,declue,daw,dattilo,danko,custodio,cuccia,crunk,crispin,corp,corea,coppin,considine,coniglio,conboy,cockrum,clute,clewis,christiano,channell,cerrato,cecere,catoe,castillon,castile,carstarphen,carmouche,caperton,buteau,bumpers,brey,brazeal,brassard,braga,bradham,bourget,borrelli,borba,boothby,bohr,bohm,boehme,bodin,bloss,blocher,bizzell,bieker,berthelot,bernardini,berends,benard,belser,baze,bartling,barrientes,barras,barcia,banfield,aurand,artman,arnott,arend,amon,almaguer,allee,albarado,alameda,abdo,zuehlke,zoeller,yokoyama,yocom,wyllie,woolum,wint,winland,wilner,wilmes,whitlatch,westervelt,walthall,walkowiak,walburn,viviano,vanderhoff,valez,ugalde,trumbull,todaro,tilford,tidd,tibbits,terranova,templeman,tannenbaum,talmage,tabarez,swearengin,swartwood,svendsen,strum,strack,storie,stockard,steinbeck,starns,stanko,stankiewicz,stacks,stach,sproles,spenser,smotherman,slusser,sinha,silber,siefert,siddiqui,shuff,sherburne,seldon,seddon,schweigert,schroeter,schmucker,saffold,rutz,rundle,rosinski,rosenow,rogalski,ridout,rhymer,replogle,raygoza,ratner,rascoe,rahm,quast,pressnell,predmore,pou,porto,pleasants,pigford,pavone,patnaude,parramore,papadopoulos,palmatier,ouzts,oshields,ortis,olmeda,olden,okamoto,norby,nitz,niebuhr,nevius,neiman,neidig,neece,murawski,mroz,moylan,moultry,mosteller,moring,morganti,mook,moffet,mettler,merlo,mengel,mendelsohn,meli,melchior,mcmeans,mcfaddin,mccullers,mccollister,mccloy,mcclaine,maury,maser,martelli,manthey,malkin,maio,magwood,maginnis,mabon,luton,lusher,lucht,lobato,levis,letellier,legendre,latson,larmon,largo,landreneau,landgraf,lamberson,kurland,kresge,korman,korando,klapper,kitson,kinyon,kincheloe,kawamoto,kawakami,jenney,jeanpierre,ivers,issa,ince,hollier,hollars,hoerner,hodgkinson,hiott,hibbitts,herlihy,henricks,heavner,hayhurst,harvill,harewood,hanselman,hanning,gustavson,grizzard,graybeal,gravley,gorney,goll,goehring,godines,gobeil,glickman,giuliano,gimbel,geib,gayhart,gatti,gains,gadberry,frei,fraise,fouch,forst,forsman,folden,fogleman,fetty,feely,fabry,eury,estill,epling,elamin,echavarria,dutil,duryea,dumais,drago,downard,douthit,doolin,dobos,dison,dinges,diebold,desilets,deshazo,depaz,degennaro,dall,cyphers,cryer,croce,crisman,credle,coriell,copp,compos,colmenero,cogar,carnevale,campanella,caley,calderone,burtch,brouwer,brehmer,brassell,brafford,bourquin,bourn,bohnert,blewett,blass,blakes,bhakta,besser,berge,bellis,balfour,avera,applin,ammon,alsop,aleshire,akbar,zoller,zapien,wymore,wyble,wolken,wix,wickstrom,whobrey,whigham,westerlund,welsch,weisser,weisner,weinstock,wehner,watlington,wakeland,wafer,victorino,veltri,veith,urich,uresti,umberger,twedt,tuohy,tschida,trumble,troia,trimmer,topps,tonn,tiernan,threet,thrall,thetford,teneyck,tartaglia,strohl,streater,strausbaugh,stradley,stonecipher,steadham,stansel,stalcup,stabile,sprenger,spradley,speier,southwood,sorrels,slezak,skow,sirmans,simental,sifford,sievert,shover,sheley,selzer,scriven,schwindt,schwan,schroth,saylors,saragosa,sant,salaam,saephan,routt,rousey,ros,rolfes,rieke,rieder,richeson,redinger,rasnick,rapoza,rambert,quist,pyron,pullman,przybylski,pridmore,pooley,pines,perkinson,perine,perham,pecor,peavler,partington,panton,oliverio,olague,ohman,ohearn,noyola,nicolai,nebel,murtha,mowrey,moroney,morgenstern,morant,monsour,moffit,mijares,meriwether,mendieta,melendrez,mejorado,mckittrick,mckey,mckenny,mckelvy,mcelvain,mccoin,mazzarella,mazon,maurin,matthies,maston,maske,marzano,marmon,marburger,mangus,mangino,mallet,luo,losada,londono,lobdell,lipson,lesniak,leighty,lei,lavallie,lareau,laperle,lape,laforce,laffey,kuehner,kravitz,kowalsky,kohr,kinsman,keppler,kennemer,keiper,kaler,jun,jelinek,jarnagin,isakson,hypes,hutzler,huls,horak,hitz,hice,herrell,henslee,heitz,heiss,heiman,hasting,hartwick,harmer,hammontree,hakes,guse,guillotte,groleau,greve,greenough,golub,golson,goldschmidt,golder,godbolt,gilmartin,gies,gibby,geren,genthner,gendreau,gemmill,gaymon,galyean,galeano,friar,folkerts,fleeman,fitzgibbons,ferranti,felan,farrand,eoff,enger,engels,ducksworth,duby,drumheller,douthitt,donis,dixion,dittrich,dials,descoteaux,depaul,denker,demuth,demelo,delacerda,deforge,danos,dalley,daigneault,cybulski,cothren,corns,corkery,copas,clubb,clore,chitty,chichester,chace,catanzaro,castonguay,cassella,carlberg,cammarata,calle,cajigas,byas,buzbee,busey,burling,bufkin,brzezinski,brun,brickner,brabham,boller,bockman,bleich,blakeman,bisbee,bier,bezanson,bevilacqua,besaw,berrian,bequette,beauford,baumgarten,baudoin,batie,basaldua,bardin,bangert,banes,backlund,avitia,artz,archey,apel,amico,alam,aden,zebrowski,yokota,wormley,wootton,womac,wiltz,wigington,whitehorn,whisman,weisgerber,weigle,weedman,watkin,wasilewski,wadlington,wadkins,viverette,vidaurri,vidales,vezina,vanleer,vanhoy,vanguilder,vanbrunt,updegraff,tylor,trinkle,touchette,tilson,tilman,tengan,tarkington,surrett,summy,streetman,straughter,steere,spruell,spadaro,solley,smathers,silvera,siems,shreffler,sholar,selden,schaper,samayoa,ruggeri,rowen,rosso,rosenbalm,roose,ronquillo,rogowski,rexford,repass,renzi,renick,rehberg,ranck,raffa,rackers,raap,puglisi,prinz,pounders,pon,pompa,plasencia,pipkins,petrosky,pelley,pauls,pauli,parkison,parisien,pangle,pancoast,palazzolo,owenby,overbay,orris,orlowski,nipp,newbern,nedd,nealon,najar,mysliwiec,myres,musson,murrieta,munsell,mumma,muldowney,moyle,mowen,morejon,moodie,monier,mikkelsen,miers,metzinger,melin,mcquay,mcpeek,mcneeley,mcglothin,mcghie,mcdonell,mccumber,mccranie,mcbean,mayhugh,marts,marenco,manges,lynam,lupien,luff,luebbert,loh,loflin,lococo,loch,lis,linke,lightle,lewellyn,leishman,lebow,lebouef,leanos,lanz,landy,landaverde,lacefield,kyler,kuebler,kropf,kroeker,kluesner,klass,kimberling,kilkenny,kiker,ketter,kelemen,keasler,kawamura,karst,kardos,igo,huseman,huseby,hurlbert,huard,hottinger,hornberger,hopps,holdsworth,hensen,heilig,heeter,harpole,haak,gutowski,gunnels,grimmer,gravatt,granderson,gotcher,gleaves,genao,garfinkel,frerichs,foushee,flanery,finnie,feldt,fagin,ewalt,ellefson,eiler,eckhart,eastep,digirolamo,didomenico,devera,delavega,defilippo,debusk,daub,damiani,cupples,crofoot,courter,coto,costigan,corning,corman,corlett,cooperman,collison,coghlan,cobbins,coady,coachman,clothier,cipolla,chmielewski,chiodo,chatterton,chappelle,chairez,ceron,casperson,casler,casados,carrow,carlino,carico,cardillo,caouette,canto,canavan,cambra,byard,buterbaugh,buse,bucy,buckwalter,bubb,bryd,brissette,brault,bradwell,boshears,borchert,blansett,biondo,biehl,bessey,belles,beeks,beekman,beaufort,bayliss,bardsley,avilla,astudillo,ardito,antunez,aderholt,abate,yowell,yin,yearby,wurst,woolverton,woolbright,wildermuth,whittenburg,whitely,wetherbee,wenz,welliver,welling,wason,warlick,voorhies,vivier,villines,verde,veiga,varghese,vanwyk,vanwingerden,vanhorne,umstead,twiggs,tusing,trego,tompson,tinkle,thoman,thole,tatman,tartt,suda,studley,strock,strawbridge,stokely,stec,stalter,speidel,spafford,sontag,sokolowski,skillman,skelley,skalski,sison,sippel,sinquefield,siegle,sher,sharrow,setliff,sellner,selig,seibold,seery,scriber,schull,schrupp,schippers,saulsbury,sao,santillo,sanor,rubalcaba,roosa,ronk,robbs,roache,riebe,reinoso,quin,preuss,pottorff,pontiff,plouffe,picou,picklesimer,pettyjohn,petti,penaloza,parmelee,pardee,palazzo,overholt,ogawa,ofarrell,nolting,noda,nickson,nevitt,neveu,navarre,murrow,munz,mulloy,monzo,milliman,metivier,merlino,mcpeters,mckissack,mckeen,mcgurk,mcfee,mcfarren,mcelwee,mceachin,mcdonagh,mccarville,mayhall,mattoon,martello,marconi,marbury,manzella,maly,malec,maitland,maheu,maclennan,lyke,luera,lowenstein,losh,lopiccolo,longacre,loman,loden,loaiza,lieber,libbey,lenhardt,lefebre,lauterbach,lauritsen,lass,larocco,larimer,lansford,lanclos,lamay,lal,kulikowski,kriebel,kosinski,kleinman,kleiner,kleckner,kistner,kissner,kissell,keisler,keeble,keaney,kale,joly,jimison,ikner,hursey,hruska,hove,hou,hosking,hoose,holle,hoeppner,hittle,hitchens,hirth,hinerman,higby,hertzog,hentz,hensler,heier,hegg,hassel,harpe,hara,hain,hagopian,grimshaw,grado,gowin,gowans,googe,goodlow,goering,gleaton,gidley,giannone,gascon,garneau,gambrel,galaz,fuentez,frisina,fresquez,fraher,feuerstein,felten,everman,ertel,erazo,ensign,endo,ellerman,eichorn,edgell,ebron,eaker,dundas,duncanson,duchene,ducan,dombroski,doman,dickison,dewoody,deloera,delahoussaye,dejean,degroat,decaro,dearmond,dashner,dales,crossett,cressey,cowger,cornette,corbo,coplin,coover,condie,cokley,ceaser,cannaday,callanan,cadle,buscher,bullion,bucklin,bruening,bruckner,brose,branan,bradway,botsford,bortz,borelli,bonetti,bolan,boerger,bloomberg,bingman,bilger,berns,beringer,beres,beets,beede,beaudet,beachum,baughn,bator,bastien,basquez,barreiro,barga,baratta,balser,baillie,axford,attebery,arakaki,annunziata,andrzejewski,ament,amendola,adcox,abril,zenon,zeitler,zambrana,ybanez,yagi,wolak,wilcoxson,whitesel,whitehair,weyand,westendorf,welke,weinmann,weesner,weekes,wedel,weatherall,warthen,vose,villalta,viator,vaz,valtierra,urbanek,tulley,trojanowski,trapani,toups,torpey,tomita,tindal,tieman,tevis,tedrow,taul,tash,tammaro,sylva,swiderski,sweeting,sund,stutler,stich,sterns,stegner,stalder,splawn,speirs,southwell,soltys,smead,slye,skipworth,sipos,simmerman,sidhu,shuffler,shingleton,shadwick,sermons,seefeldt,scipio,schwanke,schreffler,schiro,scheiber,sandoz,samsel,ruddell,royse,rouillard,rotella,rosalez,romriell,rizer,riner,rickards,rhoton,rhem,reppert,rayl,raulston,raposo,rainville,radel,quinney,purdie,pizzo,pincus,petrus,pendelton,pendarvis,peltz,peguero,peete,patricio,patchett,parrino,papke,palafox,ottley,ostby,oritz,ogan,odegaard,oatman,noell,nicoll,newhall,newbill,netzer,nettleton,neblett,murley,mungo,mulhall,mosca,morissette,morford,monsen,mitzel,miskell,minder,mehaffey,mcquillen,mclennan,mcgrail,mccreight,mayville,maysonet,maust,mathieson,mastrangelo,maskell,manz,malmberg,makela,madruga,lotts,longnecker,logston,littell,liska,lindauer,lillibridge,levron,letchworth,lesh,leffel,leday,leamon,kulas,kula,kucharski,kromer,kraatz,konieczny,konen,komar,kivett,kirts,kinnear,kersh,keithley,keifer,judah,jimenes,jeppesen,jansson,huntsberry,hund,huitt,huffine,hosford,holmstrom,hollen,hodgin,hirschman,hiltner,hilliker,hibner,hennis,helt,heidelberg,heger,heer,hartness,hardrick,halladay,gula,guillaume,guerriero,grunewald,grosse,griffeth,grenz,grassi,grandison,ginther,gimenez,gillingham,gillham,gess,gelman,gearheart,gaskell,gariepy,gamino,gallien,galentine,fuquay,froman,froelich,friedel,foos,fomby,focht,flythe,fiqueroa,filson,filip,fierros,fett,fedele,fasching,farney,fargo,everts,etzel,elzey,eichner,eger,eatman,ducker,duchesne,donati,domenech,dollard,dodrill,dinapoli,denn,delfino,delcid,delaune,delatte,deems,daluz,cusson,cullison,cuadrado,crumrine,cruickshank,crosland,croll,criddle,crepeau,coutu,couey,cort,coppinger,collman,cockburn,coca,clayborne,claflin,cissell,chowdhury,chicoine,chenier,causby,caulder,cassano,casner,cardiel,brunton,bruch,broxton,brosius,brooking,branco,bracco,bourgault,bosserman,bonet,bolds,bolander,bohman,boelter,blohm,blea,blaise,bischof,beus,bellew,bastarache,bast,bartolome,barcomb,barco,balk,balas,bakos,avey,atnip,ashbrook,arno,arbour,aquirre,appell,aldaco,alban,ahlstrom,abadie,zylstra,zick,yother,wyse,wunsch,whitty,weist,vrooman,villalon,vidrio,vavra,vasbinder,vanmatre,vandorn,ugarte,turberville,tuel,trogdon,toupin,toone,tolleson,tinkham,tinch,tiano,teston,teer,tawney,taplin,tant,tansey,swayne,sutcliffe,sunderman,strothers,stromain,stork,stoneburner,stolte,stolp,stoehr,stingley,stegman,stangl,spinella,spier,soules,sommerfield,sipp,simek,siders,shufelt,shue,shor,shires,shellenberger,sheely,sepe,seaberg,schwing,scherrer,scalzo,sasse,sarvis,santora,sansbury,salls,saleem,ryland,rybicki,ruggieri,rothenberg,rosenstein,roquemore,rollison,rodden,rivet,ridlon,riche,riccardi,reiley,regner,rech,rayo,raff,radabaugh,quon,quill,privette,prange,pickrell,perino,penning,pankratz,orlandi,nyquist,norrell,noren,naples,nale,nakashima,musselwhite,murrin,murch,mullinix,mullican,mullan,morneau,mondor,molinar,minjares,minix,minchew,milewski,mikkelson,mifflin,merkley,meis,meas,mcroy,mcphearson,mcneel,mcmunn,mcmorrow,mcdorman,mccroskey,mccoll,mcclusky,mcclaran,mccampbell,mazzariello,mauzy,mauch,mastro,martinek,marsala,marcantel,mahle,luciani,lubbers,lobel,linch,liller,legros,layden,lapine,lansberry,lage,laforest,labriola,koga,knupp,klimek,kittinger,kirchoff,kinzel,killinger,kilbourne,ketner,kepley,kemble,kells,kear,kaya,karsten,kaneshiro,kamm,joines,joachim,jacobus,iler,holgate,hoar,hisey,hird,hilyard,heslin,herzberg,hennigan,hegland,hartl,haner,handel,gualtieri,greenly,grasser,goetsch,godbold,gilland,gidney,gibney,giancola,gettinger,garzon,galle,galgano,gaier,gaertner,fuston,freel,fortes,fiorillo,figgs,fenstermacher,fedler,facer,fabiano,evins,euler,esquer,enyeart,elem,eich,edgerly,durocher,durgan,duffin,drolet,drewes,dotts,dossantos,dockins,dirksen,difiore,dierks,dickerman,dery,denault,demaree,delmonte,delcambre,daulton,darst,dahle,curnutt,cully,culligan,cueva,crosslin,croskey,cromartie,crofts,covin,coutee,coppa,coogan,condrey,concannon,coger,cloer,clatterbuck,cieslak,chumbley,choudhury,chiaramonte,charboneau,carneal,cappello,campisi,callicoat,burgoyne,bucholz,brumback,brosnan,brogden,broder,brendle,breece,bown,bou,boser,bondy,bolster,boll,bluford,blandon,biscoe,bevill,bence,battin,basel,bartram,barnaby,barmore,balbuena,badgley,backstrom,auyeung,ater,arrellano,arant,ansari,alling,alejandre,alcock,alaimo,aguinaldo,aarons,zurita,zeiger,zawacki,yutzy,yarger,wygant,wurm,wuest,witherell,wisneski,whitby,whelchel,weisz,weisinger,weishaar,wehr,waxman,waldschmidt,walck,waggener,vosburg,villela,vercher,venters,vanscyoc,vandyne,valenza,utt,urick,ungar,ulm,tumlin,tsao,tryon,trudel,treiber,tober,tipler,tillson,tiedemann,thornley,tetrault,temme,tarrance,tackitt,sykora,sweetman,swatzell,sutliff,suhr,sturtz,strub,strayhorn,stormer,steveson,stengel,steinfeldt,spiro,spieker,speth,spero,soza,souliere,soucie,snedeker,slifer,skillings,situ,siniard,simeon,signorelli,siggers,shultis,shrewsbury,shippee,shimp,shepler,sharpless,shadrick,severt,severs,semon,semmes,seiter,segers,sclafani,sciortino,schroyer,schrack,schoenberg,schober,scheidt,scheele,satter,sartori,sarratt,salvaggio,saladino,sakamoto,saine,ryman,rumley,ruggerio,rucks,roughton,robards,ricca,rexroad,resler,reny,rentschler,redrick,redick,reagle,raymo,raker,racette,pyburn,pritt,presson,pressman,pough,pisani,perz,perras,pelzer,pedrosa,palos,palmisano,paille,orem,orbison,oliveros,nourse,nordquist,newbury,nelligan,nawrocki,myler,mumaw,morphis,moldenhauer,miyashiro,mignone,mickelsen,michalec,mesta,mcree,mcqueary,mcninch,mcneilly,mclelland,mclawhorn,mcgreevy,mcconkey,mattes,maselli,marten,marcucci,manseau,manjarrez,malbrough,machin,mabie,lynde,lykes,lueras,lokken,loken,linzy,lillis,lilienthal,levey,legler,leedom,lebowitz,lazzaro,larabee,lapinski,langner,langenfeld,lampkins,lamotte,lambright,lagarde,ladouceur,labounty,lablanc,laberge,kyte,kroon,kron,kraker,kouba,kirwin,kincer,kimbler,kegler,keach,katzman,katzer,kalman,jimmerson,jenning,janus,iacovelli,hust,huson,husby,humphery,hufnagel,honig,holsey,holoman,hohl,hogge,hinderliter,hildebrant,hemby,helle,heintzelman,heidrick,hearon,hazelip,hauk,hasbrouck,harton,hartin,harpster,hansley,hanchett,haar,guthridge,gulbranson,guill,guerrera,grund,grosvenor,grist,grell,grear,granberry,gonser,giunta,giuliani,gillon,gillmore,gillan,gibbon,gettys,gelb,gano,galliher,fullen,frese,frates,foxwell,fleishman,fleener,fielden,ferrera,fells,feemster,fauntleroy,evatt,espy,eno,emmerich,edler,eastham,dunavant,duca,drinnon,dowe,dorgan,dollinger,dipalma,difranco,dietrick,denzer,demarest,delee,delariva,delany,decesare,debellis,deavers,deardorff,dawe,darosa,darley,dalzell,dahlen,curto,cupps,cunniff,cude,crivello,cripps,cresswell,cousar,cotta,compo,clyne,clayson,cearley,catania,carini,cantero,buttrey,buttler,burpee,bulkley,buitron,buda,bublitz,bryer,bryden,brouillette,brott,brookman,bronk,breshears,brennen,brannum,brandl,braman,bracewell,boyter,bomberger,bogen,boeding,blauvelt,blandford,biermann,bielecki,bibby,berthold,berkman,belvin,bellomy,beland,behne,beecham,becher,bax,bassham,barret,baley,auxier,atkison,ary,arocha,arechiga,anspach,algarin,alcott,alberty,ager,ackman,abdallah,zwick,ziemer,zastrow,zajicek,yokum,yokley,wittrock,winebarger,wilker,wilham,whitham,wetzler,westling,westbury,wendler,wellborn,weitzman,weitz,wallner,waldroup,vrabel,vowels,volker,vitiello,visconti,villicana,vibbert,vesey,vannatter,vangilder,vandervort,vandegrift,vanalstyne,vallecillo,usrey,tynan,turpen,tuller,trisler,townson,tillmon,threlkeld,thornell,terrio,taunton,tarry,tardy,swoboda,swihart,sustaita,suitt,stuber,strine,stookey,stmartin,stiger,stainbrook,solem,smail,sligh,siple,sieben,shumake,shriner,showman,sheen,sheckler,seim,secrist,scoggin,schultheis,schmalz,schendel,schacher,savard,saulter,santillanes,sandiford,sande,salzer,salvato,saltz,sakai,ryckman,ryant,ruck,rittenberry,ristau,richart,rhynes,reyer,reulet,reser,redington,reddington,rebello,reasor,raftery,rabago,raasch,quintanar,pylant,purington,provencal,prioleau,prestwood,pothier,popa,polster,politte,poffenberger,pinner,pietrzak,pettie,penaflor,pellot,pellham,paylor,payeur,papas,paik,oyola,osbourn,orzechowski,oppenheimer,olesen,oja,ohl,nuckolls,nordberg,noonkester,nold,nitta,niblett,neuhaus,nesler,nanney,myrie,mutch,mosquera,morena,montalto,montagna,mizelle,mincy,millikan,millay,miler,milbourn,mikels,migues,miesner,mershon,merrow,meigs,mealey,mcraney,mcmartin,mclachlan,mcgeehan,mcferren,mcdole,mccaulley,mcanulty,maziarz,maul,mateer,martinsen,marson,mariotti,manna,mance,malbon,magnusson,maclachlan,macek,lurie,luc,lown,loranger,lonon,lisenby,linsley,lenk,leavens,lauritzen,lathem,lashbrook,landman,lamarche,lamantia,laguerre,lagrange,kogan,klingbeil,kist,kimpel,kime,kier,kerfoot,kennamer,kellems,kammer,kamen,jepsen,jarnigan,isler,ishee,hux,hungate,hummell,hultgren,huffaker,hruby,hornick,hooser,hooley,hoggan,hirano,hilley,higham,heuser,henrickson,henegar,hellwig,hedley,hasegawa,hartt,hambright,halfacre,hafley,guion,guinan,grunwald,grothe,gries,greaney,granda,grabill,gothard,gossman,gosser,gossard,gosha,goldner,gobin,ginyard,gilkes,gilden,gerson,gephart,gengler,gautier,gassett,garon,galusha,gallager,galdamez,fulmore,fritsche,fowles,foutch,footman,fludd,ferriera,ferrero,ferreri,fenimore,fegley,fegan,fearn,farrier,fansler,fane,falzone,fairweather,etherton,elsberry,dykema,duppstadt,dunnam,dunklin,duet,dudgeon,dubuc,doxey,donmoyer,dodgen,disanto,dingler,dimattia,dilday,digennaro,diedrich,derossett,depp,demasi,degraffenreid,deakins,deady,davin,daigre,daddario,czerwinski,cullens,cubbage,cracraft,combest,coletti,coghill,claybrooks,christofferse,chiesa,chason,chamorro,celentano,cayer,carolan,carnegie,capetillo,callier,cadogan,caba,byrom,byrns,burrowes,burket,burdge,burbage,buchholtz,brunt,brungardt,brunetti,brumbelow,brugger,broadhurst,brigance,brandow,bouknight,bottorff,bottomley,bosarge,borger,bombardier,boggan,blumer,blecha,birney,birkland,betances,beran,belin,belgrave,bealer,bauch,bashir,bartow,baro,barnhouse,barile,ballweg,baisley,bains,baehr,badilla,bachus,bacher,bachelder,auzenne,aten,astle,allis,agarwal,adger,adamek,ziolkowski,zinke,zazueta,zamorano,younkin,wittig,witman,winsett,winkles,wiedman,whitner,whitcher,wetherby,westra,westhoff,wehrle,wagaman,voris,vicknair,veasley,vaugh,vanderburg,valletta,tunney,trumbo,truluck,trueman,truby,trombly,tourville,tostado,titcomb,timpson,tignor,thrush,thresher,thiede,tews,tamplin,taff,tacker,syverson,sylvestre,summerall,stumbaugh,strouth,straker,stradford,stokley,steinhoff,steinberger,spigner,soltero,snively,sletten,sinkler,sinegal,simoes,siller,sigel,shire,shinkle,shellman,sheller,sheats,sharer,selvage,sedlak,schriver,schimke,scheuerman,schanz,savory,saulters,sauers,sais,rusin,rumfelt,ruhland,rozar,rosborough,ronning,rolph,roloff,robie,rimer,riehle,ricco,rhein,retzlaff,reisman,reimann,rayes,raub,raminez,quesinberry,pua,procopio,priolo,printz,prewett,preas,prahl,poovey,ploof,platz,plaisted,pinzon,pineiro,pickney,petrovich,perl,pehrson,peets,pavon,pautz,pascarella,paras,paolini,pafford,oyer,ovellette,outten,outen,orduna,odriscoll,oberlin,nosal,niven,nisbett,nevers,nathanson,mukai,mozee,mowers,motyka,morency,montford,mollica,molden,mitten,miser,millender,midgette,messerly,melendy,meisel,meidinger,meany,mcnitt,mcnemar,mcmakin,mcgaugh,mccaa,mauriello,maudlin,matzke,mattia,matsumura,masuda,mangels,maloof,malizia,mahmoud,maglione,maddix,lucchesi,lochner,linquist,lietz,leventhal,lemanski,leiser,laury,lauber,lamberth,kuss,kulik,kuiper,krout,kotter,kort,kohlmeier,koffler,koeller,knipe,knauss,kleiber,kissee,kirst,kirch,kilgo,kerlin,kellison,kehl,kalb,jorden,jantzen,inabinet,ikard,husman,hunsberger,hundt,hucks,houtz,houseknecht,hoots,hogsett,hogans,hintze,hession,henault,hemming,helsley,heinen,heffington,heberling,heasley,hazley,hazeltine,hayton,hayse,hawke,haston,harward,harrow,hanneman,hafford,hadnot,guerro,grahm,gowins,gordillo,goosby,glatt,gibbens,ghent,gerrard,germann,gebo,gean,garling,gardenhire,garbutt,gagner,furguson,funchess,fujiwara,fujita,friley,frigo,forshee,folkes,filler,fernald,ferber,feingold,faul,farrelly,fairbank,failla,espey,eshleman,ertl,erhart,erhardt,erbe,elsea,ells,ellman,eisenhart,ehmann,earnhardt,duplantis,dulac,ducote,draves,dosch,dolce,divito,dimauro,derringer,demeo,demartini,delima,dehner,degen,defrancisco,defoor,dedeaux,debnam,cypert,cutrer,cusumano,custis,croker,courtois,costantino,cormack,corbeil,copher,conlan,conkling,cogdell,cilley,chapdelaine,cendejas,castiglia,cashin,carstensen,caprio,calcote,calaway,byfield,butner,bushway,burritt,browner,brobst,briner,bridger,brickley,brendel,bratten,bratt,brainerd,brackman,bowne,bouck,borunda,bordner,bonenfant,boer,boehmer,bodiford,bleau,blankinship,blane,blaha,bitting,bissonette,bigby,bibeau,bermudes,berke,bergevin,bergerson,bendel,belville,bechard,bearce,beadles,batz,bartlow,ayoub,avans,aumiller,arviso,arpin,arnwine,armwood,arent,arehart,arcand,antle,ambrosino,alongi,alm,allshouse,ahart,aguon,ziebarth,zeledon,zakrzewski,yuhas,yingst,yedinak,wommack,winnett,wingler,wilcoxen,whitmarsh,wayt,watley,warkentin,voll,vogelsang,voegele,vivanco,vinton,villafane,viles,ver,venne,vanwagoner,vanwagenen,vanleuven,vanauken,uselton,uren,trumbauer,tritt,treadaway,tozier,tope,tomczak,tomberlin,tomasini,tollett,toller,titsworth,tirrell,tilly,tavera,tarnowski,tanouye,swarthout,sutera,surette,styers,styer,stipe,stickland,stembridge,stearn,starkes,stanberry,stahr,spino,spicher,sperber,speece,sonntag,sneller,smalling,slowik,slocumb,sliva,slemp,slama,sitz,sisto,sisemore,sindelar,shipton,shillings,sheeley,sharber,shaddix,severns,severino,sensabaugh,seder,seawell,seamons,schrantz,schooler,scheffer,scheerer,scalia,saum,santibanez,sano,sanjuan,sampley,sailer,sabella,sabbagh,royall,rottman,rivenbark,rikard,ricketson,rickel,rethman,reily,reddin,reasoner,rast,ranallo,quintal,pung,pucci,proto,prosperie,prim,preusser,preslar,powley,postma,pinnix,pilla,pietsch,pickerel,pica,pharris,petway,petillo,perin,pereda,pennypacker,pennebaker,pedrick,patin,patchell,parodi,parman,pantano,padua,padro,osterhout,orner,olivar,ohlson,odonoghue,oceguera,oberry,novello,noguera,newquist,newcombe,neihoff,nehring,nees,nebeker,mundo,mullenix,morrisey,moronta,morillo,morefield,mongillo,molino,minto,midgley,michie,menzies,medved,mechling,mealy,mcshan,mcquaig,mcnees,mcglade,mcgarity,mcgahey,mcduff,mayweather,mastropietro,masten,maranto,maniscalco,maize,mahmood,maddocks,maday,macha,maag,luken,lopp,lolley,llanas,litz,litherland,lindenberg,lieu,letcher,lentini,lemelle,leet,lecuyer,leber,laursen,larrick,lantigua,langlinais,lalli,lafever,labat,labadie,krogman,kohut,knarr,klimas,klar,kittelson,kirschbaum,kintzel,kincannon,kimmell,killgore,kettner,kelsch,karle,kapoor,johansson,jenkinson,janney,iraheta,insley,hyslop,huckstep,holleran,hoerr,hinze,hinnenkamp,hilger,higgin,hicklin,heroux,henkle,helfer,heikkinen,heckstall,heckler,heavener,haydel,haveman,haubert,harrop,harnois,hansard,hanover,hammitt,haliburton,haefner,hadsell,haakenson,guynn,guizar,grout,grosz,gomer,golla,godby,glanz,glancy,givan,giesen,gerst,gayman,garraway,gabor,furness,frisk,fremont,frary,forand,fessenden,ferrigno,fearon,favreau,faulks,falbo,ewen,eurich,etchison,esterly,entwistle,ellingsworth,eisenbarth,edelson,eckel,earnshaw,dunneback,doyal,donnellan,dolin,dibiase,deschenes,dermody,degregorio,darnall,dant,dansereau,danaher,dammann,dames,czarnecki,cuyler,custard,cummingham,cuffie,cuffee,cudney,cuadra,crigler,creger,coughlan,corvin,cortright,corchado,connery,conforti,condron,colosimo,colclough,cohee,ciotti,chien,chacko,cevallos,cavitt,cavins,castagna,cashwell,carrozza,carrara,capra,campas,callas,caison,caggiano,bynoe,buswell,burpo,burnam,burges,buerger,buelow,bueche,bruni,brummitt,brodersen,briese,breit,brakebill,braatz,boyers,boughner,borror,borquez,bonelli,bohner,blaker,blackmer,bissette,bibbins,bhatt,bhatia,bessler,bergh,beresford,bensen,benningfield,bellantoni,behler,beehler,beazley,beauchesne,bargo,bannerman,baltes,balog,ballantyne,axelson,apgar,aoki,anstett,alejos,alcocer,albury,aichele,ackles,zerangue,zehner,zank,zacarias,youngberg,yorke,yarbro,wydra,worthley,wolbert,wittmer,witherington,wishart,winkleman,willilams,willer,wiedeman,whittingham,whitbeck,whetsel,wheless,westerberg,welcher,wegman,waterfield,wasinger,warfel,wannamaker,walborn,wada,vogl,vizcarrondo,vitela,villeda,veras,venuti,veney,ulrey,uhlig,turcios,tremper,torian,torbett,thrailkill,terrones,teitelbaum,teems,swoope,sunseri,stutes,stthomas,strohm,stroble,striegel,streicher,stodola,stinchcomb,steves,steppe,steller,staudt,starner,stamant,stam,stackpole,sprankle,speciale,spahr,sowders,sova,soluri,soderlund,slinkard,sjogren,sirianni,siewert,sickels,sica,shugart,shoults,shive,shimer,shier,shepley,sheeran,sevin,seto,segundo,sedlacek,scuderi,schurman,schuelke,scholten,schlater,schisler,schiefelbein,schalk,sanon,sabala,ruyle,ruybal,rueb,rowsey,rosol,rocheleau,rishel,rippey,ringgold,rieves,ridinger,retherford,rempe,reith,rafter,raffaele,quinto,putz,purdom,puls,pulaski,propp,principato,preiss,prada,polansky,poch,plath,pittard,pinnock,pfarr,pfannenstiel,penniman,pauling,patchen,paschke,parkey,pando,ouimet,ottman,ostlund,ormiston,occhipinti,nowacki,norred,noack,nishida,nilles,nicodemus,neth,nealey,myricks,murff,mungia,motsinger,moscato,morado,monnier,molyneux,modzelewski,miura,minich,militello,milbrandt,michalik,meserve,mendivil,melara,mcnish,mcelhannon,mccroy,mccrady,mazzella,maule,mattera,mathena,matas,mascorro,marinello,marguez,manwaring,manhart,mangano,maggi,lymon,luter,luse,lukasik,luiz,ludlum,luczak,lowenthal,lossett,lorentzen,loredo,longworth,lomanto,lisi,lish,lipsky,linck,liedtke,levering,lessman,lemond,lembo,ledonne,leatham,laufer,lanphear,langlais,lamphear,lamberton,lafon,lade,lacross,kyzer,krok,kring,krell,krehbiel,kratochvil,krach,kovar,kostka,knudtson,knaack,kliebert,klahn,kirkley,kimzey,kerrick,kennerson,keesler,karlin,janousek,imel,icenhour,hyler,hudock,houpt,holquin,holiman,holahan,hodapp,hillen,hickmon,hersom,henrich,helvey,heidt,heideman,hedstrom,hedin,hebron,hayter,harn,hardage,halsted,hahne,hagemann,guzik,guel,groesbeck,gritton,grego,graziani,grasty,graney,gouin,gossage,golston,goheen,godina,glade,giorgi,giambrone,gerrity,gerrish,gero,gerling,gaulke,garlick,galiano,gaiter,gahagan,gagnier,friddle,fredericksen,franqui,follansbee,foerster,flury,fitzmaurice,fiorini,finlayson,fiecke,fickes,fichter,ferron,farrel,fackler,eyman,escarcega,errico,erler,erby,engman,engelmann,elsass,elliston,eddleman,eadie,dummer,drost,dorrough,dorrance,doolan,donalson,domenico,ditullio,dittmar,dishon,dionisio,dike,devinney,desir,deschamp,derrickson,delamora,deitch,dechant,danek,dahmen,curci,cudjoe,croxton,creasman,craney,crader,cowling,coulston,cortina,corlew,corl,copland,convery,cohrs,clune,clausing,cipriani,cianciolo,chubb,chittum,chenard,charlesworth,charlebois,champine,chamlee,chagoya,casselman,cardello,capasso,cannella,calderwood,byford,buttars,bushee,burrage,buentello,brzozowski,bryner,brumit,brookover,bronner,bromberg,brixey,brinn,briganti,bremner,brawn,branscome,brannigan,bradsher,bozek,boulay,bormann,bongiorno,bollin,bohler,bogert,bodenhamer,blose,bivona,billips,bibler,benfer,benedetti,belue,bellanger,belford,behn,barnhardt,baltzell,balling,balducci,bainter,babineau,babich,baade,attwood,asmus,asaro,artiaga,applebaum,anding,amar,amaker,allsup,alligood,alers,agin,agar,achenbach,abramowitz,abbas,aasen,zehnder,yopp,yelle,yeldell,wynter,woodmansee,wooding,woll,winborne,willsey,willeford,widger,whiten,whitchurch,whang,weissinger,weinman,weingartner,weidler,waltrip,wagar,wafford,vitagliano,villalvazo,villacorta,vigna,vickrey,vicini,ventimiglia,vandenbosch,valvo,valazquez,utsey,urbaniak,unzueta,trombetta,trevizo,trembley,tremaine,traverso,tores,tolan,tillison,tietjen,teachout,taube,tatham,tarwater,tarbell,sydow,swims,swader,striplin,stoltenberg,steinhauer,steil,steigerwald,starkweather,stallman,squier,sparacino,spadafora,shiflet,shibata,shevlin,sherrick,sessums,servais,senters,seevers,seelye,searfoss,seabrooks,scoles,schwager,schrom,schmeltzer,scheffel,sawin,saterfiel,sardina,sanroman,sandin,salamanca,saladin,sabia,rustin,rushin,ruley,rueter,rotter,rosenzweig,rohe,roder,riter,rieth,ried,ridder,rennick,remmers,remer,relyea,reilley,reder,rasheed,rakowski,rabin,queener,pursel,prowell,pritts,presler,pouncy,porche,porcaro,pollman,pleas,planas,pinkley,pinegar,pilger,philson,petties,perrodin,pendergrast,patao,pasternak,passarelli,pasko,parshall,panos,panella,palombo,padillo,oyama,overlock,overbeck,otterson,orrell,ornellas,opitz,okelly,obando,noggle,nicosia,netto,negrin,natali,nakayama,nagao,nadel,musial,murrill,murrah,munsch,mucci,mrozek,moyes,mowrer,moris,morais,moorhouse,monico,mondy,moncayo,miltenberger,milsap,milone,millikin,milardo,micheals,micco,meyerson,mericle,mendell,meinhardt,meachum,mcleroy,mcgray,mcgonigal,maultsby,matis,matheney,matamoros,marro,marcil,marcial,mantz,mannings,maltby,malchow,maiorano,mahn,mahlum,maglio,maberry,lustig,luellen,longwell,longenecker,lofland,locascio,linney,linneman,lighty,levell,levay,lenahan,lemen,lehto,lebaron,lanctot,lamy,lainez,laffoon,labombard,kujawski,kroger,kreutzer,korhonen,kondo,kollman,kohan,kogut,knaus,kivi,kittel,kinner,kindig,kindel,kiesel,kibby,khang,kettler,ketterer,kepner,kelliher,keenum,kanode,kail,juhasz,jowett,jolicoeur,jeon,iser,ingrassia,imai,hutchcraft,humiston,hulings,hukill,huizenga,hugley,hornyak,hodder,hisle,hillenbrand,hille,higuchi,hertzler,herdon,heppner,hepp,heitmann,heckart,hazlewood,hayles,hayek,hawkin,haugland,hasler,harbuck,happel,hambly,hambleton,hagaman,guzzi,gullette,guinyard,grogg,grise,griffing,goto,gosney,goley,goldblatt,gledhill,girton,giltner,gillock,gilham,gilfillan,giblin,gentner,gehlert,gehl,garten,garney,garlow,garett,galles,galeana,futral,fuhr,friedland,franson,fransen,foulds,follmer,foland,flax,flavin,firkins,fillion,figueredo,ferrill,fenster,fenley,fauver,farfan,eustice,eppler,engelman,engelke,emmer,elzy,ellwood,ellerbee,elks,ehret,ebbert,durrah,dupras,dubuque,dragoo,donlon,dolloff,dibella,derrico,demko,demar,darrington,czapla,crooker,creagh,cranor,craner,crabill,coyer,cowman,cowherd,cottone,costillo,coster,costas,cosenza,corker,collinson,coello,clingman,clingerman,claborn,chmura,chausse,chaudhry,chapell,chancy,cerrone,caverly,caulkins,carn,campfield,campanelli,callaham,cadorette,butkovich,buske,burrier,burkley,bunyard,buckelew,buchheit,broman,brescia,brasel,boyster,booe,bonomo,bondi,bohnsack,blomberg,blanford,bilderback,biggins,bently,behrends,beegle,bedoya,bechtol,beaubien,bayerl,baumgart,baumeister,barratt,barlowe,barkman,barbagallo,baldree,baine,baggs,bacote,aylward,ashurst,arvidson,arthurs,arrieta,arrey,arreguin,arrant,arner,arizmendi,anker,amis,amend,alphin,allbright,aikin,zupan,zuchowski,zeolla,zanchez,zahradnik,zahler,younan,yeater,yearta,yarrington,yantis,woomer,wollard,wolfinger,woerner,witek,wishon,wisener,wingerter,willet,wilding,wiedemann,weisel,wedeking,waybright,wardwell,walkins,waldorf,voth,voit,virden,viloria,villagran,vasta,vashon,vaquera,vantassell,vanderlinden,vandergrift,vancuren,valenta,underdahl,tygart,twining,twiford,turlington,tullius,tubman,trowell,trieu,transue,tousant,torgersen,tooker,tome,toma,tocci,tippins,tinner,timlin,tillinghast,tidmore,teti,tedrick,tacey,swanberg,sunde,summitt,summerford,summa,stratman,strandberg,storck,stober,steitz,stayer,stauber,staiger,sponaugle,spofford,sparano,spagnola,sokoloski,snay,slough,skowronski,sieck,shimkus,sheth,sherk,shankles,shahid,sevy,senegal,seiden,seidell,searls,searight,schwalm,schug,schilke,schier,scheck,sawtelle,santore,sanks,sandquist,sanden,saling,saathoff,ryberg,rustad,ruffing,rudnicki,ruane,rozzi,rowse,rosenau,rodes,risser,riggin,riess,riese,rhoten,reinecke,reigle,reichling,redner,rebelo,raynes,raimondi,rahe,rada,querry,quellette,pulsifer,prochnow,prato,poulton,poudrier,policastro,polhemus,polasek,poissant,pohlmann,plotner,pitkin,pita,pinkett,piekarski,pichon,pfau,petroff,petermann,peplinski,peller,pecinovsky,pearse,pattillo,patague,parlier,parenti,parchman,pane,paff,ortner,oros,nolley,noakes,nigh,nicolosi,nicolay,newnam,netter,nass,napoles,nakata,nakamoto,morlock,moraga,montilla,mongeau,molitor,mohney,mitchener,meyerhoff,medel,mcniff,mcmonagle,mcglown,mcglinchey,mcgarrity,mccright,mccorvey,mcconnel,mccargo,mazzei,matula,mastroianni,massingale,maring,maricle,mans,mannon,mannix,manney,manalo,malo,malan,mahony,madril,mackowiak,macko,macintosh,lurry,luczynski,lucke,lucarelli,losee,lorence,loiacono,lohse,loder,lipari,linebarger,lindamood,limbaugh,letts,leleux,leep,leeder,leard,laxson,lawry,laverdiere,laughton,lastra,kurek,kriss,krishnan,kretschmer,krebsbach,kontos,knobel,knauf,klick,kleven,klawitter,kitchin,kirkendoll,kinkel,kingrey,kilbourn,kensinger,kennerly,kamin,justiniano,jurek,junkin,judon,jordahl,jeanes,jarrells,iwamoto,ishida,immel,iman,ihle,hyre,hurn,hunn,hultman,huffstetler,huffer,hubner,howey,hooton,holts,holscher,holen,hoggatt,hilaire,herz,henne,helstrom,hellickson,heinlein,heckathorn,heckard,headlee,hauptman,haughey,hatt,harring,harford,hammill,hamed,halperin,haig,hagwood,hagstrom,gunnells,gundlach,guardiola,greeno,greenland,gonce,goldsby,gobel,gisi,gillins,gillie,germano,geibel,gauger,garriott,garbarino,gajewski,funari,fullbright,fuell,fritzler,freshwater,freas,fortino,forbus,flohr,flemister,fisch,finks,fenstermaker,feldstein,farhat,fankhauser,fagg,fader,exline,emigh,eguia,edman,eckler,eastburn,dunmore,dubuisson,dubinsky,drayer,doverspike,doubleday,doten,dorner,dolson,dohrmann,disla,direnzo,dipaola,dines,diblasi,dewolf,desanti,dennehy,demming,delker,decola,davilla,daughtridge,darville,darland,danzy,dagenais,culotta,cruzado,crudup,croswell,coverdale,covelli,couts,corbell,coplan,coolbaugh,conyer,conlee,conigliaro,comiskey,coberly,clendening,clairmont,cienfuegos,chojnacki,chilcote,champney,cassara,casazza,casado,carew,carbin,carabajal,calcagni,cail,busbee,burts,burbridge,bunge,bundick,buhler,bucholtz,bruen,broce,brite,brignac,brierly,bridgman,braham,bradish,boyington,borjas,bonn,bonhomme,bohlen,bogardus,bockelman,blick,blackerby,bizier,biro,binney,bertolini,bertin,berti,bento,beno,belgarde,belding,beckel,becerril,bazaldua,bayes,bayard,barrus,barris,baros,bara,ballow,bakewell,baginski,badalamenti,backhaus,avilez,auvil,atteberry,ardon,anzaldua,anello,amsler,ambrosio,althouse,alles,alberti,alberson,aitchison,aguinaga,ziemann,zickefoose,zerr,zeck,zartman,zahm,zabriskie,yohn,yellowhair,yeaton,yarnall,yaple,wolski,wixon,willner,willms,whitsitt,wheelwright,weyandt,wess,wengerd,weatherholtz,wattenbarger,walrath,walpole,waldrip,voges,vinzant,viars,veres,veneziano,veillon,vawter,vaughns,vanwart,vanostrand,valiente,valderas,uhrig,tunison,tulloch,trostle,treaster,traywick,toye,tomson,tomasello,tomasek,tippit,tinajero,tift,tienda,thorington,thieme,thibeau,thakkar,tewell,telfer,sweetser,stratford,stracener,stoke,stiverson,stelling,spatz,spagnoli,sorge,slevin,slabaugh,simson,shupp,shoultz,shotts,shiroma,shetley,sherrow,sheffey,shawgo,shamburger,sester,segraves,seelig,scioneaux,schwartzkopf,schwabe,scholes,schluter,schlecht,schillaci,schildgen,schieber,schewe,schecter,scarpelli,scaglione,sautter,santelli,salmi,sabado,ryer,rydberg,ryba,rushford,runk,ruddick,rotondo,rote,rosenfield,roesner,rocchio,ritzer,rippel,rimes,riffel,richison,ribble,reynold,resh,rehn,ratti,rasor,rasnake,rappold,rando,radosevich,pulice,prichett,pribble,poynor,plowden,pitzen,pittsley,pitter,philyaw,philipps,pestana,perro,perone,pera,peil,pedone,pawlowicz,pattee,parten,parlin,pariseau,paredez,paek,pacifico,otts,ostrow,osornio,oslund,orso,ooten,onken,oniel,onan,ollison,ohlsen,ohlinger,odowd,niemiec,neubert,nembhard,neaves,neathery,nakasone,myerson,muto,muntz,munez,mumme,mumm,mujica,muise,muench,morriss,molock,mishoe,minier,metzgar,mero,meiser,meese,mcsween,mcquire,mcquinn,mcpheeters,mckeller,mcilrath,mcgown,mcdavis,mccuen,mcclenton,maxham,matsui,marriner,marlette,mansur,mancino,maland,majka,maisch,maheux,madry,madriz,mackley,macke,lydick,lutterman,luppino,lundahl,lovingood,loudon,longmore,liefer,leveque,lescarbeau,lemmer,ledgerwood,lawver,lawrie,lattea,lasko,lahman,kulpa,kukowski,kukla,kubota,kubala,krizan,kriz,krikorian,kravetz,kramp,kowaleski,knobloch,klosterman,kloster,klepper,kirven,kinnaman,kinnaird,killam,kiesling,kesner,keebler,keagle,karls,kapinos,kantner,kaba,junious,jefferys,jacquet,izzi,ishii,irion,ifill,hotard,horman,hoppes,hopkin,hokanson,hoda,hocutt,hoaglin,hites,hirai,hindle,hinch,hilty,hild,hier,hickle,hibler,henrichs,hempstead,helmers,hellard,heims,heidler,hawbaker,harkleroad,harari,hanney,hannaford,hamid,haltom,hallford,guilliams,guerette,gryder,groseclose,groen,grimley,greenidge,graffam,goucher,goodenough,goldsborough,gloster,glanton,gladson,gladding,ghee,gethers,gerstein,geesey,geddie,gayer,gaver,gauntt,gartland,garriga,garoutte,fronk,fritze,frenzel,forgione,fluitt,flinchbaugh,flach,fiorito,finan,finamore,fimbres,fillman,figeroa,ficklin,feher,feddersen,fambro,fairbairn,eves,escalona,elsey,eisenstein,ehrenberg,eargle,drane,dogan,dively,dewolfe,dettman,desiderio,desch,dennen,denk,demaris,delsignore,dejarnette,deere,dedman,daws,dauphinais,danz,dantin,dannenberg,dalby,currence,culwell,cuesta,croston,crossno,cromley,crisci,craw,coryell,condra,colpitts,colas,clink,clevinger,clermont,cistrunk,cirilo,chirico,chiarello,cephus,cecena,cavaliere,caughey,casimir,carwell,carlon,carbonaro,caraveo,cantley,callejas,cagney,cadieux,cabaniss,bushard,burlew,buras,budzinski,bucklew,bruneau,brummer,brueggemann,brotzman,bross,brittian,brimage,briles,brickman,breneman,breitenstein,brandel,brackins,boydstun,botta,bosket,boros,borgmann,bordeau,bonifacio,bolten,boehman,blundell,bloodsaw,bjerke,biffle,bickett,bickers,beville,bergren,bergey,benzing,belfiore,beirne,beckert,bebout,baumert,battey,barrs,barriere,barcelo,barbe,balliet,baham,babst,auton,asper,asbell,arzate,argento,arel,araki,arai,antley,amodeo,ammann,allensworth,aldape,akey,abeita,zweifel,zeiler,zamor,zalenski,yzaguirre,yousef,yetman,wyer,woolwine,wohlgemuth,wohlers,wittenberg,wingrove,wimsatt,willimas,wilkenson,wildey,wilderman,wilczynski,wigton,whorley,wellons,welle,weirich,weideman,weide,weast,wasmund,warshaw,walson,waldner,walch,walberg,wagener,wageman,vrieze,vossen,vorce,voorhis,vonderheide,viruet,vicari,verne,velasques,vautour,vartanian,varona,vankeuren,vandine,vandermeer,ursery,underdown,uhrich,uhlman,tworek,twine,twellman,tweedie,tutino,turmelle,tubb,trivedi,triano,trevathan,treese,treanor,treacy,traina,topham,toenjes,tippetts,tieu,thomure,thatch,tetzlaff,tetterton,teamer,tappan,talcott,tagg,szczepanski,syring,surace,sulzer,sugrue,sugarman,suess,styons,stwart,stupka,strey,straube,strate,stoddart,stockbridge,stjames,steimle,steenberg,stamand,staller,stahly,stager,spurgin,sprow,sponsler,speas,spainhour,sones,smits,smelcer,slovak,slaten,singleterry,simien,sidebottom,sibrian,shellhammer,shelburne,shambo,sepeda,seigel,scogin,scianna,schmoll,schmelzer,scheu,schachter,savant,sauseda,satcher,sandor,sampsell,rugh,rufener,rotenberry,rossow,rossbach,rollman,rodrique,rodreguez,rodkey,roda,rini,riggan,rients,riedl,rhines,ress,reinbold,raschke,rardin,racicot,quillin,pushard,primrose,pries,pressey,precourt,pratts,postel,poppell,plumer,pingree,pieroni,pflug,petre,petrarca,peterka,perkin,pergande,peranio,penna,paulhus,pasquariello,parras,parmentier,pamplin,oviatt,osterhoudt,ostendorf,osmun,ortman,orloff,orban,onofrio,olveda,oltman,okeeffe,ocana,nunemaker,novy,noffsinger,nish,niday,nethery,nemitz,neidert,nadal,nack,muszynski,munsterman,mulherin,mortimore,morter,montesino,montalvan,montalbano,momon,moman,mogan,minns,millward,milling,michelsen,mewborn,metayer,mensch,meloy,meggs,meaders,mcsorley,mcmenamin,mclead,mclauchlin,mcguffey,mcguckin,mcglaughlin,mcferron,mcentyre,mccrum,mccawley,mcbain,mayhue,matzen,matton,marsee,marrin,marland,markum,mantilla,manfre,makuch,madlock,macauley,luzier,luthy,lufkin,lucena,loudin,lothrop,lorch,loll,loadholt,lippold,lichtman,liberto,liakos,lewicki,levett,lentine,leja,legree,lawhead,lauro,lauder,lanman,lank,laning,lalor,krob,kriger,kriegel,krejci,kreisel,kozel,konkel,kolstad,koenen,kocsis,knoblock,knebel,klopfer,klee,kilday,kesten,kerbs,kempker,keathley,kazee,kaur,kamer,kamaka,kallenbach,jehle,jaycox,jardin,jahns,ivester,hyppolite,hyche,huppert,hulin,hubley,horsey,hornak,holzwarth,holmon,hollabaugh,holaway,hodes,hoak,hinesley,hillwig,hillebrand,highfield,heslop,herrada,hendryx,hellums,heit,heishman,heindel,hayslip,hayford,hastie,hartgrove,hanus,hakim,hains,hadnott,gundersen,gulino,guidroz,guebert,gressett,graydon,gramling,grahn,goupil,gorelick,goodreau,goodnough,golay,goers,glatz,gillikin,gieseke,giammarino,getman,gensler,gazda,garibaldi,gahan,funderburke,fukuda,fugitt,fuerst,fortman,forsgren,formica,flink,fitton,feltz,fekete,feit,fehrenbach,farone,farinas,faries,fagen,ewin,esquilin,esch,enderle,ellery,ellers,ekberg,egli,effinger,dymond,dulle,dula,duhe,dudney,dowless,dower,dorminey,dopp,dooling,domer,disher,dillenbeck,difilippo,dibernardo,deyoe,devillier,denley,deland,defibaugh,deeb,debow,dauer,datta,darcangelo,daoust,damelio,dahm,dahlman,curlin,cupit,culton,cuenca,cropp,croke,cremer,crace,cosio,corzine,coombe,coman,colone,coloma,collingwood,coderre,cocke,cobler,claybrook,cincotta,cimmino,christoff,chisum,chillemi,chevere,chachere,cervone,cermak,cefalu,cauble,cather,caso,carns,carcamo,carbo,capoccia,capello,capell,canino,cambareri,calvi,cabiness,bushell,burtt,burstein,burkle,bunner,bundren,buechler,bryand,bruso,brownstein,brouse,brodt,brisbin,brightman,brenes,breitenbach,brazzell,brazee,bramwell,bramhall,bradstreet,boyton,bowland,boulter,bossert,bonura,bonebrake,bonacci,boeck,blystone,birchard,bilal,biddy,bibee,bevans,bethke,bertelsen,berney,bergfeld,benware,bellon,bellah,batterton,barberio,bamber,bagdon,badeaux,averitt,augsburger,ates,arvie,aronowitz,arens,araya,angelos,andrada,amell,amante,almy,almquist,alls,aispuro,aguillon,agudelo,aceto,abalos,zdenek,zaremba,zaccaria,youssef,wrona,wrede,wotton,woolston,wolpert,wollman,wince,wimberley,willmore,willetts,wikoff,wieder,wickert,whitenack,wernick,welte,welden,weisenberger,weich,wallington,walder,vossler,vore,vigo,vierling,victorine,verdun,vencill,vazguez,vassel,vanzile,vanvliet,vantrease,vannostrand,vanderveer,vanderveen,vancil,uyeda,umphrey,uhler,uber,tutson,turrentine,tullier,tugwell,trundy,tripodi,tomer,tomasi,tomaselli,tokarski,tisher,tibbets,thweatt,tharrington,tesar,telesco,teasdale,tatem,taniguchi,suriel,sudler,stutsman,sturman,strite,strelow,streight,strawder,stransky,strahl,stours,stong,stinebaugh,stillson,steyer,stelle,steffensmeier,statham,squillante,spiess,spargo,southward,soller,soden,snuggs,snellgrove,smyers,smiddy,slonaker,skyles,skowron,sivils,siqueiros,siers,siddall,shontz,shingler,shiley,shibley,sherard,shelnutt,shedrick,shasteen,sereno,selke,scovil,scola,schuett,schuessler,schreckengost,schranz,schoepp,schneiderman,schlanger,schiele,scheuermann,schertz,scheidler,scheff,schaner,schamber,scardina,savedra,saulnier,sater,sarro,sambrano,salomone,sabourin,ruud,rutten,ruffino,ruddock,rowser,roussell,rosengarten,rominger,rollinson,rohman,roeser,rodenberg,roberds,ridgell,rhodus,reynaga,rexrode,revelle,rempel,remigio,reising,reiling,reetz,rayos,ravenscroft,ravenell,raulerson,rasmusson,rask,rase,ragon,quesnel,quashie,puzo,puterbaugh,ptak,prost,prisbrey,principe,pricer,pratte,pouncey,portman,pontious,pomerantz,planck,pilkenton,pilarski,phegley,pertuit,penta,pelc,peffer,pech,peagler,pavelka,pavao,patman,paskett,parrilla,pardini,papazian,panter,palin,paley,paetzold,packett,pacheo,ostrem,orsborn,olmedo,okamura,oiler,oglesbee,oatis,nuckles,notter,nordyke,nogueira,niswander,nibert,nesby,neloms,nading,naab,munns,mullarkey,moudy,moret,monnin,molder,modisette,moczygemba,moctezuma,mischke,miro,mings,milot,milledge,milhorn,milera,mieles,mickley,micek,metellus,mersch,merola,mercure,mencer,mellin,mell,meinke,mcquillan,mcmurtrie,mckillop,mckiernan,mckendrick,mckamie,mcilvaine,mcguffie,mcgonigle,mcgarrah,mcfetridge,mcenaney,mcdow,mccutchan,mccallie,mcadam,maycock,maybee,mattei,massi,masser,masiello,marshell,marmo,marksberry,markell,marchal,manross,manganaro,mally,mallow,mailhot,magyar,madero,madding,maddalena,macfarland,lynes,lugar,luckie,lucca,lovitt,loveridge,loux,loth,loso,lorenzana,lorance,lockley,lockamy,littler,litman,litke,liebel,lichtenberger,licea,leverich,letarte,lesesne,leno,legleiter,leffew,laurin,launius,laswell,lassen,lasala,laraway,laramore,landrith,lancon,lanahan,laiche,laford,lachermeier,kunst,kugel,kuck,kuchta,kube,korus,koppes,kolbe,koerber,kochan,knittel,kluck,kleve,kleine,kitch,kirton,kirker,kintz,kinghorn,kindell,kimrey,kilduff,kilcrease,kicklighter,kibble,kervin,keplinger,keogh,kellog,keeth,kealey,kazmierczak,karner,kamel,kalina,kaczynski,juel,jerman,jeppson,jawad,jasik,jaqua,janusz,janco,inskeep,inks,ingold,hyndman,hymer,hunte,hunkins,humber,huffstutler,huffines,hudon,hudec,hovland,houze,hout,hougland,hopf,holsapple,holness,hollenbach,hoffmeister,hitchings,hirata,hieber,hickel,hewey,herriman,hermansen,herandez,henze,heffelfinger,hedgecock,hazlitt,hazelrigg,haycock,harren,harnage,harling,harcrow,hannold,hanline,hanel,hanberry,hammersley,hamernik,hajduk,haithcock,haff,hadaway,haan,gullatt,guilbault,guidotti,gruner,grisson,grieves,granato,grabert,gover,gorka,glueck,girardin,giesler,gersten,gering,geers,gaut,gaulin,gaskamp,garbett,gallivan,galland,gaeth,fullenkamp,fullam,friedrichs,freire,freeney,fredenburg,frappier,fowkes,foree,fleurant,fleig,fleagle,fitzsimons,fischetti,fiorenza,finneran,filippi,figueras,fesler,fertig,fennel,feltmann,felps,felmlee,fannon,familia,fairall,fadden,esslinger,enfinger,elsasser,elmendorf,ellisor,einhorn,ehrman,egner,edmisten,edlund,ebinger,dyment,dykeman,durling,dunstan,dunsmore,dugal,duer,drescher,doyel,dossey,donelan,dockstader,dobyns,divis,dilks,didier,desrosier,desanto,deppe,delosh,delange,defrank,debo,dauber,dartez,daquila,dankert,dahn,cygan,cusic,curfman,croghan,croff,criger,creviston,crays,cravey,crandle,crail,crago,craghead,cousineau,couchman,cothron,corella,conine,coller,colberg,cogley,coatney,coale,clendenin,claywell,clagon,cifaldi,choiniere,chickering,chica,chennault,chavarin,chattin,chaloux,challis,cesario,cazarez,caughman,catledge,casebolt,carrel,carra,carlow,capote,canez,camillo,caliendo,calbert,bylsma,buskey,buschman,burkhard,burghardt,burgard,buonocore,bunkley,bungard,bundrick,bumbrey,buice,buffkin,brundige,brockwell,brion,briant,bredeson,bransford,brannock,brakefield,brackens,brabant,bowdoin,bouyer,bothe,boor,bonavita,bollig,blurton,blunk,blanke,blanck,birden,bierbaum,bevington,beutler,betters,bettcher,bera,benway,bengston,benesh,behar,bedsole,becenti,beachy,battersby,basta,bartmess,bartle,bartkowiak,barsky,barrio,barletta,barfoot,banegas,baldonado,azcona,avants,austell,aungst,aune,aumann,audia,atterbury,asselin,asmussen,ashline,asbill,arvizo,arnot,ariola,ardrey,angstadt,anastasio,amsden,amerman,alred,allington,alewine,alcina,alberico,ahlgren,aguas,agrawal,agosta,adolphsen,acey,aburto,abler,zwiebel,zepp,zentz,ybarbo,yarberry,yamauchi,yamashiro,wurtz,wronski,worster,wootten,wongus,woltz,wolanski,witzke,withey,wisecarver,wingham,wineinger,winegarden,windholz,wilgus,wiesen,wieck,widrick,wickliffe,whittenberg,westby,werley,wengert,wendorf,weimar,weick,weckerly,watrous,wasden,walford,wainright,wahlstrom,wadlow,vrba,voisin,vives,vivas,vitello,villescas,villavicencio,villanova,vialpando,vetrano,vensel,vassell,varano,vanriper,vankleeck,vanduyne,vanderpol,vanantwerp,valenzula,udell,turnquist,tuff,trickett,tramble,tingey,timbers,tietz,thiem,tercero,tenner,tenaglia,teaster,tarlton,taitt,tabon,sward,swaby,suydam,surita,suman,suddeth,stumbo,studivant,strobl,streich,stoodley,stoecker,stillwagon,stickle,stellmacher,stefanik,steedley,starbird,stainback,stacker,speir,spath,sommerfeld,soltani,solie,sojka,sobota,sobieski,sobczak,smullen,sleeth,slaymaker,skolnick,skoglund,sires,singler,silliman,shrock,shott,shirah,shimek,shepperd,sheffler,sheeler,sharrock,sharman,shalash,seyfried,seybold,selander,seip,seifried,sedor,sedlock,sebesta,seago,scutt,scrivens,sciacca,schultze,schoemaker,schleifer,schlagel,schlachter,schempp,scheider,scarboro,santi,sandhu,salim,saia,rylander,ryburn,rutigliano,ruocco,ruland,rudloff,rott,rosenburg,rosenbeck,romberger,romanelli,rohloff,rohlfing,rodda,rodd,ritacco,rielly,rieck,rickles,rickenbacker,respass,reisner,reineck,reighard,rehbein,rega,reddix,rawles,raver,rattler,ratledge,rathman,ramsburg,raisor,radovich,radigan,quail,puskar,purtee,priestly,prestidge,presti,pressly,pozo,pottinger,portier,porta,porcelli,poplawski,polin,poeppelman,pocock,plump,plantz,placek,piro,pinnell,pinkowski,pietz,picone,philbeck,pflum,peveto,perret,pentz,payer,patlan,paterno,papageorge,overmyer,overland,osier,orwig,orum,orosz,oquin,opie,ochsner,oathout,nygard,norville,northway,niver,nicolson,newhart,neitzel,nath,nanez,murnane,mortellaro,morreale,morino,moriarity,morgado,moorehouse,mongiello,molton,mirza,minnix,millspaugh,milby,miland,miguez,mickles,michaux,mento,melugin,melito,meinecke,mehr,meares,mcneece,mckane,mcglasson,mcgirt,mcgilvery,mcculler,mccowen,mccook,mcclintic,mccallon,mazzotta,maza,mayse,mayeda,matousek,matley,martyn,marney,marnell,marling,manuelito,maltos,malson,mahi,maffucci,macken,maass,lyttle,lynd,lyden,lukasiewicz,luebbers,lovering,loveall,longtin,lobue,loberg,lipka,lightbody,lichty,levert,lettieri,letsinger,lepak,lemmond,lembke,leitz,lasso,lasiter,lango,landsman,lamirande,lamey,laber,kuta,kulesza,krenz,kreiner,krein,kreiger,kraushaar,kottke,koser,kornreich,kopczynski,konecny,koff,koehl,kocian,knaub,kmetz,kluender,klenke,kleeman,kitzmiller,kirsh,kilman,kildow,kielbasa,ketelsen,kesinger,kehr,keef,kauzlarich,karter,kahre,jobin,jinkins,jines,jeffress,jaquith,jaillet,jablonowski,ishikawa,irey,ingerson,indelicato,huntzinger,huisman,huett,howson,houge,hosack,hora,hoobler,holtzen,holtsclaw,hollingworth,hollin,hoberg,hobaugh,hilker,hilgefort,higgenbotham,heyen,hetzler,hessel,hennessee,hendrie,hellmann,heft,heesch,haymond,haymon,haye,havlik,havis,haverland,haus,harstad,harriston,harju,hardegree,hammell,hamaker,halbrook,halberg,guptill,guntrum,gunderman,gunder,gularte,guarnieri,groll,grippo,greely,gramlich,goewey,goetzinger,goding,giraud,giefer,giberson,gennaro,gemmell,gearing,gayles,gaudin,gatz,gatts,gasca,garn,gandee,gammel,galindez,galati,gagliardo,fulop,fukushima,friedt,fretz,frenz,freeberg,fravel,fountaine,forry,forck,fonner,flippin,flewelling,flansburg,filippone,fettig,fenlon,felter,felkins,fein,favero,faulcon,farver,farless,fahnestock,facemire,faas,eyer,evett,esses,escareno,ensey,ennals,engelking,empey,ellithorpe,effler,edling,edgley,durrell,dunkerson,draheim,domina,dombrosky,doescher,dobbin,divens,dinatale,dieguez,diede,devivo,devilbiss,devaul,determan,desjardin,deshaies,delpozo,delorey,delman,delapp,delamater,deibert,degroff,debelak,dapolito,dano,dacruz,dacanay,cushenberry,cruze,crosbie,cregan,cousino,corrao,corney,cookingham,conry,collingsworth,coldren,cobian,coate,clauss,christenberry,chmiel,chauez,charters,chait,cesare,cella,caya,castenada,cashen,cantrelle,canova,campione,calixte,caicedo,byerley,buttery,burda,burchill,bulmer,bulman,buesing,buczek,buckholz,buchner,buchler,buban,bryne,brunkhorst,brumsey,brumer,brownson,brodnax,brezinski,brazile,braverman,branning,boye,boulden,bough,bossard,bosak,borth,borgmeyer,borge,blowers,blaschke,blann,blankenbaker,bisceglia,billingslea,bialek,beverlin,besecker,berquist,benigno,benavente,belizaire,beisner,behrman,beausoleil,baylon,bayley,bassi,basnett,basilio,basden,basco,banerjee,balli,bagnell,bady,averette,arzu,archambeault,arboleda,arbaugh,arata,antrim,amrhein,amerine,alpers,alfrey,alcon,albus,albertini,aguiniga,aday,acquaviva,accardi,zygmont,zych,zollner,zobel,zinck,zertuche,zaragosa,zale,zaldivar,yeadon,wykoff,woullard,wolfrum,wohlford,wison,wiseley,wisecup,winchenbach,wiltsie,whittlesey,whitelow,whiteford,wever,westrich,wertman,wensel,wenrich,weisbrod,weglarz,wedderburn,weatherhead,wease,warring,wadleigh,voltz,vise,villano,vicario,vermeulen,vazques,vasko,varughese,vangieson,vanfossen,vanepps,vanderploeg,vancleve,valerius,uyehara,unsworth,twersky,turrell,tuner,tsui,trunzo,trousdale,trentham,traughber,torgrimson,toppin,tokar,tobia,tippens,tigue,thiry,thackston,terhaar,tenny,tassin,tadeo,sweigart,sutherlin,sumrell,suen,stuhr,strzelecki,strosnider,streiff,stottlemyer,storment,storlie,stonesifer,stogsdill,stenzel,stemen,stellhorn,steidl,stecklein,statton,stangle,spratling,spoor,spight,spelman,spece,spanos,spadoni,southers,sola,sobol,smyre,slaybaugh,sizelove,sirmons,simington,silversmith,siguenza,sieren,shelman,sharples,sharif,sessler,serrata,serino,serafini,semien,selvey,seedorf,seckman,seawood,scoby,scicchitano,schorn,schommer,schnitzer,schleusner,schlabach,schiel,schepers,schaber,scally,sautner,sartwell,santerre,sandage,salvia,salvetti,salsman,sallis,salais,saeger,sabat,saar,ruther,russom,ruoff,rumery,rubottom,rozelle,rowton,routon,rotolo,rostad,roseborough,rorick,ronco,roher,roberie,robare,ritts,rison,rippe,rinke,ringwood,righter,rieser,rideaux,rickerson,renfrew,releford,reinsch,reiman,reifsteck,reidhead,redfearn,reddout,reaux,rado,radebaugh,quinby,quigg,provo,provenza,provence,pridgeon,praylow,powel,poulter,portner,pontbriand,poirrier,poirer,platero,pixler,pintor,pigman,piersall,piel,pichette,phou,pharis,phalen,petsche,perrier,penfield,pelosi,pebley,peat,pawloski,pawlik,pavlick,pavel,patz,patout,pascucci,pasch,parrinello,parekh,pantaleo,pannone,pankow,pangborn,pagani,pacelli,orsi,oriley,orduno,oommen,olivero,okada,ocon,ocheltree,oberman,nyland,noss,norling,nolton,nobile,nitti,nishimoto,nghiem,neuner,neuberger,neifert,negus,nagler,mullally,moulden,morra,morquecho,moots,mizzell,mirsky,mirabito,minardi,milholland,mikus,mijangos,michener,michalek,methvin,merrit,menter,meneely,meiers,mehring,mees,mcwhirt,mcwain,mcphatter,mcnichol,mcnaught,mclarty,mcivor,mcginness,mcgaughy,mcferrin,mcfate,mcclenny,mcclard,mccaskey,mccallion,mcamis,mathisen,marton,marsico,marchi,mani,mangione,macaraeg,lupi,lunday,lukowski,lucious,locicero,loach,littlewood,litt,lipham,linley,lindon,lightford,lieser,leyendecker,lewey,lesane,lenzi,lenart,leisinger,lehrman,lefebure,lazard,laycock,laver,launer,lastrapes,lastinger,lasker,larkey,lanser,lanphere,landey,lampton,lamark,kumm,kullman,krzeminski,krasner,koran,koning,kohls,kohen,kobel,kniffen,knick,kneip,knappenberger,klumpp,klausner,kitamura,kisling,kirshner,kinloch,kingman,kimery,kestler,kellen,keleher,keehn,kearley,kasprzak,kampf,kamerer,kalis,kahan,kaestner,kadel,kabel,junge,juckett,joynt,jorstad,jetter,jelley,jefferis,jeansonne,janecek,jaffee,izzard,istre,isherwood,ipock,iannuzzi,hypolite,humfeld,hotz,hosein,honahni,holzworth,holdridge,holdaway,holaday,hodak,hitchman,hippler,hinchey,hillin,hiler,hibdon,hevey,heth,hepfer,henneman,hemsley,hemmings,hemminger,helbert,helberg,heinze,heeren,heber,haver,hauff,haswell,harvison,hartson,harshberger,harryman,harries,hane,hamsher,haggett,hagemeier,haecker,haddon,haberkorn,guttman,guttierrez,guthmiller,guillet,guilbert,gugino,grumbles,griffy,gregerson,grana,goya,goranson,gonsoulin,goettl,goertz,godlewski,glandon,gilsdorf,gillogly,gilkison,giard,giampaolo,gheen,gettings,gesell,gershon,gaumer,gartrell,garside,garrigan,garmany,garlitz,garlington,gamet,furlough,funston,funaro,frix,frasca,francoeur,forshey,foose,flatley,flagler,fils,fillers,fickett,feth,fennelly,fencl,felch,fedrick,febres,fazekas,farnan,fairless,ewan,etsitty,enterline,elsworth,elliff,eleby,eldreth,eidem,edgecomb,edds,ebarb,dworkin,dusenberry,durrance,duropan,durfey,dungy,dundon,dumbleton,dubon,dubberly,droz,drinkwater,dressel,doughtie,doshier,dorrell,dople,doonan,donadio,dollison,doig,ditzler,dishner,discher,dimaio,digman,difalco,devino,devens,derosia,deppen,depaola,deniz,denardo,demos,demay,delgiudice,davi,danielsen,dally,dais,dahmer,cutsforth,cusimano,curington,cumbee,cryan,crusoe,crowden,crete,cressman,crapo,cowens,coupe,councill,coty,cotnoir,correira,copen,consiglio,combes,coffer,cockrill,coad,clogston,clasen,chesnutt,charrier,chadburn,cerniglia,cebula,castruita,castilla,castaldi,casebeer,casagrande,carta,carrales,carnley,cardon,capshaw,capron,cappiello,capito,canney,candela,caminiti,califano,calabria,caiazzo,cahall,buscemi,burtner,burgdorf,burdo,buffaloe,buchwald,brwon,brunke,brummond,brumm,broe,brocious,brocato,briski,brisker,brightwell,bresett,breiner,brazeau,braz,brayman,brandis,bramer,bradeen,boyko,bossi,boshart,bortle,boniello,bomgardner,bolz,bolenbaugh,bohling,bohland,bochenek,blust,bloxham,blowe,blish,blackwater,bjelland,biros,biederman,bickle,bialaszewski,bevil,beumer,bettinger,besse,bernett,bermejo,bement,belfield,beckler,baxendale,batdorf,bastin,bashore,bascombe,bartlebaugh,barsh,ballantine,bahl,badon,autin,astin,askey,ascher,arrigo,arbeiter,antes,angers,amburn,amarante,alvidrez,althaus,allmond,alfieri,aldinger,akerley,akana,aikins,ader,acebedo,accardo,abila,aberle,abele,abboud,zollars,zimmerer,zieman,zerby,zelman,zellars,yoshimura,yonts,yeats,yant,yamanaka,wyland,wuensche,worman,wordlaw,wohl,winslett,winberg,wilmeth,willcutt,wiers,wiemer,wickwire,wichman,whitting,whidbee,westergard,wemmer,wellner,weishaupt,weinert,weedon,waynick,wasielewski,waren,walworth,wallingford,walke,waechter,viviani,vitti,villagrana,vien,vicks,venema,varnes,varnadoe,varden,vanpatten,vanorden,vanderzee,vandenburg,vandehey,valls,vallarta,valderrama,valade,urman,ulery,tusa,tuft,tripoli,trimpe,trickey,tortora,torrens,torchia,toft,tjaden,tison,tindel,thurmon,thode,tardugno,tancredi,taketa,taillon,tagle,sytsma,symes,swindall,swicegood,swartout,sundstrom,sumners,sulton,studstill,stroop,stonerock,stmarie,stlawrence,stemm,steinhauser,steinert,steffensen,stefaniak,starck,stalzer,spidle,spake,sowinski,sosnowski,sorber,somma,soliday,soldner,soja,soderstrom,soder,sockwell,sobus,sloop,sinkfield,simerly,silguero,sigg,siemers,siegmund,shum,sholtis,shkreli,sheikh,shattles,sharlow,shambaugh,shaikh,serrao,serafino,selley,selle,seel,sedberry,secord,schunk,schuch,schor,scholze,schnee,schmieder,schleich,schimpf,scherf,satterthwaite,sasson,sarkisian,sarinana,sanzone,salvas,salone,salido,saiki,sahr,rusher,rusek,ruppel,rubel,rothfuss,rothenberger,rossell,rosenquist,rosebrook,romito,romines,rolan,roker,roehrig,rockhold,rocca,robuck,riss,rinaldo,riggenbach,rezentes,reuther,renolds,rench,remus,remsen,reller,relf,reitzel,reiher,rehder,redeker,ramero,rahaim,radice,quijas,qualey,purgason,prum,proudfoot,prock,probert,printup,primer,primavera,prenatt,pratico,polich,podkowka,podesta,plattner,plasse,plamondon,pittmon,pippenger,pineo,pierpont,petzold,petz,pettiway,petters,petroski,petrik,pesola,pershall,perlmutter,penepent,peevy,pechacek,peaden,pazos,pavia,pascarelli,parm,parillo,parfait,paoletti,palomba,palencia,pagaduan,oxner,overfield,overcast,oullette,ostroff,osei,omarah,olenick,olah,odem,nygren,notaro,northcott,nodine,nilges,neyman,neve,neuendorf,neisler,neault,narciso,naff,muscarella,morrisette,morphew,morein,montville,montufar,montesinos,monterroso,mongold,mojarro,moitoso,mirarchi,mirando,minogue,milici,miga,midyett,michna,meuser,messana,menzie,menz,mendicino,melone,mellish,meller,melle,meints,mechem,mealer,mcwilliam,mcwhite,mcquiggan,mcphillips,mcpartland,mcnellis,mcmackin,mclaughin,mckinny,mckeithan,mcguirk,mcgillivray,mcgarr,mcgahee,mcfaul,mcfadin,mceuen,mccullah,mcconico,mcclaren,mccaul,mccalley,mccalister,mazer,mayson,mayhan,maugeri,mauger,mattix,mattews,maslowski,masek,martir,marsch,marquess,maron,markwell,markow,marinaro,marcinek,mannella,mallen,majeed,mahnke,mahabir,magby,magallan,madere,machnik,lybrand,luque,lundholm,lueders,lucian,lubinski,lowy,loew,lippard,linson,lindblad,lightcap,levitsky,levens,leonardi,lenton,lengyel,leitzel,leicht,leaver,laubscher,lashua,larusso,larrimore,lanterman,lanni,lanasa,lamoureaux,lambros,lamborn,lamberti,lall,lafuente,laferriere,laconte,kyger,kupiec,kunzman,kuehne,kuder,kubat,krogh,kreidler,krawiec,krauth,kratky,kottwitz,korb,kono,kolman,kolesar,koeppel,knapper,klingenberg,kjos,keppel,kennan,keltz,kealoha,kasel,karney,kanne,kamrowski,kagawa,johnosn,jilek,jarvie,jarret,jansky,jacquemin,jacox,jacome,iriarte,ingwersen,imboden,iglesia,huyser,hurston,hursh,huntoon,hudman,hoying,horsman,horrigan,hornbaker,horiuchi,hopewell,hommel,homeyer,holzinger,holmer,hipsher,hinchman,hilts,higginbottom,hieb,heyne,hessling,hesler,hertlein,herford,heras,henricksen,hennemann,henery,hendershott,hemstreet,heiney,heckert,heatley,hazell,hazan,hayashida,hausler,hartsoe,harth,harriott,harriger,harpin,hardisty,hardge,hannaman,hannahs,hamp,hammersmith,hamiton,halsell,halderman,hagge,habel,gusler,gushiken,gurr,gummer,gullick,grunden,grosch,greenburg,greb,greaver,gratz,grajales,gourlay,gotto,gorley,goodpasture,godard,glorioso,gloor,glascock,gizzi,giroir,gibeault,gauldin,gauer,gartin,garrels,gamber,gallogly,gade,fusaro,fripp,freyer,freiberg,franzoni,fragale,foston,forti,forness,folts,followell,foard,flom,flett,fleitas,flamm,fino,finnen,finchum,filippelli,fickel,feucht,feiler,feenstra,feagins,faver,faulkenberry,farabaugh,fandel,faler,faivre,fairey,facey,exner,evensen,erion,erben,epting,epping,ephraim,engberg,elsen,ellingwood,eisenmann,eichman,ehle,edsall,durall,dupler,dunker,dumlao,duford,duffie,dudding,dries,doung,dorantes,donahoo,domenick,dollins,dobles,dipiazza,dimeo,diehm,dicicco,devenport,desormeaux,derrow,depaolo,demas,delpriore,delosantos,degreenia,degenhardt,defrancesco,defenbaugh,deets,debonis,deary,dazey,dargie,dambrosia,dalal,dagen,cuen,crupi,crossan,crichlow,creque,coutts,counce,coram,constante,connon,collelo,coit,cocklin,coblentz,cobey,coard,clutts,clingan,clampitt,claeys,ciulla,cimini,ciampa,christon,choat,chiou,chenail,chavous,catto,catalfamo,casterline,cassinelli,caspers,carroway,carlen,carithers,cappel,calo,callow,cagley,cafferty,byun,byam,buttner,buth,burtenshaw,burget,burfield,buresh,bunt,bultman,bulow,buchta,buchmann,brunett,bruemmer,brueggeman,britto,briney,brimhall,bribiesca,bresler,brazan,brashier,brar,brandstetter,boze,boonstra,bluitt,blomgren,blattner,blasi,bladen,bitterman,bilby,bierce,biello,bettes,bertone,berrey,bernat,berberich,benshoof,bendickson,bellefeuille,bednarski,beddingfield,beckerman,beaston,bavaro,batalla,basye,baskins,bartolotta,bartkowski,barranco,barkett,banaszak,bame,bamberger,balsley,ballas,balicki,badura,aymond,aylor,aylesworth,axley,axelrod,aubert,armond,ariza,apicella,anstine,ankrom,angevine,andreotti,alto,alspaugh,alpaugh,almada,allinder,alequin,aguillard,agron,agena,afanador,ackerley,abrev,abdalla,aaronson,zynda,zucco,zipp,zetina,zenz,zelinski,youngren,yochum,yearsley,yankey,woodfork,wohlwend,woelfel,wiste,wismer,winzer,winker,wilkison,wigger,wierenga,whipps,westray,wesch,weld,weible,wedell,weddell,wawrzyniak,wasko,washinton,wantz,walts,wallander,wain,wahlen,wachowiak,voshell,viteri,vire,villafuerte,vieyra,viau,vescio,verrier,verhey,vause,vandermolen,vanderhorst,valois,valla,valcourt,vacek,uzzle,umland,ulman,ulland,turvey,tuley,trembath,trabert,towsend,totman,toews,tisch,tisby,tierce,thivierge,tenenbaum,teagle,tacy,tabler,szewczyk,swearngin,suire,sturrock,stubbe,stronach,stoute,stoudemire,stoneberg,sterba,stejskal,steier,stehr,steckel,stearman,steakley,stanforth,stancill,srour,sprowl,spevak,sokoloff,soderman,snover,sleeman,slaubaugh,sitzman,simes,siegal,sidoti,sidler,sider,sidener,siddiqi,shireman,shima,sheroan,shadduck,seyal,sentell,sennett,senko,seligman,seipel,seekins,seabaugh,scouten,schweinsberg,schwartzberg,schurr,schult,schrick,schoening,schmitmeyer,schlicher,schlager,schack,schaar,scavuzzo,scarpa,sassano,santigo,sandavol,sampsel,samms,samet,salzano,salyards,salva,saidi,sabir,saam,runions,rundquist,rousselle,rotunno,rosch,romney,rohner,roff,rockhill,rocamora,ringle,riggie,ricklefs,rexroat,reves,reuss,repka,rentfro,reineke,recore,recalde,rease,rawling,ravencraft,ravelo,rappa,randol,ramsier,ramerez,rahimi,rahim,radney,racey,raborn,rabalais,quebedeaux,pujol,puchalski,prothro,proffit,prigge,prideaux,prevo,portales,porco,popovic,popek,popejoy,pompei,plude,platner,pizzuto,pizer,pistone,piller,pierri,piehl,pickert,piasecki,phong,philipp,peugh,pesqueira,perrett,perfetti,percell,penhollow,pelto,pellett,pavlak,paulo,pastorius,parsell,parrales,pareja,parcell,pappan,pajak,owusu,ovitt,orrick,oniell,olliff,olberding,oesterling,odwyer,ocegueda,obermiller,nylander,nulph,nottage,northam,norgard,nodal,niel,nicols,newhard,nellum,neira,nazzaro,nassif,narducci,nalbandian,musil,murga,muraoka,mumper,mulroy,mountjoy,mossey,moreton,morea,montoro,montesdeoca,montealegre,montanye,montandon,moisan,mohl,modeste,mitra,minson,minjarez,milbourne,michaelsen,metheney,mestre,mescher,mervis,mennenga,melgarejo,meisinger,meininger,mcwaters,mckern,mckendree,mchargue,mcglothlen,mcgibbon,mcgavock,mcduffee,mcclurkin,mccausland,mccardell,mccambridge,mazzoni,mayen,maxton,mawson,mauffray,mattinson,mattila,matsunaga,mascia,marse,marotz,marois,markin,markee,marcinko,marcin,manville,mantyla,manser,manry,manderscheid,mallari,malecha,malcomb,majerus,macinnis,mabey,lyford,luth,lupercio,luhman,luedke,lovick,lossing,lookabaugh,longway,loisel,logiudice,loffredo,lobaugh,lizaola,livers,littlepage,linnen,limmer,liebsch,liebman,leyden,levitan,levison,levier,leven,levalley,lettinga,lessley,lessig,lepine,leight,leick,leggio,leffingwell,leffert,lefevers,ledlow,leaton,leander,leaming,lazos,laviolette,lauffer,latz,lasorsa,lasch,larin,laporta,lanter,langstaff,landi,lamica,lambson,lambe,lamarca,laman,lamagna,lajeunesse,lafontant,lafler,labrum,laakso,kush,kuether,kuchar,kruk,kroner,kroh,kridler,kreuzer,kovats,koprowski,kohout,knicely,knell,klutts,kindrick,kiddy,khanna,ketcher,kerschner,kerfien,kensey,kenley,kenan,kemplin,kellerhouse,keesling,keas,kaplin,kanady,kampen,jutras,jungers,jeschke,janowski,janas,iskra,imperato,ikerd,igoe,hyneman,hynek,husain,hurrell,hultquist,hullett,hulen,huberty,hoyte,hossain,hornstein,hori,hopton,holms,hollmann,holdman,holdeman,holben,hoffert,himel,hillsman,herdt,hellyer,heister,heimer,heidecker,hedgpeth,hedgepath,hebel,heatwole,hayer,hausner,haskew,haselden,hartranft,harsch,harres,harps,hardimon,halm,hallee,hallahan,hackley,hackenberg,hachey,haapala,guynes,gunnerson,gunby,gulotta,gudger,groman,grignon,griebel,gregori,greenan,grauer,gourd,gorin,gorgone,gooslin,goold,goltz,goldberger,glotfelty,glassford,gladwin,giuffre,gilpatrick,gerdts,geisel,gayler,gaunce,gaulding,gateley,gassman,garson,garron,garand,gangestad,gallow,galbo,gabrielli,fullington,fucci,frum,frieden,friberg,frasco,francese,fowle,foucher,fothergill,foraker,fonder,foisy,fogal,flurry,flenniken,fitzhenry,fishbein,finton,filmore,filice,feola,felberbaum,fausnaught,fasciano,farquharson,faires,estridge,essman,enriques,emmick,ekker,ekdahl,eisman,eggleton,eddinger,eakle,eagar,durio,dunwoody,duhaime,duenes,duden,dudas,dresher,dresel,doutt,donlan,donathan,domke,dobrowolski,dingee,dimmitt,dimery,dilullo,deveaux,devalle,desper,desnoyers,desautels,derouin,derbyshire,denmon,demski,delucca,delpino,delmont,deller,dejulio,deibler,dehne,deharo,degner,defore,deerman,decuir,deckman,deasy,dease,deaner,dawdy,daughdrill,darrigo,darity,dalbey,dagenhart,daffron,curro,curnutte,curatolo,cruikshank,crosswell,croslin,croney,crofton,criado,crecelius,coscia,conniff,commodore,coltharp,colonna,collyer,collington,cobbley,coache,clonts,cloe,cliett,clemans,chrisp,chiarini,cheatam,cheadle,chand,chadd,cervera,cerulli,cerezo,cedano,cayetano,cawthorne,cavalieri,cattaneo,cartlidge,carrithers,carreira,carranco,cargle,candanoza,camburn,calender,calderin,calcagno,cahn,cadden,byham,buttry,burry,burruel,burkitt,burgio,burgener,buescher,buckalew,brymer,brumett,brugnoli,brugman,brosnahan,bronder,broeckel,broderson,brisbon,brinsfield,brinks,bresee,bregman,branner,brambila,brailsford,bouska,boster,borucki,bortner,boroughs,borgeson,bonier,bomba,bolender,boesch,boeke,bloyd,bley,binger,bilbro,biery,bichrest,bezio,bevel,berrett,bermeo,bergdoll,bercier,benzel,bentler,belnap,bellini,beitz,behrend,bednarczyk,bearse,bartolini,bartol,barretta,barbero,barbaro,banvelos,bankes,ballengee,baldon,ausmus,atilano,atienza,aschenbrenner,arora,armstong,aquilino,appleberry,applebee,apolinar,antos,andrepont,ancona,amesquita,alvino,altschuler,allin,alire,ainslie,agular,aeschliman,accetta,abdulla,abbe,zwart,zufelt,zirbel,zingaro,zilnicki,zenteno,zent,zemke,zayac,zarrella,yoshimoto,yearout,womer,woltman,wolin,wolery,woldt,witts,wittner,witherow,winward,winrow,wiemann,wichmann,whitwell,whitelaw,wheeless,whalley,wessner,wenzl,wene,weatherbee,waye,wattles,wanke,walkes,waldeck,vonruden,voisine,vogus,vittetoe,villalva,villacis,venturini,venturi,venson,vanloan,vanhooser,vanduzer,vandever,vanderwal,vanderheyden,vanbeek,vanbebber,vallance,vales,vahle,urbain,upshur,umfleet,tsuji,trybus,triolo,trimarchi,trezza,trenholm,tovey,tourigny,torry,torrain,torgeson,tomey,tischler,tinkler,tinder,ticknor,tibbles,tibbals,throneberry,thormahlen,thibert,thibeaux,theurer,templet,tegeler,tavernier,taubman,tamashiro,tallon,tallarico,taboada,sypher,sybert,swyers,switalski,swedberg,suther,surprenant,sullen,sulik,sugden,suder,suchan,strube,stroope,strittmatter,streett,straughn,strasburg,stjacques,stimage,stimac,stifter,stgelais,steinhart,stehlik,steffenson,steenbergen,stanbery,stallone,spraggs,spoto,spilman,speno,spanbauer,spalla,spagnolo,soliman,solan,sobolik,snelgrove,snedden,smale,sliter,slankard,sircy,shutter,shurtliff,shur,shirkey,shewmake,shams,shadley,shaddox,sgro,serfass,seppala,segawa,segalla,seaberry,scruton,scism,schwein,schwartzman,schwantes,schomer,schoenborn,schlottmann,schissler,scheurer,schepis,scheidegger,saunier,sauders,sassman,sannicolas,sanderfur,salser,sagar,saffer,saeed,sadberry,saban,ryce,rybak,rumore,rummell,rudasill,rozman,rota,rossin,rosell,rosel,romberg,rojero,rochin,robideau,robarge,roath,risko,ringel,ringdahl,riera,riemann,ribas,revard,renegar,reinwald,rehman,redel,raysor,rathke,rapozo,rampton,ramaker,rakow,raia,radin,raco,rackham,racca,racanelli,rabun,quaranta,purves,pundt,protsman,prezioso,presutti,presgraves,poydras,portnoy,portalatin,pontes,poehler,poblete,poat,plumadore,pleiman,pizana,piscopo,piraino,pinelli,pillai,picken,picha,piccoli,philen,petteway,petros,peskin,perugini,perrella,pernice,peper,pensinger,pembleton,passman,parrent,panetta,pallas,palka,pais,paglia,padmore,ottesen,oser,ortmann,ormand,oriol,orick,oler,okafor,ohair,obert,oberholtzer,nowland,nosek,nordeen,nolf,nogle,nobriga,nicley,niccum,newingham,neumeister,neugebauer,netherland,nerney,neiss,neis,neider,neeld,nailor,mustain,mussman,musante,murton,murden,munyon,muldrew,motton,moscoso,moschella,moroz,morelos,morace,moone,montesano,montemurro,montas,montalbo,molander,mleczko,miyake,mitschke,minger,minelli,minear,millener,mihelich,miedema,miah,metzer,mery,merrigan,merck,mennella,membreno,melecio,melder,mehling,mehler,medcalf,meche,mealing,mcqueeney,mcphaul,mcmickle,mcmeen,mcmains,mclees,mcgowin,mcfarlain,mcdivitt,mccotter,mcconn,mccaster,mcbay,mcbath,mayoral,mayeux,matsuo,masur,massman,marzette,martensen,marlett,markgraf,marcinkowski,marchbanks,mansir,mandez,mancil,malagon,magnani,madonia,madill,madia,mackiewicz,macgillivray,macdowell,mabee,lundblad,lovvorn,lovings,loreto,linz,linnell,linebaugh,lindstedt,lindbloom,limberg,liebig,lickteig,lichtenberg,licari,lewison,levario,levar,lepper,lenzen,lenderman,lemarr,leinen,leider,legrande,lefort,lebleu,leask,leacock,lazano,lawalin,laven,laplaca,lant,langsam,langone,landress,landen,lande,lamorte,lairsey,laidlaw,laffin,lackner,lacaze,labuda,labree,labella,labar,kyer,kuyper,kulinski,kulig,kuhnert,kuchera,kubicek,kruckeberg,kruchten,krider,kotch,kornfeld,koren,koogler,koll,kole,kohnke,kohli,kofoed,koelling,kluth,klump,klopfenstein,klippel,klinge,klett,klemp,kleis,klann,kitzman,kinnan,kingsberry,kilmon,killpack,kilbane,kijowski,kies,kierstead,kettering,kesselman,kennington,keniston,kehrer,kearl,keala,kassa,kasahara,kantz,kalin,kaina,jupin,juntunen,juares,joynes,jovel,joos,jiggetts,jervis,jerabek,jennison,jaso,janz,izatt,ishibashi,iannotti,hymas,huneke,hulet,hougen,horvat,horstmann,hopple,holtkamp,holsten,hohenstein,hoefle,hoback,hiney,hiemstra,herwig,herter,herriott,hermsen,herdman,herder,herbig,helling,helbig,heitkamp,heinrichs,heinecke,heileman,heffley,heavrin,heaston,haymaker,hauenstein,hartlage,harig,hardenbrook,hankin,hamiter,hagens,hagel,grizzell,griest,griese,grennan,graden,gosse,gorder,goldin,goatley,gillespi,gilbride,giel,ghoston,gershman,geisinger,gehringer,gedeon,gebert,gaxiola,gawronski,gathright,gatchell,gargiulo,garg,galang,gadison,fyock,furniss,furby,funnell,frizell,frenkel,freeburg,frankhouser,franchi,foulger,formby,forkey,fonte,folson,follette,flavell,finegan,filippini,ferencz,ference,fennessey,feggins,feehan,fazzino,fazenbaker,faunce,farraj,farnell,farler,farabee,falkowski,facio,etzler,ethington,esterline,esper,esker,erxleben,engh,emling,elridge,ellenwood,elfrink,ekhoff,eisert,eifert,eichenlaub,egnor,eggebrecht,edlin,edberg,eble,eber,easler,duwe,dutta,dutremble,dusseault,durney,dunworth,dumire,dukeman,dufner,duey,duble,dreese,dozal,douville,ditmore,distin,dimuzio,dildine,dieterich,dieckman,didonna,dhillon,dezern,devereux,devall,detty,detamore,derksen,deremer,deras,denslow,deno,denicola,denbow,demma,demille,delira,delawder,delara,delahanty,dejonge,deininger,dedios,dederick,decelles,debus,debruyn,deborde,deak,dauenhauer,darsey,dansie,dalman,dakin,dagley,czaja,cybart,cutchin,currington,curbelo,croucher,crinklaw,cremin,cratty,cranfield,crafford,cowher,couvillion,couturier,corter,coombes,contos,consolini,connaughton,conely,collom,cockett,clepper,cleavenger,claro,clarkin,ciriaco,ciesla,cichon,ciancio,cianci,chynoweth,chrzanowski,christion,cholewa,chipley,chilcott,cheyne,cheslock,chenevert,charlot,chagolla,chabolla,cesena,cerutti,cava,caul,cassone,cassin,cassese,casaus,casali,cartledge,cardamone,carcia,carbonneau,carboni,carabello,capozzoli,capella,cannata,campoverde,campeau,cambre,camberos,calvery,calnan,calmes,calley,callery,calise,cacciotti,cacciatore,butterbaugh,burgo,burgamy,burell,bunde,bumbalough,buel,buechner,buchannon,brunn,brost,broadfoot,brittan,brevard,breda,brazel,brayboy,brasier,boyea,boxx,boso,bosio,boruff,borda,bongiovanni,bolerjack,boedeker,blye,blumstein,blumenfeld,blinn,bleakley,blatter,blan,bjornson,bisignano,billick,bieniek,bhatti,bevacqua,berra,berenbaum,bensinger,bennefield,belvins,belson,bellin,beighley,beecroft,beaudreau,baynard,bautch,bausch,basch,bartleson,barthelemy,barak,balzano,balistreri,bailer,bagnall,bagg,auston,augustyn,aslinger,ashalintubbi,arjona,arebalo,appelbaum,angert,angelucci,andry,andersson,amorim,amavisca,alward,alvelo,alvear,alumbaugh,alsobrook,allgeier,allende,aldrete,akiyama,ahlquist,adolphson,addario,acoff,abelson,abasta,zulauf,zirkind,zeoli,zemlicka,zawislak,zappia,zanella,yelvington,yeatman,yanni,wragg,wissing,wischmeier,wirta,wiren,wilmouth,williard,willert,willaert,wildt,whelpley,weingart,weidenbach,weidemann,weatherman,weakland,watwood,wattley,waterson,wambach,walzer,waldow,waag,vorpahl,volkmann,vitolo,visitacion,vincelette,viggiano,vieth,vidana,vert,verges,verdejo,venzon,velardi,varian,vargus,vandermeulen,vandam,vanasse,vanaman,utzinger,uriostegui,uplinger,twiss,tumlinson,tschanz,trunnell,troung,troublefield,trojacek,treloar,tranmer,touchton,torsiello,torina,tootle,toki,toepfer,tippie,thronson,thomes,tezeno,texada,testani,tessmer,terrel,terlizzi,tempel,temblador,tayler,tawil,tasch,tames,talor,talerico,swinderman,sweetland,swager,sulser,sullens,subia,sturgell,stumpff,stufflebeam,stucki,strohmeyer,strebel,straughan,strackbein,stobaugh,stetz,stelter,steinmann,steinfeld,stecher,stanwood,stanislawski,stander,speziale,soppe,soni,sobotka,smuin,slee,skerrett,sjoberg,sittig,simonelli,simo,silverio,silveria,silsby,sillman,sienkiewicz,shomo,shoff,shoener,shiba,sherfey,shehane,sexson,setton,sergi,selvy,seiders,seegmiller,sebree,seabury,scroggin,sconyers,schwalb,schurg,schulenberg,schuld,schrage,schow,schon,schnur,schneller,schmidtke,schlatter,schieffer,schenkel,scheeler,schauwecker,schartz,schacherer,scafe,sayegh,savidge,saur,sarles,sarkissian,sarkis,sarcone,sagucio,saffell,saenger,sacher,rylee,ruvolo,ruston,ruple,rulison,ruge,ruffo,ruehl,rueckert,rudman,rudie,rubert,rozeboom,roysden,roylance,rothchild,rosse,rosecrans,rodi,rockmore,robnett,roberti,rivett,ritzel,rierson,ricotta,ricken,rezac,rendell,reitman,reindl,reeb,reddic,reddell,rebuck,reali,raso,ramthun,ramsden,rameau,ralphs,rago,racz,quinteros,quinter,quinley,quiggle,purvines,purinton,purdum,pummill,puglia,puett,ptacek,przybyla,prowse,prestwich,pracht,poutre,poucher,portera,polinsky,poage,platts,pineau,pinckard,pilson,pilling,pilkins,pili,pikes,pigram,pietila,pickron,philippi,philhower,pflueger,pfalzgraf,pettibone,pett,petrosino,persing,perrino,perotti,periera,peri,peredo,peralto,pennywell,pennel,pellegren,pella,pedroso,paulos,paulding,pates,pasek,paramo,paolino,panganiban,paneto,paluch,ozaki,ownbey,overfelt,outman,opper,onstad,oland,okuda,oertel,oelke,normandeau,nordby,nordahl,noecker,noblin,niswonger,nishioka,nett,negley,nedeau,natera,nachman,naas,musich,mungin,mourer,mounsey,mottola,mothershed,moskal,mosbey,morini,moreles,montaluo,moneypenny,monda,moench,moates,moad,missildine,misiewicz,mirabella,minott,mincks,milum,milani,mikelson,mestayer,mertes,merrihew,merlos,meritt,melnyk,medlen,meder,mcvea,mcquarrie,mcquain,mclucas,mclester,mckitrick,mckennon,mcinnes,mcgrory,mcgranahan,mcglamery,mcgivney,mcgilvray,mccuiston,mccuin,mccrystal,mccolley,mcclerkin,mcclenon,mccamey,mcaninch,mazariegos,maynez,mattioli,mastronardi,masone,marzett,marsland,margulies,margolin,malatesta,mainer,maietta,magrath,maese,madkins,madeiros,madamba,mackson,maben,lytch,lundgreen,lumb,lukach,luick,luetkemeyer,luechtefeld,ludy,ludden,luckow,lubinsky,lowes,lorenson,loran,lopinto,looby,lones,livsey,liskey,lisby,lintner,lindow,lindblom,liming,liechty,leth,lesniewski,lenig,lemonds,leisy,lehrer,lehnen,lehmkuhl,leeth,leeks,lechler,lebsock,lavere,lautenschlage,laughridge,lauderback,laudenslager,lassonde,laroque,laramee,laracuente,lapeyrouse,lampron,lamers,laino,lague,lafromboise,lafata,lacount,lachowicz,kysar,kwiecien,kuffel,kueter,kronenberg,kristensen,kristek,krings,kriesel,krey,krebbs,kreamer,krabbe,kossman,kosakowski,kosak,kopacz,konkol,koepsell,koening,koen,knerr,knapik,kluttz,klocke,klenk,klemme,klapp,kitchell,kita,kissane,kirkbride,kirchhoff,kinter,kinsel,kingsland,kimmer,kimler,killoran,kieser,khalsa,khalaf,kettel,kerekes,keplin,kentner,kennebrew,kenison,kellough,keatts,keasey,kauppi,katon,kanner,kampa,kall,kaczorowski,kaczmarski,juarbe,jordison,jobst,jezierski,jeanbart,jarquin,jagodzinski,ishak,isett,infantino,imburgia,illingworth,hysmith,hynson,hydrick,hurla,hunton,hunnell,humbertson,housand,hottle,hosch,hoos,honn,hohlt,hodel,hochmuth,hixenbaugh,hislop,hisaw,hintzen,hilgendorf,hilchey,higgens,hersman,herrara,hendrixson,hendriks,hemond,hemmingway,heminger,helgren,heisey,heilmann,hehn,hegna,heffern,hawrylak,haverty,hauger,haslem,harnett,harb,happ,hanzlik,hanway,hanby,hanan,hamric,hammaker,halas,hagenbuch,habeck,gwozdz,gunia,guadarrama,grubaugh,grivas,griffieth,grieb,grewell,gregorich,grazier,graeber,graciano,gowens,goodpaster,gondek,gohr,goffney,godbee,gitlin,gisler,gillyard,gillooly,gilchrest,gilbo,gierlach,giebler,giang,geske,gervasio,gertner,gehling,geeter,gaus,gattison,gatica,gathings,gath,gassner,gassert,garabedian,gamon,gameros,galban,gabourel,gaal,fuoco,fullenwider,fudala,friscia,franceschini,foronda,fontanilla,florey,flore,flegle,flecha,fisler,fischbach,fiorita,figura,figgins,fichera,ferra,fawley,fawbush,fausett,farnes,farago,fairclough,fahie,fabiani,evanson,eutsey,eshbaugh,ertle,eppley,englehardt,engelhard,emswiler,elling,elderkin,eland,efaw,edstrom,edgemon,ecton,echeverri,ebright,earheart,dynes,dygert,dyches,dulmage,duhn,duhamel,dubrey,dubray,dubbs,drey,drewery,dreier,dorval,dorough,dorais,donlin,donatelli,dohm,doetsch,dobek,disbrow,dinardi,dillahunty,dillahunt,diers,dier,diekmann,diangelo,deskin,deschaine,depaoli,denner,demyan,demont,demaray,delillo,deleeuw,deibel,decato,deblasio,debartolo,daubenspeck,darner,dardon,danziger,danials,damewood,dalpiaz,dallman,dallaire,cunniffe,cumpston,cumbo,cubero,cruzan,cronkhite,critelli,crimi,creegan,crean,craycraft,cranfill,coyt,courchesne,coufal,corradino,corprew,colville,cocco,coby,clinch,clickner,clavette,claggett,cirigliano,ciesielski,christain,chesbro,chavera,chard,casteneda,castanedo,casseus,caruana,carnero,cappelli,capellan,canedy,cancro,camilleri,calero,cada,burghart,burbidge,bulfer,buis,budniewski,bruney,brugh,brossard,brodmerkel,brockmann,brigmond,briere,bremmer,breck,breau,brautigam,brasch,brandenberger,bragan,bozell,bowsher,bosh,borgia,borey,boomhower,bonneville,bonam,bolland,boise,boeve,boettger,boersma,boateng,bliven,blazier,blahnik,bjornstad,bitton,biss,birkett,billingsly,biagioni,bettle,bertucci,bertolino,bermea,bergner,berber,bensley,bendixen,beltrami,bellone,belland,behringer,begum,bayona,batiz,bassin,baskette,bartolomeo,bartolo,bartholow,barkan,barish,barett,bardo,bamburg,ballerini,balla,balis,bakley,bailon,bachicha,babiarz,ayars,axton,axel,awong,awalt,auslander,ausherman,aumick,atha,atchinson,aslett,askren,arrowsmith,arras,arnhold,armagost,arey,arcos,archibeque,antunes,antilla,andras,amyx,amison,amero,alzate,alper,aller,alioto,aigner,agtarap,agbayani,adami,achorn,aceuedo,acedo,abundis,aber,abee,zuccaro,ziglar,zier,ziebell,zieba,zamzow,zahl,yurko,yurick,yonkers,yerian,yeaman,yarman,yann,yahn,yadon,yadao,woodbridge,wolske,wollenberg,wojtczak,wnuk,witherite,winther,winick,widell,wickens,whichard,wheelis,wesely,wentzell,wenthold,wemple,weisenburger,wehling,weger,weaks,wassink,walquist,wadman,wacaster,waage,voliva,vlcek,villafana,vigliotti,viger,viernes,viands,veselka,versteeg,vero,verhoeven,vendetti,velardo,vatter,vasconcellos,varn,vanwagner,vanvoorhis,vanhecke,vanduyn,vandervoort,vanderslice,valone,vallier,vails,uvalle,ursua,urenda,uphoff,tustin,turton,turnbough,turck,tullio,tuch,truehart,tropea,troester,trippe,tricarico,trevarthen,trembly,trabue,traber,tosi,toal,tinley,tingler,timoteo,tiffin,ticer,thorman,therriault,theel,tessman,tekulve,tejera,tebbs,tavernia,tarpey,tallmadge,takemoto,szot,sylvest,swindoll,swearinger,swantek,swaner,swainston,susi,surrette,sullenger,sudderth,suddarth,suckow,strege,strassburg,stoval,stotz,stoneham,stilley,stille,stierwalt,stfleur,steuck,stermer,stclaire,stano,staker,stahler,stablein,srinivasan,squillace,sprvill,sproull,sprau,sporer,spore,spittler,speelman,sparr,sparkes,spang,spagnuolo,sosinski,sorto,sorkin,sondag,sollers,socia,snarr,smrekar,smolka,slyter,slovinsky,sliwa,slavik,slatter,skiver,skeem,skala,sitzes,sitsler,sitler,sinko,simser,siegler,sideris,shrewsberry,shoopman,shoaff,shindler,shimmin,shill,shenkel,shemwell,shehorn,severa,semones,selsor,sekulski,segui,sechrest,schwer,schwebach,schur,schmiesing,schlick,schlender,schebler,schear,schapiro,sauro,saunder,sauage,satterly,saraiva,saracino,saperstein,sanmartin,sanluis,sandt,sandrock,sammet,sama,salk,sakata,saini,sackrider,russum,russi,russaw,rozzell,roza,rowlette,rothberg,rossano,rosebrock,romanski,romanik,romani,roiger,roig,roehr,rodenberger,rodela,rochford,ristow,rispoli,rigo,riesgo,riebel,ribera,ribaudo,reys,resendes,repine,reisdorf,reisch,rebman,rasmus,raske,ranum,rames,rambin,raman,rajewski,raffield,rady,radich,raatz,quinnie,pyper,puthoff,prow,proehl,pribyl,pretti,prete,presby,poyer,powelson,porteous,poquette,pooser,pollan,ploss,plewa,placide,pion,pinnick,pinales,pillot,pille,pilato,piggee,pietrowski,piermarini,pickford,piccard,phenix,pevey,petrowski,petrillose,pesek,perrotti,peppler,peppard,penfold,pellitier,pelland,pehowic,pedretti,paules,passero,pasha,panza,pallante,palau,pakele,pacetti,paavola,overy,overson,outler,osegueda,oplinger,oldenkamp,ohern,oetting,odums,nowlen,nowack,nordlund,noblett,nobbe,nierman,nichelson,niblock,newbrough,nemetz,needleman,navin,nastasi,naslund,naramore,nakken,nakanishi,najarro,mushrush,muma,mulero,morganfield,moreman,morain,moquin,monterrosa,monsivais,monroig,monje,monfort,moffa,moeckel,mobbs,misiak,mires,mirelez,mineo,mineau,milnes,mikeska,michelin,michalowski,meszaros,messineo,meshell,merten,meola,menton,mends,mende,memmott,melius,mehan,mcnickle,mcmorran,mclennon,mcleish,mclaine,mckendry,mckell,mckeighan,mcisaac,mcie,mcguinn,mcgillis,mcfatridge,mcfarling,mcelravy,mcdonalds,mcculla,mcconnaughy,mcconnaughey,mcchriston,mcbeath,mayr,matyas,matthiesen,matsuura,matinez,mathys,matarazzo,masker,masden,mascio,martis,marrinan,marinucci,margerum,marengo,manthe,mansker,manoogian,mankey,manigo,manier,mangini,maltese,malsam,mallo,maliszewski,mainolfi,maharaj,maggart,magar,maffett,macmaster,macky,macdonnell,lyvers,luzzi,lutman,lovan,lonzo,longerbeam,lofthouse,loethen,lodi,llorens,lizama,litscher,lisowski,lipski,lipsett,lipkin,linzey,lineman,limerick,limas,lige,lierman,liebold,liberti,leverton,levene,lesueur,lenser,lenker,legnon,lefrancois,ledwell,lavecchia,laurich,lauricella,lannigan,landor,lamprecht,lamountain,lamore,lammert,lamboy,lamarque,lamacchia,lalley,lagace,lacorte,lacomb,kyllonen,kyker,kuschel,kupfer,kunde,kucinski,kubacki,kroenke,krech,koziel,kovacich,kothari,koth,kotek,kostelnik,kosloski,knoles,knabe,kmiecik,klingman,kliethermes,kleffman,klees,klaiber,kittell,kissling,kisinger,kintner,kinoshita,kiener,khouri,kerman,kelii,keirn,keezer,kaup,kathan,kaser,karlsen,kapur,kandoll,kammel,kahele,justesen,jonason,johnsrud,joerling,jochim,jespersen,jeong,jenness,jedlicka,jakob,isaman,inghram,ingenito,iadarola,hynd,huxtable,huwe,hurless,humpal,hughston,hughart,huggett,hugar,huether,howdyshell,houtchens,houseworth,hoskie,holshouser,holmen,holloran,hohler,hoefler,hodsdon,hochman,hjort,hippert,hippe,hinzman,hillock,hilden,heyn,heyden,heyd,hergert,henrikson,henningsen,hendel,helget,helf,helbing,heintzman,heggie,hege,hecox,heatherington,heare,haxton,haverstock,haverly,hatler,haselton,hase,hartzfeld,harten,harken,hargrow,haran,hanton,hammar,hamamoto,halper,halko,hackathorn,haberle,haake,gunnoe,gunkel,gulyas,guiney,guilbeau,guider,guerrant,gudgel,guarisco,grossen,grossberg,gropp,groome,grobe,gremminger,greenley,grauberger,grabenstein,gowers,gostomski,gosier,goodenow,gonzoles,goliday,goettle,goens,goates,glymph,glavin,glassco,gladfelter,glackin,githens,girgis,gimpel,gilbreth,gilbeau,giffen,giannotti,gholar,gervasi,gertsch,gernatt,gephardt,genco,gehr,geddis,gase,garrott,garrette,gapinski,ganter,ganser,gangi,gangemi,gallina,galdi,gailes,gaetano,gadomski,gaccione,fuschetto,furtick,furfaro,fullman,frutos,fruchter,frogge,freytag,freudenthal,fregoe,franzone,frankum,francia,franceschi,forys,forero,folkers,flug,flitter,flemons,fitzer,firpo,finizio,filiault,figg,fichtner,fetterolf,ferringer,feil,fayne,farro,faddis,ezzo,ezelle,eynon,evitt,eutsler,euell,escovedo,erne,eriksson,enriguez,empson,elkington,eisenmenger,eidt,eichenberger,ehrmann,ediger,earlywine,eacret,duzan,dunnington,ducasse,dubiel,drovin,drager,drage,donham,donat,dolinger,dokken,doepke,dodwell,docherty,distasio,disandro,diniz,digangi,didion,dezzutti,detmer,deshon,derrigo,dentler,demoura,demeter,demeritt,demayo,demark,demario,delzell,delnero,delgrosso,dejarnett,debernardi,dearmas,dashnaw,daris,danks,danker,dangler,daignault,dafoe,dace,curet,cumberledge,culkin,crowner,crocket,crawshaw,craun,cranshaw,cragle,courser,costella,cornforth,corkill,coopersmith,conzemius,connett,connely,condict,condello,comley,cohoon,coday,clugston,clowney,clippard,clinkenbeard,clines,clelland,clapham,clancey,clabough,cichy,cicalese,chua,chittick,chisom,chisley,chinchilla,cheramie,cerritos,cercone,cena,cawood,cavness,catanzarite,casada,carvell,carmicheal,carll,cardozo,caplin,candia,canby,cammon,callister,calligan,calkin,caillouet,buzzelli,bute,bustillo,bursey,burgeson,bupp,bulson,buist,buffey,buczkowski,buckbee,bucio,brueckner,broz,brookhart,brong,brockmeyer,broberg,brittenham,brisbois,bridgmon,breyer,brede,breakfield,breakey,brauner,branigan,brandewie,branche,brager,brader,bovell,bouthot,bostock,bosma,boseman,boschee,borthwick,borneman,borer,borek,boomershine,boni,bommarito,bolman,boleware,boisse,boehlke,bodle,blash,blasco,blakesley,blacklock,blackley,bittick,birks,birdin,bircher,bilbao,bick,biby,bertoni,bertino,bertini,berson,bern,berkebile,bergstresser,benne,benevento,belzer,beltre,bellomo,bellerose,beilke,begeman,bebee,beazer,beaven,beamish,baymon,baston,bastidas,basom,basey,bartles,baroni,barocio,barnet,barclift,banville,balthazor,balleza,balkcom,baires,bailie,baik,baggott,bagen,bachner,babington,babel,asmar,arvelo,artega,arrendondo,arreaga,arrambide,arquette,aronoff,arico,argentieri,arevalos,archbold,apuzzo,antczak,ankeny,angelle,angelini,anfinson,amer,amarillas,altier,altenburg,alspach,alosa,allsbrook,alexopoulos,aleem,aldred,albertsen,akerson,agler,adley,addams,acoba,achille,abplanalp,abella,abare,zwolinski,zollicoffer,zins,ziff,zenner,zender,zelnick,zelenka,zeches,zaucha,zauala,zangari,zagorski,youtsey,yasso,yarde,yarbough,woolever,woodsmall,woodfolk,wobig,wixson,wittwer,wirtanen,winson,wingerd,wilkening,wilhelms,wierzbicki,wiechman,weyrick,wessell,wenrick,wenning,weltz,weinrich,weiand,wehunt,wareing,walth,waibel,wahlquist,vona,voelkel,vitek,vinsant,vincente,vilar,viel,vicars,vermette,verma,venner,veazie,vayda,vashaw,varon,vardeman,vandevelde,vanbrocklin,vaccarezza,urquidez,urie,urbach,uram,ungaro,umali,ulsh,tutwiler,turnbaugh,tumminello,tuite,tueller,trulove,troha,trivino,trisdale,trippett,tribbett,treptow,tremain,travelstead,trautwein,trautmann,tram,traeger,tonelli,tomsic,tomich,tomasulo,tomasino,tole,todhunter,toborg,tischer,tirpak,tircuit,tinnon,tinnel,tines,timbs,tilden,tiede,thumm,throgmorton,thorndike,thornburgh,thoren,thomann,therrell,thau,thammavong,tetrick,tessitore,tesreau,teicher,teaford,tauscher,tauer,tanabe,talamo,takeuchi,taite,tadych,sweeton,swecker,swartzentrube,swarner,surrell,surbaugh,suppa,sumbry,suchy,stuteville,studt,stromer,strome,streng,stonestreet,stockley,stmichel,stfort,sternisha,stensrud,steinhardt,steinback,steichen,stauble,stasiak,starzyk,stango,standerfer,stachowiak,springston,spratlin,spracklen,sponseller,spilker,spiegelman,spellacy,speiser,spaziani,spader,spackman,sorum,sopha,sollis,sollenberger,solivan,solheim,sokolsky,sogge,smyser,smitley,sloas,slinker,skora,skiff,skare,siverd,sivels,siska,siordia,simmering,simko,sime,silmon,silano,sieger,siebold,shukla,shreves,shoun,shortle,shonkwiler,shoals,shimmel,shiel,shieh,sherbondy,shenkman,shein,shearon,shean,shatz,shanholtz,shafran,shaff,shackett,sgroi,sewall,severy,sethi,sessa,sequra,sepulvado,seper,senteno,sendejo,semmens,seipp,segler,seegers,sedwick,sedore,sechler,sebastiano,scovel,scotton,scopel,schwend,schwarting,schutter,schrier,schons,scholtes,schnetzer,schnelle,schmutz,schlichter,schelling,schams,schamp,scarber,scallan,scalisi,scaffidi,saxby,sawrey,sauvageau,sauder,sarrett,sanzo,santizo,santella,santander,sandez,sandel,sammon,salsedo,salge,sagun,safi,sader,sacchetti,sablan,saade,runnion,runkel,rumbo,ruesch,ruegg,ruckle,ruchti,rubens,rubano,rozycki,roupe,roufs,rossel,rosmarin,rosero,rosenwald,ronca,romos,rolla,rohling,rohleder,roell,roehm,rochefort,roch,robotham,rivenburgh,riopel,riederer,ridlen,rias,rhudy,reynard,retter,respess,reppond,repko,rengifo,reinking,reichelt,reeh,redenius,rebolledo,rauh,ratajczak,rapley,ranalli,ramie,raitt,radloff,radle,rabbitt,quay,quant,pusateri,puffinberger,puerta,provencio,proano,privitera,prenger,prellwitz,pousson,potier,portz,portlock,porth,portela,portee,porchia,pollick,polinski,polfer,polanski,polachek,pluta,plourd,plauche,pitner,piontkowski,pileggi,pierotti,pico,piacente,phinisee,phaup,pfost,pettinger,pettet,petrich,peto,persley,persad,perlstein,perko,pere,penders,peifer,peco,pawley,pash,parrack,parady,papen,pangilinan,pandolfo,palone,palmertree,padin,ottey,ottem,ostroski,ornstein,ormonde,onstott,oncale,oltremari,olcott,olan,oishi,oien,odonell,odonald,obeso,obeirne,oatley,nusser,novo,novicki,nitschke,nistler,nikkel,niese,nierenberg,nield,niedzwiecki,niebla,niebel,nicklin,neyhart,newsum,nevares,nageotte,nagai,mutz,murata,muralles,munnerlyn,mumpower,muegge,muckle,muchmore,moulthrop,motl,moskos,mortland,morring,mormile,morimoto,morikawa,morgon,mordecai,montour,mont,mongan,monell,miyasato,mish,minshew,mimbs,millin,milliard,mihm,middlemiss,miano,mesick,merlan,mendonsa,mench,melonson,melling,meachem,mctighe,mcnelis,mcmurtrey,mckesson,mckenrick,mckelvie,mcjunkins,mcgory,mcgirr,mcgeever,mcfield,mcelhinney,mccrossen,mccommon,mccannon,mazyck,mawyer,maull,matute,mathies,maschino,marzan,martinie,marrotte,marmion,markarian,marinacci,margolies,margeson,marak,maraia,maracle,manygoats,manker,mank,mandich,manderson,maltz,malmquist,malacara,majette,magnan,magliocca,madina,madara,macwilliams,macqueen,maccallum,lyde,lyday,lutrick,lurz,lurvey,lumbreras,luhrs,luhr,lowrimore,lowndes,lourenco,lougee,lorona,longstreth,loht,lofquist,loewenstein,lobos,lizardi,lionberger,limoli,liljenquist,liguori,liebl,liburd,leukhardt,letizia,lesinski,lepisto,lenzini,leisenring,leipold,leier,leggitt,legare,leaphart,lazor,lazaga,lavey,laue,laudermilk,lauck,lassalle,larsson,larison,lanzo,lantzy,lanners,langtry,landford,lancour,lamour,lambertson,lalone,lairson,lainhart,lagreca,lacina,labranche,labate,kurtenbach,kuipers,kuechle,kubo,krinsky,krauser,kraeger,kracht,kozeliski,kozar,kowalik,kotler,kotecki,koslosky,kosel,koob,kolasinski,koizumi,kohlman,koffman,knutt,knore,knaff,kmiec,klamm,kittler,kitner,kirkeby,kiper,kindler,kilmartin,kilbride,kerchner,kendell,keddy,keaveney,kearsley,karlsson,karalis,kappes,kapadia,kallman,kallio,kalil,kader,jurkiewicz,jitchaku,jillson,jeune,jarratt,jarchow,janak,ivins,ivans,isenhart,inocencio,inoa,imhof,iacono,hynds,hutching,hutchin,hulsman,hulsizer,hueston,huddleson,hrbek,howry,housey,hounshell,hosick,hortman,horky,horine,hootman,honeywell,honeyestewa,holste,holien,holbrooks,hoffmeyer,hoese,hoenig,hirschfeld,hildenbrand,higson,higney,hibert,hibbetts,hewlin,hesley,herrold,hermon,hepker,henwood,helbling,heinzman,heidtbrink,hedger,havey,hatheway,hartshorne,harpel,haning,handelman,hamalainen,hamad,halasz,haigwood,haggans,hackshaw,guzzo,gundrum,guilbeault,gugliuzza,guglielmi,guderian,gruwell,grunow,grundman,gruen,grotzke,grossnickle,groomes,grode,grochowski,grob,grein,greif,greenwall,greenup,grassl,grannis,grandfield,grames,grabski,grabe,gouldsberry,gosch,goodling,goodermote,gonzale,golebiowski,goldson,godlove,glanville,gillin,gilkerson,giessler,giambalvo,giacomini,giacobbe,ghio,gergen,gentz,genrich,gelormino,gelber,geitner,geimer,gauthreaux,gaultney,garvie,gareau,garbacz,ganoe,gangwer,gandarilla,galyen,galt,galluzzo,galardo,gager,gaddie,gaber,gabehart,gaarder,fusilier,furnari,furbee,fugua,fruth,frohman,friske,frilot,fridman,frescas,freier,frayer,franzese,frankenberry,frain,fosse,foresman,forbess,flook,fletes,fleer,fleek,fleegle,fishburne,fiscalini,finnigan,fini,filipiak,figueira,fiero,ficek,fiaschetti,ferren,ferrando,ferman,fergusson,fenech,feiner,feig,faulds,fariss,falor,falke,ewings,eversley,everding,etling,essen,erskin,enstrom,engebretsen,eitel,eichberger,ehler,eekhoff,edrington,edmonston,edgmon,edes,eberlein,dwinell,dupee,dunklee,dungey,dunagin,dumoulin,duggar,duenez,dudzic,dudenhoeffer,ducey,drouillard,dreibelbis,dreger,dreesman,draughon,downen,dorminy,dombeck,dolman,doebler,dittberner,dishaw,disanti,dinicola,dinham,dimino,dilling,difrancesco,dicello,dibert,deshazer,deserio,descoteau,deruyter,dering,depinto,dente,demus,demattos,demarsico,delude,dekok,debrito,debois,deakin,dayley,dawsey,dauria,datson,darty,darsow,darragh,darensbourg,dalleva,dalbec,dadd,cutcher,cung,cuello,cuadros,crute,crutchley,crispino,crislip,crisco,crevier,creekmur,crance,cragg,crager,cozby,coyan,coxon,covalt,couillard,costley,costilow,cossairt,corvino,corigliano,cordaro,corbridge,corban,coor,conkel,conary,coltrain,collopy,colgin,colen,colbath,coiro,coffie,cochrum,cobbett,clopper,cliburn,clendenon,clemon,clementi,clausi,cirino,cina,churchman,chilcutt,cherney,cheetham,cheatom,chatelain,chalifour,cesa,cervenka,cerullo,cerreta,cerbone,cecchini,ceccarelli,cawthorn,cavalero,castner,castlen,castine,casimiro,casdorph,cartmill,cartmell,carro,carriger,carias,caravella,cappas,capen,cantey,canedo,camuso,campanaro,cambria,calzado,callejo,caligiuri,cafaro,cadotte,cacace,byrant,busbey,burtle,burres,burnworth,burggraf,burback,bunte,bunke,bulle,bugos,budlong,buckhalter,buccellato,brummet,bruff,brubeck,brouk,broten,brosky,broner,brislin,brimm,brillhart,bridgham,brideau,brennecke,breer,breeland,bredesen,brackney,brackeen,boza,boyum,bowdry,bowdish,bouwens,bouvier,bougie,bouche,bottenfield,bostian,bossie,bosler,boschert,boroff,borello,bonser,bonfield,bole,boldue,bogacz,boemer,bloxom,blickenstaff,blessinger,bleazard,blatz,blanchet,blacksher,birchler,binning,binkowski,biltz,bilotta,bilagody,bigbee,bieri,biehle,bidlack,betker,bethers,bethell,bero,bernacchi,bermingham,berkshire,benvenuto,bensman,benoff,bencivenga,beman,bellow,bellany,belflower,belch,bekker,bejar,beisel,beichner,beedy,beas,beanblossom,bawek,baus,baugus,battie,battershell,bateson,basque,basford,bartone,barritt,barko,bann,bamford,baltrip,balon,balliew,ballam,baldus,ayling,avelino,ashwell,ashland,arseneau,arroyos,armendarez,arita,argust,archuletta,arcement,antonacci,anthis,antal,annan,anderman,amster,amiri,amadon,alveraz,altomari,altmann,altenhofen,allers,allbee,allaway,aleo,alcoser,alcorta,akhtar,ahuna,agramonte,agard,adkerson,achord,abdi,abair,zurn,zoellner,zirk,zion,zarro,zarco,zambo,zaiser,zaino,zachry,youd,yonan,yniguez,yepes,yellock,yellen,yeatts,yearling,yatsko,yannone,wyler,woodridge,wolfrom,wolaver,wolanin,wojnar,wojciak,wittmann,wittich,wiswell,wisser,wintersteen,wineland,willford,wiginton,wigfield,wierman,wice,wiater,whitsel,whitbread,wheller,wettstein,werling,wente,wenig,wempe,welz,weinhold,weigelt,weichman,wedemeyer,weddel,wayment,waycaster,wauneka,watzka,watton,warnell,warnecke,warmack,warder,wands,waldvogel,waldridge,wahs,wagganer,waddill,vyas,vought,votta,voiles,virga,viner,villella,villaverde,villaneda,viele,vickroy,vicencio,vetere,vermilyea,verley,verburg,ventresca,veno,venard,venancio,velaquez,veenstra,vasil,vanzee,vanwie,vantine,vant,vanschoyck,vannice,vankampen,vanicek,vandersloot,vanderpoel,vanderlinde,vallieres,uzzell,uzelac,uranga,uptain,updyke,uong,untiedt,umbrell,umbaugh,umbarger,ulysse,ullmann,ullah,tutko,turturro,turnmire,turnley,turcott,turbyfill,turano,tuminello,tumbleson,tsou,truscott,trulson,troutner,trone,trinklein,tremmel,tredway,trease,traynham,traw,totty,torti,torregrossa,torok,tomkins,tomaino,tkach,tirey,tinsman,timpe,tiefenauer,tiedt,tidball,thwaites,thulin,throneburg,thorell,thorburn,thiemann,thieman,thesing,tham,terrien,telfair,taybron,tasson,tasso,tarro,tanenbaum,taddeo,taborn,tabios,szekely,szatkowski,sylve,swineford,swartzfager,swanton,swagerty,surrency,sunderlin,sumerlin,suero,suddith,sublette,stumpe,stueve,stuckert,strycker,struve,struss,strubbe,strough,strothmann,strahle,stoutner,stooksbury,stonebarger,stokey,stoffer,stimmel,stief,stephans,stemper,steltenpohl,stellato,steinle,stegeman,steffler,steege,steckman,stapel,stansbery,stanaland,stahley,stagnaro,stachowski,squibb,sprunger,sproule,sprehe,spreen,sprecher,sposato,spivery,souter,sopher,sommerfeldt,soffer,snowberger,snape,smylie,smyer,slaydon,slatton,slaght,skovira,skeans,sjolund,sjodin,siragusa,singelton,silis,siebenaler,shuffield,shobe,shiring,shimabukuro,shilts,sherbert,shelden,sheil,shedlock,shearn,shaub,sharbono,shapley,shands,shaheen,shaffner,servantez,sentz,seney,selin,seitzinger,seider,sehr,sego,segall,sebastien,scimeca,schwenck,schweiss,schwark,schwalbe,schucker,schronce,schrag,schouten,schoppe,schomaker,schnarr,schmied,schmader,schlicht,schlag,schield,schiano,scheve,scherbarth,schaumburg,schauman,scarpino,savinon,sassaman,saporito,sanville,santilli,santaana,salzmann,salman,sagraves,safran,saccone,rutty,russett,rupard,rumbley,ruffins,ruacho,rozema,roxas,routson,rourk,rought,rotunda,rotermund,rosman,rork,rooke,rolin,rohm,rohlman,rohl,roeske,roecker,rober,robenson,riso,rinne,riina,rigsbee,riggles,riester,rials,rhinehardt,reynaud,reyburn,rewis,revermann,reutzel,retz,rende,rendall,reistad,reinders,reichardt,rehrig,rehrer,recendez,reamy,rauls,ratz,rattray,rasband,rapone,ragle,ragins,radican,raczka,rachels,raburn,rabren,raboin,quesnell,quaintance,puccinelli,pruner,prouse,prosise,proffer,prochazka,probasco,previte,portell,porcher,popoca,pomroy,poma,polsky,polsgrove,polidore,podraza,plymale,plescia,pleau,platte,pizzi,pinchon,picot,piccione,picazo,philibert,phebus,pfohl,petell,pesso,pesante,pervis,perrins,perley,perkey,pereida,penate,peloso,pellerito,peffley,peddicord,pecina,peale,payette,paxman,pawlikowski,pavy,patry,patmon,patil,pater,patak,pasqua,pasche,partyka,parody,parmeter,pares,pardi,paonessa,panozzo,panameno,paletta,pait,oyervides,ossman,oshima,ortlieb,orsak,onley,oldroyd,okano,ohora,offley,oestreicher,odonovan,odham,odegard,obst,obriant,obrecht,nuccio,nowling,nowden,novelli,nost,norstrom,nordgren,nopper,noller,nisonger,niskanen,nienhuis,nienaber,neuwirth,neumeyer,neice,naugher,naiman,nagamine,mustin,murrietta,murdaugh,munar,muhlbauer,mroczkowski,mowdy,mouw,mousel,mountcastle,moscowitz,mosco,morro,moresi,morago,moomaw,montroy,montpas,montieth,montanaro,mongelli,mollison,mollette,moldovan,mohar,mitchelle,mishra,misenheimer,minshall,minozzi,minniefield,milhous,migliaccio,migdal,mickell,meyering,methot,mester,mesler,meriweather,mensing,mensah,menge,mendibles,meloche,melnik,mellas,meinert,mehrhoff,medas,meckler,mctague,mcspirit,mcshea,mcquown,mcquiller,mclarney,mckiney,mckearney,mcguyer,mcfarlan,mcfadyen,mcdanial,mcdanel,mccurtis,mccrohan,mccorry,mcclune,mccant,mccanna,mccandlish,mcaloon,mayall,maver,maune,matza,matsuzaki,matott,mathey,mateos,masoner,masino,marzullo,marz,marsolek,marquard,marchetta,marberry,manzione,manthei,manka,mangram,mangle,mangel,mandato,mancillas,mammen,malina,maletta,malecki,majkut,mages,maestre,macphail,maco,macneill,macadam,lysiak,lyne,luxton,luptak,lundmark,luginbill,lovallo,louthan,lousteau,loupe,lotti,lopresto,lonsdale,longsworth,lohnes,loghry,logemann,lofaro,loeber,locastro,livings,litzinger,litts,liotta,lingard,lineback,lindhorst,lill,lide,lickliter,liberman,lewinski,levandowski,leimbach,leifer,leidholt,leiby,leibel,leibee,lehrke,lehnherr,lego,leese,leen,ledo,lech,leblond,leahey,lazzari,lawrance,lawlis,lawhorne,lawes,lavigna,lavell,lauzier,lauter,laumann,latsha,latourette,latona,latney,laska,larner,larmore,larke,larence,lapier,lanzarin,lammey,lamke,laminack,lamastus,lamaster,lacewell,labarr,laabs,kutch,kuper,kuna,kubis,krzemien,krupinski,krepps,kreeger,kraner,krammer,kountz,kothe,korpela,komara,kolenda,kolek,kohnen,koelzer,koelsch,kocurek,knoke,knauff,knaggs,knab,kluver,klose,klien,klahr,kitagawa,kissler,kirstein,kinnon,kinnebrew,kinnamon,kimmins,kilgour,kilcoyne,kiester,kiehm,kesselring,kerestes,kenniston,kennamore,kenebrew,kelderman,keitel,kefauver,katzenberger,katt,kast,kassel,kamara,kalmbach,kaizer,kaiwi,kainz,jurczyk,jumonville,juliar,jourdain,johndrow,johanning,johannesen,joffrion,jobes,jerde,jentzsch,jenkens,jendro,jellerson,jefferds,jaure,jaquish,janeway,jago,iwasaki,ishman,isaza,inmon,inlow,inclan,ildefonso,iezzi,ianni,iacovetto,hyldahl,huxhold,huser,humpherys,humburg,hult,hullender,hulburt,huckabay,howeth,hovermale,hoven,houtman,hourigan,hosek,hopgood,homrich,holstine,holsclaw,hokama,hoffpauir,hoffner,hochstein,hochstatter,hochberg,hjelm,hiscox,hinsley,hineman,hineline,hinck,hilbun,hewins,herzing,hertzberg,hertenstein,herrea,herington,henrie,henman,hengst,hemmen,helmke,helgerson,heinsohn,heigl,hegstad,heggen,hegge,hefti,heathcock,haylett,haupert,haufler,hatala,haslip,hartless,hartje,hartis,harpold,harmsen,harbach,hanten,hanington,hammen,hameister,hallstrom,habersham,habegger,gussman,gundy,guitterez,guisinger,guilfoyle,groulx,grismer,griesbach,grawe,grall,graben,goulden,gornick,gori,gookin,gonzalaz,gonyer,gonder,golphin,goller,goergen,glosson,glor,gladin,girdler,gillim,gillians,gillaspie,gilhooly,gildon,gignac,gibler,gibbins,giardino,giampietro,gettman,gerringer,gerrald,gerlich,georgiou,georgi,geiselman,gehman,gangl,gamage,gallian,gallen,gallatin,galea,gainor,gahr,furbush,fulfer,fuhrmann,fritter,friis,friedly,freudenberger,freemon,fratus,frans,foulke,fosler,forquer,fontan,folwell,foeller,fodge,fobes,florek,fliss,flesner,flegel,fitzloff,fiser,firmin,firestine,finfrock,fineberg,fiegel,fickling,fesperman,fernadez,felber,feimster,feazel,favre,faughn,fatula,fasone,farron,faron,farino,falvey,falkenberg,faley,faletti,faeth,fackrell,espe,eskola,escott,esaw,erps,erker,erath,enfield,emfinger,embury,embleton,emanuele,elvers,ellwanger,ellegood,eichinger,egge,egeland,edgett,echard,eblen,eastmond,duteau,durland,dure,dunlavy,dungee,dukette,dugay,duboise,dubey,dsouza,druck,dralle,doubek,dorta,dorch,dorce,dopson,dolney,dockter,distler,dippel,dichiara,dicerbo,dewindt,dewan,deveney,devargas,deutscher,deuel,detter,dess,derrington,deroberts,dern,deponte,denogean,denardi,denard,demary,demarais,delucas,deloe,delmonico,delisi,delio,delduca,deihl,dehmer,decoste,dechick,decatur,debruce,debold,debell,deats,daunt,daquilante,dambrosi,damas,dalin,dahman,dahlem,daffin,dacquel,cutrell,cusano,curtner,currens,curnow,cuppett,cummiskey,cullers,culhane,crull,crossin,cropsey,cromie,crofford,criscuolo,crisafulli,crego,creeden,covello,covel,corse,correra,cordner,cordier,coplen,copeman,contini,conteras,consalvo,conduff,compher,colliver,colan,cohill,cohenour,cogliano,codd,cockayne,clum,clowdus,clarida,clance,clairday,clagg,citron,citino,ciriello,cicciarelli,chrostowski,christley,chrisco,chrest,chisler,chieffo,cherne,cherico,cherian,cheirs,chauhan,chamblin,cerra,cepero,cellini,celedon,cejka,cavagnaro,cauffman,catanese,castrillo,castrellon,casserly,caseres,carthen,carse,carragher,carpentieri,carmony,carmer,carlozzi,caradine,cappola,capece,capaldi,cantres,cantos,canevari,canete,calcaterra,cadigan,cabbell,byrn,bykowski,butchko,busler,bushaw,buschmann,burow,buri,burgman,bunselmeyer,bunning,buhrman,budnick,buckson,buckhannon,brunjes,brumleve,bruckman,brouhard,brougham,brostrom,broerman,brocks,brison,brining,brindisi,brereton,breon,breitling,breedon,brasseaux,branaman,bramon,brackenridge,boyan,boxley,bouman,bouillion,botting,botti,bosshart,borup,borner,bordonaro,bonsignore,bonsall,bolter,bojko,bohne,bohlmann,bogdon,boen,bodenschatz,bockoven,bobrow,blondin,blissett,bligen,blasini,blankenburg,bjorkman,bistline,bisset,birdow,biondolillo,bielski,biele,biddix,biddinger,bianchini,bevens,bevard,betancur,bernskoetter,bernet,bernardez,berliner,berland,berkheimer,berent,bensch,benesch,belleau,bedingfield,beckstrom,beckim,bechler,beachler,bazzell,basa,bartoszek,barsch,barrell,barnas,barnaba,barillas,barbier,baltodano,baltierra,balle,balint,baldi,balderson,balderama,baldauf,balcazar,balay,baiz,bairos,azim,aversa,avellaneda,ausburn,auila,augusto,atwill,artiles,arterberry,arnow,arnaud,arnall,arenz,arduini,archila,arakawa,appleman,aplin,antonini,anstey,anglen,andros,amweg,amstutz,amari,amadeo,alteri,aloi,allebach,aley,alamillo,airhart,ahrendt,aegerter,adragna,admas,adderly,adderley,addair,abelar,abbamonte,abadi,zurek,zundel,zuidema,zuelke,zuck,zogg,zody,zets,zech,zecca,zavaleta,zarr,yousif,yoes,yoast,yeagley,yaney,yanda,yackel,wyles,wyke,woolman,woollard,woodis,woodin,wonderly,wombles,woloszyn,wollam,wnek,wittie,withee,wissman,wisham,wintle,winokur,wilmarth,willhoite,wildner,wikel,wieser,wien,wicke,wiatrek,whitehall,whetstine,wheelus,weyrauch,weyers,westerling,wendelken,welner,weinreb,weinheimer,weilbacher,weihe,weider,wecker,wead,watler,watkinson,wasmer,waskiewicz,wasik,warneke,wares,wangerin,wamble,walken,waker,wakeley,wahlgren,wahlberg,wagler,wachob,vorhies,vonseggern,vittitow,vink,villarruel,villamil,villamar,villalovos,vidmar,victorero,vespa,vertrees,verissimo,veltman,vecchione,veals,varrone,varma,vanveen,vanterpool,vaneck,vandyck,vancise,vanausdal,vanalphen,valdiviezo,urton,urey,updegrove,unrue,ulbrich,tysinger,twiddy,tunson,trueheart,troyan,trier,traweek,trafford,tozzi,toulouse,tosto,toste,torez,tooke,tonini,tonge,tomerlin,tolmie,tobe,tippen,tierno,tichy,thuss,thran,thornbury,thone,theunissen,thelmon,theall,textor,teters,tesh,tench,tekautz,tehrani,teat,teare,tavenner,tartaglione,tanski,tanis,tanguma,tangeman,taney,tammen,tamburri,tamburello,talsma,tallie,takeda,taira,taheri,tademy,taddei,taaffe,szymczak,szczepaniak,szafranski,swygert,swem,swartzlander,sutley,supernaw,sundell,sullivant,suderman,sudbury,suares,stueber,stromme,streeper,streck,strebe,stonehouse,stoia,stohr,stodghill,stirewalt,sterry,stenstrom,stene,steinbrecher,stear,stdenis,stanphill,staniszewski,stanard,stahlhut,stachowicz,srivastava,spong,spomer,spinosa,spindel,spera,soward,sopp,sooter,sonnek,soland,sojourner,soeder,sobolewski,snellings,smola,smetana,smeal,smarr,sloma,sligar,skenandore,skalsky,sissom,sirko,simkin,silverthorn,silman,sikkink,signorile,siddens,shumsky,shrider,shoulta,shonk,shomaker,shippey,shimada,shillingburg,shifflet,shiels,shepheard,sheerin,shedden,sheckles,sharrieff,sharpley,shappell,shaneyfelt,shampine,shaefer,shaddock,shadd,sforza,severtson,setzler,sepich,senne,senatore,sementilli,selway,selover,sellick,seigworth,sefton,seegars,sebourn,seaquist,sealock,seabreeze,scriver,scinto,schumer,schulke,schryver,schriner,schramek,schoon,schoolfield,schonberger,schnieder,schnider,schlitz,schlather,schirtzinger,scherman,schenker,scheiner,scheible,schaus,schakel,schaad,saxe,savely,savary,sardinas,santarelli,sanschagrin,sanpedro,sandine,sandigo,sandgren,sanderford,sandahl,salzwedel,salzar,salvino,salvatierra,salminen,salierno,salberg,sahagun,saelee,sabel,rynearson,ryker,rupprecht,runquist,rumrill,ruhnke,rovira,rottenberg,rosoff,rosete,rosebrough,roppolo,roope,romas,roley,rohrback,rohlfs,rogriguez,roel,rodriguiz,rodewald,roback,rizor,ritt,rippee,riolo,rinkenberger,riggsby,rigel,rieman,riedesel,rideau,ricke,rhinebolt,rheault,revak,relford,reinsmith,reichmann,regula,redlinger,rayno,raycroft,raus,raupp,rathmann,rastorfer,rasey,raponi,rantz,ranno,ranes,ramnauth,rahal,raddatz,quattrocchi,quang,pullis,pulanco,pryde,prohaska,primiano,prez,prevatt,prechtl,pottle,potenza,portes,porowski,poppleton,pontillo,politz,politi,poggi,plonka,plaskett,placzek,pizzuti,pizzaro,pisciotta,pippens,pinkins,pinilla,pini,pingitore,piercey,piccola,piccioni,picciano,philps,philp,philo,philmon,philbin,pflieger,pezzullo,petruso,petrea,petitti,peth,peshlakai,peschel,persico,persichetti,persechino,perris,perlow,perico,pergola,penniston,pembroke,pellman,pekarek,peirson,pearcey,pealer,pavlicek,passino,pasquarello,pasion,parzych,parziale,parga,papalia,papadakis,paino,pacini,oyen,ownes,owczarzak,outley,ouelette,ottosen,otting,ostwinkle,osment,oshita,osario,orlow,oriordan,orefice,orantes,oran,orahood,opel,olpin,oliveria,okon,okerlund,okazaki,ohta,offerman,nyce,nutall,northey,norcia,noor,niehoff,niederhauser,nickolson,nguy,neylon,newstrom,nevill,netz,nesselrodt,nemes,neally,nauyen,nascimento,nardella,nanni,myren,murchinson,munter,mundschenk,mujalli,muckleroy,moussa,mouret,moulds,mottram,motte,morre,montreuil,monton,montellano,monninger,monhollen,mongeon,monestime,monegro,mondesir,monceaux,mola,moga,moening,moccia,misko,miske,mishaw,minturn,mingione,milstein,milla,milks,michl,micheletti,michals,mesia,merson,meras,menifee,meluso,mella,melick,mehlman,meffert,medoza,mecum,meaker,meahl,mczeal,mcwatters,mcomber,mcmonigle,mckiddy,mcgranor,mcgeary,mcgaw,mcenery,mcelderry,mcduffey,mccuistion,mccrudden,mccrossin,mccosh,mccolgan,mcclish,mcclenahan,mcclam,mccartt,mccarrell,mcbane,maybury,mayben,maulden,mauceri,matko,mathie,matheis,mathai,masucci,massiah,martorano,martnez,martindelcamp,marschke,marovich,markiewicz,marinaccio,marhefka,marcrum,manton,mannarino,manlove,mangham,manasco,malpica,mallernee,malinsky,malhotra,maish,maisel,mainville,maharrey,magid,maertz,mada,maclaughlin,macina,macdermott,macallister,macadangdang,maack,lynk,lydic,luyando,lutke,lupinacci,lunz,lundsten,lujano,luhn,luecke,luebbe,ludolph,luckman,lucker,luckenbill,luckenbach,lucido,lowney,lowitz,lovaglio,louro,louk,loudy,louderback,lorick,lorenzini,lorensen,lorenc,lomuscio,loguidice,lockner,lockart,lochridge,litaker,lisowe,liptrap,linnane,linhares,lindfors,lindenmuth,lincourt,liew,liebowitz,levengood,leskovec,lesch,leoni,lennard,legner,leaser,leas,leadingham,lazarski,layland,laurito,laulu,laughner,laughman,laughery,laube,latiolais,lasserre,lasser,larrow,larrea,lapsley,lantrip,lanthier,langwell,langelier,landaker,lampi,lamond,lamblin,lambie,lakins,laipple,lagrimas,lafrancois,laffitte,laday,lacko,lacava,labianca,kutsch,kuske,kunert,kubly,kuamoo,krummel,krise,krenek,kreiser,krausz,kraska,krakowski,kradel,kozik,koza,kotowski,koslow,korber,kojima,kochel,knabjian,klunder,klugh,klinkhammer,kliewer,klever,kleber,klages,klaas,kizziar,kitchel,kishimoto,kirschenman,kirschenbaum,kinnick,kinn,kiner,kindla,kindall,kincaide,kilson,killins,kightlinger,kienzle,kiah,khim,ketcherside,kerl,kelsoe,kelker,keizer,keir,kawano,kawa,kaveney,kasparek,kaplowitz,kantrowitz,kant,kanoff,kano,kamalii,kalt,kaleta,kalbach,kalauli,kalata,kalas,kaigler,kachel,juran,jubb,jonker,jonke,jolivette,joles,joas,jividen,jeffus,jeanty,jarvi,jardon,janvier,janosko,janoski,janiszewski,janish,janek,iwanski,iuliano,irle,ingmire,imber,ijames,iiams,ihrig,ichikawa,hynum,hutzel,hutts,huskin,husak,hurndon,huntsinger,hulette,huitron,huguenin,hugg,hugee,huelskamp,huch,howen,hovanec,hoston,hostettler,horsfall,horodyski,holzhauer,hollimon,hollender,hogarth,hoffelmeyer,histand,hissem,hisel,hirayama,hinegardner,hinde,hinchcliffe,hiltbrand,hilsinger,hillstrom,hiley,hickenbottom,hickam,hibley,heying,hewson,hetland,hersch,herlong,herda,henzel,henshall,helson,helfen,heinbach,heikkila,heggs,hefferon,hebard,heathcote,hearl,heaberlin,hauth,hauschild,haughney,hauch,hattori,hasley,hartpence,harroun,harelson,hardgrove,hardel,hansbrough,handshoe,handly,haluska,hally,halling,halfhill,halferty,hakanson,haist,hairgrove,hahner,hagg,hafele,haaland,guttierez,gutknecht,gunnarson,gunlock,gummersheimer,gullatte,guity,guilmette,guhl,guenette,guardino,groshong,grober,gripp,grillot,grilli,greulich,gretzinger,greenwaldt,graven,grassman,granberg,graeser,graeff,graef,grabow,grabau,gotchy,goswick,gosa,gordineer,gorczyca,goodchild,golz,gollihue,goldwire,goldbach,goffredo,glassburn,glaeser,gillilan,gigante,giere,gieger,gidcumb,giarrusso,giannelli,gettle,gesualdi,geschke,gerwig,gervase,geoffrion,gentilcore,genther,gemes,gemberling,gelles,geitz,geeslin,gedney,gebauer,gawron,gavia,gautney,gaustad,gasmen,gargus,ganske,ganger,galvis,gallinger,gallichio,galletta,gaede,gadlin,gaby,gabrielsen,gaboriault,furlan,furgerson,fujioka,fugett,fuehrer,frint,frigon,frevert,frautschi,fraker,fradette,foulkes,forslund,forni,fontenette,fones,folz,folmer,follman,folkman,flourney,flickner,flemmings,fleischacker,flander,flament,fithian,fiorello,fiorelli,fioravanti,fieck,ficke,fiallos,fiacco,feuer,ferrington,fernholz,feria,fergurson,feick,febles,favila,faulkingham,fath,farnam,falter,fakhouri,fairhurst,fahs,estrello,essick,espree,esmond,eskelson,escue,escatel,erebia,epperley,epler,enyart,engelbert,enderson,emch,elisondo,elford,ekman,eick,eichmann,ehrich,ehlen,edwardson,edley,edghill,edel,eastes,easterbrooks,eagleson,eagen,eade,dyle,dutkiewicz,dunnagan,duncil,duling,drumgoole,droney,dreyfus,dragan,dowty,doscher,dornan,doremus,doogan,donaho,donahey,dombkowski,dolton,dolen,dobratz,diveley,dittemore,ditsch,disque,dishmon,disch,dirickson,dippolito,dimuccio,dilger,diefenderfer,dicola,diblasio,dibello,devan,dettmer,deschner,desbiens,derusha,denkins,demonbreun,demchak,delucchi,delprete,deloy,deliz,deline,delap,deiter,deignan,degiacomo,degaetano,defusco,deboard,debiase,deaville,deadwyler,davanzo,daughton,darter,danser,dandrade,dando,dampeer,dalziel,dalen,dain,dague,czekanski,cutwright,cutliff,curle,cuozzo,cunnington,cunnigham,cumings,crowston,crittle,crispell,crisostomo,crear,creach,craigue,crabbs,cozzi,cozza,coxe,cowsert,coviello,couse,coull,cottier,costagliola,corra,corpening,cormany,corless,corkern,conteh,conkey,conditt,conaty,colomb,collura,colledge,colins,colgate,coleson,colemon,coffland,coccia,clougherty,clewell,cleckley,cleaveland,clarno,civils,cillo,cifelli,ciesluk,christison,chowning,chouteau,choung,childres,cherrington,chenette,cheeves,cheairs,chaddock,cernoch,cerino,cazier,castel,casselberry,caserta,carvey,carris,carmant,cariello,cardarelli,caras,caracciolo,capitano,cantoni,cantave,cancio,campillo,callens,caldero,calamia,cahee,cahan,cahalan,cabanilla,cabal,bywater,bynes,byassee,busker,bushby,busack,burtis,burrola,buroker,burnias,burlock,burham,burak,bulla,buffin,buening,budney,buchannan,buchalter,brule,brugler,broxson,broun,brosh,brissey,brisby,brinlee,brinkmeyer,brimley,brickell,breth,breger,brees,brank,braker,bozak,bowlds,bowersock,bousman,boushie,botz,bordwell,bonkowski,bonine,bonifay,bonesteel,boldin,bohringer,bohlander,boecker,bocook,bocock,boblett,bobbett,boas,boarman,bleser,blazejewski,blaustein,blausey,blancarte,blaize,blackson,blacketer,blackard,bisch,birchett,billa,bilder,bierner,bienvenu,bielinski,bialas,biagini,beynon,beyl,bettini,betcher,bessent,beshara,besch,bernd,bergemann,bergeaux,berdan,bens,benedicto,bendall,beltron,beltram,bellville,beisch,behney,beechler,beckum,batzer,batte,bastida,bassette,basley,bartosh,bartolone,barraclough,barnick,barket,barkdoll,baringer,barella,barbian,barbati,bannan,balles,baldo,balasubramani,baig,bahn,bachmeier,babyak,baas,baars,ayuso,avinger,avella,ausbrooks,aull,augello,atkeson,atkerson,atherley,athan,assad,asebedo,arrison,armon,armfield,arkin,archambeau,antonellis,angotti,amorose,amini,amborn,amano,aluarez,allgaier,allegood,alen,aldama,aird,ahsing,ahmann,aguado,agostino,agostinelli,adwell,adsit,adelstein,actis,acierno,achee,abbs,abbitt,zwagerman,zuercher,zinno,zettler,zeff,zavalza,zaugg,zarzycki,zappulla,zanotti,zachman,zacher,yundt,yslas,younes,yontz,yglesias,yeske,yeargin,yauger,yamane,xang,wylam,wrobleski,wratchford,woodlee,wolsey,wolfinbarger,wohlenhaus,wittler,wittenmyer,witkop,wishman,wintz,winkelmann,windus,winborn,wims,wiltrout,willmott,williston,wilemon,wilbourne,wiedyk,widmann,wickland,wickes,wichert,whitsell,whisenand,whidby,wetz,westmeyer,wertheim,wernert,werle,werkheiser,weldin,weissenborn,weingard,weinfeld,weihl,weightman,weichel,wehrheim,wegrzyn,wegmann,waszak,wankum,walthour,waltermire,walstad,waldren,walbert,walawender,wahlund,wahlert,wahlers,wach,vuncannon,vredenburgh,vonk,vollmar,voisinet,vlahos,viscardi,vires,vipperman,violante,vidro,vessey,vesper,veron,vergari,verbeck,venturino,velastegui,vegter,varas,vanwey,vanvranken,vanvalkenbur,vanorsdale,vanoli,vanochten,vanier,vanevery,vane,vanduser,vandersteen,vandell,vandall,vallot,vallon,vallez,vallely,vadenais,uthe,usery,unga,ultsch,ullom,tyminski,twogood,tursi,turay,tungate,truxillo,trulock,trovato,troise,tripi,trinks,trimboli,trickel,trezise,trefry,treen,trebilcock,travieso,trachtenberg,touhey,tougas,tortorella,tormey,torelli,torborg,toran,tomek,tomassi,tollerson,tolden,toda,tobon,tjelmeland,titmus,tilbury,tietje,thurner,thum,thrope,thornbrough,thibaudeau,thackeray,tesoro,territo,ternes,teich,tecson,teater,teagarden,tatsch,tarallo,tapanes,tanberg,tamm,sylvis,swenor,swedlund,sutfin,sura,sundt,sundin,summerson,sumatzkuku,sultemeier,sulivan,suggitt,suermann,sturkie,sturgess,stumph,stuemke,struckhoff,strose,stroder,stricklen,strick,streib,strei,strawther,stratis,strahm,stortz,storrer,storino,stohler,stohl,stockel,stinnette,stile,stieber,steffenhagen,stefanowicz,steever,steagall,statum,stapley,stanish,standiford,standen,stamos,stahlecker,stadtler,spratley,spraker,sposito,spickard,spehar,spees,spearing,spangle,spallone,soulard,sora,sopko,sood,sonnen,solly,solesbee,soldano,sobey,sobczyk,snedegar,sneddon,smolinski,smolik,slota,slavick,skorupski,skolnik,skirvin,skeels,skains,skahan,skaar,siwiec,siverly,siver,sivak,sirk,sinton,sinor,sincell,silberstein,sieminski,sidelinger,shurman,shunnarah,shirer,shidler,sherlin,shepperson,shemanski,sharum,shartrand,shapard,shanafelt,shamp,shader,shackelton,seyer,seroka,sernas,seright,serano,sengupta,selinger,seith,seidler,seehusen,seefried,scovell,scorzelli,sconiers,schwind,schwichtenber,schwerin,schwenke,schwaderer,schussler,schuneman,schumpert,schultheiss,schroll,schroepfer,schroeden,schrimpf,schook,schoof,schomburg,schoenfeldt,schoener,schnoor,schmick,schlereth,schindele,schildt,schildknecht,schemmel,scharfenberg,schanno,schane,schaer,schad,scearce,scardino,sawka,sawinski,savoca,savery,saults,sarpy,saris,sardinha,sarafin,sankar,sanjurjo,sanderfer,sanagustin,samudio,sammartino,samas,salz,salmen,salkeld,salamon,sakurai,sakoda,safley,sada,sachse,ryden,ryback,russow,russey,ruprecht,rumple,ruffini,rudzinski,rudel,rudden,rovero,routledge,roussin,rousse,rouser,rougeau,rosica,romey,romaniello,rolfs,rogoff,rogne,rodriquz,rodrequez,rodin,rocray,rocke,riviere,rivette,riske,risenhoover,rindfleisch,rinaudo,rimbey,riha,righi,ridner,ridling,riden,rhue,reyome,reynoldson,reusch,rensing,rensch,rennels,renderos,reininger,reiners,reigel,rehmer,regier,reff,redlin,recchia,reaume,reagor,rawe,rattigan,raska,rashed,ranta,ranft,randlett,ramiez,ramella,rallis,rajan,raisbeck,raimondo,raible,ragone,rackliffe,quirino,quiring,quero,quaife,pyke,purugganan,pursifull,purkett,purdon,pulos,puccia,provance,propper,preis,prehn,prata,prasek,pranger,pradier,portor,portley,porte,popiel,popescu,pomales,polowy,pollett,politis,polit,poley,pohler,poggio,podolak,poag,plymel,ploeger,planty,piskura,pirrone,pirro,piroso,pinsky,pilant,pickerill,piccolomini,picart,piascik,phann,petruzzelli,petosa,persson,perretta,perkowski,perilli,percifield,perault,peppel,pember,pelotte,pelcher,peixoto,pehl,peatross,pearlstein,peacher,payden,paya,pawelek,pavey,pauda,pathak,parrillo,parness,parlee,paoli,pannebaker,palomar,palo,palmberg,paganelli,paffrath,padovano,padden,pachucki,ovando,othman,osowski,osler,osika,orsburn,orlowsky,oregel,oppelt,opfer,opdyke,onell,olivos,okumura,okoro,ogas,oelschlaeger,oder,ocanas,obrion,obarr,oare,nyhus,nyenhuis,nunnelley,nunamaker,nuckels,noyd,nowlan,novakovich,noteboom,norviel,nortz,norment,norland,nolt,nolie,nixson,nitka,nissley,nishiyama,niland,niewiadomski,niemeier,nieland,nickey,nicholsen,neugent,neto,nerren,neikirk,neigh,nedrow,neave,nazaire,navaro,navalta,nasworthy,nasif,nalepa,nakao,nakai,nadolny,myklebust,mussel,murthy,muratore,murat,mundie,mulverhill,muilenburg,muetzel,mudra,mudgett,mrozinski,moura,mottinger,morson,moretto,morentin,mordan,mooreland,mooers,monts,montone,montondo,montiero,monie,monat,monares,mollo,mollet,molacek,mokry,mohrmann,mohabir,mogavero,moes,moceri,miyoshi,mitzner,misra,mirr,minish,minge,minckler,milroy,mille,mileski,milanesi,miko,mihok,mihalik,mieczkowski,messerli,meskill,mesenbrink,merton,merryweather,merkl,menser,menner,menk,menden,menapace,melbourne,mekus,meinzer,meers,mctigue,mcquitty,mcpheron,mcmurdie,mcleary,mclafferty,mckinzy,mckibbin,mckethan,mcintee,mcgurl,mceachran,mcdowall,mcdermitt,mccuaig,mccreedy,mccoskey,mcclosky,mcclintick,mccleese,mccanless,mazzucco,mazzocco,mazurkiewicz,mazariego,mayhorn,maxcy,mavity,mauzey,maulding,matuszewski,mattsson,mattke,matsushita,matsuno,matsko,matkin,mathur,masterman,massett,massart,massari,mashni,martella,marren,margotta,marder,marczak,maran,maradiaga,manwarren,manter,mantelli,manso,mangone,manfredonia,malden,malboeuf,malanga,makara,maison,maisano,mairs,mailhiot,magri,madron,madole,mackall,macduff,macartney,lynds,lusane,luffman,louth,loughmiller,lougheed,lotspeich,lorenzi,loosli,longe,longanecker,lonero,lohmeyer,loeza,lobstein,lobner,lober,littman,litalien,lippe,lints,lijewski,ligas,liebert,liebermann,liberati,lezcano,levinthal,lessor,lesieur,lenning,lengel,lempke,lemp,lemar,leitzke,leinweber,legrone,lege,leder,lawnicki,lauth,laun,laughary,lassley,lashway,larrivee,largen,lare,lanouette,lanno,langille,langen,lamonte,lalin,laible,lafratta,laforte,lacuesta,lacer,labore,laboe,labeau,kwasniewski,kunselman,kuhr,kuchler,krugman,kruckenberg,krotzer,kroemer,krist,krigbaum,kreke,kreisman,kreisler,kreft,krasnow,kras,krag,kouyate,kough,kotz,kostura,korner,kornblum,korczynski,koppa,kopczyk,konz,komorowski,kollen,kolander,koepnick,koehne,kochis,knoch,knippers,knaebel,klipp,klinedinst,klimczyk,klier,klement,klaphake,kisler,kinzie,kines,kindley,kimple,kimm,kimbel,kilker,kilborn,kibbey,khong,ketchie,kerbow,kennemore,kennebeck,kenneally,kenndy,kenmore,kemnitz,kemler,kemery,kelnhofer,kellstrom,kellis,kellams,keiter,keirstead,keeny,keelin,keefauver,keams,kautzman,kaus,katayama,kasson,kassim,kasparian,kase,karwoski,kapuscinski,kaneko,kamerling,kamada,kalka,kalar,kakacek,kaczmarczyk,jurica,junes,journell,jolliffe,johnsey,jindra,jimenz,jette,jesperson,jerido,jenrette,jencks,jech,jayroe,jayo,javens,jaskot,jaros,jaquet,janowiak,jaegers,jackel,izumi,irelan,inzunza,imoto,imme,iglehart,iannone,iannacone,huyler,hussaini,hurlock,hurlbutt,huprich,humphry,hulslander,huelsman,hudelson,hudecek,hsia,hreha,hoyland,howk,housholder,housden,houff,horkey,honan,homme,holtzberg,hollyfield,hollings,hollenbaugh,hokenson,hogrefe,hogland,hoel,hodgkin,hochhalter,hjelle,hittson,hinderman,hinchliffe,hime,hilyer,hilby,hibshman,heydt,hewell,heward,hetu,hestand,heslep,herridge,herner,hernande,hermandez,hermance,herbold,heon,henthorne,henion,henao,heming,helmkamp,hellberg,heidgerken,heichel,hehl,hegedus,heckathorne,hearron,haymer,haycook,havlicek,hausladen,haseman,hartsook,hartog,harns,harne,harmann,haren,hanserd,hanners,hanekamp,hamra,hamley,hamelin,hamblet,hakimi,hagle,hagin,haehn,haeck,hackleman,haacke,gulan,guirand,guiles,guggemos,guerrieri,guerreiro,guereca,gudiel,guccione,gubler,gruenwald,gritz,grieser,grewe,grenon,gregersen,grefe,grech,grecco,gravette,grassia,granholm,graner,grandi,grahan,gradowski,gradney,graczyk,gouthier,gottschall,goracke,gootee,goodknight,goodine,gonzalea,gonterman,gonalez,gomm,goleman,goldtooth,goldstone,goldey,golan,goen,goeller,goel,goecke,godek,goan,glunz,gloyd,glodowski,glinski,glawe,girod,girdley,gindi,gillings,gildner,giger,giesbrecht,gierke,gier,giboney,giaquinto,giannakopoulo,giaimo,giaccio,giacalone,gessel,gerould,gerlt,gerhold,geralds,genson,genereux,gellatly,geigel,gehrig,gehle,geerdes,geagan,gawel,gavina,gauss,gatwood,gathman,gaster,garske,garratt,garms,garis,gansburg,gammell,gambale,gamba,galimore,gadway,gadoury,furrer,furino,fullard,fukui,fryou,friesner,friedli,friedl,friedberg,freyermuth,fremin,fredell,fraze,franken,foth,fote,fortini,fornea,formanek,forker,forgette,folan,foister,foglesong,flinck,flewellen,flaten,flaig,fitgerald,fischels,firman,finstad,finkelman,finister,fina,fetterhoff,ferriter,ferch,fennessy,feltus,feltes,feinman,farve,farry,farrall,farag,falzarano,falck,falanga,fakhoury,fairbrother,fagley,faggins,facteau,ewer,ewbank,evola,evener,eustis,estwick,estel,essa,espinola,escutia,eschmann,erpelding,ernsberger,erling,entz,engelhart,enbody,emick,elsinger,ellinwood,ellingsen,ellicott,elkind,eisinger,eisenbeisz,eischen,eimer,eigner,eichhorst,ehmke,egleston,eggett,efurd,edgeworth,eckels,ebey,eberling,eagleton,dwiggins,dweck,dunnings,dunnavant,dumler,duman,dugue,duerksen,dudeck,dreisbach,drawdy,drawbaugh,draine,draggoo,dowse,dovel,doughton,douds,doubrava,dort,dorshorst,dornier,doolen,donavan,dominik,domingez,dolder,dold,dobies,diskin,disano,dirden,diponio,dipirro,dimock,diltz,dillabough,diley,dikes,digges,digerolamo,diel,dicharry,dicecco,dibartolomeo,diamant,dewire,devone,dessecker,dertinger,derousselle,derk,depauw,depalo,denherder,demeyer,demetro,demastus,delvillar,deloye,delosrios,delgreco,delarge,delangel,dejongh,deitsch,degiorgio,degidio,defreese,defoe,decambra,debenedetto,deaderick,daza,dauzat,daughenbaugh,dato,dass,darwish,dantuono,danton,dammeyer,daloia,daleo,dagg,dacey,curts,cuny,cunneen,culverhouse,cucinella,cubit,crumm,crudo,crowford,crout,crotteau,crossfield,crooke,crom,critz,cristaldi,crickmore,cribbin,cremeens,crayne,cradduck,couvertier,cottam,cossio,correy,cordrey,coplon,copass,coone,coody,contois,consla,connelley,connard,congleton,condry,coltey,colindres,colgrove,colfer,colasurdo,cochell,cobbin,clouthier,closs,cloonan,clizbe,clennon,clayburn,claybourn,clausell,clasby,clagett,ciskowski,cirrincione,cinque,cinelli,cimaglia,ciaburri,christiani,christeson,chladek,chizmar,chinnici,chiarella,chevrier,cheves,chernow,cheong,chelton,chanin,cham,chaligoj,celestino,cayce,cavey,cavaretta,caughron,catmull,catapano,cashaw,carullo,carualho,carthon,cartelli,carruba,carrere,carolus,carlstrom,carfora,carello,carbary,caplette,cannell,cancilla,campell,cammarota,camilo,camejo,camarata,caisse,cacioppo,cabbagestalk,cabatu,cabanas,byles,buxbaum,butland,burrington,burnsed,burningham,burlingham,burgy,buitrago,bueti,buehring,buday,bucknell,buchbinder,bucey,bruster,brunston,brouillet,brosious,broomes,brodin,broddy,brochard,britsch,britcher,brierley,brezina,bressi,bressette,breslow,brenden,breier,brei,braymer,brasuell,branscomb,branin,brandley,brahler,bracht,bracamontes,brabson,boyne,boxell,bowery,bovard,boutelle,boulette,bottini,botkins,bosen,boscia,boscarino,borich,boreman,bordoy,bordley,bordenet,boquet,boocks,bolner,boissy,boilard,bohnen,bohall,boening,boccia,boccella,bobe,blyth,biviano,bitto,bisel,binstock,bines,billiter,bigsby,bighorse,bielawski,bickmore,bettin,bettenhausen,besson,beseau,berton,berroa,berntson,bernas,berisford,berhow,bergsma,benyo,benyard,bente,bennion,benko,belsky,bellavance,belasco,belardo,beidler,behring,begnaud,bega,befort,beek,bedore,beddard,becknell,beardslee,beardall,beagan,bayly,bauza,bautz,bausman,baumler,batterson,battenfield,bassford,basse,basemore,baruch,bartholf,barman,baray,barabas,banghart,banez,balsam,ballester,ballagh,baldock,bagnoli,bagheri,bacus,bacho,baccam,axson,averhart,aver,austill,auberry,athans,atcitty,atay,astarita,ascolese,artzer,arrasmith,argenbright,aresco,aranjo,appleyard,appenzeller,apilado,antonetti,antis,annas,angwin,andris,andries,andreozzi,ando,andis,anderegg,amyot,aminov,amelung,amelio,amason,alviar,allendorf,aldredge,alcivar,alaya,alapai,airington,aina,ailor,ahrns,ahmadi,agresta,affolter,aeschlimann,adney,aderhold,adachi,ackiss,aben,abdelhamid,abar,aase,zorilla,zordan,zollman,zoch,zipfel,zimmerle,zike,ziel,zens,zelada,zaman,zahner,zadora,zachar,zaborowski,zabinski,yzquierdo,yoshizawa,yori,yielding,yerton,yehl,yeargain,yeakley,yamaoka,yagle,yablonski,wynia,wyne,wyers,wrzesinski,wrye,wriston,woolums,woolen,woodlock,woodle,wonser,wombacher,wollschlager,wollen,wolfley,wolfer,wisse,wisell,wirsing,winstanley,winsley,winiecki,winiarski,winge,winesett,windell,winberry,willyard,willemsen,wilkosz,wilensky,wikle,wiford,wienke,wieneke,wiederhold,wiebold,widick,wickenhauser,whitrock,whisner,whinery,wherley,whedbee,wheadon,whary,wessling,wessells,wenninger,wendroth,wende,wellard,weirick,weinkauf,wehrman,weech,weathersbee,warncke,wardrip,walstrom,walkowski,walcutt,waight,wagman,waggett,wadford,vowles,vormwald,vondran,vohs,vitt,vitalo,viser,vinas,villena,villaneuva,villafranca,villaflor,vilain,vicory,viana,vian,verucchi,verra,venzke,venske,veley,veile,veeder,vaske,vasconez,vargason,varble,vanwert,vantol,vanscooter,vanmetre,vanmaanen,vanhise,vaneaton,vandyk,vandriel,vandorp,vandewater,vandervelden,vanderstelt,vanderhoef,vanderbeck,vanbibber,vanalstine,vanacore,valdespino,vaill,vailes,vagliardo,ursini,urrea,urive,uriegas,umphress,ucci,uballe,tynon,twiner,tutton,tudela,tuazon,troisi,tripplett,trias,trescott,treichel,tredo,tranter,tozer,toxey,tortorici,tornow,topolski,topia,topel,topalian,tonne,tondre,tola,toepke,tisdell,tiscareno,thornborrow,thomison,thilges,theuret,therien,thagard,thacher,texter,terzo,tenpenny,tempesta,teetz,teaff,tavella,taussig,tatton,tasler,tarrence,tardie,tarazon,tantillo,tanney,tankson,tangen,tamburo,tabone,szilagyi,syphers,swistak,swiatkowski,sweigert,swayzer,swapp,svehla,sutphen,sutch,susa,surma,surls,sundermeyer,sundeen,sulek,sughrue,sudol,sturms,stupar,stum,stuckman,strole,strohman,streed,strebeck,strausser,strassel,stpaul,storts,storr,stommes,stmary,stjulien,stika,stiggers,sthill,stevick,sterman,stepanek,stemler,stelman,stelmack,steinkamp,steinbock,stcroix,stcharles,staudinger,stanly,stallsworth,stalley,srock,spritzer,spracklin,spinuzzi,spidell,speyrer,sperbeck,spendlove,speckman,spargur,spangenberg,spaid,sowle,soulier,sotolongo,sostre,sorey,sonier,somogyi,somera,soldo,soderholm,snoots,snooks,snoke,snodderly,snee,smithhart,smillie,smay,smallman,sliwinski,slentz,sledd,slager,skogen,skog,skarda,skalicky,siwek,sitterson,sisti,sissel,sinopoli,similton,simila,simenson,silvertooth,silos,siggins,sieler,siburt,sianez,shurley,shular,shuecraft,shreeves,shollenberger,shoen,shishido,shipps,shipes,shinall,sherfield,shawe,sharrett,sharrard,shankman,sessum,serviss,servello,serice,serda,semler,semenza,selmon,sellen,seley,seidner,seib,sehgal,seelbach,sedivy,sebren,sebo,seanez,seagroves,seagren,seabron,schwertner,schwegel,schwarzer,schrunk,schriefer,schreder,schrank,schopp,schonfeld,schoenwetter,schnall,schnackenberg,schnack,schmutzler,schmierer,schmidgall,schlup,schloemer,schlitt,schermann,scherff,schellenberg,schain,schaedler,schabel,scaccia,saye,saurez,sasseen,sasnett,sarti,sarra,sarber,santoy,santeramo,sansoucy,sando,sandles,sandau,samra,samaha,salizar,salam,saindon,sagaser,saeteun,sadusky,sackman,sabater,saas,ruthven,ruszkowski,rusche,rumpf,ruhter,ruhenkamp,rufo,rudge,ruddle,rowlee,rowand,routhier,rougeot,rotramel,rotan,rosten,rosillo,rookard,roode,rongstad,rollie,roider,roffe,roettger,rodick,rochez,rochat,rivkin,rivadeneira,riston,risso,rinderknecht,riis,riggsbee,rieker,riegle,riedy,richwine,richmon,ricciuti,riccardo,ricardson,rhew,revier,remsberg,remiszewski,rembold,rella,reinken,reiland,reidel,reichart,rehak,redway,rednour,redifer,redgate,redenbaugh,redburn,readus,raybuck,rauhuff,rauda,ratte,rathje,rappley,rands,ramseyer,ramseur,ramsdale,ramo,ramariz,raitz,raisch,rainone,rahr,ragasa,rafalski,radunz,quenzer,queja,queenan,pyun,putzier,puskas,purrington,puri,punt,pullar,pruse,pring,primeau,prevette,preuett,prestage,pownell,pownall,potthoff,potratz,poth,poter,posthuma,posen,porritt,popkin,poormon,polidoro,polcyn,pokora,poer,pluviose,plock,pleva,placke,pioli,pingleton,pinchback,pieretti,piccone,piatkowski,philley,phibbs,phay,phagan,pfund,peyer,pettersen,petter,petrucelli,petropoulos,petras,petix,pester,pepperman,pennick,penado,pelot,pelis,peeden,pechon,peal,pazmino,patchin,pasierb,parran,parilla,pardy,parcells,paragas,paradee,papin,panko,pangrazio,pangelinan,pandya,pancheri,panas,palmiter,pallares,palinkas,palek,pagliaro,packham,pacitti,ozier,overbaugh,oursler,ouimette,otteson,otsuka,othon,osmundson,oroz,orgill,ordeneaux,orama,oppy,opheim,onkst,oltmanns,olstad,olofson,ollivier,olejniczak,okura,okuna,ohrt,oharra,oguendo,ogier,offermann,oetzel,oechsle,odoherty,oddi,ockerman,occhiogrosso,obryon,obremski,nyreen,nylund,nylen,nyholm,nuon,nuanes,norrick,noris,nordell,norbury,nooner,nomura,nole,nolden,nofsinger,nocito,niedbala,niebergall,nicolini,nevils,neuburger,nemerofsky,nemecek,nazareno,nastri,nast,nagorski,myre,muzzey,mutschler,muther,musumeci,muranaka,muramoto,murad,murach,muns,munno,muncrief,mugrage,muecke,mozer,moyet,mowles,mottern,mosman,mosconi,morine,morge,moravec,morad,mones,moncur,monarez,molzahn,moglia,moesch,mody,modisett,mitnick,mithcell,mitchiner,mistry,misercola,mirabile,minvielle,mino,minkler,minifield,minichiello,mindell,minasian,milteer,millwee,millstein,millien,mikrut,mihaly,miggins,michard,mezo,metzner,mesquita,merriwether,merk,merfeld,mercik,mercadante,menna,mendizabal,mender,melusky,melquist,mellado,meler,melendes,mekeel,meiggs,megginson,meck,mcwherter,mcwayne,mcsparren,mcrea,mcneff,mcnease,mcmurrin,mckeag,mchughes,mcguiness,mcgilton,mcelreath,mcelhone,mcelhenney,mceldowney,mccurtain,mccure,mccosker,mccory,mccormic,mccline,mccleave,mcclatchey,mccarney,mccanse,mcallen,mazzie,mazin,mazanec,mayette,mautz,maun,mattas,mathurin,mathiesen,massmann,masri,masias,mascolo,mascetti,mascagni,marzolf,maruska,martain,marszalek,marolf,marmas,marlor,markwood,marinero,marier,marich,marcom,marciante,marchman,marchio,marbach,manzone,mantey,mannina,manhardt,manaois,malmgren,mallonee,mallin,mallary,malette,makinson,makins,makarewicz,mainwaring,maiava,magro,magouyrk,magett,maeder,madyun,maduena,maden,madeira,mackins,mackel,macinnes,macia,macgowan,lyssy,lyerly,lyalls,lutter,lunney,luksa,ludeman,lucidi,lucci,lowden,lovier,loughridge,losch,lorson,lorenzano,lorden,lorber,lopardo,loosier,loomer,longsdorf,longchamps,loncar,loker,logwood,loeffelholz,lockmiller,livoti,linford,linenberger,lindloff,lindenbaum,limoges,liley,lighthill,lightbourne,lieske,leza,levandoski,leuck,lepere,leonhart,lenon,lemma,lemler,leising,leinonen,lehtinen,lehan,leetch,leeming,ledyard,ledwith,ledingham,leclere,leck,lebert,leandry,lazzell,layo,laye,laxen,lawther,lawerance,lavoy,lavertu,laverde,latouche,latner,lathen,laskin,lashbaugh,lascala,larroque,larick,laraia,laplume,lanzilotta,lannom,landrigan,landolt,landess,lamkins,lalla,lalk,lakeman,lakatos,laib,lahay,lagrave,lagerquist,lafoy,lafleche,lader,labrada,kwiecinski,kutner,kunshier,kulakowski,kujak,kuehnle,kubisiak,krzyminski,krugh,krois,kritikos,krill,kriener,krewson,kretzschmar,kretz,kresse,kreiter,kreischer,krebel,krans,kraling,krahenbuhl,kouns,kotson,kossow,kopriva,konkle,kolter,kolk,kolich,kohner,koeppen,koenigs,kock,kochanski,kobus,knowling,knouff,knoerzer,knippel,kloberdanz,kleinert,klarich,klaassen,kisamore,kirn,kiraly,kipps,kinson,kinneman,kington,kine,kimbriel,kille,kibodeaux,khamvongsa,keylon,kever,keser,kertz,kercheval,kendrix,kendle,kempt,kemple,keesey,keatley,kazmierski,kazda,kazarian,kawashima,katsch,kasun,kassner,kassem,kasperski,kasinger,kaschak,karels,kantola,kana,kamai,kalthoff,kalla,kalani,kahrs,kahanek,kacher,jurasek,jungels,jukes,juelfs,judice,juda,josselyn,jonsson,jonak,joens,jobson,jegede,jeanjacques,jaworowski,jaspers,jannsen,janner,jankowiak,jank,janiak,jackowski,jacklin,jabbour,iyer,iveson,isner,iniquez,ingwerson,ingber,imbrogno,ille,ikehara,iannelli,hyson,huxford,huseth,hurns,hurney,hurles,hunnings,humbarger,hulan,huisinga,hughett,hughen,hudler,hubiak,hricko,hoversten,hottel,hosaka,horsch,hormann,hordge,honzell,homburg,holten,holme,hollopeter,hollinsworth,hollibaugh,holberg,hohmann,hoenstine,hodell,hodde,hiter,hirko,hinzmann,hinrichsen,hinger,hincks,hilz,hilborn,highley,higashi,hieatt,hicken,heverly,hesch,hervert,hershkowitz,herreras,hermanns,herget,henriguez,hennon,hengel,helmlinger,helmig,heldman,heizer,heinitz,heifner,heidorn,heglin,heffler,hebner,heathman,heaslip,hazlip,haymes,hayase,hawver,havermale,havas,hauber,hashim,hasenauer,harvel,hartney,hartel,harsha,harpine,harkrider,harkin,harer,harclerode,hanzely,hanni,hannagan,hampel,hammerschmidt,hamar,hallums,hallin,hainline,haid,haggart,hafen,haer,hadiaris,hadad,hackford,habeeb,guymon,guttery,gunnett,guillette,guiliano,guilbeaux,guiher,guignard,guerry,gude,gucman,guadian,grzybowski,grzelak,grussendorf,grumet,gruenhagen,grudzinski,grossmann,grof,grisso,grisanti,griffitts,griesbaum,grella,gregston,graveline,grandusky,grandinetti,gramm,goynes,gowing,goudie,gosman,gort,gorsline,goralski,goodstein,goodroe,goodlin,goodheart,goodhart,gonzelez,gonthier,goldsworthy,goldade,goettel,goerlitz,goepfert,goehner,goben,gobeille,gliem,gleich,glasson,glascoe,gladwell,giusto,girdner,gipple,giller,giesing,giammona,ghormley,germon,geringer,gergely,gerberich,gepner,gens,genier,gemme,gelsinger,geigle,gebbia,gayner,gavitt,gatrell,gastineau,gasiewski,gascoigne,garro,garin,ganong,ganga,galpin,gallus,galizia,gajda,gahm,gagen,gaffigan,furno,furnia,furgason,fronczak,frishman,friess,frierdich,freestone,franta,frankovich,fors,forres,forrer,florido,flis,flicek,flens,flegal,finkler,finkenbinder,finefrock,filpo,filion,fierman,fieldman,ferreyra,fernendez,fergeson,fera,fencil,feith,feight,federici,federer,fechtner,feagan,fausnaugh,faubert,fata,farman,farinella,fantauzzi,fanara,falso,falardeau,fagnani,fabro,excell,ewton,evey,everetts,evarts,etherington,estremera,estis,estabrooks,essig,esplin,espenschied,ernzen,eppes,eppard,entwisle,emison,elison,elguezabal,eledge,elbaz,eisler,eiden,eichorst,eichert,egle,eggler,eggimann,edey,eckerman,echelberger,ebbs,ebanks,dziak,dyche,dyce,dusch,duross,durley,durate,dunsworth,dumke,dulek,duhl,duggin,dufford,dudziak,ducrepin,dubree,dubre,dubie,dubas,droste,drisko,drewniak,doxtator,dowtin,downum,doubet,dottle,dosier,doshi,dorst,dorset,dornbusch,donze,donica,domanski,domagala,dohse,doerner,doerfler,doble,dobkins,dilts,digiulio,digaetano,dietzel,diddle,dickel,dezarn,devoy,devoss,devilla,devere,deters,desvergnes,deshay,desena,deross,depedro,densley,demorest,demore,demora,demirjian,demerchant,dematteis,demateo,delgardo,delfavero,delaurentis,delamar,delacy,deitrich,deisher,degracia,degraaf,defries,defilippis,decoursey,debruin,debiasi,debar,dearden,dealy,dayhoff,davino,darvin,darrisaw,darbyshire,daquino,daprile,danh,danahy,dalsanto,dallavalle,dagel,dadamo,dacy,dacunha,dabadie,czyz,cutsinger,curney,cuppernell,cunliffe,cumby,cullop,cullinane,cugini,cudmore,cuda,cucuzza,cuch,crumby,crouser,critton,critchley,cremona,cremar,crehan,creary,crasco,crall,crabbe,cozzolino,cozier,coyner,couvillier,counterman,coulthard,coudriet,cottom,corzo,cornutt,corkran,corda,copelin,coonan,consolo,conrow,conran,connerton,conkwright,condren,comly,comisky,colli,collet,colello,colbeck,colarusso,coiner,cohron,codere,cobia,clure,clowser,clingenpeel,clenney,clendaniel,clemenson,cleere,cleckler,claybaugh,clason,cirullo,ciraulo,ciolek,ciampi,christopherse,chovanec,chopra,chol,chiem,chestnutt,chesterman,chernoff,chermak,chelette,checketts,charpia,charo,chargois,champman,challender,chafins,cerruto,celi,cazenave,cavaluzzi,cauthon,caudy,catino,catano,cassaro,cassarino,carrano,carozza,carow,carmickle,carlyon,carlew,cardena,caputi,capley,capalbo,canseco,candella,campton,camposano,calleros,calleja,callegari,calica,calarco,calais,caillier,cahue,cadenhead,cadenas,cabera,buzzo,busto,bussmann,busenbark,burzynski,bursley,bursell,burle,burkleo,burkette,burczyk,bullett,buikema,buenaventura,buege,buechel,budreau,budhram,bucknam,brye,brushwood,brumbalow,brulotte,bruington,bruderer,brougher,bromfield,broege,brodhead,brocklesby,broadie,brizuela,britz,brisendine,brilla,briggeman,brierton,bridgeford,breyfogle,brevig,breuninger,bresse,bresette,brelsford,breitbach,brayley,braund,branscom,brandner,brahm,braboy,brabble,bozman,boyte,boynes,boyken,bowell,bowan,boutet,bouse,boulet,boule,bottcher,bosquez,borrell,boria,bordes,borchard,bonson,bonino,bonas,bonamico,bolstad,bolser,bollis,bolich,bolf,boker,boileau,bohac,bogucki,bogren,boeger,bodziony,bodo,bodley,boback,blyther,blenker,blazina,blase,blamer,blacknall,blackmond,bitz,biser,biscardi,binz,bilton,billotte,billafuerte,bigford,biegler,bibber,bhandari,beyersdorf,bevelle,bettendorf,bessard,bertsche,berne,berlinger,berish,beranek,bentson,bentsen,benskin,benoy,benoist,benitz,belongia,belmore,belka,beitzel,beiter,beitel,behrns,becka,beaudion,beary,beare,beames,beabout,beaber,bazzano,bazinet,baucum,batrez,baswell,bastos,bascomb,bartha,barstad,barrilleaux,barretto,barresi,barona,barkhurst,barke,bardales,barczak,barca,barash,banfill,balonek,balmes,balko,balestrieri,baldino,baldelli,baken,baiza,bahner,baek,badour,badley,badia,backmon,bacich,bacca,ayscue,aynes,ausiello,auringer,auiles,aspinwall,askwith,artiga,arroliga,arns,arman,arellanes,aracena,antwine,antuna,anselmi,annen,angelino,angeli,angarola,andrae,amodio,ameen,alwine,alverio,altro,altobello,altemus,alquicira,allphin,allemand,allam,alessio,akpan,akerman,aiona,agyeman,agredano,adamik,adamczak,acrey,acevado,abreo,abrahamsen,abild,zwicker,zweig,zuvich,zumpano,zuluaga,zubek,zornes,zoglmann,ziminski,zimbelman,zhanel,zenor,zechman,zauner,zamarron,zaffino,yusuf,ytuarte,yett,yerkovich,yelder,yasuda,yapp,yaden,yackley,yaccarino,wytch,wyre,wussow,worthing,wormwood,wormack,wordell,woodroof,woodington,woodhams,wooddell,wollner,wojtkowski,wojcicki,wogan,wlodarczyk,wixted,withington,withem,wisler,wirick,winterhalter,winski,winne,winemiller,wimett,wiltfong,willibrand,willes,wilkos,wilbon,wiktor,wiggers,wigg,wiegmann,wickliff,wiberg,whittler,whittenton,whitling,whitledge,whitherspoon,whiters,whitecotton,whitebird,wheary,wetherill,westmark,westaby,wertenberger,wentland,wenstrom,wenker,wellen,weier,wegleitner,wedekind,wawers,wassel,warehime,wandersee,waltmon,waltersheid,walbridge,wakely,wakeham,wajda,waithe,waidelich,wahler,wahington,wagster,wadel,vuyovich,vuolo,vulich,vukovich,volmer,vollrath,vollbrecht,vogelgesang,voeller,vlach,vivar,vitullo,vitanza,visker,visalli,viray,vinning,viniard,villapando,villaman,vier,viar,viall,verstraete,vermilya,verdon,venn,velten,velis,vanoven,vanorder,vanlue,vanheel,vanderwoude,vanderheide,vandenheuvel,vandenbos,vandeberg,vandal,vanblarcom,vanaken,vanacker,vallian,valine,valent,vaine,vaile,vadner,uttech,urioste,urbanik,unrath,unnasch,underkofler,uehara,tyrer,tyburski,twaddle,turntine,tunis,tullock,tropp,troilo,tritsch,triola,trigo,tribou,tribley,trethewey,tress,trela,treharne,trefethen,trayler,trax,traut,tranel,trager,traczyk,towsley,torrecillas,tornatore,tork,torivio,toriello,tooles,tomme,tolosa,tolen,toca,titterington,tipsword,tinklenberg,tigney,tigert,thygerson,thurn,thur,thorstad,thornberg,thoresen,thomaston,tholen,thicke,theiler,thebeau,theaux,thaker,tewani,teufel,tetley,terrebonne,terrano,terpening,tela,teig,teichert,tegethoff,teele,tatar,tashjian,tarte,tanton,tanimoto,tamimi,tamas,talman,taal,szydlowski,szostak,swoyer,swerdlow,sweeden,sweda,swanke,swander,suyama,suriano,suri,surdam,suprenant,sundet,summerton,sult,suleiman,suffridge,suby,stych,studeny,strupp,struckman,strief,strictland,stremcha,strehl,stramel,stoy,stoutamire,storozuk,stordahl,stopher,stolley,stolfi,stoeger,stockhausen,stjulian,stivanson,stinton,stinchfield,stigler,stieglitz,stgermaine,steuer,steuber,steuart,stepter,stepnowski,stepanian,steimer,stefanelli,stebner,stears,steans,stayner,staubin,statz,stasik,starn,starmer,stargel,stanzione,stankovich,stamour,staib,stadelman,stadel,stachura,squadrito,springstead,spragg,spigelmyer,spieler,spaur,sovocool,soundara,soulia,souffrant,sorce,sonkin,sodhi,soble,sniffen,smouse,smittle,smithee,smedick,slowinski,slovacek,slominski,skowronek,skokan,skanes,sivertson,sinyard,sinka,sinard,simonin,simonian,simmions,silcott,silberg,siefken,siddon,shuttlesworth,shubin,shubeck,shiro,shiraki,shipper,shina,shilt,shikles,shideler,shenton,shelvey,shellito,shelhorse,shawcroft,shatto,shanholtzer,shamonsky,shadden,seymer,seyfarth,setlock,serratos,serr,sepulueda,senay,semmel,semans,selvig,selkirk,selk,seligson,seldin,seiple,seiersen,seidling,seidensticker,secker,searson,scordo,scollard,scoggan,scobee,sciandra,scialdone,schwimmer,schwieger,schweer,schwanz,schutzenhofer,schuetze,schrodt,schriever,schriber,schremp,schrecongost,schraeder,schonberg,scholtz,scholle,schoettle,schoenemann,schoene,schnitker,schmuhl,schmith,schlotterbeck,schleppenbach,schlee,schickel,schibi,schein,scheide,scheibe,scheib,schaumberg,schardein,schaalma,scantlin,scantlebury,sayle,sausedo,saurer,sassone,sarracino,saric,sanz,santarpia,santano,santaniello,sangha,sandvik,sandoral,sandobal,sandercock,sanantonio,salviejo,salsberry,salois,salazer,sagon,saglibene,sagel,sagal,saetern,saefong,sadiq,sabori,saballos,rygiel,rushlow,runco,rulli,ruller,ruffcorn,ruess,ruebush,rudlong,rudin,rudgers,rudesill,ruderman,rucki,rucinski,rubner,rubinson,rubiano,roznowski,rozanski,rowson,rower,rounsaville,roudabush,rotundo,rothell,rotchford,rosiles,roshak,rosetti,rosenkranz,rorer,rollyson,rokosz,rojek,roitman,rohrs,rogel,roewe,rodriges,rodocker,rodgerson,rodan,rodak,rocque,rochholz,robicheau,robbinson,roady,ritchotte,ripplinger,rippetoe,ringstaff,ringenberg,rinard,rigler,rightmire,riesen,riek,ridges,richner,richberg,riback,rial,rhyner,rhees,resse,renno,rendleman,reisz,reisenauer,reinschmidt,reinholt,reinard,reifsnyder,rehfeld,reha,regester,reffitt,redler,rediske,reckner,reckart,rebolloso,rebollar,reasonover,reasner,reaser,reano,reagh,raval,ratterman,ratigan,rater,rasp,raneses,randolf,ramil,ramdas,ramberg,rajaniemi,raggio,ragel,ragain,rade,radaker,racioppi,rabinovich,quickle,quertermous,queal,quartucci,quander,quain,pynes,putzel,purl,pulizzi,pugliares,prusak,prueter,protano,propps,primack,prieur,presta,preister,prawl,pratley,pozzo,powless,povey,pottorf,pote,postley,porzio,portney,ponzi,pontoriero,ponto,pont,poncedeleon,polimeni,polhamus,polan,poetker,poellnitz,podgurski,plotts,pliego,plaugher,plantenberg,plair,plagmann,pizzitola,pittinger,pitcavage,pischke,piontek,pintar,pinnow,pinneo,pinley,pingel,pinello,pimenta,pillard,piker,pietras,piere,phillps,pfleger,pfahl,pezzuti,petruccelli,petrello,peteet,pescatore,peruzzi,perusse,perotta,perona,perini,perelman,perciful,peppin,pennix,pennino,penalosa,pemble,pelz,peltzer,pelphrey,pelote,pellum,pellecchia,pelikan,peitz,pebworth,peary,pawlicki,pavelich,paster,pasquarella,paskey,paseur,paschel,parslow,parrow,parlow,parlett,parler,pargo,parco,paprocki,panepinto,panebianco,pandy,pandey,pamphile,pamintuan,pamer,paluso,paleo,paker,pagett,paczkowski,ozburn,ovington,overmeyer,ouellet,osterlund,oslin,oseguera,osaki,orrock,ormsbee,orlikowski,organista,oregan,orebaugh,orabuena,openshaw,ontiveroz,ondo,omohundro,ollom,ollivierre,olivencia,oley,olazabal,okino,offenberger,oestmann,ocker,obar,oakeson,nuzum,nurre,nowinski,novosel,norquist,nordlie,noorani,nonnemacher,nolder,njoku,niznik,niwa,niss,ninneman,nimtz,niemczyk,nieder,nicolo,nichlos,niblack,newtown,newill,newcom,neverson,neuhart,neuenschwande,nestler,nenno,nejman,neiffer,neidlinger,neglia,nazarian,navor,nary,narayan,nangle,nakama,naish,naik,nadolski,muscato,murphrey,murdick,murchie,muratalla,munnis,mundwiller,muncey,munce,mullenbach,mulhearn,mulcahey,muhammed,muchow,mountford,moudry,mosko,morvay,morrical,morr,moros,mormann,morgen,moredock,morden,mordarski,moravek,morandi,mooradian,montejo,montegut,montan,monsanto,monford,moncus,molinas,molek,mohd,moehrle,moehring,modzeleski,modafferi,moala,moake,miyahira,mitani,mischel,minges,minella,mimes,milles,milbrett,milanes,mikolajczyk,mikami,meucci,metler,methven,metge,messmore,messerschmidt,mesrobian,meservey,merseal,menor,menon,menear,melott,melley,melfi,meinhart,megivern,megeath,meester,meeler,meegan,medoff,medler,meckley,meath,mearns,mcquigg,mcpadden,mclure,mckellips,mckeithen,mcglathery,mcginnes,mcghan,mcdonel,mccullom,mccraken,mccrackin,mcconathy,mccloe,mcclaughry,mcclaflin,mccarren,mccaig,mcaulay,mcaffee,mazzuca,maytubby,mayner,maymi,mattiello,matthis,matthees,matthai,mathiason,mastrogiovann,masteller,mashack,marucci,martorana,martiniz,marter,martellaro,marsteller,marris,marrara,maroni,marolda,marocco,maritn,maresh,maready,marchione,marbut,maranan,maragno,mapps,manrriquez,mannis,manni,mangina,manganelli,mancera,mamon,maloch,mallozzi,maller,majchrzak,majano,mainella,mahanna,maertens,madon,macumber,macioce,machuga,machlin,machala,mabra,lybbert,luvert,lutts,luttrull,lupez,lukehart,ludewig,luchsinger,lovecchio,louissaint,loughney,lostroh,lorton,lopeman,loparo,londo,lombera,lokietek,loiko,lohrenz,lohan,lofties,locklar,lockaby,lobianco,llano,livesey,litster,liske,linsky,linne,lindbeck,licudine,leyua,levie,leonelli,lenzo,lenze,lents,leitao,leidecker,leibold,lehne,legan,lefave,leehy,ledue,lecount,lecea,leadley,lazzara,lazcano,lazalde,lavi,lavancha,lavan,latu,latty,lato,larranaga,lapidus,lapenta,langridge,langeveld,langel,landowski,landgren,landfried,lamattina,lallier,lairmore,lahaie,lagazo,lagan,lafoe,lafluer,laflame,lafevers,lada,lacoss,lachney,labreck,labreche,labay,kwasnik,kuzyk,kutzner,kushnir,kusek,kurtzman,kurian,kulhanek,kuklinski,kueny,kuczynski,kubitz,kruschke,krous,krompel,kritz,krimple,kriese,krenzer,kreis,kratzke,krane,krage,kraebel,kozub,kozma,kouri,koudelka,kotcher,kotas,kostic,kosh,kosar,kopko,kopka,kooy,konigsberg,konarski,kolmer,kohlmeyer,kobbe,knoop,knoedler,knocke,knipple,knippenberg,knickrehm,kneisel,kluss,klossner,klipfel,klawiter,klasen,kittles,kissack,kirtland,kirschenmann,kirckof,kiphart,kinstler,kinion,kilton,killman,kiehl,kief,kett,kesling,keske,kerstein,kepple,keneipp,kempson,kempel,kehm,kehler,keeran,keedy,kebert,keast,kearbey,kawaguchi,kaupu,kauble,katzenbach,katcher,kartes,karpowicz,karpf,karban,kanzler,kanarek,kamper,kaman,kalsow,kalafut,kaeser,kaercher,kaeo,kaeding,jurewicz,julson,jozwick,jollie,johnigan,johll,jochum,jewkes,jestes,jeska,jereb,jaurez,jarecki,jansma,janosik,jandris,jamin,jahr,jacot,ivens,itson,isenhower,iovino,ionescu,ingrum,ingels,imrie,imlay,ihlenfeld,ihde,igou,ibach,huyett,huppe,hultberg,hullihen,hugi,hueso,huesman,hsiao,hronek,hovde,housewright,houlahan,hougham,houchen,hostler,hoster,hosang,hornik,hornes,horio,honyumptewa,honeyman,honer,hommerding,holsworth,hollobaugh,hollinshead,hollands,hollan,holecek,holdorf,hokes,hogston,hoesly,hodkinson,hodgman,hodgens,hochstedler,hochhauser,hobbie,hoare,hnat,hiskey,hirschy,hinostroza,hink,hing,hillmer,hillian,hillerman,hietala,hierro,hickling,hickingbottom,heye,heubusch,hesselschward,herriot,hernon,hermida,hermans,hentschel,henningson,henneke,henk,heninger,heltsley,helmle,helminiak,helmes,hellner,hellmuth,helke,heitmeyer,heird,heinle,heinicke,heinandez,heimsoth,heibel,hegyi,heggan,hefel,heeralall,hedrington,heacox,hazlegrove,hazelett,haymore,havenhill,hautala,hascall,harvie,hartrick,hartling,harrer,harles,hargenrader,hanshew,hanly,hankla,hanisch,hancox,hammann,hambelton,halseth,hallisey,halleck,hallas,haisley,hairr,hainey,hainer,hailstock,haertel,guzek,guyett,guster,gussler,gurwitz,gurka,gunsolus,guinane,guiden,gugliotti,guevin,guevarra,guerard,gudaitis,guadeloupe,gschwind,grupe,grumbach,gruenes,gruenberg,grom,grodski,groden,grizzel,gritten,griswald,grishaber,grinage,grimwood,grims,griffon,griffies,gribben,gressley,gren,greenstreet,grealish,gravett,grantz,granfield,granade,gowell,gossom,gorsky,goring,goodnow,goodfriend,goodemote,golob,gollnick,golladay,goldwyn,goldsboro,golds,goldrick,gohring,gohn,goettsch,goertzen,goelz,godinho,goans,glumac,gleisner,gleen,glassner,glanzer,gladue,gjelaj,givhan,girty,girone,girgenti,giorgianni,gilpatric,gillihan,gillet,gilbar,gierut,gierhart,gibert,gianotti,giannetto,giambanco,gharing,geurts,gettis,gettel,gest,germani,gerdis,gerbitz,geppert,gennings,gemmer,gelvin,gellert,gehler,geddings,gearon,geach,gazaille,gayheart,gauld,gaukel,gaudio,gathing,gasque,garstka,garsee,garringer,garofano,garo,garnsey,garigen,garcias,garbe,ganoung,ganfield,ganaway,gamero,galuska,galster,gallacher,galinski,galimi,galik,galeazzi,galdo,galdames,galas,galanis,gaglio,gaeddert,gadapee,fussner,furukawa,fuhs,fuerte,fuerstenberg,fryrear,froese,fringer,frieson,friesenhahn,frieler,friede,freymuth,freyman,freudenberg,freman,fredricksen,frech,frasch,frantum,frankin,franca,frago,fragnoli,fouquet,fossen,foskett,forner,formosa,formisano,fooks,fons,folino,flott,flesch,flener,flemmons,flanagin,flamino,flamand,fitzerald,findling,filsinger,fillyaw,fillinger,fiechter,ferre,ferdon,feldkamp,fazzio,favia,faulconer,faughnan,faubel,fassler,faso,farrey,farrare,farnworth,farland,fairrow,faille,faherty,fagnant,fabula,fabbri,eylicio,esteve,estala,espericueta,escajeda,equia,enrriquez,enomoto,enmon,engemann,emmerson,emmel,emler,elstad,ellwein,ellerson,eliott,eliassen,elchert,eisenbeis,eisel,eikenberry,eichholz,ehmer,edgerson,echenique,eberley,eans,dziuk,dykhouse,dworak,dutt,dupas,duntz,dunshee,dunovant,dunnaway,dummermuth,duerson,ducotey,duchon,duchesneau,ducci,dubord,duberry,dubach,drummonds,droege,drish,drexel,dresch,dresbach,drenner,drechsler,dowen,dotter,dosreis,doser,dorward,dorin,dorf,domeier,doler,doleman,dolbow,dolbin,dobrunz,dobransky,dobberstein,dlouhy,diosdado,dingmann,dimmer,dimarino,dimaria,dillenburg,dilaura,dieken,dickhaus,dibbles,dibben,diamante,dewilde,dewaard,devich,devenney,devaux,dettinger,desroberts,dershem,dersch,derita,derickson,depina,deorio,deoliveira,denzler,dentremont,denoble,demshar,demond,demint,demichele,demel,delzer,delval,delorbe,delli,delbridge,delanoy,delancy,delahoya,dekle,deitrick,deis,dehnert,degrate,defrance,deetz,deeg,decoster,decena,dearment,daughety,datt,darrough,danzer,danielovich,dandurand,dancause,dalo,dalgleish,daisley,dadlani,daddona,daddio,dacpano,cyprian,cutillo,curz,curvin,cuna,cumber,cullom,cudworth,cubas,crysler,cryderman,crummey,crumbly,crookshanks,croes,criscione,crespi,cresci,creaser,craton,cowin,cowdrey,coutcher,cotterman,cosselman,cosgriff,cortner,corsini,corporan,corniel,cornick,cordts,copening,connick,conlisk,conelli,comito,colten,colletta,coldivar,colclasure,colantuono,colaizzi,coggeshall,cockman,cockfield,cobourn,cobo,cobarrubias,clyatt,cloney,clonch,climes,cleckner,clearo,claybourne,clavin,claridge,claffey,ciufo,cisnero,cipollone,cieslik,ciejka,cichocki,cicchetti,cianflone,chrusciel,christesen,chmielowiec,chirino,chillis,chhoun,chevas,chehab,chaviano,chavaria,chasten,charbonnet,chanley,champoux,champa,chalifoux,cerio,cedotal,cech,cavett,cavendish,catoire,castronovo,castellucci,castellow,castaner,casso,cassels,cassatt,cassar,cashon,cartright,carros,carrisalez,carrig,carrejo,carnicelli,carnett,carlise,carhart,cardova,cardell,carchi,caram,caquias,capper,capizzi,capano,cannedy,campese,calvello,callon,callins,callies,callicutt,calix,calin,califf,calderaro,caldeira,cadriel,cadmus,cadman,caccamise,buttermore,butay,bustamente,busa,burmester,burkard,burhans,burgert,bure,burdin,bullman,bulin,buelna,buehner,budin,buco,buckhanon,bryars,brutger,brus,brumitt,brum,bruer,brucato,broyhill,broy,brownrigg,brossart,brookings,broden,brocklehurst,brockert,bristo,briskey,bringle,bries,bressman,branyan,brands,bramson,brammell,brallier,bozich,boysel,bowthorpe,bowron,bowin,boutilier,boulos,boullion,boughter,bottiglieri,borruso,borreggine,borns,borkoski,borghese,borenstein,boran,booton,bonvillain,bonini,bonello,bolls,boitnott,boike,bohnet,bohnenkamp,bohmer,boeson,boeneke,bodey,bocchino,bobrowski,bobic,bluestein,bloomingdale,blogg,blewitt,blenman,bleck,blaszak,blankenbeckle,blando,blanchfield,blancato,blalack,blakenship,blackett,bisping,birkner,birckhead,bingle,bineau,billiel,bigness,bies,bierer,bhalla,beyerlein,betesh,besler,berzins,bertalan,berntsen,bergo,berganza,bennis,benney,benkert,benjamen,benincasa,bengochia,bendle,bendana,benchoff,benbrook,belsito,belshaw,belinsky,belak,beigert,beidleman,behen,befus,beel,bedonie,beckstrand,beckerle,beato,bauguess,baughan,bauerle,battis,batis,bastone,bassetti,bashor,bary,bartunek,bartoletti,barro,barno,barnicle,barlage,barkus,barkdull,barcellos,barbarino,baranski,baranick,bankert,banchero,bambrick,bamberg,bambenek,balthrop,balmaceda,ballman,balistrieri,balcomb,balboni,balbi,bagner,bagent,badasci,bacot,bache,babione,babic,babers,babbs,avitabile,avers,avena,avance,ausley,auker,audas,aubut,athearn,atcheson,astorino,asplund,aslanian,askari,ashmead,asby,asai,arterbury,artalejo,arqueta,arquero,arostegui,arnell,armeli,arista,arender,arca,arballo,aprea,applen,applegarth,apfel,antonello,antolin,antkowiak,angis,angione,angerman,angelilli,andujo,andrick,anderberg,amigon,amalfitano,alviso,alvez,altice,altes,almarez,allton,allston,allgeyer,allegretti,aliaga,algood,alberg,albarez,albaladejo,akre,aitkin,ahles,ahlberg,agnello,adinolfi,adamis,abramek,abolt,abitong,zurawski,zufall,zubke,zizzo,zipperer,zinner,zinda,ziller,zill,zevallos,zesati,zenzen,zentner,zellmann,zelinsky,zboral,zarcone,zapalac,zaldana,zakes,zaker,zahniser,zacherl,zabawa,zabaneh,youree,younis,yorty,yonce,yero,yerkey,yeck,yeargan,yauch,yashinski,yambo,wrinn,wrightsman,worton,wortley,worland,woolworth,woolfrey,woodhead,woltjer,wolfenden,wolden,wolchesky,wojick,woessner,witters,witchard,wissler,wisnieski,wisinski,winnike,winkowski,winkels,wingenter,wineman,winegardner,wilridge,wilmont,willians,williamsen,wilhide,wilhelmsen,wilhelmi,wildrick,wilden,wiland,wiker,wigglesworth,wiebusch,widdowson,wiant,wiacek,whittet,whitelock,whiteis,whiley,westrope,westpfahl,westin,wessman,wessinger,wesemann,wesby,wertheimer,weppler,wenke,wengler,wender,welp,weitzner,weissberg,weisenborn,weipert,weiman,weidmann,wehrsig,wehrenberg,weemes,weeman,wayner,waston,wasicek,wascom,wasco,warmath,warbritton,waltner,wallenstein,waldoch,waldal,wala,waide,wadlinger,wadhams,vullo,voorheis,vonbargen,volner,vollstedt,vollman,vold,voge,vittorio,violett,viney,vinciguerra,vinal,villata,villarrvel,vilanova,vigneault,vielma,veyna,vessella,versteegh,verderber,venier,venditti,velotta,vejarano,vecchia,vecchi,vastine,vasguez,varella,vanry,vannah,vanhyning,vanhuss,vanhoff,vanhoesen,vandivort,vandevender,vanderlip,vanderkooi,vandebrink,vancott,vallien,vallas,vallandingham,valiquette,valasek,vahey,vagott,uyematsu,urbani,uran,umbach,tyon,tyma,twyford,twombley,twohig,tutterrow,turnes,turkington,turchi,tunks,tumey,tumbaga,tuinstra,tsukamoto,tschetter,trussel,trubey,trovillion,troth,trostel,tron,trinka,trine,triarsi,treto,trautz,tragesser,tooman,toolson,tonozzi,tomkiewicz,tomasso,tolin,tolfree,toelle,tisor,tiry,tinstman,timmermann,tickner,tiburcio,thunberg,thronton,thompsom,theil,thayne,thaggard,teschner,tensley,tenery,tellman,tellado,telep,teigen,teator,teall,tayag,tavis,tattersall,tassoni,tarshis,tappin,tappe,tansley,talone,talford,tainter,taha,taguchi,tacheny,tabak,szymczyk,szwaja,szopinski,syvertsen,swogger,switcher,swist,swierczek,swiech,swickard,swiatek,swezey,swepson,sweezy,swaringen,swanagan,swailes,swade,sveum,svenningsen,svec,suttie,supry,sunga,summerhill,summars,sulit,stys,stutesman,stupak,stumpo,stuller,stuekerjuerge,stuckett,stuckel,stuchlik,stuard,strutton,strop,stromski,stroebel,strehlow,strause,strano,straney,stoyle,stormo,stopyra,stoots,stonis,stoltenburg,stoiber,stoessel,stitzer,stien,stichter,stezzi,stewert,stepler,steinkraus,stegemann,steeples,steenburg,steeley,staszak,stasko,starkson,stanwick,stanke,stanifer,stangel,stai,squiers,spraglin,spragins,spraberry,spoelstra,spisak,spirko,spille,spidel,speyer,speroni,spenst,spartz,sparlin,sparacio,spaman,spainhower,souers,souchet,sosbee,sorn,sorice,sorbo,soqui,solon,soehl,sodergren,sobie,smucker,smsith,smoley,smolensky,smolenski,smolder,smethers,slusar,slowey,slonski,slemmons,slatkin,slates,slaney,slagter,slacum,skutnik,skrzypek,skibbe,sjostrom,sjoquist,sivret,sitko,sisca,sinnett,sineath,simoni,simar,simao,silvestro,silleman,silha,silfies,silberhorn,silacci,sigrist,sieczkowski,sieczka,shure,shulz,shugrue,shrode,shovlin,shortell,shonka,shiyou,shiraishi,shiplett,sheu,shermer,sherick,sheeks,shantz,shakir,shaheed,shadoan,shadid,shackford,shabot,seung,seufert,setty,setters,servis,serres,serrell,serpas,sensenig,senft,semenec,semas,semaan,selvera,sellmeyer,segar,seever,seeney,seeliger,seehafer,seebach,sebben,seaward,seary,searl,searby,scordino,scolieri,scolaro,schwiebert,schwartze,schwaner,schuur,schupbach,schumacker,schum,schudel,schubbe,schroader,schramel,schollmeyer,schoenherr,schoeffler,schoeder,schnurr,schnorr,schneeman,schnake,schnaible,schmaus,schlotter,schinke,schimming,schimek,schikora,scheulen,scherping,schermer,scherb,schember,schellhase,schedler,schanck,schaffhauser,schaffert,schadler,scarola,scarfo,scarff,scantling,scaff,sayward,sayas,saxbury,savel,savastano,sault,satre,sarkar,santellan,sandmeier,sampica,salvesen,saltis,salloum,salling,salce,salatino,salata,salamy,sadowsky,sadlier,sabbatini,sabatelli,sabal,sabados,rydzewski,rybka,rybczyk,rusconi,rupright,rufino,ruffalo,rudiger,rudig,ruda,rubyor,royea,roxberry,rouzer,roumeliotis,rossmann,rosko,rosene,rosenbluth,roseland,rosasco,rosano,rosal,rorabaugh,romie,romaro,rolstad,rollow,rohrich,roghair,rogala,roets,roen,roemmich,roelfs,roeker,roedl,roedel,rodeheaver,roddenberry,rockstad,rocchi,robirds,robben,robasciotti,robaina,rizzotto,rizzio,ritcher,rissman,riseden,ripa,rion,rintharamy,rinehimer,rinck,riling,rietschlin,riesenberg,riemenschneid,rieland,rickenbaugh,rickenbach,rhody,revells,reutter,respress,resnik,remmel,reitmeyer,reitan,reister,reinstein,reino,reinkemeyer,reifschneider,reierson,reichle,rehmeier,rehl,reeds,rede,recar,rebeiro,raybourn,rawl,rautio,raugust,raudenbush,raudales,rattan,rapuano,rapoport,rantanen,ransbottom,raner,ramkissoon,rambousek,raio,rainford,radakovich,rabenhorst,quivers,quispe,quinoes,quilici,quattrone,quates,quance,quale,purswell,purpora,pulera,pulcher,puckhaber,pryer,pruyne,pruit,prudencio,prows,protzman,prothero,prosperi,prospal,privott,pritchet,priem,prest,prell,preer,pree,preddy,preda,pravata,pradhan,potocki,postier,postema,posadas,poremba,popichak,ponti,pomrenke,pomarico,pollok,polkinghorn,polino,pock,plater,plagman,pipher,pinzone,pinkleton,pillette,pillers,pilapil,pignone,pignatelli,piersol,piepho,picton,pickrel,pichard,picchi,piatek,pharo,phanthanouvon,pettingill,pettinato,petrovits,pethtel,petersheim,pershing,perrez,perra,pergram,peretz,perego,perches,pennello,pennella,pendry,penaz,pellish,pecanty,peare,paysour,pavlovich,pavick,pavelko,paustian,patzer,patete,patadia,paszkiewicz,pase,pasculli,pascascio,parrotte,parajon,paparo,papandrea,paone,pantaleon,panning,paniccia,panarello,palmeter,pallan,palardy,pahmeier,padget,padel,oxborrow,oveson,outwater,ottaway,otake,ostermeyer,osmer,osinski,osiecki,oroak,orndoff,orms,orkin,ordiway,opatz,onsurez,onishi,oliger,okubo,okoye,ohlmann,offord,offner,offerdahl,oesterle,oesch,odonnel,odeh,odebralski,obie,obermeier,oberhausen,obenshain,obenchain,nute,nulty,norrington,norlin,nore,nordling,nordhoff,norder,nordan,norals,nogales,noboa,nitsche,niermann,nienhaus,niedringhaus,niedbalski,nicolella,nicolais,nickleberry,nicewander,newfield,neurohr,neumeier,netterville,nersesian,nern,nerio,nerby,nerbonne,neitz,neidecker,neason,nead,navratil,naves,nastase,nasir,nasca,narine,narimatsu,nard,narayanan,nappo,namm,nalbone,nakonechny,nabarro,myott,muthler,muscatello,murriel,murin,muoio,mundel,munafo,mukherjee,muffoletto,muessig,muckey,mucher,mruk,moyd,mowell,mowatt,moutray,motzer,moster,morgenroth,morga,morataya,montross,montezuma,monterroza,montemarano,montello,montbriand,montavon,montaque,monigold,monforte,molgard,moleski,mohsin,mohead,mofield,moerbe,moeder,mochizuki,miyazaki,miyasaki,mital,miskin,mischler,minniear,minero,milosevic,mildenhall,mielsch,midden,michonski,michniak,michitsch,michelotti,micheli,michelfelder,michand,metelus,merkt,merando,meranda,mentz,meneley,menaker,melino,mehaffy,meehl,meech,meczywor,mcweeney,mcumber,mcredmond,mcneer,mcnay,mcmikle,mcmaken,mclaurine,mclauglin,mclaney,mckune,mckinnies,mckague,mchattie,mcgrapth,mcglothen,mcgath,mcfolley,mcdannell,mccurty,mccort,mcclymonds,mcclimon,mcclamy,mccaughan,mccartan,mccan,mccadden,mcburnie,mcburnett,mcbryar,mcannally,mcalevy,mcaleese,maytorena,mayrant,mayland,mayeaux,mauter,matthewson,mathiew,matern,matera,maslow,mashore,masaki,maruco,martorell,martenez,marrujo,marrison,maroun,markway,markos,markoff,markman,marello,marbry,marban,maphis,manuele,mansel,manganello,mandrell,mandoza,manard,manago,maltba,mallick,mallak,maline,malikowski,majure,majcher,maise,mahl,maffit,maffeo,madueno,madlem,madariaga,macvane,mackler,macconnell,macchi,maccarone,lyng,lynchard,lunning,luneau,lunden,lumbra,lumbert,lueth,ludington,luckado,lucchini,lucatero,luallen,lozeau,lowen,lovera,lovelock,louck,lothian,lorio,lorimer,lorge,loretto,longhenry,lonas,loiseau,lohrman,logel,lockie,llerena,livington,liuzzi,liscomb,lippeatt,liou,linhardt,lindelof,lindbo,limehouse,limage,lillo,lilburn,liggons,lidster,liddick,lich,liberato,leysath,lewelling,lesney,leser,lescano,leonette,lentsch,lenius,lemmo,lemming,lemcke,leggette,legerski,legard,leever,leete,ledin,lecomte,lecocq,leakes,leab,lazarz,layous,lawrey,lawery,lauze,lautz,laughinghouse,latulippe,lattus,lattanzio,lascano,larmer,laris,larcher,laprise,lapin,lapage,lano,langseth,langman,langland,landstrom,landsberg,landsaw,landram,lamphier,lamendola,lamberty,lakhani,lajara,lagrow,lagman,ladewig,laderman,ladden,lacrue,laclaire,lachut,lachner,kwit,kvamme,kvam,kutscher,kushi,kurgan,kunsch,kundert,kulju,kukene,kudo,kubin,kubes,kuberski,krystofiak,kruppa,krul,krukowski,kruegel,kronemeyer,krock,kriston,kretzer,krenn,kralik,krafft,krabill,kozisek,koverman,kovatch,kovarik,kotlowski,kosmala,kosky,kosir,kosa,korpi,kornbluth,koppen,kooistra,kohlhepp,kofahl,koeneman,koebel,koczur,kobrin,kobashigawa,koba,knuteson,knoff,knoble,knipper,knierim,kneisley,klusman,kloc,klitzing,klinko,klinefelter,klemetson,kleinpeter,klauser,klatte,klaren,klare,kissam,kirkhart,kirchmeier,kinzinger,kindt,kincy,kincey,kimoto,killingworth,kilcullen,kilbury,kietzman,kienle,kiedrowski,kidane,khamo,khalili,ketterling,ketchem,kessenich,kessell,kepp,kenon,kenning,kennady,kendzior,kemppainen,kellermann,keirns,keilen,keiffer,kehew,keelan,keawe,keator,kealy,keady,kathman,kastler,kastanes,kassab,karpin,karau,karathanasis,kaps,kaplun,kapaun,kannenberg,kanipe,kander,kandel,kanas,kanan,kamke,kaltenbach,kallenberger,kallam,kafton,kafer,kabler,kaaihue,jundt,jovanovich,jojola,johnstad,jodon,joachin,jinright,jessick,jeronimo,jenne,jelsma,jeannotte,jeangilles,jaworsky,jaubert,jarry,jarrette,jarreau,jarett,janos,janecka,janczak,jalomo,jagoda,jagla,jacquier,jaber,iwata,ivanoff,isola,iserman,isais,isaacks,inverso,infinger,ibsen,hyser,hylan,hybarger,hwee,hutchenson,hutchcroft,husar,hurlebaus,hunsley,humberson,hulst,hulon,huhtala,hugill,hugghins,huffmaster,huckeba,hrabovsky,howden,hoverson,houts,houskeeper,housh,hosten,horras,horchler,hopke,hooke,honie,holtsoi,holsomback,holoway,holmstead,hoistion,hohnstein,hoheisel,hoguet,hoggle,hogenson,hoffstetter,hoffler,hofe,hoefling,hoague,hizer,hirschfield,hironaka,hiraldo,hinote,hingston,hinaman,hillie,hillesheim,hilderman,hiestand,heyser,heys,hews,hertler,herrandez,heppe,henle,henkensiefken,henigan,henandez,henagan,hemberger,heman,helser,helmich,hellinger,helfrick,heldenbrand,heinonen,heineck,heikes,heidkamp,heglar,heffren,heelan,hedgebeth,heckmann,heckaman,hechmer,hazelhurst,hawken,haverkamp,havatone,hausauer,hasch,harwick,hartse,harrower,harle,hargroder,hardway,hardinger,hardemon,harbeck,hant,hamre,hamberg,hallback,haisten,hailstone,hahl,hagner,hagman,hagemeyer,haeussler,hackwell,haby,haataja,gverrero,gustovich,gustave,guske,gushee,gurski,gurnett,gura,gunto,gunselman,gugler,gudmundson,gudinas,guarneri,grumbine,gruis,grotz,grosskopf,grosman,grosbier,grinter,grilley,grieger,grewal,gressler,greaser,graus,grasman,graser,grannan,granath,gramer,graboski,goyne,gowler,gottwald,gottesman,goshay,gorr,gorovitz,gores,goossens,goodier,goodhue,gonzeles,gonzalos,gonnella,golomb,golick,golembiewski,goeke,godzik,goar,glosser,glendenning,glendening,glatter,glas,gittings,gitter,gisin,giscombe,gimlin,gillitzer,gillick,gilliand,gilb,gigler,gidden,gibeau,gibble,gianunzio,giannattasio,gertelman,gerosa,gerold,gerland,gerig,gerecke,gerbino,genz,genovesi,genet,gelrud,geitgey,geiszler,gehrlein,gawrys,gavilanes,gaulden,garthwaite,garmoe,gargis,gara,gannett,galligher,galler,galleher,gallahan,galford,gahn,gacek,gabert,fuster,furuya,furse,fujihara,fuhriman,frueh,fromme,froemming,friskney,frietas,freiler,freelove,freber,frear,frankl,frankenfield,franey,francke,foxworthy,formella,foringer,forgue,fonnesbeck,fonceca,folland,fodera,fode,floresca,fleurent,fleshner,flentge,fleischhacker,fleeger,flecher,flam,flaim,fivecoat,firebaugh,fioretti,finucane,filley,figuroa,figuerda,fiddelke,feurtado,fetterly,fessel,femia,feild,fehling,fegett,fedde,fechter,fawver,faulhaber,fatchett,fassnacht,fashaw,fasel,farrugia,farran,farness,farhart,fama,falwell,falvo,falkenstein,falin,failor,faigin,fagundo,fague,fagnan,fagerstrom,faden,eytchison,eyles,everage,evangelist,estrin,estorga,esponda,espindola,escher,esche,escarsega,escandon,erven,erding,eplin,enix,englade,engdahl,enck,emmette,embery,emberson,eltzroth,elsayed,ellerby,ellens,elhard,elfers,elazegui,eisermann,eilertson,eiben,ehrhard,ehresman,egolf,egnew,eggins,efron,effland,edminster,edgeston,eckstrom,eckhard,eckford,echoles,ebsen,eatherly,eastlick,earnheart,dykhuizen,dyas,duttweiler,dutka,dusenbury,dusenbery,durre,durnil,durnell,durie,durhan,durando,dupriest,dunsmoor,dunseith,dunnum,dunman,dunlevy,duma,dulude,dulong,duignan,dugar,dufek,ducos,duchaine,duch,dubow,drowne,dross,drollinger,droke,driggars,drawhorn,drach,drabek,doyne,doukas,dorvil,dorow,doroski,dornak,dormer,donnelson,donivan,dondero,dompe,dolle,doakes,diza,divirgilio,ditore,distel,disimone,disbro,dipiero,dingson,diluzio,dillehay,digiorgio,diflorio,dietzler,dietsch,dieterle,dierolf,dierker,dicostanzo,dicesare,dexheimer,dewitte,dewing,devoti,devincentis,devary,deutschman,dettloff,detienne,destasio,dest,despard,desmet,deslatte,desfosses,derise,derenzo,deppner,depolo,denoyer,denoon,denno,denne,deniston,denike,denes,demoya,demick,demicco,demetriou,demange,delva,delorge,delley,delisio,delhoyo,delgrande,delgatto,delcour,delair,deinert,degruy,degrave,degeyter,defino,deffenbaugh,deener,decook,decant,deboe,deblanc,deatley,dearmitt,deale,deaguiar,dayan,daus,dauberman,datz,dase,dary,dartt,darocha,dari,danowski,dancel,dami,dallmann,dalere,dalba,dakan,daise,dailing,dahan,dagnan,daggs,dagan,czarkowski,czaplinski,cutten,curtice,curenton,curboy,cura,culliton,culberth,cucchiara,cubbison,csaszar,crytser,crotzer,crossgrove,crosser,croshaw,crocco,critzer,creveling,cressy,creps,creese,cratic,craigo,craigen,craib,cracchiolo,crable,coykendall,cowick,coville,couzens,coutch,cousens,cousain,counselman,coult,cotterell,cott,cotham,corsaut,corriere,corredor,cornet,corkum,coreas,cordoza,corbet,corathers,conwill,contreas,consuegra,constanza,conolly,conedy,comins,combee,colosi,colom,colmenares,collymore,colleran,colina,colaw,colatruglio,colantro,colantonio,cohea,cogill,codner,codding,cockram,cocanougher,cobine,cluckey,clucas,cloward,cloke,clisham,clinebell,cliffe,clendenen,cisowski,cirelli,ciraolo,ciocca,cintora,ciesco,cibrian,chupka,chugg,christmann,choma,chiverton,chirinos,chinen,chimenti,chima,cheuvront,chesla,chesher,chesebro,chern,chehebar,cheatum,chastine,chapnick,chapelle,chambley,cercy,celius,celano,cayea,cavicchi,cattell,catanach,catacutan,castelluccio,castellani,cassmeyer,cassetta,cassada,caspi,cashmore,casebier,casanas,carrothers,carrizal,carriveau,carretero,carradine,carosella,carnine,carloni,carkhuff,cardosi,cardo,carchidi,caravello,caranza,carandang,cantrall,canpos,canoy,cannizzaro,canion,canida,canham,cangemi,cange,cancelliere,canard,camarda,calverley,calogero,callendar,calame,cadrette,cachero,caccavale,cabreros,cabrero,cabrara,cabler,butzer,butte,butrick,butala,bustios,busser,busic,bushorn,busher,burmaster,burkland,burkins,burkert,burgueno,burgraff,burel,burck,burby,bumford,bulock,bujnowski,buggie,budine,bucciero,bubier,brzoska,brydges,brumlow,brosseau,brooksher,brokke,broeker,brittin,bristle,briano,briand,brettschneide,bresnan,brentson,brenneis,brender,brazle,brassil,brasington,branstrom,branon,branker,brandwein,brandau,bralley,brailey,brague,brade,bozzi,bownds,bowmer,bournes,bour,bouchey,botto,boteler,borroel,borra,boroski,boothroyd,boord,bonga,bonato,bonadonna,bolejack,boldman,boiser,boggio,bogacki,boerboom,boehnlein,boehle,bodah,bobst,boak,bluemel,blockmon,blitch,blincoe,bleier,blaydes,blasius,bittel,binsfeld,bindel,bilotti,billiott,bilbrew,bihm,biersner,bielat,bidrowski,bickler,biasi,bhola,bhat,bewick,betzen,bettridge,betti,betsch,besley,beshero,besa,bertoli,berstein,berrien,berrie,berrell,bermel,berenguer,benzer,bensing,benedix,bemo,belile,beilman,behunin,behrmann,bedient,becht,beaule,beaudreault,bealle,beagley,bayuk,bayot,bayliff,baugess,battistoni,batrum,basinski,basgall,bartolomei,bartnik,bartl,bartko,bartholomay,barthlow,bartgis,barsness,barski,barlette,barickman,bargen,bardon,barcliff,barbu,barakat,baracani,baraban,banos,banko,bambach,balok,balogun,bally,baldini,balck,balcer,balash,baim,bailor,bahm,bahar,bagshaw,baggerly,badie,badal,backues,babino,aydelott,awbrey,aversano,avansino,auyon,aukamp,aujla,augenstein,astacio,asplin,asato,asano,aruizu,artale,arrick,arneecher,armelin,armbrester,armacost,arkell,argrave,areizaga,apolo,anzures,anzualda,antwi,antillon,antenor,annand,anhalt,angove,anglemyer,anglada,angiano,angeloni,andaya,ancrum,anagnos,ammirati,amescua,ambrosius,amacker,amacher,amabile,alvizo,alvernaz,alvara,altobelli,altobell,althauser,alterman,altavilla,alsip,almeyda,almeter,alman,allscheid,allaman,aliotta,aliberti,alghamdi,albiston,alberding,alarie,alano,ailes,ahsan,ahrenstorff,ahler,aerni,ackland,achor,acero,acebo,abshier,abruzzo,abrom,abood,abnet,abend,abegg,abbruzzese,aaberg,zysk,zutell,zumstein,zummo,zuhlke,zuehlsdorff,zuch,zucconi,zortman,zohn,zingone,zingg,zingale,zima,zientek,zieg,zervas,zerger,zenk,zeldin,zeiss,zeiders,zediker,zavodny,zarazua,zappone,zappala,zapanta,zaniboni,zanchi,zampedri,zaller,zakrajsek,zagar,zadrozny,zablocki,zable,yust,yunk,youngkin,yosten,yockers,yochim,yerke,yerena,yanos,wysinger,wyner,wrisley,woznicki,wortz,worsell,wooters,woon,woolcock,woodke,wonnacott,wolnik,wittstock,witting,witry,witfield,witcraft,wissmann,wissink,wisehart,wiscount,wironen,wipf,winterrowd,wingett,windon,windish,windisch,windes,wiltbank,willmarth,wiler,wieseler,wiedmaier,wiederstein,wiedenheft,wieberg,wickware,wickkiser,wickell,whittmore,whitker,whitegoat,whitcraft,whisonant,whisby,whetsell,whedon,westry,westcoat,wernimont,wentling,wendlandt,wencl,weisgarber,weininger,weikle,weigold,weigl,weichbrodt,wehrli,wehe,weege,weare,watland,wassmann,warzecha,warrix,warrell,warnack,waples,wantland,wanger,wandrei,wanat,wampole,waltjen,walterscheid,waligora,walding,waldie,walczyk,wakins,waitman,wair,wainio,wahpekeche,wahlman,wagley,wagenknecht,wadle,waddoups,wadding,vuono,vuillemot,vugteveen,vosmus,vorkink,vories,vondra,voelz,vlashi,vitelli,vitali,viscarra,vinet,vimont,villega,villard,vignola,viereck,videtto,vicoy,vessell,vescovi,verros,vernier,vernaglia,vergin,verdone,verdier,verastequi,vejar,vasile,vasi,varnadore,vardaro,vanzanten,vansumeren,vanschuyver,vanleeuwen,vanhowe,vanhoozer,vaness,vandewalker,vandevoorde,vandeveer,vanderzwaag,vanderweide,vanderhyde,vandellen,vanamburg,vanalst,vallin,valk,valentini,valcarcel,valasco,valadao,vacher,urquijo,unterreiner,unsicker,unser,unrau,undercoffler,uffelman,uemura,ueda,tyszko,tyska,tymon,tyce,tyacke,twinam,tutas,tussing,turmel,turkowski,turkel,turchetta,tupick,tukes,tufte,tufo,tuey,tuell,tuckerman,tsutsumi,tsuchiya,trossbach,trivitt,trippi,trippensee,trimbach,trillo,triller,trible,tribby,trevisan,tresch,tramonte,traff,trad,tousey,totaro,torregrosa,torralba,tolly,tofil,tofani,tobiassen,tiogangco,tino,tinnes,tingstrom,tingen,tindol,tifft,tiffee,tiet,thuesen,thruston,throndson,thornsbury,thornes,thiery,thielman,thie,theilen,thede,thate,thane,thalacker,thaden,teuscher,terracina,terell,terada,tepfer,tenneson,temores,temkin,telleria,teaque,tealer,teachey,tavakoli,tauras,taucher,tartaglino,tarpy,tannery,tani,tams,tamlin,tambe,tallis,talamante,takayama,takaki,taibl,taffe,tadesse,tade,tabeling,tabag,szoke,szoc,szala,szady,sysak,sylver,syler,swonger,swiggett,swensson,sweis,sweers,sweene,sweany,sweaney,swartwout,swamy,swales,susman,surman,sundblad,summerset,summerhays,sumerall,sule,sugimoto,subramanian,sturch,stupp,stunkard,stumpp,struiksma,stropes,stromyer,stromquist,strede,strazza,strauf,storniolo,storjohann,stonum,stonier,stonecypher,stoneberger,stollar,stokke,stokan,stoetzel,stoeckel,stockner,stockinger,stockert,stockdill,stobbe,stitzel,stitely,stirgus,stigers,stettner,stettler,sterlin,sterbenz,stemp,stelluti,steinmeyer,steininger,steinauer,steigerwalt,steider,stavrou,staufenberger,stassi,stankus,stanaway,stammer,stakem,staino,stahlnecker,stagnitta,staelens,staal,srsen,sprott,sprigg,sprenkle,sprenkel,spreitzer,spraque,sprandel,sporn,spivak,spira,spiewak,spieth,spiering,sperow,speh,specking,spease,spead,sparger,spanier,spall,sower,southcott,sosna,soran,sookram,sonders,solak,sohr,sohl,sofranko,soderling,sochor,sobon,smutz,smudrick,smithj,smid,slosser,sliker,slenker,sleger,slaby,skousen,skilling,skibinski,skees,skane,skafidas,sivic,sivertsen,sivers,sitra,sito,siracusa,sinicki,simpers,simley,simbeck,silberberg,siever,siegwarth,sidman,siddle,sibbett,shumard,shubrooks,shough,shorb,shoptaw,sholty,shoffstall,shiverdecker,shininger,shimasaki,shifrin,shiffler,sheston,sherr,shere,shepeard,shelquist,sheler,shauf,sharrar,sharpnack,shamsiddeen,shambley,shallenberger,shadler,shaban,sferra,seys,sexauer,sevey,severo,setlak,seta,sesko,sersen,serratore,serdula,senechal,seldomridge,seilhamer,seifer,seidlitz,sehnert,sedam,sebron,seber,sebek,seavers,scullark,scroger,scovill,sciascia,sciarra,schweers,schwarze,schummer,schultes,schuchardt,schuchard,schrieber,schrenk,schreifels,schowalter,schoultz,scholer,schofill,schoff,schnuerer,schnettler,schmitke,schmiege,schloop,schlinger,schlessman,schlesser,schlageter,schiess,schiefer,schiavoni,scherzer,scherich,schechtman,schebel,scharpman,schaich,schaap,scappaticci,scadlock,savocchia,savini,savers,savageau,sauvage,sause,sauerwein,sary,sarwary,sarnicola,santone,santoli,santalucia,santacruce,sansoucie,sankoff,sanes,sandri,sanderman,sammartano,salmonson,salmela,salmans,sallaz,salis,sakuma,sakowski,sajdak,sahm,sagredo,safrit,sackey,sabio,sabino,rybolt,ruzzo,ruthstrom,ruta,russin,russak,rusko,ruskin,rusiecki,ruscher,rupar,rumberger,rullan,ruliffson,ruhlman,rufenacht,ruelle,rudisell,rudi,rucci,rublee,ruberto,rubeck,rowett,rottinghaus,roton,rothgeb,rothgaber,rothermich,rostek,rossini,roskelley,rosing,rosi,rosewell,rosberg,roon,ronin,romesburg,romelus,rolley,rollerson,rollefson,rolins,rolens,rois,rohrig,rohrbacher,rohland,rohen,rogness,roes,roering,roehrick,roebke,rodregez,rodabaugh,rockingham,roblee,robel,roadcap,rizzolo,riviezzo,rivest,riveron,risto,rissler,rippentrop,ripka,rinn,ringuette,ringering,rindone,rindels,rieffer,riedman,riede,riecke,riebow,riddlebarger,rhome,rhodd,rhatigan,rhame,reyers,rewitzer,revalee,retzer,rettinger,reschke,requa,reper,reopell,renzelman,renne,renker,renk,renicker,rendina,rendel,remund,remmele,remiasz,remaklus,remak,reitsma,reitmeier,reiswig,reishus,reining,reim,reidinger,reick,reiche,regans,reffett,reesor,reekie,redpath,redditt,rechtzigel,recht,rearden,raynoso,raxter,ratkowski,rasulo,rassmussen,rassel,raser,rappleye,rappe,randrup,randleman,ramson,rampey,radziewicz,quirarte,quintyne,quickel,quattrini,quakenbush,quaile,pytel,pushaw,pusch,purslow,punzo,pullam,pugmire,puello,przekop,pruss,pruiett,provow,prophete,procaccini,pritz,prillaman,priess,pretlow,prestia,presha,prescod,preast,praytor,prashad,praino,pozzi,pottenger,potash,porada,popplewell,ponzo,ponter,pommier,polland,polidori,polasky,pola,poisso,poire,pofahl,podolsky,podell,plueger,plowe,plotz,plotnik,ploch,pliska,plessner,plaut,platzer,plake,pizzino,pirog,piquette,pipho,pioche,pintos,pinkert,pinet,pilkerton,pilch,pilarz,pignataro,piermatteo,picozzi,pickler,pickette,pichler,philogene,phare,phang,pfrogner,pfisterer,pettinelli,petruzzi,petrovic,petretti,petermeier,pestone,pesterfield,pessin,pesch,persky,perruzza,perrott,perritt,perretti,perrera,peroutka,peroni,peron,peret,perdew,perazzo,peppe,peno,penberthy,penagos,peles,pelech,peiper,peight,pefferman,peddie,peckenpaugh,pean,payen,pavloski,pavlica,paullin,patteson,passon,passey,passalacqua,pasquini,paskel,partch,parriott,parrella,parraz,parmely,parizo,papelian,papasergi,pantojz,panto,panich,panchal,palys,pallone,palinski,pali,palevic,pagels,paciorek,pacho,pacella,paar,ozbun,overweg,overholser,ovalles,outcalt,otterbein,otta,ostergren,osher,osbon,orzech,orwick,orrico,oropesa,ormes,orillion,onorati,onnen,omary,olding,okonski,okimoto,ohlrich,ohayon,oguin,ogley,oftedahl,offen,ofallon,oeltjen,odam,ockmond,ockimey,obermeyer,oberdorf,obanner,oballe,oard,oakden,nyhan,nydam,numan,noyer,notte,nothstein,notestine,noser,nork,nolde,nishihara,nishi,nikolic,nihart,nietupski,niesen,niehus,nidiffer,nicoulin,nicolaysen,nicklow,nickl,nickeson,nichter,nicholl,ngyun,newsham,newmann,neveux,neuzil,neumayer,netland,nessen,nesheim,nelli,nelke,necochea,nazari,navorro,navarez,navan,natter,natt,nater,nasta,narvaiz,nardelli,napp,nakahara,nairn,nagg,nager,nagano,nafziger,naffziger,nadelson,muzzillo,murri,murrey,murgia,murcia,muno,munier,mulqueen,mulliniks,mulkins,mulik,muhs,muffley,moynahan,mounger,mottley,motil,moseman,moseby,mosakowski,mortell,morrisroe,morrero,mormino,morland,morger,morgenthaler,moren,morelle,morawski,morasca,morang,morand,moog,montney,montera,montee,montane,montagne,mons,monohan,monnett,monkhouse,moncure,momphard,molyneaux,molles,mollenkopf,molette,mohs,mohmand,mohlke,moessner,moers,mockus,moccio,mlinar,mizzelle,mittler,mitri,mitchusson,mitchen,mistrot,mistler,misch,miriello,minkin,mininger,minerich,minehart,minderman,minden,minahan,milonas,millon,millholland,milleson,millerbernd,millage,militante,milionis,milhoan,mildenberger,milbury,mikolajczak,miklos,mikkola,migneault,mifsud,mietus,mieszala,mielnicki,midy,michon,michioka,micheau,michaeli,micali,methe,metallo,messler,mesch,merow,meroney,mergenthaler,meres,menuey,menousek,menning,menn,menghini,mendia,memmer,melot,mellenthin,melland,meland,meixner,meisenheimer,meineke,meinders,mehrens,mehlig,meglio,medsker,medero,mederios,meabon,mcwright,mcright,mcreath,mcrary,mcquirter,mcquerry,mcquary,mcphie,mcnurlen,mcnelley,mcnee,mcnairy,mcmanamy,mcmahen,mckowen,mckiver,mckinlay,mckearin,mcirvin,mcintrye,mchorse,mchaffie,mcgroarty,mcgoff,mcgivern,mceniry,mcelhiney,mcdiarmid,mccullars,mccubbins,mccrimon,mccovery,mccommons,mcclour,mccarrick,mccarey,mccallen,mcbrien,mcarthy,mayone,maybin,maxam,maurais,maughn,matzek,matts,matin,mathre,mathia,mateen,matava,masso,massar,massanet,masingale,mascaro,marthaler,martes,marso,marshman,marsalis,marrano,marolt,marold,markins,margulis,mardirosian,marchiano,marchak,marandola,marana,manues,mante,mansukhani,mansi,mannan,maniccia,mangine,manery,mandigo,mancell,mamo,malstrom,malouf,malenfant,maldenado,malandruccolo,malak,malabanan,makino,maisonave,mainord,maino,mainard,maillard,mahmud,mahdi,mahapatra,mahaley,mahaffy,magouirk,maglaras,magat,maga,maffia,madrazo,madrano,maditz,mackert,mackellar,mackell,macht,macchia,maccarthy,maahs,lytal,luzar,luzader,lutjen,lunger,lunan,luma,lukins,luhmann,luers,ludvigsen,ludlam,ludemann,luchini,lucente,lubrano,lubow,luber,lubeck,lowing,loven,loup,louge,losco,lorts,lormand,lorenzetti,longford,longden,longbrake,lokhmatov,loge,loeven,loeser,locey,locatelli,litka,lista,lisonbee,lisenbee,liscano,liranzo,liquori,liptrot,lionetti,linscomb,linkovich,linington,lingefelt,lindler,lindig,lindall,lincks,linander,linan,limburg,limbrick,limbach,likos,lighthall,liford,lietzke,liebe,liddicoat,lickley,lichter,liapis,lezo,lewan,levitz,levesgue,leverson,levander,leuthauser,letbetter,lesuer,lesmeister,lesly,lerer,leppanen,lepinski,lenherr,lembrick,lelonek,leisten,leiss,leins,leingang,leinberger,leinbach,leikam,leidig,lehtonen,lehnert,lehew,legier,lefchik,lecy,leconte,lecher,lebrecht,leaper,lawter,lawrenz,lavy,laur,lauderbaugh,lauden,laudato,latting,latsko,latini,lassere,lasseigne,laspina,laso,laslie,laskowitz,laske,lasenby,lascola,lariosa,larcade,lapete,laperouse,lanuza,lanting,lantagne,lansdale,lanphier,langmaid,langella,lanese,landrus,lampros,lamens,laizure,laitinen,laigle,lahm,lagueux,lagorio,lagomarsino,lagasca,lagana,lafont,laflen,lafavor,lafarge,laducer,ladnier,ladesma,lacognata,lackland,lacerte,labuff,laborin,labine,labauve,kuzio,kusterer,kussman,kusel,kusch,kurutz,kurdyla,kupka,kunzler,kunsman,kuni,kuney,kunc,kulish,kuliga,kulaga,kuilan,kuhre,kuhnke,kuemmerle,kueker,kudla,kudelka,kubinski,kubicki,kubal,krzyzanowski,krupicka,krumwiede,krumme,kropidlowski,krokos,kroell,kritzer,kribs,kreitlow,kreisher,kraynak,krass,kranzler,kramb,kozyra,kozicki,kovalik,kovalchik,kovacevic,kotula,kotrba,koteles,kosowski,koskela,kosiba,koscinski,kosch,korab,kopple,kopper,koppelman,koppel,konwinski,kolosky,koloski,kolinsky,kolinski,kolbeck,kolasa,koepf,koda,kochevar,kochert,kobs,knust,knueppel,knoy,knieriem,knier,kneller,knappert,klitz,klintworth,klinkenberg,klinck,kleindienst,kleeb,klecker,kjellberg,kitsmiller,kisor,kisiel,kise,kirbo,kinzle,kingsford,kingry,kimpton,kimel,killmon,killick,kilgallon,kilcher,kihn,kiggins,kiecker,kher,khaleel,keziah,kettell,ketchen,keshishian,kersting,kersch,kerins,kercher,kenefick,kemph,kempa,kelsheimer,kelln,kellenberger,kekahuna,keisling,keirnan,keimig,kehn,keal,kaupp,kaufhold,kauffmann,katzenberg,katona,kaszynski,kaszuba,kassebaum,kasa,kartye,kartchner,karstens,karpinsky,karmely,karel,karasek,kapral,kaper,kanelos,kanahele,kampmann,kampe,kalp,kallus,kallevig,kallen,kaliszewski,kaleohano,kalchthaler,kalama,kalahiki,kaili,kahawai,kagey,justiss,jurkowski,jurgensmeyer,juilfs,jopling,jondahl,jomes,joice,johannessen,joeckel,jezewski,jezek,jeswald,jervey,jeppsen,jenniges,jennett,jemmott,jeffs,jaurequi,janisch,janick,jacek,jacaruso,iwanicki,ishihara,isenberger,isbister,iruegas,inzer,inyart,inscore,innocenti,inglish,infantolino,indovina,inaba,imondi,imdieke,imbert,illes,iarocci,iannucci,huver,hutley,husser,husmann,hupf,huntsberger,hunnewell,hullum,huit,huish,hughson,huft,hufstetler,hueser,hudnell,hovden,housen,houghtling,hossack,hoshaw,horsford,horry,hornbacher,hoppenstedt,hopkinson,honza,homann,holzmeister,holycross,holverson,holtzlander,holroyd,holmlund,holderness,holderfield,holck,hojnacki,hohlfeld,hohenberger,hoganson,hogancamp,hoffses,hoerauf,hoell,hoefert,hodum,hoder,hockenbury,hoage,hisserich,hislip,hirons,hippensteel,hippen,hinkston,hindes,hinchcliff,himmel,hillberry,hildring,hiester,hiefnar,hibberd,hibben,heyliger,heyl,heyes,hevia,hettrick,hert,hersha,hernandz,herkel,herber,henscheid,hennesy,henly,henegan,henebry,hench,hemsath,hemm,hemken,hemann,heltzel,hellriegel,hejny,heinl,heinke,heidinger,hegeman,hefferan,hedglin,hebdon,hearnen,heape,heagy,headings,headd,hazelbaker,havlick,hauschildt,haury,hassenfritz,hasenbeck,haseltine,hartstein,hartry,hartnell,harston,harpool,harmen,hardister,hardey,harders,harbolt,harbinson,haraway,haque,hansmann,hanser,hansch,hansberry,hankel,hanigan,haneline,hampe,hamons,hammerstone,hammerle,hamme,hammargren,hamelton,hamberger,hamasaki,halprin,halman,hallihan,haldane,haifley,hages,hagadorn,hadwin,habicht,habermehl,gyles,gutzman,gutekunst,gustason,gusewelle,gurnsey,gurnee,gunterman,gumina,gulliver,gulbrandson,guiterez,guerino,guedry,gucwa,guardarrama,guagliano,guadagno,grulke,groote,groody,groft,groeneweg,grochow,grippe,grimstead,griepentrog,greenfeld,greenaway,grebe,graziosi,graw,gravina,grassie,granzow,grandjean,granby,gramacy,gozalez,goyer,gotch,gosden,gorny,gormont,goodgion,gonya,gonnerman,gompert,golish,goligoski,goldmann,goike,goetze,godeaux,glaza,glassel,glaspy,glander,giumarro,gitelman,gisondi,gismondi,girvan,girten,gironda,giovinco,ginkel,gilster,giesy,gierman,giddins,giardini,gianino,ghea,geurin,gett,getson,gerrero,germond,gentsy,genta,gennette,genito,genis,gendler,geltz,geiss,gehret,gegenheimer,geffert,geeting,gebel,gavette,gavenda,gaumond,gaudioso,gatzke,gatza,gattshall,gaton,gatchel,gasperi,gaska,gasiorowski,garritson,garrigus,garnier,garnick,gardinier,gardenas,garcy,garate,gandolfi,gamm,gamel,gambel,gallmon,gallemore,gallati,gainous,gainforth,gahring,gaffey,gaebler,gadzinski,gadbury,gabri,gaba,fyke,furtaw,furnas,furcron,funn,funck,fulwood,fulvio,fullmore,fukumoto,fuest,fuery,frymire,frush,frohlich,froedge,frodge,fritzinger,fricker,frericks,frein,freid,freggiaro,fratto,franzi,franciscus,fralix,fowble,fotheringham,foslien,foshie,fortmann,forsey,forkner,foppiano,fontanetta,fonohema,fogler,fockler,fluty,flusche,flud,flori,flenory,fleharty,fleeks,flaxman,fiumara,fitzmorris,finnicum,finkley,fineran,fillhart,filipi,fijal,fieldson,ficarra,festerman,ferryman,ferner,fergason,ferell,fennern,femmer,feldmeier,feeser,feenan,federick,fedak,febbo,feazell,fazzone,fauth,fauset,faurote,faulker,faubion,fatzinger,fasick,fanguy,fambrough,falks,fahl,faaita,exler,ewens,estrado,esten,esteen,esquivez,espejo,esmiol,esguerra,esco,ertz,erspamer,ernstes,erisman,erhard,ereaux,ercanbrack,erbes,epple,entsminger,entriken,enslow,ennett,engquist,englebert,englander,engesser,engert,engeman,enge,enerson,emhoff,emge,elting,ellner,ellenberg,ellenbecker,elio,elfert,elawar,ekstrand,eison,eismont,eisenbrandt,eiseman,eischens,ehrgott,egley,egert,eddlemon,eckerson,eckersley,eckberg,echeverry,eberts,earthman,earnhart,eapen,eachus,dykas,dusi,durning,durdan,dunomes,duncombe,dume,dullen,dullea,dulay,duffett,dubs,dubard,drook,drenth,drahos,dragone,downin,downham,dowis,dowhower,doward,dovalina,dopazo,donson,donnan,dominski,dollarhide,dolinar,dolecki,dolbee,doege,dockus,dobkin,dobias,divoll,diviney,ditter,ditman,dissinger,dismang,dirlam,dinneen,dini,dingwall,diloreto,dilmore,dillaman,dikeman,diiorio,dighton,diffley,dieudonne,dietel,dieringer,diercks,dienhart,diekrager,diefendorf,dicke,dicamillo,dibrito,dibona,dezeeuw,dewhurst,devins,deviney,deupree,detherage,despino,desmith,desjarlais,deshner,desha,desanctis,derring,derousse,derobertis,deridder,derego,derden,deprospero,deprofio,depping,deperro,denty,denoncourt,dencklau,demler,demirchyan,demichiel,demesa,demere,demaggio,delung,deluise,delmoral,delmastro,delmas,delligatti,delle,delasbour,delarme,delargy,delagrange,delafontaine,deist,deiss,deighan,dehoff,degrazia,degman,defosses,deforrest,deeks,decoux,decarolis,debuhr,deberg,debarr,debari,dearmon,deare,deardurff,daywalt,dayer,davoren,davignon,daviau,dauteuil,dauterive,daul,darnley,darakjy,dapice,dannunzio,danison,daniello,damario,dalonzo,dallis,daleske,dalenberg,daiz,dains,daines,dagnese,dady,dadey,czyzewski,czapor,czaplewski,czajka,cyganiewicz,cuttino,cutrona,cussins,cusanelli,cuperus,cundy,cumiskey,cumins,cuizon,cuffia,cuffe,cuffari,cuccaro,cubie,cryder,cruson,crounse,cromedy,cring,creer,credeur,crea,cozort,cozine,cowee,cowdery,couser,courtway,courington,cotman,costlow,costell,corton,corsaro,corrieri,corrick,corradini,coron,coren,corbi,corado,copus,coppenger,cooperwood,coontz,coonce,contrera,connealy,conell,comtois,compere,commins,commings,comegys,colyar,colo,collister,collick,collella,coler,colborn,cohran,cogbill,coffen,cocuzzo,clynes,closter,clipp,clingingsmith,clemence,clayman,classon,clas,clarey,clague,ciubal,citrino,citarella,cirone,cipponeri,cindrich,cimo,ciliberto,cichowski,ciccarello,cicala,chura,chubbuck,chronis,christlieb,chizek,chittester,chiquito,chimento,childree,chianese,chevrette,checo,chastang,chargualaf,chapmon,chantry,chahal,chafetz,cezar,ceruantes,cerrillo,cerrano,cerecedes,cerami,cegielski,cavallero,catinella,cassata,caslin,casano,casacchia,caruth,cartrette,carten,carodine,carnrike,carnall,carmicle,carlan,carlacci,caris,cariaga,cardine,cardimino,cardani,carbonara,capua,capponi,cappellano,caporale,canupp,cantrel,cantone,canterberry,cannizzo,cannan,canelo,caneer,candill,candee,campbel,caminero,camble,caluya,callicott,calk,caito,caffie,caden,cadavid,cacy,cachu,cachola,cabreja,cabiles,cabada,caamano,byran,byon,buyck,bussman,bussie,bushner,burston,burnison,burkman,burkhammer,bures,burdeshaw,bumpass,bullinger,bullers,bulgrin,bugay,budak,buczynski,buckendorf,buccieri,bubrig,brynteson,brunz,brunmeier,brunkow,brunetto,brunelli,brumwell,bruggman,brucki,brucculeri,brozovich,browing,brotman,brocker,broadstreet,brix,britson,brinck,brimmage,brierre,bridenstine,brezenski,brezee,brevik,brentlinger,brentley,breidenbach,breckel,brech,brazzle,braughton,brauch,brattin,brattain,branhan,branford,braner,brander,braly,braegelmann,brabec,boyt,boyack,bowren,bovian,boughan,botton,botner,bosques,borzea,borre,boron,bornhorst,borgstrom,borella,bontempo,bonniwell,bonnes,bonillo,bonano,bolek,bohol,bohaty,boffa,boetcher,boesen,boepple,boehler,boedecker,boeckx,bodi,boal,bloodsworth,bloodgood,blome,blockett,blixt,blanchett,blackhurst,blackaby,bjornberg,bitzer,bittenbender,bitler,birchall,binnicker,binggeli,billett,bilberry,biglow,bierly,bielby,biegel,berzas,berte,bertagnolli,berreth,bernhart,bergum,berentson,berdy,bercegeay,bentle,bentivegna,bentham,benscoter,benns,bennick,benjamine,beneze,benett,beneke,bendure,bendix,bendick,benauides,belman,bellus,bellott,bellefleur,bellas,beljan,belgard,beith,beinlich,beierle,behme,beevers,beermann,beeching,bedward,bedrosian,bedner,bedeker,bechel,becera,beaubrun,beardmore,bealmear,bazin,bazer,baumhoer,baumgarner,bauknecht,battson,battiest,basulto,baster,basques,basista,basiliere,bashi,barzey,barz,bartus,bartucca,bartek,barrero,barreca,barnoski,barndt,barklow,baribeau,barette,bares,barentine,bareilles,barbre,barberi,barbagelata,baraw,baratto,baranoski,baptise,bankson,bankey,bankard,banik,baltzley,ballen,balkey,balius,balderston,bakula,bakalar,baffuto,baerga,badoni,backous,bachtel,bachrach,baccari,babine,babilonia,baar,azbill,azad,aycox,ayalla,avolio,austerberry,aughtry,aufderheide,auch,attanasio,athayde,atcher,asselta,aslin,aslam,ashwood,ashraf,ashbacher,asbridge,asakura,arzaga,arriaza,arrez,arrequin,arrants,armiger,armenteros,armbrister,arko,argumedo,arguijo,ardolino,arcia,arbizo,aravjo,aper,anzaldo,antu,antrikin,antonetty,antinoro,anthon,antenucci,anstead,annese,ankrum,andreason,andrado,andaverde,anastos,anable,amspoker,amrine,amrein,amorin,amel,ambrosini,alsbrook,alnutt,almasi,allessio,allateef,aldous,alderink,aldaz,akmal,akard,aiton,aites,ainscough,aikey,ahrends,ahlm,aguada,agans,adelmann,addesso,adaway,adamaitis,ackison,abud,abendroth,abdur,abdool,aamodt,zywiec,zwiefelhofer,zwahlen,zunino,zuehl,zmuda,zmolek,zizza,ziska,zinser,zinkievich,zinger,zingarelli,ziesmer,ziegenfuss,ziebol,zettlemoyer,zettel,zervos,zenke,zembower,zelechowski,zelasko,zeise,zeek,zeeb,zarlenga,zarek,zaidi,zahnow,zahnke,zaharis,zacate,zabrocki,zaborac,yurchak,yuengling,younie,youngers,youell,yott,yoshino,yorks,yordy,yochem,yerico,yerdon,yeiser,yearous,yearick,yeaney,ybarro,yasutake,yasin,yanke,yanish,yanik,yamazaki,yamat,yaggi,ximenez,wyzard,wynder,wyly,wykle,wutzke,wuori,wuertz,wuebker,wrightsel,worobel,worlie,worford,worek,woolson,woodrome,woodly,woodling,wontor,wondra,woltemath,wollmer,wolinski,wolfert,wojtanik,wojtak,wohlfarth,woeste,wobbleton,witz,wittmeyer,witchey,wisotzkey,wisnewski,wisman,wirch,wippert,wineberg,wimpee,wilusz,wiltsey,willig,williar,willers,willadsen,wildhaber,wilday,wigham,wiewel,wieting,wietbrock,wiesel,wiesehan,wiersema,wiegert,widney,widmark,wickson,wickings,wichern,whtie,whittie,whitlinger,whitfill,whitebread,whispell,whetten,wheeley,wheeles,wheelen,whatcott,weyland,weter,westrup,westphalen,westly,westland,wessler,wesolick,wesler,wesche,werry,wero,wernecke,werkhoven,wellspeak,wellings,welford,welander,weissgerber,weisheit,weins,weill,weigner,wehrmann,wehrley,wehmeier,wege,weers,weavers,watring,wassum,wassman,wassil,washabaugh,wascher,warth,warbington,wanca,wammack,wamboldt,walterman,walkington,walkenhorst,walinski,wakley,wagg,wadell,vuckovich,voogd,voller,vokes,vogle,vogelsberg,vodicka,vissering,vipond,vincik,villalona,vickerman,vettel,veteto,vesperman,vesco,vertucci,versaw,verba,ventris,venecia,vendela,venanzi,veldhuizen,vehrs,vaughen,vasilopoulos,vascocu,varvel,varno,varlas,varland,vario,vareschi,vanwyhe,vanweelden,vansciver,vannaman,vanluven,vanloo,vanlaningham,vankomen,vanhout,vanhampler,vangorp,vangorden,vanella,vandresar,vandis,vandeyacht,vandewerker,vandevsen,vanderwall,vandercook,vanderberg,vanbergen,valko,valesquez,valeriano,valen,vachula,vacha,uzee,uselman,urizar,urion,urben,upthegrove,unzicker,unsell,unick,umscheid,umin,umanzor,ullo,ulicki,uhlir,uddin,tytler,tymeson,tyger,twisdale,twedell,tweddle,turrey,tures,turell,tupa,tuitt,tuberville,tryner,trumpower,trumbore,troglen,troff,troesch,trivisonno,tritto,tritten,tritle,trippany,tringali,tretheway,treon,trejos,tregoning,treffert,traycheff,travali,trauth,trauernicht,transou,trane,trana,toves,tosta,torp,tornquist,tornes,torchio,toor,tooks,tonks,tomblinson,tomala,tollinchi,tolles,tokich,tofte,todman,titze,timpone,tillema,tienken,tiblier,thyberg,thursby,thurrell,thurm,thruman,thorsted,thorley,thomer,thoen,thissen,theimer,thayn,thanpaeng,thammavongsa,thalman,texiera,texidor,teverbaugh,teska,ternullo,teplica,tepe,teno,tenholder,tenbusch,tenbrink,temby,tejedor,teitsworth,teichmann,tehan,tegtmeyer,tees,teem,tays,taubert,tauares,taschler,tartamella,tarquinio,tarbutton,tappendorf,tapija,tansil,tannahill,tamondong,talahytewa,takashima,taecker,tabora,tabin,tabbert,szymkowski,szymanowski,syversen,syrett,synnott,sydnes,swimm,sweney,swearegene,swartzel,swanstrom,svedin,suryan,supplice,supnet,suoboda,sundby,sumaya,sumabat,sulzen,sukovaty,sukhu,sugerman,sugalski,sudweeks,sudbeck,sucharski,stutheit,stumfoll,stuffle,struyk,strutz,strumpf,strowbridge,strothman,strojny,strohschein,stroffolino,stribble,strevel,strenke,stremming,strehle,stranak,stram,stracke,stoudamire,storks,stopp,stonebreaker,stolt,stoica,stofer,stockham,stockfisch,stjuste,stiteler,stiman,stillions,stillabower,stierle,sterlace,sterk,stepps,stenquist,stenner,stellman,steines,steinbaugh,steinbacher,steiling,steidel,steffee,stavinoha,staver,stastny,stasiuk,starrick,starliper,starlin,staniford,staner,standre,standefer,standafer,stanczyk,stallsmith,stagliano,staehle,staebler,stady,stadtmiller,squyres,spurbeck,sprunk,spranger,spoonamore,spoden,spilde,spezio,speros,sperandio,specchio,spearin,spayer,spallina,spadafino,sovie,sotello,sortor,sortino,soros,sorola,sorbello,sonner,sonday,somes,soloway,soens,soellner,soderblom,sobin,sniezek,sneary,smyly,smutnick,smoots,smoldt,smitz,smitreski,smallen,smades,slunaker,sluka,slown,slovick,slocomb,slinger,slife,sleeter,slanker,skufca,skubis,skrocki,skov,skjei,skilton,skarke,skalka,skalak,skaff,sixkiller,sitze,siter,sisko,sirman,sirls,sinotte,sinon,sincock,sincebaugh,simmoms,similien,silvius,silton,silloway,sikkema,sieracki,sienko,siemon,siemer,siefker,sieberg,siebens,siebe,sicurella,sicola,sickle,shumock,shumiloff,shuffstall,shuemaker,shuart,shroff,shreeve,shostak,shortes,shorr,shivley,shintaku,shindo,shimomura,shiigi,sherow,sherburn,shepps,shenefield,shelvin,shelstad,shelp,sheild,sheaman,shaulis,sharrer,sharps,sharpes,shappy,shapero,shanor,shandy,seyller,severn,sessom,sesley,servidio,serrin,sero,septon,septer,sennott,sengstock,senff,senese,semprini,semone,sembrat,selva,sella,selbig,seiner,seif,seidt,sehrt,seemann,seelbinder,sedlay,sebert,seaholm,seacord,seaburg,scungio,scroggie,scritchfield,scrimpsher,scrabeck,scorca,scobey,scivally,schwulst,schwinn,schwieson,schwery,schweppe,schwartzenbur,schurz,schumm,schulenburg,schuff,schuerholz,schryer,schrager,schorsch,schonhardt,schoenfelder,schoeck,schoeb,schnitzler,schnick,schnautz,schmig,schmelter,schmeichel,schluneger,schlosberg,schlobohm,schlenz,schlembach,schleisman,schleining,schleiff,schleider,schink,schilz,schiffler,schiavi,scheuer,schemonia,scheman,schelb,schaul,schaufelberge,scharer,schardt,scharbach,schabacker,scee,scavone,scarth,scarfone,scalese,sayne,sayed,savitz,satterlund,sattazahn,satow,sastre,sarr,sarjeant,sarff,sardella,santoya,santoni,santai,sankowski,sanft,sandow,sandoe,sandhaus,sandefer,sampey,samperi,sammarco,samia,samek,samay,samaan,salvadore,saltness,salsgiver,saller,salaz,salano,sakal,saka,saintlouis,saile,sahota,saggese,sagastume,sadri,sadak,sachez,saalfrank,saal,saadeh,rynn,ryley,ryle,rygg,rybarczyk,ruzich,ruyter,ruvo,rupel,ruopp,rundlett,runde,rundall,runck,rukavina,ruggiano,rufi,ruef,rubright,rubbo,rowbottom,rotner,rotman,rothweiler,rothlisberger,rosseau,rossean,rossa,roso,rosiek,roshia,rosenkrans,rosener,rosencrantz,rosencrans,rosello,roques,rookstool,rondo,romasanta,romack,rokus,rohweder,roethler,roediger,rodwell,rodrigus,rodenbeck,rodefer,rodarmel,rockman,rockholt,rochow,roches,roblin,roblez,roble,robers,roat,rizza,rizvi,rizk,rixie,riveiro,rius,ritschard,ritrovato,risi,rishe,rippon,rinks,ringley,ringgenberg,ringeisen,rimando,rilley,rijos,rieks,rieken,riechman,riddley,ricord,rickabaugh,richmeier,richesin,reyolds,rexach,requena,reppucci,reposa,renzulli,renter,remondini,reither,reisig,reifsnider,reifer,reibsome,reibert,rehor,rehmann,reedus,redshaw,reczek,recupero,recor,reckard,recher,realbuto,razer,rayman,raycraft,rayas,rawle,raviscioni,ravetto,ravenelle,rauth,raup,rattliff,rattley,rathfon,rataj,rasnic,rappleyea,rapaport,ransford,rann,rampersad,ramis,ramcharan,rainha,rainforth,ragans,ragains,rafidi,raffety,raducha,radsky,radler,radatz,raczkowski,rabenold,quraishi,quinerly,quercia,quarnstrom,pusser,puppo,pullan,pulis,pugel,puca,pruna,prowant,provines,pronk,prinkleton,prindall,primas,priesmeyer,pridgett,prevento,preti,presser,presnall,preseren,presas,presa,prchal,prattis,pratillo,praska,prak,powis,powderly,postlewait,postle,posch,porteus,porraz,popwell,popoff,poplaski,poniatoski,pollina,polle,polhill,poletti,polaski,pokorney,pointdexter,poinsette,ploszaj,plitt,pletz,pletsch,plemel,pleitez,playford,plaxco,platek,plambeck,plagens,placido,pisarski,pinuelas,pinnette,pinick,pinell,pinciaro,pinal,pilz,piltz,pillion,pilkinton,pikul,piepenburg,piening,piehler,piedrahita,piechocki,picknell,pickelsimer,pich,picariello,phoeuk,phillipson,philbert,pherigo,phelka,peverini,petrash,petramale,petraglia,pery,personius,perrington,perrill,perpall,perot,perman,peragine,pentland,pennycuff,penninger,pennachio,pendexter,penalver,pelzel,pelter,pelow,pelo,peli,peinado,pedley,pecue,pecore,pechar,peairs,paynes,payano,pawelk,pavlock,pavlich,pavich,pavek,pautler,paulik,patmore,patella,patee,patalano,passini,passeri,paskell,parrigan,parmar,parayno,paparelli,pantuso,pante,panico,panduro,panagos,pama,palmo,pallotta,paling,palamino,pake,pajtas,pailthorpe,pahler,pagon,paglinawan,pagley,paget,paetz,paet,padley,pacleb,pachelo,paccione,pabey,ozley,ozimek,ozawa,owney,outram,ouillette,oudekerk,ostrosky,ostermiller,ostermann,osterloh,osterfeld,ossenfort,osoria,oshell,orsino,orscheln,orrison,ororke,orellano,orejuela,ordoyne,opsahl,opland,onofre,onaga,omahony,olszowka,olshan,ollig,oliff,olien,olexy,oldridge,oldfather,olalde,okun,okumoto,oktavec,okin,ohme,ohlemacher,ohanesian,odneal,odgers,oderkirk,odden,ocain,obradovich,oakey,nussey,nunziato,nunoz,nunnenkamp,nuncio,noviello,novacek,nothstine,northum,norsen,norlander,norkus,norgaard,norena,nored,nobrega,niziolek,ninnemann,nievas,nieratko,nieng,niedermeyer,niedermaier,nicolls,newham,newcome,newberger,nevills,nevens,nevel,neumiller,netti,nessler,neria,nemet,nelon,nellon,neller,neisen,neilly,neifer,neid,neering,neehouse,neef,needler,nebergall,nealis,naumoff,naufzinger,narum,narro,narramore,naraine,napps,nansteel,namisnak,namanny,nallie,nakhle,naito,naccari,nabb,myracle,myhand,mwakitwile,muzzy,muscolino,musco,muscente,muscat,muscara,musacchia,musa,murrish,murfin,muray,munnelly,munley,munivez,mundine,mundahl,munari,mullennex,mullendore,mulkhey,mulinix,mulders,muhl,muenchow,muellner,mudget,mudger,muckenfuss,muchler,mozena,movius,mouldin,motola,mosseri,mossa,moselle,mory,morsell,morrish,morles,morie,morguson,moresco,morck,moppin,moosman,montuori,montono,montogomery,montis,monterio,monter,monsalve,mongomery,mongar,mondello,moncivais,monard,monagan,molt,mollenhauer,moldrem,moldonado,molano,mokler,moisant,moilanen,mohrman,mohamad,moger,mogel,modine,modin,modic,modha,mlynek,miya,mittiga,mittan,mitcheltree,misfeldt,misener,mirchandani,miralles,miotke,miosky,mintey,mins,minassian,minar,mimis,milon,milloy,millison,milito,milfort,milbradt,mikulich,mikos,miklas,mihelcic,migliorisi,migliori,miesch,midura,miclette,michela,micale,mezey,mews,mewes,mettert,mesker,mesich,mesecher,merthie,mersman,mersereau,merrithew,merriott,merring,merenda,merchen,mercardo,merati,mentzel,mentis,mentel,menotti,meno,mengle,mendolia,mellick,mellett,melichar,melhorn,melendres,melchiorre,meitzler,mehtani,mehrtens,meditz,medeiras,meckes,mcteer,mctee,mcparland,mcniell,mcnealey,mcmanaway,mcleon,mclay,mclavrin,mcklveen,mckinzey,mcken,mckeand,mckale,mcilwraith,mcilroy,mcgreal,mcgougan,mcgettigan,mcgarey,mcfeeters,mcelhany,mcdaris,mccomis,mccomber,mccolm,mccollins,mccollin,mccollam,mccoach,mcclory,mcclennon,mccathern,mccarthey,mccarson,mccarrel,mccargar,mccandles,mccamish,mccally,mccage,mcbrearty,mcaneny,mcanallen,mcalarney,mcaferty,mazzo,mazy,mazurowski,mazique,mayoras,mayden,maxberry,mauller,matusiak,mattsen,matthey,matkins,mathiasen,mathe,mateus,matalka,masullo,massay,mashak,mascroft,martinex,martenson,marsiglia,marsella,maroudas,marotte,marner,markes,maret,mareno,marean,marcinkiewicz,marchel,marasigan,manzueta,manzanilla,manternach,manring,manquero,manoni,manne,mankowski,manjarres,mangen,mangat,mandonado,mandia,mancias,manbeck,mamros,maltez,mallia,mallar,malla,malen,malaspina,malahan,malagisi,malachowski,makowsky,makinen,makepeace,majkowski,majid,majercin,maisey,mainguy,mailliard,maignan,mahlman,maha,magsamen,magpusao,magnano,magley,magedanz,magarelli,magaddino,maenner,madnick,maddrey,madaffari,macnaughton,macmullen,macksey,macknight,macki,macisaac,maciejczyk,maciag,machenry,machamer,macguire,macdaniel,maccormack,maccabe,mabbott,mabb,lynott,lycan,lutwin,luscombe,lusco,lusardi,luria,lunetta,lundsford,lumas,luisi,luevanos,lueckenhoff,ludgate,ludd,lucherini,lubbs,lozado,lourens,lounsberry,loughrey,loughary,lotton,losser,loshbaugh,loseke,loscalzo,lortz,loperena,loots,loosle,looman,longstaff,longobardi,longbottom,lomay,lomasney,lohrmann,lohmiller,logalbo,loetz,loeffel,lodwick,lodrigue,lockrem,llera,llarena,littrel,littmann,lisser,lippa,lipner,linnemann,lingg,lindemuth,lindeen,lillig,likins,lieurance,liesmann,liesman,liendo,lickert,lichliter,leyvas,leyrer,lewy,leubner,lesslie,lesnick,lesmerises,lerno,lequire,lepera,lepard,lenske,leneau,lempka,lemmen,lemm,lemere,leinhart,leichner,leicher,leibman,lehmberg,leggins,lebeda,leavengood,leanard,lazaroff,laventure,lavant,lauster,laumea,latigo,lasota,lashure,lasecki,lascurain,lartigue,larouche,lappe,laplaunt,laplace,lanum,lansdell,lanpher,lanoie,lankard,laniado,langowski,langhorn,langfield,langfeldt,landt,landerman,landavazo,lampo,lampke,lamper,lamery,lambey,lamadrid,lallemand,laisure,laigo,laguer,lagerman,lageman,lagares,lacosse,lachappelle,laborn,labonne,kuzia,kutt,kutil,kurylo,kurowski,kuriger,kupcho,kulzer,kulesa,kules,kuhs,kuhne,krutz,krus,krupka,kronberg,kromka,kroese,krizek,krivanek,kringel,kreiss,kratofil,krapp,krakowsky,kracke,kozlow,kowald,kover,kovaleski,kothakota,kosten,koskinen,kositzke,korff,korbar,kopplin,koplin,koos,konyn,konczak,komp,komo,kolber,kolash,kolakowski,kohm,kogen,koestner,koegler,kodama,kocik,kochheiser,kobler,kobara,knezevich,kneifl,knapchuck,knabb,klugman,klosner,klingel,klimesh,klice,kley,kleppe,klemke,kleinmann,kleinhans,kleinberg,kleffner,kleckley,klase,kisto,kissick,kisselburg,kirschman,kirks,kirkner,kirkey,kirchman,kinville,kinnunen,kimmey,kimmerle,kimbley,kilty,kilts,killmeyer,killilea,killay,kiest,kierce,kiepert,kielman,khalid,kewal,keszler,kesson,kesich,kerwood,kerksiek,kerkhoff,kerbo,keranen,keomuangtai,kenter,kennelley,keniry,kendzierski,kempner,kemmis,kemerling,kelsay,kelchner,kela,keithly,keipe,kegg,keer,keahey,kaywood,kayes,kawahara,kasuboski,kastendieck,kassin,kasprzyk,karraker,karnofski,karman,karger,karge,karella,karbowski,kapphahn,kannel,kamrath,kaminer,kamansky,kalua,kaltz,kalpakoff,kalkbrenner,kaku,kaib,kaehler,kackley,kaber,justo,juris,jurich,jurgenson,jurez,junor,juniel,juncker,jugo,jubert,jowell,jovanovic,joosten,joncas,joma,johnso,johanns,jodoin,jockers,joans,jinwright,jinenez,jimeson,jerrett,jergens,jerden,jerdee,jepperson,jendras,jeanfrancois,jazwa,jaussi,jaster,jarzombek,jarencio,janocha,jakab,jadlowiec,jacobsma,jach,izaquirre,iwaoka,ivaska,iturbe,israelson,isles,isachsen,isaak,irland,inzerillo,insogna,ingegneri,ingalsbe,inciong,inagaki,icenogle,hyett,hyers,huyck,hutti,hutten,hutnak,hussar,hurrle,hurford,hurde,hupper,hunkin,hunkele,hunke,humann,huhtasaari,hugel,hufft,huegel,hrobsky,hren,hoyles,hovsepian,hovenga,hovatter,houdek,hotze,hossler,hossfeld,hosseini,horten,hort,horr,horgen,horen,hoopii,hoon,hoogland,hontz,honnold,homewood,holway,holtgrewe,holtan,holstrom,holstege,hollway,hollingshed,hollenback,hollard,holberton,hoines,hogeland,hofstad,hoetger,hoen,hoaglund,hirota,hintermeister,hinnen,hinders,hinderer,hinchee,himelfarb,himber,hilzer,hilling,hillers,hillegas,hildinger,hignight,highman,hierholzer,heyde,hettich,hesketh,herzfeld,herzer,hershenson,hershberg,hernando,hermenegildo,hereth,hererra,hereda,herbin,heraty,herard,hepa,henschel,henrichsen,hennes,henneberger,heningburg,henig,hendron,hendericks,hemple,hempe,hemmingsen,hemler,helvie,helmly,helmbrecht,heling,helin,helfrey,helble,helaire,heizman,heisser,heiny,heinbaugh,heidemann,heidema,heiberger,hegel,heerdt,heeg,heefner,heckerman,heckendorf,heavin,headman,haynesworth,haylock,hayakawa,hawksley,haverstick,haut,hausen,hauke,haubold,hattan,hattabaugh,hasstedt,hashem,haselhorst,harrist,harpst,haroldsen,harmison,harkema,harison,hariri,harcus,harcum,harcharik,hanzel,hanvey,hantz,hansche,hansberger,hannig,hanken,hanhardt,hanf,hanauer,hamberlin,halward,halsall,hals,hallquist,hallmon,halk,halbach,halat,hajdas,hainsworth,haik,hahm,hagger,haggar,hader,hadel,haddick,hackmann,haasch,haaf,guzzetta,guzy,gutterman,gutmann,gutkowski,gustine,gursky,gurner,gunsolley,gumpert,gulla,guilmain,guiliani,guier,guers,guerero,guerena,guebara,guadiana,grunder,grothoff,grosland,grosh,groos,grohs,grohmann,groepper,grodi,grizzaffi,grissinger,grippi,grinde,griffee,grether,greninger,greigo,gregorski,greger,grega,greenberger,graza,grattan,grasse,grano,gramby,gradilla,govin,goutremout,goulas,gotay,gosling,gorey,gordner,goossen,goodwater,gonzaga,gonyo,gonska,gongalves,gomillion,gombos,golonka,gollman,goldtrap,goldammer,golas,golab,gola,gogan,goffman,goeppinger,godkin,godette,glore,glomb,glauner,glassey,glasner,gividen,giuffrida,gishal,giovanelli,ginoza,ginns,gindlesperger,gindhart,gillem,gilger,giggey,giebner,gibbson,giacomo,giacolone,giaccone,giacchino,ghere,gherardini,gherardi,gfeller,getts,gerwitz,gervin,gerstle,gerfin,geremia,gercak,gener,gencarelli,gehron,gehrmann,geffers,geery,geater,gawlik,gaudino,garsia,garrahan,garrabrant,garofolo,garigliano,garfinkle,garelick,gardocki,garafola,gappa,gantner,ganther,gangelhoff,gamarra,galstad,gally,gallik,gallier,galimba,gali,galassi,gaige,gadsby,gabbin,gabak,fyall,furney,funez,fulwider,fulson,fukunaga,fujikawa,fugere,fuertes,fuda,fryson,frump,frothingham,froning,froncillo,frohling,froberg,froats,fritchman,frische,friedrichsen,friedmann,friddell,frid,fresch,frentzel,freno,frelow,freimuth,freidel,freehan,freeby,freeburn,fredieu,frederiksen,fredeen,frazell,frayser,fratzke,frattini,franze,franich,francescon,framer,fragman,frack,foxe,fowlston,fosberg,fortna,fornataro,forden,foots,foody,fogt,foglia,fogerty,fogelson,flygare,flowe,flinner,flem,flath,flater,flahaven,flad,fjeld,fitanides,fistler,fishbaugh,firsching,finzel,finical,fingar,filosa,filicetti,filby,fierst,fierra,ficklen,ficher,fersner,ferrufino,ferrucci,fero,ferlenda,ferko,fergerstrom,ferge,fenty,fent,fennimore,fendt,femat,felux,felman,feldhaus,feisthamel,feijoo,feiertag,fehrman,fehl,feezell,feeback,fedigan,fedder,fechner,feary,fayson,faylor,fauteux,faustini,faure,fauci,fauber,fattig,farruggio,farrens,faraci,fantini,fantin,fanno,fannings,faniel,fallaw,falker,falkenhagen,fajen,fahrner,fabel,fabacher,eytcheson,eyster,exford,exel,evetts,evenstad,evanko,euresti,euber,etcitty,estler,essner,essinger,esplain,espenshade,espaillat,escribano,escorcia,errington,errett,errera,erlanger,erenrich,erekson,erber,entinger,ensworth,ensell,enno,ennen,englin,engblom,engberson,encinias,enama,emel,elzie,elsbree,elman,ellebracht,elkan,elfstrom,elerson,eleazer,eleam,eldrige,elcock,einspahr,eike,eidschun,eickman,eichele,eiche,ehlke,eguchi,eggink,edouard,edgehill,eckes,eblin,ebberts,eavenson,earvin,eardley,eagon,eader,dzubak,dylla,dyckman,dwire,dutrow,dutile,dusza,dustman,dusing,duryee,durupan,durtschi,durtsche,durell,dunny,dunnegan,dunken,dumm,dulak,duker,dukelow,dufort,dufilho,duffee,duett,dueck,dudzinski,dudasik,duckwall,duchemin,dubrow,dubis,dubicki,duba,drust,druckman,drinnen,drewett,drewel,dreitzler,dreckman,drappo,draffen,drabant,doyen,dowding,doub,dorson,dorschner,dorrington,dorney,dormaier,dorff,dorcy,donges,donelly,donel,domangue,dols,dollahite,dolese,doldo,doiley,dohrman,dohn,doheny,doceti,dobry,dobrinski,dobey,divincenzo,dischinger,dirusso,dirocco,dipiano,diop,dinitto,dinehart,dimsdale,diminich,dimalanta,dillavou,dilello,difusco,diffey,diffenderfer,diffee,difelice,difabio,dietzman,dieteman,diepenbrock,dieckmann,dicampli,dibari,diazdeleon,diallo,dewitz,dewiel,devoll,devol,devincent,devier,devendorf,devalk,detten,detraglia,dethomas,detemple,desler,desharnais,desanty,derocco,dermer,derks,derito,derhammer,deraney,dequattro,depass,depadua,denyes,denyer,dentino,denlinger,deneal,demory,demopoulos,demontigny,demonte,demeza,delsol,delrosso,delpit,delpapa,delouise,delone,delo,delmundo,delmore,dellapaolera,delfin,delfierro,deleonardis,delenick,delcarlo,delcampo,delcamp,delawyer,delaroca,delaluz,delahunt,delaguardia,dekeyser,dekay,dejaeger,dejackome,dehay,dehass,degraffenried,degenhart,degan,deever,deedrick,deckelbaum,dechico,dececco,decasas,debrock,debona,debeaumont,debarros,debaca,dearmore,deangelus,dealmeida,dawood,davney,daudt,datri,dasgupta,darring,darracott,darcus,daoud,dansbury,dannels,danielski,danehy,dancey,damour,dambra,dalcour,dahlheimer,dadisman,dacunto,dacamara,dabe,cyrulik,cyphert,cwik,cussen,curles,curit,curby,curbo,cunas,cunard,cunanan,cumpton,culcasi,cucinotta,cucco,csubak,cruthird,crumwell,crummitt,crumedy,crouthamel,cronce,cromack,crisafi,crimin,cresto,crescenzo,cremonese,creedon,crankshaw,cozzens,coval,courtwright,courcelle,coupland,counihan,coullard,cotrell,cosgrave,cornelio,corish,cordoua,corbit,coppersmith,coonfield,conville,contrell,contento,conser,conrod,connole,congrove,conery,condray,colver,coltman,colflesh,colcord,colavito,colar,coile,coggan,coenen,codling,coda,cockroft,cockrel,cockerill,cocca,coberley,clouden,clos,clish,clinkscale,clester,clammer,cittadino,citrano,ciresi,cillis,ciccarelli,ciborowski,ciarlo,ciardullo,chritton,chopp,chirco,chilcoat,chevarie,cheslak,chernak,chay,chatterjee,chatten,chatagnier,chastin,chappuis,channey,champlain,chalupsky,chalfin,chaffer,chadek,chadderton,cestone,cestero,cestari,cerros,cermeno,centola,cedrone,cayouette,cavan,cavaliero,casuse,castricone,castoreno,casten,castanada,castagnola,casstevens,cassanova,caspari,casher,cashatt,casco,casassa,casad,carville,cartland,cartegena,carsey,carsen,carrino,carrilo,carpinteyro,carmley,carlston,carlsson,cariddi,caricofe,carel,cardy,carducci,carby,carangelo,capriotti,capria,caprario,capelo,canul,cantua,cantlow,canny,cangialosi,canepa,candland,campolo,campi,camors,camino,camfield,camelo,camarero,camaeho,calvano,calliste,caldarella,calcutt,calcano,caissie,cager,caccamo,cabotage,cabble,byman,buzby,butkowski,bussler,busico,bushovisky,busbin,busard,busalacchi,burtman,burrous,burridge,burrer,burno,burin,burgette,burdock,burdier,burckhard,bunten,bungay,bundage,bumby,bultema,bulinski,bulan,bukhari,buganski,buerkle,buen,buehl,budzynski,buckham,bryk,brydon,bruyere,brunsvold,brunnett,brunker,brunfield,brumble,brue,brozina,brossman,brosey,brookens,broersma,brodrick,brockmeier,brockhouse,brisky,brinkly,brincefield,brighenti,brigante,brieno,briede,bridenbaugh,brickett,breske,brener,brenchley,breitkreutz,breitbart,breister,breining,breighner,breidel,brehon,breheny,breard,breakell,brazill,braymiller,braum,brau,brashaw,bransom,brandolino,brancato,branagan,braff,brading,bracker,brackenbury,bracher,braasch,boylen,boyda,boyanton,bowlus,bowditch,boutot,bouthillette,boursiquot,bourjolly,bouret,boulerice,bouer,bouchillon,bouchie,bottin,boteilho,bosko,bosack,borys,bors,borla,borjon,borghi,borah,booten,boore,bonuz,bonne,bongers,boneta,bonawitz,bonanni,bomer,bollen,bollard,bolla,bolio,boisseau,boies,boiani,bohorquez,boghossian,boespflug,boeser,boehl,boegel,bodrick,bodkins,bodenstein,bodell,bockover,bocci,bobbs,boals,boahn,boadway,bluma,bluett,bloor,blomker,blevens,blethen,bleecker,blayney,blaske,blasetti,blancas,blackner,bjorkquist,bjerk,bizub,bisono,bisges,bisaillon,birr,birnie,bires,birdtail,birdine,bina,billock,billinger,billig,billet,bigwood,bigalk,bielicki,biddick,biccum,biafore,bhagat,beza,beyah,bevier,bevell,beute,betzer,betthauser,bethay,bethard,beshaw,bertholf,bertels,berridge,bernot,bernath,bernabei,berkson,berkovitz,berkich,bergsten,berget,berezny,berdin,beougher,benthin,benhaim,benenati,benejan,bemiss,beloate,bellucci,bellotti,belling,bellido,bellaire,bellafiore,bekins,bekele,beish,behnken,beerly,beddo,becket,becke,bebeau,beauchaine,beaucage,beadling,beacher,bazar,baysmore".split(",")))];
ra=w.concat([function(b){var a,c,e,f,d,g,h,j,i,k,l,m,n,o,p,t;k=[];m=P(R(b));e=0;for(f=m.length;e<f;e++){o=m[e];if(O(o))break;h=0;for(d=w.length;h<d;h++){g=w[h];j=U(b,o);n=g(j);l=0;for(g=n.length;l<g;l++)if(j=n[l],t=b.slice(j.i,+j.j+1||9E9),t.toLowerCase()!==j.matched_word){i={};for(p in o)a=o[p],-1!==t.indexOf(p)&&(i[p]=a);j.l33t=!0;j.token=t;j.sub=i;t=j;var q=void 0,q=[];for(c in i)a=i[c],q.push(c+" -> "+a);t.sub_display=q.join(", ");k.push(j)}}}return k},function(b){var a,c,e,f,d,g;d=q(b,N);g=[];
e=0;for(f=d.length;e<f;e++)a=d[e],c=[a.i,a.j],a=c[0],c=c[1],g.push({pattern:"digits",i:a,j:c,token:b.slice(a,+c+1||9E9)});return g},function(b){var a,c,e,f,d,g;d=q(b,V);g=[];e=0;for(f=d.length;e<f;e++)a=d[e],c=[a.i,a.j],a=c[0],c=c[1],g.push({pattern:"year",i:a,j:c,token:b.slice(a,+c+1||9E9)});return g},function(b){return L(b).concat(K(b))},function(b){var a,c,e;e=[];for(a=0;a<b.length;){for(c=a+1;;)if(b.slice(c-1,+c+1||9E9),b.charAt(c-1)===b.charAt(c))c+=1;else{2<c-a&&e.push({pattern:"repeat",i:a,
j:c-1,token:b.slice(a,c),repeated_char:b.charAt(a)});break}a=c}return e},function(b){var a,c,e,f,d,g,h,j,i,k,l,m,n;j=[];for(d=0;d<b.length;){g=d+1;m=n=i=null;for(l in y)if(k=y[l],e=function(){var c,e,f,h;f=[b.charAt(d),b.charAt(g)];h=[];c=0;for(e=f.length;c<e;c++)a=f[c],h.push(k.indexOf(a));return h}(),f=e[0],e=e[1],-1<f&&-1<e&&(f=e-f,1===f||-1===f)){i=k;n=l;m=f;break}if(i)for(;;)if(f=b.slice(g-1,+g+1||9E9),h=f[0],c=f[1],e=function(){var b,d,e,f;e=[h,c];f=[];b=0;for(d=e.length;b<d;b++)a=e[b],f.push(k.indexOf(a));
return f}(),f=e[0],e=e[1],e-f===m)g+=1;else{2<g-d&&j.push({pattern:"sequence",i:d,j:g-1,token:b.slice(d,g),sequence_name:n,sequence_space:i.length,ascending:1===m});break}d=g}return j},function(b){var a,c,e;e=[];for(c in G)a=G[c],A(e,T(b,a,c));return e}]);G={qwerty:E,dvorak:{"!":["`~",null,null,"2@","'\"",null],'"':[null,"1!","2@",",<","aA",null],"#":["2@",null,null,"4$",".>",",<"],$:["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"&":["6^",null,null,"8*","gG","fF"],"'":[null,
"1!","2@",",<","aA",null],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"*":["7&",null,null,"9(","cC","gG"],"+":["/?","]}",null,"\\|",null,"-_"],",":"'\",2@,3#,.>,oO,aA".split(","),"-":["sS","/?","=+",null,null,"zZ"],".":",< 3# 4$ pP eE oO".split(" "),"/":"lL,[{,]},=+,-_,sS".split(","),"0":["9(",null,null,"[{","lL","rR"],1:["`~",null,null,"2@","'\"",null],2:["1!",null,null,"3#",",<","'\""],3:["2@",null,null,"4$",".>",",<"],4:["3#",null,null,"5%","pP",".>"],5:["4$",null,null,
"6^","yY","pP"],6:["5%",null,null,"7&","fF","yY"],7:["6^",null,null,"8*","gG","fF"],8:["7&",null,null,"9(","cC","gG"],9:["8*",null,null,"0)","rR","cC"],":":[null,"aA","oO","qQ",null,null],";":[null,"aA","oO","qQ",null,null],"<":"'\",2@,3#,.>,oO,aA".split(","),"=":["/?","]}",null,"\\|",null,"-_"],">":",< 3# 4$ pP eE oO".split(" "),"?":"lL,[{,]},=+,-_,sS".split(","),"@":["1!",null,null,"3#",",<","'\""],A:[null,"'\"",",<","oO",";:",null],B:["xX","dD","hH","mM",null,null],C:"gG,8*,9(,rR,tT,hH".split(","),
D:"iI,fF,gG,hH,bB,xX".split(","),E:"oO,.>,pP,uU,jJ,qQ".split(","),F:"yY,6^,7&,gG,dD,iI".split(","),G:"fF,7&,8*,cC,hH,dD".split(","),H:"dD,gG,cC,tT,mM,bB".split(","),I:"uU,yY,fF,dD,xX,kK".split(","),J:["qQ","eE","uU","kK",null,null],K:["jJ","uU","iI","xX",null,null],L:"rR,0),[{,/?,sS,nN".split(","),M:["bB","hH","tT","wW",null,null],N:"tT,rR,lL,sS,vV,wW".split(","),O:"aA ,< .> eE qQ ;:".split(" "),P:".>,4$,5%,yY,uU,eE".split(","),Q:[";:","oO","eE","jJ",null,null],R:"cC,9(,0),lL,nN,tT".split(","),S:"nN,lL,/?,-_,zZ,vV".split(","),
T:"hH,cC,rR,nN,wW,mM".split(","),U:"eE,pP,yY,iI,kK,jJ".split(","),V:["wW","nN","sS","zZ",null,null],W:["mM","tT","nN","vV",null,null],X:["kK","iI","dD","bB",null,null],Y:"pP,5%,6^,fF,iI,uU".split(","),Z:["vV","sS","-_",null,null,null],"[":["0)",null,null,"]}","/?","lL"],"\\":["=+",null,null,null,null,null],"]":["[{",null,null,null,"=+","/?"],"^":["5%",null,null,"7&","fF","yY"],_:["sS","/?","=+",null,null,"zZ"],"`":[null,null,null,"1!",null,null],a:[null,"'\"",",<","oO",";:",null],b:["xX","dD","hH",
"mM",null,null],c:"gG,8*,9(,rR,tT,hH".split(","),d:"iI,fF,gG,hH,bB,xX".split(","),e:"oO,.>,pP,uU,jJ,qQ".split(","),f:"yY,6^,7&,gG,dD,iI".split(","),g:"fF,7&,8*,cC,hH,dD".split(","),h:"dD,gG,cC,tT,mM,bB".split(","),i:"uU,yY,fF,dD,xX,kK".split(","),j:["qQ","eE","uU","kK",null,null],k:["jJ","uU","iI","xX",null,null],l:"rR,0),[{,/?,sS,nN".split(","),m:["bB","hH","tT","wW",null,null],n:"tT,rR,lL,sS,vV,wW".split(","),o:"aA ,< .> eE qQ ;:".split(" "),p:".>,4$,5%,yY,uU,eE".split(","),q:[";:","oO","eE","jJ",
null,null],r:"cC,9(,0),lL,nN,tT".split(","),s:"nN,lL,/?,-_,zZ,vV".split(","),t:"hH,cC,rR,nN,wW,mM".split(","),u:"eE,pP,yY,iI,kK,jJ".split(","),v:["wW","nN","sS","zZ",null,null],w:["mM","tT","nN","vV",null,null],x:["kK","iI","dD","bB",null,null],y:"pP,5%,6^,fF,iI,uU".split(","),z:["vV","sS","-_",null,null,null],"{":["0)",null,null,"]}","/?","lL"],"|":["=+",null,null,null,null,null],"}":["[{",null,null,null,"=+","/?"],"~":[null,null,null,"1!",null,null]},keypad:F,mac_keypad:{"*":["/",null,null,null,
null,null,"-","9"],"+":["6","9","-",null,null,null,null,"3"],"-":["9","/","*",null,null,null,"+","6"],".":["0","2","3",null,null,null,null,null],"/":["=",null,null,null,"*","-","9","8"],"0":[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6","+",null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5","8","9","-","+",null,"3","2"],7:[null,null,null,"=","8","5","4",null],8:["7",null,
"=","/","9","6","5","4"],9:"8,=,/,*,-,+,6,5".split(","),"=":[null,null,null,null,"/","9","8","7"]}};u=function(b){var a,c,e,f,d;a=0;for(e in b)d=b[e],a+=function(){var a,b,c;c=[];a=0;for(b=d.length;a<b;a++)(f=d[a])&&c.push(f);return c}().length;return a/=function(){var a;a=[];for(c in b)a.push(c);return a}().length};oa=u(E);qa=u(F);na=function(){var b;b=[];for(x in E)b.push(x);return b}().length;pa=function(){var b;b=[];for(x in F)b.push(x);return b}().length;H=function(){return(new Date).getTime()};
u=function(b,a){var c,e;null==a&&(a=[]);e=H();c=Q(b,ra.concat([p("user_inputs",s(a.map(function(a){return a.toLowerCase()})))]));c=ia(b,c);c.calc_time=H()-e;return c};"undefined"!==typeof window&&null!==window?(window.zxcvbn=u,"function"===typeof window.zxcvbn_load_hook&&window.zxcvbn_load_hook()):"undefined"!==typeof exports&&null!==exports&&(exports.zxcvbn=u)})();
|
test/react-native-cli/features/fixtures/rn0_67_hermes/App.js | bugsnag/bugsnag-js | import React from 'react';
import Bugsnag from "@bugsnag/react-native";
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Button, NativeModules
} from 'react-native';
import {
Colors
} from 'react-native/Libraries/NewAppScreen';
function jsNotify() {
try { // execute crashy code
iMadeThisUp();
} catch (error) {
console.log('Bugsnag.notify JS error')
Bugsnag.notify(error);
}
}
function nativeNotify() {
console.log('Bugsnag.notify native error')
NativeModules.CrashyCrashy.handledError()
}
const App: () => React$Node = () => {
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={styles.scrollView}>
{global.HermesInternal == null ? null : (
<View style={styles.engine}>
<Text style={styles.footer}>Engine: Hermes</Text>
</View>
)}
<View style={styles.body}>
<Text>React Native CLI end-to-end test app</Text>
<Button style={styles.clickyButton}
accessibilityLabel='js_notify'
title='JS Notify'
onPress={jsNotify}/>
<Button style={styles.clickyButton}
accessibilityLabel='native_notify'
title='Native Notify'
onPress={nativeNotify}/>
</View>
</ScrollView>
</SafeAreaView>
</>
);
};
const styles = StyleSheet.create({
scrollView: {
backgroundColor: Colors.lighter,
},
engine: {
position: 'absolute',
right: 0,
},
body: {
backgroundColor: Colors.white,
},
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
color: Colors.black,
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
color: Colors.dark,
},
highlight: {
fontWeight: '700',
},
footer: {
color: Colors.dark,
fontSize: 12,
fontWeight: '600',
padding: 4,
paddingRight: 12,
textAlign: 'right',
},
clickyButton: {
backgroundColor: '#acbcef',
borderWidth: 0.5,
borderColor: '#000',
borderRadius: 4,
margin: 5,
padding: 5
}
});
export default App;
|
app/js/views/components/min-header-component.js | mskalandunas/solstice | import React from 'react';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
const MinHeaderComponent = React.createClass({
render: () => {
return (
<section>
<nav className="nav" style={{position: 'fixed', width: '100%'}}>
<div className="nav-left">
<Link className="nav-item" to="/">
<img src="/img/balloon.png" style={{paddingRight: '5px'}} />
<h1 className="logo">Baby Dump</h1>
</Link>
</div>
</nav>
</section>
)
}
});
export default MinHeaderComponent;
|
ajax/libs/react-widgets/3.4.0/react-widgets-moment.js | froala/cdnjs | /*! (c) 2016 Jason Quense | https://github.com/jquense/react-widgets/blob/master/License.txt */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("ReactWidgets"));
else if(typeof define === 'function' && define.amd)
define(["ReactWidgets"], factory);
else if(typeof exports === 'object')
exports["ReactWidgets"] = factory(require("ReactWidgets"));
else
root["ReactWidgets"] = factory(root["ReactWidgets"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_91__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = function (moment) {
if (typeof moment !== 'function') throw new TypeError('You must provide a valid moment object');
var localField = typeof moment().locale === 'function' ? 'locale' : 'lang',
hasLocaleData = !!moment.localeData;
if (!hasLocaleData) throw new TypeError('The Moment localizer depends on the `localeData` api, please provide a moment object v2.2.0 or higher');
function getMoment(culture, value, format) {
return culture ? moment(value, format)[localField](culture) : moment(value, format);
}
function endOfDecade(date) {
return moment(date).add(10, 'year').add(-1, 'millisecond').toDate();
}
function endOfCentury(date) {
return moment(date).add(100, 'year').add(-1, 'millisecond').toDate();
}
var localizer = {
formats: {
date: 'L',
time: 'LT',
default: 'lll',
header: 'MMMM YYYY',
footer: 'LL',
weekday: 'dd',
dayOfMonth: 'DD',
month: 'MMM',
year: 'YYYY',
decade: function decade(date, culture, localizer) {
return localizer.format(date, 'YYYY', culture) + ' - ' + localizer.format(endOfDecade(date), 'YYYY', culture);
},
century: function century(date, culture, localizer) {
return localizer.format(date, 'YYYY', culture) + ' - ' + localizer.format(endOfCentury(date), 'YYYY', culture);
}
},
firstOfWeek: function firstOfWeek(culture) {
return moment.localeData(culture).firstDayOfWeek();
},
parse: function parse(value, format, culture) {
if (!value) return null;
var m = getMoment(culture, value, format);
if (m.isValid()) return m.toDate();
return null;
},
format: function format(value, _format, culture) {
return getMoment(culture, value).format(_format);
}
};
_configure2.default.setDateLocalizer(localizer);
return localizer;
};
var _configure = __webpack_require__(91);
var _configure2 = _interopRequireDefault(_configure);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports['default'];
/***/ },
/***/ 91:
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_91__;
/***/ }
/******/ })
});
; |
components/About/About.js | falconi1812/falconi | import React, { Component } from 'react';
import { LINKS } from 'config';
export default class About extends Component {
onClickFindOutMoreButton = () =>
analytics.track("Link Find Out More Requested", { platform: "www"});
render () {
return (
<section id={this.props.id} className="gc-section gc-g-service aligner">
<div className="container">
<h2 className="gc-section-title text-center">falconi IS A G SERVICE.</h2>
<div className="col-md-10 col-md-offset-1 flex-container">
<div className="flex gc-growth-container">
<div className="gc-g-logo text-center aligner">
<img alt="Github" src="/static/logos/logo-g-transparent.png" />
</div>
<span className="title">Where growth happens.</span>
<p>We support open source project and we want to see the them growth as much as possible.</p>
<a href={LINKS.GITHUB} onClick={this.onClickFindOutMoreButton} target="_blank" rel="noopener">
<button className="gc-button">Find out more</button>
</a>
</div>
<div className="flex gc-image-container">
<img className="img-responsive full-width" alt="Front end cool guy" src="/static/images/front-end-conftocat.png" />
</div>
</div>
</div>
</section>
)
}
}
|
app/components/Admin/Main/DashboardLayout/index.js | VineRelay/VineRelayStore | import React from 'react';
import PropTypes from 'prop-types';
import { createFragmentContainer, graphql } from 'react-relay';
import styled from 'styled-components';
import AppBar from 'material-ui/AppBar';
import Avatar from 'material-ui/Avatar';
import Drawer from 'material-ui/Drawer';
import Link from 'app/components/Admin/Main/Link';
import MenuItem from 'material-ui/MenuItem';
const PageWrapper = styled.div`
`;
const HeaderWrapper = styled.div`
display: flex;
align-items: center;
width: 100%;
height: ${(props) => props.theme.headerHeight}px;
justify-content: space-between;
color: #FFF;
`;
const LogoWrapper = styled.h2`
display: flex;
height: 100%;
align-items: center;
`;
const AvatarWrapper = styled.div`
display: flex;
align-items: center;
height: 100%;
`;
const ViewerDisplayName = styled.h3`
margin-right: 10px;
`;
const DrawerHeader = styled.div`
display: flex;
flex-direction: column;
margin: 16px;
`;
const DrawerHeaderTitle = styled.h2`
margin: 0;
`;
const DrawerHeaderDetails = styled.p`
margin: 0;
`;
const Divider = styled.div`
height: 1px;
background: #EEE;
`;
const ContentWrapper = styled.div`
margin-top: 16px;
`;
class DashboardLayout extends React.Component {
componentWillMount() {
this.setState({
drawerOpened: false,
});
}
onRequestChange = (opened) => {
this.setState({
drawerOpened: opened,
});
}
openDrawer = () => {
this.setState({
drawerOpened: true,
});
}
render() {
const {
viewer,
children,
} = this.props;
const {
drawerOpened,
} = this.state;
return (
<PageWrapper>
<Drawer
docked={false}
onRequestChange={this.onRequestChange}
open={drawerOpened}
>
<DrawerHeader>
<DrawerHeaderTitle>
Admin Menu
</DrawerHeaderTitle>
<DrawerHeaderDetails>
{viewer.displayName}
</DrawerHeaderDetails>
</DrawerHeader>
<Divider />
<Link to="/admin/"><MenuItem>Dashboard</MenuItem></Link>
<Link to="/admin/products"><MenuItem>Products</MenuItem></Link>
<Link to="/admin/categories"><MenuItem>Categories</MenuItem></Link>
<Link to="/admin/brands"><MenuItem>Brands</MenuItem></Link>
<Link to="/admin/orders"><MenuItem>Orders</MenuItem></Link>
</Drawer>
<AppBar
onLeftIconButtonTouchTap={this.openDrawer}
>
<HeaderWrapper>
<LogoWrapper>RelayStore</LogoWrapper>
<AvatarWrapper>
<ViewerDisplayName>
{viewer.displayName}
</ViewerDisplayName>
<Avatar backgroundColor="#FFF" color="#333">
{viewer.displayName.charAt(0)}
</Avatar>
</AvatarWrapper>
</HeaderWrapper>
</AppBar>
<ContentWrapper>
{children}
</ContentWrapper>
</PageWrapper>
);
}
}
DashboardLayout.propTypes = {
viewer: PropTypes.object.isRequired,
children: PropTypes.any.isRequired,
};
export default createFragmentContainer(
DashboardLayout,
graphql`
fragment DashboardLayout_viewer on User {
displayName
firstName
lastName
email
}
`
);
|
src/apps/expenses/components/ExpensesSection.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { get } from 'lodash';
import withIntl from '../../../lib/withIntl';
import NotFound from '../../../components/NotFound';
import { formatCurrency } from '../../../lib/utils';
import SectionTitle from '../../../components/SectionTitle';
import ExpensesWithData from './ExpensesWithData';
import TransactionsWithData from './TransactionsWithData';
import LinkButton from '../../../components/LinkButton';
class ExpensesSection extends React.Component {
static propTypes = {
collective: PropTypes.object.isRequired, // collective.id
LoggedInUser: PropTypes.object,
limit: PropTypes.number,
};
constructor(props) {
super(props);
this.totalExpenses = get(props.collective, 'stats.expenses.all');
this.totalTransactions = get(props.collective, 'stats.transactions.all');
}
render() {
const { collective, LoggedInUser } = this.props;
let action;
if (LoggedInUser && LoggedInUser.canEditCollective(collective)) {
action = {
href: `/${collective.slug}/expenses/new`,
label: <FormattedMessage id="expense.new.submit" defaultMessage="Submit Expense" />,
};
}
if (!collective) return <NotFound />;
// We don't show the Budget section on event if there is no transaction
if (collective.type === 'EVENT' && this.totalTransactions === 0) {
return <div />;
}
return (
<section id="budget" className="clear">
<div className="content">
<SectionTitle
section="budget"
values={{
balance: formatCurrency(get(collective, 'stats.balance'), collective.currency),
}}
action={action}
/>
<div className="ExpensesSection">
<style jsx>
{`
.columns {
display: flex;
max-width: 1080px;
}
.col {
width: 50%;
max-width: 488px;
min-width: 300px;
}
.col.first {
margin-right: 104px;
}
.actions {
text-align: center;
font-size: 1.4rem;
}
.col .header {
display: flex;
align-items: baseline;
justify-content: space-between;
}
h2 {
line-height: 24px;
color: black;
font-weight: 500;
font-size: 2rem;
margin-bottom: 4.8rem;
}
@media (max-width: 660px) {
.columns {
flex-direction: column;
}
.col {
width: 100%;
}
.col.first {
margin-right: 0;
margin-bottom: 4rem;
}
h2 {
margin-bottom: 1.2rem;
}
}
`}
</style>
<div className="columns">
{this.totalExpenses > 0 && (
<div id="expenses" className="first col">
<div className="header">
<h2>
<FormattedMessage
id="collective.expenses.title"
values={{ n: this.totalExpenses }}
defaultMessage="{n, plural, one {Latest expense} other {Latest expenses}}"
/>
</h2>
{this.totalExpenses >= 5 && (
<LinkButton className="light ViewAllExpensesBtn" href={`${collective.path}/expenses`}>
<FormattedMessage id="expenses.viewAll" defaultMessage="View All Expenses" />
</LinkButton>
)}
</div>
<ExpensesWithData collective={collective} LoggedInUser={LoggedInUser} view="compact" limit={5} />
</div>
)}
{this.totalTransactions > 0 && (
<div id="transactions" className="col">
<div className="header">
<h2>
<FormattedMessage
id="collective.transactions.title"
values={{ n: this.totalTransactions }}
defaultMessage="{n, plural, one {Latest transaction} other {Latest transactions}}"
/>
</h2>
{this.totalTransactions >= 5 && (
<LinkButton className="light ViewAllTransactionsBtn" href={`${collective.path}/transactions`}>
<FormattedMessage id="transactions.viewAll" defaultMessage="View All Transactions" />
</LinkButton>
)}
</div>
<TransactionsWithData
collective={collective}
LoggedInUser={LoggedInUser}
limit={5}
showCSVlink={false}
/>
</div>
)}
</div>
</div>
</div>
</section>
);
}
}
export default withIntl(ExpensesSection);
|
src/svg-icons/action/open-in-new.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenInNew = (props) => (
<SvgIcon {...props}>
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>
</SvgIcon>
);
ActionOpenInNew = pure(ActionOpenInNew);
ActionOpenInNew.displayName = 'ActionOpenInNew';
ActionOpenInNew.muiName = 'SvgIcon';
export default ActionOpenInNew;
|
src/components/Hr/index.js | BoilerMake/frontend | import React from 'react';
import './_common.Hr.source.scss';
const Hr = ({ children }) => {
return (
<div className="c-hr">
<span className="c-hr__text">{children}</span>
</div>
);
};
export default Hr;
|
ajax/libs/material-ui/4.9.2/es/ExpansionPanelActions/ExpansionPanelActions.js | cdnjs/cdnjs | import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
export const styles = {
/* Styles applied to the root element. */
root: {
display: 'flex',
alignItems: 'center',
padding: 8,
justifyContent: 'flex-end'
},
/* Styles applied to the root element if `disableSpacing={false}`. */
spacing: {
'& > :not(:first-child)': {
marginLeft: 8
}
}
};
const ExpansionPanelActions = React.forwardRef(function ExpansionPanelActions(props, ref) {
const {
classes,
className,
disableSpacing = false
} = props,
other = _objectWithoutPropertiesLoose(props, ["classes", "className", "disableSpacing"]);
return React.createElement("div", _extends({
className: clsx(classes.root, className, !disableSpacing && classes.spacing),
ref: ref
}, other));
});
process.env.NODE_ENV !== "production" ? ExpansionPanelActions.propTypes = {
/**
* The content of the component.
*/
children: PropTypes.node.isRequired,
/**
* Override or extend the styles applied to the component.
* See [CSS API](#css) below for more details.
*/
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className: PropTypes.string,
/**
* If `true`, the actions do not have additional margin.
*/
disableSpacing: PropTypes.bool
} : void 0;
export default withStyles(styles, {
name: 'MuiExpansionPanelActions'
})(ExpansionPanelActions); |
packages/material-ui/src/Zoom/Zoom.js | allanalexandre/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { Transition } from 'react-transition-group';
import { duration } from '../styles/transitions';
import withTheme from '../styles/withTheme';
import { reflow, getTransitionProps } from '../transitions/utils';
import { useForkRef } from '../utils/reactHelpers';
const styles = {
entering: {
transform: 'scale(1)',
},
entered: {
transform: 'scale(1)',
},
};
const defaultTimeout = {
enter: duration.enteringScreen,
exit: duration.leavingScreen,
};
/**
* The Zoom transition can be used for the floating variant of the
* [Button](/components/buttons/#floating-action-buttons) component.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*/
const Zoom = React.forwardRef(function Zoom(props, ref) {
const {
children,
in: inProp,
onEnter,
onExit,
style,
theme,
timeout = defaultTimeout,
...other
} = props;
const handleRef = useForkRef(children.ref, ref);
const handleEnter = node => {
reflow(node); // So the animation always start from the start.
const transitionProps = getTransitionProps(
{ style, timeout },
{
mode: 'enter',
},
);
node.style.webkitTransition = theme.transitions.create('transform', transitionProps);
node.style.transition = theme.transitions.create('transform', transitionProps);
if (onEnter) {
onEnter(node);
}
};
const handleExit = node => {
const transitionProps = getTransitionProps(
{ style, timeout },
{
mode: 'exit',
},
);
node.style.webkitTransition = theme.transitions.create('transform', transitionProps);
node.style.transition = theme.transitions.create('transform', transitionProps);
if (onExit) {
onExit(node);
}
};
return (
<Transition
appear
in={inProp}
onEnter={handleEnter}
onExit={handleExit}
timeout={timeout}
{...other}
>
{(state, childProps) => {
return React.cloneElement(children, {
style: {
transform: 'scale(0)',
visibility: state === 'exited' && !inProp ? 'hidden' : undefined,
...styles[state],
...style,
...children.props.style,
},
ref: handleRef,
...childProps,
});
}}
</Transition>
);
});
Zoom.propTypes = {
/**
* A single child content element.
*/
children: PropTypes.element,
/**
* If `true`, the component will transition in.
*/
in: PropTypes.bool,
/**
* @ignore
*/
onEnter: PropTypes.func,
/**
* @ignore
*/
onExit: PropTypes.func,
/**
* @ignore
*/
style: PropTypes.object,
/**
* @ignore
*/
theme: PropTypes.object.isRequired,
/**
* The duration for the transition, in milliseconds.
* You may specify a single timeout for all transitions, or individually with an object.
*/
timeout: PropTypes.oneOfType([
PropTypes.number,
PropTypes.shape({ enter: PropTypes.number, exit: PropTypes.number }),
]),
};
export default withTheme(Zoom);
|
ajax/libs/reactable/0.8.0/reactable.js | hasantayyar/cdnjs | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/** @jsx React.DOM */
"use strict";
// Array.prototype.map polyfill - see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Polyfill
if (!Array.prototype.map) {
Array.prototype.map = function(fun /*, thisArg */) {
"use strict";
if (this === void 0 || this === null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun !== "function") {
throw new TypeError();
}
var res = new Array(len);
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
for (var i = 0; i < len; i++) {
// NOTE: Absolute correctness would demand Object.defineProperty
// be used. But this method is fairly new, and failure is
// possible only if Object.prototype or Array.prototype
// has a property |i| (very unlikely), so use a less-correct
// but more portable alternative.
if (i in t) {
res[i] = fun.call(thisArg, t[i], i, t);
}
}
return res;
};
}
// Array.prototype.indexOf polyfill for IE8
if (!Array.prototype.indexOf)
{
Array.prototype.indexOf = function(elt /*, from*/)
{
var len = this.length >>> 0;
var from = Number(arguments[1]) || 0;
from = (from < 0)
? Math.ceil(from)
: Math.floor(from);
if (from < 0) {
from += len;
}
for (; from < len; from++)
{
if (from in this && this[from] === elt) {
return from;
}
}
return -1;
};
}
// Array.prototype.find polyfill - see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
if (!Array.prototype.find) {
Object.defineProperty(Array.prototype, 'find', {
enumerable: false,
configurable: true,
writable: true,
value: function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;
for (var i = 0; i < length; i++) {
if (i in list) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
}
return undefined;
}
});
}
if (!Array.isArray) {
Array.isArray = function (value) {
return Object.prototype.toString.call(value) === '[object Array]';
};
}
function Unsafe(content) {
this.content = content;
}
Unsafe.prototype.toString = function() {
return this.content;
}
exports.unsafe = function(str) {
return new Unsafe(str);
}
exports.Sort = {
Numeric: function(a, b) {
var valA = parseFloat(a.toString().replace(',', ''));
var valB = parseFloat(b.toString().replace(',', ''));
// Sort non-numeric values alphabetically at the bottom of the list
if (isNaN(valA) && isNaN(valB)) {
valA = a;
valB = b;
} else {
if (isNaN(valA)) {
return 1;
}
if (isNaN(valB)) {
return -1;
}
}
if (valA < valB) {
return -1;
}
if (valA > valB) {
return 1;
}
return 0;
},
Currency: function(a, b) {
// Parse out dollar signs, then do a regular numeric sort
// TODO: handle non-American currency
if (a[0] === '$') {
a = a.substring(1);
}
if (b[0] === '$') {
b = b.substring(1);
}
return exports.Sort.Numeric(a, b);
},
Date: function(a, b) {
// Note: this function tries to do a standard javascript string -> date conversion
// If you need more control over the date string format, consider using a different
// date library and writing your own function
var valA = Date.parse(a);
var valB = Date.parse(b);
// Handle non-date values with numeric sort
// Sort non-numeric values alphabetically at the bottom of the list
if (isNaN(valA) || isNaN(valB)) {
return exports.Sort.Numeric(a, b);
}
if (valA > valB) {
return 1;
}
if (valB > valA) {
return -1;
}
return 0;
},
CaseInsensitive: function(a, b) {
var valA = a.toLowerCase();
var valB = b.toLowerCase();
if(valA > valB) {
return 1;
}
if(valB > valA) {
return -1;
}
return 0;
},
};
var Td = exports.Td = React.createClass({displayName: 'Td',
handleClick: function(e){
if (typeof this.props.handleClick !== 'undefined') {
return this.props.handleClick(e, this);
}
},
render: function() {
var tdProps = {
'data-column': this.props.column.key,
className: this.props.className,
onClick: this.handleClick
}
// Attach any properties on the column to this Td object to allow things like custom event handlers
for (var key in this.props.column) {
if (key !== 'key' && key !== 'name') {
tdProps[key] = this.props.column[key];
}
}
var data = this.props.data;
if (
typeof(this.props.data) === 'undefined' &&
typeof(this.props.children) === 'string'
) {
data = this.props.children;
}
if (typeof(this.props.children) !== 'undefined') {
if (this.props.children instanceof Unsafe) {
tdProps.dangerouslySetInnerHTML= { __html: this.props.children.toString() }
} else {
tdProps.children = data;
}
}
return React.DOM.td(tdProps);
}
});
var Tr = exports.Tr = React.createClass({displayName: 'Tr',
statics: {
childNode: Td,
dataType: 'object'
},
getDefaultProps: function() {
var defaultProps = {
childNode: Td,
columns: [],
data: {}
}
return defaultProps;
},
render: function() {
var children = this.props.children || [];
if (
this.props.data &&
this.props.columns &&
typeof this.props.columns.map === 'function'
) {
children = children.concat(this.props.columns.map(function(column, i) {
if (this.props.data.hasOwnProperty(column.key)) {
return Td({column: column, key: column.key}, this.props.data[column.key]);
} else {
return Td({column: column, key: column.key});
}
}.bind(this)));
}
return this.transferPropsTo(
React.DOM.tr(null, children)
);
}
});
var Thead = exports.Thead = React.createClass({displayName: 'Thead',
getColumns: function() {
return React.Children.map(this.props.children, function(th) {
if (typeof th.props.children === 'string') {
return th.props.children;
} else {
throw new TypeError('<th> must have a string child');
}
});
},
render: function() {
return this.transferPropsTo(
React.DOM.thead(null,
this.props.filtering === true ?
Filterer({
colSpan: this.props.columns.length,
onFilter: this.props.onFilter}) : '',
React.DOM.tr({className: "reactable-column-header"},
this.props.columns.map(function(column, index) {
var sortClass = '';
if (this.props.sort.column === column.key) {
sortClass = 'reactable-header-sort';
if (this.props.sort.direction === 1) {
sortClass += '-asc';
}
else {
sortClass += '-desc';
}
}
return (
React.DOM.th({
className: sortClass,
key: index,
onClick: function(){ this.props.onSort(column.key) }.bind(this)}, column.label)
);
}.bind(this))
)
)
);
}
});
var Th = exports.Th = React.createClass({displayName: 'Th',
render: function() {
return this.transferPropsTo(React.DOM.th(null, this.props.children));
}
});
var FiltererInput = React.createClass({displayName: 'FiltererInput',
render: function() {
return (
React.DOM.input({type: "text", className: "reactable-filter-input",
onKeyUp: function(){
this.props.onFilter(this.getDOMNode().value);
}.bind(this)})
);
},
});
var Filterer = React.createClass({displayName: 'Filterer',
render: function() {
if (typeof this.props.colSpan === 'undefined') {
throw new TypeError('Must pass a colSpan argument to Filterer');
}
return (
React.DOM.tr({className: "reactable-filterer"},
React.DOM.td({colSpan: this.props.colSpan},
FiltererInput({onFilter: this.props.onFilter})
)
)
);
},
});
var Paginator = React.createClass({displayName: 'Paginator',
render: function() {
if (typeof this.props.colSpan === 'undefined') {
throw new TypeError('Must pass a colSpan argument to Paginator');
}
if (typeof this.props.numPages === 'undefined') {
throw new TypeError('Must pass a non-zero numPages argument to Paginator');
}
if (typeof this.props.currentPage === 'undefined') {
throw new TypeError('Must pass a currentPage argument to Paginator');
}
var pageButtons = [];
for (var i = 0; i < this.props.numPages; i++) {
var pageNum = i;
var className = "reactable-page-button";
if (this.props.currentPage === i) {
className += " reactable-current-page";
}
pageButtons.push(
React.DOM.a({className: className, key: i,
// create function to get around for-loop closure issue
onClick: (function(pageNum) {
return function() {
this.props.onPageChange(pageNum);
}.bind(this)
}.bind(this))(i)}, i + 1)
);
}
return (
React.DOM.tbody({className: "reactable-pagination"},
React.DOM.tr(null,
React.DOM.td({colSpan: this.props.colSpan},
pageButtons
)
)
)
);
}
});
var Table = exports.Table = React.createClass({displayName: 'Table',
// Translate a user defined column array to hold column objects if strings are specified
// (e.g. ['column1'] => [{key: 'column1', label: 'column1'}])
translateColumnsArray: function(columns) {
return columns.map(function(column, i) {
if (typeof(column) === 'string') {
return {
key: column,
label: column
};
} else {
if (typeof(column.sortable) !== 'undefined') {
var sortFunction = column.sortable === true ? 'default' : column.sortable;
this._sortable[column.key] = sortFunction;
}
return column;
}
}.bind(this));
},
parseChildData: function(props) {
var data = [];
// Transform any children back to a data array
if (typeof(props.children) !== 'undefined') {
React.Children.forEach(props.children, function(child) {
// TODO: figure out a new way to determine the type of a component
/*
if (child.type.ConvenienceConstructor !== Tr) {
return; // (continue)
}
*/
var childData = child.props.data || {};
// Given our modification of Array.prototype, this is the
// best way to check if child.props.children is an array
if (
typeof(child.props.children) !== 'undefined' &&
typeof(child.props.children.map) === 'function'
) {
var childChildren = child.props.children;
for (var i = 0; i < childChildren.length; i++) {
var descendant = childChildren[i];
// TODO
/* if (descendant.type.ConvenienceConstructor === Td) { */
if (true) {
if (typeof(descendant.props.column) !== 'undefined') {
if (typeof(descendant.props.data) !== 'undefined') {
childData[descendant.props.column] =
descendant.props.data;
} else if (
typeof(descendant.props.children) !== 'undefined'
) {
childData[descendant.props.column] =
descendant.props.children;
} else {
console.warn('exports.Td specified without ' +
'a `data` property or children, ' +
'ignoring');
}
} else {
console.warn('exports.Td specified without a ' +
'`column` property, ignoring');
}
}
}
}
data.push(childData);
}.bind(this));
}
return data;
},
initialize: function(props) {
this.data = props.data || [];
this.data = this.data.concat(this.parseChildData(props));
this.initializeSorts(props);
},
initializeSorts: function() {
this._sortable = {};
// Transform sortable properties into a more friendly list
for (var i in this.props.sortable) {
var column = this.props.sortable[i];
var columnName, sortFunction;
if (column instanceof Object) {
if (typeof(column.column) !== 'undefined') {
columnName = column.column;
} else {
console.warn('Sortable column specified without column name');
return;
}
if (typeof(column.sortFunction) !== 'undefined' && column.sortFunction instanceof Function) {
sortFunction = column.sortFunction;
} else {
sortFunction = 'default';
}
} else {
columnName = column;
sortFunction = 'default';
}
this._sortable[columnName] = sortFunction;
}
},
getDefaultProps: function() {
var defaultProps = {
columns: [],
sortable: [],
filterable: [],
defaultSort: false,
itemsPerPage: 0,
}
return defaultProps;
},
getInitialState: function() {
var initialState = {
currentPage: 0,
currentSort: {
column: null,
direction: 1,
},
filter: '',
}
// Set the state of the current sort to the default sort
if (this.props.defaultSort !== false) {
var column = this.props.defaultSort;
var currentSort = {};
if (column instanceof Object) {
var columnName, sortDirection;
if (typeof(column.column) !== 'undefined') {
columnName = column.column;
} else {
console.warn('Default column specified without column name');
return;
}
if (typeof(column.direction) !== 'undefined') {
if (column.direction === 1 || column.direction === 'asc') {
sortDirection = 1;
} else if (column.direction === -1 || column.direction === 'desc') {
sortDirection = -1;
} else {
console.warn('Invalid default sort specified. Defaulting to ascending');
sortDirection = 1;
}
} else {
sortFunction = 1;
}
} else {
columnName = column;
sortDirection = 1;
}
initialState.currentSort = {
column: columnName,
direction: sortDirection
};
}
return initialState;
},
componentWillMount: function() {
this.initialize(this.props);
this.sortByCurrentSort();
},
componentWillReceiveProps: function(nextProps) {
this.initialize(nextProps);
this.sortByCurrentSort();
},
onPageChange: function(page) {
this.setState({ currentPage: page });
},
onFilter: function(filter) {
this.setState({ filter: filter });
},
applyFilter: function(filter, children) {
// Helper function to apply filter text to a list of table rows
var filter = filter.toLowerCase();
var matchedChildren = [];
for (var i = 0; i < children.length; i++) {
var data = children[i].props.data;
for (var j = 0; j < this.props.filterable.length; j++) {
var filterColumn = this.props.filterable[j];
if (
typeof(data[filterColumn]) !== 'undefined' &&
data[filterColumn].toString().toLowerCase().indexOf(filter) > -1
) {
matchedChildren.push(children[i]);
break;
}
}
}
return matchedChildren;
},
sortByCurrentSort: function(){
// Apply a sort function according to the current sort in the state.
// This allows us to perform a default sort even on a non sortable column.
var currentSort = this.state.currentSort;
if (currentSort.column === null) {
return;
}
this.data.sort(function(a, b){
var keyA = a[currentSort.column];
keyA = keyA ? keyA.toString() : '';
var keyB = b[currentSort.column];
keyB = keyB ? keyB.toString() : '';
// Default sort
if (this._sortable[currentSort.column] === 'default') {
// Reverse direction if we're doing a reverse sort
if (keyA < keyB) {
return -1 * currentSort.direction;
}
if (keyA > keyB) {
return 1 * currentSort.direction;
}
return 0;
} else {
// Reverse columns if we're doing a reverse sort
if (currentSort.direction === 1) {
return this._sortable[currentSort.column](keyA, keyB);
} else {
return this._sortable[currentSort.column](keyB, keyA);
}
}
}.bind(this));
},
onSort: function(column) {
// Don't perform sort on unsortable columns
if (typeof(this._sortable[column]) === 'undefined') {
return;
}
var currentSort = this.state.currentSort;
if (currentSort.column === column) {
currentSort.direction *= -1;
} else {
currentSort.column = column;
currentSort.direction = 1;
}
// Set the current sort and pass it to the sort function
this.setState({ currentSort: currentSort });
this.sortByCurrentSort();
},
render: function() {
var children = [];
var columns;
var userColumnsSpecified = false;
if (
this.props.children &&
this.props.children.length > 0 &&
this.props.children[0].type.ConvenienceConstructor === Thead
) {
columns = this.props.children[0].getColumns();
} else {
columns = this.props.columns || [];
}
if (columns.length > 0) {
userColumnsSpecified = true;
columns = this.translateColumnsArray(columns);
}
// Build up table rows
if (this.data && typeof this.data.map === 'function') {
// Build up the columns array
children = children.concat(this.data.map(function(data, i) {
// Loop through the keys in each data row and build a td for it
for (var k in data) {
if (data.hasOwnProperty(k)) {
// Update the columns array with the data's keys if columns were not
// already specified
if (userColumnsSpecified === false) {
var column = {
key: k,
label: k
};
// Only add a new column if it doesn't already exist in the columns array
if (
columns.find(function(element) {
return element.key === column.key
}) === undefined
) {
columns.push(column);
}
}
}
}
return (
Tr({columns: columns, key: i, data: data})
);
}.bind(this)));
}
if (this.props.sortable === true) {
for (var i = 0; i < columns.length; i++) {
this._sortable[columns[i].key] = 'default';
}
}
// Determine if we render the filter box
var filtering = false;
if (
this.props.filterable &&
Array.isArray(this.props.filterable) &&
this.props.filterable.length > 0
) {
filtering = true;
}
// Apply filters
var filteredChildren = children;
if (this.state.filter !== '') {
filteredChildren = this.applyFilter(this.state.filter, filteredChildren);
}
// Determine pagination properties and which columns to display
var itemsPerPage = 0;
var pagination = false;
var numPages;
var currentPage = this.state.currentPage;
var currentChildren = filteredChildren;
if (this.props.itemsPerPage > 0) {
itemsPerPage = this.props.itemsPerPage;
numPages = Math.ceil(filteredChildren.length / itemsPerPage)
if (currentPage > numPages - 1) {
currentPage = numPages - 1;
}
pagination = true;
currentChildren = filteredChildren.slice(
currentPage * itemsPerPage,
(currentPage + 1) * itemsPerPage
);
}
return this.transferPropsTo(
React.DOM.table(null,
columns && columns.length > 0 ?
Thead({
columns: columns,
filtering: filtering,
onFilter: this.onFilter,
sort: this.state.currentSort,
onSort: this.onSort})
: '',
React.DOM.tbody({className: "reactable-data"},
currentChildren
),
pagination === true ?
Paginator({
colSpan: columns.length,
numPages: numPages,
currentPage: currentPage,
onPageChange: this.onPageChange}) : ''
)
);
}
});
},{}],2:[function(require,module,exports){
window.Reactable = require('../build/reactable.browserify');
},{"../build/reactable.browserify":1}]},{},[2]); |
gh/components/CenteredRow.js | bitriddler/react-items-carousel | import React from 'react';
import styled from 'styled-components';
import { Row } from 'antd';
export default styled(Row)`
${props => props.withMaxWidth && `
max-width: 1000px;
margin: 0 auto;
`}
${props => !props.noTopPadding && `padding-top: 20px;`}
${props => !props.noBottomPadding && `padding-bottom: 20px;`}
${props => !props.noLeftPadding && `padding-left: 20px;`}
${props => !props.noRightPadding && `padding-right: 20px;`}
`;
|
admin/src/react/instance-list-page/index.js | sggdv/vegan | import React, { Component } from 'react';
import {
Button,
Glyphicon,
PageHeader,
} from 'react-bootstrap';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import $ from 'jquery';
import List from './list';
const sidebar = {
position: 'fixed',
top: '51px',
bottom: 0,
left: 0,
zIndex: 1000,
display: 'block',
padding: '20px',
overflowX: 'hidden',
overflowY: 'auto',
backgroundColor: '#f5f5f5',
borderRight: '1px solid #eee',
};
const navSidebar = {
marginRight: '-21px',
marginBottom: '20px',
marginLeft: '-20px',
};
const main = {
paddingRight: '40px',
paddingLeft: '40px',
};
@DragDropContext(HTML5Backend)
export default class InstanceListPage extends Component {
constructor(props) {
super(props);
this.state = {
instances: [],
inbox: true,
tags: false,
};
this.componentDidMount = this.componentDidMount.bind(this);
this.handleInboxClick = this.handleInboxClick.bind(this);
this.handleTagsClick = this.handleTagsClick.bind(this);
}
componentDidMount() {
$.ajax({
type: 'GET',
url: '/instances',
dataType: 'json',
cache: false,
success: function(instances) {
this.setState({instances});
}.bind(this),
error: function(xhr, stat, err) {
console.error('/instances', stat, err.toString);
}.bind(this),
});
}
handleInboxClick() {
let { inbox, tags } = this.state;
inbox = !inbox;
if (inbox) {
tags = false;
}
this.setState({inbox, tags});
}
handleTagsClick() {
let { inbox, tags } = this.state;
tags = !tags;
if (tags) {
inbox = false;
}
this.setState({inbox, tags});
}
render() {
const { inbox, tags } = this.state;
const inboxStyle = inbox ? 'primary' : 'default';
const tagsStyle = tags ? 'primary' : 'default';
let pageHeaderText = inbox ? '待处理资料' : '所有资料';
if (!inbox) {
pageHeaderText = tags ? '已归档资料' : pageHeaderText;
}
return (
<div className="row">
<div className="col-sm-2 col-md-1 text-center" style={sidebar}>
<ul className="nav" style={navSidebar}>
<li>
<Button bsSize="lg" bsStyle={inboxStyle} onClick={this.handleInboxClick}>
<Glyphicon glyph="inbox" />
</Button>
</li>
<li>
<Button bsSize="lg" bsStyle={tagsStyle} onClick={this.handleTagsClick}>
<Glyphicon glyph="tags" />
</Button>
</li>
<li>
<Button bsSize="lg">
<Glyphicon glyph="trash" />
</Button>
</li>
</ul>
</div>
<div className="col-sm-10 col-sm-offset-2 col-md-11 col-md-offset-1" style={main}>
<PageHeader>{pageHeaderText}</PageHeader>
<List instances={this.state.instances} />
</div>
</div>
);
}
}
|
misc/jquery.js | alezyy/drupal1 |
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
|
dev/c3po-angularjs-visualization/efg/app/components/catalog/ProductList.js | Clinical3PO/Platform | /**
* Created by w.ding on 12/04/15.
*/
'use strict';
var React = require('react');
var Router = require('react-router')
, RouteHandler = Router.RouteHandler
, Route = Router.Route;
var ReactBootstrap = require('react-bootstrap');
var Button = require('react-bootstrap').Button;
var ReactRouterBootstrap = require('react-router-bootstrap')
, ButtonLink = ReactRouterBootstrap.ButtonLink
var Product = require('./Product');
var Ancestor = require('./Ancestor');
function getProduct(product, index) {
return (
<Product product={product} productIndex={index} key={index} />
);
}
function getAncestor(ancestor, index) {
return (
<Ancestor ancestor={ancestor} key={index} />
);
}
var ProductList = React.createClass({
render: function() {
console.log('products', this.props.products);
var products = Object.keys(this.props.products).length ===0 ? '' : this.props.products.map(getProduct, this);
var ancestors = Object.keys(this.props.ancestors).length ===0 ? '' : this.props.ancestors.map(getAncestor, this);
return (
<div>
{ancestors}
<div className="row">
{products}
</div>
</div>
)
},
contextTypes: {
router: React.PropTypes.func.isRequired
}
})
module.exports = ProductList;
|
src/Panel.js | crhain/freeCodeCamp-Simon | /*renders a colored panel*/
import React from 'react';
import Sound from 'react-sound';
class Panel extends React.Component{
render(){
let panelIsOnClass = "";
let soundUrl = "media/simonSound1.mp3";
if(this.props.panelClicked.id === this.props.id){
if(this.props.panelClicked.error){
panelIsOnClass = " panel-error"; //change to an error class
soundUrl = "media/simonSoundFade4.mp3";
// console.log("wrong panel clicked!!!");
} else {
// console.log("correct panel clicked!!!");
panelIsOnClass = " panel-on";
//get sound url
switch(this.props.id){
case "green":
soundUrl = "media/simonSoundFade1.mp3";
break;
case "red":
soundUrl = "media/simonSoundFade2.mp3";
break;
case "blue":
soundUrl = "media/simonSoundFade3.mp3";
break;
case "yellow":
soundUrl = "media/simonSoundFade4.mp3";
break;
default:
soundUrl = "";
}
}
}
if(this.props.panelClicked.id === this.props.id) {
return (
<div className={ "panel" + panelIsOnClass } id={this.props.id}
onMouseDown={ (event) => this.props.onPanelClick(this, event) }
onTouchStart={ (event) => this.props.onPanelClick(this, event) }
onMouseUp={ (event) => this.props.onPanelUnClick(this, event) }
onTouchEnd={ (event) => this.props.onPanelUnClick(this, event) }
onMouseLeave={ (event) => this.props.onPanelUnClick(this, event) }
onTouchMove={ (event) => this.props.onPanelUnClick(this, event) } >
<Sound url={ soundUrl } playStatus={Sound.status.PLAYING} />
</div>
);
} else {
return (
<div className={ "panel" + panelIsOnClass } id={this.props.id}
onMouseDown={ (event) => this.props.onPanelClick(this, event) }
onTouchStart={ (event) => this.props.onPanelClick(this, event) }
onMouseUp={ (event) => this.props.onPanelUnClick(this, event) }
onTouchEnd={ (event) => this.props.onPanelUnClick(this, event) }
onMouseLeave={ (event) => this.props.onPanelUnClick(this, event) }
onTouchMove={ (event) => this.props.onPanelUnClick(this, event) } >
</div>
);
}
}
}
export default Panel;
|
src/components/demo/ball.js | jer0701/gallery-by-react | require('normalize.css/normalize.css');
require('styles/Ball.css');
import React from 'react';
import ReactDOM from 'react-dom';
var BallArray = React.createClass({
getInitialState: function() {
return { styleObj: {
left: this.props.style.pos.top,
top: this.props.style.pos.left,
y: this.props.style.y,
x: this.props.style.x,
color: this.props.style.color
} };
},
run: function() { //运动函数
var temp = this.state.styleObj;
var yMoveArea = window.innerHeight - this.refs.ball.offsetHeight;
var xMoveArea = window.innerWidth - this.refs.ball.offsetWidth;
temp.top += temp.y;
temp.left += temp.x;
if (temp.top >= yMoveArea) { //触碰到底部
temp.top = yMoveArea;
temp.y = -temp.y;
temp.color = "rgb(" + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) +")" ;
}
if (temp.top <=0){ //触碰到顶部
temp.top = 0;
temp.y = -temp.y;
}
if (temp.left >= xMoveArea) { //触碰到右边框
temp.left = xMoveArea;
temp.x = -temp.x;
}
if (temp.left <= 0) { //触碰到左边框
temp.left = 0;
temp.x = -temp.x;
}
//将数值保存在state变量中
var obj = {};
obj.left = temp.left;
obj.top = temp.top;
obj.x = temp.x;
obj.y = temp.y;
obj.color = temp.color;
this.setState({styleObj: obj});
},
componentDidMount: function() {
this.interval = setInterval(this.run, 1000/60);
},
componentWillUnmount: function() {
clearInterval(this.interval);
},
render: function() {
var styleObj = {};
styleObj.left = this.state.styleObj.left;
styleObj.top = this.state.styleObj.top;
styleObj.backgroundColor = this.state.styleObj.color;
return <div className="ball" ref="ball" style={styleObj}>{this.props.data}</div>
}
});
var Ball = React.createClass({
getInitialState: function() {
return {
ballArray: [
/*{
pos: {
left: 0,
top: 0
},
x: 5, //水平方向上的速度至少是5
y: 5, //垂直方向上的速度至少是5
color: "rgb(255, 0, 0)" //小球的颜色
}*/
]
};
},
render: function() {
var balls = [];
for (var i = 0; i < 7; i++) {
if (!this.state.ballArray[i]) {
var speed = Math.floor(Math.random() * 15 + 5); //速度至少是5
this.state.ballArray[i] = {
pos: {
left: 0,
top: 0
},
x: speed,
y: speed,
color: "rgb(255, 0, 0)"
}
}
balls.push(<BallArray key={i} data={i+1} style={this.state.ballArray[i]} />);
}
return <div className="content">
<div className="pack">
{ balls }
</div>
</div>
}
});
Ball.defaultProps = {
};
export default Ball; |
tests/flow/new_react/propTypes.js | Pajn/prettier | var React = require('react');
var PropTypes = React.PropTypes;
var C = React.createClass({
propTypes: {
statistics: PropTypes.arrayOf(PropTypes.shape({
label: PropTypes.string.isRequired,
value: PropTypes.number,
})).isRequired,
}
});
<C statistics={[
{},
{label:"",value:undefined},
]}/>; // error (label is required, value not required)
var props: Array<{label: string, value?: number}> = [
{},
{label:"",value:undefined},
]; // error (same as ^)
|
src/parser/warrior/fury/modules/talents/RecklessAbandon.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage, formatNumber } from 'common/format';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import Analyzer from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import { SELECTED_PLAYER } from 'parser/core/EventFilter';
const BASE_RECKLESSNESS_DURATION = 10 * 1000; // 10 seconds;
class RecklessAbandon extends Analyzer {
damage = 0;
instantRageGained = 0;
rageGained = 0;
constructor(...args) {
super(...args);
this.active = this.selectedCombatant.hasTalent(SPELLS.RECKLESS_ABANDON_TALENT.id);
if (!this.active) {
return;
}
this.addEventListener(Events.energize.by(SELECTED_PLAYER).spell(SPELLS.RECKLESSNESS), this.onRecklessAbandonEnergize);
this.addEventListener(Events.energize.by(SELECTED_PLAYER).to(SELECTED_PLAYER), this.onPlayerEnergize);
this.addEventListener(Events.damage.by(SELECTED_PLAYER), this.onPlayerDamage);
}
hasLast4SecondsOfRecklessness(event) {
const reck = this.selectedCombatant.getBuff(SPELLS.RECKLESSNESS.id);
return reck && ((event.timestamp - reck.start) > BASE_RECKLESSNESS_DURATION);
}
onRecklessAbandonEnergize(event) {
this.instantRageGained += event.resourceChange;
}
onPlayerEnergize(event) {
if (this.hasLast4SecondsOfRecklessness(event)) {
this.rageGained += event.resourceChange / 2;
}
}
onPlayerDamage(event) {
if (this.hasLast4SecondsOfRecklessness(event)) {
this.damage += event.amount + (event.absorbed || 0);
}
}
get damagePercent() {
return this.owner.getPercentageOfTotalDamageDone(this.damage);
}
statistic() {
return (
<TalentStatisticBox
talent={SPELLS.RECKLESS_ABANDON_TALENT.id}
value={`${formatNumber(this.instantRageGained)} instant rage`}
label="Reckless Abandon"
tooltip={(
<>
In the 4 additional seconds of Recklessness caused by Reckless Abandon:<br />
Additional rage generated: <strong>{this.rageGained}</strong><br />
Damage dealt: <strong>{formatNumber(this.damage)} ({formatPercentage(this.damagePercent)}%)</strong>
</>
)}
/>
);
}
}
export default RecklessAbandon;
|
src/parser/paladin/holy/modules/InefficientLightOfTheMartyrs.js | sMteX/WoWAnalyzer | import React from 'react';
import { Trans } from '@lingui/macro';
import SPELLS from 'common/SPELLS';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
class InefficientLightOfTheMartyrs extends Analyzer {
constructor(options) {
super(options);
this.addEventListener(Events.cast.by(SELECTED_PLAYER).spell(SPELLS.LIGHT_OF_THE_MARTYR), this._onCast);
this.addEventListener(Events.heal.by(SELECTED_PLAYER).spell(SPELLS.LIGHT_OF_THE_MARTYR), this._onHeal);
this.addEventListener(Events.damage.to(SELECTED_PLAYER).spell(SPELLS.LIGHT_OF_THE_MARTYR_DAMAGE_TAKEN), this._onDamage);
}
_cast = null;
_onCast(event) {
this._cast = event;
}
_heal = null;
_onHeal(event) {
this._heal = event;
}
_damage = null;
_onDamage(event) {
this._damage = event;
this._check();
}
_check() {
const cast = this._cast;
const heal = this._heal;
const damage = this._damage;
if (!cast || !heal || !damage) {
console.log(cast, heal, damage);
throw new Error('Missing an event');
}
const healingDone = heal.amount + (heal.absorbed || 0);
const damageTaken = damage.amount + (damage.absorbed || 0);
const effectiveHealing = healingDone - damageTaken;
if (effectiveHealing <= 0) {
cast.meta = cast.meta || {};
cast.meta.isInefficientCast = true;
cast.meta.inefficientCastReason = <Trans>This cast dealt more damage to you than it healed the target. If there is nothing to heal you, deal damage instead.</Trans>;
}
this._heal = null;
this._damage = null;
}
}
export default InefficientLightOfTheMartyrs;
|
node_modules/bower/node_modules/inquirer/node_modules/rx/dist/rx.lite.extras.js | porrify/porrify_web | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
;(function (factory) {
var objectTypes = {
'boolean': false,
'function': true,
'object': true,
'number': false,
'string': false,
'undefined': false
};
var root = (objectTypes[typeof window] && window) || this,
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
root = freeGlobal;
}
// Because of build optimizers
if (typeof define === 'function' && define.amd) {
define(['rx-lite'], function (Rx, exports) {
return factory(root, exports, Rx);
});
} else if (typeof module === 'object' && module && module.exports === freeExports) {
module.exports = factory(root, module.exports, require('rx-lite'));
} else {
root.Rx = factory(root, {}, root.Rx);
}
}.call(this, function (root, exp, Rx, undefined) {
// References
var Observable = Rx.Observable,
observableProto = Observable.prototype,
observableNever = Observable.never,
observableThrow = Observable.throwException,
AnonymousObservable = Rx.AnonymousObservable,
AnonymousObserver = Rx.AnonymousObserver,
notificationCreateOnNext = Rx.Notification.createOnNext,
notificationCreateOnError = Rx.Notification.createOnError,
notificationCreateOnCompleted = Rx.Notification.createOnCompleted,
Observer = Rx.Observer,
Subject = Rx.Subject,
internals = Rx.internals,
helpers = Rx.helpers,
ScheduledObserver = internals.ScheduledObserver,
SerialDisposable = Rx.SerialDisposable,
SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
CompositeDisposable = Rx.CompositeDisposable,
RefCountDisposable = Rx.RefCountDisposable,
disposableEmpty = Rx.Disposable.empty,
immediateScheduler = Rx.Scheduler.immediate,
defaultKeySerializer = helpers.defaultKeySerializer,
addRef = Rx.internals.addRef,
identity = helpers.identity,
isPromise = helpers.isPromise,
inherits = internals.inherits,
bindCallback = internals.bindCallback,
noop = helpers.noop,
isScheduler = Rx.Scheduler.isScheduler,
observableFromPromise = Observable.fromPromise,
ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError;
function ScheduledDisposable(scheduler, disposable) {
this.scheduler = scheduler;
this.disposable = disposable;
this.isDisposed = false;
}
function scheduleItem(s, self) {
if (!self.isDisposed) {
self.isDisposed = true;
self.disposable.dispose();
}
}
ScheduledDisposable.prototype.dispose = function () {
this.scheduler.scheduleWithState(this, scheduleItem);
};
var CheckedObserver = (function (__super__) {
inherits(CheckedObserver, __super__);
function CheckedObserver(observer) {
__super__.call(this);
this._observer = observer;
this._state = 0; // 0 - idle, 1 - busy, 2 - done
}
var CheckedObserverPrototype = CheckedObserver.prototype;
CheckedObserverPrototype.onNext = function (value) {
this.checkAccess();
var res = tryCatch(this._observer.onNext).call(this._observer, value);
this._state = 0;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.onError = function (err) {
this.checkAccess();
var res = tryCatch(this._observer.onError).call(this._observer, err);
this._state = 2;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.onCompleted = function () {
this.checkAccess();
var res = tryCatch(this._observer.onCompleted).call(this._observer);
this._state = 2;
res === errorObj && thrower(res.e);
};
CheckedObserverPrototype.checkAccess = function () {
if (this._state === 1) { throw new Error('Re-entrancy detected'); }
if (this._state === 2) { throw new Error('Observer completed'); }
if (this._state === 0) { this._state = 1; }
};
return CheckedObserver;
}(Observer));
var ObserveOnObserver = (function (__super__) {
inherits(ObserveOnObserver, __super__);
function ObserveOnObserver(scheduler, observer, cancel) {
__super__.call(this, scheduler, observer);
this._cancel = cancel;
}
ObserveOnObserver.prototype.next = function (value) {
__super__.prototype.next.call(this, value);
this.ensureActive();
};
ObserveOnObserver.prototype.error = function (e) {
__super__.prototype.error.call(this, e);
this.ensureActive();
};
ObserveOnObserver.prototype.completed = function () {
__super__.prototype.completed.call(this);
this.ensureActive();
};
ObserveOnObserver.prototype.dispose = function () {
__super__.prototype.dispose.call(this);
this._cancel && this._cancel.dispose();
this._cancel = null;
};
return ObserveOnObserver;
})(ScheduledObserver);
/**
* Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods.
* If a violation is detected, an Error is thrown from the offending observer method call.
*
* @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer.
*/
Observer.prototype.checked = function () { return new CheckedObserver(this); };
/**
* Schedules the invocation of observer methods on the given scheduler.
* @param {Scheduler} scheduler Scheduler to schedule observer messages on.
* @returns {Observer} Observer whose messages are scheduled on the given scheduler.
*/
Observer.notifyOn = function (scheduler) {
return new ObserveOnObserver(scheduler, this);
};
/**
* Creates an observer from a notification callback.
* @param {Function} handler Action that handles a notification.
* @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives.
*/
Observer.fromNotifier = function (handler, thisArg) {
var handlerFunc = bindCallback(handler, thisArg, 1);
return new AnonymousObserver(function (x) {
return handlerFunc(notificationCreateOnNext(x));
}, function (e) {
return handlerFunc(notificationCreateOnError(e));
}, function () {
return handlerFunc(notificationCreateOnCompleted());
});
};
/**
* Creates a notification callback from an observer.
* @returns The action that forwards its input notification to the underlying observer.
*/
Observer.prototype.toNotifier = function () {
var observer = this;
return function (n) { return n.accept(observer); };
};
/**
* Hides the identity of an observer.
* @returns An observer that hides the identity of the specified observer.
*/
Observer.prototype.asObserver = function () {
var source = this;
return new AnonymousObserver(
function (x) { source.onNext(x); },
function (e) { source.onError(e); },
function () { source.onCompleted(); }
);
};
/**
* Wraps the source sequence in order to run its observer callbacks on the specified scheduler.
*
* This only invokes observer callbacks on a scheduler. In case the subscription and/or unsubscription actions have side-effects
* that require to be run on a scheduler, use subscribeOn.
*
* @param {Scheduler} scheduler Scheduler to notify observers on.
* @returns {Observable} The source sequence whose observations happen on the specified scheduler.
*/
observableProto.observeOn = function (scheduler) {
var source = this;
return new AnonymousObservable(function (observer) {
return source.subscribe(new ObserveOnObserver(scheduler, observer));
}, source);
};
/**
* Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. This operation is not commonly used;
* see the remarks section for more information on the distinction between subscribeOn and observeOn.
* This only performs the side-effects of subscription and unsubscription on the specified scheduler. In order to invoke observer
* callbacks on a scheduler, use observeOn.
* @param {Scheduler} scheduler Scheduler to perform subscription and unsubscription actions on.
* @returns {Observable} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
*/
observableProto.subscribeOn = function (scheduler) {
var source = this;
return new AnonymousObservable(function (observer) {
var m = new SingleAssignmentDisposable(), d = new SerialDisposable();
d.setDisposable(m);
m.setDisposable(scheduler.schedule(function () {
d.setDisposable(new ScheduledDisposable(scheduler, source.subscribe(observer)));
}));
return d;
}, source);
};
/**
* Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.
*
* @example
* var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; });
* var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }, Rx.Scheduler.timeout);
* @param {Mixed} initialState Initial state.
* @param {Function} condition Condition to terminate generation (upon returning false).
* @param {Function} iterate Iteration step function.
* @param {Function} resultSelector Selector function for results produced in the sequence.
* @param {Scheduler} [scheduler] Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread.
* @returns {Observable} The generated sequence.
*/
Observable.generate = function (initialState, condition, iterate, resultSelector, scheduler) {
isScheduler(scheduler) || (scheduler = currentThreadScheduler);
return new AnonymousObservable(function (o) {
var first = true;
return scheduler.scheduleRecursiveWithState(initialState, function (state, self) {
var hasResult, result;
try {
if (first) {
first = false;
} else {
state = iterate(state);
}
hasResult = condition(state);
hasResult && (result = resultSelector(state));
} catch (e) {
return o.onError(e);
}
if (hasResult) {
o.onNext(result);
self(state);
} else {
o.onCompleted();
}
});
});
};
/**
* Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime.
* @param {Function} resourceFactory Factory function to obtain a resource object.
* @param {Function} observableFactory Factory function to obtain an observable sequence that depends on the obtained resource.
* @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object.
*/
Observable.using = function (resourceFactory, observableFactory) {
return new AnonymousObservable(function (observer) {
var disposable = disposableEmpty, resource, source;
try {
resource = resourceFactory();
resource && (disposable = resource);
source = observableFactory(resource);
} catch (exception) {
return new CompositeDisposable(observableThrow(exception).subscribe(observer), disposable);
}
return new CompositeDisposable(source.subscribe(observer), disposable);
});
};
/**
* Propagates the observable sequence or Promise that reacts first.
* @param {Observable} rightSource Second observable sequence or Promise.
* @returns {Observable} {Observable} An observable sequence that surfaces either of the given sequences, whichever reacted first.
*/
observableProto.amb = function (rightSource) {
var leftSource = this;
return new AnonymousObservable(function (observer) {
var choice,
leftChoice = 'L', rightChoice = 'R',
leftSubscription = new SingleAssignmentDisposable(),
rightSubscription = new SingleAssignmentDisposable();
isPromise(rightSource) && (rightSource = observableFromPromise(rightSource));
function choiceL() {
if (!choice) {
choice = leftChoice;
rightSubscription.dispose();
}
}
function choiceR() {
if (!choice) {
choice = rightChoice;
leftSubscription.dispose();
}
}
leftSubscription.setDisposable(leftSource.subscribe(function (left) {
choiceL();
choice === leftChoice && observer.onNext(left);
}, function (err) {
choiceL();
choice === leftChoice && observer.onError(err);
}, function () {
choiceL();
choice === leftChoice && observer.onCompleted();
}));
rightSubscription.setDisposable(rightSource.subscribe(function (right) {
choiceR();
choice === rightChoice && observer.onNext(right);
}, function (err) {
choiceR();
choice === rightChoice && observer.onError(err);
}, function () {
choiceR();
choice === rightChoice && observer.onCompleted();
}));
return new CompositeDisposable(leftSubscription, rightSubscription);
});
};
/**
* Propagates the observable sequence or Promise that reacts first.
*
* @example
* var = Rx.Observable.amb(xs, ys, zs);
* @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first.
*/
Observable.amb = function () {
var acc = observableNever(), items = [];
if (Array.isArray(arguments[0])) {
items = arguments[0];
} else {
for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); }
}
function func(previous, current) {
return previous.amb(current);
}
for (var i = 0, len = items.length; i < len; i++) {
acc = func(acc, items[i]);
}
return acc;
};
/**
* Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
* @param {Observable} second Second observable sequence used to produce results after the first sequence terminates.
* @returns {Observable} An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally.
*/
observableProto.onErrorResumeNext = function (second) {
if (!second) { throw new Error('Second observable is required'); }
return onErrorResumeNext([this, second]);
};
/**
* Continues an observable sequence that is terminated normally or by an exception with the next observable sequence.
*
* @example
* 1 - res = Rx.Observable.onErrorResumeNext(xs, ys, zs);
* 1 - res = Rx.Observable.onErrorResumeNext([xs, ys, zs]);
* @returns {Observable} An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally.
*/
var onErrorResumeNext = Observable.onErrorResumeNext = function () {
var sources = [];
if (Array.isArray(arguments[0])) {
sources = arguments[0];
} else {
for(var i = 0, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
}
return new AnonymousObservable(function (observer) {
var pos = 0, subscription = new SerialDisposable(),
cancelable = immediateScheduler.scheduleRecursive(function (self) {
var current, d;
if (pos < sources.length) {
current = sources[pos++];
isPromise(current) && (current = observableFromPromise(current));
d = new SingleAssignmentDisposable();
subscription.setDisposable(d);
d.setDisposable(current.subscribe(observer.onNext.bind(observer), self, self));
} else {
observer.onCompleted();
}
});
return new CompositeDisposable(subscription, cancelable);
});
};
/**
* Projects each element of an observable sequence into zero or more buffers which are produced based on element count information.
*
* @example
* var res = xs.bufferWithCount(10);
* var res = xs.bufferWithCount(10, 1);
* @param {Number} count Length of each buffer.
* @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count.
* @returns {Observable} An observable sequence of buffers.
*/
observableProto.bufferWithCount = function (count, skip) {
if (typeof skip !== 'number') {
skip = count;
}
return this.windowWithCount(count, skip).selectMany(function (x) {
return x.toArray();
}).where(function (x) {
return x.length > 0;
});
};
/**
* Projects each element of an observable sequence into zero or more windows which are produced based on element count information.
*
* var res = xs.windowWithCount(10);
* var res = xs.windowWithCount(10, 1);
* @param {Number} count Length of each window.
* @param {Number} [skip] Number of elements to skip between creation of consecutive windows. If not specified, defaults to the count.
* @returns {Observable} An observable sequence of windows.
*/
observableProto.windowWithCount = function (count, skip) {
var source = this;
+count || (count = 0);
Math.abs(count) === Infinity && (count = 0);
if (count <= 0) { throw new ArgumentOutOfRangeError(); }
skip == null && (skip = count);
+skip || (skip = 0);
Math.abs(skip) === Infinity && (skip = 0);
if (skip <= 0) { throw new ArgumentOutOfRangeError(); }
return new AnonymousObservable(function (observer) {
var m = new SingleAssignmentDisposable(),
refCountDisposable = new RefCountDisposable(m),
n = 0,
q = [];
function createWindow () {
var s = new Subject();
q.push(s);
observer.onNext(addRef(s, refCountDisposable));
}
createWindow();
m.setDisposable(source.subscribe(
function (x) {
for (var i = 0, len = q.length; i < len; i++) { q[i].onNext(x); }
var c = n - count + 1;
c >= 0 && c % skip === 0 && q.shift().onCompleted();
++n % skip === 0 && createWindow();
},
function (e) {
while (q.length > 0) { q.shift().onError(e); }
observer.onError(e);
},
function () {
while (q.length > 0) { q.shift().onCompleted(); }
observer.onCompleted();
}
));
return refCountDisposable;
}, source);
};
/**
* Returns an array with the specified number of contiguous elements from the end of an observable sequence.
*
* @description
* This operator accumulates a buffer with a length enough to store count elements. Upon completion of the
* source sequence, this buffer is produced on the result sequence.
* @param {Number} count Number of elements to take from the end of the source sequence.
* @returns {Observable} An observable sequence containing a single array with the specified number of elements from the end of the source sequence.
*/
observableProto.takeLastBuffer = function (count) {
var source = this;
return new AnonymousObservable(function (o) {
var q = [];
return source.subscribe(function (x) {
q.push(x);
q.length > count && q.shift();
}, function (e) { o.onError(e); }, function () {
o.onNext(q);
o.onCompleted();
});
}, source);
};
/**
* Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty.
*
* var res = obs = xs.defaultIfEmpty();
* 2 - obs = xs.defaultIfEmpty(false);
*
* @memberOf Observable#
* @param defaultValue The value to return if the sequence is empty. If not provided, this defaults to null.
* @returns {Observable} An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself.
*/
observableProto.defaultIfEmpty = function (defaultValue) {
var source = this;
defaultValue === undefined && (defaultValue = null);
return new AnonymousObservable(function (observer) {
var found = false;
return source.subscribe(function (x) {
found = true;
observer.onNext(x);
},
function (e) { observer.onError(e); },
function () {
!found && observer.onNext(defaultValue);
observer.onCompleted();
});
}, source);
};
// Swap out for Array.findIndex
function arrayIndexOfComparer(array, item, comparer) {
for (var i = 0, len = array.length; i < len; i++) {
if (comparer(array[i], item)) { return i; }
}
return -1;
}
function HashSet(comparer) {
this.comparer = comparer;
this.set = [];
}
HashSet.prototype.push = function(value) {
var retValue = arrayIndexOfComparer(this.set, value, this.comparer) === -1;
retValue && this.set.push(value);
return retValue;
};
/**
* Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer.
* Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
*
* @example
* var res = obs = xs.distinct();
* 2 - obs = xs.distinct(function (x) { return x.id; });
* 2 - obs = xs.distinct(function (x) { return x.id; }, function (a,b) { return a === b; });
* @param {Function} [keySelector] A function to compute the comparison key for each element.
* @param {Function} [comparer] Used to compare items in the collection.
* @returns {Observable} An observable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
*/
observableProto.distinct = function (keySelector, comparer) {
var source = this;
comparer || (comparer = defaultComparer);
return new AnonymousObservable(function (o) {
var hashSet = new HashSet(comparer);
return source.subscribe(function (x) {
var key = x;
if (keySelector) {
try {
key = keySelector(x);
} catch (e) {
o.onError(e);
return;
}
}
hashSet.push(key) && o.onNext(x);
},
function (e) { o.onError(e); }, function () { o.onCompleted(); });
}, this);
};
/**
* Returns an observable sequence that shares a single subscription to the underlying sequence. This observable sequence
* can be resubscribed to, even if all prior subscriptions have ended. (unlike `.publish().refCount()`)
* @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source.
*/
observableProto.singleInstance = function() {
var source = this, hasObservable = false, observable;
function getObservable() {
if (!hasObservable) {
hasObservable = true;
observable = source.finally(function() { hasObservable = false; }).publish().refCount();
}
return observable;
};
return new AnonymousObservable(function(o) {
return getObservable().subscribe(o);
});
};
return Rx;
}));
|
docs/app/Examples/elements/Header/Variations/HeaderInvertedExample.js | jamiehill/stardust | import React from 'react'
import { Header, Segment } from 'stardust'
const HeaderInvertedExample = () => (
<Segment className='inverted'>
<Header as='h4' inverted color='red'>Red</Header>
<Header as='h4' inverted color='orange'>Orange</Header>
<Header as='h4' inverted color='yellow'>Yellow</Header>
<Header as='h4' inverted color='olive'>Olive</Header>
<Header as='h4' inverted color='green'>Green</Header>
<Header as='h4' inverted color='teal'>Teal</Header>
<Header as='h4' inverted color='blue'>Blue</Header>
<Header as='h4' inverted color='purple'>Purple</Header>
<Header as='h4' inverted color='violet'>Violet</Header>
<Header as='h4' inverted color='pink'>Pink</Header>
<Header as='h4' inverted color='brown'>Brown</Header>
<Header as='h4' inverted color='grey'>Grey</Header>
</Segment>
)
export default HeaderInvertedExample
|
src/icons/IosBarcodeOutline.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosBarcodeOutline extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<polygon points="48,384 128,384 128,368 64,368 64,144 128,144 128,128 48,128 "></polygon>
<polygon points="384,128 384,144 448,144 448,368 384,368 384,384 464,384 464,128 "></polygon>
<rect x="112" y="192" width="16" height="128"></rect>
<rect x="384" y="192" width="16" height="128"></rect>
<rect x="320" y="160" width="16" height="192"></rect>
<rect x="176" y="160" width="16" height="192"></rect>
<rect x="247" y="176" width="16" height="160"></rect>
</g>
</g>;
} return <IconBase>
<g>
<polygon points="48,384 128,384 128,368 64,368 64,144 128,144 128,128 48,128 "></polygon>
<polygon points="384,128 384,144 448,144 448,368 384,368 384,384 464,384 464,128 "></polygon>
<rect x="112" y="192" width="16" height="128"></rect>
<rect x="384" y="192" width="16" height="128"></rect>
<rect x="320" y="160" width="16" height="192"></rect>
<rect x="176" y="160" width="16" height="192"></rect>
<rect x="247" y="176" width="16" height="160"></rect>
</g>
</IconBase>;
}
};IosBarcodeOutline.defaultProps = {bare: false} |
MvcReact/MvcReact/node_modules/watchify/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/acorn/test/compare/traceur.js | slav/reactJsNetExamples | (function(global) {
'use strict';
if (global.$traceurRuntime) {
return;
}
var $Object = Object;
var $TypeError = TypeError;
var $create = $Object.create;
var $defineProperties = $Object.defineProperties;
var $defineProperty = $Object.defineProperty;
var $freeze = $Object.freeze;
var $getOwnPropertyDescriptor = $Object.getOwnPropertyDescriptor;
var $getOwnPropertyNames = $Object.getOwnPropertyNames;
var $keys = $Object.keys;
var $hasOwnProperty = $Object.prototype.hasOwnProperty;
var $toString = $Object.prototype.toString;
var $preventExtensions = Object.preventExtensions;
var $seal = Object.seal;
var $isExtensible = Object.isExtensible;
function nonEnum(value) {
return {
configurable: true,
enumerable: false,
value: value,
writable: true
};
}
var types = {
void: function voidType() {},
any: function any() {},
string: function string() {},
number: function number() {},
boolean: function boolean() {}
};
var method = nonEnum;
var counter = 0;
function newUniqueString() {
return '__$' + Math.floor(Math.random() * 1e9) + '$' + ++counter + '$__';
}
var symbolInternalProperty = newUniqueString();
var symbolDescriptionProperty = newUniqueString();
var symbolDataProperty = newUniqueString();
var symbolValues = $create(null);
var privateNames = $create(null);
function createPrivateName() {
var s = newUniqueString();
privateNames[s] = true;
return s;
}
function isSymbol(symbol) {
return typeof symbol === 'object' && symbol instanceof SymbolValue;
}
function typeOf(v) {
if (isSymbol(v))
return 'symbol';
return typeof v;
}
function Symbol(description) {
var value = new SymbolValue(description);
if (!(this instanceof Symbol))
return value;
throw new TypeError('Symbol cannot be new\'ed');
}
$defineProperty(Symbol.prototype, 'constructor', nonEnum(Symbol));
$defineProperty(Symbol.prototype, 'toString', method(function() {
var symbolValue = this[symbolDataProperty];
if (!getOption('symbols'))
return symbolValue[symbolInternalProperty];
if (!symbolValue)
throw TypeError('Conversion from symbol to string');
var desc = symbolValue[symbolDescriptionProperty];
if (desc === undefined)
desc = '';
return 'Symbol(' + desc + ')';
}));
$defineProperty(Symbol.prototype, 'valueOf', method(function() {
var symbolValue = this[symbolDataProperty];
if (!symbolValue)
throw TypeError('Conversion from symbol to string');
if (!getOption('symbols'))
return symbolValue[symbolInternalProperty];
return symbolValue;
}));
function SymbolValue(description) {
var key = newUniqueString();
$defineProperty(this, symbolDataProperty, {value: this});
$defineProperty(this, symbolInternalProperty, {value: key});
$defineProperty(this, symbolDescriptionProperty, {value: description});
freeze(this);
symbolValues[key] = this;
}
$defineProperty(SymbolValue.prototype, 'constructor', nonEnum(Symbol));
$defineProperty(SymbolValue.prototype, 'toString', {
value: Symbol.prototype.toString,
enumerable: false
});
$defineProperty(SymbolValue.prototype, 'valueOf', {
value: Symbol.prototype.valueOf,
enumerable: false
});
var hashProperty = createPrivateName();
var hashPropertyDescriptor = {value: undefined};
var hashObjectProperties = {
hash: {value: undefined},
self: {value: undefined}
};
var hashCounter = 0;
function getOwnHashObject(object) {
var hashObject = object[hashProperty];
if (hashObject && hashObject.self === object)
return hashObject;
if ($isExtensible(object)) {
hashObjectProperties.hash.value = hashCounter++;
hashObjectProperties.self.value = object;
hashPropertyDescriptor.value = $create(null, hashObjectProperties);
$defineProperty(object, hashProperty, hashPropertyDescriptor);
return hashPropertyDescriptor.value;
}
return undefined;
}
function freeze(object) {
getOwnHashObject(object);
return $freeze.apply(this, arguments);
}
function preventExtensions(object) {
getOwnHashObject(object);
return $preventExtensions.apply(this, arguments);
}
function seal(object) {
getOwnHashObject(object);
return $seal.apply(this, arguments);
}
Symbol.iterator = Symbol();
freeze(SymbolValue.prototype);
function toProperty(name) {
if (isSymbol(name))
return name[symbolInternalProperty];
return name;
}
function getOwnPropertyNames(object) {
var rv = [];
var names = $getOwnPropertyNames(object);
for (var i = 0; i < names.length; i++) {
var name = names[i];
if (!symbolValues[name] && !privateNames[name])
rv.push(name);
}
return rv;
}
function getOwnPropertyDescriptor(object, name) {
return $getOwnPropertyDescriptor(object, toProperty(name));
}
function getOwnPropertySymbols(object) {
var rv = [];
var names = $getOwnPropertyNames(object);
for (var i = 0; i < names.length; i++) {
var symbol = symbolValues[names[i]];
if (symbol)
rv.push(symbol);
}
return rv;
}
function hasOwnProperty(name) {
return $hasOwnProperty.call(this, toProperty(name));
}
function getOption(name) {
return global.traceur && global.traceur.options[name];
}
function setProperty(object, name, value) {
var sym,
desc;
if (isSymbol(name)) {
sym = name;
name = name[symbolInternalProperty];
}
object[name] = value;
if (sym && (desc = $getOwnPropertyDescriptor(object, name)))
$defineProperty(object, name, {enumerable: false});
return value;
}
function defineProperty(object, name, descriptor) {
if (isSymbol(name)) {
if (descriptor.enumerable) {
descriptor = $create(descriptor, {enumerable: {value: false}});
}
name = name[symbolInternalProperty];
}
$defineProperty(object, name, descriptor);
return object;
}
function polyfillObject(Object) {
$defineProperty(Object, 'defineProperty', {value: defineProperty});
$defineProperty(Object, 'getOwnPropertyNames', {value: getOwnPropertyNames});
$defineProperty(Object, 'getOwnPropertyDescriptor', {value: getOwnPropertyDescriptor});
$defineProperty(Object.prototype, 'hasOwnProperty', {value: hasOwnProperty});
$defineProperty(Object, 'freeze', {value: freeze});
$defineProperty(Object, 'preventExtensions', {value: preventExtensions});
$defineProperty(Object, 'seal', {value: seal});
Object.getOwnPropertySymbols = getOwnPropertySymbols;
}
function exportStar(object) {
for (var i = 1; i < arguments.length; i++) {
var names = $getOwnPropertyNames(arguments[i]);
for (var j = 0; j < names.length; j++) {
var name = names[j];
if (privateNames[name])
continue;
(function(mod, name) {
$defineProperty(object, name, {
get: function() {
return mod[name];
},
enumerable: true
});
})(arguments[i], names[j]);
}
}
return object;
}
function isObject(x) {
return x != null && (typeof x === 'object' || typeof x === 'function');
}
function toObject(x) {
if (x == null)
throw $TypeError();
return $Object(x);
}
function assertObject(x) {
if (!isObject(x))
throw $TypeError(x + ' is not an Object');
return x;
}
function setupGlobals(global) {
global.Symbol = Symbol;
global.Reflect = global.Reflect || {};
global.Reflect.global = global.Reflect.global || global;
polyfillObject(global.Object);
}
setupGlobals(global);
global.$traceurRuntime = {
assertObject: assertObject,
createPrivateName: createPrivateName,
exportStar: exportStar,
getOwnHashObject: getOwnHashObject,
privateNames: privateNames,
setProperty: setProperty,
setupGlobals: setupGlobals,
toObject: toObject,
isObject: isObject,
toProperty: toProperty,
type: types,
typeof: typeOf,
defineProperties: $defineProperties,
defineProperty: $defineProperty,
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
getOwnPropertyNames: $getOwnPropertyNames,
keys: $keys
};
})(typeof global !== 'undefined' ? global : this);
(function() {
'use strict';
function spread() {
var rv = [],
j = 0,
iterResult;
for (var i = 0; i < arguments.length; i++) {
var valueToSpread = arguments[i];
if (!$traceurRuntime.isObject(valueToSpread)) {
throw new TypeError('Cannot spread non-object.');
}
if (typeof valueToSpread[$traceurRuntime.toProperty(Symbol.iterator)] !== 'function') {
throw new TypeError('Cannot spread non-iterable object.');
}
var iter = valueToSpread[$traceurRuntime.toProperty(Symbol.iterator)]();
while (!(iterResult = iter.next()).done) {
rv[j++] = iterResult.value;
}
}
return rv;
}
$traceurRuntime.spread = spread;
})();
(function() {
'use strict';
var $Object = Object;
var $TypeError = TypeError;
var $create = $Object.create;
var $defineProperties = $traceurRuntime.defineProperties;
var $defineProperty = $traceurRuntime.defineProperty;
var $getOwnPropertyDescriptor = $traceurRuntime.getOwnPropertyDescriptor;
var $getOwnPropertyNames = $traceurRuntime.getOwnPropertyNames;
var $getPrototypeOf = Object.getPrototypeOf;
function superDescriptor(homeObject, name) {
var proto = $getPrototypeOf(homeObject);
do {
var result = $getOwnPropertyDescriptor(proto, name);
if (result)
return result;
proto = $getPrototypeOf(proto);
} while (proto);
return undefined;
}
function superCall(self, homeObject, name, args) {
return superGet(self, homeObject, name).apply(self, args);
}
function superGet(self, homeObject, name) {
var descriptor = superDescriptor(homeObject, name);
if (descriptor) {
if (!descriptor.get)
return descriptor.value;
return descriptor.get.call(self);
}
return undefined;
}
function superSet(self, homeObject, name, value) {
var descriptor = superDescriptor(homeObject, name);
if (descriptor && descriptor.set) {
descriptor.set.call(self, value);
return value;
}
throw $TypeError("super has no setter '" + name + "'.");
}
function getDescriptors(object) {
var descriptors = {},
name,
names = $getOwnPropertyNames(object);
for (var i = 0; i < names.length; i++) {
var name = names[i];
descriptors[name] = $getOwnPropertyDescriptor(object, name);
}
return descriptors;
}
function createClass(ctor, object, staticObject, superClass) {
$defineProperty(object, 'constructor', {
value: ctor,
configurable: true,
enumerable: false,
writable: true
});
if (arguments.length > 3) {
if (typeof superClass === 'function')
ctor.__proto__ = superClass;
ctor.prototype = $create(getProtoParent(superClass), getDescriptors(object));
} else {
ctor.prototype = object;
}
$defineProperty(ctor, 'prototype', {
configurable: false,
writable: false
});
return $defineProperties(ctor, getDescriptors(staticObject));
}
function getProtoParent(superClass) {
if (typeof superClass === 'function') {
var prototype = superClass.prototype;
if ($Object(prototype) === prototype || prototype === null)
return superClass.prototype;
throw new $TypeError('super prototype must be an Object or null');
}
if (superClass === null)
return null;
throw new $TypeError('Super expression must either be null or a function');
}
function defaultSuperCall(self, homeObject, args) {
if ($getPrototypeOf(homeObject) !== null)
superCall(self, homeObject, 'constructor', args);
}
$traceurRuntime.createClass = createClass;
$traceurRuntime.defaultSuperCall = defaultSuperCall;
$traceurRuntime.superCall = superCall;
$traceurRuntime.superGet = superGet;
$traceurRuntime.superSet = superSet;
})();
(function() {
'use strict';
var createPrivateName = $traceurRuntime.createPrivateName;
var $defineProperties = $traceurRuntime.defineProperties;
var $defineProperty = $traceurRuntime.defineProperty;
var $create = Object.create;
var $TypeError = TypeError;
function nonEnum(value) {
return {
configurable: true,
enumerable: false,
value: value,
writable: true
};
}
var ST_NEWBORN = 0;
var ST_EXECUTING = 1;
var ST_SUSPENDED = 2;
var ST_CLOSED = 3;
var END_STATE = -2;
var RETHROW_STATE = -3;
function getInternalError(state) {
return new Error('Traceur compiler bug: invalid state in state machine: ' + state);
}
function GeneratorContext() {
this.state = 0;
this.GState = ST_NEWBORN;
this.storedException = undefined;
this.finallyFallThrough = undefined;
this.sent_ = undefined;
this.returnValue = undefined;
this.tryStack_ = [];
}
GeneratorContext.prototype = {
pushTry: function(catchState, finallyState) {
if (finallyState !== null) {
var finallyFallThrough = null;
for (var i = this.tryStack_.length - 1; i >= 0; i--) {
if (this.tryStack_[i].catch !== undefined) {
finallyFallThrough = this.tryStack_[i].catch;
break;
}
}
if (finallyFallThrough === null)
finallyFallThrough = RETHROW_STATE;
this.tryStack_.push({
finally: finallyState,
finallyFallThrough: finallyFallThrough
});
}
if (catchState !== null) {
this.tryStack_.push({catch: catchState});
}
},
popTry: function() {
this.tryStack_.pop();
},
get sent() {
this.maybeThrow();
return this.sent_;
},
set sent(v) {
this.sent_ = v;
},
get sentIgnoreThrow() {
return this.sent_;
},
maybeThrow: function() {
if (this.action === 'throw') {
this.action = 'next';
throw this.sent_;
}
},
end: function() {
switch (this.state) {
case END_STATE:
return this;
case RETHROW_STATE:
throw this.storedException;
default:
throw getInternalError(this.state);
}
},
handleException: function(ex) {
this.GState = ST_CLOSED;
this.state = END_STATE;
throw ex;
}
};
function nextOrThrow(ctx, moveNext, action, x) {
switch (ctx.GState) {
case ST_EXECUTING:
throw new Error(("\"" + action + "\" on executing generator"));
case ST_CLOSED:
if (action == 'next') {
return {
value: undefined,
done: true
};
}
throw x;
case ST_NEWBORN:
if (action === 'throw') {
ctx.GState = ST_CLOSED;
throw x;
}
if (x !== undefined)
throw $TypeError('Sent value to newborn generator');
case ST_SUSPENDED:
ctx.GState = ST_EXECUTING;
ctx.action = action;
ctx.sent = x;
var value = moveNext(ctx);
var done = value === ctx;
if (done)
value = ctx.returnValue;
ctx.GState = done ? ST_CLOSED : ST_SUSPENDED;
return {
value: value,
done: done
};
}
}
var ctxName = createPrivateName();
var moveNextName = createPrivateName();
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
GeneratorFunction.prototype = GeneratorFunctionPrototype;
$defineProperty(GeneratorFunctionPrototype, 'constructor', nonEnum(GeneratorFunction));
GeneratorFunctionPrototype.prototype = {
constructor: GeneratorFunctionPrototype,
next: function(v) {
return nextOrThrow(this[ctxName], this[moveNextName], 'next', v);
},
throw: function(v) {
return nextOrThrow(this[ctxName], this[moveNextName], 'throw', v);
}
};
$defineProperties(GeneratorFunctionPrototype.prototype, {
constructor: {enumerable: false},
next: {enumerable: false},
throw: {enumerable: false}
});
Object.defineProperty(GeneratorFunctionPrototype.prototype, Symbol.iterator, nonEnum(function() {
return this;
}));
function createGeneratorInstance(innerFunction, functionObject, self) {
var moveNext = getMoveNext(innerFunction, self);
var ctx = new GeneratorContext();
var object = $create(functionObject.prototype);
object[ctxName] = ctx;
object[moveNextName] = moveNext;
return object;
}
function initGeneratorFunction(functionObject) {
functionObject.prototype = $create(GeneratorFunctionPrototype.prototype);
functionObject.__proto__ = GeneratorFunctionPrototype;
return functionObject;
}
function AsyncFunctionContext() {
GeneratorContext.call(this);
this.err = undefined;
var ctx = this;
ctx.result = new Promise(function(resolve, reject) {
ctx.resolve = resolve;
ctx.reject = reject;
});
}
AsyncFunctionContext.prototype = $create(GeneratorContext.prototype);
AsyncFunctionContext.prototype.end = function() {
switch (this.state) {
case END_STATE:
this.resolve(this.returnValue);
break;
case RETHROW_STATE:
this.reject(this.storedException);
break;
default:
this.reject(getInternalError(this.state));
}
};
AsyncFunctionContext.prototype.handleException = function() {
this.state = RETHROW_STATE;
};
function asyncWrap(innerFunction, self) {
var moveNext = getMoveNext(innerFunction, self);
var ctx = new AsyncFunctionContext();
ctx.createCallback = function(newState) {
return function(value) {
ctx.state = newState;
ctx.value = value;
moveNext(ctx);
};
};
ctx.errback = function(err) {
handleCatch(ctx, err);
moveNext(ctx);
};
moveNext(ctx);
return ctx.result;
}
function getMoveNext(innerFunction, self) {
return function(ctx) {
while (true) {
try {
return innerFunction.call(self, ctx);
} catch (ex) {
handleCatch(ctx, ex);
}
}
};
}
function handleCatch(ctx, ex) {
ctx.storedException = ex;
var last = ctx.tryStack_[ctx.tryStack_.length - 1];
if (!last) {
ctx.handleException(ex);
return;
}
ctx.state = last.catch !== undefined ? last.catch : last.finally;
if (last.finallyFallThrough !== undefined)
ctx.finallyFallThrough = last.finallyFallThrough;
}
$traceurRuntime.asyncWrap = asyncWrap;
$traceurRuntime.initGeneratorFunction = initGeneratorFunction;
$traceurRuntime.createGeneratorInstance = createGeneratorInstance;
})();
(function() {
function buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {
var out = [];
if (opt_scheme) {
out.push(opt_scheme, ':');
}
if (opt_domain) {
out.push('//');
if (opt_userInfo) {
out.push(opt_userInfo, '@');
}
out.push(opt_domain);
if (opt_port) {
out.push(':', opt_port);
}
}
if (opt_path) {
out.push(opt_path);
}
if (opt_queryData) {
out.push('?', opt_queryData);
}
if (opt_fragment) {
out.push('#', opt_fragment);
}
return out.join('');
}
;
var splitRe = new RegExp('^' + '(?:' + '([^:/?#.]+)' + ':)?' + '(?://' + '(?:([^/?#]*)@)?' + '([\\w\\d\\-\\u0100-\\uffff.%]*)' + '(?::([0-9]+))?' + ')?' + '([^?#]+)?' + '(?:\\?([^#]*))?' + '(?:#(.*))?' + '$');
var ComponentIndex = {
SCHEME: 1,
USER_INFO: 2,
DOMAIN: 3,
PORT: 4,
PATH: 5,
QUERY_DATA: 6,
FRAGMENT: 7
};
function split(uri) {
return (uri.match(splitRe));
}
function removeDotSegments(path) {
if (path === '/')
return '/';
var leadingSlash = path[0] === '/' ? '/' : '';
var trailingSlash = path.slice(-1) === '/' ? '/' : '';
var segments = path.split('/');
var out = [];
var up = 0;
for (var pos = 0; pos < segments.length; pos++) {
var segment = segments[pos];
switch (segment) {
case '':
case '.':
break;
case '..':
if (out.length)
out.pop();
else
up++;
break;
default:
out.push(segment);
}
}
if (!leadingSlash) {
while (up-- > 0) {
out.unshift('..');
}
if (out.length === 0)
out.push('.');
}
return leadingSlash + out.join('/') + trailingSlash;
}
function joinAndCanonicalizePath(parts) {
var path = parts[ComponentIndex.PATH] || '';
path = removeDotSegments(path);
parts[ComponentIndex.PATH] = path;
return buildFromEncodedParts(parts[ComponentIndex.SCHEME], parts[ComponentIndex.USER_INFO], parts[ComponentIndex.DOMAIN], parts[ComponentIndex.PORT], parts[ComponentIndex.PATH], parts[ComponentIndex.QUERY_DATA], parts[ComponentIndex.FRAGMENT]);
}
function canonicalizeUrl(url) {
var parts = split(url);
return joinAndCanonicalizePath(parts);
}
function resolveUrl(base, url) {
var parts = split(url);
var baseParts = split(base);
if (parts[ComponentIndex.SCHEME]) {
return joinAndCanonicalizePath(parts);
} else {
parts[ComponentIndex.SCHEME] = baseParts[ComponentIndex.SCHEME];
}
for (var i = ComponentIndex.SCHEME; i <= ComponentIndex.PORT; i++) {
if (!parts[i]) {
parts[i] = baseParts[i];
}
}
if (parts[ComponentIndex.PATH][0] == '/') {
return joinAndCanonicalizePath(parts);
}
var path = baseParts[ComponentIndex.PATH];
var index = path.lastIndexOf('/');
path = path.slice(0, index + 1) + parts[ComponentIndex.PATH];
parts[ComponentIndex.PATH] = path;
return joinAndCanonicalizePath(parts);
}
function isAbsolute(name) {
if (!name)
return false;
if (name[0] === '/')
return true;
var parts = split(name);
if (parts[ComponentIndex.SCHEME])
return true;
return false;
}
$traceurRuntime.canonicalizeUrl = canonicalizeUrl;
$traceurRuntime.isAbsolute = isAbsolute;
$traceurRuntime.removeDotSegments = removeDotSegments;
$traceurRuntime.resolveUrl = resolveUrl;
})();
(function(global) {
'use strict';
var $__2 = $traceurRuntime.assertObject($traceurRuntime),
canonicalizeUrl = $__2.canonicalizeUrl,
resolveUrl = $__2.resolveUrl,
isAbsolute = $__2.isAbsolute;
var moduleInstantiators = Object.create(null);
var baseURL;
if (global.location && global.location.href)
baseURL = resolveUrl(global.location.href, './');
else
baseURL = '';
var UncoatedModuleEntry = function UncoatedModuleEntry(url, uncoatedModule) {
this.url = url;
this.value_ = uncoatedModule;
};
($traceurRuntime.createClass)(UncoatedModuleEntry, {}, {});
var ModuleEvaluationError = function ModuleEvaluationError(erroneousModuleName, cause) {
this.message = this.constructor.name + (cause ? ': \'' + cause + '\'' : '') + ' in ' + erroneousModuleName;
};
($traceurRuntime.createClass)(ModuleEvaluationError, {loadedBy: function(moduleName) {
this.message += '\n loaded by ' + moduleName;
}}, {}, Error);
var UncoatedModuleInstantiator = function UncoatedModuleInstantiator(url, func) {
$traceurRuntime.superCall(this, $UncoatedModuleInstantiator.prototype, "constructor", [url, null]);
this.func = func;
};
var $UncoatedModuleInstantiator = UncoatedModuleInstantiator;
($traceurRuntime.createClass)(UncoatedModuleInstantiator, {getUncoatedModule: function() {
if (this.value_)
return this.value_;
try {
return this.value_ = this.func.call(global);
} catch (ex) {
if (ex instanceof ModuleEvaluationError) {
ex.loadedBy(this.url);
throw ex;
}
throw new ModuleEvaluationError(this.url, ex);
}
}}, {}, UncoatedModuleEntry);
function getUncoatedModuleInstantiator(name) {
if (!name)
return;
var url = ModuleStore.normalize(name);
return moduleInstantiators[url];
}
;
var moduleInstances = Object.create(null);
var liveModuleSentinel = {};
function Module(uncoatedModule) {
var isLive = arguments[1];
var coatedModule = Object.create(null);
Object.getOwnPropertyNames(uncoatedModule).forEach((function(name) {
var getter,
value;
if (isLive === liveModuleSentinel) {
var descr = Object.getOwnPropertyDescriptor(uncoatedModule, name);
if (descr.get)
getter = descr.get;
}
if (!getter) {
value = uncoatedModule[name];
getter = function() {
return value;
};
}
Object.defineProperty(coatedModule, name, {
get: getter,
enumerable: true
});
}));
Object.preventExtensions(coatedModule);
return coatedModule;
}
var ModuleStore = {
normalize: function(name, refererName, refererAddress) {
if (typeof name !== "string")
throw new TypeError("module name must be a string, not " + typeof name);
if (isAbsolute(name))
return canonicalizeUrl(name);
if (/[^\.]\/\.\.\//.test(name)) {
throw new Error('module name embeds /../: ' + name);
}
if (name[0] === '.' && refererName)
return resolveUrl(refererName, name);
return canonicalizeUrl(name);
},
get: function(normalizedName) {
var m = getUncoatedModuleInstantiator(normalizedName);
if (!m)
return undefined;
var moduleInstance = moduleInstances[m.url];
if (moduleInstance)
return moduleInstance;
moduleInstance = Module(m.getUncoatedModule(), liveModuleSentinel);
return moduleInstances[m.url] = moduleInstance;
},
set: function(normalizedName, module) {
normalizedName = String(normalizedName);
moduleInstantiators[normalizedName] = new UncoatedModuleInstantiator(normalizedName, (function() {
return module;
}));
moduleInstances[normalizedName] = module;
},
get baseURL() {
return baseURL;
},
set baseURL(v) {
baseURL = String(v);
},
registerModule: function(name, func) {
var normalizedName = ModuleStore.normalize(name);
if (moduleInstantiators[normalizedName])
throw new Error('duplicate module named ' + normalizedName);
moduleInstantiators[normalizedName] = new UncoatedModuleInstantiator(normalizedName, func);
},
bundleStore: Object.create(null),
register: function(name, deps, func) {
if (!deps || !deps.length && !func.length) {
this.registerModule(name, func);
} else {
this.bundleStore[name] = {
deps: deps,
execute: function() {
var $__0 = arguments;
var depMap = {};
deps.forEach((function(dep, index) {
return depMap[dep] = $__0[index];
}));
var registryEntry = func.call(this, depMap);
registryEntry.execute.call(this);
return registryEntry.exports;
}
};
}
},
getAnonymousModule: function(func) {
return new Module(func.call(global), liveModuleSentinel);
},
getForTesting: function(name) {
var $__0 = this;
if (!this.testingPrefix_) {
Object.keys(moduleInstances).some((function(key) {
var m = /(traceur@[^\/]*\/)/.exec(key);
if (m) {
$__0.testingPrefix_ = m[1];
return true;
}
}));
}
return this.get(this.testingPrefix_ + name);
}
};
ModuleStore.set('@traceur/src/runtime/ModuleStore', new Module({ModuleStore: ModuleStore}));
var setupGlobals = $traceurRuntime.setupGlobals;
$traceurRuntime.setupGlobals = function(global) {
setupGlobals(global);
};
$traceurRuntime.ModuleStore = ModuleStore;
global.System = {
register: ModuleStore.register.bind(ModuleStore),
get: ModuleStore.get,
set: ModuleStore.set,
normalize: ModuleStore.normalize
};
$traceurRuntime.getModuleImpl = function(name) {
var instantiator = getUncoatedModuleInstantiator(name);
return instantiator && instantiator.getUncoatedModule();
};
})(typeof global !== 'undefined' ? global : this);
System.register("traceur@0.0.52/src/runtime/polyfills/utils", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/utils";
var $ceil = Math.ceil;
var $floor = Math.floor;
var $isFinite = isFinite;
var $isNaN = isNaN;
var $pow = Math.pow;
var $min = Math.min;
var toObject = $traceurRuntime.toObject;
function toUint32(x) {
return x >>> 0;
}
function isObject(x) {
return x && (typeof x === 'object' || typeof x === 'function');
}
function isCallable(x) {
return typeof x === 'function';
}
function isNumber(x) {
return typeof x === 'number';
}
function toInteger(x) {
x = +x;
if ($isNaN(x))
return 0;
if (x === 0 || !$isFinite(x))
return x;
return x > 0 ? $floor(x) : $ceil(x);
}
var MAX_SAFE_LENGTH = $pow(2, 53) - 1;
function toLength(x) {
var len = toInteger(x);
return len < 0 ? 0 : $min(len, MAX_SAFE_LENGTH);
}
function checkIterable(x) {
return !isObject(x) ? undefined : x[Symbol.iterator];
}
function isConstructor(x) {
return isCallable(x);
}
return {
get toObject() {
return toObject;
},
get toUint32() {
return toUint32;
},
get isObject() {
return isObject;
},
get isCallable() {
return isCallable;
},
get isNumber() {
return isNumber;
},
get toInteger() {
return toInteger;
},
get toLength() {
return toLength;
},
get checkIterable() {
return checkIterable;
},
get isConstructor() {
return isConstructor;
}
};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Array", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Array";
var $__3 = System.get("traceur@0.0.52/src/runtime/polyfills/utils"),
isCallable = $__3.isCallable,
isConstructor = $__3.isConstructor,
checkIterable = $__3.checkIterable,
toInteger = $__3.toInteger,
toLength = $__3.toLength,
toObject = $__3.toObject;
function from(arrLike) {
var mapFn = arguments[1];
var thisArg = arguments[2];
var C = this;
var items = toObject(arrLike);
var mapping = mapFn !== undefined;
var k = 0;
var arr,
len;
if (mapping && !isCallable(mapFn)) {
throw TypeError();
}
if (checkIterable(items)) {
arr = isConstructor(C) ? new C() : [];
for (var $__4 = items[Symbol.iterator](),
$__5; !($__5 = $__4.next()).done; ) {
var item = $__5.value;
{
if (mapping) {
arr[k] = mapFn.call(thisArg, item, k);
} else {
arr[k] = item;
}
k++;
}
}
arr.length = k;
return arr;
}
len = toLength(items.length);
arr = isConstructor(C) ? new C(len) : new Array(len);
for (; k < len; k++) {
if (mapping) {
arr[k] = mapFn.call(thisArg, items[k], k);
} else {
arr[k] = items[k];
}
}
arr.length = len;
return arr;
}
function fill(value) {
var start = arguments[1] !== (void 0) ? arguments[1] : 0;
var end = arguments[2];
var object = toObject(this);
var len = toLength(object.length);
var fillStart = toInteger(start);
var fillEnd = end !== undefined ? toInteger(end) : len;
fillStart = fillStart < 0 ? Math.max(len + fillStart, 0) : Math.min(fillStart, len);
fillEnd = fillEnd < 0 ? Math.max(len + fillEnd, 0) : Math.min(fillEnd, len);
while (fillStart < fillEnd) {
object[fillStart] = value;
fillStart++;
}
return object;
}
function find(predicate) {
var thisArg = arguments[1];
return findHelper(this, predicate, thisArg);
}
function findIndex(predicate) {
var thisArg = arguments[1];
return findHelper(this, predicate, thisArg, true);
}
function findHelper(self, predicate) {
var thisArg = arguments[2];
var returnIndex = arguments[3] !== (void 0) ? arguments[3] : false;
var object = toObject(self);
var len = toLength(object.length);
if (!isCallable(predicate)) {
throw TypeError();
}
for (var i = 0; i < len; i++) {
if (i in object) {
var value = object[i];
if (predicate.call(thisArg, value, i, object)) {
return returnIndex ? i : value;
}
}
}
return returnIndex ? -1 : undefined;
}
return {
get from() {
return from;
},
get fill() {
return fill;
},
get find() {
return find;
},
get findIndex() {
return findIndex;
}
};
});
System.register("traceur@0.0.52/src/runtime/polyfills/ArrayIterator", [], function() {
"use strict";
var $__8;
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/ArrayIterator";
var $__6 = System.get("traceur@0.0.52/src/runtime/polyfills/utils"),
toObject = $__6.toObject,
toUint32 = $__6.toUint32;
var ARRAY_ITERATOR_KIND_KEYS = 1;
var ARRAY_ITERATOR_KIND_VALUES = 2;
var ARRAY_ITERATOR_KIND_ENTRIES = 3;
var ArrayIterator = function ArrayIterator() {};
($traceurRuntime.createClass)(ArrayIterator, ($__8 = {}, Object.defineProperty($__8, "next", {
value: function() {
var iterator = toObject(this);
var array = iterator.iteratorObject_;
if (!array) {
throw new TypeError('Object is not an ArrayIterator');
}
var index = iterator.arrayIteratorNextIndex_;
var itemKind = iterator.arrayIterationKind_;
var length = toUint32(array.length);
if (index >= length) {
iterator.arrayIteratorNextIndex_ = Infinity;
return createIteratorResultObject(undefined, true);
}
iterator.arrayIteratorNextIndex_ = index + 1;
if (itemKind == ARRAY_ITERATOR_KIND_VALUES)
return createIteratorResultObject(array[index], false);
if (itemKind == ARRAY_ITERATOR_KIND_ENTRIES)
return createIteratorResultObject([index, array[index]], false);
return createIteratorResultObject(index, false);
},
configurable: true,
enumerable: true,
writable: true
}), Object.defineProperty($__8, Symbol.iterator, {
value: function() {
return this;
},
configurable: true,
enumerable: true,
writable: true
}), $__8), {});
function createArrayIterator(array, kind) {
var object = toObject(array);
var iterator = new ArrayIterator;
iterator.iteratorObject_ = object;
iterator.arrayIteratorNextIndex_ = 0;
iterator.arrayIterationKind_ = kind;
return iterator;
}
function createIteratorResultObject(value, done) {
return {
value: value,
done: done
};
}
function entries() {
return createArrayIterator(this, ARRAY_ITERATOR_KIND_ENTRIES);
}
function keys() {
return createArrayIterator(this, ARRAY_ITERATOR_KIND_KEYS);
}
function values() {
return createArrayIterator(this, ARRAY_ITERATOR_KIND_VALUES);
}
return {
get entries() {
return entries;
},
get keys() {
return keys;
},
get values() {
return values;
}
};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Map", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Map";
var isObject = System.get("traceur@0.0.52/src/runtime/polyfills/utils").isObject;
var getOwnHashObject = $traceurRuntime.getOwnHashObject;
var $hasOwnProperty = Object.prototype.hasOwnProperty;
var deletedSentinel = {};
function lookupIndex(map, key) {
if (isObject(key)) {
var hashObject = getOwnHashObject(key);
return hashObject && map.objectIndex_[hashObject.hash];
}
if (typeof key === 'string')
return map.stringIndex_[key];
return map.primitiveIndex_[key];
}
function initMap(map) {
map.entries_ = [];
map.objectIndex_ = Object.create(null);
map.stringIndex_ = Object.create(null);
map.primitiveIndex_ = Object.create(null);
map.deletedCount_ = 0;
}
var Map = function Map() {
var iterable = arguments[0];
if (!isObject(this))
throw new TypeError('Map called on incompatible type');
if ($hasOwnProperty.call(this, 'entries_')) {
throw new TypeError('Map can not be reentrantly initialised');
}
initMap(this);
if (iterable !== null && iterable !== undefined) {
for (var $__11 = iterable[Symbol.iterator](),
$__12; !($__12 = $__11.next()).done; ) {
var $__13 = $traceurRuntime.assertObject($__12.value),
key = $__13[0],
value = $__13[1];
{
this.set(key, value);
}
}
}
};
($traceurRuntime.createClass)(Map, {
get size() {
return this.entries_.length / 2 - this.deletedCount_;
},
get: function(key) {
var index = lookupIndex(this, key);
if (index !== undefined)
return this.entries_[index + 1];
},
set: function(key, value) {
var objectMode = isObject(key);
var stringMode = typeof key === 'string';
var index = lookupIndex(this, key);
if (index !== undefined) {
this.entries_[index + 1] = value;
} else {
index = this.entries_.length;
this.entries_[index] = key;
this.entries_[index + 1] = value;
if (objectMode) {
var hashObject = getOwnHashObject(key);
var hash = hashObject.hash;
this.objectIndex_[hash] = index;
} else if (stringMode) {
this.stringIndex_[key] = index;
} else {
this.primitiveIndex_[key] = index;
}
}
return this;
},
has: function(key) {
return lookupIndex(this, key) !== undefined;
},
delete: function(key) {
var objectMode = isObject(key);
var stringMode = typeof key === 'string';
var index;
var hash;
if (objectMode) {
var hashObject = getOwnHashObject(key);
if (hashObject) {
index = this.objectIndex_[hash = hashObject.hash];
delete this.objectIndex_[hash];
}
} else if (stringMode) {
index = this.stringIndex_[key];
delete this.stringIndex_[key];
} else {
index = this.primitiveIndex_[key];
delete this.primitiveIndex_[key];
}
if (index !== undefined) {
this.entries_[index] = deletedSentinel;
this.entries_[index + 1] = undefined;
this.deletedCount_++;
}
},
clear: function() {
initMap(this);
},
forEach: function(callbackFn) {
var thisArg = arguments[1];
for (var i = 0,
len = this.entries_.length; i < len; i += 2) {
var key = this.entries_[i];
var value = this.entries_[i + 1];
if (key === deletedSentinel)
continue;
callbackFn.call(thisArg, value, key, this);
}
},
entries: $traceurRuntime.initGeneratorFunction(function $__14() {
var i,
len,
key,
value;
return $traceurRuntime.createGeneratorInstance(function($ctx) {
while (true)
switch ($ctx.state) {
case 0:
i = 0, len = this.entries_.length;
$ctx.state = 12;
break;
case 12:
$ctx.state = (i < len) ? 8 : -2;
break;
case 4:
i += 2;
$ctx.state = 12;
break;
case 8:
key = this.entries_[i];
value = this.entries_[i + 1];
$ctx.state = 9;
break;
case 9:
$ctx.state = (key === deletedSentinel) ? 4 : 6;
break;
case 6:
$ctx.state = 2;
return [key, value];
case 2:
$ctx.maybeThrow();
$ctx.state = 4;
break;
default:
return $ctx.end();
}
}, $__14, this);
}),
keys: $traceurRuntime.initGeneratorFunction(function $__15() {
var i,
len,
key,
value;
return $traceurRuntime.createGeneratorInstance(function($ctx) {
while (true)
switch ($ctx.state) {
case 0:
i = 0, len = this.entries_.length;
$ctx.state = 12;
break;
case 12:
$ctx.state = (i < len) ? 8 : -2;
break;
case 4:
i += 2;
$ctx.state = 12;
break;
case 8:
key = this.entries_[i];
value = this.entries_[i + 1];
$ctx.state = 9;
break;
case 9:
$ctx.state = (key === deletedSentinel) ? 4 : 6;
break;
case 6:
$ctx.state = 2;
return key;
case 2:
$ctx.maybeThrow();
$ctx.state = 4;
break;
default:
return $ctx.end();
}
}, $__15, this);
}),
values: $traceurRuntime.initGeneratorFunction(function $__16() {
var i,
len,
key,
value;
return $traceurRuntime.createGeneratorInstance(function($ctx) {
while (true)
switch ($ctx.state) {
case 0:
i = 0, len = this.entries_.length;
$ctx.state = 12;
break;
case 12:
$ctx.state = (i < len) ? 8 : -2;
break;
case 4:
i += 2;
$ctx.state = 12;
break;
case 8:
key = this.entries_[i];
value = this.entries_[i + 1];
$ctx.state = 9;
break;
case 9:
$ctx.state = (key === deletedSentinel) ? 4 : 6;
break;
case 6:
$ctx.state = 2;
return value;
case 2:
$ctx.maybeThrow();
$ctx.state = 4;
break;
default:
return $ctx.end();
}
}, $__16, this);
})
}, {});
Object.defineProperty(Map.prototype, Symbol.iterator, {
configurable: true,
writable: true,
value: Map.prototype.entries
});
return {get Map() {
return Map;
}};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Number", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Number";
var $__17 = System.get("traceur@0.0.52/src/runtime/polyfills/utils"),
isNumber = $__17.isNumber,
toInteger = $__17.toInteger;
var $abs = Math.abs;
var $isFinite = isFinite;
var $isNaN = isNaN;
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
var MIN_SAFE_INTEGER = -Math.pow(2, 53) + 1;
var EPSILON = Math.pow(2, -52);
function NumberIsFinite(number) {
return isNumber(number) && $isFinite(number);
}
;
function isInteger(number) {
return NumberIsFinite(number) && toInteger(number) === number;
}
function NumberIsNaN(number) {
return isNumber(number) && $isNaN(number);
}
;
function isSafeInteger(number) {
if (NumberIsFinite(number)) {
var integral = toInteger(number);
if (integral === number)
return $abs(integral) <= MAX_SAFE_INTEGER;
}
return false;
}
return {
get MAX_SAFE_INTEGER() {
return MAX_SAFE_INTEGER;
},
get MIN_SAFE_INTEGER() {
return MIN_SAFE_INTEGER;
},
get EPSILON() {
return EPSILON;
},
get isFinite() {
return NumberIsFinite;
},
get isInteger() {
return isInteger;
},
get isNaN() {
return NumberIsNaN;
},
get isSafeInteger() {
return isSafeInteger;
}
};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Object", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Object";
var $__18 = $traceurRuntime.assertObject($traceurRuntime),
defineProperty = $__18.defineProperty,
getOwnPropertyDescriptor = $__18.getOwnPropertyDescriptor,
getOwnPropertyNames = $__18.getOwnPropertyNames,
keys = $__18.keys,
privateNames = $__18.privateNames;
function is(left, right) {
if (left === right)
return left !== 0 || 1 / left === 1 / right;
return left !== left && right !== right;
}
function assign(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
var props = keys(source);
var p,
length = props.length;
for (p = 0; p < length; p++) {
var name = props[p];
if (privateNames[name])
continue;
target[name] = source[name];
}
}
return target;
}
function mixin(target, source) {
var props = getOwnPropertyNames(source);
var p,
descriptor,
length = props.length;
for (p = 0; p < length; p++) {
var name = props[p];
if (privateNames[name])
continue;
descriptor = getOwnPropertyDescriptor(source, props[p]);
defineProperty(target, props[p], descriptor);
}
return target;
}
return {
get is() {
return is;
},
get assign() {
return assign;
},
get mixin() {
return mixin;
}
};
});
System.register("traceur@0.0.52/node_modules/rsvp/lib/rsvp/asap", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/node_modules/rsvp/lib/rsvp/asap";
var length = 0;
function asap(callback, arg) {
queue[length] = callback;
queue[length + 1] = arg;
length += 2;
if (length === 2) {
scheduleFlush();
}
}
var $__default = asap;
var browserGlobal = (typeof window !== 'undefined') ? window : {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
function useNextTick() {
return function() {
process.nextTick(flush);
};
}
function useMutationObserver() {
var iterations = 0;
var observer = new BrowserMutationObserver(flush);
var node = document.createTextNode('');
observer.observe(node, {characterData: true});
return function() {
node.data = (iterations = ++iterations % 2);
};
}
function useMessageChannel() {
var channel = new MessageChannel();
channel.port1.onmessage = flush;
return function() {
channel.port2.postMessage(0);
};
}
function useSetTimeout() {
return function() {
setTimeout(flush, 1);
};
}
var queue = new Array(1000);
function flush() {
for (var i = 0; i < length; i += 2) {
var callback = queue[i];
var arg = queue[i + 1];
callback(arg);
queue[i] = undefined;
queue[i + 1] = undefined;
}
length = 0;
}
var scheduleFlush;
if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') {
scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
scheduleFlush = useMutationObserver();
} else if (isWorker) {
scheduleFlush = useMessageChannel();
} else {
scheduleFlush = useSetTimeout();
}
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Promise", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Promise";
var async = System.get("traceur@0.0.52/node_modules/rsvp/lib/rsvp/asap").default;
var promiseRaw = {};
function isPromise(x) {
return x && typeof x === 'object' && x.status_ !== undefined;
}
function idResolveHandler(x) {
return x;
}
function idRejectHandler(x) {
throw x;
}
function chain(promise) {
var onResolve = arguments[1] !== (void 0) ? arguments[1] : idResolveHandler;
var onReject = arguments[2] !== (void 0) ? arguments[2] : idRejectHandler;
var deferred = getDeferred(promise.constructor);
switch (promise.status_) {
case undefined:
throw TypeError;
case 0:
promise.onResolve_.push(onResolve, deferred);
promise.onReject_.push(onReject, deferred);
break;
case +1:
promiseEnqueue(promise.value_, [onResolve, deferred]);
break;
case -1:
promiseEnqueue(promise.value_, [onReject, deferred]);
break;
}
return deferred.promise;
}
function getDeferred(C) {
if (this === $Promise) {
var promise = promiseInit(new $Promise(promiseRaw));
return {
promise: promise,
resolve: (function(x) {
promiseResolve(promise, x);
}),
reject: (function(r) {
promiseReject(promise, r);
})
};
} else {
var result = {};
result.promise = new C((function(resolve, reject) {
result.resolve = resolve;
result.reject = reject;
}));
return result;
}
}
function promiseSet(promise, status, value, onResolve, onReject) {
promise.status_ = status;
promise.value_ = value;
promise.onResolve_ = onResolve;
promise.onReject_ = onReject;
return promise;
}
function promiseInit(promise) {
return promiseSet(promise, 0, undefined, [], []);
}
var Promise = function Promise(resolver) {
if (resolver === promiseRaw)
return;
if (typeof resolver !== 'function')
throw new TypeError;
var promise = promiseInit(this);
try {
resolver((function(x) {
promiseResolve(promise, x);
}), (function(r) {
promiseReject(promise, r);
}));
} catch (e) {
promiseReject(promise, e);
}
};
($traceurRuntime.createClass)(Promise, {
catch: function(onReject) {
return this.then(undefined, onReject);
},
then: function(onResolve, onReject) {
if (typeof onResolve !== 'function')
onResolve = idResolveHandler;
if (typeof onReject !== 'function')
onReject = idRejectHandler;
var that = this;
var constructor = this.constructor;
return chain(this, function(x) {
x = promiseCoerce(constructor, x);
return x === that ? onReject(new TypeError) : isPromise(x) ? x.then(onResolve, onReject) : onResolve(x);
}, onReject);
}
}, {
resolve: function(x) {
if (this === $Promise) {
return promiseSet(new $Promise(promiseRaw), +1, x);
} else {
return new this(function(resolve, reject) {
resolve(x);
});
}
},
reject: function(r) {
if (this === $Promise) {
return promiseSet(new $Promise(promiseRaw), -1, r);
} else {
return new this((function(resolve, reject) {
reject(r);
}));
}
},
cast: function(x) {
if (x instanceof this)
return x;
if (isPromise(x)) {
var result = getDeferred(this);
chain(x, result.resolve, result.reject);
return result.promise;
}
return this.resolve(x);
},
all: function(values) {
var deferred = getDeferred(this);
var resolutions = [];
try {
var count = values.length;
if (count === 0) {
deferred.resolve(resolutions);
} else {
for (var i = 0; i < values.length; i++) {
this.resolve(values[i]).then(function(i, x) {
resolutions[i] = x;
if (--count === 0)
deferred.resolve(resolutions);
}.bind(undefined, i), (function(r) {
deferred.reject(r);
}));
}
}
} catch (e) {
deferred.reject(e);
}
return deferred.promise;
},
race: function(values) {
var deferred = getDeferred(this);
try {
for (var i = 0; i < values.length; i++) {
this.resolve(values[i]).then((function(x) {
deferred.resolve(x);
}), (function(r) {
deferred.reject(r);
}));
}
} catch (e) {
deferred.reject(e);
}
return deferred.promise;
}
});
var $Promise = Promise;
var $PromiseReject = $Promise.reject;
function promiseResolve(promise, x) {
promiseDone(promise, +1, x, promise.onResolve_);
}
function promiseReject(promise, r) {
promiseDone(promise, -1, r, promise.onReject_);
}
function promiseDone(promise, status, value, reactions) {
if (promise.status_ !== 0)
return;
promiseEnqueue(value, reactions);
promiseSet(promise, status, value);
}
function promiseEnqueue(value, tasks) {
async((function() {
for (var i = 0; i < tasks.length; i += 2) {
promiseHandle(value, tasks[i], tasks[i + 1]);
}
}));
}
function promiseHandle(value, handler, deferred) {
try {
var result = handler(value);
if (result === deferred.promise)
throw new TypeError;
else if (isPromise(result))
chain(result, deferred.resolve, deferred.reject);
else
deferred.resolve(result);
} catch (e) {
try {
deferred.reject(e);
} catch (e) {}
}
}
var thenableSymbol = '@@thenable';
function isObject(x) {
return x && (typeof x === 'object' || typeof x === 'function');
}
function promiseCoerce(constructor, x) {
if (!isPromise(x) && isObject(x)) {
var then;
try {
then = x.then;
} catch (r) {
var promise = $PromiseReject.call(constructor, r);
x[thenableSymbol] = promise;
return promise;
}
if (typeof then === 'function') {
var p = x[thenableSymbol];
if (p) {
return p;
} else {
var deferred = getDeferred(constructor);
x[thenableSymbol] = deferred.promise;
try {
then.call(x, deferred.resolve, deferred.reject);
} catch (r) {
deferred.reject(r);
}
return deferred.promise;
}
}
}
return x;
}
return {get Promise() {
return Promise;
}};
});
System.register("traceur@0.0.52/src/runtime/polyfills/Set", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/Set";
var isObject = System.get("traceur@0.0.52/src/runtime/polyfills/utils").isObject;
var Map = System.get("traceur@0.0.52/src/runtime/polyfills/Map").Map;
var getOwnHashObject = $traceurRuntime.getOwnHashObject;
var $hasOwnProperty = Object.prototype.hasOwnProperty;
function initSet(set) {
set.map_ = new Map();
}
var Set = function Set() {
var iterable = arguments[0];
if (!isObject(this))
throw new TypeError('Set called on incompatible type');
if ($hasOwnProperty.call(this, 'map_')) {
throw new TypeError('Set can not be reentrantly initialised');
}
initSet(this);
if (iterable !== null && iterable !== undefined) {
for (var $__25 = iterable[Symbol.iterator](),
$__26; !($__26 = $__25.next()).done; ) {
var item = $__26.value;
{
this.add(item);
}
}
}
};
($traceurRuntime.createClass)(Set, {
get size() {
return this.map_.size;
},
has: function(key) {
return this.map_.has(key);
},
add: function(key) {
return this.map_.set(key, key);
},
delete: function(key) {
return this.map_.delete(key);
},
clear: function() {
return this.map_.clear();
},
forEach: function(callbackFn) {
var thisArg = arguments[1];
var $__23 = this;
return this.map_.forEach((function(value, key) {
callbackFn.call(thisArg, key, key, $__23);
}));
},
values: $traceurRuntime.initGeneratorFunction(function $__27() {
var $__28,
$__29;
return $traceurRuntime.createGeneratorInstance(function($ctx) {
while (true)
switch ($ctx.state) {
case 0:
$__28 = this.map_.keys()[Symbol.iterator]();
$ctx.sent = void 0;
$ctx.action = 'next';
$ctx.state = 12;
break;
case 12:
$__29 = $__28[$ctx.action]($ctx.sentIgnoreThrow);
$ctx.state = 9;
break;
case 9:
$ctx.state = ($__29.done) ? 3 : 2;
break;
case 3:
$ctx.sent = $__29.value;
$ctx.state = -2;
break;
case 2:
$ctx.state = 12;
return $__29.value;
default:
return $ctx.end();
}
}, $__27, this);
}),
entries: $traceurRuntime.initGeneratorFunction(function $__30() {
var $__31,
$__32;
return $traceurRuntime.createGeneratorInstance(function($ctx) {
while (true)
switch ($ctx.state) {
case 0:
$__31 = this.map_.entries()[Symbol.iterator]();
$ctx.sent = void 0;
$ctx.action = 'next';
$ctx.state = 12;
break;
case 12:
$__32 = $__31[$ctx.action]($ctx.sentIgnoreThrow);
$ctx.state = 9;
break;
case 9:
$ctx.state = ($__32.done) ? 3 : 2;
break;
case 3:
$ctx.sent = $__32.value;
$ctx.state = -2;
break;
case 2:
$ctx.state = 12;
return $__32.value;
default:
return $ctx.end();
}
}, $__30, this);
})
}, {});
Object.defineProperty(Set.prototype, Symbol.iterator, {
configurable: true,
writable: true,
value: Set.prototype.values
});
Object.defineProperty(Set.prototype, 'keys', {
configurable: true,
writable: true,
value: Set.prototype.values
});
return {get Set() {
return Set;
}};
});
System.register("traceur@0.0.52/src/runtime/polyfills/String", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/String";
var $toString = Object.prototype.toString;
var $indexOf = String.prototype.indexOf;
var $lastIndexOf = String.prototype.lastIndexOf;
function startsWith(search) {
var string = String(this);
if (this == null || $toString.call(search) == '[object RegExp]') {
throw TypeError();
}
var stringLength = string.length;
var searchString = String(search);
var searchLength = searchString.length;
var position = arguments.length > 1 ? arguments[1] : undefined;
var pos = position ? Number(position) : 0;
if (isNaN(pos)) {
pos = 0;
}
var start = Math.min(Math.max(pos, 0), stringLength);
return $indexOf.call(string, searchString, pos) == start;
}
function endsWith(search) {
var string = String(this);
if (this == null || $toString.call(search) == '[object RegExp]') {
throw TypeError();
}
var stringLength = string.length;
var searchString = String(search);
var searchLength = searchString.length;
var pos = stringLength;
if (arguments.length > 1) {
var position = arguments[1];
if (position !== undefined) {
pos = position ? Number(position) : 0;
if (isNaN(pos)) {
pos = 0;
}
}
}
var end = Math.min(Math.max(pos, 0), stringLength);
var start = end - searchLength;
if (start < 0) {
return false;
}
return $lastIndexOf.call(string, searchString, start) == start;
}
function contains(search) {
if (this == null) {
throw TypeError();
}
var string = String(this);
var stringLength = string.length;
var searchString = String(search);
var searchLength = searchString.length;
var position = arguments.length > 1 ? arguments[1] : undefined;
var pos = position ? Number(position) : 0;
if (isNaN(pos)) {
pos = 0;
}
var start = Math.min(Math.max(pos, 0), stringLength);
return $indexOf.call(string, searchString, pos) != -1;
}
function repeat(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
var n = count ? Number(count) : 0;
if (isNaN(n)) {
n = 0;
}
if (n < 0 || n == Infinity) {
throw RangeError();
}
if (n == 0) {
return '';
}
var result = '';
while (n--) {
result += string;
}
return result;
}
function codePointAt(position) {
if (this == null) {
throw TypeError();
}
var string = String(this);
var size = string.length;
var index = position ? Number(position) : 0;
if (isNaN(index)) {
index = 0;
}
if (index < 0 || index >= size) {
return undefined;
}
var first = string.charCodeAt(index);
var second;
if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {
second = string.charCodeAt(index + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
}
}
return first;
}
function raw(callsite) {
var raw = callsite.raw;
var len = raw.length >>> 0;
if (len === 0)
return '';
var s = '';
var i = 0;
while (true) {
s += raw[i];
if (i + 1 === len)
return s;
s += arguments[++i];
}
}
function fromCodePoint() {
var codeUnits = [];
var floor = Math.floor;
var highSurrogate;
var lowSurrogate;
var index = -1;
var length = arguments.length;
if (!length) {
return '';
}
while (++index < length) {
var codePoint = Number(arguments[index]);
if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || floor(codePoint) != codePoint) {
throw RangeError('Invalid code point: ' + codePoint);
}
if (codePoint <= 0xFFFF) {
codeUnits.push(codePoint);
} else {
codePoint -= 0x10000;
highSurrogate = (codePoint >> 10) + 0xD800;
lowSurrogate = (codePoint % 0x400) + 0xDC00;
codeUnits.push(highSurrogate, lowSurrogate);
}
}
return String.fromCharCode.apply(null, codeUnits);
}
return {
get startsWith() {
return startsWith;
},
get endsWith() {
return endsWith;
},
get contains() {
return contains;
},
get repeat() {
return repeat;
},
get codePointAt() {
return codePointAt;
},
get raw() {
return raw;
},
get fromCodePoint() {
return fromCodePoint;
}
};
});
System.register("traceur@0.0.52/src/runtime/polyfills/polyfills", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfills/polyfills";
var Map = System.get("traceur@0.0.52/src/runtime/polyfills/Map").Map;
var Set = System.get("traceur@0.0.52/src/runtime/polyfills/Set").Set;
var Promise = System.get("traceur@0.0.52/src/runtime/polyfills/Promise").Promise;
var $__36 = System.get("traceur@0.0.52/src/runtime/polyfills/String"),
codePointAt = $__36.codePointAt,
contains = $__36.contains,
endsWith = $__36.endsWith,
fromCodePoint = $__36.fromCodePoint,
repeat = $__36.repeat,
raw = $__36.raw,
startsWith = $__36.startsWith;
var $__37 = System.get("traceur@0.0.52/src/runtime/polyfills/Array"),
fill = $__37.fill,
find = $__37.find,
findIndex = $__37.findIndex,
from = $__37.from;
var $__38 = System.get("traceur@0.0.52/src/runtime/polyfills/ArrayIterator"),
entries = $__38.entries,
keys = $__38.keys,
values = $__38.values;
var $__39 = System.get("traceur@0.0.52/src/runtime/polyfills/Object"),
assign = $__39.assign,
is = $__39.is,
mixin = $__39.mixin;
var $__40 = System.get("traceur@0.0.52/src/runtime/polyfills/Number"),
MAX_SAFE_INTEGER = $__40.MAX_SAFE_INTEGER,
MIN_SAFE_INTEGER = $__40.MIN_SAFE_INTEGER,
EPSILON = $__40.EPSILON,
isFinite = $__40.isFinite,
isInteger = $__40.isInteger,
isNaN = $__40.isNaN,
isSafeInteger = $__40.isSafeInteger;
var getPrototypeOf = $traceurRuntime.assertObject(Object).getPrototypeOf;
function maybeDefine(object, name, descr) {
if (!(name in object)) {
Object.defineProperty(object, name, descr);
}
}
function maybeDefineMethod(object, name, value) {
maybeDefine(object, name, {
value: value,
configurable: true,
enumerable: false,
writable: true
});
}
function maybeDefineConst(object, name, value) {
maybeDefine(object, name, {
value: value,
configurable: false,
enumerable: false,
writable: false
});
}
function maybeAddFunctions(object, functions) {
for (var i = 0; i < functions.length; i += 2) {
var name = functions[i];
var value = functions[i + 1];
maybeDefineMethod(object, name, value);
}
}
function maybeAddConsts(object, consts) {
for (var i = 0; i < consts.length; i += 2) {
var name = consts[i];
var value = consts[i + 1];
maybeDefineConst(object, name, value);
}
}
function maybeAddIterator(object, func, Symbol) {
if (!Symbol || !Symbol.iterator || object[Symbol.iterator])
return;
if (object['@@iterator'])
func = object['@@iterator'];
Object.defineProperty(object, Symbol.iterator, {
value: func,
configurable: true,
enumerable: false,
writable: true
});
}
function polyfillPromise(global) {
if (!global.Promise)
global.Promise = Promise;
}
function polyfillCollections(global, Symbol) {
if (!global.Map)
global.Map = Map;
var mapPrototype = global.Map.prototype;
if (mapPrototype.entries) {
maybeAddIterator(mapPrototype, mapPrototype.entries, Symbol);
maybeAddIterator(getPrototypeOf(new global.Map().entries()), function() {
return this;
}, Symbol);
}
if (!global.Set)
global.Set = Set;
var setPrototype = global.Set.prototype;
if (setPrototype.values) {
maybeAddIterator(setPrototype, setPrototype.values, Symbol);
maybeAddIterator(getPrototypeOf(new global.Set().values()), function() {
return this;
}, Symbol);
}
}
function polyfillString(String) {
maybeAddFunctions(String.prototype, ['codePointAt', codePointAt, 'contains', contains, 'endsWith', endsWith, 'startsWith', startsWith, 'repeat', repeat]);
maybeAddFunctions(String, ['fromCodePoint', fromCodePoint, 'raw', raw]);
}
function polyfillArray(Array, Symbol) {
maybeAddFunctions(Array.prototype, ['entries', entries, 'keys', keys, 'values', values, 'fill', fill, 'find', find, 'findIndex', findIndex]);
maybeAddFunctions(Array, ['from', from]);
maybeAddIterator(Array.prototype, values, Symbol);
maybeAddIterator(getPrototypeOf([].values()), function() {
return this;
}, Symbol);
}
function polyfillObject(Object) {
maybeAddFunctions(Object, ['assign', assign, 'is', is, 'mixin', mixin]);
}
function polyfillNumber(Number) {
maybeAddConsts(Number, ['MAX_SAFE_INTEGER', MAX_SAFE_INTEGER, 'MIN_SAFE_INTEGER', MIN_SAFE_INTEGER, 'EPSILON', EPSILON]);
maybeAddFunctions(Number, ['isFinite', isFinite, 'isInteger', isInteger, 'isNaN', isNaN, 'isSafeInteger', isSafeInteger]);
}
function polyfill(global) {
polyfillPromise(global);
polyfillCollections(global, global.Symbol);
polyfillString(global.String);
polyfillArray(global.Array, global.Symbol);
polyfillObject(global.Object);
polyfillNumber(global.Number);
}
polyfill(this);
var setupGlobals = $traceurRuntime.setupGlobals;
$traceurRuntime.setupGlobals = function(global) {
setupGlobals(global);
polyfill(global);
};
return {};
});
System.register("traceur@0.0.52/src/runtime/polyfill-import", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/polyfill-import";
System.get("traceur@0.0.52/src/runtime/polyfills/polyfills");
return {};
});
System.get("traceur@0.0.52/src/runtime/polyfill-import" + '');
System.register("traceur@0.0.52/src/Options", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/Options";
function enumerableOnlyObject(obj) {
var result = Object.create(null);
Object.keys(obj).forEach(function(key) {
Object.defineProperty(result, key, {
enumerable: true,
value: obj[key]
});
});
return result;
}
var optionsV01 = enumerableOnlyObject({
arrayComprehension: true,
arrowFunctions: true,
classes: true,
computedPropertyNames: true,
defaultParameters: true,
destructuring: true,
forOf: true,
generatorComprehension: true,
generators: true,
modules: 'register',
numericLiterals: true,
propertyMethods: true,
propertyNameShorthand: true,
restParameters: true,
spread: true,
templateLiterals: true,
asyncFunctions: false,
blockBinding: false,
symbols: false,
types: false,
annotations: false,
commentCallback: false,
debug: false,
freeVariableChecker: false,
sourceMaps: false,
typeAssertions: false,
validate: false,
referrer: '',
typeAssertionModule: null,
moduleName: false,
outputLanguage: 'es5',
filename: undefined
});
var versionLockedOptions = optionsV01;
var parseOptions = Object.create(null);
var transformOptions = Object.create(null);
var defaultValues = Object.create(null);
var experimentalOptions = Object.create(null);
var moduleOptions = ['amd', 'commonjs', 'instantiate', 'inline', 'register'];
var Options = function Options() {
var options = arguments[0] !== (void 0) ? arguments[0] : Object.create(null);
this.setDefaults();
this.setFromObject(versionLockedOptions);
this.setFromObject(options);
Object.defineProperties(this, {modules_: {
value: versionLockedOptions.modules,
writable: true,
enumerable: false
}});
};
($traceurRuntime.createClass)(Options, {
set experimental(v) {
var $__42 = this;
v = coerceOptionValue(v);
Object.keys(experimentalOptions).forEach((function(name) {
$__42[name] = v;
}));
},
get experimental() {
var $__42 = this;
var value;
Object.keys(experimentalOptions).every((function(name) {
var currentValue = $__42[name];
if (value === undefined) {
value = currentValue;
return true;
}
if (currentValue !== value) {
value = null;
return false;
}
return true;
}));
return value;
},
get modules() {
return this.modules_;
},
set modules(value) {
if (typeof value === 'boolean' && !value)
value = 'register';
if (moduleOptions.indexOf(value) === -1) {
throw new Error('Invalid \'modules\' option \'' + value + '\', not in ' + moduleOptions.join(', '));
}
this.modules_ = value;
},
reset: function() {
var allOff = arguments[0];
var $__42 = this;
var useDefault = allOff === undefined;
Object.keys(this).forEach((function(name) {
$__42[name] = useDefault && defaultValues[name];
}));
this.setDefaults();
},
setDefaults: function() {
this.modules = 'register';
this.moduleName = false;
this.outputLanguage = 'es5';
this.filename = undefined;
},
setFromObject: function(object) {
var $__42 = this;
Object.keys(object).forEach((function(name) {
$__42[name] = object[name];
}));
this.modules = object.modules || this.modules;
return this;
}
}, {});
;
var options = new Options();
var descriptions = {
experimental: 'Turns on all experimental features',
sourceMaps: 'generate source map and write to .map'
};
var CommandOptions = function CommandOptions() {
$traceurRuntime.defaultSuperCall(this, $CommandOptions.prototype, arguments);
};
var $CommandOptions = CommandOptions;
($traceurRuntime.createClass)(CommandOptions, {
parseCommand: function(s) {
var re = /--([^=]+)(?:=(.+))?/;
var m = re.exec(s);
if (m)
this.setOption(m[1], m[2] || true);
},
setOption: function(name, value) {
name = toCamelCase(name);
value = coerceOptionValue(value);
if (name in this) {
this[name] = value;
} else {
throw Error('Unknown option: ' + name);
}
}
}, {
fromString: function(s) {
return $CommandOptions.fromArgv(s.split(/\s+/));
},
fromArgv: function(args) {
var options = new $CommandOptions();
args.forEach((function(arg) {
return options.parseCommand(arg);
}));
return options;
}
}, Options);
function coerceOptionValue(v) {
switch (v) {
case 'false':
return false;
case 'true':
case true:
return true;
default:
return !!v && String(v);
}
}
function addOptions(flags, commandOptions) {
flags.option('--referrer <name>', 'Bracket output code with System.referrerName=<name>', (function(name) {
commandOptions.setOption('referrer', name);
System.map = System.semverMap(name);
return name;
}));
flags.option('--type-assertion-module <path>', 'Absolute path to the type assertion module.', (function(path) {
commandOptions.setOption('type-assertion-module', path);
return path;
}));
flags.option('--modules <' + moduleOptions.join(', ') + '>', 'select the output format for modules', (function(moduleFormat) {
commandOptions.modules = moduleFormat;
}));
flags.option('--moduleName <string>', '__moduleName value, + sign to use filename, or empty to omit; default +', (function(moduleName) {
if (moduleName === '+')
moduleName = true;
commandOptions.moduleName = moduleName;
}));
flags.option('--outputLanguage <es6|es5>', 'compilation target language', (function(outputLanguage) {
if (outputLanguage === 'es6' || outputLanguage === 'es5')
commandOptions.outputLanguage = outputLanguage;
else
throw new Error('outputLanguage must be one of es5, es6');
}));
flags.option('--experimental ', 'Turns on all experimental features', (function() {
commandOptions.experimental = true;
}));
Object.keys(commandOptions).forEach(function(name) {
var dashedName = toDashCase(name);
if (flags.optionFor('--' + name) || flags.optionFor('--' + dashedName)) {
return;
} else if ((name in parseOptions) && (name in transformOptions)) {
flags.option('--' + dashedName + ' [true|false|parse]', descriptions[name]);
flags.on(dashedName, (function(value) {
return commandOptions.setOption(dashedName, value);
}));
} else if (commandOptions[name] !== null) {
flags.option('--' + dashedName, descriptions[name]);
flags.on(dashedName, (function() {
return commandOptions.setOption(dashedName, true);
}));
} else {
throw new Error('Unexpected null commandOption ' + name);
}
});
commandOptions.setDefaults();
}
function toCamelCase(s) {
return s.replace(/-\w/g, function(ch) {
return ch[1].toUpperCase();
});
}
function toDashCase(s) {
return s.replace(/[A-Z]/g, function(ch) {
return '-' + ch.toLowerCase();
});
}
var EXPERIMENTAL = 0;
var ON_BY_DEFAULT = 1;
function addFeatureOption(name, kind) {
if (kind === EXPERIMENTAL)
experimentalOptions[name] = true;
Object.defineProperty(parseOptions, name, {
get: function() {
return !!options[name];
},
enumerable: true,
configurable: true
});
Object.defineProperty(transformOptions, name, {
get: function() {
var v = options[name];
if (v === 'parse')
return false;
return v;
},
enumerable: true,
configurable: true
});
var defaultValue = options[name] || kind === ON_BY_DEFAULT;
options[name] = defaultValue;
defaultValues[name] = defaultValue;
}
function addBoolOption(name) {
defaultValues[name] = false;
options[name] = false;
}
addFeatureOption('arrayComprehension', ON_BY_DEFAULT);
addFeatureOption('arrowFunctions', ON_BY_DEFAULT);
addFeatureOption('classes', ON_BY_DEFAULT);
addFeatureOption('computedPropertyNames', ON_BY_DEFAULT);
addFeatureOption('defaultParameters', ON_BY_DEFAULT);
addFeatureOption('destructuring', ON_BY_DEFAULT);
addFeatureOption('forOf', ON_BY_DEFAULT);
addFeatureOption('generatorComprehension', ON_BY_DEFAULT);
addFeatureOption('generators', ON_BY_DEFAULT);
addFeatureOption('modules', 'SPECIAL');
addFeatureOption('numericLiterals', ON_BY_DEFAULT);
addFeatureOption('propertyMethods', ON_BY_DEFAULT);
addFeatureOption('propertyNameShorthand', ON_BY_DEFAULT);
addFeatureOption('restParameters', ON_BY_DEFAULT);
addFeatureOption('spread', ON_BY_DEFAULT);
addFeatureOption('templateLiterals', ON_BY_DEFAULT);
addFeatureOption('asyncFunctions', EXPERIMENTAL);
addFeatureOption('blockBinding', EXPERIMENTAL);
addFeatureOption('symbols', EXPERIMENTAL);
addFeatureOption('types', EXPERIMENTAL);
addFeatureOption('annotations', EXPERIMENTAL);
addBoolOption('commentCallback');
addBoolOption('debug');
addBoolOption('freeVariableChecker');
addBoolOption('sourceMaps');
addBoolOption('typeAssertions');
addBoolOption('validate');
defaultValues.referrer = '';
options.referrer = null;
defaultValues.typeAssertionModule = null;
options.typeAssertionModule = null;
return {
get optionsV01() {
return optionsV01;
},
get versionLockedOptions() {
return versionLockedOptions;
},
get parseOptions() {
return parseOptions;
},
get transformOptions() {
return transformOptions;
},
get Options() {
return Options;
},
get options() {
return options;
},
get CommandOptions() {
return CommandOptions;
},
get addOptions() {
return addOptions;
}
};
});
System.register("traceur@0.0.52/src/syntax/TokenType", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/TokenType";
var AMPERSAND = '&';
var AMPERSAND_EQUAL = '&=';
var AND = '&&';
var ARROW = '=>';
var AT = '@';
var BACK_QUOTE = '`';
var BANG = '!';
var BAR = '|';
var BAR_EQUAL = '|=';
var BREAK = 'break';
var CARET = '^';
var CARET_EQUAL = '^=';
var CASE = 'case';
var CATCH = 'catch';
var CLASS = 'class';
var CLOSE_ANGLE = '>';
var CLOSE_CURLY = '}';
var CLOSE_PAREN = ')';
var CLOSE_SQUARE = ']';
var COLON = ':';
var COMMA = ',';
var CONST = 'const';
var CONTINUE = 'continue';
var DEBUGGER = 'debugger';
var DEFAULT = 'default';
var DELETE = 'delete';
var DO = 'do';
var DOT_DOT_DOT = '...';
var ELSE = 'else';
var END_OF_FILE = 'End of File';
var ENUM = 'enum';
var EQUAL = '=';
var EQUAL_EQUAL = '==';
var EQUAL_EQUAL_EQUAL = '===';
var ERROR = 'error';
var EXPORT = 'export';
var EXTENDS = 'extends';
var FALSE = 'false';
var FINALLY = 'finally';
var FOR = 'for';
var FUNCTION = 'function';
var GREATER_EQUAL = '>=';
var IDENTIFIER = 'identifier';
var IF = 'if';
var IMPLEMENTS = 'implements';
var IMPORT = 'import';
var IN = 'in';
var INSTANCEOF = 'instanceof';
var INTERFACE = 'interface';
var LEFT_SHIFT = '<<';
var LEFT_SHIFT_EQUAL = '<<=';
var LESS_EQUAL = '<=';
var LET = 'let';
var MINUS = '-';
var MINUS_EQUAL = '-=';
var MINUS_MINUS = '--';
var NEW = 'new';
var NO_SUBSTITUTION_TEMPLATE = 'no substitution template';
var NOT_EQUAL = '!=';
var NOT_EQUAL_EQUAL = '!==';
var NULL = 'null';
var NUMBER = 'number literal';
var OPEN_ANGLE = '<';
var OPEN_CURLY = '{';
var OPEN_PAREN = '(';
var OPEN_SQUARE = '[';
var OR = '||';
var PACKAGE = 'package';
var PERCENT = '%';
var PERCENT_EQUAL = '%=';
var PERIOD = '.';
var PLUS = '+';
var PLUS_EQUAL = '+=';
var PLUS_PLUS = '++';
var PRIVATE = 'private';
var PROTECTED = 'protected';
var PUBLIC = 'public';
var QUESTION = '?';
var REGULAR_EXPRESSION = 'regular expression literal';
var RETURN = 'return';
var RIGHT_SHIFT = '>>';
var RIGHT_SHIFT_EQUAL = '>>=';
var SEMI_COLON = ';';
var SLASH = '/';
var SLASH_EQUAL = '/=';
var STAR = '*';
var STAR_EQUAL = '*=';
var STATIC = 'static';
var STRING = 'string literal';
var SUPER = 'super';
var SWITCH = 'switch';
var TEMPLATE_HEAD = 'template head';
var TEMPLATE_MIDDLE = 'template middle';
var TEMPLATE_TAIL = 'template tail';
var THIS = 'this';
var THROW = 'throw';
var TILDE = '~';
var TRUE = 'true';
var TRY = 'try';
var TYPEOF = 'typeof';
var UNSIGNED_RIGHT_SHIFT = '>>>';
var UNSIGNED_RIGHT_SHIFT_EQUAL = '>>>=';
var VAR = 'var';
var VOID = 'void';
var WHILE = 'while';
var WITH = 'with';
var YIELD = 'yield';
return {
get AMPERSAND() {
return AMPERSAND;
},
get AMPERSAND_EQUAL() {
return AMPERSAND_EQUAL;
},
get AND() {
return AND;
},
get ARROW() {
return ARROW;
},
get AT() {
return AT;
},
get BACK_QUOTE() {
return BACK_QUOTE;
},
get BANG() {
return BANG;
},
get BAR() {
return BAR;
},
get BAR_EQUAL() {
return BAR_EQUAL;
},
get BREAK() {
return BREAK;
},
get CARET() {
return CARET;
},
get CARET_EQUAL() {
return CARET_EQUAL;
},
get CASE() {
return CASE;
},
get CATCH() {
return CATCH;
},
get CLASS() {
return CLASS;
},
get CLOSE_ANGLE() {
return CLOSE_ANGLE;
},
get CLOSE_CURLY() {
return CLOSE_CURLY;
},
get CLOSE_PAREN() {
return CLOSE_PAREN;
},
get CLOSE_SQUARE() {
return CLOSE_SQUARE;
},
get COLON() {
return COLON;
},
get COMMA() {
return COMMA;
},
get CONST() {
return CONST;
},
get CONTINUE() {
return CONTINUE;
},
get DEBUGGER() {
return DEBUGGER;
},
get DEFAULT() {
return DEFAULT;
},
get DELETE() {
return DELETE;
},
get DO() {
return DO;
},
get DOT_DOT_DOT() {
return DOT_DOT_DOT;
},
get ELSE() {
return ELSE;
},
get END_OF_FILE() {
return END_OF_FILE;
},
get ENUM() {
return ENUM;
},
get EQUAL() {
return EQUAL;
},
get EQUAL_EQUAL() {
return EQUAL_EQUAL;
},
get EQUAL_EQUAL_EQUAL() {
return EQUAL_EQUAL_EQUAL;
},
get ERROR() {
return ERROR;
},
get EXPORT() {
return EXPORT;
},
get EXTENDS() {
return EXTENDS;
},
get FALSE() {
return FALSE;
},
get FINALLY() {
return FINALLY;
},
get FOR() {
return FOR;
},
get FUNCTION() {
return FUNCTION;
},
get GREATER_EQUAL() {
return GREATER_EQUAL;
},
get IDENTIFIER() {
return IDENTIFIER;
},
get IF() {
return IF;
},
get IMPLEMENTS() {
return IMPLEMENTS;
},
get IMPORT() {
return IMPORT;
},
get IN() {
return IN;
},
get INSTANCEOF() {
return INSTANCEOF;
},
get INTERFACE() {
return INTERFACE;
},
get LEFT_SHIFT() {
return LEFT_SHIFT;
},
get LEFT_SHIFT_EQUAL() {
return LEFT_SHIFT_EQUAL;
},
get LESS_EQUAL() {
return LESS_EQUAL;
},
get LET() {
return LET;
},
get MINUS() {
return MINUS;
},
get MINUS_EQUAL() {
return MINUS_EQUAL;
},
get MINUS_MINUS() {
return MINUS_MINUS;
},
get NEW() {
return NEW;
},
get NO_SUBSTITUTION_TEMPLATE() {
return NO_SUBSTITUTION_TEMPLATE;
},
get NOT_EQUAL() {
return NOT_EQUAL;
},
get NOT_EQUAL_EQUAL() {
return NOT_EQUAL_EQUAL;
},
get NULL() {
return NULL;
},
get NUMBER() {
return NUMBER;
},
get OPEN_ANGLE() {
return OPEN_ANGLE;
},
get OPEN_CURLY() {
return OPEN_CURLY;
},
get OPEN_PAREN() {
return OPEN_PAREN;
},
get OPEN_SQUARE() {
return OPEN_SQUARE;
},
get OR() {
return OR;
},
get PACKAGE() {
return PACKAGE;
},
get PERCENT() {
return PERCENT;
},
get PERCENT_EQUAL() {
return PERCENT_EQUAL;
},
get PERIOD() {
return PERIOD;
},
get PLUS() {
return PLUS;
},
get PLUS_EQUAL() {
return PLUS_EQUAL;
},
get PLUS_PLUS() {
return PLUS_PLUS;
},
get PRIVATE() {
return PRIVATE;
},
get PROTECTED() {
return PROTECTED;
},
get PUBLIC() {
return PUBLIC;
},
get QUESTION() {
return QUESTION;
},
get REGULAR_EXPRESSION() {
return REGULAR_EXPRESSION;
},
get RETURN() {
return RETURN;
},
get RIGHT_SHIFT() {
return RIGHT_SHIFT;
},
get RIGHT_SHIFT_EQUAL() {
return RIGHT_SHIFT_EQUAL;
},
get SEMI_COLON() {
return SEMI_COLON;
},
get SLASH() {
return SLASH;
},
get SLASH_EQUAL() {
return SLASH_EQUAL;
},
get STAR() {
return STAR;
},
get STAR_EQUAL() {
return STAR_EQUAL;
},
get STATIC() {
return STATIC;
},
get STRING() {
return STRING;
},
get SUPER() {
return SUPER;
},
get SWITCH() {
return SWITCH;
},
get TEMPLATE_HEAD() {
return TEMPLATE_HEAD;
},
get TEMPLATE_MIDDLE() {
return TEMPLATE_MIDDLE;
},
get TEMPLATE_TAIL() {
return TEMPLATE_TAIL;
},
get THIS() {
return THIS;
},
get THROW() {
return THROW;
},
get TILDE() {
return TILDE;
},
get TRUE() {
return TRUE;
},
get TRY() {
return TRY;
},
get TYPEOF() {
return TYPEOF;
},
get UNSIGNED_RIGHT_SHIFT() {
return UNSIGNED_RIGHT_SHIFT;
},
get UNSIGNED_RIGHT_SHIFT_EQUAL() {
return UNSIGNED_RIGHT_SHIFT_EQUAL;
},
get VAR() {
return VAR;
},
get VOID() {
return VOID;
},
get WHILE() {
return WHILE;
},
get WITH() {
return WITH;
},
get YIELD() {
return YIELD;
}
};
});
System.register("traceur@0.0.52/src/syntax/trees/ParseTreeType", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/trees/ParseTreeType";
var ANNOTATION = 'ANNOTATION';
var ANON_BLOCK = 'ANON_BLOCK';
var ARGUMENT_LIST = 'ARGUMENT_LIST';
var ARRAY_COMPREHENSION = 'ARRAY_COMPREHENSION';
var ARRAY_LITERAL_EXPRESSION = 'ARRAY_LITERAL_EXPRESSION';
var ARRAY_PATTERN = 'ARRAY_PATTERN';
var ARROW_FUNCTION_EXPRESSION = 'ARROW_FUNCTION_EXPRESSION';
var ASSIGNMENT_ELEMENT = 'ASSIGNMENT_ELEMENT';
var AWAIT_EXPRESSION = 'AWAIT_EXPRESSION';
var BINARY_EXPRESSION = 'BINARY_EXPRESSION';
var BINDING_ELEMENT = 'BINDING_ELEMENT';
var BINDING_IDENTIFIER = 'BINDING_IDENTIFIER';
var BLOCK = 'BLOCK';
var BREAK_STATEMENT = 'BREAK_STATEMENT';
var CALL_EXPRESSION = 'CALL_EXPRESSION';
var CASE_CLAUSE = 'CASE_CLAUSE';
var CATCH = 'CATCH';
var CLASS_DECLARATION = 'CLASS_DECLARATION';
var CLASS_EXPRESSION = 'CLASS_EXPRESSION';
var COMMA_EXPRESSION = 'COMMA_EXPRESSION';
var COMPREHENSION_FOR = 'COMPREHENSION_FOR';
var COMPREHENSION_IF = 'COMPREHENSION_IF';
var COMPUTED_PROPERTY_NAME = 'COMPUTED_PROPERTY_NAME';
var CONDITIONAL_EXPRESSION = 'CONDITIONAL_EXPRESSION';
var CONTINUE_STATEMENT = 'CONTINUE_STATEMENT';
var COVER_FORMALS = 'COVER_FORMALS';
var COVER_INITIALIZED_NAME = 'COVER_INITIALIZED_NAME';
var DEBUGGER_STATEMENT = 'DEBUGGER_STATEMENT';
var DEFAULT_CLAUSE = 'DEFAULT_CLAUSE';
var DO_WHILE_STATEMENT = 'DO_WHILE_STATEMENT';
var EMPTY_STATEMENT = 'EMPTY_STATEMENT';
var EXPORT_DECLARATION = 'EXPORT_DECLARATION';
var EXPORT_DEFAULT = 'EXPORT_DEFAULT';
var EXPORT_SPECIFIER = 'EXPORT_SPECIFIER';
var EXPORT_SPECIFIER_SET = 'EXPORT_SPECIFIER_SET';
var EXPORT_STAR = 'EXPORT_STAR';
var EXPRESSION_STATEMENT = 'EXPRESSION_STATEMENT';
var FINALLY = 'FINALLY';
var FOR_IN_STATEMENT = 'FOR_IN_STATEMENT';
var FOR_OF_STATEMENT = 'FOR_OF_STATEMENT';
var FOR_STATEMENT = 'FOR_STATEMENT';
var FORMAL_PARAMETER = 'FORMAL_PARAMETER';
var FORMAL_PARAMETER_LIST = 'FORMAL_PARAMETER_LIST';
var FUNCTION_BODY = 'FUNCTION_BODY';
var FUNCTION_DECLARATION = 'FUNCTION_DECLARATION';
var FUNCTION_EXPRESSION = 'FUNCTION_EXPRESSION';
var GENERATOR_COMPREHENSION = 'GENERATOR_COMPREHENSION';
var GET_ACCESSOR = 'GET_ACCESSOR';
var IDENTIFIER_EXPRESSION = 'IDENTIFIER_EXPRESSION';
var IF_STATEMENT = 'IF_STATEMENT';
var IMPORT_DECLARATION = 'IMPORT_DECLARATION';
var IMPORT_SPECIFIER = 'IMPORT_SPECIFIER';
var IMPORT_SPECIFIER_SET = 'IMPORT_SPECIFIER_SET';
var IMPORTED_BINDING = 'IMPORTED_BINDING';
var LABELLED_STATEMENT = 'LABELLED_STATEMENT';
var LITERAL_EXPRESSION = 'LITERAL_EXPRESSION';
var LITERAL_PROPERTY_NAME = 'LITERAL_PROPERTY_NAME';
var MEMBER_EXPRESSION = 'MEMBER_EXPRESSION';
var MEMBER_LOOKUP_EXPRESSION = 'MEMBER_LOOKUP_EXPRESSION';
var MODULE = 'MODULE';
var MODULE_DECLARATION = 'MODULE_DECLARATION';
var MODULE_SPECIFIER = 'MODULE_SPECIFIER';
var NAMED_EXPORT = 'NAMED_EXPORT';
var NEW_EXPRESSION = 'NEW_EXPRESSION';
var OBJECT_LITERAL_EXPRESSION = 'OBJECT_LITERAL_EXPRESSION';
var OBJECT_PATTERN = 'OBJECT_PATTERN';
var OBJECT_PATTERN_FIELD = 'OBJECT_PATTERN_FIELD';
var PAREN_EXPRESSION = 'PAREN_EXPRESSION';
var POSTFIX_EXPRESSION = 'POSTFIX_EXPRESSION';
var PREDEFINED_TYPE = 'PREDEFINED_TYPE';
var PROPERTY_METHOD_ASSIGNMENT = 'PROPERTY_METHOD_ASSIGNMENT';
var PROPERTY_NAME_ASSIGNMENT = 'PROPERTY_NAME_ASSIGNMENT';
var PROPERTY_NAME_SHORTHAND = 'PROPERTY_NAME_SHORTHAND';
var REST_PARAMETER = 'REST_PARAMETER';
var RETURN_STATEMENT = 'RETURN_STATEMENT';
var SCRIPT = 'SCRIPT';
var SET_ACCESSOR = 'SET_ACCESSOR';
var SPREAD_EXPRESSION = 'SPREAD_EXPRESSION';
var SPREAD_PATTERN_ELEMENT = 'SPREAD_PATTERN_ELEMENT';
var STATE_MACHINE = 'STATE_MACHINE';
var SUPER_EXPRESSION = 'SUPER_EXPRESSION';
var SWITCH_STATEMENT = 'SWITCH_STATEMENT';
var SYNTAX_ERROR_TREE = 'SYNTAX_ERROR_TREE';
var TEMPLATE_LITERAL_EXPRESSION = 'TEMPLATE_LITERAL_EXPRESSION';
var TEMPLATE_LITERAL_PORTION = 'TEMPLATE_LITERAL_PORTION';
var TEMPLATE_SUBSTITUTION = 'TEMPLATE_SUBSTITUTION';
var THIS_EXPRESSION = 'THIS_EXPRESSION';
var THROW_STATEMENT = 'THROW_STATEMENT';
var TRY_STATEMENT = 'TRY_STATEMENT';
var TYPE_NAME = 'TYPE_NAME';
var UNARY_EXPRESSION = 'UNARY_EXPRESSION';
var VARIABLE_DECLARATION = 'VARIABLE_DECLARATION';
var VARIABLE_DECLARATION_LIST = 'VARIABLE_DECLARATION_LIST';
var VARIABLE_STATEMENT = 'VARIABLE_STATEMENT';
var WHILE_STATEMENT = 'WHILE_STATEMENT';
var WITH_STATEMENT = 'WITH_STATEMENT';
var YIELD_EXPRESSION = 'YIELD_EXPRESSION';
return {
get ANNOTATION() {
return ANNOTATION;
},
get ANON_BLOCK() {
return ANON_BLOCK;
},
get ARGUMENT_LIST() {
return ARGUMENT_LIST;
},
get ARRAY_COMPREHENSION() {
return ARRAY_COMPREHENSION;
},
get ARRAY_LITERAL_EXPRESSION() {
return ARRAY_LITERAL_EXPRESSION;
},
get ARRAY_PATTERN() {
return ARRAY_PATTERN;
},
get ARROW_FUNCTION_EXPRESSION() {
return ARROW_FUNCTION_EXPRESSION;
},
get ASSIGNMENT_ELEMENT() {
return ASSIGNMENT_ELEMENT;
},
get AWAIT_EXPRESSION() {
return AWAIT_EXPRESSION;
},
get BINARY_EXPRESSION() {
return BINARY_EXPRESSION;
},
get BINDING_ELEMENT() {
return BINDING_ELEMENT;
},
get BINDING_IDENTIFIER() {
return BINDING_IDENTIFIER;
},
get BLOCK() {
return BLOCK;
},
get BREAK_STATEMENT() {
return BREAK_STATEMENT;
},
get CALL_EXPRESSION() {
return CALL_EXPRESSION;
},
get CASE_CLAUSE() {
return CASE_CLAUSE;
},
get CATCH() {
return CATCH;
},
get CLASS_DECLARATION() {
return CLASS_DECLARATION;
},
get CLASS_EXPRESSION() {
return CLASS_EXPRESSION;
},
get COMMA_EXPRESSION() {
return COMMA_EXPRESSION;
},
get COMPREHENSION_FOR() {
return COMPREHENSION_FOR;
},
get COMPREHENSION_IF() {
return COMPREHENSION_IF;
},
get COMPUTED_PROPERTY_NAME() {
return COMPUTED_PROPERTY_NAME;
},
get CONDITIONAL_EXPRESSION() {
return CONDITIONAL_EXPRESSION;
},
get CONTINUE_STATEMENT() {
return CONTINUE_STATEMENT;
},
get COVER_FORMALS() {
return COVER_FORMALS;
},
get COVER_INITIALIZED_NAME() {
return COVER_INITIALIZED_NAME;
},
get DEBUGGER_STATEMENT() {
return DEBUGGER_STATEMENT;
},
get DEFAULT_CLAUSE() {
return DEFAULT_CLAUSE;
},
get DO_WHILE_STATEMENT() {
return DO_WHILE_STATEMENT;
},
get EMPTY_STATEMENT() {
return EMPTY_STATEMENT;
},
get EXPORT_DECLARATION() {
return EXPORT_DECLARATION;
},
get EXPORT_DEFAULT() {
return EXPORT_DEFAULT;
},
get EXPORT_SPECIFIER() {
return EXPORT_SPECIFIER;
},
get EXPORT_SPECIFIER_SET() {
return EXPORT_SPECIFIER_SET;
},
get EXPORT_STAR() {
return EXPORT_STAR;
},
get EXPRESSION_STATEMENT() {
return EXPRESSION_STATEMENT;
},
get FINALLY() {
return FINALLY;
},
get FOR_IN_STATEMENT() {
return FOR_IN_STATEMENT;
},
get FOR_OF_STATEMENT() {
return FOR_OF_STATEMENT;
},
get FOR_STATEMENT() {
return FOR_STATEMENT;
},
get FORMAL_PARAMETER() {
return FORMAL_PARAMETER;
},
get FORMAL_PARAMETER_LIST() {
return FORMAL_PARAMETER_LIST;
},
get FUNCTION_BODY() {
return FUNCTION_BODY;
},
get FUNCTION_DECLARATION() {
return FUNCTION_DECLARATION;
},
get FUNCTION_EXPRESSION() {
return FUNCTION_EXPRESSION;
},
get GENERATOR_COMPREHENSION() {
return GENERATOR_COMPREHENSION;
},
get GET_ACCESSOR() {
return GET_ACCESSOR;
},
get IDENTIFIER_EXPRESSION() {
return IDENTIFIER_EXPRESSION;
},
get IF_STATEMENT() {
return IF_STATEMENT;
},
get IMPORT_DECLARATION() {
return IMPORT_DECLARATION;
},
get IMPORT_SPECIFIER() {
return IMPORT_SPECIFIER;
},
get IMPORT_SPECIFIER_SET() {
return IMPORT_SPECIFIER_SET;
},
get IMPORTED_BINDING() {
return IMPORTED_BINDING;
},
get LABELLED_STATEMENT() {
return LABELLED_STATEMENT;
},
get LITERAL_EXPRESSION() {
return LITERAL_EXPRESSION;
},
get LITERAL_PROPERTY_NAME() {
return LITERAL_PROPERTY_NAME;
},
get MEMBER_EXPRESSION() {
return MEMBER_EXPRESSION;
},
get MEMBER_LOOKUP_EXPRESSION() {
return MEMBER_LOOKUP_EXPRESSION;
},
get MODULE() {
return MODULE;
},
get MODULE_DECLARATION() {
return MODULE_DECLARATION;
},
get MODULE_SPECIFIER() {
return MODULE_SPECIFIER;
},
get NAMED_EXPORT() {
return NAMED_EXPORT;
},
get NEW_EXPRESSION() {
return NEW_EXPRESSION;
},
get OBJECT_LITERAL_EXPRESSION() {
return OBJECT_LITERAL_EXPRESSION;
},
get OBJECT_PATTERN() {
return OBJECT_PATTERN;
},
get OBJECT_PATTERN_FIELD() {
return OBJECT_PATTERN_FIELD;
},
get PAREN_EXPRESSION() {
return PAREN_EXPRESSION;
},
get POSTFIX_EXPRESSION() {
return POSTFIX_EXPRESSION;
},
get PREDEFINED_TYPE() {
return PREDEFINED_TYPE;
},
get PROPERTY_METHOD_ASSIGNMENT() {
return PROPERTY_METHOD_ASSIGNMENT;
},
get PROPERTY_NAME_ASSIGNMENT() {
return PROPERTY_NAME_ASSIGNMENT;
},
get PROPERTY_NAME_SHORTHAND() {
return PROPERTY_NAME_SHORTHAND;
},
get REST_PARAMETER() {
return REST_PARAMETER;
},
get RETURN_STATEMENT() {
return RETURN_STATEMENT;
},
get SCRIPT() {
return SCRIPT;
},
get SET_ACCESSOR() {
return SET_ACCESSOR;
},
get SPREAD_EXPRESSION() {
return SPREAD_EXPRESSION;
},
get SPREAD_PATTERN_ELEMENT() {
return SPREAD_PATTERN_ELEMENT;
},
get STATE_MACHINE() {
return STATE_MACHINE;
},
get SUPER_EXPRESSION() {
return SUPER_EXPRESSION;
},
get SWITCH_STATEMENT() {
return SWITCH_STATEMENT;
},
get SYNTAX_ERROR_TREE() {
return SYNTAX_ERROR_TREE;
},
get TEMPLATE_LITERAL_EXPRESSION() {
return TEMPLATE_LITERAL_EXPRESSION;
},
get TEMPLATE_LITERAL_PORTION() {
return TEMPLATE_LITERAL_PORTION;
},
get TEMPLATE_SUBSTITUTION() {
return TEMPLATE_SUBSTITUTION;
},
get THIS_EXPRESSION() {
return THIS_EXPRESSION;
},
get THROW_STATEMENT() {
return THROW_STATEMENT;
},
get TRY_STATEMENT() {
return TRY_STATEMENT;
},
get TYPE_NAME() {
return TYPE_NAME;
},
get UNARY_EXPRESSION() {
return UNARY_EXPRESSION;
},
get VARIABLE_DECLARATION() {
return VARIABLE_DECLARATION;
},
get VARIABLE_DECLARATION_LIST() {
return VARIABLE_DECLARATION_LIST;
},
get VARIABLE_STATEMENT() {
return VARIABLE_STATEMENT;
},
get WHILE_STATEMENT() {
return WHILE_STATEMENT;
},
get WITH_STATEMENT() {
return WITH_STATEMENT;
},
get YIELD_EXPRESSION() {
return YIELD_EXPRESSION;
}
};
});
System.register("traceur@0.0.52/src/syntax/ParseTreeVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/ParseTreeVisitor";
var ParseTreeVisitor = function ParseTreeVisitor() {};
($traceurRuntime.createClass)(ParseTreeVisitor, {
visitAny: function(tree) {
tree && tree.visit(this);
},
visit: function(tree) {
this.visitAny(tree);
},
visitList: function(list) {
if (list) {
for (var i = 0; i < list.length; i++) {
this.visitAny(list[i]);
}
}
},
visitStateMachine: function(tree) {
throw Error('State machines should not live outside of the GeneratorTransformer.');
},
visitAnnotation: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.args);
},
visitAnonBlock: function(tree) {
this.visitList(tree.statements);
},
visitArgumentList: function(tree) {
this.visitList(tree.args);
},
visitArrayComprehension: function(tree) {
this.visitList(tree.comprehensionList);
this.visitAny(tree.expression);
},
visitArrayLiteralExpression: function(tree) {
this.visitList(tree.elements);
},
visitArrayPattern: function(tree) {
this.visitList(tree.elements);
},
visitArrowFunctionExpression: function(tree) {
this.visitAny(tree.parameterList);
this.visitAny(tree.body);
},
visitAssignmentElement: function(tree) {
this.visitAny(tree.assignment);
this.visitAny(tree.initializer);
},
visitAwaitExpression: function(tree) {
this.visitAny(tree.expression);
},
visitBinaryExpression: function(tree) {
this.visitAny(tree.left);
this.visitAny(tree.right);
},
visitBindingElement: function(tree) {
this.visitAny(tree.binding);
this.visitAny(tree.initializer);
},
visitBindingIdentifier: function(tree) {},
visitBlock: function(tree) {
this.visitList(tree.statements);
},
visitBreakStatement: function(tree) {},
visitCallExpression: function(tree) {
this.visitAny(tree.operand);
this.visitAny(tree.args);
},
visitCaseClause: function(tree) {
this.visitAny(tree.expression);
this.visitList(tree.statements);
},
visitCatch: function(tree) {
this.visitAny(tree.binding);
this.visitAny(tree.catchBody);
},
visitClassDeclaration: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.superClass);
this.visitList(tree.elements);
this.visitList(tree.annotations);
},
visitClassExpression: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.superClass);
this.visitList(tree.elements);
this.visitList(tree.annotations);
},
visitCommaExpression: function(tree) {
this.visitList(tree.expressions);
},
visitComprehensionFor: function(tree) {
this.visitAny(tree.left);
this.visitAny(tree.iterator);
},
visitComprehensionIf: function(tree) {
this.visitAny(tree.expression);
},
visitComputedPropertyName: function(tree) {
this.visitAny(tree.expression);
},
visitConditionalExpression: function(tree) {
this.visitAny(tree.condition);
this.visitAny(tree.left);
this.visitAny(tree.right);
},
visitContinueStatement: function(tree) {},
visitCoverFormals: function(tree) {
this.visitList(tree.expressions);
},
visitCoverInitializedName: function(tree) {
this.visitAny(tree.initializer);
},
visitDebuggerStatement: function(tree) {},
visitDefaultClause: function(tree) {
this.visitList(tree.statements);
},
visitDoWhileStatement: function(tree) {
this.visitAny(tree.body);
this.visitAny(tree.condition);
},
visitEmptyStatement: function(tree) {},
visitExportDeclaration: function(tree) {
this.visitAny(tree.declaration);
this.visitList(tree.annotations);
},
visitExportDefault: function(tree) {
this.visitAny(tree.expression);
},
visitExportSpecifier: function(tree) {},
visitExportSpecifierSet: function(tree) {
this.visitList(tree.specifiers);
},
visitExportStar: function(tree) {},
visitExpressionStatement: function(tree) {
this.visitAny(tree.expression);
},
visitFinally: function(tree) {
this.visitAny(tree.block);
},
visitForInStatement: function(tree) {
this.visitAny(tree.initializer);
this.visitAny(tree.collection);
this.visitAny(tree.body);
},
visitForOfStatement: function(tree) {
this.visitAny(tree.initializer);
this.visitAny(tree.collection);
this.visitAny(tree.body);
},
visitForStatement: function(tree) {
this.visitAny(tree.initializer);
this.visitAny(tree.condition);
this.visitAny(tree.increment);
this.visitAny(tree.body);
},
visitFormalParameter: function(tree) {
this.visitAny(tree.parameter);
this.visitAny(tree.typeAnnotation);
this.visitList(tree.annotations);
},
visitFormalParameterList: function(tree) {
this.visitList(tree.parameters);
},
visitFunctionBody: function(tree) {
this.visitList(tree.statements);
},
visitFunctionDeclaration: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.parameterList);
this.visitAny(tree.typeAnnotation);
this.visitList(tree.annotations);
this.visitAny(tree.body);
},
visitFunctionExpression: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.parameterList);
this.visitAny(tree.typeAnnotation);
this.visitList(tree.annotations);
this.visitAny(tree.body);
},
visitGeneratorComprehension: function(tree) {
this.visitList(tree.comprehensionList);
this.visitAny(tree.expression);
},
visitGetAccessor: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.typeAnnotation);
this.visitList(tree.annotations);
this.visitAny(tree.body);
},
visitIdentifierExpression: function(tree) {},
visitIfStatement: function(tree) {
this.visitAny(tree.condition);
this.visitAny(tree.ifClause);
this.visitAny(tree.elseClause);
},
visitImportedBinding: function(tree) {
this.visitAny(tree.binding);
},
visitImportDeclaration: function(tree) {
this.visitAny(tree.importClause);
this.visitAny(tree.moduleSpecifier);
},
visitImportSpecifier: function(tree) {},
visitImportSpecifierSet: function(tree) {
this.visitList(tree.specifiers);
},
visitLabelledStatement: function(tree) {
this.visitAny(tree.statement);
},
visitLiteralExpression: function(tree) {},
visitLiteralPropertyName: function(tree) {},
visitMemberExpression: function(tree) {
this.visitAny(tree.operand);
},
visitMemberLookupExpression: function(tree) {
this.visitAny(tree.operand);
this.visitAny(tree.memberExpression);
},
visitModule: function(tree) {
this.visitList(tree.scriptItemList);
},
visitModuleDeclaration: function(tree) {
this.visitAny(tree.expression);
},
visitModuleSpecifier: function(tree) {},
visitNamedExport: function(tree) {
this.visitAny(tree.moduleSpecifier);
this.visitAny(tree.specifierSet);
},
visitNewExpression: function(tree) {
this.visitAny(tree.operand);
this.visitAny(tree.args);
},
visitObjectLiteralExpression: function(tree) {
this.visitList(tree.propertyNameAndValues);
},
visitObjectPattern: function(tree) {
this.visitList(tree.fields);
},
visitObjectPatternField: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.element);
},
visitParenExpression: function(tree) {
this.visitAny(tree.expression);
},
visitPostfixExpression: function(tree) {
this.visitAny(tree.operand);
},
visitPredefinedType: function(tree) {},
visitScript: function(tree) {
this.visitList(tree.scriptItemList);
},
visitPropertyMethodAssignment: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.parameterList);
this.visitAny(tree.typeAnnotation);
this.visitList(tree.annotations);
this.visitAny(tree.body);
},
visitPropertyNameAssignment: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.value);
},
visitPropertyNameShorthand: function(tree) {},
visitRestParameter: function(tree) {
this.visitAny(tree.identifier);
},
visitReturnStatement: function(tree) {
this.visitAny(tree.expression);
},
visitSetAccessor: function(tree) {
this.visitAny(tree.name);
this.visitAny(tree.parameterList);
this.visitList(tree.annotations);
this.visitAny(tree.body);
},
visitSpreadExpression: function(tree) {
this.visitAny(tree.expression);
},
visitSpreadPatternElement: function(tree) {
this.visitAny(tree.lvalue);
},
visitSuperExpression: function(tree) {},
visitSwitchStatement: function(tree) {
this.visitAny(tree.expression);
this.visitList(tree.caseClauses);
},
visitSyntaxErrorTree: function(tree) {},
visitTemplateLiteralExpression: function(tree) {
this.visitAny(tree.operand);
this.visitList(tree.elements);
},
visitTemplateLiteralPortion: function(tree) {},
visitTemplateSubstitution: function(tree) {
this.visitAny(tree.expression);
},
visitThisExpression: function(tree) {},
visitThrowStatement: function(tree) {
this.visitAny(tree.value);
},
visitTryStatement: function(tree) {
this.visitAny(tree.body);
this.visitAny(tree.catchBlock);
this.visitAny(tree.finallyBlock);
},
visitTypeName: function(tree) {
this.visitAny(tree.moduleName);
},
visitUnaryExpression: function(tree) {
this.visitAny(tree.operand);
},
visitVariableDeclaration: function(tree) {
this.visitAny(tree.lvalue);
this.visitAny(tree.typeAnnotation);
this.visitAny(tree.initializer);
},
visitVariableDeclarationList: function(tree) {
this.visitList(tree.declarations);
},
visitVariableStatement: function(tree) {
this.visitAny(tree.declarations);
},
visitWhileStatement: function(tree) {
this.visitAny(tree.condition);
this.visitAny(tree.body);
},
visitWithStatement: function(tree) {
this.visitAny(tree.expression);
this.visitAny(tree.body);
},
visitYieldExpression: function(tree) {
this.visitAny(tree.expression);
}
}, {});
return {get ParseTreeVisitor() {
return ParseTreeVisitor;
}};
});
System.register("traceur@0.0.52/src/syntax/Token", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/Token";
var $__45 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AMPERSAND_EQUAL = $__45.AMPERSAND_EQUAL,
BAR_EQUAL = $__45.BAR_EQUAL,
CARET_EQUAL = $__45.CARET_EQUAL,
EQUAL = $__45.EQUAL,
LEFT_SHIFT_EQUAL = $__45.LEFT_SHIFT_EQUAL,
MINUS_EQUAL = $__45.MINUS_EQUAL,
PERCENT_EQUAL = $__45.PERCENT_EQUAL,
PLUS_EQUAL = $__45.PLUS_EQUAL,
RIGHT_SHIFT_EQUAL = $__45.RIGHT_SHIFT_EQUAL,
SLASH_EQUAL = $__45.SLASH_EQUAL,
STAR_EQUAL = $__45.STAR_EQUAL,
UNSIGNED_RIGHT_SHIFT_EQUAL = $__45.UNSIGNED_RIGHT_SHIFT_EQUAL;
var Token = function Token(type, location) {
this.type = type;
this.location = location;
};
($traceurRuntime.createClass)(Token, {
toString: function() {
return this.type;
},
isAssignmentOperator: function() {
return isAssignmentOperator(this.type);
},
isKeyword: function() {
return false;
},
isStrictKeyword: function() {
return false;
}
}, {});
function isAssignmentOperator(type) {
switch (type) {
case AMPERSAND_EQUAL:
case BAR_EQUAL:
case CARET_EQUAL:
case EQUAL:
case LEFT_SHIFT_EQUAL:
case MINUS_EQUAL:
case PERCENT_EQUAL:
case PLUS_EQUAL:
case RIGHT_SHIFT_EQUAL:
case SLASH_EQUAL:
case STAR_EQUAL:
case UNSIGNED_RIGHT_SHIFT_EQUAL:
return true;
}
return false;
}
return {
get Token() {
return Token;
},
get isAssignmentOperator() {
return isAssignmentOperator;
}
};
});
System.register("traceur@0.0.52/src/syntax/IdentifierToken", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/IdentifierToken";
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var IDENTIFIER = System.get("traceur@0.0.52/src/syntax/TokenType").IDENTIFIER;
var IdentifierToken = function IdentifierToken(location, value) {
this.location = location;
this.value = value;
};
($traceurRuntime.createClass)(IdentifierToken, {
toString: function() {
return this.value;
},
get type() {
return IDENTIFIER;
}
}, {}, Token);
return {get IdentifierToken() {
return IdentifierToken;
}};
});
System.register("traceur@0.0.52/src/util/JSON", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/JSON";
function transform(v) {
var replacer = arguments[1] !== (void 0) ? arguments[1] : (function(k, v) {
return v;
});
return transform_(replacer('', v), replacer);
}
function transform_(v, replacer) {
var rv,
tv;
if (Array.isArray(v)) {
var len = v.length;
rv = Array(len);
for (var i = 0; i < len; i++) {
tv = transform_(replacer(String(i), v[i]), replacer);
rv[i] = tv === undefined ? null : tv;
}
return rv;
}
if (v instanceof Object) {
rv = {};
Object.keys(v).forEach((function(k) {
tv = transform_(replacer(k, v[k]), replacer);
if (tv !== undefined) {
rv[k] = tv;
}
}));
return rv;
}
return v;
}
return {get transform() {
return transform;
}};
});
System.register("traceur@0.0.52/src/syntax/PredefinedName", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/PredefinedName";
var $ARGUMENTS = '$arguments';
var ANY = 'any';
var APPLY = 'apply';
var ARGUMENTS = 'arguments';
var ARRAY = 'Array';
var AS = 'as';
var ASYNC = 'async';
var AWAIT = 'await';
var BIND = 'bind';
var CALL = 'call';
var CONFIGURABLE = 'configurable';
var CONSTRUCTOR = 'constructor';
var CREATE = 'create';
var CURRENT = 'current';
var DEFINE_PROPERTY = 'defineProperty';
var ENUMERABLE = 'enumerable';
var FREEZE = 'freeze';
var FROM = 'from';
var FUNCTION = 'Function';
var GET = 'get';
var HAS = 'has';
var LENGTH = 'length';
var MODULE = 'module';
var NEW = 'new';
var OBJECT = 'Object';
var OBJECT_NAME = 'Object';
var OF = 'of';
var PREVENT_EXTENSIONS = 'preventExtensions';
var PROTOTYPE = 'prototype';
var PUSH = 'push';
var SET = 'set';
var SLICE = 'slice';
var THIS = 'this';
var TRACEUR_RUNTIME = '$traceurRuntime';
var UNDEFINED = 'undefined';
var WRITABLE = 'writable';
return {
get $ARGUMENTS() {
return $ARGUMENTS;
},
get ANY() {
return ANY;
},
get APPLY() {
return APPLY;
},
get ARGUMENTS() {
return ARGUMENTS;
},
get ARRAY() {
return ARRAY;
},
get AS() {
return AS;
},
get ASYNC() {
return ASYNC;
},
get AWAIT() {
return AWAIT;
},
get BIND() {
return BIND;
},
get CALL() {
return CALL;
},
get CONFIGURABLE() {
return CONFIGURABLE;
},
get CONSTRUCTOR() {
return CONSTRUCTOR;
},
get CREATE() {
return CREATE;
},
get CURRENT() {
return CURRENT;
},
get DEFINE_PROPERTY() {
return DEFINE_PROPERTY;
},
get ENUMERABLE() {
return ENUMERABLE;
},
get FREEZE() {
return FREEZE;
},
get FROM() {
return FROM;
},
get FUNCTION() {
return FUNCTION;
},
get GET() {
return GET;
},
get HAS() {
return HAS;
},
get LENGTH() {
return LENGTH;
},
get MODULE() {
return MODULE;
},
get NEW() {
return NEW;
},
get OBJECT() {
return OBJECT;
},
get OBJECT_NAME() {
return OBJECT_NAME;
},
get OF() {
return OF;
},
get PREVENT_EXTENSIONS() {
return PREVENT_EXTENSIONS;
},
get PROTOTYPE() {
return PROTOTYPE;
},
get PUSH() {
return PUSH;
},
get SET() {
return SET;
},
get SLICE() {
return SLICE;
},
get THIS() {
return THIS;
},
get TRACEUR_RUNTIME() {
return TRACEUR_RUNTIME;
},
get UNDEFINED() {
return UNDEFINED;
},
get WRITABLE() {
return WRITABLE;
}
};
});
System.register("traceur@0.0.52/src/syntax/trees/ParseTree", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/trees/ParseTree";
var ParseTreeType = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType");
var $__50 = System.get("traceur@0.0.52/src/syntax/TokenType"),
IDENTIFIER = $__50.IDENTIFIER,
STAR = $__50.STAR,
STRING = $__50.STRING,
VAR = $__50.VAR;
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var utilJSON = System.get("traceur@0.0.52/src/util/JSON");
var ASYNC = System.get("traceur@0.0.52/src/syntax/PredefinedName").ASYNC;
var $__53 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARRAY_COMPREHENSION = $__53.ARRAY_COMPREHENSION,
ARRAY_LITERAL_EXPRESSION = $__53.ARRAY_LITERAL_EXPRESSION,
ARRAY_PATTERN = $__53.ARRAY_PATTERN,
ARROW_FUNCTION_EXPRESSION = $__53.ARROW_FUNCTION_EXPRESSION,
AWAIT_EXPRESSION = $__53.AWAIT_EXPRESSION,
BINARY_EXPRESSION = $__53.BINARY_EXPRESSION,
BLOCK = $__53.BLOCK,
BREAK_STATEMENT = $__53.BREAK_STATEMENT,
CALL_EXPRESSION = $__53.CALL_EXPRESSION,
CLASS_DECLARATION = $__53.CLASS_DECLARATION,
CLASS_EXPRESSION = $__53.CLASS_EXPRESSION,
COMMA_EXPRESSION = $__53.COMMA_EXPRESSION,
CONDITIONAL_EXPRESSION = $__53.CONDITIONAL_EXPRESSION,
CONTINUE_STATEMENT = $__53.CONTINUE_STATEMENT,
DEBUGGER_STATEMENT = $__53.DEBUGGER_STATEMENT,
DO_WHILE_STATEMENT = $__53.DO_WHILE_STATEMENT,
EMPTY_STATEMENT = $__53.EMPTY_STATEMENT,
EXPORT_DECLARATION = $__53.EXPORT_DECLARATION,
EXPRESSION_STATEMENT = $__53.EXPRESSION_STATEMENT,
FOR_IN_STATEMENT = $__53.FOR_IN_STATEMENT,
FOR_OF_STATEMENT = $__53.FOR_OF_STATEMENT,
FOR_STATEMENT = $__53.FOR_STATEMENT,
FORMAL_PARAMETER = $__53.FORMAL_PARAMETER,
FUNCTION_DECLARATION = $__53.FUNCTION_DECLARATION,
FUNCTION_EXPRESSION = $__53.FUNCTION_EXPRESSION,
GENERATOR_COMPREHENSION = $__53.GENERATOR_COMPREHENSION,
IDENTIFIER_EXPRESSION = $__53.IDENTIFIER_EXPRESSION,
IF_STATEMENT = $__53.IF_STATEMENT,
IMPORT_DECLARATION = $__53.IMPORT_DECLARATION,
LABELLED_STATEMENT = $__53.LABELLED_STATEMENT,
LITERAL_EXPRESSION = $__53.LITERAL_EXPRESSION,
MEMBER_EXPRESSION = $__53.MEMBER_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__53.MEMBER_LOOKUP_EXPRESSION,
MODULE_DECLARATION = $__53.MODULE_DECLARATION,
NEW_EXPRESSION = $__53.NEW_EXPRESSION,
OBJECT_LITERAL_EXPRESSION = $__53.OBJECT_LITERAL_EXPRESSION,
OBJECT_PATTERN = $__53.OBJECT_PATTERN,
PAREN_EXPRESSION = $__53.PAREN_EXPRESSION,
POSTFIX_EXPRESSION = $__53.POSTFIX_EXPRESSION,
REST_PARAMETER = $__53.REST_PARAMETER,
RETURN_STATEMENT = $__53.RETURN_STATEMENT,
SPREAD_EXPRESSION = $__53.SPREAD_EXPRESSION,
SPREAD_PATTERN_ELEMENT = $__53.SPREAD_PATTERN_ELEMENT,
SUPER_EXPRESSION = $__53.SUPER_EXPRESSION,
SWITCH_STATEMENT = $__53.SWITCH_STATEMENT,
TEMPLATE_LITERAL_EXPRESSION = $__53.TEMPLATE_LITERAL_EXPRESSION,
THIS_EXPRESSION = $__53.THIS_EXPRESSION,
THROW_STATEMENT = $__53.THROW_STATEMENT,
TRY_STATEMENT = $__53.TRY_STATEMENT,
UNARY_EXPRESSION = $__53.UNARY_EXPRESSION,
VARIABLE_DECLARATION = $__53.VARIABLE_DECLARATION,
VARIABLE_STATEMENT = $__53.VARIABLE_STATEMENT,
WHILE_STATEMENT = $__53.WHILE_STATEMENT,
WITH_STATEMENT = $__53.WITH_STATEMENT,
YIELD_EXPRESSION = $__53.YIELD_EXPRESSION;
;
var ParseTree = function ParseTree(type, location) {
throw new Error("Don't use for now. 'super' is currently very slow.");
this.type = type;
this.location = location;
};
var $ParseTree = ParseTree;
($traceurRuntime.createClass)(ParseTree, {
isPattern: function() {
switch (this.type) {
case ARRAY_PATTERN:
case OBJECT_PATTERN:
return true;
default:
return false;
}
},
isLeftHandSideExpression: function() {
switch (this.type) {
case THIS_EXPRESSION:
case CLASS_EXPRESSION:
case SUPER_EXPRESSION:
case IDENTIFIER_EXPRESSION:
case LITERAL_EXPRESSION:
case ARRAY_LITERAL_EXPRESSION:
case OBJECT_LITERAL_EXPRESSION:
case NEW_EXPRESSION:
case MEMBER_EXPRESSION:
case MEMBER_LOOKUP_EXPRESSION:
case CALL_EXPRESSION:
case FUNCTION_EXPRESSION:
case TEMPLATE_LITERAL_EXPRESSION:
return true;
case PAREN_EXPRESSION:
return this.expression.isLeftHandSideExpression();
default:
return false;
}
},
isAssignmentExpression: function() {
switch (this.type) {
case ARRAY_COMPREHENSION:
case ARRAY_LITERAL_EXPRESSION:
case ARROW_FUNCTION_EXPRESSION:
case AWAIT_EXPRESSION:
case BINARY_EXPRESSION:
case CALL_EXPRESSION:
case CLASS_EXPRESSION:
case CONDITIONAL_EXPRESSION:
case FUNCTION_EXPRESSION:
case GENERATOR_COMPREHENSION:
case IDENTIFIER_EXPRESSION:
case LITERAL_EXPRESSION:
case MEMBER_EXPRESSION:
case MEMBER_LOOKUP_EXPRESSION:
case NEW_EXPRESSION:
case OBJECT_LITERAL_EXPRESSION:
case PAREN_EXPRESSION:
case POSTFIX_EXPRESSION:
case TEMPLATE_LITERAL_EXPRESSION:
case SUPER_EXPRESSION:
case THIS_EXPRESSION:
case UNARY_EXPRESSION:
case YIELD_EXPRESSION:
return true;
default:
return false;
}
},
isMemberExpression: function() {
switch (this.type) {
case THIS_EXPRESSION:
case CLASS_EXPRESSION:
case SUPER_EXPRESSION:
case IDENTIFIER_EXPRESSION:
case LITERAL_EXPRESSION:
case ARRAY_LITERAL_EXPRESSION:
case OBJECT_LITERAL_EXPRESSION:
case PAREN_EXPRESSION:
case TEMPLATE_LITERAL_EXPRESSION:
case FUNCTION_EXPRESSION:
case MEMBER_LOOKUP_EXPRESSION:
case MEMBER_EXPRESSION:
case CALL_EXPRESSION:
return true;
case NEW_EXPRESSION:
return this.args != null;
}
return false;
},
isExpression: function() {
return this.isAssignmentExpression() || this.type == COMMA_EXPRESSION;
},
isAssignmentOrSpread: function() {
return this.isAssignmentExpression() || this.type == SPREAD_EXPRESSION;
},
isRestParameter: function() {
return this.type == REST_PARAMETER || (this.type == FORMAL_PARAMETER && this.parameter.isRestParameter());
},
isSpreadPatternElement: function() {
return this.type == SPREAD_PATTERN_ELEMENT;
},
isStatementListItem: function() {
return this.isStatement() || this.isDeclaration();
},
isStatement: function() {
switch (this.type) {
case BLOCK:
case VARIABLE_STATEMENT:
case EMPTY_STATEMENT:
case EXPRESSION_STATEMENT:
case IF_STATEMENT:
case CONTINUE_STATEMENT:
case BREAK_STATEMENT:
case RETURN_STATEMENT:
case WITH_STATEMENT:
case LABELLED_STATEMENT:
case THROW_STATEMENT:
case TRY_STATEMENT:
case DEBUGGER_STATEMENT:
return true;
}
return this.isBreakableStatement();
},
isDeclaration: function() {
switch (this.type) {
case FUNCTION_DECLARATION:
case CLASS_DECLARATION:
return true;
}
return this.isLexicalDeclaration();
},
isLexicalDeclaration: function() {
switch (this.type) {
case VARIABLE_STATEMENT:
return this.declarations.declarationType !== VAR;
}
return false;
},
isBreakableStatement: function() {
switch (this.type) {
case SWITCH_STATEMENT:
return true;
}
return this.isIterationStatement();
},
isIterationStatement: function() {
switch (this.type) {
case DO_WHILE_STATEMENT:
case FOR_IN_STATEMENT:
case FOR_OF_STATEMENT:
case FOR_STATEMENT:
case WHILE_STATEMENT:
return true;
}
return false;
},
isScriptElement: function() {
switch (this.type) {
case CLASS_DECLARATION:
case EXPORT_DECLARATION:
case FUNCTION_DECLARATION:
case IMPORT_DECLARATION:
case MODULE_DECLARATION:
case VARIABLE_DECLARATION:
return true;
}
return this.isStatement();
},
isGenerator: function() {
return this.functionKind !== null && this.functionKind.type === STAR;
},
isAsyncFunction: function() {
return this.functionKind !== null && this.functionKind.type === IDENTIFIER && this.functionKind.value === ASYNC;
},
getDirectivePrologueStringToken_: function() {
var tree = this;
if (tree.type !== EXPRESSION_STATEMENT || !(tree = tree.expression))
return null;
if (tree.type !== LITERAL_EXPRESSION || !(tree = tree.literalToken))
return null;
if (tree.type !== STRING)
return null;
return tree;
},
isDirectivePrologue: function() {
return this.getDirectivePrologueStringToken_() !== null;
},
isUseStrictDirective: function() {
var token = this.getDirectivePrologueStringToken_();
if (!token)
return false;
var v = token.value;
return v === '"use strict"' || v === "'use strict'";
},
toJSON: function() {
return utilJSON.transform(this, $ParseTree.replacer);
},
stringify: function() {
var indent = arguments[0] !== (void 0) ? arguments[0] : 2;
return JSON.stringify(this, $ParseTree.replacer, indent);
}
}, {
stripLocation: function(key, value) {
if (key === 'location') {
return undefined;
}
return value;
},
replacer: function(k, v) {
if (v instanceof $ParseTree || v instanceof Token) {
var rv = {type: v.type};
Object.keys(v).forEach(function(name) {
if (name !== 'location')
rv[name] = v[name];
});
return rv;
}
return v;
}
});
return {
get ParseTreeType() {
return ParseTreeType;
},
get ParseTree() {
return ParseTree;
}
};
});
System.register("traceur@0.0.52/src/syntax/trees/ParseTrees", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/trees/ParseTrees";
var ParseTree = System.get("traceur@0.0.52/src/syntax/trees/ParseTree").ParseTree;
var ParseTreeType = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType");
var ANNOTATION = ParseTreeType.ANNOTATION;
var Annotation = function Annotation(location, name, args) {
this.location = location;
this.name = name;
this.args = args;
};
($traceurRuntime.createClass)(Annotation, {
transform: function(transformer) {
return transformer.transformAnnotation(this);
},
visit: function(visitor) {
visitor.visitAnnotation(this);
},
get type() {
return ANNOTATION;
}
}, {}, ParseTree);
var ANON_BLOCK = ParseTreeType.ANON_BLOCK;
var AnonBlock = function AnonBlock(location, statements) {
this.location = location;
this.statements = statements;
};
($traceurRuntime.createClass)(AnonBlock, {
transform: function(transformer) {
return transformer.transformAnonBlock(this);
},
visit: function(visitor) {
visitor.visitAnonBlock(this);
},
get type() {
return ANON_BLOCK;
}
}, {}, ParseTree);
var ARGUMENT_LIST = ParseTreeType.ARGUMENT_LIST;
var ArgumentList = function ArgumentList(location, args) {
this.location = location;
this.args = args;
};
($traceurRuntime.createClass)(ArgumentList, {
transform: function(transformer) {
return transformer.transformArgumentList(this);
},
visit: function(visitor) {
visitor.visitArgumentList(this);
},
get type() {
return ARGUMENT_LIST;
}
}, {}, ParseTree);
var ARRAY_COMPREHENSION = ParseTreeType.ARRAY_COMPREHENSION;
var ArrayComprehension = function ArrayComprehension(location, comprehensionList, expression) {
this.location = location;
this.comprehensionList = comprehensionList;
this.expression = expression;
};
($traceurRuntime.createClass)(ArrayComprehension, {
transform: function(transformer) {
return transformer.transformArrayComprehension(this);
},
visit: function(visitor) {
visitor.visitArrayComprehension(this);
},
get type() {
return ARRAY_COMPREHENSION;
}
}, {}, ParseTree);
var ARRAY_LITERAL_EXPRESSION = ParseTreeType.ARRAY_LITERAL_EXPRESSION;
var ArrayLiteralExpression = function ArrayLiteralExpression(location, elements) {
this.location = location;
this.elements = elements;
};
($traceurRuntime.createClass)(ArrayLiteralExpression, {
transform: function(transformer) {
return transformer.transformArrayLiteralExpression(this);
},
visit: function(visitor) {
visitor.visitArrayLiteralExpression(this);
},
get type() {
return ARRAY_LITERAL_EXPRESSION;
}
}, {}, ParseTree);
var ARRAY_PATTERN = ParseTreeType.ARRAY_PATTERN;
var ArrayPattern = function ArrayPattern(location, elements) {
this.location = location;
this.elements = elements;
};
($traceurRuntime.createClass)(ArrayPattern, {
transform: function(transformer) {
return transformer.transformArrayPattern(this);
},
visit: function(visitor) {
visitor.visitArrayPattern(this);
},
get type() {
return ARRAY_PATTERN;
}
}, {}, ParseTree);
var ARROW_FUNCTION_EXPRESSION = ParseTreeType.ARROW_FUNCTION_EXPRESSION;
var ArrowFunctionExpression = function ArrowFunctionExpression(location, functionKind, parameterList, body) {
this.location = location;
this.functionKind = functionKind;
this.parameterList = parameterList;
this.body = body;
};
($traceurRuntime.createClass)(ArrowFunctionExpression, {
transform: function(transformer) {
return transformer.transformArrowFunctionExpression(this);
},
visit: function(visitor) {
visitor.visitArrowFunctionExpression(this);
},
get type() {
return ARROW_FUNCTION_EXPRESSION;
}
}, {}, ParseTree);
var ASSIGNMENT_ELEMENT = ParseTreeType.ASSIGNMENT_ELEMENT;
var AssignmentElement = function AssignmentElement(location, assignment, initializer) {
this.location = location;
this.assignment = assignment;
this.initializer = initializer;
};
($traceurRuntime.createClass)(AssignmentElement, {
transform: function(transformer) {
return transformer.transformAssignmentElement(this);
},
visit: function(visitor) {
visitor.visitAssignmentElement(this);
},
get type() {
return ASSIGNMENT_ELEMENT;
}
}, {}, ParseTree);
var AWAIT_EXPRESSION = ParseTreeType.AWAIT_EXPRESSION;
var AwaitExpression = function AwaitExpression(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(AwaitExpression, {
transform: function(transformer) {
return transformer.transformAwaitExpression(this);
},
visit: function(visitor) {
visitor.visitAwaitExpression(this);
},
get type() {
return AWAIT_EXPRESSION;
}
}, {}, ParseTree);
var BINARY_EXPRESSION = ParseTreeType.BINARY_EXPRESSION;
var BinaryExpression = function BinaryExpression(location, left, operator, right) {
this.location = location;
this.left = left;
this.operator = operator;
this.right = right;
};
($traceurRuntime.createClass)(BinaryExpression, {
transform: function(transformer) {
return transformer.transformBinaryExpression(this);
},
visit: function(visitor) {
visitor.visitBinaryExpression(this);
},
get type() {
return BINARY_EXPRESSION;
}
}, {}, ParseTree);
var BINDING_ELEMENT = ParseTreeType.BINDING_ELEMENT;
var BindingElement = function BindingElement(location, binding, initializer) {
this.location = location;
this.binding = binding;
this.initializer = initializer;
};
($traceurRuntime.createClass)(BindingElement, {
transform: function(transformer) {
return transformer.transformBindingElement(this);
},
visit: function(visitor) {
visitor.visitBindingElement(this);
},
get type() {
return BINDING_ELEMENT;
}
}, {}, ParseTree);
var BINDING_IDENTIFIER = ParseTreeType.BINDING_IDENTIFIER;
var BindingIdentifier = function BindingIdentifier(location, identifierToken) {
this.location = location;
this.identifierToken = identifierToken;
};
($traceurRuntime.createClass)(BindingIdentifier, {
transform: function(transformer) {
return transformer.transformBindingIdentifier(this);
},
visit: function(visitor) {
visitor.visitBindingIdentifier(this);
},
get type() {
return BINDING_IDENTIFIER;
}
}, {}, ParseTree);
var BLOCK = ParseTreeType.BLOCK;
var Block = function Block(location, statements) {
this.location = location;
this.statements = statements;
};
($traceurRuntime.createClass)(Block, {
transform: function(transformer) {
return transformer.transformBlock(this);
},
visit: function(visitor) {
visitor.visitBlock(this);
},
get type() {
return BLOCK;
}
}, {}, ParseTree);
var BREAK_STATEMENT = ParseTreeType.BREAK_STATEMENT;
var BreakStatement = function BreakStatement(location, name) {
this.location = location;
this.name = name;
};
($traceurRuntime.createClass)(BreakStatement, {
transform: function(transformer) {
return transformer.transformBreakStatement(this);
},
visit: function(visitor) {
visitor.visitBreakStatement(this);
},
get type() {
return BREAK_STATEMENT;
}
}, {}, ParseTree);
var CALL_EXPRESSION = ParseTreeType.CALL_EXPRESSION;
var CallExpression = function CallExpression(location, operand, args) {
this.location = location;
this.operand = operand;
this.args = args;
};
($traceurRuntime.createClass)(CallExpression, {
transform: function(transformer) {
return transformer.transformCallExpression(this);
},
visit: function(visitor) {
visitor.visitCallExpression(this);
},
get type() {
return CALL_EXPRESSION;
}
}, {}, ParseTree);
var CASE_CLAUSE = ParseTreeType.CASE_CLAUSE;
var CaseClause = function CaseClause(location, expression, statements) {
this.location = location;
this.expression = expression;
this.statements = statements;
};
($traceurRuntime.createClass)(CaseClause, {
transform: function(transformer) {
return transformer.transformCaseClause(this);
},
visit: function(visitor) {
visitor.visitCaseClause(this);
},
get type() {
return CASE_CLAUSE;
}
}, {}, ParseTree);
var CATCH = ParseTreeType.CATCH;
var Catch = function Catch(location, binding, catchBody) {
this.location = location;
this.binding = binding;
this.catchBody = catchBody;
};
($traceurRuntime.createClass)(Catch, {
transform: function(transformer) {
return transformer.transformCatch(this);
},
visit: function(visitor) {
visitor.visitCatch(this);
},
get type() {
return CATCH;
}
}, {}, ParseTree);
var CLASS_DECLARATION = ParseTreeType.CLASS_DECLARATION;
var ClassDeclaration = function ClassDeclaration(location, name, superClass, elements, annotations) {
this.location = location;
this.name = name;
this.superClass = superClass;
this.elements = elements;
this.annotations = annotations;
};
($traceurRuntime.createClass)(ClassDeclaration, {
transform: function(transformer) {
return transformer.transformClassDeclaration(this);
},
visit: function(visitor) {
visitor.visitClassDeclaration(this);
},
get type() {
return CLASS_DECLARATION;
}
}, {}, ParseTree);
var CLASS_EXPRESSION = ParseTreeType.CLASS_EXPRESSION;
var ClassExpression = function ClassExpression(location, name, superClass, elements, annotations) {
this.location = location;
this.name = name;
this.superClass = superClass;
this.elements = elements;
this.annotations = annotations;
};
($traceurRuntime.createClass)(ClassExpression, {
transform: function(transformer) {
return transformer.transformClassExpression(this);
},
visit: function(visitor) {
visitor.visitClassExpression(this);
},
get type() {
return CLASS_EXPRESSION;
}
}, {}, ParseTree);
var COMMA_EXPRESSION = ParseTreeType.COMMA_EXPRESSION;
var CommaExpression = function CommaExpression(location, expressions) {
this.location = location;
this.expressions = expressions;
};
($traceurRuntime.createClass)(CommaExpression, {
transform: function(transformer) {
return transformer.transformCommaExpression(this);
},
visit: function(visitor) {
visitor.visitCommaExpression(this);
},
get type() {
return COMMA_EXPRESSION;
}
}, {}, ParseTree);
var COMPREHENSION_FOR = ParseTreeType.COMPREHENSION_FOR;
var ComprehensionFor = function ComprehensionFor(location, left, iterator) {
this.location = location;
this.left = left;
this.iterator = iterator;
};
($traceurRuntime.createClass)(ComprehensionFor, {
transform: function(transformer) {
return transformer.transformComprehensionFor(this);
},
visit: function(visitor) {
visitor.visitComprehensionFor(this);
},
get type() {
return COMPREHENSION_FOR;
}
}, {}, ParseTree);
var COMPREHENSION_IF = ParseTreeType.COMPREHENSION_IF;
var ComprehensionIf = function ComprehensionIf(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ComprehensionIf, {
transform: function(transformer) {
return transformer.transformComprehensionIf(this);
},
visit: function(visitor) {
visitor.visitComprehensionIf(this);
},
get type() {
return COMPREHENSION_IF;
}
}, {}, ParseTree);
var COMPUTED_PROPERTY_NAME = ParseTreeType.COMPUTED_PROPERTY_NAME;
var ComputedPropertyName = function ComputedPropertyName(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ComputedPropertyName, {
transform: function(transformer) {
return transformer.transformComputedPropertyName(this);
},
visit: function(visitor) {
visitor.visitComputedPropertyName(this);
},
get type() {
return COMPUTED_PROPERTY_NAME;
}
}, {}, ParseTree);
var CONDITIONAL_EXPRESSION = ParseTreeType.CONDITIONAL_EXPRESSION;
var ConditionalExpression = function ConditionalExpression(location, condition, left, right) {
this.location = location;
this.condition = condition;
this.left = left;
this.right = right;
};
($traceurRuntime.createClass)(ConditionalExpression, {
transform: function(transformer) {
return transformer.transformConditionalExpression(this);
},
visit: function(visitor) {
visitor.visitConditionalExpression(this);
},
get type() {
return CONDITIONAL_EXPRESSION;
}
}, {}, ParseTree);
var CONTINUE_STATEMENT = ParseTreeType.CONTINUE_STATEMENT;
var ContinueStatement = function ContinueStatement(location, name) {
this.location = location;
this.name = name;
};
($traceurRuntime.createClass)(ContinueStatement, {
transform: function(transformer) {
return transformer.transformContinueStatement(this);
},
visit: function(visitor) {
visitor.visitContinueStatement(this);
},
get type() {
return CONTINUE_STATEMENT;
}
}, {}, ParseTree);
var COVER_FORMALS = ParseTreeType.COVER_FORMALS;
var CoverFormals = function CoverFormals(location, expressions) {
this.location = location;
this.expressions = expressions;
};
($traceurRuntime.createClass)(CoverFormals, {
transform: function(transformer) {
return transformer.transformCoverFormals(this);
},
visit: function(visitor) {
visitor.visitCoverFormals(this);
},
get type() {
return COVER_FORMALS;
}
}, {}, ParseTree);
var COVER_INITIALIZED_NAME = ParseTreeType.COVER_INITIALIZED_NAME;
var CoverInitializedName = function CoverInitializedName(location, name, equalToken, initializer) {
this.location = location;
this.name = name;
this.equalToken = equalToken;
this.initializer = initializer;
};
($traceurRuntime.createClass)(CoverInitializedName, {
transform: function(transformer) {
return transformer.transformCoverInitializedName(this);
},
visit: function(visitor) {
visitor.visitCoverInitializedName(this);
},
get type() {
return COVER_INITIALIZED_NAME;
}
}, {}, ParseTree);
var DEBUGGER_STATEMENT = ParseTreeType.DEBUGGER_STATEMENT;
var DebuggerStatement = function DebuggerStatement(location) {
this.location = location;
};
($traceurRuntime.createClass)(DebuggerStatement, {
transform: function(transformer) {
return transformer.transformDebuggerStatement(this);
},
visit: function(visitor) {
visitor.visitDebuggerStatement(this);
},
get type() {
return DEBUGGER_STATEMENT;
}
}, {}, ParseTree);
var DEFAULT_CLAUSE = ParseTreeType.DEFAULT_CLAUSE;
var DefaultClause = function DefaultClause(location, statements) {
this.location = location;
this.statements = statements;
};
($traceurRuntime.createClass)(DefaultClause, {
transform: function(transformer) {
return transformer.transformDefaultClause(this);
},
visit: function(visitor) {
visitor.visitDefaultClause(this);
},
get type() {
return DEFAULT_CLAUSE;
}
}, {}, ParseTree);
var DO_WHILE_STATEMENT = ParseTreeType.DO_WHILE_STATEMENT;
var DoWhileStatement = function DoWhileStatement(location, body, condition) {
this.location = location;
this.body = body;
this.condition = condition;
};
($traceurRuntime.createClass)(DoWhileStatement, {
transform: function(transformer) {
return transformer.transformDoWhileStatement(this);
},
visit: function(visitor) {
visitor.visitDoWhileStatement(this);
},
get type() {
return DO_WHILE_STATEMENT;
}
}, {}, ParseTree);
var EMPTY_STATEMENT = ParseTreeType.EMPTY_STATEMENT;
var EmptyStatement = function EmptyStatement(location) {
this.location = location;
};
($traceurRuntime.createClass)(EmptyStatement, {
transform: function(transformer) {
return transformer.transformEmptyStatement(this);
},
visit: function(visitor) {
visitor.visitEmptyStatement(this);
},
get type() {
return EMPTY_STATEMENT;
}
}, {}, ParseTree);
var EXPORT_DECLARATION = ParseTreeType.EXPORT_DECLARATION;
var ExportDeclaration = function ExportDeclaration(location, declaration, annotations) {
this.location = location;
this.declaration = declaration;
this.annotations = annotations;
};
($traceurRuntime.createClass)(ExportDeclaration, {
transform: function(transformer) {
return transformer.transformExportDeclaration(this);
},
visit: function(visitor) {
visitor.visitExportDeclaration(this);
},
get type() {
return EXPORT_DECLARATION;
}
}, {}, ParseTree);
var EXPORT_DEFAULT = ParseTreeType.EXPORT_DEFAULT;
var ExportDefault = function ExportDefault(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ExportDefault, {
transform: function(transformer) {
return transformer.transformExportDefault(this);
},
visit: function(visitor) {
visitor.visitExportDefault(this);
},
get type() {
return EXPORT_DEFAULT;
}
}, {}, ParseTree);
var EXPORT_SPECIFIER = ParseTreeType.EXPORT_SPECIFIER;
var ExportSpecifier = function ExportSpecifier(location, lhs, rhs) {
this.location = location;
this.lhs = lhs;
this.rhs = rhs;
};
($traceurRuntime.createClass)(ExportSpecifier, {
transform: function(transformer) {
return transformer.transformExportSpecifier(this);
},
visit: function(visitor) {
visitor.visitExportSpecifier(this);
},
get type() {
return EXPORT_SPECIFIER;
}
}, {}, ParseTree);
var EXPORT_SPECIFIER_SET = ParseTreeType.EXPORT_SPECIFIER_SET;
var ExportSpecifierSet = function ExportSpecifierSet(location, specifiers) {
this.location = location;
this.specifiers = specifiers;
};
($traceurRuntime.createClass)(ExportSpecifierSet, {
transform: function(transformer) {
return transformer.transformExportSpecifierSet(this);
},
visit: function(visitor) {
visitor.visitExportSpecifierSet(this);
},
get type() {
return EXPORT_SPECIFIER_SET;
}
}, {}, ParseTree);
var EXPORT_STAR = ParseTreeType.EXPORT_STAR;
var ExportStar = function ExportStar(location) {
this.location = location;
};
($traceurRuntime.createClass)(ExportStar, {
transform: function(transformer) {
return transformer.transformExportStar(this);
},
visit: function(visitor) {
visitor.visitExportStar(this);
},
get type() {
return EXPORT_STAR;
}
}, {}, ParseTree);
var EXPRESSION_STATEMENT = ParseTreeType.EXPRESSION_STATEMENT;
var ExpressionStatement = function ExpressionStatement(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ExpressionStatement, {
transform: function(transformer) {
return transformer.transformExpressionStatement(this);
},
visit: function(visitor) {
visitor.visitExpressionStatement(this);
},
get type() {
return EXPRESSION_STATEMENT;
}
}, {}, ParseTree);
var FINALLY = ParseTreeType.FINALLY;
var Finally = function Finally(location, block) {
this.location = location;
this.block = block;
};
($traceurRuntime.createClass)(Finally, {
transform: function(transformer) {
return transformer.transformFinally(this);
},
visit: function(visitor) {
visitor.visitFinally(this);
},
get type() {
return FINALLY;
}
}, {}, ParseTree);
var FOR_IN_STATEMENT = ParseTreeType.FOR_IN_STATEMENT;
var ForInStatement = function ForInStatement(location, initializer, collection, body) {
this.location = location;
this.initializer = initializer;
this.collection = collection;
this.body = body;
};
($traceurRuntime.createClass)(ForInStatement, {
transform: function(transformer) {
return transformer.transformForInStatement(this);
},
visit: function(visitor) {
visitor.visitForInStatement(this);
},
get type() {
return FOR_IN_STATEMENT;
}
}, {}, ParseTree);
var FOR_OF_STATEMENT = ParseTreeType.FOR_OF_STATEMENT;
var ForOfStatement = function ForOfStatement(location, initializer, collection, body) {
this.location = location;
this.initializer = initializer;
this.collection = collection;
this.body = body;
};
($traceurRuntime.createClass)(ForOfStatement, {
transform: function(transformer) {
return transformer.transformForOfStatement(this);
},
visit: function(visitor) {
visitor.visitForOfStatement(this);
},
get type() {
return FOR_OF_STATEMENT;
}
}, {}, ParseTree);
var FOR_STATEMENT = ParseTreeType.FOR_STATEMENT;
var ForStatement = function ForStatement(location, initializer, condition, increment, body) {
this.location = location;
this.initializer = initializer;
this.condition = condition;
this.increment = increment;
this.body = body;
};
($traceurRuntime.createClass)(ForStatement, {
transform: function(transformer) {
return transformer.transformForStatement(this);
},
visit: function(visitor) {
visitor.visitForStatement(this);
},
get type() {
return FOR_STATEMENT;
}
}, {}, ParseTree);
var FORMAL_PARAMETER = ParseTreeType.FORMAL_PARAMETER;
var FormalParameter = function FormalParameter(location, parameter, typeAnnotation, annotations) {
this.location = location;
this.parameter = parameter;
this.typeAnnotation = typeAnnotation;
this.annotations = annotations;
};
($traceurRuntime.createClass)(FormalParameter, {
transform: function(transformer) {
return transformer.transformFormalParameter(this);
},
visit: function(visitor) {
visitor.visitFormalParameter(this);
},
get type() {
return FORMAL_PARAMETER;
}
}, {}, ParseTree);
var FORMAL_PARAMETER_LIST = ParseTreeType.FORMAL_PARAMETER_LIST;
var FormalParameterList = function FormalParameterList(location, parameters) {
this.location = location;
this.parameters = parameters;
};
($traceurRuntime.createClass)(FormalParameterList, {
transform: function(transformer) {
return transformer.transformFormalParameterList(this);
},
visit: function(visitor) {
visitor.visitFormalParameterList(this);
},
get type() {
return FORMAL_PARAMETER_LIST;
}
}, {}, ParseTree);
var FUNCTION_BODY = ParseTreeType.FUNCTION_BODY;
var FunctionBody = function FunctionBody(location, statements) {
this.location = location;
this.statements = statements;
};
($traceurRuntime.createClass)(FunctionBody, {
transform: function(transformer) {
return transformer.transformFunctionBody(this);
},
visit: function(visitor) {
visitor.visitFunctionBody(this);
},
get type() {
return FUNCTION_BODY;
}
}, {}, ParseTree);
var FUNCTION_DECLARATION = ParseTreeType.FUNCTION_DECLARATION;
var FunctionDeclaration = function FunctionDeclaration(location, name, functionKind, parameterList, typeAnnotation, annotations, body) {
this.location = location;
this.name = name;
this.functionKind = functionKind;
this.parameterList = parameterList;
this.typeAnnotation = typeAnnotation;
this.annotations = annotations;
this.body = body;
};
($traceurRuntime.createClass)(FunctionDeclaration, {
transform: function(transformer) {
return transformer.transformFunctionDeclaration(this);
},
visit: function(visitor) {
visitor.visitFunctionDeclaration(this);
},
get type() {
return FUNCTION_DECLARATION;
}
}, {}, ParseTree);
var FUNCTION_EXPRESSION = ParseTreeType.FUNCTION_EXPRESSION;
var FunctionExpression = function FunctionExpression(location, name, functionKind, parameterList, typeAnnotation, annotations, body) {
this.location = location;
this.name = name;
this.functionKind = functionKind;
this.parameterList = parameterList;
this.typeAnnotation = typeAnnotation;
this.annotations = annotations;
this.body = body;
};
($traceurRuntime.createClass)(FunctionExpression, {
transform: function(transformer) {
return transformer.transformFunctionExpression(this);
},
visit: function(visitor) {
visitor.visitFunctionExpression(this);
},
get type() {
return FUNCTION_EXPRESSION;
}
}, {}, ParseTree);
var GENERATOR_COMPREHENSION = ParseTreeType.GENERATOR_COMPREHENSION;
var GeneratorComprehension = function GeneratorComprehension(location, comprehensionList, expression) {
this.location = location;
this.comprehensionList = comprehensionList;
this.expression = expression;
};
($traceurRuntime.createClass)(GeneratorComprehension, {
transform: function(transformer) {
return transformer.transformGeneratorComprehension(this);
},
visit: function(visitor) {
visitor.visitGeneratorComprehension(this);
},
get type() {
return GENERATOR_COMPREHENSION;
}
}, {}, ParseTree);
var GET_ACCESSOR = ParseTreeType.GET_ACCESSOR;
var GetAccessor = function GetAccessor(location, isStatic, name, typeAnnotation, annotations, body) {
this.location = location;
this.isStatic = isStatic;
this.name = name;
this.typeAnnotation = typeAnnotation;
this.annotations = annotations;
this.body = body;
};
($traceurRuntime.createClass)(GetAccessor, {
transform: function(transformer) {
return transformer.transformGetAccessor(this);
},
visit: function(visitor) {
visitor.visitGetAccessor(this);
},
get type() {
return GET_ACCESSOR;
}
}, {}, ParseTree);
var IDENTIFIER_EXPRESSION = ParseTreeType.IDENTIFIER_EXPRESSION;
var IdentifierExpression = function IdentifierExpression(location, identifierToken) {
this.location = location;
this.identifierToken = identifierToken;
};
($traceurRuntime.createClass)(IdentifierExpression, {
transform: function(transformer) {
return transformer.transformIdentifierExpression(this);
},
visit: function(visitor) {
visitor.visitIdentifierExpression(this);
},
get type() {
return IDENTIFIER_EXPRESSION;
}
}, {}, ParseTree);
var IF_STATEMENT = ParseTreeType.IF_STATEMENT;
var IfStatement = function IfStatement(location, condition, ifClause, elseClause) {
this.location = location;
this.condition = condition;
this.ifClause = ifClause;
this.elseClause = elseClause;
};
($traceurRuntime.createClass)(IfStatement, {
transform: function(transformer) {
return transformer.transformIfStatement(this);
},
visit: function(visitor) {
visitor.visitIfStatement(this);
},
get type() {
return IF_STATEMENT;
}
}, {}, ParseTree);
var IMPORTED_BINDING = ParseTreeType.IMPORTED_BINDING;
var ImportedBinding = function ImportedBinding(location, binding) {
this.location = location;
this.binding = binding;
};
($traceurRuntime.createClass)(ImportedBinding, {
transform: function(transformer) {
return transformer.transformImportedBinding(this);
},
visit: function(visitor) {
visitor.visitImportedBinding(this);
},
get type() {
return IMPORTED_BINDING;
}
}, {}, ParseTree);
var IMPORT_DECLARATION = ParseTreeType.IMPORT_DECLARATION;
var ImportDeclaration = function ImportDeclaration(location, importClause, moduleSpecifier) {
this.location = location;
this.importClause = importClause;
this.moduleSpecifier = moduleSpecifier;
};
($traceurRuntime.createClass)(ImportDeclaration, {
transform: function(transformer) {
return transformer.transformImportDeclaration(this);
},
visit: function(visitor) {
visitor.visitImportDeclaration(this);
},
get type() {
return IMPORT_DECLARATION;
}
}, {}, ParseTree);
var IMPORT_SPECIFIER = ParseTreeType.IMPORT_SPECIFIER;
var ImportSpecifier = function ImportSpecifier(location, lhs, rhs) {
this.location = location;
this.lhs = lhs;
this.rhs = rhs;
};
($traceurRuntime.createClass)(ImportSpecifier, {
transform: function(transformer) {
return transformer.transformImportSpecifier(this);
},
visit: function(visitor) {
visitor.visitImportSpecifier(this);
},
get type() {
return IMPORT_SPECIFIER;
}
}, {}, ParseTree);
var IMPORT_SPECIFIER_SET = ParseTreeType.IMPORT_SPECIFIER_SET;
var ImportSpecifierSet = function ImportSpecifierSet(location, specifiers) {
this.location = location;
this.specifiers = specifiers;
};
($traceurRuntime.createClass)(ImportSpecifierSet, {
transform: function(transformer) {
return transformer.transformImportSpecifierSet(this);
},
visit: function(visitor) {
visitor.visitImportSpecifierSet(this);
},
get type() {
return IMPORT_SPECIFIER_SET;
}
}, {}, ParseTree);
var LABELLED_STATEMENT = ParseTreeType.LABELLED_STATEMENT;
var LabelledStatement = function LabelledStatement(location, name, statement) {
this.location = location;
this.name = name;
this.statement = statement;
};
($traceurRuntime.createClass)(LabelledStatement, {
transform: function(transformer) {
return transformer.transformLabelledStatement(this);
},
visit: function(visitor) {
visitor.visitLabelledStatement(this);
},
get type() {
return LABELLED_STATEMENT;
}
}, {}, ParseTree);
var LITERAL_EXPRESSION = ParseTreeType.LITERAL_EXPRESSION;
var LiteralExpression = function LiteralExpression(location, literalToken) {
this.location = location;
this.literalToken = literalToken;
};
($traceurRuntime.createClass)(LiteralExpression, {
transform: function(transformer) {
return transformer.transformLiteralExpression(this);
},
visit: function(visitor) {
visitor.visitLiteralExpression(this);
},
get type() {
return LITERAL_EXPRESSION;
}
}, {}, ParseTree);
var LITERAL_PROPERTY_NAME = ParseTreeType.LITERAL_PROPERTY_NAME;
var LiteralPropertyName = function LiteralPropertyName(location, literalToken) {
this.location = location;
this.literalToken = literalToken;
};
($traceurRuntime.createClass)(LiteralPropertyName, {
transform: function(transformer) {
return transformer.transformLiteralPropertyName(this);
},
visit: function(visitor) {
visitor.visitLiteralPropertyName(this);
},
get type() {
return LITERAL_PROPERTY_NAME;
}
}, {}, ParseTree);
var MEMBER_EXPRESSION = ParseTreeType.MEMBER_EXPRESSION;
var MemberExpression = function MemberExpression(location, operand, memberName) {
this.location = location;
this.operand = operand;
this.memberName = memberName;
};
($traceurRuntime.createClass)(MemberExpression, {
transform: function(transformer) {
return transformer.transformMemberExpression(this);
},
visit: function(visitor) {
visitor.visitMemberExpression(this);
},
get type() {
return MEMBER_EXPRESSION;
}
}, {}, ParseTree);
var MEMBER_LOOKUP_EXPRESSION = ParseTreeType.MEMBER_LOOKUP_EXPRESSION;
var MemberLookupExpression = function MemberLookupExpression(location, operand, memberExpression) {
this.location = location;
this.operand = operand;
this.memberExpression = memberExpression;
};
($traceurRuntime.createClass)(MemberLookupExpression, {
transform: function(transformer) {
return transformer.transformMemberLookupExpression(this);
},
visit: function(visitor) {
visitor.visitMemberLookupExpression(this);
},
get type() {
return MEMBER_LOOKUP_EXPRESSION;
}
}, {}, ParseTree);
var MODULE = ParseTreeType.MODULE;
var Module = function Module(location, scriptItemList, moduleName) {
this.location = location;
this.scriptItemList = scriptItemList;
this.moduleName = moduleName;
};
($traceurRuntime.createClass)(Module, {
transform: function(transformer) {
return transformer.transformModule(this);
},
visit: function(visitor) {
visitor.visitModule(this);
},
get type() {
return MODULE;
}
}, {}, ParseTree);
var MODULE_DECLARATION = ParseTreeType.MODULE_DECLARATION;
var ModuleDeclaration = function ModuleDeclaration(location, identifier, expression) {
this.location = location;
this.identifier = identifier;
this.expression = expression;
};
($traceurRuntime.createClass)(ModuleDeclaration, {
transform: function(transformer) {
return transformer.transformModuleDeclaration(this);
},
visit: function(visitor) {
visitor.visitModuleDeclaration(this);
},
get type() {
return MODULE_DECLARATION;
}
}, {}, ParseTree);
var MODULE_SPECIFIER = ParseTreeType.MODULE_SPECIFIER;
var ModuleSpecifier = function ModuleSpecifier(location, token) {
this.location = location;
this.token = token;
};
($traceurRuntime.createClass)(ModuleSpecifier, {
transform: function(transformer) {
return transformer.transformModuleSpecifier(this);
},
visit: function(visitor) {
visitor.visitModuleSpecifier(this);
},
get type() {
return MODULE_SPECIFIER;
}
}, {}, ParseTree);
var NAMED_EXPORT = ParseTreeType.NAMED_EXPORT;
var NamedExport = function NamedExport(location, moduleSpecifier, specifierSet) {
this.location = location;
this.moduleSpecifier = moduleSpecifier;
this.specifierSet = specifierSet;
};
($traceurRuntime.createClass)(NamedExport, {
transform: function(transformer) {
return transformer.transformNamedExport(this);
},
visit: function(visitor) {
visitor.visitNamedExport(this);
},
get type() {
return NAMED_EXPORT;
}
}, {}, ParseTree);
var NEW_EXPRESSION = ParseTreeType.NEW_EXPRESSION;
var NewExpression = function NewExpression(location, operand, args) {
this.location = location;
this.operand = operand;
this.args = args;
};
($traceurRuntime.createClass)(NewExpression, {
transform: function(transformer) {
return transformer.transformNewExpression(this);
},
visit: function(visitor) {
visitor.visitNewExpression(this);
},
get type() {
return NEW_EXPRESSION;
}
}, {}, ParseTree);
var OBJECT_LITERAL_EXPRESSION = ParseTreeType.OBJECT_LITERAL_EXPRESSION;
var ObjectLiteralExpression = function ObjectLiteralExpression(location, propertyNameAndValues) {
this.location = location;
this.propertyNameAndValues = propertyNameAndValues;
};
($traceurRuntime.createClass)(ObjectLiteralExpression, {
transform: function(transformer) {
return transformer.transformObjectLiteralExpression(this);
},
visit: function(visitor) {
visitor.visitObjectLiteralExpression(this);
},
get type() {
return OBJECT_LITERAL_EXPRESSION;
}
}, {}, ParseTree);
var OBJECT_PATTERN = ParseTreeType.OBJECT_PATTERN;
var ObjectPattern = function ObjectPattern(location, fields) {
this.location = location;
this.fields = fields;
};
($traceurRuntime.createClass)(ObjectPattern, {
transform: function(transformer) {
return transformer.transformObjectPattern(this);
},
visit: function(visitor) {
visitor.visitObjectPattern(this);
},
get type() {
return OBJECT_PATTERN;
}
}, {}, ParseTree);
var OBJECT_PATTERN_FIELD = ParseTreeType.OBJECT_PATTERN_FIELD;
var ObjectPatternField = function ObjectPatternField(location, name, element) {
this.location = location;
this.name = name;
this.element = element;
};
($traceurRuntime.createClass)(ObjectPatternField, {
transform: function(transformer) {
return transformer.transformObjectPatternField(this);
},
visit: function(visitor) {
visitor.visitObjectPatternField(this);
},
get type() {
return OBJECT_PATTERN_FIELD;
}
}, {}, ParseTree);
var PAREN_EXPRESSION = ParseTreeType.PAREN_EXPRESSION;
var ParenExpression = function ParenExpression(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ParenExpression, {
transform: function(transformer) {
return transformer.transformParenExpression(this);
},
visit: function(visitor) {
visitor.visitParenExpression(this);
},
get type() {
return PAREN_EXPRESSION;
}
}, {}, ParseTree);
var POSTFIX_EXPRESSION = ParseTreeType.POSTFIX_EXPRESSION;
var PostfixExpression = function PostfixExpression(location, operand, operator) {
this.location = location;
this.operand = operand;
this.operator = operator;
};
($traceurRuntime.createClass)(PostfixExpression, {
transform: function(transformer) {
return transformer.transformPostfixExpression(this);
},
visit: function(visitor) {
visitor.visitPostfixExpression(this);
},
get type() {
return POSTFIX_EXPRESSION;
}
}, {}, ParseTree);
var PREDEFINED_TYPE = ParseTreeType.PREDEFINED_TYPE;
var PredefinedType = function PredefinedType(location, typeToken) {
this.location = location;
this.typeToken = typeToken;
};
($traceurRuntime.createClass)(PredefinedType, {
transform: function(transformer) {
return transformer.transformPredefinedType(this);
},
visit: function(visitor) {
visitor.visitPredefinedType(this);
},
get type() {
return PREDEFINED_TYPE;
}
}, {}, ParseTree);
var SCRIPT = ParseTreeType.SCRIPT;
var Script = function Script(location, scriptItemList, moduleName) {
this.location = location;
this.scriptItemList = scriptItemList;
this.moduleName = moduleName;
};
($traceurRuntime.createClass)(Script, {
transform: function(transformer) {
return transformer.transformScript(this);
},
visit: function(visitor) {
visitor.visitScript(this);
},
get type() {
return SCRIPT;
}
}, {}, ParseTree);
var PROPERTY_METHOD_ASSIGNMENT = ParseTreeType.PROPERTY_METHOD_ASSIGNMENT;
var PropertyMethodAssignment = function PropertyMethodAssignment(location, isStatic, functionKind, name, parameterList, typeAnnotation, annotations, body) {
this.location = location;
this.isStatic = isStatic;
this.functionKind = functionKind;
this.name = name;
this.parameterList = parameterList;
this.typeAnnotation = typeAnnotation;
this.annotations = annotations;
this.body = body;
};
($traceurRuntime.createClass)(PropertyMethodAssignment, {
transform: function(transformer) {
return transformer.transformPropertyMethodAssignment(this);
},
visit: function(visitor) {
visitor.visitPropertyMethodAssignment(this);
},
get type() {
return PROPERTY_METHOD_ASSIGNMENT;
}
}, {}, ParseTree);
var PROPERTY_NAME_ASSIGNMENT = ParseTreeType.PROPERTY_NAME_ASSIGNMENT;
var PropertyNameAssignment = function PropertyNameAssignment(location, name, value) {
this.location = location;
this.name = name;
this.value = value;
};
($traceurRuntime.createClass)(PropertyNameAssignment, {
transform: function(transformer) {
return transformer.transformPropertyNameAssignment(this);
},
visit: function(visitor) {
visitor.visitPropertyNameAssignment(this);
},
get type() {
return PROPERTY_NAME_ASSIGNMENT;
}
}, {}, ParseTree);
var PROPERTY_NAME_SHORTHAND = ParseTreeType.PROPERTY_NAME_SHORTHAND;
var PropertyNameShorthand = function PropertyNameShorthand(location, name) {
this.location = location;
this.name = name;
};
($traceurRuntime.createClass)(PropertyNameShorthand, {
transform: function(transformer) {
return transformer.transformPropertyNameShorthand(this);
},
visit: function(visitor) {
visitor.visitPropertyNameShorthand(this);
},
get type() {
return PROPERTY_NAME_SHORTHAND;
}
}, {}, ParseTree);
var REST_PARAMETER = ParseTreeType.REST_PARAMETER;
var RestParameter = function RestParameter(location, identifier) {
this.location = location;
this.identifier = identifier;
};
($traceurRuntime.createClass)(RestParameter, {
transform: function(transformer) {
return transformer.transformRestParameter(this);
},
visit: function(visitor) {
visitor.visitRestParameter(this);
},
get type() {
return REST_PARAMETER;
}
}, {}, ParseTree);
var RETURN_STATEMENT = ParseTreeType.RETURN_STATEMENT;
var ReturnStatement = function ReturnStatement(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(ReturnStatement, {
transform: function(transformer) {
return transformer.transformReturnStatement(this);
},
visit: function(visitor) {
visitor.visitReturnStatement(this);
},
get type() {
return RETURN_STATEMENT;
}
}, {}, ParseTree);
var SET_ACCESSOR = ParseTreeType.SET_ACCESSOR;
var SetAccessor = function SetAccessor(location, isStatic, name, parameterList, annotations, body) {
this.location = location;
this.isStatic = isStatic;
this.name = name;
this.parameterList = parameterList;
this.annotations = annotations;
this.body = body;
};
($traceurRuntime.createClass)(SetAccessor, {
transform: function(transformer) {
return transformer.transformSetAccessor(this);
},
visit: function(visitor) {
visitor.visitSetAccessor(this);
},
get type() {
return SET_ACCESSOR;
}
}, {}, ParseTree);
var SPREAD_EXPRESSION = ParseTreeType.SPREAD_EXPRESSION;
var SpreadExpression = function SpreadExpression(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(SpreadExpression, {
transform: function(transformer) {
return transformer.transformSpreadExpression(this);
},
visit: function(visitor) {
visitor.visitSpreadExpression(this);
},
get type() {
return SPREAD_EXPRESSION;
}
}, {}, ParseTree);
var SPREAD_PATTERN_ELEMENT = ParseTreeType.SPREAD_PATTERN_ELEMENT;
var SpreadPatternElement = function SpreadPatternElement(location, lvalue) {
this.location = location;
this.lvalue = lvalue;
};
($traceurRuntime.createClass)(SpreadPatternElement, {
transform: function(transformer) {
return transformer.transformSpreadPatternElement(this);
},
visit: function(visitor) {
visitor.visitSpreadPatternElement(this);
},
get type() {
return SPREAD_PATTERN_ELEMENT;
}
}, {}, ParseTree);
var SUPER_EXPRESSION = ParseTreeType.SUPER_EXPRESSION;
var SuperExpression = function SuperExpression(location) {
this.location = location;
};
($traceurRuntime.createClass)(SuperExpression, {
transform: function(transformer) {
return transformer.transformSuperExpression(this);
},
visit: function(visitor) {
visitor.visitSuperExpression(this);
},
get type() {
return SUPER_EXPRESSION;
}
}, {}, ParseTree);
var SWITCH_STATEMENT = ParseTreeType.SWITCH_STATEMENT;
var SwitchStatement = function SwitchStatement(location, expression, caseClauses) {
this.location = location;
this.expression = expression;
this.caseClauses = caseClauses;
};
($traceurRuntime.createClass)(SwitchStatement, {
transform: function(transformer) {
return transformer.transformSwitchStatement(this);
},
visit: function(visitor) {
visitor.visitSwitchStatement(this);
},
get type() {
return SWITCH_STATEMENT;
}
}, {}, ParseTree);
var SYNTAX_ERROR_TREE = ParseTreeType.SYNTAX_ERROR_TREE;
var SyntaxErrorTree = function SyntaxErrorTree(location, nextToken, message) {
this.location = location;
this.nextToken = nextToken;
this.message = message;
};
($traceurRuntime.createClass)(SyntaxErrorTree, {
transform: function(transformer) {
return transformer.transformSyntaxErrorTree(this);
},
visit: function(visitor) {
visitor.visitSyntaxErrorTree(this);
},
get type() {
return SYNTAX_ERROR_TREE;
}
}, {}, ParseTree);
var TEMPLATE_LITERAL_EXPRESSION = ParseTreeType.TEMPLATE_LITERAL_EXPRESSION;
var TemplateLiteralExpression = function TemplateLiteralExpression(location, operand, elements) {
this.location = location;
this.operand = operand;
this.elements = elements;
};
($traceurRuntime.createClass)(TemplateLiteralExpression, {
transform: function(transformer) {
return transformer.transformTemplateLiteralExpression(this);
},
visit: function(visitor) {
visitor.visitTemplateLiteralExpression(this);
},
get type() {
return TEMPLATE_LITERAL_EXPRESSION;
}
}, {}, ParseTree);
var TEMPLATE_LITERAL_PORTION = ParseTreeType.TEMPLATE_LITERAL_PORTION;
var TemplateLiteralPortion = function TemplateLiteralPortion(location, value) {
this.location = location;
this.value = value;
};
($traceurRuntime.createClass)(TemplateLiteralPortion, {
transform: function(transformer) {
return transformer.transformTemplateLiteralPortion(this);
},
visit: function(visitor) {
visitor.visitTemplateLiteralPortion(this);
},
get type() {
return TEMPLATE_LITERAL_PORTION;
}
}, {}, ParseTree);
var TEMPLATE_SUBSTITUTION = ParseTreeType.TEMPLATE_SUBSTITUTION;
var TemplateSubstitution = function TemplateSubstitution(location, expression) {
this.location = location;
this.expression = expression;
};
($traceurRuntime.createClass)(TemplateSubstitution, {
transform: function(transformer) {
return transformer.transformTemplateSubstitution(this);
},
visit: function(visitor) {
visitor.visitTemplateSubstitution(this);
},
get type() {
return TEMPLATE_SUBSTITUTION;
}
}, {}, ParseTree);
var THIS_EXPRESSION = ParseTreeType.THIS_EXPRESSION;
var ThisExpression = function ThisExpression(location) {
this.location = location;
};
($traceurRuntime.createClass)(ThisExpression, {
transform: function(transformer) {
return transformer.transformThisExpression(this);
},
visit: function(visitor) {
visitor.visitThisExpression(this);
},
get type() {
return THIS_EXPRESSION;
}
}, {}, ParseTree);
var THROW_STATEMENT = ParseTreeType.THROW_STATEMENT;
var ThrowStatement = function ThrowStatement(location, value) {
this.location = location;
this.value = value;
};
($traceurRuntime.createClass)(ThrowStatement, {
transform: function(transformer) {
return transformer.transformThrowStatement(this);
},
visit: function(visitor) {
visitor.visitThrowStatement(this);
},
get type() {
return THROW_STATEMENT;
}
}, {}, ParseTree);
var TRY_STATEMENT = ParseTreeType.TRY_STATEMENT;
var TryStatement = function TryStatement(location, body, catchBlock, finallyBlock) {
this.location = location;
this.body = body;
this.catchBlock = catchBlock;
this.finallyBlock = finallyBlock;
};
($traceurRuntime.createClass)(TryStatement, {
transform: function(transformer) {
return transformer.transformTryStatement(this);
},
visit: function(visitor) {
visitor.visitTryStatement(this);
},
get type() {
return TRY_STATEMENT;
}
}, {}, ParseTree);
var TYPE_NAME = ParseTreeType.TYPE_NAME;
var TypeName = function TypeName(location, moduleName, name) {
this.location = location;
this.moduleName = moduleName;
this.name = name;
};
($traceurRuntime.createClass)(TypeName, {
transform: function(transformer) {
return transformer.transformTypeName(this);
},
visit: function(visitor) {
visitor.visitTypeName(this);
},
get type() {
return TYPE_NAME;
}
}, {}, ParseTree);
var UNARY_EXPRESSION = ParseTreeType.UNARY_EXPRESSION;
var UnaryExpression = function UnaryExpression(location, operator, operand) {
this.location = location;
this.operator = operator;
this.operand = operand;
};
($traceurRuntime.createClass)(UnaryExpression, {
transform: function(transformer) {
return transformer.transformUnaryExpression(this);
},
visit: function(visitor) {
visitor.visitUnaryExpression(this);
},
get type() {
return UNARY_EXPRESSION;
}
}, {}, ParseTree);
var VARIABLE_DECLARATION = ParseTreeType.VARIABLE_DECLARATION;
var VariableDeclaration = function VariableDeclaration(location, lvalue, typeAnnotation, initializer) {
this.location = location;
this.lvalue = lvalue;
this.typeAnnotation = typeAnnotation;
this.initializer = initializer;
};
($traceurRuntime.createClass)(VariableDeclaration, {
transform: function(transformer) {
return transformer.transformVariableDeclaration(this);
},
visit: function(visitor) {
visitor.visitVariableDeclaration(this);
},
get type() {
return VARIABLE_DECLARATION;
}
}, {}, ParseTree);
var VARIABLE_DECLARATION_LIST = ParseTreeType.VARIABLE_DECLARATION_LIST;
var VariableDeclarationList = function VariableDeclarationList(location, declarationType, declarations) {
this.location = location;
this.declarationType = declarationType;
this.declarations = declarations;
};
($traceurRuntime.createClass)(VariableDeclarationList, {
transform: function(transformer) {
return transformer.transformVariableDeclarationList(this);
},
visit: function(visitor) {
visitor.visitVariableDeclarationList(this);
},
get type() {
return VARIABLE_DECLARATION_LIST;
}
}, {}, ParseTree);
var VARIABLE_STATEMENT = ParseTreeType.VARIABLE_STATEMENT;
var VariableStatement = function VariableStatement(location, declarations) {
this.location = location;
this.declarations = declarations;
};
($traceurRuntime.createClass)(VariableStatement, {
transform: function(transformer) {
return transformer.transformVariableStatement(this);
},
visit: function(visitor) {
visitor.visitVariableStatement(this);
},
get type() {
return VARIABLE_STATEMENT;
}
}, {}, ParseTree);
var WHILE_STATEMENT = ParseTreeType.WHILE_STATEMENT;
var WhileStatement = function WhileStatement(location, condition, body) {
this.location = location;
this.condition = condition;
this.body = body;
};
($traceurRuntime.createClass)(WhileStatement, {
transform: function(transformer) {
return transformer.transformWhileStatement(this);
},
visit: function(visitor) {
visitor.visitWhileStatement(this);
},
get type() {
return WHILE_STATEMENT;
}
}, {}, ParseTree);
var WITH_STATEMENT = ParseTreeType.WITH_STATEMENT;
var WithStatement = function WithStatement(location, expression, body) {
this.location = location;
this.expression = expression;
this.body = body;
};
($traceurRuntime.createClass)(WithStatement, {
transform: function(transformer) {
return transformer.transformWithStatement(this);
},
visit: function(visitor) {
visitor.visitWithStatement(this);
},
get type() {
return WITH_STATEMENT;
}
}, {}, ParseTree);
var YIELD_EXPRESSION = ParseTreeType.YIELD_EXPRESSION;
var YieldExpression = function YieldExpression(location, expression, isYieldFor) {
this.location = location;
this.expression = expression;
this.isYieldFor = isYieldFor;
};
($traceurRuntime.createClass)(YieldExpression, {
transform: function(transformer) {
return transformer.transformYieldExpression(this);
},
visit: function(visitor) {
visitor.visitYieldExpression(this);
},
get type() {
return YIELD_EXPRESSION;
}
}, {}, ParseTree);
return {
get Annotation() {
return Annotation;
},
get AnonBlock() {
return AnonBlock;
},
get ArgumentList() {
return ArgumentList;
},
get ArrayComprehension() {
return ArrayComprehension;
},
get ArrayLiteralExpression() {
return ArrayLiteralExpression;
},
get ArrayPattern() {
return ArrayPattern;
},
get ArrowFunctionExpression() {
return ArrowFunctionExpression;
},
get AssignmentElement() {
return AssignmentElement;
},
get AwaitExpression() {
return AwaitExpression;
},
get BinaryExpression() {
return BinaryExpression;
},
get BindingElement() {
return BindingElement;
},
get BindingIdentifier() {
return BindingIdentifier;
},
get Block() {
return Block;
},
get BreakStatement() {
return BreakStatement;
},
get CallExpression() {
return CallExpression;
},
get CaseClause() {
return CaseClause;
},
get Catch() {
return Catch;
},
get ClassDeclaration() {
return ClassDeclaration;
},
get ClassExpression() {
return ClassExpression;
},
get CommaExpression() {
return CommaExpression;
},
get ComprehensionFor() {
return ComprehensionFor;
},
get ComprehensionIf() {
return ComprehensionIf;
},
get ComputedPropertyName() {
return ComputedPropertyName;
},
get ConditionalExpression() {
return ConditionalExpression;
},
get ContinueStatement() {
return ContinueStatement;
},
get CoverFormals() {
return CoverFormals;
},
get CoverInitializedName() {
return CoverInitializedName;
},
get DebuggerStatement() {
return DebuggerStatement;
},
get DefaultClause() {
return DefaultClause;
},
get DoWhileStatement() {
return DoWhileStatement;
},
get EmptyStatement() {
return EmptyStatement;
},
get ExportDeclaration() {
return ExportDeclaration;
},
get ExportDefault() {
return ExportDefault;
},
get ExportSpecifier() {
return ExportSpecifier;
},
get ExportSpecifierSet() {
return ExportSpecifierSet;
},
get ExportStar() {
return ExportStar;
},
get ExpressionStatement() {
return ExpressionStatement;
},
get Finally() {
return Finally;
},
get ForInStatement() {
return ForInStatement;
},
get ForOfStatement() {
return ForOfStatement;
},
get ForStatement() {
return ForStatement;
},
get FormalParameter() {
return FormalParameter;
},
get FormalParameterList() {
return FormalParameterList;
},
get FunctionBody() {
return FunctionBody;
},
get FunctionDeclaration() {
return FunctionDeclaration;
},
get FunctionExpression() {
return FunctionExpression;
},
get GeneratorComprehension() {
return GeneratorComprehension;
},
get GetAccessor() {
return GetAccessor;
},
get IdentifierExpression() {
return IdentifierExpression;
},
get IfStatement() {
return IfStatement;
},
get ImportedBinding() {
return ImportedBinding;
},
get ImportDeclaration() {
return ImportDeclaration;
},
get ImportSpecifier() {
return ImportSpecifier;
},
get ImportSpecifierSet() {
return ImportSpecifierSet;
},
get LabelledStatement() {
return LabelledStatement;
},
get LiteralExpression() {
return LiteralExpression;
},
get LiteralPropertyName() {
return LiteralPropertyName;
},
get MemberExpression() {
return MemberExpression;
},
get MemberLookupExpression() {
return MemberLookupExpression;
},
get Module() {
return Module;
},
get ModuleDeclaration() {
return ModuleDeclaration;
},
get ModuleSpecifier() {
return ModuleSpecifier;
},
get NamedExport() {
return NamedExport;
},
get NewExpression() {
return NewExpression;
},
get ObjectLiteralExpression() {
return ObjectLiteralExpression;
},
get ObjectPattern() {
return ObjectPattern;
},
get ObjectPatternField() {
return ObjectPatternField;
},
get ParenExpression() {
return ParenExpression;
},
get PostfixExpression() {
return PostfixExpression;
},
get PredefinedType() {
return PredefinedType;
},
get Script() {
return Script;
},
get PropertyMethodAssignment() {
return PropertyMethodAssignment;
},
get PropertyNameAssignment() {
return PropertyNameAssignment;
},
get PropertyNameShorthand() {
return PropertyNameShorthand;
},
get RestParameter() {
return RestParameter;
},
get ReturnStatement() {
return ReturnStatement;
},
get SetAccessor() {
return SetAccessor;
},
get SpreadExpression() {
return SpreadExpression;
},
get SpreadPatternElement() {
return SpreadPatternElement;
},
get SuperExpression() {
return SuperExpression;
},
get SwitchStatement() {
return SwitchStatement;
},
get SyntaxErrorTree() {
return SyntaxErrorTree;
},
get TemplateLiteralExpression() {
return TemplateLiteralExpression;
},
get TemplateLiteralPortion() {
return TemplateLiteralPortion;
},
get TemplateSubstitution() {
return TemplateSubstitution;
},
get ThisExpression() {
return ThisExpression;
},
get ThrowStatement() {
return ThrowStatement;
},
get TryStatement() {
return TryStatement;
},
get TypeName() {
return TypeName;
},
get UnaryExpression() {
return UnaryExpression;
},
get VariableDeclaration() {
return VariableDeclaration;
},
get VariableDeclarationList() {
return VariableDeclarationList;
},
get VariableStatement() {
return VariableStatement;
},
get WhileStatement() {
return WhileStatement;
},
get WithStatement() {
return WithStatement;
},
get YieldExpression() {
return YieldExpression;
}
};
});
System.register("traceur@0.0.52/src/semantics/getVariableName", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/getVariableName";
var $__57 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
BindingIdentifier = $__57.BindingIdentifier,
IdentifierExpression = $__57.IdentifierExpression;
var IdentifierToken = System.get("traceur@0.0.52/src/syntax/IdentifierToken").IdentifierToken;
function getVariableName(name) {
if (name instanceof IdentifierExpression) {
name = name.identifierToken;
} else if (name instanceof BindingIdentifier) {
name = name.identifierToken;
}
if (name instanceof IdentifierToken) {
name = name.value;
}
return name;
}
return {get getVariableName() {
return getVariableName;
}};
});
System.register("traceur@0.0.52/src/semantics/util", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/util";
var $__59 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
IDENTIFIER_EXPRESSION = $__59.IDENTIFIER_EXPRESSION,
LITERAL_EXPRESSION = $__59.LITERAL_EXPRESSION,
PAREN_EXPRESSION = $__59.PAREN_EXPRESSION,
UNARY_EXPRESSION = $__59.UNARY_EXPRESSION;
var UNDEFINED = System.get("traceur@0.0.52/src/syntax/PredefinedName").UNDEFINED;
var VOID = System.get("traceur@0.0.52/src/syntax/TokenType").VOID;
function hasUseStrict(list) {
for (var i = 0; i < list.length; i++) {
if (!list[i].isDirectivePrologue())
return false;
if (list[i].isUseStrictDirective())
return true;
}
return false;
}
function isUndefined(tree) {
if (tree.type === PAREN_EXPRESSION)
return isUndefined(tree.expression);
return tree.type === IDENTIFIER_EXPRESSION && tree.identifierToken.value === UNDEFINED;
}
function isVoidExpression(tree) {
if (tree.type === PAREN_EXPRESSION)
return isVoidExpression(tree.expression);
return tree.type === UNARY_EXPRESSION && tree.operator.type === VOID && isLiteralExpression(tree.operand);
}
function isLiteralExpression(tree) {
if (tree.type === PAREN_EXPRESSION)
return isLiteralExpression(tree.expression);
return tree.type === LITERAL_EXPRESSION;
}
return {
get hasUseStrict() {
return hasUseStrict;
},
get isUndefined() {
return isUndefined;
},
get isVoidExpression() {
return isVoidExpression;
},
get isLiteralExpression() {
return isLiteralExpression;
}
};
});
System.register("traceur@0.0.52/src/semantics/isTreeStrict", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/isTreeStrict";
var $__62 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARROW_FUNCTION_EXPRESSION = $__62.ARROW_FUNCTION_EXPRESSION,
CLASS_DECLARATION = $__62.CLASS_DECLARATION,
CLASS_EXPRESSION = $__62.CLASS_EXPRESSION,
FUNCTION_BODY = $__62.FUNCTION_BODY,
FUNCTION_DECLARATION = $__62.FUNCTION_DECLARATION,
FUNCTION_EXPRESSION = $__62.FUNCTION_EXPRESSION,
GET_ACCESSOR = $__62.GET_ACCESSOR,
MODULE = $__62.MODULE,
PROPERTY_METHOD_ASSIGNMENT = $__62.PROPERTY_METHOD_ASSIGNMENT,
SCRIPT = $__62.SCRIPT,
SET_ACCESSOR = $__62.SET_ACCESSOR;
var hasUseStrict = System.get("traceur@0.0.52/src/semantics/util").hasUseStrict;
function isTreeStrict(tree) {
switch (tree.type) {
case CLASS_DECLARATION:
case CLASS_EXPRESSION:
case MODULE:
return true;
case FUNCTION_BODY:
return hasUseStrict(tree.statements);
case FUNCTION_EXPRESSION:
case FUNCTION_DECLARATION:
case PROPERTY_METHOD_ASSIGNMENT:
return isTreeStrict(tree.body);
case ARROW_FUNCTION_EXPRESSION:
if (tree.body.type === FUNCTION_BODY) {
return isTreeStrict(tree.body);
}
return false;
case GET_ACCESSOR:
case SET_ACCESSOR:
return isTreeStrict(tree.body);
case SCRIPT:
return hasUseStrict(tree.scriptItemList);
default:
return false;
}
}
return {get isTreeStrict() {
return isTreeStrict;
}};
});
System.register("traceur@0.0.52/src/semantics/Scope", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/Scope";
var $__64 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BLOCK = $__64.BLOCK,
CATCH = $__64.CATCH;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var getVariableName = System.get("traceur@0.0.52/src/semantics/getVariableName").getVariableName;
var isTreeStrict = System.get("traceur@0.0.52/src/semantics/isTreeStrict").isTreeStrict;
function reportDuplicateVar(reporter, tree, name) {
reporter.reportError(tree.location && tree.location.start, ("Duplicate declaration, " + name));
}
var Scope = function Scope(parent, tree) {
this.parent = parent;
this.tree = tree;
this.variableDeclarations = Object.create(null);
this.lexicalDeclarations = Object.create(null);
this.strictMode = parent && parent.strictMode || isTreeStrict(tree);
};
($traceurRuntime.createClass)(Scope, {
addBinding: function(tree, type, reporter) {
if (type === VAR) {
this.addVar(tree, reporter);
} else {
this.addDeclaration(tree, type, reporter);
}
},
addVar: function(tree, reporter) {
var name = getVariableName(tree);
if (this.lexicalDeclarations[name]) {
reportDuplicateVar(reporter, tree, name);
return;
}
this.variableDeclarations[name] = {
type: VAR,
tree: tree
};
if (!this.isVarScope && this.parent) {
this.parent.addVar(tree, reporter);
}
},
addDeclaration: function(tree, type, reporter) {
var name = getVariableName(tree);
if (this.lexicalDeclarations[name] || this.variableDeclarations[name]) {
reportDuplicateVar(reporter, tree, name);
return;
}
this.lexicalDeclarations[name] = {
type: type,
tree: tree
};
},
get isVarScope() {
switch (this.tree.type) {
case BLOCK:
case CATCH:
return false;
}
return true;
},
getVarScope: function() {
if (this.isVarScope) {
return this;
}
if (this.parent) {
return this.parent.getVarScope();
}
return null;
},
getBinding: function(tree) {
var name = getVariableName(tree);
return this.getBinding_(name);
},
getBinding_: function(name) {
var b = this.lexicalDeclarations[name];
if (b) {
return b;
}
b = this.variableDeclarations[name];
if (b && this.isVarScope) {
return b;
}
if (this.parent) {
return this.parent.getBinding_(name);
}
return null;
},
getVariableBindingNames: function() {
var names = Object.create(null);
for (var name in this.variableDeclarations) {
names[name] = true;
}
return names;
},
getLexicalBindingNames: function() {
var names = Object.create(null);
for (var name in this.lexicalDeclarations) {
names[name] = true;
}
return names;
}
}, {});
return {get Scope() {
return Scope;
}};
});
System.register("traceur@0.0.52/src/semantics/ScopeVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/ScopeVisitor";
var Map = System.get("traceur@0.0.52/src/runtime/polyfills/Map").Map;
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var Scope = System.get("traceur@0.0.52/src/semantics/Scope").Scope;
var $__73 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
COMPREHENSION_FOR = $__73.COMPREHENSION_FOR,
VARIABLE_DECLARATION_LIST = $__73.VARIABLE_DECLARATION_LIST;
var ScopeVisitor = function ScopeVisitor() {
this.map_ = new Map();
this.scope = null;
this.withBlockCounter_ = 0;
};
var $ScopeVisitor = ScopeVisitor;
($traceurRuntime.createClass)(ScopeVisitor, {
getScopeForTree: function(tree) {
return this.map_.get(tree);
},
pushScope: function(tree) {
var scope = new Scope(this.scope, tree);
this.map_.set(tree, scope);
return this.scope = scope;
},
popScope: function(scope) {
if (this.scope !== scope) {
throw new Error('ScopeVisitor scope mismatch');
}
this.scope = scope.parent;
},
visitScript: function(tree) {
var scope = this.pushScope(tree);
$traceurRuntime.superCall(this, $ScopeVisitor.prototype, "visitScript", [tree]);
this.popScope(scope);
},
visitModule: function(tree) {
var scope = this.pushScope(tree);
$traceurRuntime.superCall(this, $ScopeVisitor.prototype, "visitModule", [tree]);
this.popScope(scope);
},
visitBlock: function(tree) {
var scope = this.pushScope(tree);
$traceurRuntime.superCall(this, $ScopeVisitor.prototype, "visitBlock", [tree]);
this.popScope(scope);
},
visitCatch: function(tree) {
var scope = this.pushScope(tree);
this.visitAny(tree.binding);
this.visitList(tree.catchBody.statements);
this.popScope(scope);
},
visitFunctionBodyForScope: function(tree) {
var parameterList = arguments[1] !== (void 0) ? arguments[1] : tree.parameterList;
var scope = this.pushScope(tree);
this.visitAny(parameterList);
this.visitAny(tree.body);
this.popScope(scope);
},
visitFunctionExpression: function(tree) {
this.visitFunctionBodyForScope(tree);
},
visitFunctionDeclaration: function(tree) {
this.visitAny(tree.name);
this.visitFunctionBodyForScope(tree);
},
visitArrowFunctionExpression: function(tree) {
this.visitFunctionBodyForScope(tree);
},
visitGetAccessor: function(tree) {
this.visitFunctionBodyForScope(tree, null);
},
visitSetAccessor: function(tree) {
this.visitFunctionBodyForScope(tree);
},
visitPropertyMethodAssignment: function(tree) {
this.visitFunctionBodyForScope(tree);
},
visitClassDeclaration: function(tree) {
this.visitAny(tree.superClass);
var scope = this.pushScope(tree);
this.visitAny(tree.name);
this.visitList(tree.elements);
this.popScope(scope);
},
visitClassExpression: function(tree) {
this.visitAny(tree.superClass);
var scope;
if (tree.name) {
scope = this.pushScope(tree);
this.visitAny(tree.name);
}
this.visitList(tree.elements);
if (tree.name) {
this.popScope(scope);
}
},
visitWithStatement: function(tree) {
this.visitAny(tree.expression);
this.withBlockCounter_++;
this.visitAny(tree.body);
this.withBlockCounter_--;
},
get inWithBlock() {
return this.withBlockCounter_ > 0;
},
visitLoop_: function(tree, func) {
if (tree.initializer.type !== VARIABLE_DECLARATION_LIST || tree.initializer.declarationType === VAR) {
func();
return;
}
var scope = this.pushScope(tree);
func();
this.popScope(scope);
},
visitForInStatement: function(tree) {
var $__74 = this;
this.visitLoop_(tree, (function() {
return $traceurRuntime.superCall($__74, $ScopeVisitor.prototype, "visitForInStatement", [tree]);
}));
},
visitForOfStatement: function(tree) {
var $__74 = this;
this.visitLoop_(tree, (function() {
return $traceurRuntime.superCall($__74, $ScopeVisitor.prototype, "visitForOfStatement", [tree]);
}));
},
visitForStatement: function(tree) {
var $__74 = this;
if (!tree.initializer) {
$traceurRuntime.superCall(this, $ScopeVisitor.prototype, "visitForStatement", [tree]);
} else {
this.visitLoop_(tree, (function() {
return $traceurRuntime.superCall($__74, $ScopeVisitor.prototype, "visitForStatement", [tree]);
}));
}
},
visitComprehension_: function(tree) {
var scopes = [];
for (var i = 0; i < tree.comprehensionList.length; i++) {
var scope = null;
if (tree.comprehensionList[i].type === COMPREHENSION_FOR) {
scope = this.pushScope(tree.comprehensionList[i]);
}
scopes.push(scope);
this.visitAny(tree.comprehensionList[i]);
}
this.visitAny(tree.expression);
for (var i = scopes.length - 1; i >= 0; i--) {
if (scopes[i]) {
this.popScope(scopes[i]);
}
}
},
visitArrayComprehension: function(tree) {
this.visitComprehension_(tree);
},
visitGeneratorComprehension: function(tree) {
this.visitComprehension_(tree);
}
}, {}, ParseTreeVisitor);
return {get ScopeVisitor() {
return ScopeVisitor;
}};
});
System.register("traceur@0.0.52/src/semantics/ScopeChainBuilder", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/ScopeChainBuilder";
var $__75 = System.get("traceur@0.0.52/src/syntax/TokenType"),
CONST = $__75.CONST,
LET = $__75.LET,
VAR = $__75.VAR;
var ScopeVisitor = System.get("traceur@0.0.52/src/semantics/ScopeVisitor").ScopeVisitor;
var ScopeChainBuilder = function ScopeChainBuilder(reporter) {
$traceurRuntime.superCall(this, $ScopeChainBuilder.prototype, "constructor", []);
this.reporter_ = reporter;
this.declarationType_ = null;
};
var $ScopeChainBuilder = ScopeChainBuilder;
($traceurRuntime.createClass)(ScopeChainBuilder, {
visitCatch: function(tree) {
var scope = this.pushScope(tree);
this.declarationType_ = LET;
this.visitAny(tree.binding);
this.visitList(tree.catchBody.statements);
this.popScope(scope);
},
visitImportedBinding: function(tree) {
this.declarationType_ = CONST;
$traceurRuntime.superCall(this, $ScopeChainBuilder.prototype, "visitImportedBinding", [tree]);
},
visitImportSpecifier: function(tree) {
this.declarationType_ = CONST;
if (tree.rhs) {
this.declareVariable(tree.rhs);
} else {
this.declareVariable(tree.lhs);
}
},
visitModuleDeclaration: function(tree) {
this.declarationType_ = CONST;
this.declareVariable(tree.identifier);
},
visitVariableDeclarationList: function(tree) {
this.declarationType_ = tree.declarationType;
$traceurRuntime.superCall(this, $ScopeChainBuilder.prototype, "visitVariableDeclarationList", [tree]);
},
visitBindingIdentifier: function(tree) {
this.declareVariable(tree);
},
visitFunctionExpression: function(tree) {
var scope = this.pushScope(tree);
if (tree.name) {
this.declarationType_ = CONST;
this.visitAny(tree.name);
}
this.visitAny(tree.parameterList);
this.visitAny(tree.body);
this.popScope(scope);
},
visitFormalParameter: function(tree) {
this.declarationType_ = VAR;
$traceurRuntime.superCall(this, $ScopeChainBuilder.prototype, "visitFormalParameter", [tree]);
},
visitFunctionDeclaration: function(tree) {
if (this.scope) {
if (this.scope.isVarScope) {
this.declarationType_ = VAR;
this.visitAny(tree.name);
} else {
if (!this.scope.strictMode) {
var varScope = this.scope.getVarScope();
if (varScope) {
varScope.addVar(tree.name, this.reporter_);
}
}
this.declarationType_ = LET;
this.visitAny(tree.name);
}
}
this.visitFunctionBodyForScope(tree, tree.parameterList, tree.body);
},
visitClassDeclaration: function(tree) {
this.visitAny(tree.superClass);
this.declarationType_ = LET;
this.visitAny(tree.name);
var scope = this.pushScope(tree);
this.declarationType_ = CONST;
this.visitAny(tree.name);
this.visitList(tree.elements);
this.popScope(scope);
},
visitClassExpression: function(tree) {
this.visitAny(tree.superClass);
var scope;
if (tree.name) {
scope = this.pushScope(tree);
this.declarationType_ = CONST;
this.visitAny(tree.name);
}
this.visitList(tree.elements);
if (tree.name) {
this.popScope(scope);
}
},
visitComprehensionFor: function(tree) {
this.declarationType_ = LET;
$traceurRuntime.superCall(this, $ScopeChainBuilder.prototype, "visitComprehensionFor", [tree]);
},
declareVariable: function(tree) {
this.scope.addBinding(tree, this.declarationType_, this.reporter_);
}
}, {}, ScopeVisitor);
return {get ScopeChainBuilder() {
return ScopeChainBuilder;
}};
});
System.register("traceur@0.0.52/src/semantics/ConstChecker", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/ConstChecker";
var IDENTIFIER_EXPRESSION = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType").IDENTIFIER_EXPRESSION;
var $__79 = System.get("traceur@0.0.52/src/syntax/TokenType"),
CONST = $__79.CONST,
MINUS_MINUS = $__79.MINUS_MINUS,
PLUS_PLUS = $__79.PLUS_PLUS;
var ScopeVisitor = System.get("traceur@0.0.52/src/semantics/ScopeVisitor").ScopeVisitor;
var ScopeChainBuilder = System.get("traceur@0.0.52/src/semantics/ScopeChainBuilder").ScopeChainBuilder;
var getVariableName = System.get("traceur@0.0.52/src/semantics/getVariableName").getVariableName;
var ConstChecker = function ConstChecker(scopeBuilder, reporter) {
$traceurRuntime.superCall(this, $ConstChecker.prototype, "constructor", []);
this.scopeBuilder_ = scopeBuilder;
this.reporter_ = reporter;
};
var $ConstChecker = ConstChecker;
($traceurRuntime.createClass)(ConstChecker, {
pushScope: function(tree) {
return this.scope = this.scopeBuilder_.getScopeForTree(tree);
},
visitUnaryExpression: function(tree) {
if (tree.operand.type === IDENTIFIER_EXPRESSION && (tree.operator.type === PLUS_PLUS || tree.operator.type === MINUS_MINUS)) {
this.validateMutation_(tree.operand);
}
$traceurRuntime.superCall(this, $ConstChecker.prototype, "visitUnaryExpression", [tree]);
},
visitPostfixExpression: function(tree) {
if (tree.operand.type === IDENTIFIER_EXPRESSION) {
this.validateMutation_(tree.operand);
}
$traceurRuntime.superCall(this, $ConstChecker.prototype, "visitPostfixExpression", [tree]);
},
visitBinaryExpression: function(tree) {
if (tree.left.type === IDENTIFIER_EXPRESSION && tree.operator.isAssignmentOperator()) {
this.validateMutation_(tree.left);
}
$traceurRuntime.superCall(this, $ConstChecker.prototype, "visitBinaryExpression", [tree]);
},
validateMutation_: function(identifierExpression) {
if (this.inWithBlock) {
return;
}
var binding = this.scope.getBinding(identifierExpression);
if (binding === null) {
return;
}
var $__84 = $traceurRuntime.assertObject(binding),
type = $__84.type,
tree = $__84.tree;
if (type === CONST) {
this.reportError_(identifierExpression.location, (getVariableName(tree) + " is read-only"));
}
},
reportError_: function(location, message) {
this.reporter_.reportError(location.start, message);
}
}, {}, ScopeVisitor);
function validate(tree, reporter) {
var builder = new ScopeChainBuilder(reporter);
builder.visitAny(tree);
var checker = new ConstChecker(builder, reporter);
checker.visitAny(tree);
}
return {
get ConstChecker() {
return ConstChecker;
},
get validate() {
return validate;
}
};
});
System.register("traceur@0.0.52/src/semantics/FreeVariableChecker", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/FreeVariableChecker";
var $__85 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
FUNCTION_DECLARATION = $__85.FUNCTION_DECLARATION,
FUNCTION_EXPRESSION = $__85.FUNCTION_EXPRESSION,
GET_ACCESSOR = $__85.GET_ACCESSOR,
IDENTIFIER_EXPRESSION = $__85.IDENTIFIER_EXPRESSION,
MODULE = $__85.MODULE,
PROPERTY_METHOD_ASSIGNMENT = $__85.PROPERTY_METHOD_ASSIGNMENT,
SET_ACCESSOR = $__85.SET_ACCESSOR;
var TYPEOF = System.get("traceur@0.0.52/src/syntax/TokenType").TYPEOF;
var ScopeVisitor = System.get("traceur@0.0.52/src/semantics/ScopeVisitor").ScopeVisitor;
var ScopeChainBuilder = System.get("traceur@0.0.52/src/semantics/ScopeChainBuilder").ScopeChainBuilder;
var getVariableName = System.get("traceur@0.0.52/src/semantics/getVariableName").getVariableName;
function hasArgumentsInScope(scope) {
for (; scope; scope = scope.parent) {
switch (scope.tree.type) {
case FUNCTION_DECLARATION:
case FUNCTION_EXPRESSION:
case GET_ACCESSOR:
case PROPERTY_METHOD_ASSIGNMENT:
case SET_ACCESSOR:
return true;
}
}
return false;
}
function inModuleScope(scope) {
for (; scope; scope = scope.parent) {
if (scope.tree.type === MODULE) {
return true;
}
}
return false;
}
var FreeVariableChecker = function FreeVariableChecker(scopeBuilder, reporter) {
var global = arguments[2] !== (void 0) ? arguments[2] : Object.create(null);
$traceurRuntime.superCall(this, $FreeVariableChecker.prototype, "constructor", []);
this.scopeBuilder_ = scopeBuilder;
this.reporter_ = reporter;
this.global_ = global;
};
var $FreeVariableChecker = FreeVariableChecker;
($traceurRuntime.createClass)(FreeVariableChecker, {
pushScope: function(tree) {
return this.scope = this.scopeBuilder_.getScopeForTree(tree);
},
visitUnaryExpression: function(tree) {
if (tree.operator.type === TYPEOF && tree.operand.type === IDENTIFIER_EXPRESSION) {
var scope = this.scope;
var binding = scope.getBinding(tree.operand);
if (!binding) {
scope.addVar(tree.operand, this.reporter_);
}
} else {
$traceurRuntime.superCall(this, $FreeVariableChecker.prototype, "visitUnaryExpression", [tree]);
}
},
visitIdentifierExpression: function(tree) {
if (this.inWithBlock) {
return;
}
var scope = this.scope;
var binding = scope.getBinding(tree);
if (binding) {
return;
}
var name = getVariableName(tree);
if (name === 'arguments' && hasArgumentsInScope(scope)) {
return;
}
if (name === '__moduleName' && inModuleScope(scope)) {
return;
}
if (!(name in this.global_)) {
this.reporter_.reportError(tree.location.start, (name + " is not defined"));
}
}
}, {}, ScopeVisitor);
function validate(tree, reporter) {
var global = arguments[2] !== (void 0) ? arguments[2] : Reflect.global;
var builder = new ScopeChainBuilder(reporter);
builder.visitAny(tree);
var checker = new FreeVariableChecker(builder, reporter, global);
checker.visitAny(tree);
}
return {get validate() {
return validate;
}};
});
System.register("traceur@0.0.52/src/util/assert", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/assert";
var options = System.get("traceur@0.0.52/src/Options").options;
function assert(b) {
if (!b && options.debug)
throw Error('Assertion failed');
}
return {get assert() {
return assert;
}};
});
System.register("traceur@0.0.52/src/syntax/LiteralToken", [], function() {
"use strict";
var $__95;
var __moduleName = "traceur@0.0.52/src/syntax/LiteralToken";
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var $__93 = System.get("traceur@0.0.52/src/syntax/TokenType"),
NULL = $__93.NULL,
NUMBER = $__93.NUMBER,
STRING = $__93.STRING;
var StringParser = function StringParser(value) {
this.value = value;
this.index = 0;
};
($traceurRuntime.createClass)(StringParser, ($__95 = {}, Object.defineProperty($__95, Symbol.iterator, {
value: function() {
return this;
},
configurable: true,
enumerable: true,
writable: true
}), Object.defineProperty($__95, "next", {
value: function() {
if (++this.index >= this.value.length - 1)
return {
value: undefined,
done: true
};
return {
value: this.value[this.index],
done: false
};
},
configurable: true,
enumerable: true,
writable: true
}), Object.defineProperty($__95, "parse", {
value: function() {
if (this.value.indexOf('\\') === -1)
return this.value.slice(1, -1);
var result = '';
for (var $__96 = this[Symbol.iterator](),
$__97; !($__97 = $__96.next()).done; ) {
var ch = $__97.value;
{
result += ch === '\\' ? this.parseEscapeSequence() : ch;
}
}
return result;
},
configurable: true,
enumerable: true,
writable: true
}), Object.defineProperty($__95, "parseEscapeSequence", {
value: function() {
var ch = this.next().value;
switch (ch) {
case '\n':
case '\r':
case '\u2028':
case '\u2029':
return '';
case '0':
return '\0';
case 'b':
return '\b';
case 'f':
return '\f';
case 'n':
return '\n';
case 'r':
return '\r';
case 't':
return '\t';
case 'v':
return '\v';
case 'x':
return String.fromCharCode(parseInt(this.next().value + this.next().value, 16));
case 'u':
return String.fromCharCode(parseInt(this.next().value + this.next().value + this.next().value + this.next().value, 16));
default:
if (Number(ch) < 8)
throw new Error('Octal literals are not supported');
return ch;
}
},
configurable: true,
enumerable: true,
writable: true
}), $__95), {});
var LiteralToken = function LiteralToken(type, value, location) {
this.type = type;
this.location = location;
this.value = value;
};
($traceurRuntime.createClass)(LiteralToken, {
toString: function() {
return this.value;
},
get processedValue() {
switch (this.type) {
case NULL:
return null;
case NUMBER:
var value = this.value;
if (value.charCodeAt(0) === 48) {
switch (value.charCodeAt(1)) {
case 66:
case 98:
return parseInt(this.value.slice(2), 2);
case 79:
case 111:
return parseInt(this.value.slice(2), 8);
}
}
return Number(this.value);
case STRING:
var parser = new StringParser(this.value);
return parser.parse();
default:
throw new Error('Not implemented');
}
}
}, {}, Token);
return {get LiteralToken() {
return LiteralToken;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ParseTreeFactory", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ParseTreeFactory";
var IdentifierToken = System.get("traceur@0.0.52/src/syntax/IdentifierToken").IdentifierToken;
var LiteralToken = System.get("traceur@0.0.52/src/syntax/LiteralToken").LiteralToken;
var $__100 = System.get("traceur@0.0.52/src/syntax/trees/ParseTree"),
ParseTree = $__100.ParseTree,
ParseTreeType = $__100.ParseTreeType;
var $__101 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
CALL = $__101.CALL,
CREATE = $__101.CREATE,
DEFINE_PROPERTY = $__101.DEFINE_PROPERTY,
FREEZE = $__101.FREEZE,
OBJECT = $__101.OBJECT,
UNDEFINED = $__101.UNDEFINED;
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var $__103 = System.get("traceur@0.0.52/src/syntax/TokenType"),
EQUAL = $__103.EQUAL,
FALSE = $__103.FALSE,
NULL = $__103.NULL,
NUMBER = $__103.NUMBER,
STRING = $__103.STRING,
TRUE = $__103.TRUE,
VOID = $__103.VOID;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var $__105 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
ArgumentList = $__105.ArgumentList,
ArrayLiteralExpression = $__105.ArrayLiteralExpression,
BinaryExpression = $__105.BinaryExpression,
BindingIdentifier = $__105.BindingIdentifier,
Block = $__105.Block,
BreakStatement = $__105.BreakStatement,
CallExpression = $__105.CallExpression,
CaseClause = $__105.CaseClause,
Catch = $__105.Catch,
ClassDeclaration = $__105.ClassDeclaration,
CommaExpression = $__105.CommaExpression,
ConditionalExpression = $__105.ConditionalExpression,
ContinueStatement = $__105.ContinueStatement,
DefaultClause = $__105.DefaultClause,
DoWhileStatement = $__105.DoWhileStatement,
EmptyStatement = $__105.EmptyStatement,
ExpressionStatement = $__105.ExpressionStatement,
Finally = $__105.Finally,
ForInStatement = $__105.ForInStatement,
ForOfStatement = $__105.ForOfStatement,
ForStatement = $__105.ForStatement,
FormalParameterList = $__105.FormalParameterList,
FunctionBody = $__105.FunctionBody,
FunctionExpression = $__105.FunctionExpression,
IdentifierExpression = $__105.IdentifierExpression,
IfStatement = $__105.IfStatement,
LiteralExpression = $__105.LiteralExpression,
LiteralPropertyName = $__105.LiteralPropertyName,
MemberExpression = $__105.MemberExpression,
MemberLookupExpression = $__105.MemberLookupExpression,
NewExpression = $__105.NewExpression,
ObjectLiteralExpression = $__105.ObjectLiteralExpression,
ParenExpression = $__105.ParenExpression,
PostfixExpression = $__105.PostfixExpression,
Script = $__105.Script,
PropertyNameAssignment = $__105.PropertyNameAssignment,
RestParameter = $__105.RestParameter,
ReturnStatement = $__105.ReturnStatement,
SpreadExpression = $__105.SpreadExpression,
SwitchStatement = $__105.SwitchStatement,
ThisExpression = $__105.ThisExpression,
ThrowStatement = $__105.ThrowStatement,
TryStatement = $__105.TryStatement,
UnaryExpression = $__105.UnaryExpression,
VariableDeclaration = $__105.VariableDeclaration,
VariableDeclarationList = $__105.VariableDeclarationList,
VariableStatement = $__105.VariableStatement,
WhileStatement = $__105.WhileStatement,
WithStatement = $__105.WithStatement,
YieldExpression = $__105.YieldExpression;
var slice = Array.prototype.slice.call.bind(Array.prototype.slice);
var map = Array.prototype.map.call.bind(Array.prototype.map);
function createOperatorToken(operator) {
return new Token(operator, null);
}
function createIdentifierToken(identifier) {
return new IdentifierToken(null, identifier);
}
function createStringLiteralToken(value) {
return new LiteralToken(STRING, JSON.stringify(value), null);
}
function createBooleanLiteralToken(value) {
return new Token(value ? TRUE : FALSE, null);
}
function createNullLiteralToken() {
return new LiteralToken(NULL, 'null', null);
}
function createNumberLiteralToken(value) {
return new LiteralToken(NUMBER, String(value), null);
}
function createEmptyParameterList() {
return new FormalParameterList(null, []);
}
function createArgumentList(list) {
return new ArgumentList(null, list);
}
function createEmptyArgumentList() {
return createArgumentList([]);
}
function createArrayLiteralExpression(list) {
return new ArrayLiteralExpression(null, list);
}
function createEmptyArrayLiteralExpression() {
return createArrayLiteralExpression([]);
}
function createAssignmentExpression(lhs, rhs) {
return new BinaryExpression(null, lhs, createOperatorToken(EQUAL), rhs);
}
function createBinaryExpression(left, operator, right) {
return new BinaryExpression(null, left, operator, right);
}
function createBindingIdentifier(identifier) {
if (typeof identifier === 'string')
identifier = createIdentifierToken(identifier);
else if (identifier.type === ParseTreeType.BINDING_IDENTIFIER)
return identifier;
else if (identifier.type === ParseTreeType.IDENTIFIER_EXPRESSION)
return new BindingIdentifier(identifier.location, identifier.identifierToken);
return new BindingIdentifier(null, identifier);
}
function createEmptyStatement() {
return new EmptyStatement(null);
}
function createEmptyBlock() {
return createBlock([]);
}
function createBlock(statements) {
return new Block(null, statements);
}
function createFunctionBody(statements) {
return new FunctionBody(null, statements);
}
function createScopedExpression(body, scope) {
assert(body.type === 'FUNCTION_BODY');
return createCallCall(createParenExpression(createFunctionExpression(createEmptyParameterList(), body)), scope);
}
function createImmediatelyInvokedFunctionExpression(body) {
assert(body.type === 'FUNCTION_BODY');
return createCallExpression(createParenExpression(createFunctionExpression(createEmptyParameterList(), body)));
}
function createCallExpression(operand) {
var args = arguments[1] !== (void 0) ? arguments[1] : createEmptyArgumentList();
return new CallExpression(null, operand, args);
}
function createBreakStatement() {
var name = arguments[0] !== (void 0) ? arguments[0] : null;
return new BreakStatement(null, name);
}
function createCallCall(func, thisExpression) {
return createCallExpression(createMemberExpression(func, CALL), createArgumentList([thisExpression]));
}
function createCaseClause(expression, statements) {
return new CaseClause(null, expression, statements);
}
function createCatch(identifier, catchBody) {
identifier = createBindingIdentifier(identifier);
return new Catch(null, identifier, catchBody);
}
function createClassDeclaration(name, superClass, elements) {
return new ClassDeclaration(null, name, superClass, elements, []);
}
function createCommaExpression(expressions) {
return new CommaExpression(null, expressions);
}
function createConditionalExpression(condition, left, right) {
return new ConditionalExpression(null, condition, left, right);
}
function createContinueStatement() {
var name = arguments[0] !== (void 0) ? arguments[0] : null;
return new ContinueStatement(null, name);
}
function createDefaultClause(statements) {
return new DefaultClause(null, statements);
}
function createDoWhileStatement(body, condition) {
return new DoWhileStatement(null, body, condition);
}
function createAssignmentStatement(lhs, rhs) {
return createExpressionStatement(createAssignmentExpression(lhs, rhs));
}
function createCallStatement(operand) {
var args = arguments[1];
return createExpressionStatement(createCallExpression(operand, args));
}
function createExpressionStatement(expression) {
return new ExpressionStatement(null, expression);
}
function createFinally(block) {
return new Finally(null, block);
}
function createForOfStatement(initializer, collection, body) {
return new ForOfStatement(null, initializer, collection, body);
}
function createForInStatement(initializer, collection, body) {
return new ForInStatement(null, initializer, collection, body);
}
function createForStatement(variables, condition, increment, body) {
return new ForStatement(null, variables, condition, increment, body);
}
function createFunctionExpression(parameterList, body) {
assert(body.type === 'FUNCTION_BODY');
return new FunctionExpression(null, null, false, parameterList, null, [], body);
}
function createIdentifierExpression(identifier) {
if (typeof identifier == 'string')
identifier = createIdentifierToken(identifier);
else if (identifier instanceof BindingIdentifier)
identifier = identifier.identifierToken;
return new IdentifierExpression(null, identifier);
}
function createUndefinedExpression() {
return createIdentifierExpression(UNDEFINED);
}
function createIfStatement(condition, ifClause) {
var elseClause = arguments[2] !== (void 0) ? arguments[2] : null;
return new IfStatement(null, condition, ifClause, elseClause);
}
function createStringLiteral(value) {
return new LiteralExpression(null, createStringLiteralToken(value));
}
function createBooleanLiteral(value) {
return new LiteralExpression(null, createBooleanLiteralToken(value));
}
function createTrueLiteral() {
return createBooleanLiteral(true);
}
function createFalseLiteral() {
return createBooleanLiteral(false);
}
function createNullLiteral() {
return new LiteralExpression(null, createNullLiteralToken());
}
function createNumberLiteral(value) {
return new LiteralExpression(null, createNumberLiteralToken(value));
}
function createMemberExpression(operand, memberName, memberNames) {
if (typeof operand == 'string' || operand instanceof IdentifierToken)
operand = createIdentifierExpression(operand);
if (typeof memberName == 'string')
memberName = createIdentifierToken(memberName);
if (memberName instanceof LiteralToken)
memberName = new LiteralExpression(null, memberName);
var tree = memberName instanceof LiteralExpression ? new MemberLookupExpression(null, operand, memberName) : new MemberExpression(null, operand, memberName);
for (var i = 2; i < arguments.length; i++) {
tree = createMemberExpression(tree, arguments[i]);
}
return tree;
}
function createMemberLookupExpression(operand, memberExpression) {
return new MemberLookupExpression(null, operand, memberExpression);
}
function createThisExpression() {
return new ThisExpression(null);
}
function createNewExpression(operand, args) {
return new NewExpression(null, operand, args);
}
function createObjectFreeze(value) {
return createCallExpression(createMemberExpression(OBJECT, FREEZE), createArgumentList([value]));
}
function createObjectCreate(protoExpression, descriptors) {
var argumentList = [protoExpression];
if (descriptors)
argumentList.push(descriptors);
return createCallExpression(createMemberExpression(OBJECT, CREATE), createArgumentList(argumentList));
}
function createPropertyDescriptor(descr) {
var propertyNameAndValues = Object.keys(descr).map(function(name) {
var value = descr[name];
if (!(value instanceof ParseTree))
value = createBooleanLiteral(!!value);
return createPropertyNameAssignment(name, value);
});
return createObjectLiteralExpression(propertyNameAndValues);
}
function createDefineProperty(tree, name, descr) {
if (typeof name === 'string')
name = createStringLiteral(name);
return createCallExpression(createMemberExpression(OBJECT, DEFINE_PROPERTY), createArgumentList([tree, name, createPropertyDescriptor(descr)]));
}
function createObjectLiteralExpression(propertyNameAndValues) {
return new ObjectLiteralExpression(null, propertyNameAndValues);
}
function createParenExpression(expression) {
return new ParenExpression(null, expression);
}
function createPostfixExpression(operand, operator) {
return new PostfixExpression(null, operand, operator);
}
function createScript(scriptItemList) {
return new Script(null, scriptItemList);
}
function createPropertyNameAssignment(identifier, value) {
if (typeof identifier == 'string')
identifier = createLiteralPropertyName(identifier);
return new PropertyNameAssignment(null, identifier, value);
}
function createLiteralPropertyName(name) {
return new LiteralPropertyName(null, createIdentifierToken(name));
}
function createRestParameter(identifier) {
return new RestParameter(null, createBindingIdentifier(identifier));
}
function createReturnStatement(expression) {
return new ReturnStatement(null, expression);
}
function createYieldStatement(expression, isYieldFor) {
return createExpressionStatement(new YieldExpression(null, expression, isYieldFor));
}
function createSpreadExpression(expression) {
return new SpreadExpression(null, expression);
}
function createSwitchStatement(expression, caseClauses) {
return new SwitchStatement(null, expression, caseClauses);
}
function createThrowStatement(value) {
return new ThrowStatement(null, value);
}
function createTryStatement(body, catchBlock) {
var finallyBlock = arguments[2] !== (void 0) ? arguments[2] : null;
return new TryStatement(null, body, catchBlock, finallyBlock);
}
function createUnaryExpression(operator, operand) {
return new UnaryExpression(null, operator, operand);
}
function createUseStrictDirective() {
return createExpressionStatement(createStringLiteral('use strict'));
}
function createVariableDeclarationList(binding, identifierOrDeclarations, initializer) {
if (identifierOrDeclarations instanceof Array) {
var declarations = identifierOrDeclarations;
return new VariableDeclarationList(null, binding, declarations);
}
var identifier = identifierOrDeclarations;
return createVariableDeclarationList(binding, [createVariableDeclaration(identifier, initializer)]);
}
function createVariableDeclaration(identifier, initializer) {
if (!(identifier instanceof ParseTree) || identifier.type !== ParseTreeType.BINDING_IDENTIFIER && identifier.type !== ParseTreeType.OBJECT_PATTERN && identifier.type !== ParseTreeType.ARRAY_PATTERN) {
identifier = createBindingIdentifier(identifier);
}
return new VariableDeclaration(null, identifier, null, initializer);
}
function createVariableStatement(listOrBinding, identifier, initializer) {
if (listOrBinding instanceof VariableDeclarationList)
return new VariableStatement(null, listOrBinding);
var binding = listOrBinding;
var list = createVariableDeclarationList(binding, identifier, initializer);
return createVariableStatement(list);
}
function createVoid0() {
return createParenExpression(createUnaryExpression(createOperatorToken(VOID), createNumberLiteral(0)));
}
function createWhileStatement(condition, body) {
return new WhileStatement(null, condition, body);
}
function createWithStatement(expression, body) {
return new WithStatement(null, expression, body);
}
function createAssignStateStatement(state) {
return createAssignmentStatement(createMemberExpression('$ctx', 'state'), createNumberLiteral(state));
}
return {
get createOperatorToken() {
return createOperatorToken;
},
get createIdentifierToken() {
return createIdentifierToken;
},
get createStringLiteralToken() {
return createStringLiteralToken;
},
get createBooleanLiteralToken() {
return createBooleanLiteralToken;
},
get createNullLiteralToken() {
return createNullLiteralToken;
},
get createNumberLiteralToken() {
return createNumberLiteralToken;
},
get createEmptyParameterList() {
return createEmptyParameterList;
},
get createArgumentList() {
return createArgumentList;
},
get createEmptyArgumentList() {
return createEmptyArgumentList;
},
get createArrayLiteralExpression() {
return createArrayLiteralExpression;
},
get createEmptyArrayLiteralExpression() {
return createEmptyArrayLiteralExpression;
},
get createAssignmentExpression() {
return createAssignmentExpression;
},
get createBinaryExpression() {
return createBinaryExpression;
},
get createBindingIdentifier() {
return createBindingIdentifier;
},
get createEmptyStatement() {
return createEmptyStatement;
},
get createEmptyBlock() {
return createEmptyBlock;
},
get createBlock() {
return createBlock;
},
get createFunctionBody() {
return createFunctionBody;
},
get createScopedExpression() {
return createScopedExpression;
},
get createImmediatelyInvokedFunctionExpression() {
return createImmediatelyInvokedFunctionExpression;
},
get createCallExpression() {
return createCallExpression;
},
get createBreakStatement() {
return createBreakStatement;
},
get createCaseClause() {
return createCaseClause;
},
get createCatch() {
return createCatch;
},
get createClassDeclaration() {
return createClassDeclaration;
},
get createCommaExpression() {
return createCommaExpression;
},
get createConditionalExpression() {
return createConditionalExpression;
},
get createContinueStatement() {
return createContinueStatement;
},
get createDefaultClause() {
return createDefaultClause;
},
get createDoWhileStatement() {
return createDoWhileStatement;
},
get createAssignmentStatement() {
return createAssignmentStatement;
},
get createCallStatement() {
return createCallStatement;
},
get createExpressionStatement() {
return createExpressionStatement;
},
get createFinally() {
return createFinally;
},
get createForOfStatement() {
return createForOfStatement;
},
get createForInStatement() {
return createForInStatement;
},
get createForStatement() {
return createForStatement;
},
get createFunctionExpression() {
return createFunctionExpression;
},
get createIdentifierExpression() {
return createIdentifierExpression;
},
get createUndefinedExpression() {
return createUndefinedExpression;
},
get createIfStatement() {
return createIfStatement;
},
get createStringLiteral() {
return createStringLiteral;
},
get createBooleanLiteral() {
return createBooleanLiteral;
},
get createTrueLiteral() {
return createTrueLiteral;
},
get createFalseLiteral() {
return createFalseLiteral;
},
get createNullLiteral() {
return createNullLiteral;
},
get createNumberLiteral() {
return createNumberLiteral;
},
get createMemberExpression() {
return createMemberExpression;
},
get createMemberLookupExpression() {
return createMemberLookupExpression;
},
get createThisExpression() {
return createThisExpression;
},
get createNewExpression() {
return createNewExpression;
},
get createObjectFreeze() {
return createObjectFreeze;
},
get createObjectCreate() {
return createObjectCreate;
},
get createPropertyDescriptor() {
return createPropertyDescriptor;
},
get createDefineProperty() {
return createDefineProperty;
},
get createObjectLiteralExpression() {
return createObjectLiteralExpression;
},
get createParenExpression() {
return createParenExpression;
},
get createPostfixExpression() {
return createPostfixExpression;
},
get createScript() {
return createScript;
},
get createPropertyNameAssignment() {
return createPropertyNameAssignment;
},
get createReturnStatement() {
return createReturnStatement;
},
get createYieldStatement() {
return createYieldStatement;
},
get createSwitchStatement() {
return createSwitchStatement;
},
get createThrowStatement() {
return createThrowStatement;
},
get createTryStatement() {
return createTryStatement;
},
get createUnaryExpression() {
return createUnaryExpression;
},
get createUseStrictDirective() {
return createUseStrictDirective;
},
get createVariableDeclarationList() {
return createVariableDeclarationList;
},
get createVariableDeclaration() {
return createVariableDeclaration;
},
get createVariableStatement() {
return createVariableStatement;
},
get createVoid0() {
return createVoid0;
},
get createWhileStatement() {
return createWhileStatement;
},
get createWithStatement() {
return createWithStatement;
},
get createAssignStateStatement() {
return createAssignStateStatement;
}
};
});
System.register("traceur@0.0.52/src/codegeneration/FindVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/FindVisitor";
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var FindVisitor = function FindVisitor(tree) {
var keepOnGoing = arguments[1];
this.found_ = false;
this.shouldContinue_ = true;
this.keepOnGoing_ = keepOnGoing;
this.visitAny(tree);
};
($traceurRuntime.createClass)(FindVisitor, {
get found() {
return this.found_;
},
set found(v) {
if (v) {
this.found_ = true;
if (!this.keepOnGoing_)
this.shouldContinue_ = false;
}
},
visitAny: function(tree) {
this.shouldContinue_ && tree && tree.visit(this);
},
visitList: function(list) {
if (list) {
for (var i = 0; this.shouldContinue_ && i < list.length; i++) {
this.visitAny(list[i]);
}
}
}
}, {}, ParseTreeVisitor);
return {get FindVisitor() {
return FindVisitor;
}};
});
System.register("traceur@0.0.52/src/syntax/Keywords", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/Keywords";
var keywords = ['break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'export', 'finally', 'for', 'function', 'if', 'import', 'in', 'instanceof', 'let', 'new', 'return', 'super', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'enum', 'extends', 'null', 'true', 'false'];
var strictKeywords = ['implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
var keywordsByName = Object.create(null);
var NORMAL_KEYWORD = 1;
var STRICT_KEYWORD = 2;
keywords.forEach((function(value) {
keywordsByName[value] = NORMAL_KEYWORD;
}));
strictKeywords.forEach((function(value) {
keywordsByName[value] = STRICT_KEYWORD;
}));
function getKeywordType(value) {
return keywordsByName[value];
}
function isStrictKeyword(value) {
return getKeywordType(value) === STRICT_KEYWORD;
}
return {
get NORMAL_KEYWORD() {
return NORMAL_KEYWORD;
},
get STRICT_KEYWORD() {
return STRICT_KEYWORD;
},
get getKeywordType() {
return getKeywordType;
},
get isStrictKeyword() {
return isStrictKeyword;
}
};
});
System.register("traceur@0.0.52/src/staticsemantics/StrictParams", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/staticsemantics/StrictParams";
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var isStrictKeyword = System.get("traceur@0.0.52/src/syntax/Keywords").isStrictKeyword;
var StrictParams = function StrictParams(errorReporter) {
$traceurRuntime.superCall(this, $StrictParams.prototype, "constructor", []);
this.errorReporter = errorReporter;
};
var $StrictParams = StrictParams;
($traceurRuntime.createClass)(StrictParams, {visitBindingIdentifier: function(tree) {
var name = tree.identifierToken.toString();
if (isStrictKeyword(name)) {
this.errorReporter.reportError(tree.location.start, (name + " is a reserved identifier"));
}
}}, {visit: function(tree, errorReporter) {
new $StrictParams(errorReporter).visitAny(tree);
}}, ParseTreeVisitor);
return {get StrictParams() {
return StrictParams;
}};
});
System.register("traceur@0.0.52/src/util/SourceRange", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/SourceRange";
var SourceRange = function SourceRange(start, end) {
this.start = start;
this.end = end;
};
($traceurRuntime.createClass)(SourceRange, {toString: function() {
var str = this.start.source.contents;
return str.slice(this.start.offset, this.end.offset);
}}, {});
return {get SourceRange() {
return SourceRange;
}};
});
System.register("traceur@0.0.52/src/util/ErrorReporter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/ErrorReporter";
var ErrorReporter = function ErrorReporter() {
this.hadError_ = false;
};
($traceurRuntime.createClass)(ErrorReporter, {
reportError: function(location, message) {
this.hadError_ = true;
this.reportMessageInternal(location, message);
},
reportMessageInternal: function(location, message) {
if (location)
message = (location + ": " + message);
console.error(message);
},
hadError: function() {
return this.hadError_;
},
clearError: function() {
this.hadError_ = false;
}
}, {});
function format(location, text) {
var args = arguments[2];
var i = 0;
text = text.replace(/%./g, function(s) {
switch (s) {
case '%s':
return args && args[i++];
case '%%':
return '%';
}
return s;
});
if (location)
text = (location + ": " + text);
return text;
}
;
ErrorReporter.format = format;
return {
get ErrorReporter() {
return ErrorReporter;
},
get format() {
return format;
}
};
});
System.register("traceur@0.0.52/src/util/SyntaxErrorReporter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/SyntaxErrorReporter";
var $__113 = System.get("traceur@0.0.52/src/util/ErrorReporter"),
ErrorReporter = $__113.ErrorReporter,
format = $__113.format;
var SyntaxErrorReporter = function SyntaxErrorReporter() {
$traceurRuntime.defaultSuperCall(this, $SyntaxErrorReporter.prototype, arguments);
};
var $SyntaxErrorReporter = SyntaxErrorReporter;
($traceurRuntime.createClass)(SyntaxErrorReporter, {reportMessageInternal: function(location, message) {
var s = format(location, message);
throw new SyntaxError(s);
}}, {}, ErrorReporter);
return {get SyntaxErrorReporter() {
return SyntaxErrorReporter;
}};
});
System.register("traceur@0.0.52/src/syntax/KeywordToken", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/KeywordToken";
var STRICT_KEYWORD = System.get("traceur@0.0.52/src/syntax/Keywords").STRICT_KEYWORD;
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var KeywordToken = function KeywordToken(type, keywordType, location) {
this.type = type;
this.location = location;
this.isStrictKeyword_ = keywordType === STRICT_KEYWORD;
};
($traceurRuntime.createClass)(KeywordToken, {
isKeyword: function() {
return true;
},
isStrictKeyword: function() {
return this.isStrictKeyword_;
}
}, {}, Token);
return {get KeywordToken() {
return KeywordToken;
}};
});
System.register("traceur@0.0.52/src/syntax/unicode-tables", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/unicode-tables";
var idStartTable = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 442, 443, 443, 444, 447, 448, 451, 452, 659, 660, 660, 661, 687, 688, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 883, 884, 884, 886, 887, 890, 890, 891, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1599, 1600, 1600, 1601, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2417, 2418, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3653, 3654, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4348, 4349, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6210, 6211, 6211, 6212, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7287, 7288, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7467, 7468, 7530, 7531, 7543, 7544, 7544, 7545, 7578, 7579, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8472, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8494, 8494, 8495, 8500, 8501, 8504, 8505, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8578, 8579, 8580, 8581, 8584, 11264, 11310, 11312, 11358, 11360, 11387, 11388, 11389, 11390, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12293, 12294, 12294, 12295, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12347, 12347, 12348, 12348, 12353, 12438, 12443, 12444, 12445, 12446, 12447, 12447, 12449, 12538, 12540, 12542, 12543, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 40980, 40981, 40981, 40982, 42124, 42192, 42231, 42232, 42237, 42240, 42507, 42508, 42508, 42512, 42527, 42538, 42539, 42560, 42605, 42606, 42606, 42623, 42623, 42624, 42647, 42656, 42725, 42726, 42735, 42775, 42783, 42786, 42863, 42864, 42864, 42865, 42887, 42888, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43001, 43002, 43002, 43003, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43631, 43632, 43632, 43633, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43740, 43741, 43741, 43744, 43754, 43762, 43762, 43763, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65391, 65392, 65392, 65393, 65437, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334, 66352, 66368, 66369, 66369, 66370, 66377, 66378, 66378, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66639, 66640, 66717, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405, 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687, 69763, 69807, 69840, 69864, 69891, 69926, 70019, 70066, 70081, 70084, 71296, 71338, 73728, 74606, 74752, 74850, 77824, 78894, 92160, 92728, 93952, 94020, 94032, 94032, 94099, 94111, 110592, 110593, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 194560, 195101];
var idContinueTable = [183, 183, 768, 879, 903, 903, 1155, 1159, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1552, 1562, 1611, 1631, 1632, 1641, 1648, 1648, 1750, 1756, 1759, 1764, 1767, 1768, 1770, 1773, 1776, 1785, 1809, 1809, 1840, 1866, 1958, 1968, 1984, 1993, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2276, 2302, 2304, 2306, 2307, 2307, 2362, 2362, 2363, 2363, 2364, 2364, 2366, 2368, 2369, 2376, 2377, 2380, 2381, 2381, 2382, 2383, 2385, 2391, 2402, 2403, 2406, 2415, 2433, 2433, 2434, 2435, 2492, 2492, 2494, 2496, 2497, 2500, 2503, 2504, 2507, 2508, 2509, 2509, 2519, 2519, 2530, 2531, 2534, 2543, 2561, 2562, 2563, 2563, 2620, 2620, 2622, 2624, 2625, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2662, 2671, 2672, 2673, 2677, 2677, 2689, 2690, 2691, 2691, 2748, 2748, 2750, 2752, 2753, 2757, 2759, 2760, 2761, 2761, 2763, 2764, 2765, 2765, 2786, 2787, 2790, 2799, 2817, 2817, 2818, 2819, 2876, 2876, 2878, 2878, 2879, 2879, 2880, 2880, 2881, 2884, 2887, 2888, 2891, 2892, 2893, 2893, 2902, 2902, 2903, 2903, 2914, 2915, 2918, 2927, 2946, 2946, 3006, 3007, 3008, 3008, 3009, 3010, 3014, 3016, 3018, 3020, 3021, 3021, 3031, 3031, 3046, 3055, 3073, 3075, 3134, 3136, 3137, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3174, 3183, 3202, 3203, 3260, 3260, 3262, 3262, 3263, 3263, 3264, 3268, 3270, 3270, 3271, 3272, 3274, 3275, 3276, 3277, 3285, 3286, 3298, 3299, 3302, 3311, 3330, 3331, 3390, 3392, 3393, 3396, 3398, 3400, 3402, 3404, 3405, 3405, 3415, 3415, 3426, 3427, 3430, 3439, 3458, 3459, 3530, 3530, 3535, 3537, 3538, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3633, 3633, 3636, 3642, 3655, 3662, 3664, 3673, 3761, 3761, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3903, 3953, 3966, 3967, 3967, 3968, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4038, 4038, 4139, 4140, 4141, 4144, 4145, 4145, 4146, 4151, 4152, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4160, 4169, 4182, 4183, 4184, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4226, 4227, 4228, 4229, 4230, 4231, 4236, 4237, 4237, 4239, 4239, 4240, 4249, 4250, 4252, 4253, 4253, 4957, 4959, 4969, 4977, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6069, 6070, 6070, 6071, 6077, 6078, 6085, 6086, 6086, 6087, 6088, 6089, 6099, 6109, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6313, 6313, 6432, 6434, 6435, 6438, 6439, 6440, 6441, 6443, 6448, 6449, 6450, 6450, 6451, 6456, 6457, 6459, 6470, 6479, 6576, 6592, 6600, 6601, 6608, 6617, 6618, 6618, 6679, 6680, 6681, 6683, 6741, 6741, 6742, 6742, 6743, 6743, 6744, 6750, 6752, 6752, 6753, 6753, 6754, 6754, 6755, 6756, 6757, 6764, 6765, 6770, 6771, 6780, 6783, 6783, 6784, 6793, 6800, 6809, 6912, 6915, 6916, 6916, 6964, 6964, 6965, 6965, 6966, 6970, 6971, 6971, 6972, 6972, 6973, 6977, 6978, 6978, 6979, 6980, 6992, 7001, 7019, 7027, 7040, 7041, 7042, 7042, 7073, 7073, 7074, 7077, 7078, 7079, 7080, 7081, 7082, 7082, 7083, 7083, 7084, 7085, 7088, 7097, 7142, 7142, 7143, 7143, 7144, 7145, 7146, 7148, 7149, 7149, 7150, 7150, 7151, 7153, 7154, 7155, 7204, 7211, 7212, 7219, 7220, 7221, 7222, 7223, 7232, 7241, 7248, 7257, 7376, 7378, 7380, 7392, 7393, 7393, 7394, 7400, 7405, 7405, 7410, 7411, 7412, 7412, 7616, 7654, 7676, 7679, 8255, 8256, 8276, 8276, 8400, 8412, 8417, 8417, 8421, 8432, 11503, 11505, 11647, 11647, 11744, 11775, 12330, 12333, 12334, 12335, 12441, 12442, 42528, 42537, 42607, 42607, 42612, 42621, 42655, 42655, 42736, 42737, 43010, 43010, 43014, 43014, 43019, 43019, 43043, 43044, 43045, 43046, 43047, 43047, 43136, 43137, 43188, 43203, 43204, 43204, 43216, 43225, 43232, 43249, 43264, 43273, 43302, 43309, 43335, 43345, 43346, 43347, 43392, 43394, 43395, 43395, 43443, 43443, 43444, 43445, 43446, 43449, 43450, 43451, 43452, 43452, 43453, 43456, 43472, 43481, 43561, 43566, 43567, 43568, 43569, 43570, 43571, 43572, 43573, 43574, 43587, 43587, 43596, 43596, 43597, 43597, 43600, 43609, 43643, 43643, 43696, 43696, 43698, 43700, 43703, 43704, 43710, 43711, 43713, 43713, 43755, 43755, 43756, 43757, 43758, 43759, 43765, 43765, 43766, 43766, 44003, 44004, 44005, 44005, 44006, 44007, 44008, 44008, 44009, 44010, 44012, 44012, 44013, 44013, 44016, 44025, 64286, 64286, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65296, 65305, 65343, 65343, 66045, 66045, 66720, 66729, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68159, 68159, 69632, 69632, 69633, 69633, 69634, 69634, 69688, 69702, 69734, 69743, 69760, 69761, 69762, 69762, 69808, 69810, 69811, 69814, 69815, 69816, 69817, 69818, 69872, 69881, 69888, 69890, 69927, 69931, 69932, 69932, 69933, 69940, 69942, 69951, 70016, 70017, 70018, 70018, 70067, 70069, 70070, 70078, 70079, 70080, 70096, 70105, 71339, 71339, 71340, 71340, 71341, 71341, 71342, 71343, 71344, 71349, 71350, 71350, 71351, 71351, 71360, 71369, 94033, 94078, 94095, 94098, 119141, 119142, 119143, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 120782, 120831, 917760, 917999];
return {
get idStartTable() {
return idStartTable;
},
get idContinueTable() {
return idContinueTable;
}
};
});
System.register("traceur@0.0.52/src/syntax/Scanner", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/Scanner";
var IdentifierToken = System.get("traceur@0.0.52/src/syntax/IdentifierToken").IdentifierToken;
var KeywordToken = System.get("traceur@0.0.52/src/syntax/KeywordToken").KeywordToken;
var LiteralToken = System.get("traceur@0.0.52/src/syntax/LiteralToken").LiteralToken;
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var getKeywordType = System.get("traceur@0.0.52/src/syntax/Keywords").getKeywordType;
var $__123 = System.get("traceur@0.0.52/src/syntax/unicode-tables"),
idContinueTable = $__123.idContinueTable,
idStartTable = $__123.idStartTable;
var $__124 = System.get("traceur@0.0.52/src/Options"),
options = $__124.options,
parseOptions = $__124.parseOptions;
var $__125 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AMPERSAND = $__125.AMPERSAND,
AMPERSAND_EQUAL = $__125.AMPERSAND_EQUAL,
AND = $__125.AND,
ARROW = $__125.ARROW,
AT = $__125.AT,
BANG = $__125.BANG,
BAR = $__125.BAR,
BAR_EQUAL = $__125.BAR_EQUAL,
CARET = $__125.CARET,
CARET_EQUAL = $__125.CARET_EQUAL,
CLOSE_ANGLE = $__125.CLOSE_ANGLE,
CLOSE_CURLY = $__125.CLOSE_CURLY,
CLOSE_PAREN = $__125.CLOSE_PAREN,
CLOSE_SQUARE = $__125.CLOSE_SQUARE,
COLON = $__125.COLON,
COMMA = $__125.COMMA,
DOT_DOT_DOT = $__125.DOT_DOT_DOT,
END_OF_FILE = $__125.END_OF_FILE,
EQUAL = $__125.EQUAL,
EQUAL_EQUAL = $__125.EQUAL_EQUAL,
EQUAL_EQUAL_EQUAL = $__125.EQUAL_EQUAL_EQUAL,
ERROR = $__125.ERROR,
GREATER_EQUAL = $__125.GREATER_EQUAL,
LEFT_SHIFT = $__125.LEFT_SHIFT,
LEFT_SHIFT_EQUAL = $__125.LEFT_SHIFT_EQUAL,
LESS_EQUAL = $__125.LESS_EQUAL,
MINUS = $__125.MINUS,
MINUS_EQUAL = $__125.MINUS_EQUAL,
MINUS_MINUS = $__125.MINUS_MINUS,
NO_SUBSTITUTION_TEMPLATE = $__125.NO_SUBSTITUTION_TEMPLATE,
NOT_EQUAL = $__125.NOT_EQUAL,
NOT_EQUAL_EQUAL = $__125.NOT_EQUAL_EQUAL,
NUMBER = $__125.NUMBER,
OPEN_ANGLE = $__125.OPEN_ANGLE,
OPEN_CURLY = $__125.OPEN_CURLY,
OPEN_PAREN = $__125.OPEN_PAREN,
OPEN_SQUARE = $__125.OPEN_SQUARE,
OR = $__125.OR,
PERCENT = $__125.PERCENT,
PERCENT_EQUAL = $__125.PERCENT_EQUAL,
PERIOD = $__125.PERIOD,
PLUS = $__125.PLUS,
PLUS_EQUAL = $__125.PLUS_EQUAL,
PLUS_PLUS = $__125.PLUS_PLUS,
QUESTION = $__125.QUESTION,
REGULAR_EXPRESSION = $__125.REGULAR_EXPRESSION,
RIGHT_SHIFT = $__125.RIGHT_SHIFT,
RIGHT_SHIFT_EQUAL = $__125.RIGHT_SHIFT_EQUAL,
SEMI_COLON = $__125.SEMI_COLON,
SLASH = $__125.SLASH,
SLASH_EQUAL = $__125.SLASH_EQUAL,
STAR = $__125.STAR,
STAR_EQUAL = $__125.STAR_EQUAL,
STRING = $__125.STRING,
TEMPLATE_HEAD = $__125.TEMPLATE_HEAD,
TEMPLATE_MIDDLE = $__125.TEMPLATE_MIDDLE,
TEMPLATE_TAIL = $__125.TEMPLATE_TAIL,
TILDE = $__125.TILDE,
UNSIGNED_RIGHT_SHIFT = $__125.UNSIGNED_RIGHT_SHIFT,
UNSIGNED_RIGHT_SHIFT_EQUAL = $__125.UNSIGNED_RIGHT_SHIFT_EQUAL;
var isWhitespaceArray = [];
for (var i = 0; i < 128; i++) {
isWhitespaceArray[i] = i >= 9 && i <= 13 || i === 0x20;
}
var isWhitespaceArray = [];
for (var i = 0; i < 128; i++) {
isWhitespaceArray[i] = i >= 9 && i <= 13 || i === 0x20;
}
function isWhitespace(code) {
if (code < 128)
return isWhitespaceArray[code];
switch (code) {
case 0xA0:
case 0xFEFF:
case 0x2028:
case 0x2029:
return true;
}
return false;
}
function isLineTerminator(code) {
switch (code) {
case 10:
case 13:
case 0x2028:
case 0x2029:
return true;
}
return false;
}
function isDecimalDigit(code) {
return code >= 48 && code <= 57;
}
var isHexDigitArray = [];
for (var i = 0; i < 128; i++) {
isHexDigitArray[i] = i >= 48 && i <= 57 || i >= 65 && i <= 70 || i >= 97 && i <= 102;
}
function isHexDigit(code) {
return code < 128 && isHexDigitArray[code];
}
function isBinaryDigit(code) {
return code === 48 || code === 49;
}
function isOctalDigit(code) {
return code >= 48 && code <= 55;
}
var isIdentifierStartArray = [];
for (var i = 0; i < 128; i++) {
isIdentifierStartArray[i] = i === 36 || i >= 65 && i <= 90 || i === 95 || i >= 97 && i <= 122;
}
function isIdentifierStart(code) {
return code < 128 ? isIdentifierStartArray[code] : inTable(idStartTable, code);
}
var isIdentifierPartArray = [];
for (var i = 0; i < 128; i++) {
isIdentifierPartArray[i] = isIdentifierStart(i) || isDecimalDigit(i);
}
function isIdentifierPart(code) {
return code < 128 ? isIdentifierPartArray[code] : inTable(idStartTable, code) || inTable(idContinueTable, code) || code === 8204 || code === 8205;
}
function inTable(table, code) {
for (var i = 0; i < table.length; ) {
if (code < table[i++])
return false;
if (code <= table[i++])
return true;
}
return false;
}
function isRegularExpressionChar(code) {
switch (code) {
case 47:
return false;
case 91:
case 92:
return true;
}
return !isLineTerminator(code);
}
function isRegularExpressionFirstChar(code) {
return isRegularExpressionChar(code) && code !== 42;
}
var index,
input,
length,
token,
lastToken,
lookaheadToken,
currentCharCode,
lineNumberTable,
errorReporter,
currentParser;
var Scanner = function Scanner(reporter, file, parser) {
errorReporter = reporter;
lineNumberTable = file.lineNumberTable;
input = file.contents;
length = file.contents.length;
this.index = 0;
currentParser = parser;
};
($traceurRuntime.createClass)(Scanner, {
get lastToken() {
return lastToken;
},
getPosition: function() {
return getPosition(getOffset());
},
nextRegularExpressionLiteralToken: function() {
lastToken = nextRegularExpressionLiteralToken();
token = scanToken();
return lastToken;
},
nextTemplateLiteralToken: function() {
var t = nextTemplateLiteralToken();
token = scanToken();
return t;
},
nextToken: function() {
return nextToken();
},
peekToken: function(opt_index) {
return opt_index ? peekTokenLookahead() : peekToken();
},
peekTokenNoLineTerminator: function() {
return peekTokenNoLineTerminator();
},
isAtEnd: function() {
return isAtEnd();
},
set index(i) {
index = i;
lastToken = null;
token = null;
lookaheadToken = null;
updateCurrentCharCode();
},
get index() {
return index;
}
}, {});
function getPosition(offset) {
return lineNumberTable.getSourcePosition(offset);
}
function getTokenRange(startOffset) {
return lineNumberTable.getSourceRange(startOffset, index);
}
function getOffset() {
return token ? token.location.start.offset : index;
}
function nextRegularExpressionLiteralToken() {
var beginIndex = index - token.toString().length;
if (!(token.type == SLASH_EQUAL && currentCharCode === 47) && !skipRegularExpressionBody()) {
return new LiteralToken(REGULAR_EXPRESSION, getTokenString(beginIndex), getTokenRange(beginIndex));
}
if (currentCharCode !== 47) {
reportError('Expected \'/\' in regular expression literal');
return new LiteralToken(REGULAR_EXPRESSION, getTokenString(beginIndex), getTokenRange(beginIndex));
}
next();
while (isIdentifierPart(currentCharCode)) {
next();
}
return new LiteralToken(REGULAR_EXPRESSION, getTokenString(beginIndex), getTokenRange(beginIndex));
}
function skipRegularExpressionBody() {
if (!isRegularExpressionFirstChar(currentCharCode)) {
reportError('Expected regular expression first char');
return false;
}
while (!isAtEnd() && isRegularExpressionChar(currentCharCode)) {
if (!skipRegularExpressionChar())
return false;
}
return true;
}
function skipRegularExpressionChar() {
switch (currentCharCode) {
case 92:
return skipRegularExpressionBackslashSequence();
case 91:
return skipRegularExpressionClass();
default:
next();
return true;
}
}
function skipRegularExpressionBackslashSequence() {
next();
if (isLineTerminator(currentCharCode) || isAtEnd()) {
reportError('New line not allowed in regular expression literal');
return false;
}
next();
return true;
}
function skipRegularExpressionClass() {
next();
while (!isAtEnd() && peekRegularExpressionClassChar()) {
if (!skipRegularExpressionClassChar()) {
return false;
}
}
if (currentCharCode !== 93) {
reportError('\']\' expected');
return false;
}
next();
return true;
}
function peekRegularExpressionClassChar() {
return currentCharCode !== 93 && !isLineTerminator(currentCharCode);
}
function skipRegularExpressionClassChar() {
if (currentCharCode === 92) {
return skipRegularExpressionBackslashSequence();
}
next();
return true;
}
function skipTemplateCharacter() {
while (!isAtEnd()) {
switch (currentCharCode) {
case 96:
return;
case 92:
skipStringLiteralEscapeSequence();
break;
case 36:
var code = input.charCodeAt(index + 1);
if (code === 123)
return;
default:
next();
}
}
}
function scanTemplateStart(beginIndex) {
if (isAtEnd()) {
reportError('Unterminated template literal');
return lastToken = createToken(END_OF_FILE, beginIndex);
}
return nextTemplateLiteralTokenShared(NO_SUBSTITUTION_TEMPLATE, TEMPLATE_HEAD);
}
function nextTemplateLiteralToken() {
if (isAtEnd()) {
reportError('Expected \'}\' after expression in template literal');
return createToken(END_OF_FILE, index);
}
if (token.type !== CLOSE_CURLY) {
reportError('Expected \'}\' after expression in template literal');
return createToken(ERROR, index);
}
return nextTemplateLiteralTokenShared(TEMPLATE_TAIL, TEMPLATE_MIDDLE);
}
function nextTemplateLiteralTokenShared(endType, middleType) {
var beginIndex = index;
skipTemplateCharacter();
if (isAtEnd()) {
reportError('Unterminated template literal');
return createToken(ERROR, beginIndex);
}
var value = getTokenString(beginIndex);
switch (currentCharCode) {
case 96:
next();
return lastToken = new LiteralToken(endType, value, getTokenRange(beginIndex - 1));
case 36:
next();
next();
return lastToken = new LiteralToken(middleType, value, getTokenRange(beginIndex - 1));
}
}
function nextToken() {
var t = peekToken();
token = lookaheadToken || scanToken();
lookaheadToken = null;
lastToken = t;
return t;
}
function peekTokenNoLineTerminator() {
var t = peekToken();
var start = lastToken.location.end.offset;
var end = t.location.start.offset;
for (var i = start; i < end; i++) {
var code = input.charCodeAt(i);
if (isLineTerminator(code))
return null;
if (code === 47) {
code = input.charCodeAt(++i);
if (code === 47)
return null;
i = input.indexOf('*/', i) + 2;
}
}
return t;
}
function peekToken() {
return token || (token = scanToken());
}
function peekTokenLookahead() {
if (!token)
token = scanToken();
if (!lookaheadToken)
lookaheadToken = scanToken();
return lookaheadToken;
}
function skipWhitespace() {
while (!isAtEnd() && peekWhitespace()) {
next();
}
}
function peekWhitespace() {
return isWhitespace(currentCharCode);
}
function skipComments() {
while (skipComment()) {}
}
function skipComment() {
skipWhitespace();
var code = currentCharCode;
if (code === 47) {
code = input.charCodeAt(index + 1);
switch (code) {
case 47:
skipSingleLineComment();
return true;
case 42:
skipMultiLineComment();
return true;
}
}
return false;
}
function commentCallback(start, index) {
if (options.commentCallback)
currentParser.handleComment(lineNumberTable.getSourceRange(start, index));
}
function skipSingleLineComment() {
var start = index;
index += 2;
while (!isAtEnd() && !isLineTerminator(input.charCodeAt(index++))) {}
updateCurrentCharCode();
commentCallback(start, index);
}
function skipMultiLineComment() {
var start = index;
var i = input.indexOf('*/', index + 2);
if (i !== -1)
index = i + 2;
else
index = length;
updateCurrentCharCode();
commentCallback(start, index);
}
function scanToken() {
skipComments();
var beginIndex = index;
if (isAtEnd())
return createToken(END_OF_FILE, beginIndex);
var code = currentCharCode;
next();
switch (code) {
case 123:
return createToken(OPEN_CURLY, beginIndex);
case 125:
return createToken(CLOSE_CURLY, beginIndex);
case 40:
return createToken(OPEN_PAREN, beginIndex);
case 41:
return createToken(CLOSE_PAREN, beginIndex);
case 91:
return createToken(OPEN_SQUARE, beginIndex);
case 93:
return createToken(CLOSE_SQUARE, beginIndex);
case 46:
switch (currentCharCode) {
case 46:
if (input.charCodeAt(index + 1) === 46) {
next();
next();
return createToken(DOT_DOT_DOT, beginIndex);
}
break;
default:
if (isDecimalDigit(currentCharCode))
return scanNumberPostPeriod(beginIndex);
}
return createToken(PERIOD, beginIndex);
case 59:
return createToken(SEMI_COLON, beginIndex);
case 44:
return createToken(COMMA, beginIndex);
case 126:
return createToken(TILDE, beginIndex);
case 63:
return createToken(QUESTION, beginIndex);
case 58:
return createToken(COLON, beginIndex);
case 60:
switch (currentCharCode) {
case 60:
next();
if (currentCharCode === 61) {
next();
return createToken(LEFT_SHIFT_EQUAL, beginIndex);
}
return createToken(LEFT_SHIFT, beginIndex);
case 61:
next();
return createToken(LESS_EQUAL, beginIndex);
default:
return createToken(OPEN_ANGLE, beginIndex);
}
case 62:
switch (currentCharCode) {
case 62:
next();
switch (currentCharCode) {
case 61:
next();
return createToken(RIGHT_SHIFT_EQUAL, beginIndex);
case 62:
next();
if (currentCharCode === 61) {
next();
return createToken(UNSIGNED_RIGHT_SHIFT_EQUAL, beginIndex);
}
return createToken(UNSIGNED_RIGHT_SHIFT, beginIndex);
default:
return createToken(RIGHT_SHIFT, beginIndex);
}
case 61:
next();
return createToken(GREATER_EQUAL, beginIndex);
default:
return createToken(CLOSE_ANGLE, beginIndex);
}
case 61:
if (currentCharCode === 61) {
next();
if (currentCharCode === 61) {
next();
return createToken(EQUAL_EQUAL_EQUAL, beginIndex);
}
return createToken(EQUAL_EQUAL, beginIndex);
}
if (currentCharCode === 62) {
next();
return createToken(ARROW, beginIndex);
}
return createToken(EQUAL, beginIndex);
case 33:
if (currentCharCode === 61) {
next();
if (currentCharCode === 61) {
next();
return createToken(NOT_EQUAL_EQUAL, beginIndex);
}
return createToken(NOT_EQUAL, beginIndex);
}
return createToken(BANG, beginIndex);
case 42:
if (currentCharCode === 61) {
next();
return createToken(STAR_EQUAL, beginIndex);
}
return createToken(STAR, beginIndex);
case 37:
if (currentCharCode === 61) {
next();
return createToken(PERCENT_EQUAL, beginIndex);
}
return createToken(PERCENT, beginIndex);
case 94:
if (currentCharCode === 61) {
next();
return createToken(CARET_EQUAL, beginIndex);
}
return createToken(CARET, beginIndex);
case 47:
if (currentCharCode === 61) {
next();
return createToken(SLASH_EQUAL, beginIndex);
}
return createToken(SLASH, beginIndex);
case 43:
switch (currentCharCode) {
case 43:
next();
return createToken(PLUS_PLUS, beginIndex);
case 61:
next();
return createToken(PLUS_EQUAL, beginIndex);
default:
return createToken(PLUS, beginIndex);
}
case 45:
switch (currentCharCode) {
case 45:
next();
return createToken(MINUS_MINUS, beginIndex);
case 61:
next();
return createToken(MINUS_EQUAL, beginIndex);
default:
return createToken(MINUS, beginIndex);
}
case 38:
switch (currentCharCode) {
case 38:
next();
return createToken(AND, beginIndex);
case 61:
next();
return createToken(AMPERSAND_EQUAL, beginIndex);
default:
return createToken(AMPERSAND, beginIndex);
}
case 124:
switch (currentCharCode) {
case 124:
next();
return createToken(OR, beginIndex);
case 61:
next();
return createToken(BAR_EQUAL, beginIndex);
default:
return createToken(BAR, beginIndex);
}
case 96:
return scanTemplateStart(beginIndex);
case 64:
return createToken(AT, beginIndex);
case 48:
return scanPostZero(beginIndex);
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
return scanPostDigit(beginIndex);
case 34:
case 39:
return scanStringLiteral(beginIndex, code);
default:
return scanIdentifierOrKeyword(beginIndex, code);
}
}
function scanNumberPostPeriod(beginIndex) {
skipDecimalDigits();
return scanExponentOfNumericLiteral(beginIndex);
}
function scanPostDigit(beginIndex) {
skipDecimalDigits();
return scanFractionalNumericLiteral(beginIndex);
}
function scanPostZero(beginIndex) {
switch (currentCharCode) {
case 46:
return scanFractionalNumericLiteral(beginIndex);
case 88:
case 120:
next();
if (!isHexDigit(currentCharCode)) {
reportError('Hex Integer Literal must contain at least one digit');
}
skipHexDigits();
return new LiteralToken(NUMBER, getTokenString(beginIndex), getTokenRange(beginIndex));
case 66:
case 98:
if (!parseOptions.numericLiterals)
break;
next();
if (!isBinaryDigit(currentCharCode)) {
reportError('Binary Integer Literal must contain at least one digit');
}
skipBinaryDigits();
return new LiteralToken(NUMBER, getTokenString(beginIndex), getTokenRange(beginIndex));
case 79:
case 111:
if (!parseOptions.numericLiterals)
break;
next();
if (!isOctalDigit(currentCharCode)) {
reportError('Octal Integer Literal must contain at least one digit');
}
skipOctalDigits();
return new LiteralToken(NUMBER, getTokenString(beginIndex), getTokenRange(beginIndex));
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
return scanPostDigit(beginIndex);
}
return new LiteralToken(NUMBER, getTokenString(beginIndex), getTokenRange(beginIndex));
}
function createToken(type, beginIndex) {
return new Token(type, getTokenRange(beginIndex));
}
function readUnicodeEscapeSequence() {
var beginIndex = index;
if (currentCharCode === 117) {
next();
if (skipHexDigit() && skipHexDigit() && skipHexDigit() && skipHexDigit()) {
return parseInt(getTokenString(beginIndex + 1), 16);
}
}
reportError('Invalid unicode escape sequence in identifier', beginIndex - 1);
return 0;
}
function scanIdentifierOrKeyword(beginIndex, code) {
var escapedCharCodes;
if (code === 92) {
code = readUnicodeEscapeSequence();
escapedCharCodes = [code];
}
if (!isIdentifierStart(code)) {
reportError(("Character code '" + code + "' is not a valid identifier start char"), beginIndex);
return createToken(ERROR, beginIndex);
}
for (; ; ) {
code = currentCharCode;
if (isIdentifierPart(code)) {
next();
} else if (code === 92) {
next();
code = readUnicodeEscapeSequence();
if (!escapedCharCodes)
escapedCharCodes = [];
escapedCharCodes.push(code);
if (!isIdentifierPart(code))
return createToken(ERROR, beginIndex);
} else {
break;
}
}
var value = input.slice(beginIndex, index);
var keywordType = getKeywordType(value);
if (keywordType)
return new KeywordToken(value, keywordType, getTokenRange(beginIndex));
if (escapedCharCodes) {
var i = 0;
value = value.replace(/\\u..../g, function(s) {
return String.fromCharCode(escapedCharCodes[i++]);
});
}
return new IdentifierToken(getTokenRange(beginIndex), value);
}
function scanStringLiteral(beginIndex, terminator) {
while (peekStringLiteralChar(terminator)) {
if (!skipStringLiteralChar()) {
return new LiteralToken(STRING, getTokenString(beginIndex), getTokenRange(beginIndex));
}
}
if (currentCharCode !== terminator) {
reportError('Unterminated String Literal', beginIndex);
} else {
next();
}
return new LiteralToken(STRING, getTokenString(beginIndex), getTokenRange(beginIndex));
}
function getTokenString(beginIndex) {
return input.substring(beginIndex, index);
}
function peekStringLiteralChar(terminator) {
return !isAtEnd() && currentCharCode !== terminator && !isLineTerminator(currentCharCode);
}
function skipStringLiteralChar() {
if (currentCharCode === 92) {
return skipStringLiteralEscapeSequence();
}
next();
return true;
}
function skipStringLiteralEscapeSequence() {
next();
if (isAtEnd()) {
reportError('Unterminated string literal escape sequence');
return false;
}
if (isLineTerminator(currentCharCode)) {
skipLineTerminator();
return true;
}
var code = currentCharCode;
next();
switch (code) {
case 39:
case 34:
case 92:
case 98:
case 102:
case 110:
case 114:
case 116:
case 118:
case 48:
return true;
case 120:
return skipHexDigit() && skipHexDigit();
case 117:
return skipHexDigit() && skipHexDigit() && skipHexDigit() && skipHexDigit();
default:
return true;
}
}
function skipHexDigit() {
if (!isHexDigit(currentCharCode)) {
reportError('Hex digit expected');
return false;
}
next();
return true;
}
function skipLineTerminator() {
var first = currentCharCode;
next();
if (first === 13 && currentCharCode === 10) {
next();
}
}
function scanFractionalNumericLiteral(beginIndex) {
if (currentCharCode === 46) {
next();
skipDecimalDigits();
}
return scanExponentOfNumericLiteral(beginIndex);
}
function scanExponentOfNumericLiteral(beginIndex) {
switch (currentCharCode) {
case 101:
case 69:
next();
switch (currentCharCode) {
case 43:
case 45:
next();
break;
}
if (!isDecimalDigit(currentCharCode)) {
reportError('Exponent part must contain at least one digit');
}
skipDecimalDigits();
break;
default:
break;
}
return new LiteralToken(NUMBER, getTokenString(beginIndex), getTokenRange(beginIndex));
}
function skipDecimalDigits() {
while (isDecimalDigit(currentCharCode)) {
next();
}
}
function skipHexDigits() {
while (isHexDigit(currentCharCode)) {
next();
}
}
function skipBinaryDigits() {
while (isBinaryDigit(currentCharCode)) {
next();
}
}
function skipOctalDigits() {
while (isOctalDigit(currentCharCode)) {
next();
}
}
function isAtEnd() {
return index === length;
}
function next() {
index++;
updateCurrentCharCode();
}
function updateCurrentCharCode() {
currentCharCode = input.charCodeAt(index);
}
function reportError(message) {
var indexArg = arguments[1] !== (void 0) ? arguments[1] : index;
var position = getPosition(indexArg);
errorReporter.reportError(position, message);
}
return {
get isWhitespace() {
return isWhitespace;
},
get isLineTerminator() {
return isLineTerminator;
},
get isIdentifierPart() {
return isIdentifierPart;
},
get Scanner() {
return Scanner;
}
};
});
System.register("traceur@0.0.52/src/syntax/Parser", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/Parser";
var FindVisitor = System.get("traceur@0.0.52/src/codegeneration/FindVisitor").FindVisitor;
var IdentifierToken = System.get("traceur@0.0.52/src/syntax/IdentifierToken").IdentifierToken;
var $__129 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARRAY_LITERAL_EXPRESSION = $__129.ARRAY_LITERAL_EXPRESSION,
BINDING_IDENTIFIER = $__129.BINDING_IDENTIFIER,
CALL_EXPRESSION = $__129.CALL_EXPRESSION,
COMPUTED_PROPERTY_NAME = $__129.COMPUTED_PROPERTY_NAME,
COVER_FORMALS = $__129.COVER_FORMALS,
FORMAL_PARAMETER_LIST = $__129.FORMAL_PARAMETER_LIST,
IDENTIFIER_EXPRESSION = $__129.IDENTIFIER_EXPRESSION,
LITERAL_PROPERTY_NAME = $__129.LITERAL_PROPERTY_NAME,
OBJECT_LITERAL_EXPRESSION = $__129.OBJECT_LITERAL_EXPRESSION,
REST_PARAMETER = $__129.REST_PARAMETER,
SYNTAX_ERROR_TREE = $__129.SYNTAX_ERROR_TREE;
var $__130 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
AS = $__130.AS,
ASYNC = $__130.ASYNC,
AWAIT = $__130.AWAIT,
FROM = $__130.FROM,
GET = $__130.GET,
MODULE = $__130.MODULE,
OF = $__130.OF,
SET = $__130.SET;
var SyntaxErrorReporter = System.get("traceur@0.0.52/src/util/SyntaxErrorReporter").SyntaxErrorReporter;
var Scanner = System.get("traceur@0.0.52/src/syntax/Scanner").Scanner;
var SourceRange = System.get("traceur@0.0.52/src/util/SourceRange").SourceRange;
var StrictParams = System.get("traceur@0.0.52/src/staticsemantics/StrictParams").StrictParams;
var $__135 = System.get("traceur@0.0.52/src/syntax/Token"),
Token = $__135.Token,
isAssignmentOperator = $__135.isAssignmentOperator;
var getKeywordType = System.get("traceur@0.0.52/src/syntax/Keywords").getKeywordType;
var $__137 = System.get("traceur@0.0.52/src/Options"),
parseOptions = $__137.parseOptions,
options = $__137.options;
var $__138 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AMPERSAND = $__138.AMPERSAND,
AND = $__138.AND,
ARROW = $__138.ARROW,
AT = $__138.AT,
BANG = $__138.BANG,
BAR = $__138.BAR,
BREAK = $__138.BREAK,
CARET = $__138.CARET,
CASE = $__138.CASE,
CATCH = $__138.CATCH,
CLASS = $__138.CLASS,
CLOSE_ANGLE = $__138.CLOSE_ANGLE,
CLOSE_CURLY = $__138.CLOSE_CURLY,
CLOSE_PAREN = $__138.CLOSE_PAREN,
CLOSE_SQUARE = $__138.CLOSE_SQUARE,
COLON = $__138.COLON,
COMMA = $__138.COMMA,
CONST = $__138.CONST,
CONTINUE = $__138.CONTINUE,
DEBUGGER = $__138.DEBUGGER,
DEFAULT = $__138.DEFAULT,
DELETE = $__138.DELETE,
DO = $__138.DO,
DOT_DOT_DOT = $__138.DOT_DOT_DOT,
ELSE = $__138.ELSE,
END_OF_FILE = $__138.END_OF_FILE,
EQUAL = $__138.EQUAL,
EQUAL_EQUAL = $__138.EQUAL_EQUAL,
EQUAL_EQUAL_EQUAL = $__138.EQUAL_EQUAL_EQUAL,
ERROR = $__138.ERROR,
EXPORT = $__138.EXPORT,
EXTENDS = $__138.EXTENDS,
FALSE = $__138.FALSE,
FINALLY = $__138.FINALLY,
FOR = $__138.FOR,
FUNCTION = $__138.FUNCTION,
GREATER_EQUAL = $__138.GREATER_EQUAL,
IDENTIFIER = $__138.IDENTIFIER,
IF = $__138.IF,
IMPLEMENTS = $__138.IMPLEMENTS,
IMPORT = $__138.IMPORT,
IN = $__138.IN,
INSTANCEOF = $__138.INSTANCEOF,
INTERFACE = $__138.INTERFACE,
LEFT_SHIFT = $__138.LEFT_SHIFT,
LESS_EQUAL = $__138.LESS_EQUAL,
LET = $__138.LET,
MINUS = $__138.MINUS,
MINUS_MINUS = $__138.MINUS_MINUS,
NEW = $__138.NEW,
NO_SUBSTITUTION_TEMPLATE = $__138.NO_SUBSTITUTION_TEMPLATE,
NOT_EQUAL = $__138.NOT_EQUAL,
NOT_EQUAL_EQUAL = $__138.NOT_EQUAL_EQUAL,
NULL = $__138.NULL,
NUMBER = $__138.NUMBER,
OPEN_ANGLE = $__138.OPEN_ANGLE,
OPEN_CURLY = $__138.OPEN_CURLY,
OPEN_PAREN = $__138.OPEN_PAREN,
OPEN_SQUARE = $__138.OPEN_SQUARE,
OR = $__138.OR,
PACKAGE = $__138.PACKAGE,
PERCENT = $__138.PERCENT,
PERIOD = $__138.PERIOD,
PLUS = $__138.PLUS,
PLUS_PLUS = $__138.PLUS_PLUS,
PRIVATE = $__138.PRIVATE,
PROTECTED = $__138.PROTECTED,
PUBLIC = $__138.PUBLIC,
QUESTION = $__138.QUESTION,
RETURN = $__138.RETURN,
RIGHT_SHIFT = $__138.RIGHT_SHIFT,
SEMI_COLON = $__138.SEMI_COLON,
SLASH = $__138.SLASH,
SLASH_EQUAL = $__138.SLASH_EQUAL,
STAR = $__138.STAR,
STATIC = $__138.STATIC,
STRING = $__138.STRING,
SUPER = $__138.SUPER,
SWITCH = $__138.SWITCH,
TEMPLATE_HEAD = $__138.TEMPLATE_HEAD,
TEMPLATE_TAIL = $__138.TEMPLATE_TAIL,
THIS = $__138.THIS,
THROW = $__138.THROW,
TILDE = $__138.TILDE,
TRUE = $__138.TRUE,
TRY = $__138.TRY,
TYPEOF = $__138.TYPEOF,
UNSIGNED_RIGHT_SHIFT = $__138.UNSIGNED_RIGHT_SHIFT,
VAR = $__138.VAR,
VOID = $__138.VOID,
WHILE = $__138.WHILE,
WITH = $__138.WITH,
YIELD = $__138.YIELD;
var $__139 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
ArgumentList = $__139.ArgumentList,
ArrayComprehension = $__139.ArrayComprehension,
ArrayLiteralExpression = $__139.ArrayLiteralExpression,
ArrayPattern = $__139.ArrayPattern,
ArrowFunctionExpression = $__139.ArrowFunctionExpression,
AssignmentElement = $__139.AssignmentElement,
AwaitExpression = $__139.AwaitExpression,
BinaryExpression = $__139.BinaryExpression,
BindingElement = $__139.BindingElement,
BindingIdentifier = $__139.BindingIdentifier,
Block = $__139.Block,
BreakStatement = $__139.BreakStatement,
CallExpression = $__139.CallExpression,
CaseClause = $__139.CaseClause,
Catch = $__139.Catch,
ClassDeclaration = $__139.ClassDeclaration,
ClassExpression = $__139.ClassExpression,
CommaExpression = $__139.CommaExpression,
ComprehensionFor = $__139.ComprehensionFor,
ComprehensionIf = $__139.ComprehensionIf,
ComputedPropertyName = $__139.ComputedPropertyName,
ConditionalExpression = $__139.ConditionalExpression,
ContinueStatement = $__139.ContinueStatement,
CoverFormals = $__139.CoverFormals,
CoverInitializedName = $__139.CoverInitializedName,
DebuggerStatement = $__139.DebuggerStatement,
Annotation = $__139.Annotation,
DefaultClause = $__139.DefaultClause,
DoWhileStatement = $__139.DoWhileStatement,
EmptyStatement = $__139.EmptyStatement,
ExportDeclaration = $__139.ExportDeclaration,
ExportDefault = $__139.ExportDefault,
ExportSpecifier = $__139.ExportSpecifier,
ExportSpecifierSet = $__139.ExportSpecifierSet,
ExportStar = $__139.ExportStar,
ExpressionStatement = $__139.ExpressionStatement,
Finally = $__139.Finally,
ForInStatement = $__139.ForInStatement,
ForOfStatement = $__139.ForOfStatement,
ForStatement = $__139.ForStatement,
FormalParameter = $__139.FormalParameter,
FormalParameterList = $__139.FormalParameterList,
FunctionBody = $__139.FunctionBody,
FunctionDeclaration = $__139.FunctionDeclaration,
FunctionExpression = $__139.FunctionExpression,
GeneratorComprehension = $__139.GeneratorComprehension,
GetAccessor = $__139.GetAccessor,
IdentifierExpression = $__139.IdentifierExpression,
IfStatement = $__139.IfStatement,
ImportDeclaration = $__139.ImportDeclaration,
ImportSpecifier = $__139.ImportSpecifier,
ImportSpecifierSet = $__139.ImportSpecifierSet,
ImportedBinding = $__139.ImportedBinding,
LabelledStatement = $__139.LabelledStatement,
LiteralExpression = $__139.LiteralExpression,
LiteralPropertyName = $__139.LiteralPropertyName,
MemberExpression = $__139.MemberExpression,
MemberLookupExpression = $__139.MemberLookupExpression,
Module = $__139.Module,
ModuleDeclaration = $__139.ModuleDeclaration,
ModuleSpecifier = $__139.ModuleSpecifier,
NamedExport = $__139.NamedExport,
NewExpression = $__139.NewExpression,
ObjectLiteralExpression = $__139.ObjectLiteralExpression,
ObjectPattern = $__139.ObjectPattern,
ObjectPatternField = $__139.ObjectPatternField,
ParenExpression = $__139.ParenExpression,
PostfixExpression = $__139.PostfixExpression,
PredefinedType = $__139.PredefinedType,
Script = $__139.Script,
PropertyMethodAssignment = $__139.PropertyMethodAssignment,
PropertyNameAssignment = $__139.PropertyNameAssignment,
PropertyNameShorthand = $__139.PropertyNameShorthand,
RestParameter = $__139.RestParameter,
ReturnStatement = $__139.ReturnStatement,
SetAccessor = $__139.SetAccessor,
SpreadExpression = $__139.SpreadExpression,
SpreadPatternElement = $__139.SpreadPatternElement,
SuperExpression = $__139.SuperExpression,
SwitchStatement = $__139.SwitchStatement,
SyntaxErrorTree = $__139.SyntaxErrorTree,
TemplateLiteralExpression = $__139.TemplateLiteralExpression,
TemplateLiteralPortion = $__139.TemplateLiteralPortion,
TemplateSubstitution = $__139.TemplateSubstitution,
ThisExpression = $__139.ThisExpression,
ThrowStatement = $__139.ThrowStatement,
TryStatement = $__139.TryStatement,
TypeName = $__139.TypeName,
UnaryExpression = $__139.UnaryExpression,
VariableDeclaration = $__139.VariableDeclaration,
VariableDeclarationList = $__139.VariableDeclarationList,
VariableStatement = $__139.VariableStatement,
WhileStatement = $__139.WhileStatement,
WithStatement = $__139.WithStatement,
YieldExpression = $__139.YieldExpression;
var Expression = {
NO_IN: 'NO_IN',
NORMAL: 'NORMAL'
};
var DestructuringInitializer = {
REQUIRED: 'REQUIRED',
OPTIONAL: 'OPTIONAL'
};
var Initializer = {
ALLOWED: 'ALLOWED',
REQUIRED: 'REQUIRED'
};
var ValidateObjectLiteral = function ValidateObjectLiteral(tree) {
this.errorToken = null;
$traceurRuntime.superCall(this, $ValidateObjectLiteral.prototype, "constructor", [tree]);
};
var $ValidateObjectLiteral = ValidateObjectLiteral;
($traceurRuntime.createClass)(ValidateObjectLiteral, {visitCoverInitializedName: function(tree) {
this.errorToken = tree.equalToken;
this.found = true;
}}, {}, FindVisitor);
var Parser = function Parser(file) {
var errorReporter = arguments[1] !== (void 0) ? arguments[1] : new SyntaxErrorReporter();
this.errorReporter_ = errorReporter;
this.scanner_ = new Scanner(errorReporter, file, this);
this.allowYield_ = false;
this.allowAwait_ = false;
this.coverInitializedNameCount_ = 0;
this.strictMode_ = false;
this.annotations_ = [];
};
($traceurRuntime.createClass)(Parser, {
parseScript: function() {
this.strictMode_ = false;
var start = this.getTreeStartLocation_();
var scriptItemList = this.parseScriptItemList_();
this.eat_(END_OF_FILE);
return new Script(this.getTreeLocation_(start), scriptItemList);
},
parseScriptItemList_: function() {
var result = [];
var type;
var checkUseStrictDirective = true;
while ((type = this.peekType_()) !== END_OF_FILE) {
var scriptItem = this.parseScriptItem_(type, false);
if (checkUseStrictDirective) {
if (!scriptItem.isDirectivePrologue()) {
checkUseStrictDirective = false;
} else if (scriptItem.isUseStrictDirective()) {
this.strictMode_ = true;
checkUseStrictDirective = false;
}
}
result.push(scriptItem);
}
return result;
},
parseScriptItem_: function(type, allowModuleItem) {
return this.parseStatement_(type, allowModuleItem, true);
},
parseModule: function() {
var start = this.getTreeStartLocation_();
var scriptItemList = this.parseModuleItemList_();
this.eat_(END_OF_FILE);
return new Module(this.getTreeLocation_(start), scriptItemList);
},
parseModuleItemList_: function() {
this.strictMode_ = true;
var result = [];
var type;
while ((type = this.peekType_()) !== END_OF_FILE) {
var scriptItem = this.parseScriptItem_(type, true);
result.push(scriptItem);
}
return result;
},
parseModuleSpecifier_: function() {
var start = this.getTreeStartLocation_();
var token = this.eat_(STRING);
return new ModuleSpecifier(this.getTreeLocation_(start), token);
},
parseImportDeclaration_: function() {
var start = this.getTreeStartLocation_();
this.eat_(IMPORT);
var importClause = null;
if (this.peekImportClause_(this.peekType_())) {
importClause = this.parseImportClause_();
this.eatId_(FROM);
}
var moduleSpecifier = this.parseModuleSpecifier_();
this.eatPossibleImplicitSemiColon_();
return new ImportDeclaration(this.getTreeLocation_(start), importClause, moduleSpecifier);
},
peekImportClause_: function(type) {
return type === OPEN_CURLY || this.peekBindingIdentifier_(type);
},
parseImportClause_: function() {
var start = this.getTreeStartLocation_();
if (this.eatIf_(OPEN_CURLY)) {
var specifiers = [];
while (!this.peek_(CLOSE_CURLY) && !this.isAtEnd()) {
specifiers.push(this.parseImportSpecifier_());
if (!this.eatIf_(COMMA))
break;
}
this.eat_(CLOSE_CURLY);
return new ImportSpecifierSet(this.getTreeLocation_(start), specifiers);
}
var binding = this.parseBindingIdentifier_();
return new ImportedBinding(this.getTreeLocation_(start), binding);
},
parseImportSpecifier_: function() {
var start = this.getTreeStartLocation_();
var token = this.peekToken_();
var isKeyword = token.isKeyword();
var lhs = this.eatIdName_();
var rhs = null;
if (isKeyword || this.peekPredefinedString_(AS)) {
this.eatId_(AS);
rhs = this.eatId_();
}
return new ImportSpecifier(this.getTreeLocation_(start), lhs, rhs);
},
parseExportDeclaration_: function() {
var start = this.getTreeStartLocation_();
this.eat_(EXPORT);
var exportTree;
var annotations = this.popAnnotations_();
var type = this.peekType_();
switch (type) {
case CONST:
case LET:
case VAR:
exportTree = this.parseVariableStatement_();
break;
case FUNCTION:
exportTree = this.parseFunctionDeclaration_();
break;
case CLASS:
exportTree = this.parseClassDeclaration_();
break;
case DEFAULT:
exportTree = this.parseExportDefault_();
break;
case OPEN_CURLY:
case STAR:
exportTree = this.parseNamedExport_();
break;
case IDENTIFIER:
if (options.asyncFunctions && this.peekPredefinedString_(ASYNC)) {
var asyncToken = this.eatId_();
exportTree = this.parseAsyncFunctionDeclaration_(asyncToken);
break;
}
default:
return this.parseUnexpectedToken_(type);
}
return new ExportDeclaration(this.getTreeLocation_(start), exportTree, annotations);
},
parseExportDefault_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DEFAULT);
var exportValue;
switch (this.peekType_()) {
case FUNCTION:
exportValue = this.parseFunctionDeclaration_();
break;
case CLASS:
if (parseOptions.classes) {
exportValue = this.parseClassDeclaration_();
break;
}
default:
exportValue = this.parseAssignmentExpression();
this.eatPossibleImplicitSemiColon_();
}
return new ExportDefault(this.getTreeLocation_(start), exportValue);
},
parseNamedExport_: function() {
var start = this.getTreeStartLocation_();
var specifierSet,
expression = null;
if (this.peek_(OPEN_CURLY)) {
specifierSet = this.parseExportSpecifierSet_();
if (this.peekPredefinedString_(FROM)) {
this.eatId_(FROM);
expression = this.parseModuleSpecifier_();
} else {
this.validateExportSpecifierSet_(specifierSet);
}
} else {
this.eat_(STAR);
specifierSet = new ExportStar(this.getTreeLocation_(start));
this.eatId_(FROM);
expression = this.parseModuleSpecifier_();
}
this.eatPossibleImplicitSemiColon_();
return new NamedExport(this.getTreeLocation_(start), expression, specifierSet);
},
parseExportSpecifierSet_: function() {
var start = this.getTreeStartLocation_();
this.eat_(OPEN_CURLY);
var specifiers = [this.parseExportSpecifier_()];
while (this.eatIf_(COMMA)) {
if (this.peek_(CLOSE_CURLY))
break;
specifiers.push(this.parseExportSpecifier_());
}
this.eat_(CLOSE_CURLY);
return new ExportSpecifierSet(this.getTreeLocation_(start), specifiers);
},
parseExportSpecifier_: function() {
var start = this.getTreeStartLocation_();
var lhs = this.eatIdName_();
var rhs = null;
if (this.peekPredefinedString_(AS)) {
this.eatId_();
rhs = this.eatIdName_();
}
return new ExportSpecifier(this.getTreeLocation_(start), lhs, rhs);
},
validateExportSpecifierSet_: function(tree) {
for (var i = 0; i < tree.specifiers.length; i++) {
var specifier = tree.specifiers[i];
if (getKeywordType(specifier.lhs.value)) {
this.reportError_(specifier.lhs.location, ("Unexpected token " + specifier.lhs.value));
}
}
},
peekId_: function(type) {
if (type === IDENTIFIER)
return true;
if (this.strictMode_)
return false;
return this.peekToken_().isStrictKeyword();
},
peekIdName_: function(token) {
return token.type === IDENTIFIER || token.isKeyword();
},
parseClassShared_: function(constr) {
var start = this.getTreeStartLocation_();
var strictMode = this.strictMode_;
this.strictMode_ = true;
this.eat_(CLASS);
var name = null;
var annotations = [];
if (constr == ClassDeclaration || !this.peek_(EXTENDS) && !this.peek_(OPEN_CURLY)) {
name = this.parseBindingIdentifier_();
annotations = this.popAnnotations_();
}
var superClass = null;
if (this.eatIf_(EXTENDS)) {
superClass = this.parseAssignmentExpression();
}
this.eat_(OPEN_CURLY);
var elements = this.parseClassElements_();
this.eat_(CLOSE_CURLY);
this.strictMode_ = strictMode;
return new constr(this.getTreeLocation_(start), name, superClass, elements, annotations);
},
parseClassDeclaration_: function() {
return this.parseClassShared_(ClassDeclaration);
},
parseClassExpression_: function() {
return this.parseClassShared_(ClassExpression);
},
parseClassElements_: function() {
var result = [];
while (true) {
var type = this.peekType_();
if (type === SEMI_COLON) {
this.nextToken_();
} else if (this.peekClassElement_(this.peekType_())) {
result.push(this.parseClassElement_());
} else {
break;
}
}
return result;
},
peekClassElement_: function(type) {
return this.peekPropertyName_(type) || type === STAR && parseOptions.generators || type === AT && parseOptions.annotations;
},
parsePropertyName_: function() {
if (this.peek_(OPEN_SQUARE))
return this.parseComputedPropertyName_();
return this.parseLiteralPropertyName_();
},
parseLiteralPropertyName_: function() {
var start = this.getTreeStartLocation_();
var token = this.nextToken_();
return new LiteralPropertyName(this.getTreeLocation_(start), token);
},
parseComputedPropertyName_: function() {
var start = this.getTreeStartLocation_();
this.eat_(OPEN_SQUARE);
var expression = this.parseAssignmentExpression();
this.eat_(CLOSE_SQUARE);
return new ComputedPropertyName(this.getTreeLocation_(start), expression);
},
parseStatement: function() {
return this.parseStatement_(this.peekType_(), false, false);
},
parseStatement_: function(type, allowModuleItem, allowScriptItem) {
switch (type) {
case RETURN:
return this.parseReturnStatement_();
case CONST:
case LET:
if (!parseOptions.blockBinding)
break;
case VAR:
return this.parseVariableStatement_();
case IF:
return this.parseIfStatement_();
case FOR:
return this.parseForStatement_();
case BREAK:
return this.parseBreakStatement_();
case SWITCH:
return this.parseSwitchStatement_();
case THROW:
return this.parseThrowStatement_();
case WHILE:
return this.parseWhileStatement_();
case FUNCTION:
return this.parseFunctionDeclaration_();
case AT:
if (parseOptions.annotations)
return this.parseAnnotatedDeclarations_(allowModuleItem, allowScriptItem);
break;
case CLASS:
if (parseOptions.classes)
return this.parseClassDeclaration_();
break;
case CONTINUE:
return this.parseContinueStatement_();
case DEBUGGER:
return this.parseDebuggerStatement_();
case DO:
return this.parseDoWhileStatement_();
case EXPORT:
if (allowModuleItem && parseOptions.modules)
return this.parseExportDeclaration_();
break;
case IMPORT:
if (allowScriptItem && parseOptions.modules)
return this.parseImportDeclaration_();
break;
case OPEN_CURLY:
return this.parseBlock_();
case SEMI_COLON:
return this.parseEmptyStatement_();
case TRY:
return this.parseTryStatement_();
case WITH:
return this.parseWithStatement_();
}
return this.parseFallThroughStatement_(allowScriptItem);
},
parseFunctionDeclaration_: function() {
return this.parseFunction_(FunctionDeclaration);
},
parseFunctionExpression_: function() {
return this.parseFunction_(FunctionExpression);
},
parseAsyncFunctionDeclaration_: function(asyncToken) {
return this.parseAsyncFunction_(asyncToken, FunctionDeclaration);
},
parseAsyncFunctionExpression_: function(asyncToken) {
return this.parseAsyncFunction_(asyncToken, FunctionExpression);
},
parseAsyncFunction_: function(asyncToken, ctor) {
var start = asyncToken.location.start;
this.eat_(FUNCTION);
return this.parseFunction2_(start, asyncToken, ctor);
},
parseFunction_: function(ctor) {
var start = this.getTreeStartLocation_();
this.eat_(FUNCTION);
var functionKind = null;
if (parseOptions.generators && this.peek_(STAR))
functionKind = this.eat_(STAR);
return this.parseFunction2_(start, functionKind, ctor);
},
parseFunction2_: function(start, functionKind, ctor) {
var name = null;
var annotations = [];
if (ctor === FunctionDeclaration || this.peekBindingIdentifier_(this.peekType_())) {
name = this.parseBindingIdentifier_();
annotations = this.popAnnotations_();
}
this.eat_(OPEN_PAREN);
var parameters = this.parseFormalParameters_();
this.eat_(CLOSE_PAREN);
var typeAnnotation = this.parseTypeAnnotationOpt_();
var body = this.parseFunctionBody_(functionKind, parameters);
return new ctor(this.getTreeLocation_(start), name, functionKind, parameters, typeAnnotation, annotations, body);
},
peekRest_: function(type) {
return type === DOT_DOT_DOT && parseOptions.restParameters;
},
parseFormalParameters_: function() {
var start = this.getTreeStartLocation_();
var formals = [];
this.pushAnnotations_();
var type = this.peekType_();
if (this.peekRest_(type)) {
formals.push(this.parseFormalRestParameter_());
} else {
if (this.peekFormalParameter_(this.peekType_()))
formals.push(this.parseFormalParameter_());
while (this.eatIf_(COMMA)) {
this.pushAnnotations_();
if (this.peekRest_(this.peekType_())) {
formals.push(this.parseFormalRestParameter_());
break;
}
formals.push(this.parseFormalParameter_());
}
}
return new FormalParameterList(this.getTreeLocation_(start), formals);
},
peekFormalParameter_: function(type) {
return this.peekBindingElement_(type);
},
parseFormalParameter_: function() {
var initializerAllowed = arguments[0];
var start = this.getTreeStartLocation_();
var binding = this.parseBindingElementBinding_();
var typeAnnotation = this.parseTypeAnnotationOpt_();
var initializer = this.parseBindingElementInitializer_(initializerAllowed);
return new FormalParameter(this.getTreeLocation_(start), new BindingElement(this.getTreeLocation_(start), binding, initializer), typeAnnotation, this.popAnnotations_());
},
parseFormalRestParameter_: function() {
var start = this.getTreeStartLocation_();
var restParameter = this.parseRestParameter_();
var typeAnnotation = this.parseTypeAnnotationOpt_();
return new FormalParameter(this.getTreeLocation_(start), restParameter, typeAnnotation, this.popAnnotations_());
},
parseRestParameter_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DOT_DOT_DOT);
var id = this.parseBindingIdentifier_();
return new RestParameter(this.getTreeLocation_(start), id);
},
parseFunctionBody_: function(functionKind, params) {
var start = this.getTreeStartLocation_();
this.eat_(OPEN_CURLY);
var allowYield = this.allowYield_;
var allowAwait = this.allowAwait_;
var strictMode = this.strictMode_;
this.allowYield_ = functionKind && functionKind.type === STAR;
this.allowAwait_ = functionKind && functionKind.type === IDENTIFIER && functionKind.value === ASYNC;
var result = this.parseStatementList_(!strictMode);
if (!strictMode && this.strictMode_ && params)
StrictParams.visit(params, this.errorReporter_);
this.strictMode_ = strictMode;
this.allowYield_ = allowYield;
this.allowAwait_ = allowAwait;
this.eat_(CLOSE_CURLY);
return new FunctionBody(this.getTreeLocation_(start), result);
},
parseStatements: function() {
return this.parseStatementList_(false);
},
parseStatementList_: function(checkUseStrictDirective) {
var result = [];
var type;
while ((type = this.peekType_()) !== CLOSE_CURLY && type !== END_OF_FILE) {
var statement = this.parseStatement_(type, false, false);
if (checkUseStrictDirective) {
if (!statement.isDirectivePrologue()) {
checkUseStrictDirective = false;
} else if (statement.isUseStrictDirective()) {
this.strictMode_ = true;
checkUseStrictDirective = false;
}
}
result.push(statement);
}
return result;
},
parseSpreadExpression_: function() {
if (!parseOptions.spread)
return this.parseUnexpectedToken_(DOT_DOT_DOT);
var start = this.getTreeStartLocation_();
this.eat_(DOT_DOT_DOT);
var operand = this.parseAssignmentExpression();
return new SpreadExpression(this.getTreeLocation_(start), operand);
},
parseBlock_: function() {
var start = this.getTreeStartLocation_();
this.eat_(OPEN_CURLY);
var result = this.parseStatementList_(false);
this.eat_(CLOSE_CURLY);
return new Block(this.getTreeLocation_(start), result);
},
parseVariableStatement_: function() {
var start = this.getTreeStartLocation_();
var declarations = this.parseVariableDeclarationList_();
this.checkInitializers_(declarations);
this.eatPossibleImplicitSemiColon_();
return new VariableStatement(this.getTreeLocation_(start), declarations);
},
parseVariableDeclarationList_: function() {
var expressionIn = arguments[0] !== (void 0) ? arguments[0] : Expression.NORMAL;
var initializer = arguments[1] !== (void 0) ? arguments[1] : DestructuringInitializer.REQUIRED;
var type = this.peekType_();
switch (type) {
case CONST:
case LET:
if (!parseOptions.blockBinding)
debugger;
case VAR:
this.nextToken_();
break;
default:
throw Error('unreachable');
}
var start = this.getTreeStartLocation_();
var declarations = [];
declarations.push(this.parseVariableDeclaration_(type, expressionIn, initializer));
while (this.eatIf_(COMMA)) {
declarations.push(this.parseVariableDeclaration_(type, expressionIn, initializer));
}
return new VariableDeclarationList(this.getTreeLocation_(start), type, declarations);
},
parseVariableDeclaration_: function(binding, expressionIn) {
var initializer = arguments[2] !== (void 0) ? arguments[2] : DestructuringInitializer.REQUIRED;
var initRequired = initializer !== DestructuringInitializer.OPTIONAL;
var start = this.getTreeStartLocation_();
var lvalue;
var typeAnnotation;
if (this.peekPattern_(this.peekType_())) {
lvalue = this.parseBindingPattern_();
typeAnnotation = null;
} else {
lvalue = this.parseBindingIdentifier_();
typeAnnotation = this.parseTypeAnnotationOpt_();
}
var initializer = null;
if (this.peek_(EQUAL))
initializer = this.parseInitializer_(expressionIn);
else if (lvalue.isPattern() && initRequired)
this.reportError_('destructuring must have an initializer');
return new VariableDeclaration(this.getTreeLocation_(start), lvalue, typeAnnotation, initializer);
},
parseInitializer_: function(expressionIn) {
this.eat_(EQUAL);
return this.parseAssignmentExpression(expressionIn);
},
parseInitializerOpt_: function(expressionIn) {
if (this.eatIf_(EQUAL))
return this.parseAssignmentExpression(expressionIn);
return null;
},
parseEmptyStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(SEMI_COLON);
return new EmptyStatement(this.getTreeLocation_(start));
},
parseFallThroughStatement_: function(allowScriptItem) {
var start = this.getTreeStartLocation_();
var expression;
if (parseOptions.asyncFunctions && this.peekPredefinedString_(ASYNC) && this.peek_(FUNCTION, 1)) {
var asyncToken = this.eatId_();
var functionToken = this.peekTokenNoLineTerminator_();
if (functionToken !== null)
return this.parseAsyncFunctionDeclaration_(asyncToken);
expression = new IdentifierExpression(this.getTreeLocation_(start), asyncToken);
} else {
expression = this.parseExpression();
}
if (expression.type === IDENTIFIER_EXPRESSION) {
var nameToken = expression.identifierToken;
if (this.eatIf_(COLON)) {
var statement = this.parseStatement();
return new LabelledStatement(this.getTreeLocation_(start), nameToken, statement);
}
if (allowScriptItem && nameToken.value === MODULE && parseOptions.modules) {
var token = this.peekTokenNoLineTerminator_();
if (token !== null && token.type === IDENTIFIER) {
var name = this.eatId_();
this.eatId_(FROM);
var moduleSpecifier = this.parseModuleSpecifier_();
this.eatPossibleImplicitSemiColon_();
return new ModuleDeclaration(this.getTreeLocation_(start), name, moduleSpecifier);
}
}
}
this.eatPossibleImplicitSemiColon_();
return new ExpressionStatement(this.getTreeLocation_(start), expression);
},
parseIfStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(IF);
this.eat_(OPEN_PAREN);
var condition = this.parseExpression();
this.eat_(CLOSE_PAREN);
var ifClause = this.parseStatement();
var elseClause = null;
if (this.eatIf_(ELSE)) {
elseClause = this.parseStatement();
}
return new IfStatement(this.getTreeLocation_(start), condition, ifClause, elseClause);
},
parseDoWhileStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DO);
var body = this.parseStatement();
this.eat_(WHILE);
this.eat_(OPEN_PAREN);
var condition = this.parseExpression();
this.eat_(CLOSE_PAREN);
this.eatPossibleImplicitSemiColon_();
return new DoWhileStatement(this.getTreeLocation_(start), body, condition);
},
parseWhileStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(WHILE);
this.eat_(OPEN_PAREN);
var condition = this.parseExpression();
this.eat_(CLOSE_PAREN);
var body = this.parseStatement();
return new WhileStatement(this.getTreeLocation_(start), condition, body);
},
parseForStatement_: function() {
var $__140 = this;
var start = this.getTreeStartLocation_();
this.eat_(FOR);
this.eat_(OPEN_PAREN);
var validate = (function(variables, kind) {
if (variables.declarations.length > 1) {
$__140.reportError_(kind + ' statement may not have more than one variable declaration');
}
var declaration = variables.declarations[0];
if (declaration.lvalue.isPattern() && declaration.initializer) {
$__140.reportError_(declaration.initializer.location, ("initializer is not allowed in " + kind + " loop with pattern"));
}
});
var type = this.peekType_();
if (this.peekVariableDeclarationList_(type)) {
var variables = this.parseVariableDeclarationList_(Expression.NO_IN, DestructuringInitializer.OPTIONAL);
type = this.peekType_();
if (type === IN) {
validate(variables, 'for-in');
var declaration = variables.declarations[0];
if (parseOptions.blockBinding && (variables.declarationType == LET || variables.declarationType == CONST)) {
if (declaration.initializer != null) {
this.reportError_('let/const in for-in statement may not have initializer');
}
}
return this.parseForInStatement_(start, variables);
} else if (this.peekOf_(type)) {
validate(variables, 'for-of');
var declaration = variables.declarations[0];
if (declaration.initializer != null) {
this.reportError_('for-of statement may not have initializer');
}
return this.parseForOfStatement_(start, variables);
} else {
this.checkInitializers_(variables);
return this.parseForStatement2_(start, variables);
}
}
if (type === SEMI_COLON) {
return this.parseForStatement2_(start, null);
}
var coverInitializedNameCount = this.coverInitializedNameCount_;
var initializer = this.parseExpressionAllowPattern_(Expression.NO_IN);
type = this.peekType_();
if (initializer.isLeftHandSideExpression() && (type === IN || this.peekOf_(type))) {
initializer = this.transformLeftHandSideExpression_(initializer);
if (this.peekOf_(type))
return this.parseForOfStatement_(start, initializer);
return this.parseForInStatement_(start, initializer);
}
this.ensureNoCoverInitializedNames_(initializer, coverInitializedNameCount);
return this.parseForStatement2_(start, initializer);
},
peekOf_: function(type) {
return type === IDENTIFIER && parseOptions.forOf && this.peekToken_().value === OF;
},
parseForOfStatement_: function(start, initializer) {
this.eatId_();
var collection = this.parseExpression();
this.eat_(CLOSE_PAREN);
var body = this.parseStatement();
return new ForOfStatement(this.getTreeLocation_(start), initializer, collection, body);
},
checkInitializers_: function(variables) {
if (parseOptions.blockBinding && variables.declarationType == CONST) {
var type = variables.declarationType;
for (var i = 0; i < variables.declarations.length; i++) {
if (!this.checkInitializer_(type, variables.declarations[i])) {
break;
}
}
}
},
checkInitializer_: function(type, declaration) {
if (parseOptions.blockBinding && type == CONST && declaration.initializer == null) {
this.reportError_('const variables must have an initializer');
return false;
}
return true;
},
peekVariableDeclarationList_: function(type) {
switch (type) {
case VAR:
return true;
case CONST:
case LET:
return parseOptions.blockBinding;
default:
return false;
}
},
parseForStatement2_: function(start, initializer) {
this.eat_(SEMI_COLON);
var condition = null;
if (!this.peek_(SEMI_COLON)) {
condition = this.parseExpression();
}
this.eat_(SEMI_COLON);
var increment = null;
if (!this.peek_(CLOSE_PAREN)) {
increment = this.parseExpression();
}
this.eat_(CLOSE_PAREN);
var body = this.parseStatement();
return new ForStatement(this.getTreeLocation_(start), initializer, condition, increment, body);
},
parseForInStatement_: function(start, initializer) {
this.eat_(IN);
var collection = this.parseExpression();
this.eat_(CLOSE_PAREN);
var body = this.parseStatement();
return new ForInStatement(this.getTreeLocation_(start), initializer, collection, body);
},
parseContinueStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(CONTINUE);
var name = null;
if (!this.peekImplicitSemiColon_(this.peekType_())) {
name = this.eatIdOpt_();
}
this.eatPossibleImplicitSemiColon_();
return new ContinueStatement(this.getTreeLocation_(start), name);
},
parseBreakStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(BREAK);
var name = null;
if (!this.peekImplicitSemiColon_(this.peekType_())) {
name = this.eatIdOpt_();
}
this.eatPossibleImplicitSemiColon_();
return new BreakStatement(this.getTreeLocation_(start), name);
},
parseReturnStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(RETURN);
var expression = null;
if (!this.peekImplicitSemiColon_(this.peekType_())) {
expression = this.parseExpression();
}
this.eatPossibleImplicitSemiColon_();
return new ReturnStatement(this.getTreeLocation_(start), expression);
},
parseYieldExpression_: function() {
var start = this.getTreeStartLocation_();
this.eat_(YIELD);
var expression = null;
var isYieldFor = false;
if (!this.peekImplicitSemiColon_(this.peekType_())) {
isYieldFor = this.eatIf_(STAR);
expression = this.parseAssignmentExpression();
}
return new YieldExpression(this.getTreeLocation_(start), expression, isYieldFor);
},
parseWithStatement_: function() {
if (this.strictMode_)
this.reportError_('Strict mode code may not include a with statement');
var start = this.getTreeStartLocation_();
this.eat_(WITH);
this.eat_(OPEN_PAREN);
var expression = this.parseExpression();
this.eat_(CLOSE_PAREN);
var body = this.parseStatement();
return new WithStatement(this.getTreeLocation_(start), expression, body);
},
parseSwitchStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(SWITCH);
this.eat_(OPEN_PAREN);
var expression = this.parseExpression();
this.eat_(CLOSE_PAREN);
this.eat_(OPEN_CURLY);
var caseClauses = this.parseCaseClauses_();
this.eat_(CLOSE_CURLY);
return new SwitchStatement(this.getTreeLocation_(start), expression, caseClauses);
},
parseCaseClauses_: function() {
var foundDefaultClause = false;
var result = [];
while (true) {
var start = this.getTreeStartLocation_();
switch (this.peekType_()) {
case CASE:
this.nextToken_();
var expression = this.parseExpression();
this.eat_(COLON);
var statements = this.parseCaseStatementsOpt_();
result.push(new CaseClause(this.getTreeLocation_(start), expression, statements));
break;
case DEFAULT:
if (foundDefaultClause) {
this.reportError_('Switch statements may have at most one default clause');
} else {
foundDefaultClause = true;
}
this.nextToken_();
this.eat_(COLON);
result.push(new DefaultClause(this.getTreeLocation_(start), this.parseCaseStatementsOpt_()));
break;
default:
return result;
}
}
},
parseCaseStatementsOpt_: function() {
var result = [];
var type;
while (true) {
switch (type = this.peekType_()) {
case CASE:
case DEFAULT:
case CLOSE_CURLY:
case END_OF_FILE:
return result;
}
result.push(this.parseStatement_(type, false, false));
}
},
parseThrowStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(THROW);
var value = null;
if (!this.peekImplicitSemiColon_(this.peekType_())) {
value = this.parseExpression();
}
this.eatPossibleImplicitSemiColon_();
return new ThrowStatement(this.getTreeLocation_(start), value);
},
parseTryStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(TRY);
var body = this.parseBlock_();
var catchBlock = null;
if (this.peek_(CATCH)) {
catchBlock = this.parseCatch_();
}
var finallyBlock = null;
if (this.peek_(FINALLY)) {
finallyBlock = this.parseFinallyBlock_();
}
if (catchBlock == null && finallyBlock == null) {
this.reportError_("'catch' or 'finally' expected.");
}
return new TryStatement(this.getTreeLocation_(start), body, catchBlock, finallyBlock);
},
parseCatch_: function() {
var start = this.getTreeStartLocation_();
var catchBlock;
this.eat_(CATCH);
this.eat_(OPEN_PAREN);
var binding;
if (this.peekPattern_(this.peekType_()))
binding = this.parseBindingPattern_();
else
binding = this.parseBindingIdentifier_();
this.eat_(CLOSE_PAREN);
var catchBody = this.parseBlock_();
catchBlock = new Catch(this.getTreeLocation_(start), binding, catchBody);
return catchBlock;
},
parseFinallyBlock_: function() {
var start = this.getTreeStartLocation_();
this.eat_(FINALLY);
var finallyBlock = this.parseBlock_();
return new Finally(this.getTreeLocation_(start), finallyBlock);
},
parseDebuggerStatement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DEBUGGER);
this.eatPossibleImplicitSemiColon_();
return new DebuggerStatement(this.getTreeLocation_(start));
},
parsePrimaryExpression_: function() {
switch (this.peekType_()) {
case CLASS:
return parseOptions.classes ? this.parseClassExpression_() : this.parseSyntaxError_('Unexpected reserved word');
case THIS:
return this.parseThisExpression_();
case IDENTIFIER:
var identifier = this.parseIdentifierExpression_();
if (parseOptions.asyncFunctions && identifier.identifierToken.value === ASYNC) {
var token = this.peekTokenNoLineTerminator_();
if (token && token.type === FUNCTION) {
var asyncToken = identifier.identifierToken;
return this.parseAsyncFunctionExpression_(asyncToken);
}
}
return identifier;
case NUMBER:
case STRING:
case TRUE:
case FALSE:
case NULL:
return this.parseLiteralExpression_();
case OPEN_SQUARE:
return this.parseArrayLiteral_();
case OPEN_CURLY:
return this.parseObjectLiteral_();
case OPEN_PAREN:
return this.parsePrimaryExpressionStartingWithParen_();
case SLASH:
case SLASH_EQUAL:
return this.parseRegularExpressionLiteral_();
case NO_SUBSTITUTION_TEMPLATE:
case TEMPLATE_HEAD:
return this.parseTemplateLiteral_(null);
case IMPLEMENTS:
case INTERFACE:
case PACKAGE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case YIELD:
if (!this.strictMode_)
return this.parseIdentifierExpression_();
this.reportReservedIdentifier_(this.nextToken_());
case END_OF_FILE:
return this.parseSyntaxError_('Unexpected end of input');
default:
return this.parseUnexpectedToken_(this.peekToken_());
}
},
parseSuperExpression_: function() {
var start = this.getTreeStartLocation_();
this.eat_(SUPER);
return new SuperExpression(this.getTreeLocation_(start));
},
parseThisExpression_: function() {
var start = this.getTreeStartLocation_();
this.eat_(THIS);
return new ThisExpression(this.getTreeLocation_(start));
},
peekBindingIdentifier_: function(type) {
return this.peekId_(type);
},
parseBindingIdentifier_: function() {
var start = this.getTreeStartLocation_();
var identifier = this.eatId_();
return new BindingIdentifier(this.getTreeLocation_(start), identifier);
},
parseIdentifierExpression_: function() {
var start = this.getTreeStartLocation_();
var identifier = this.eatId_();
return new IdentifierExpression(this.getTreeLocation_(start), identifier);
},
parseIdentifierNameExpression_: function() {
var start = this.getTreeStartLocation_();
var identifier = this.eatIdName_();
return new IdentifierExpression(this.getTreeLocation_(start), identifier);
},
parseLiteralExpression_: function() {
var start = this.getTreeStartLocation_();
var literal = this.nextLiteralToken_();
return new LiteralExpression(this.getTreeLocation_(start), literal);
},
nextLiteralToken_: function() {
return this.nextToken_();
},
parseRegularExpressionLiteral_: function() {
var start = this.getTreeStartLocation_();
var literal = this.nextRegularExpressionLiteralToken_();
return new LiteralExpression(this.getTreeLocation_(start), literal);
},
peekSpread_: function(type) {
return type === DOT_DOT_DOT && parseOptions.spread;
},
parseArrayLiteral_: function() {
var start = this.getTreeStartLocation_();
var expression;
var elements = [];
this.eat_(OPEN_SQUARE);
var type = this.peekType_();
if (type === FOR && parseOptions.arrayComprehension)
return this.parseArrayComprehension_(start);
while (true) {
type = this.peekType_();
if (type === COMMA) {
expression = null;
} else if (this.peekSpread_(type)) {
expression = this.parseSpreadExpression_();
} else if (this.peekAssignmentExpression_(type)) {
expression = this.parseAssignmentExpression();
} else {
break;
}
elements.push(expression);
type = this.peekType_();
if (type !== CLOSE_SQUARE)
this.eat_(COMMA);
}
this.eat_(CLOSE_SQUARE);
return new ArrayLiteralExpression(this.getTreeLocation_(start), elements);
},
parseArrayComprehension_: function(start) {
var list = this.parseComprehensionList_();
var expression = this.parseAssignmentExpression();
this.eat_(CLOSE_SQUARE);
return new ArrayComprehension(this.getTreeLocation_(start), list, expression);
},
parseComprehensionList_: function() {
var list = [this.parseComprehensionFor_()];
while (true) {
var type = this.peekType_();
switch (type) {
case FOR:
list.push(this.parseComprehensionFor_());
break;
case IF:
list.push(this.parseComprehensionIf_());
break;
default:
return list;
}
}
},
parseComprehensionFor_: function() {
var start = this.getTreeStartLocation_();
this.eat_(FOR);
this.eat_(OPEN_PAREN);
var left = this.parseForBinding_();
this.eatId_(OF);
var iterator = this.parseExpression();
this.eat_(CLOSE_PAREN);
return new ComprehensionFor(this.getTreeLocation_(start), left, iterator);
},
parseComprehensionIf_: function() {
var start = this.getTreeStartLocation_();
this.eat_(IF);
this.eat_(OPEN_PAREN);
var expression = this.parseExpression();
this.eat_(CLOSE_PAREN);
return new ComprehensionIf(this.getTreeLocation_(start), expression);
},
parseObjectLiteral_: function() {
var start = this.getTreeStartLocation_();
var result = [];
this.eat_(OPEN_CURLY);
while (this.peekPropertyDefinition_(this.peekType_())) {
var propertyDefinition = this.parsePropertyDefinition();
result.push(propertyDefinition);
if (!this.eatIf_(COMMA))
break;
}
this.eat_(CLOSE_CURLY);
return new ObjectLiteralExpression(this.getTreeLocation_(start), result);
},
parsePropertyDefinition: function() {
var start = this.getTreeStartLocation_();
var functionKind = null;
var isStatic = false;
if (parseOptions.generators && parseOptions.propertyMethods && this.peek_(STAR)) {
return this.parseGeneratorMethod_(start, isStatic, []);
}
var token = this.peekToken_();
var name = this.parsePropertyName_();
if (parseOptions.propertyMethods && this.peek_(OPEN_PAREN))
return this.parseMethod_(start, isStatic, functionKind, name, []);
if (this.eatIf_(COLON)) {
var value = this.parseAssignmentExpression();
return new PropertyNameAssignment(this.getTreeLocation_(start), name, value);
}
var type = this.peekType_();
if (name.type === LITERAL_PROPERTY_NAME) {
var nameLiteral = name.literalToken;
if (nameLiteral.value === GET && this.peekPropertyName_(type)) {
return this.parseGetAccessor_(start, isStatic, []);
}
if (nameLiteral.value === SET && this.peekPropertyName_(type)) {
return this.parseSetAccessor_(start, isStatic, []);
}
if (parseOptions.asyncFunctions && nameLiteral.value === ASYNC && this.peekPropertyName_(type)) {
var async = nameLiteral;
var name = this.parsePropertyName_();
return this.parseMethod_(start, isStatic, async, name, []);
}
if (parseOptions.propertyNameShorthand && nameLiteral.type === IDENTIFIER || !this.strictMode_ && nameLiteral.type === YIELD) {
if (this.peek_(EQUAL)) {
token = this.nextToken_();
var coverInitializedNameCount = this.coverInitializedNameCount_;
var expr = this.parseAssignmentExpression();
this.ensureNoCoverInitializedNames_(expr, coverInitializedNameCount);
this.coverInitializedNameCount_++;
return new CoverInitializedName(this.getTreeLocation_(start), nameLiteral, token, expr);
}
if (nameLiteral.type === YIELD)
nameLiteral = new IdentifierToken(nameLiteral.location, YIELD);
return new PropertyNameShorthand(this.getTreeLocation_(start), nameLiteral);
}
if (this.strictMode_ && nameLiteral.isStrictKeyword())
this.reportReservedIdentifier_(nameLiteral);
}
if (name.type === COMPUTED_PROPERTY_NAME)
token = this.peekToken_();
return this.parseUnexpectedToken_(token);
},
parseClassElement_: function() {
var start = this.getTreeStartLocation_();
var annotations = this.parseAnnotations_();
var type = this.peekType_();
var isStatic = false,
functionKind = null;
switch (type) {
case STATIC:
var staticToken = this.nextToken_();
type = this.peekType_();
switch (type) {
case OPEN_PAREN:
var name = new LiteralPropertyName(start, staticToken);
return this.parseMethod_(start, isStatic, functionKind, name, annotations);
default:
isStatic = true;
if (type === STAR && parseOptions.generators)
return this.parseGeneratorMethod_(start, true, annotations);
return this.parseGetSetOrMethod_(start, isStatic, annotations);
}
break;
case STAR:
return this.parseGeneratorMethod_(start, isStatic, annotations);
default:
return this.parseGetSetOrMethod_(start, isStatic, annotations);
}
},
parseGeneratorMethod_: function(start, isStatic, annotations) {
var functionKind = this.eat_(STAR);
var name = this.parsePropertyName_();
return this.parseMethod_(start, isStatic, functionKind, name, annotations);
},
parseMethod_: function(start, isStatic, functionKind, name, annotations) {
this.eat_(OPEN_PAREN);
var parameterList = this.parseFormalParameters_();
this.eat_(CLOSE_PAREN);
var typeAnnotation = this.parseTypeAnnotationOpt_();
var body = this.parseFunctionBody_(functionKind, parameterList);
return new PropertyMethodAssignment(this.getTreeLocation_(start), isStatic, functionKind, name, parameterList, typeAnnotation, annotations, body);
},
parseGetSetOrMethod_: function(start, isStatic, annotations) {
var functionKind = null;
var name = this.parsePropertyName_();
var type = this.peekType_();
if (name.type === LITERAL_PROPERTY_NAME && name.literalToken.value === GET && this.peekPropertyName_(type)) {
return this.parseGetAccessor_(start, isStatic, annotations);
}
if (name.type === LITERAL_PROPERTY_NAME && name.literalToken.value === SET && this.peekPropertyName_(type)) {
return this.parseSetAccessor_(start, isStatic, annotations);
}
if (parseOptions.asyncFunctions && name.type === LITERAL_PROPERTY_NAME && name.literalToken.value === ASYNC && this.peekPropertyName_(type)) {
var async = name.literalToken;
var name = this.parsePropertyName_();
return this.parseMethod_(start, isStatic, async, name, annotations);
}
return this.parseMethod_(start, isStatic, functionKind, name, annotations);
},
parseGetAccessor_: function(start, isStatic, annotations) {
var functionKind = null;
var name = this.parsePropertyName_();
this.eat_(OPEN_PAREN);
this.eat_(CLOSE_PAREN);
var typeAnnotation = this.parseTypeAnnotationOpt_();
var body = this.parseFunctionBody_(functionKind, null);
return new GetAccessor(this.getTreeLocation_(start), isStatic, name, typeAnnotation, annotations, body);
},
parseSetAccessor_: function(start, isStatic, annotations) {
var functionKind = null;
var name = this.parsePropertyName_();
this.eat_(OPEN_PAREN);
var parameterList = this.parsePropertySetParameterList_();
this.eat_(CLOSE_PAREN);
var body = this.parseFunctionBody_(functionKind, parameterList);
return new SetAccessor(this.getTreeLocation_(start), isStatic, name, parameterList, annotations, body);
},
peekPropertyDefinition_: function(type) {
return this.peekPropertyName_(type) || type == STAR && parseOptions.propertyMethods && parseOptions.generators;
},
peekPropertyName_: function(type) {
switch (type) {
case IDENTIFIER:
case STRING:
case NUMBER:
return true;
case OPEN_SQUARE:
return parseOptions.computedPropertyNames;
default:
return this.peekToken_().isKeyword();
}
},
peekPredefinedString_: function(string) {
var token = this.peekToken_();
return token.type === IDENTIFIER && token.value === string;
},
parsePropertySetParameterList_: function() {
var start = this.getTreeStartLocation_();
var binding;
this.pushAnnotations_();
if (this.peekPattern_(this.peekType_()))
binding = this.parseBindingPattern_();
else
binding = this.parseBindingIdentifier_();
var typeAnnotation = this.parseTypeAnnotationOpt_();
var parameter = new FormalParameter(this.getTreeLocation_(start), new BindingElement(this.getTreeLocation_(start), binding, null), typeAnnotation, this.popAnnotations_());
return new FormalParameterList(parameter.location, [parameter]);
},
parsePrimaryExpressionStartingWithParen_: function() {
var start = this.getTreeStartLocation_();
this.eat_(OPEN_PAREN);
if (this.peek_(FOR) && parseOptions.generatorComprehension)
return this.parseGeneratorComprehension_(start);
return this.parseCoverFormals_(start);
},
parseSyntaxError_: function(message) {
var start = this.getTreeStartLocation_();
this.reportError_(message);
var token = this.nextToken_();
return new SyntaxErrorTree(this.getTreeLocation_(start), token, message);
},
parseUnexpectedToken_: function(name) {
return this.parseSyntaxError_(("Unexpected token " + name));
},
peekExpression_: function(type) {
switch (type) {
case NO_SUBSTITUTION_TEMPLATE:
case TEMPLATE_HEAD:
return parseOptions.templateLiterals;
case BANG:
case CLASS:
case DELETE:
case FALSE:
case FUNCTION:
case IDENTIFIER:
case MINUS:
case MINUS_MINUS:
case NEW:
case NULL:
case NUMBER:
case OPEN_CURLY:
case OPEN_PAREN:
case OPEN_SQUARE:
case PLUS:
case PLUS_PLUS:
case SLASH:
case SLASH_EQUAL:
case STRING:
case SUPER:
case THIS:
case TILDE:
case TRUE:
case TYPEOF:
case VOID:
case YIELD:
return true;
default:
return false;
}
},
parseExpression: function() {
var expressionIn = arguments[0] !== (void 0) ? arguments[0] : Expression.IN;
var coverInitializedNameCount = this.coverInitializedNameCount_;
var expression = this.parseExpressionAllowPattern_(expressionIn);
this.ensureNoCoverInitializedNames_(expression, coverInitializedNameCount);
return expression;
},
parseExpressionAllowPattern_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var expression = this.parseAssignmentExpression(expressionIn);
if (this.peek_(COMMA)) {
var expressions = [expression];
while (this.eatIf_(COMMA)) {
expressions.push(this.parseAssignmentExpression(expressionIn));
}
return new CommaExpression(this.getTreeLocation_(start), expressions);
}
return expression;
},
peekAssignmentExpression_: function(type) {
return this.peekExpression_(type);
},
parseAssignmentExpression: function() {
var expressionIn = arguments[0] !== (void 0) ? arguments[0] : Expression.NORMAL;
if (this.allowYield_ && this.peek_(YIELD))
return this.parseYieldExpression_();
var start = this.getTreeStartLocation_();
var validAsyncParen = false;
if (options.asyncFunctions && this.peekPredefinedString_(ASYNC)) {
var asyncToken = this.peekToken_();
var maybeOpenParenToken = this.peekToken_(1);
validAsyncParen = maybeOpenParenToken.type === OPEN_PAREN && asyncToken.location.end.line === maybeOpenParenToken.location.start.line;
}
var left = this.parseConditional_(expressionIn);
var type = this.peekType_();
if (options.asyncFunctions && left.type === IDENTIFIER_EXPRESSION && left.identifierToken.value === ASYNC && type === IDENTIFIER) {
if (this.peekTokenNoLineTerminator_() !== null) {
var bindingIdentifier = this.parseBindingIdentifier_();
var asyncToken = left.IdentifierToken;
return this.parseArrowFunction_(start, bindingIdentifier, asyncToken);
}
}
if (type === ARROW) {
if (left.type === COVER_FORMALS || left.type === IDENTIFIER_EXPRESSION)
return this.parseArrowFunction_(start, left, null);
if (validAsyncParen && left.type === CALL_EXPRESSION) {
var arrowToken = this.peekTokenNoLineTerminator_();
if (arrowToken !== null) {
var asyncToken = left.operand.identifierToken;
return this.parseArrowFunction_(start, left.args, asyncToken);
}
}
}
left = this.coverFormalsToParenExpression_(left);
if (this.peekAssignmentOperator_(type)) {
if (type === EQUAL)
left = this.transformLeftHandSideExpression_(left);
if (!left.isLeftHandSideExpression() && !left.isPattern()) {
this.reportError_('Left hand side of assignment must be new, call, member, function, primary expressions or destructuring pattern');
}
var operator = this.nextToken_();
var right = this.parseAssignmentExpression(expressionIn);
return new BinaryExpression(this.getTreeLocation_(start), left, operator, right);
}
return left;
},
transformLeftHandSideExpression_: function(tree) {
switch (tree.type) {
case ARRAY_LITERAL_EXPRESSION:
case OBJECT_LITERAL_EXPRESSION:
this.scanner_.index = tree.location.start.offset;
return this.parseAssignmentPattern_();
}
return tree;
},
peekAssignmentOperator_: function(type) {
return isAssignmentOperator(type);
},
parseConditional_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var condition = this.parseLogicalOR_(expressionIn);
if (this.eatIf_(QUESTION)) {
condition = this.toPrimaryExpression_(condition);
var left = this.parseAssignmentExpression();
this.eat_(COLON);
var right = this.parseAssignmentExpression(expressionIn);
return new ConditionalExpression(this.getTreeLocation_(start), condition, left, right);
}
return condition;
},
newBinaryExpression_: function(start, left, operator, right) {
left = this.toPrimaryExpression_(left);
right = this.toPrimaryExpression_(right);
return new BinaryExpression(this.getTreeLocation_(start), left, operator, right);
},
parseLogicalOR_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseLogicalAND_(expressionIn);
var operator;
while (operator = this.eatOpt_(OR)) {
var right = this.parseLogicalAND_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
parseLogicalAND_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseBitwiseOR_(expressionIn);
var operator;
while (operator = this.eatOpt_(AND)) {
var right = this.parseBitwiseOR_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
parseBitwiseOR_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseBitwiseXOR_(expressionIn);
var operator;
while (operator = this.eatOpt_(BAR)) {
var right = this.parseBitwiseXOR_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
parseBitwiseXOR_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseBitwiseAND_(expressionIn);
var operator;
while (operator = this.eatOpt_(CARET)) {
var right = this.parseBitwiseAND_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
parseBitwiseAND_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseEquality_(expressionIn);
var operator;
while (operator = this.eatOpt_(AMPERSAND)) {
var right = this.parseEquality_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
parseEquality_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseRelational_(expressionIn);
while (this.peekEqualityOperator_(this.peekType_())) {
var operator = this.nextToken_();
var right = this.parseRelational_(expressionIn);
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
peekEqualityOperator_: function(type) {
switch (type) {
case EQUAL_EQUAL:
case NOT_EQUAL:
case EQUAL_EQUAL_EQUAL:
case NOT_EQUAL_EQUAL:
return true;
}
return false;
},
parseRelational_: function(expressionIn) {
var start = this.getTreeStartLocation_();
var left = this.parseShiftExpression_();
while (this.peekRelationalOperator_(expressionIn)) {
var operator = this.nextToken_();
var right = this.parseShiftExpression_();
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
peekRelationalOperator_: function(expressionIn) {
switch (this.peekType_()) {
case OPEN_ANGLE:
case CLOSE_ANGLE:
case GREATER_EQUAL:
case LESS_EQUAL:
case INSTANCEOF:
return true;
case IN:
return expressionIn == Expression.NORMAL;
default:
return false;
}
},
parseShiftExpression_: function() {
var start = this.getTreeStartLocation_();
var left = this.parseAdditiveExpression_();
while (this.peekShiftOperator_(this.peekType_())) {
var operator = this.nextToken_();
var right = this.parseAdditiveExpression_();
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
peekShiftOperator_: function(type) {
switch (type) {
case LEFT_SHIFT:
case RIGHT_SHIFT:
case UNSIGNED_RIGHT_SHIFT:
return true;
default:
return false;
}
},
parseAdditiveExpression_: function() {
var start = this.getTreeStartLocation_();
var left = this.parseMultiplicativeExpression_();
while (this.peekAdditiveOperator_(this.peekType_())) {
var operator = this.nextToken_();
var right = this.parseMultiplicativeExpression_();
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
peekAdditiveOperator_: function(type) {
switch (type) {
case PLUS:
case MINUS:
return true;
default:
return false;
}
},
parseMultiplicativeExpression_: function() {
var start = this.getTreeStartLocation_();
var left = this.parseUnaryExpression_();
while (this.peekMultiplicativeOperator_(this.peekType_())) {
var operator = this.nextToken_();
var right = this.parseUnaryExpression_();
left = this.newBinaryExpression_(start, left, operator, right);
}
return left;
},
peekMultiplicativeOperator_: function(type) {
switch (type) {
case STAR:
case SLASH:
case PERCENT:
return true;
default:
return false;
}
},
parseUnaryExpression_: function() {
var start = this.getTreeStartLocation_();
if (this.allowAwait_ && this.peekPredefinedString_(AWAIT)) {
this.eatId_();
var operand = this.parseUnaryExpression_();
operand = this.toPrimaryExpression_(operand);
return new AwaitExpression(this.getTreeLocation_(start), operand);
}
if (this.peekUnaryOperator_(this.peekType_())) {
var operator = this.nextToken_();
var operand = this.parseUnaryExpression_();
operand = this.toPrimaryExpression_(operand);
return new UnaryExpression(this.getTreeLocation_(start), operator, operand);
}
return this.parsePostfixExpression_();
},
peekUnaryOperator_: function(type) {
switch (type) {
case DELETE:
case VOID:
case TYPEOF:
case PLUS_PLUS:
case MINUS_MINUS:
case PLUS:
case MINUS:
case TILDE:
case BANG:
return true;
default:
return false;
}
},
parsePostfixExpression_: function() {
var start = this.getTreeStartLocation_();
var operand = this.parseLeftHandSideExpression_();
while (this.peekPostfixOperator_(this.peekType_())) {
operand = this.toPrimaryExpression_(operand);
var operator = this.nextToken_();
operand = new PostfixExpression(this.getTreeLocation_(start), operand, operator);
}
return operand;
},
peekPostfixOperator_: function(type) {
switch (type) {
case PLUS_PLUS:
case MINUS_MINUS:
var token = this.peekTokenNoLineTerminator_();
return token !== null;
}
return false;
},
parseLeftHandSideExpression_: function() {
var start = this.getTreeStartLocation_();
var operand = this.parseNewExpression_();
if (!(operand instanceof NewExpression) || operand.args != null) {
loop: while (true) {
switch (this.peekType_()) {
case OPEN_PAREN:
operand = this.toPrimaryExpression_(operand);
operand = this.parseCallExpression_(start, operand);
break;
case OPEN_SQUARE:
operand = this.toPrimaryExpression_(operand);
operand = this.parseMemberLookupExpression_(start, operand);
break;
case PERIOD:
operand = this.toPrimaryExpression_(operand);
operand = this.parseMemberExpression_(start, operand);
break;
case NO_SUBSTITUTION_TEMPLATE:
case TEMPLATE_HEAD:
if (!parseOptions.templateLiterals)
break loop;
operand = this.toPrimaryExpression_(operand);
operand = this.parseTemplateLiteral_(operand);
break;
default:
break loop;
}
}
}
return operand;
},
parseMemberExpressionNoNew_: function() {
var start = this.getTreeStartLocation_();
var operand;
if (this.peekType_() === FUNCTION) {
operand = this.parseFunctionExpression_();
} else {
operand = this.parsePrimaryExpression_();
}
loop: while (true) {
switch (this.peekType_()) {
case OPEN_SQUARE:
operand = this.toPrimaryExpression_(operand);
operand = this.parseMemberLookupExpression_(start, operand);
break;
case PERIOD:
operand = this.toPrimaryExpression_(operand);
operand = this.parseMemberExpression_(start, operand);
break;
case NO_SUBSTITUTION_TEMPLATE:
case TEMPLATE_HEAD:
if (!parseOptions.templateLiterals)
break loop;
operand = this.toPrimaryExpression_(operand);
operand = this.parseTemplateLiteral_(operand);
break;
default:
break loop;
}
}
return operand;
},
parseMemberExpression_: function(start, operand) {
this.nextToken_();
var name = this.eatIdName_();
return new MemberExpression(this.getTreeLocation_(start), operand, name);
},
parseMemberLookupExpression_: function(start, operand) {
this.nextToken_();
var member = this.parseExpression();
this.eat_(CLOSE_SQUARE);
return new MemberLookupExpression(this.getTreeLocation_(start), operand, member);
},
parseCallExpression_: function(start, operand) {
var args = this.parseArguments_();
return new CallExpression(this.getTreeLocation_(start), operand, args);
},
parseNewExpression_: function() {
var operand;
switch (this.peekType_()) {
case NEW:
var start = this.getTreeStartLocation_();
this.eat_(NEW);
if (this.peek_(SUPER))
operand = this.parseSuperExpression_();
else
operand = this.toPrimaryExpression_(this.parseNewExpression_());
var args = null;
if (this.peek_(OPEN_PAREN)) {
args = this.parseArguments_();
}
return new NewExpression(this.getTreeLocation_(start), operand, args);
case SUPER:
operand = this.parseSuperExpression_();
var type = this.peekType_();
switch (type) {
case OPEN_SQUARE:
return this.parseMemberLookupExpression_(start, operand);
case PERIOD:
return this.parseMemberExpression_(start, operand);
case OPEN_PAREN:
return this.parseCallExpression_(start, operand);
default:
return this.parseUnexpectedToken_(type);
}
break;
default:
return this.parseMemberExpressionNoNew_();
}
},
parseArguments_: function() {
var start = this.getTreeStartLocation_();
var args = [];
this.eat_(OPEN_PAREN);
if (!this.peek_(CLOSE_PAREN)) {
args.push(this.parseArgument_());
while (this.eatIf_(COMMA)) {
args.push(this.parseArgument_());
}
}
this.eat_(CLOSE_PAREN);
return new ArgumentList(this.getTreeLocation_(start), args);
},
parseArgument_: function() {
if (this.peekSpread_(this.peekType_()))
return this.parseSpreadExpression_();
return this.parseAssignmentExpression();
},
parseArrowFunction_: function(start, tree, asyncToken) {
var formals;
switch (tree.type) {
case IDENTIFIER_EXPRESSION:
tree = new BindingIdentifier(tree.location, tree.identifierToken);
case BINDING_IDENTIFIER:
formals = new FormalParameterList(this.getTreeLocation_(start), [new FormalParameter(tree.location, new BindingElement(tree.location, tree, null), null, [])]);
break;
case FORMAL_PARAMETER_LIST:
formals = tree;
break;
default:
formals = this.toFormalParameters_(start, tree, asyncToken);
}
this.eat_(ARROW);
var body = this.parseConciseBody_(asyncToken);
return new ArrowFunctionExpression(this.getTreeLocation_(start), asyncToken, formals, body);
},
parseCoverFormals_: function(start) {
var expressions = [];
if (!this.peek_(CLOSE_PAREN)) {
do {
var type = this.peekType_();
if (this.peekRest_(type)) {
expressions.push(this.parseRestParameter_());
break;
} else {
expressions.push(this.parseAssignmentExpression());
}
if (this.eatIf_(COMMA))
continue;
} while (!this.peek_(CLOSE_PAREN) && !this.isAtEnd());
}
this.eat_(CLOSE_PAREN);
return new CoverFormals(this.getTreeLocation_(start), expressions);
},
ensureNoCoverInitializedNames_: function(tree, coverInitializedNameCount) {
if (coverInitializedNameCount === this.coverInitializedNameCount_)
return;
var finder = new ValidateObjectLiteral(tree);
if (finder.found) {
var token = finder.errorToken;
this.reportError_(token.location, ("Unexpected token " + token));
}
},
toPrimaryExpression_: function(tree) {
if (tree.type === COVER_FORMALS)
return this.coverFormalsToParenExpression_(tree);
return tree;
},
validateCoverFormalsAsParenExpression_: function(tree) {
for (var i = 0; i < tree.expressions.length; i++) {
if (tree.expressions[i].type === REST_PARAMETER) {
var token = new Token(DOT_DOT_DOT, tree.expressions[i].location);
this.reportError_(token.location, ("Unexpected token " + token));
return;
}
}
},
coverFormalsToParenExpression_: function(tree) {
if (tree.type === COVER_FORMALS) {
var expressions = tree.expressions;
if (expressions.length === 0) {
var message = 'Unexpected token )';
this.reportError_(tree.location, message);
} else {
this.validateCoverFormalsAsParenExpression_(tree);
var expression;
if (expressions.length > 1)
expression = new CommaExpression(expressions[0].location, expressions);
else
expression = expressions[0];
return new ParenExpression(tree.location, expression);
}
}
return tree;
},
toFormalParameters_: function(start, tree, asyncToken) {
this.scanner_.index = start.offset;
return this.parseArrowFormalParameters_(asyncToken);
},
parseArrowFormalParameters_: function(asyncToken) {
if (asyncToken)
this.eat_(IDENTIFIER);
this.eat_(OPEN_PAREN);
var parameters = this.parseFormalParameters_();
this.eat_(CLOSE_PAREN);
return parameters;
},
peekArrow_: function(type) {
return type === ARROW && parseOptions.arrowFunctions;
},
parseConciseBody_: function(asyncToken) {
if (this.peek_(OPEN_CURLY))
return this.parseFunctionBody_(asyncToken);
var allowAwait = this.allowAwait_;
this.allowAwait_ = asyncToken !== null;
var expression = this.parseAssignmentExpression();
this.allowAwait_ = allowAwait;
return expression;
},
parseGeneratorComprehension_: function(start) {
var comprehensionList = this.parseComprehensionList_();
var expression = this.parseAssignmentExpression();
this.eat_(CLOSE_PAREN);
return new GeneratorComprehension(this.getTreeLocation_(start), comprehensionList, expression);
},
parseForBinding_: function() {
if (this.peekPattern_(this.peekType_()))
return this.parseBindingPattern_();
return this.parseBindingIdentifier_();
},
peekPattern_: function(type) {
return parseOptions.destructuring && (this.peekObjectPattern_(type) || this.peekArrayPattern_(type));
},
peekArrayPattern_: function(type) {
return type === OPEN_SQUARE;
},
peekObjectPattern_: function(type) {
return type === OPEN_CURLY;
},
parseBindingPattern_: function() {
return this.parsePattern_(true);
},
parsePattern_: function(useBinding) {
if (this.peekArrayPattern_(this.peekType_()))
return this.parseArrayPattern_(useBinding);
return this.parseObjectPattern_(useBinding);
},
parseArrayBindingPattern_: function() {
return this.parseArrayPattern_(true);
},
parsePatternElement_: function(useBinding) {
return useBinding ? this.parseBindingElement_() : this.parseAssignmentElement_();
},
parsePatternRestElement_: function(useBinding) {
return useBinding ? this.parseBindingRestElement_() : this.parseAssignmentRestElement_();
},
parseArrayPattern_: function(useBinding) {
var start = this.getTreeStartLocation_();
var elements = [];
this.eat_(OPEN_SQUARE);
var type;
while ((type = this.peekType_()) !== CLOSE_SQUARE && type !== END_OF_FILE) {
this.parseElisionOpt_(elements);
if (this.peekRest_(this.peekType_())) {
elements.push(this.parsePatternRestElement_(useBinding));
break;
} else {
elements.push(this.parsePatternElement_(useBinding));
if (this.peek_(COMMA) && !this.peek_(CLOSE_SQUARE, 1)) {
this.nextToken_();
}
}
}
this.eat_(CLOSE_SQUARE);
return new ArrayPattern(this.getTreeLocation_(start), elements);
},
parseBindingElementList_: function(elements) {
this.parseElisionOpt_(elements);
elements.push(this.parseBindingElement_());
while (this.eatIf_(COMMA)) {
this.parseElisionOpt_(elements);
elements.push(this.parseBindingElement_());
}
},
parseElisionOpt_: function(elements) {
while (this.eatIf_(COMMA)) {
elements.push(null);
}
},
peekBindingElement_: function(type) {
return this.peekBindingIdentifier_(type) || this.peekPattern_(type);
},
parseBindingElement_: function() {
var initializer = arguments[0] !== (void 0) ? arguments[0] : Initializer.OPTIONAL;
var start = this.getTreeStartLocation_();
var binding = this.parseBindingElementBinding_();
var initializer = this.parseBindingElementInitializer_(initializer);
return new BindingElement(this.getTreeLocation_(start), binding, initializer);
},
parseBindingElementBinding_: function() {
if (this.peekPattern_(this.peekType_()))
return this.parseBindingPattern_();
return this.parseBindingIdentifier_();
},
parseBindingElementInitializer_: function() {
var initializer = arguments[0] !== (void 0) ? arguments[0] : Initializer.OPTIONAL;
if (this.peek_(EQUAL) || initializer === Initializer.REQUIRED) {
return this.parseInitializer_();
}
return null;
},
parseBindingRestElement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DOT_DOT_DOT);
var identifier = this.parseBindingIdentifier_();
return new SpreadPatternElement(this.getTreeLocation_(start), identifier);
},
parseObjectPattern_: function(useBinding) {
var start = this.getTreeStartLocation_();
var elements = [];
this.eat_(OPEN_CURLY);
var type;
while ((type = this.peekType_()) !== CLOSE_CURLY && type !== END_OF_FILE) {
elements.push(this.parsePatternProperty_(useBinding));
if (!this.eatIf_(COMMA))
break;
}
this.eat_(CLOSE_CURLY);
return new ObjectPattern(this.getTreeLocation_(start), elements);
},
parsePatternProperty_: function(useBinding) {
var start = this.getTreeStartLocation_();
var name = this.parsePropertyName_();
var requireColon = name.type !== LITERAL_PROPERTY_NAME || !name.literalToken.isStrictKeyword() && name.literalToken.type !== IDENTIFIER;
if (requireColon || this.peek_(COLON)) {
this.eat_(COLON);
var element = this.parsePatternElement_(useBinding);
return new ObjectPatternField(this.getTreeLocation_(start), name, element);
}
var token = name.literalToken;
if (this.strictMode_ && token.isStrictKeyword())
this.reportReservedIdentifier_(token);
if (useBinding) {
var binding = new BindingIdentifier(name.location, token);
var initializer = this.parseInitializerOpt_(Expression.NORMAL);
return new BindingElement(this.getTreeLocation_(start), binding, initializer);
}
var assignment = new IdentifierExpression(name.location, token);
var initializer = this.parseInitializerOpt_(Expression.NORMAL);
return new AssignmentElement(this.getTreeLocation_(start), assignment, initializer);
},
parseAssignmentPattern_: function() {
return this.parsePattern_(false);
},
parseArrayAssignmentPattern_: function() {
return this.parseArrayPattern_(false);
},
parseAssignmentElement_: function() {
var start = this.getTreeStartLocation_();
var assignment = this.parseDestructuringAssignmentTarget_();
var initializer = this.parseInitializerOpt_(Expression.NORMAL);
return new AssignmentElement(this.getTreeLocation_(start), assignment, initializer);
},
parseDestructuringAssignmentTarget_: function() {
switch (this.peekType_()) {
case OPEN_SQUARE:
return this.parseArrayAssignmentPattern_();
case OPEN_CURLY:
return this.parseObjectAssignmentPattern_();
}
var expression = this.parseLeftHandSideExpression_();
return this.coverFormalsToParenExpression_(expression);
},
parseAssignmentRestElement_: function() {
var start = this.getTreeStartLocation_();
this.eat_(DOT_DOT_DOT);
var id = this.parseDestructuringAssignmentTarget_();
return new SpreadPatternElement(this.getTreeLocation_(start), id);
},
parseObjectAssignmentPattern_: function() {
return this.parseObjectPattern_(false);
},
parseAssignmentProperty_: function() {
return this.parsePatternProperty_(false);
},
parseTemplateLiteral_: function(operand) {
if (!parseOptions.templateLiterals)
return this.parseUnexpectedToken_('`');
var start = operand ? operand.location.start : this.getTreeStartLocation_();
var token = this.nextToken_();
var elements = [new TemplateLiteralPortion(token.location, token)];
if (token.type === NO_SUBSTITUTION_TEMPLATE) {
return new TemplateLiteralExpression(this.getTreeLocation_(start), operand, elements);
}
var expression = this.parseExpression();
elements.push(new TemplateSubstitution(expression.location, expression));
while (expression.type !== SYNTAX_ERROR_TREE) {
token = this.nextTemplateLiteralToken_();
if (token.type === ERROR || token.type === END_OF_FILE)
break;
elements.push(new TemplateLiteralPortion(token.location, token));
if (token.type === TEMPLATE_TAIL)
break;
expression = this.parseExpression();
elements.push(new TemplateSubstitution(expression.location, expression));
}
return new TemplateLiteralExpression(this.getTreeLocation_(start), operand, elements);
},
parseTypeAnnotationOpt_: function() {
if (parseOptions.types && this.eatOpt_(COLON)) {
return this.parseType_();
}
return null;
},
parseType_: function() {
var start = this.getTreeStartLocation_();
var elementType;
switch (this.peekType_()) {
case IDENTIFIER:
elementType = this.parseNamedOrPredefinedType_();
break;
case NEW:
elementType = this.parseConstructorType_();
break;
case OPEN_CURLY:
elementType = this.parseObjectType_();
break;
case OPEN_PAREN:
elementType = this.parseFunctionType_();
break;
case VOID:
var token = this.nextToken_();
return new PredefinedType(this.getTreeLocation_(start), token);
default:
return this.parseUnexpectedToken_(this.peekToken_());
}
return this.parseArrayTypeSuffix_(start, elementType);
},
parseArrayTypeSuffix_: function(start, elementType) {
return elementType;
},
parseConstructorType_: function() {
throw 'NYI';
},
parseObjectType_: function() {
throw 'NYI';
},
parseFunctionType_: function() {
throw 'NYI';
},
parseNamedOrPredefinedType_: function() {
var start = this.getTreeStartLocation_();
switch (this.peekToken_().value) {
case 'any':
case 'number':
case 'boolean':
case 'string':
var token = this.nextToken_();
return new PredefinedType(this.getTreeLocation_(start), token);
default:
return this.parseTypeName_();
}
},
parseTypeName_: function() {
var start = this.getTreeStartLocation_();
var typeName = new TypeName(this.getTreeLocation_(start), null, this.eatId_());
while (this.eatIf_(PERIOD)) {
var memberName = this.eatIdName_();
typeName = new TypeName(this.getTreeLocation_(start), typeName, memberName);
}
return typeName;
},
parseAnnotatedDeclarations_: function(allowModuleItem, allowScriptItem) {
this.pushAnnotations_();
var declaration = this.parseStatement_(this.peekType_(), allowModuleItem, allowScriptItem);
if (this.annotations_.length > 0)
return this.parseSyntaxError_('Unsupported annotated expression');
return declaration;
},
parseAnnotations_: function() {
var annotations = [];
while (this.eatIf_(AT)) {
annotations.push(this.parseAnnotation_());
}
return annotations;
},
pushAnnotations_: function() {
this.annotations_ = this.parseAnnotations_();
},
popAnnotations_: function() {
var annotations = this.annotations_;
this.annotations_ = [];
return annotations;
},
parseAnnotation_: function() {
var start = this.getTreeStartLocation_();
var expression = this.parseMemberExpressionNoNew_();
var args = null;
if (this.peek_(OPEN_PAREN))
args = this.parseArguments_();
return new Annotation(this.getTreeLocation_(start), expression, args);
},
eatPossibleImplicitSemiColon_: function() {
var token = this.peekTokenNoLineTerminator_();
if (!token)
return;
switch (token.type) {
case SEMI_COLON:
this.nextToken_();
return;
case END_OF_FILE:
case CLOSE_CURLY:
return;
}
this.reportError_('Semi-colon expected');
},
peekImplicitSemiColon_: function() {
switch (this.peekType_()) {
case SEMI_COLON:
case CLOSE_CURLY:
case END_OF_FILE:
return true;
}
var token = this.peekTokenNoLineTerminator_();
return token === null;
},
eatOpt_: function(expectedTokenType) {
if (this.peek_(expectedTokenType))
return this.nextToken_();
return null;
},
eatIdOpt_: function() {
return this.peek_(IDENTIFIER) ? this.eatId_() : null;
},
eatId_: function() {
var expected = arguments[0];
var token = this.nextToken_();
if (!token) {
if (expected)
this.reportError_(this.peekToken_(), ("expected '" + expected + "'"));
return null;
}
if (token.type === IDENTIFIER) {
if (expected && token.value !== expected)
this.reportExpectedError_(token, expected);
return token;
}
if (token.isStrictKeyword()) {
if (this.strictMode_) {
this.reportReservedIdentifier_(token);
} else {
return new IdentifierToken(token.location, token.type);
}
} else {
this.reportExpectedError_(token, expected || 'identifier');
}
return token;
},
eatIdName_: function() {
var t = this.nextToken_();
if (t.type != IDENTIFIER) {
if (!t.isKeyword()) {
this.reportExpectedError_(t, 'identifier');
return null;
}
return new IdentifierToken(t.location, t.type);
}
return t;
},
eat_: function(expectedTokenType) {
var token = this.nextToken_();
if (token.type != expectedTokenType) {
this.reportExpectedError_(token, expectedTokenType);
return null;
}
return token;
},
eatIf_: function(expectedTokenType) {
if (this.peek_(expectedTokenType)) {
this.nextToken_();
return true;
}
return false;
},
reportExpectedError_: function(token, expected) {
this.reportError_(token, ("Unexpected token " + token));
},
getTreeStartLocation_: function() {
return this.peekToken_().location.start;
},
getTreeEndLocation_: function() {
return this.scanner_.lastToken.location.end;
},
getTreeLocation_: function(start) {
return new SourceRange(start, this.getTreeEndLocation_());
},
handleComment: function(range) {},
nextToken_: function() {
return this.scanner_.nextToken();
},
nextRegularExpressionLiteralToken_: function() {
return this.scanner_.nextRegularExpressionLiteralToken();
},
nextTemplateLiteralToken_: function() {
return this.scanner_.nextTemplateLiteralToken();
},
isAtEnd: function() {
return this.scanner_.isAtEnd();
},
peek_: function(expectedType, opt_index) {
return this.peekToken_(opt_index).type === expectedType;
},
peekType_: function() {
return this.peekToken_().type;
},
peekToken_: function(opt_index) {
return this.scanner_.peekToken(opt_index);
},
peekTokenNoLineTerminator_: function() {
return this.scanner_.peekTokenNoLineTerminator();
},
reportError_: function() {
for (var args = [],
$__142 = 0; $__142 < arguments.length; $__142++)
args[$__142] = arguments[$__142];
if (args.length == 1) {
this.errorReporter_.reportError(this.scanner_.getPosition(), args[0]);
} else {
var location = args[0];
if (location instanceof Token) {
location = location.location;
}
this.errorReporter_.reportError(location.start, args[1]);
}
},
reportReservedIdentifier_: function(token) {
this.reportError_(token, (token.type + " is a reserved identifier"));
}
}, {});
return {get Parser() {
return Parser;
}};
});
System.register("traceur@0.0.52/src/util/SourcePosition", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/SourcePosition";
var SourcePosition = function SourcePosition(source, offset) {
this.source = source;
this.offset = offset;
this.line_ = -1;
this.column_ = -1;
};
($traceurRuntime.createClass)(SourcePosition, {
get line() {
if (this.line_ === -1)
this.line_ = this.source.lineNumberTable.getLine(this.offset);
return this.line_;
},
get column() {
if (this.column_ === -1)
this.column_ = this.source.lineNumberTable.getColumn(this.offset);
return this.column_;
},
toString: function() {
var name = this.source ? this.source.name : '';
return (name + ":" + (this.line + 1) + ":" + (this.column + 1));
}
}, {});
return {get SourcePosition() {
return SourcePosition;
}};
});
System.register("traceur@0.0.52/src/syntax/LineNumberTable", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/LineNumberTable";
var SourcePosition = System.get("traceur@0.0.52/src/util/SourcePosition").SourcePosition;
var SourceRange = System.get("traceur@0.0.52/src/util/SourceRange").SourceRange;
var isLineTerminator = System.get("traceur@0.0.52/src/syntax/Scanner").isLineTerminator;
var MAX_INT_REPRESENTATION = 9007199254740992;
function computeLineStartOffsets(source) {
var lineStartOffsets = [0];
var k = 1;
for (var index = 0; index < source.length; index++) {
var code = source.charCodeAt(index);
if (isLineTerminator(code)) {
if (code === 13 && source.charCodeAt(index + 1) === 10) {
index++;
}
lineStartOffsets[k++] = index + 1;
}
}
lineStartOffsets[k++] = MAX_INT_REPRESENTATION;
return lineStartOffsets;
}
var LineNumberTable = function LineNumberTable(sourceFile) {
this.sourceFile_ = sourceFile;
this.lineStartOffsets_ = null;
this.lastLine_ = 0;
this.lastOffset_ = -1;
};
($traceurRuntime.createClass)(LineNumberTable, {
ensureLineStartOffsets_: function() {
if (!this.lineStartOffsets_) {
this.lineStartOffsets_ = computeLineStartOffsets(this.sourceFile_.contents);
}
},
getSourcePosition: function(offset) {
return new SourcePosition(this.sourceFile_, offset);
},
getLine: function(offset) {
if (offset === this.lastOffset_)
return this.lastLine_;
this.ensureLineStartOffsets_();
if (offset < 0)
return 0;
var line;
if (offset < this.lastOffset_) {
for (var i = this.lastLine_; i >= 0; i--) {
if (this.lineStartOffsets_[i] <= offset) {
line = i;
break;
}
}
} else {
for (var i = this.lastLine_; true; i++) {
if (this.lineStartOffsets_[i] > offset) {
line = i - 1;
break;
}
}
}
this.lastLine_ = line;
this.lastOffset_ = offset;
return line;
},
offsetOfLine: function(line) {
this.ensureLineStartOffsets_();
return this.lineStartOffsets_[line];
},
getColumn: function(offset) {
var line = this.getLine(offset);
return offset - this.lineStartOffsets_[line];
},
getSourceRange: function(startOffset, endOffset) {
return new SourceRange(this.getSourcePosition(startOffset), this.getSourcePosition(endOffset));
}
}, {});
return {get LineNumberTable() {
return LineNumberTable;
}};
});
System.register("traceur@0.0.52/src/syntax/SourceFile", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/SourceFile";
var LineNumberTable = System.get("traceur@0.0.52/src/syntax/LineNumberTable").LineNumberTable;
var SourceFile = function SourceFile(name, contents) {
this.name = name;
this.contents = contents;
this.lineNumberTable = new LineNumberTable(this);
};
($traceurRuntime.createClass)(SourceFile, {}, {});
return {get SourceFile() {
return SourceFile;
}};
});
System.register("traceur@0.0.52/src/util/MutedErrorReporter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/MutedErrorReporter";
var ErrorReporter = System.get("traceur@0.0.52/src/util/ErrorReporter").ErrorReporter;
var MutedErrorReporter = function MutedErrorReporter() {
$traceurRuntime.defaultSuperCall(this, $MutedErrorReporter.prototype, arguments);
};
var $MutedErrorReporter = MutedErrorReporter;
($traceurRuntime.createClass)(MutedErrorReporter, {reportMessageInternal: function(location, format, args) {}}, {}, ErrorReporter);
return {get MutedErrorReporter() {
return MutedErrorReporter;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ParseTreeTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ParseTreeTransformer";
var $__152 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
Annotation = $__152.Annotation,
AnonBlock = $__152.AnonBlock,
ArgumentList = $__152.ArgumentList,
ArrayComprehension = $__152.ArrayComprehension,
ArrayLiteralExpression = $__152.ArrayLiteralExpression,
ArrayPattern = $__152.ArrayPattern,
ArrowFunctionExpression = $__152.ArrowFunctionExpression,
AssignmentElement = $__152.AssignmentElement,
AwaitExpression = $__152.AwaitExpression,
BinaryExpression = $__152.BinaryExpression,
BindingElement = $__152.BindingElement,
BindingIdentifier = $__152.BindingIdentifier,
Block = $__152.Block,
BreakStatement = $__152.BreakStatement,
CallExpression = $__152.CallExpression,
CaseClause = $__152.CaseClause,
Catch = $__152.Catch,
ClassDeclaration = $__152.ClassDeclaration,
ClassExpression = $__152.ClassExpression,
CommaExpression = $__152.CommaExpression,
ComprehensionFor = $__152.ComprehensionFor,
ComprehensionIf = $__152.ComprehensionIf,
ComputedPropertyName = $__152.ComputedPropertyName,
ConditionalExpression = $__152.ConditionalExpression,
ContinueStatement = $__152.ContinueStatement,
CoverFormals = $__152.CoverFormals,
CoverInitializedName = $__152.CoverInitializedName,
DebuggerStatement = $__152.DebuggerStatement,
DefaultClause = $__152.DefaultClause,
DoWhileStatement = $__152.DoWhileStatement,
EmptyStatement = $__152.EmptyStatement,
ExportDeclaration = $__152.ExportDeclaration,
ExportDefault = $__152.ExportDefault,
ExportSpecifier = $__152.ExportSpecifier,
ExportSpecifierSet = $__152.ExportSpecifierSet,
ExportStar = $__152.ExportStar,
ExpressionStatement = $__152.ExpressionStatement,
Finally = $__152.Finally,
ForInStatement = $__152.ForInStatement,
ForOfStatement = $__152.ForOfStatement,
ForStatement = $__152.ForStatement,
FormalParameter = $__152.FormalParameter,
FormalParameterList = $__152.FormalParameterList,
FunctionBody = $__152.FunctionBody,
FunctionDeclaration = $__152.FunctionDeclaration,
FunctionExpression = $__152.FunctionExpression,
GeneratorComprehension = $__152.GeneratorComprehension,
GetAccessor = $__152.GetAccessor,
IdentifierExpression = $__152.IdentifierExpression,
IfStatement = $__152.IfStatement,
ImportedBinding = $__152.ImportedBinding,
ImportDeclaration = $__152.ImportDeclaration,
ImportSpecifier = $__152.ImportSpecifier,
ImportSpecifierSet = $__152.ImportSpecifierSet,
LabelledStatement = $__152.LabelledStatement,
LiteralExpression = $__152.LiteralExpression,
LiteralPropertyName = $__152.LiteralPropertyName,
MemberExpression = $__152.MemberExpression,
MemberLookupExpression = $__152.MemberLookupExpression,
Module = $__152.Module,
ModuleDeclaration = $__152.ModuleDeclaration,
ModuleSpecifier = $__152.ModuleSpecifier,
NamedExport = $__152.NamedExport,
NewExpression = $__152.NewExpression,
ObjectLiteralExpression = $__152.ObjectLiteralExpression,
ObjectPattern = $__152.ObjectPattern,
ObjectPatternField = $__152.ObjectPatternField,
ParenExpression = $__152.ParenExpression,
PostfixExpression = $__152.PostfixExpression,
PredefinedType = $__152.PredefinedType,
Script = $__152.Script,
PropertyMethodAssignment = $__152.PropertyMethodAssignment,
PropertyNameAssignment = $__152.PropertyNameAssignment,
PropertyNameShorthand = $__152.PropertyNameShorthand,
RestParameter = $__152.RestParameter,
ReturnStatement = $__152.ReturnStatement,
SetAccessor = $__152.SetAccessor,
SpreadExpression = $__152.SpreadExpression,
SpreadPatternElement = $__152.SpreadPatternElement,
SuperExpression = $__152.SuperExpression,
SwitchStatement = $__152.SwitchStatement,
SyntaxErrorTree = $__152.SyntaxErrorTree,
TemplateLiteralExpression = $__152.TemplateLiteralExpression,
TemplateLiteralPortion = $__152.TemplateLiteralPortion,
TemplateSubstitution = $__152.TemplateSubstitution,
ThisExpression = $__152.ThisExpression,
ThrowStatement = $__152.ThrowStatement,
TryStatement = $__152.TryStatement,
TypeName = $__152.TypeName,
UnaryExpression = $__152.UnaryExpression,
VariableDeclaration = $__152.VariableDeclaration,
VariableDeclarationList = $__152.VariableDeclarationList,
VariableStatement = $__152.VariableStatement,
WhileStatement = $__152.WhileStatement,
WithStatement = $__152.WithStatement,
YieldExpression = $__152.YieldExpression;
var ParseTreeTransformer = function ParseTreeTransformer() {};
($traceurRuntime.createClass)(ParseTreeTransformer, {
transformAny: function(tree) {
return tree && tree.transform(this);
},
transformList: function(list) {
var $__154;
var builder = null;
for (var index = 0; index < list.length; index++) {
var element = list[index];
var transformed = this.transformAny(element);
if (builder != null || element != transformed) {
if (builder == null) {
builder = list.slice(0, index);
}
if (transformed instanceof AnonBlock)
($__154 = builder).push.apply($__154, $traceurRuntime.spread(transformed.statements));
else
builder.push(transformed);
}
}
return builder || list;
},
transformStateMachine: function(tree) {
throw Error('State machines should not live outside of the GeneratorTransformer.');
},
transformAnnotation: function(tree) {
var name = this.transformAny(tree.name);
var args = this.transformAny(tree.args);
if (name === tree.name && args === tree.args) {
return tree;
}
return new Annotation(tree.location, name, args);
},
transformAnonBlock: function(tree) {
var statements = this.transformList(tree.statements);
if (statements === tree.statements) {
return tree;
}
return new AnonBlock(tree.location, statements);
},
transformArgumentList: function(tree) {
var args = this.transformList(tree.args);
if (args === tree.args) {
return tree;
}
return new ArgumentList(tree.location, args);
},
transformArrayComprehension: function(tree) {
var comprehensionList = this.transformList(tree.comprehensionList);
var expression = this.transformAny(tree.expression);
if (comprehensionList === tree.comprehensionList && expression === tree.expression) {
return tree;
}
return new ArrayComprehension(tree.location, comprehensionList, expression);
},
transformArrayLiteralExpression: function(tree) {
var elements = this.transformList(tree.elements);
if (elements === tree.elements) {
return tree;
}
return new ArrayLiteralExpression(tree.location, elements);
},
transformArrayPattern: function(tree) {
var elements = this.transformList(tree.elements);
if (elements === tree.elements) {
return tree;
}
return new ArrayPattern(tree.location, elements);
},
transformArrowFunctionExpression: function(tree) {
var parameterList = this.transformAny(tree.parameterList);
var body = this.transformAny(tree.body);
if (parameterList === tree.parameterList && body === tree.body) {
return tree;
}
return new ArrowFunctionExpression(tree.location, tree.functionKind, parameterList, body);
},
transformAssignmentElement: function(tree) {
var assignment = this.transformAny(tree.assignment);
var initializer = this.transformAny(tree.initializer);
if (assignment === tree.assignment && initializer === tree.initializer) {
return tree;
}
return new AssignmentElement(tree.location, assignment, initializer);
},
transformAwaitExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new AwaitExpression(tree.location, expression);
},
transformBinaryExpression: function(tree) {
var left = this.transformAny(tree.left);
var right = this.transformAny(tree.right);
if (left === tree.left && right === tree.right) {
return tree;
}
return new BinaryExpression(tree.location, left, tree.operator, right);
},
transformBindingElement: function(tree) {
var binding = this.transformAny(tree.binding);
var initializer = this.transformAny(tree.initializer);
if (binding === tree.binding && initializer === tree.initializer) {
return tree;
}
return new BindingElement(tree.location, binding, initializer);
},
transformBindingIdentifier: function(tree) {
return tree;
},
transformBlock: function(tree) {
var statements = this.transformList(tree.statements);
if (statements === tree.statements) {
return tree;
}
return new Block(tree.location, statements);
},
transformBreakStatement: function(tree) {
return tree;
},
transformCallExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var args = this.transformAny(tree.args);
if (operand === tree.operand && args === tree.args) {
return tree;
}
return new CallExpression(tree.location, operand, args);
},
transformCaseClause: function(tree) {
var expression = this.transformAny(tree.expression);
var statements = this.transformList(tree.statements);
if (expression === tree.expression && statements === tree.statements) {
return tree;
}
return new CaseClause(tree.location, expression, statements);
},
transformCatch: function(tree) {
var binding = this.transformAny(tree.binding);
var catchBody = this.transformAny(tree.catchBody);
if (binding === tree.binding && catchBody === tree.catchBody) {
return tree;
}
return new Catch(tree.location, binding, catchBody);
},
transformClassDeclaration: function(tree) {
var name = this.transformAny(tree.name);
var superClass = this.transformAny(tree.superClass);
var elements = this.transformList(tree.elements);
var annotations = this.transformList(tree.annotations);
if (name === tree.name && superClass === tree.superClass && elements === tree.elements && annotations === tree.annotations) {
return tree;
}
return new ClassDeclaration(tree.location, name, superClass, elements, annotations);
},
transformClassExpression: function(tree) {
var name = this.transformAny(tree.name);
var superClass = this.transformAny(tree.superClass);
var elements = this.transformList(tree.elements);
var annotations = this.transformList(tree.annotations);
if (name === tree.name && superClass === tree.superClass && elements === tree.elements && annotations === tree.annotations) {
return tree;
}
return new ClassExpression(tree.location, name, superClass, elements, annotations);
},
transformCommaExpression: function(tree) {
var expressions = this.transformList(tree.expressions);
if (expressions === tree.expressions) {
return tree;
}
return new CommaExpression(tree.location, expressions);
},
transformComprehensionFor: function(tree) {
var left = this.transformAny(tree.left);
var iterator = this.transformAny(tree.iterator);
if (left === tree.left && iterator === tree.iterator) {
return tree;
}
return new ComprehensionFor(tree.location, left, iterator);
},
transformComprehensionIf: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ComprehensionIf(tree.location, expression);
},
transformComputedPropertyName: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ComputedPropertyName(tree.location, expression);
},
transformConditionalExpression: function(tree) {
var condition = this.transformAny(tree.condition);
var left = this.transformAny(tree.left);
var right = this.transformAny(tree.right);
if (condition === tree.condition && left === tree.left && right === tree.right) {
return tree;
}
return new ConditionalExpression(tree.location, condition, left, right);
},
transformContinueStatement: function(tree) {
return tree;
},
transformCoverFormals: function(tree) {
var expressions = this.transformList(tree.expressions);
if (expressions === tree.expressions) {
return tree;
}
return new CoverFormals(tree.location, expressions);
},
transformCoverInitializedName: function(tree) {
var initializer = this.transformAny(tree.initializer);
if (initializer === tree.initializer) {
return tree;
}
return new CoverInitializedName(tree.location, tree.name, tree.equalToken, initializer);
},
transformDebuggerStatement: function(tree) {
return tree;
},
transformDefaultClause: function(tree) {
var statements = this.transformList(tree.statements);
if (statements === tree.statements) {
return tree;
}
return new DefaultClause(tree.location, statements);
},
transformDoWhileStatement: function(tree) {
var body = this.transformAny(tree.body);
var condition = this.transformAny(tree.condition);
if (body === tree.body && condition === tree.condition) {
return tree;
}
return new DoWhileStatement(tree.location, body, condition);
},
transformEmptyStatement: function(tree) {
return tree;
},
transformExportDeclaration: function(tree) {
var declaration = this.transformAny(tree.declaration);
var annotations = this.transformList(tree.annotations);
if (declaration === tree.declaration && annotations === tree.annotations) {
return tree;
}
return new ExportDeclaration(tree.location, declaration, annotations);
},
transformExportDefault: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ExportDefault(tree.location, expression);
},
transformExportSpecifier: function(tree) {
return tree;
},
transformExportSpecifierSet: function(tree) {
var specifiers = this.transformList(tree.specifiers);
if (specifiers === tree.specifiers) {
return tree;
}
return new ExportSpecifierSet(tree.location, specifiers);
},
transformExportStar: function(tree) {
return tree;
},
transformExpressionStatement: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ExpressionStatement(tree.location, expression);
},
transformFinally: function(tree) {
var block = this.transformAny(tree.block);
if (block === tree.block) {
return tree;
}
return new Finally(tree.location, block);
},
transformForInStatement: function(tree) {
var initializer = this.transformAny(tree.initializer);
var collection = this.transformAny(tree.collection);
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && collection === tree.collection && body === tree.body) {
return tree;
}
return new ForInStatement(tree.location, initializer, collection, body);
},
transformForOfStatement: function(tree) {
var initializer = this.transformAny(tree.initializer);
var collection = this.transformAny(tree.collection);
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && collection === tree.collection && body === tree.body) {
return tree;
}
return new ForOfStatement(tree.location, initializer, collection, body);
},
transformForStatement: function(tree) {
var initializer = this.transformAny(tree.initializer);
var condition = this.transformAny(tree.condition);
var increment = this.transformAny(tree.increment);
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && condition === tree.condition && increment === tree.increment && body === tree.body) {
return tree;
}
return new ForStatement(tree.location, initializer, condition, increment, body);
},
transformFormalParameter: function(tree) {
var parameter = this.transformAny(tree.parameter);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var annotations = this.transformList(tree.annotations);
if (parameter === tree.parameter && typeAnnotation === tree.typeAnnotation && annotations === tree.annotations) {
return tree;
}
return new FormalParameter(tree.location, parameter, typeAnnotation, annotations);
},
transformFormalParameterList: function(tree) {
var parameters = this.transformList(tree.parameters);
if (parameters === tree.parameters) {
return tree;
}
return new FormalParameterList(tree.location, parameters);
},
transformFunctionBody: function(tree) {
var statements = this.transformList(tree.statements);
if (statements === tree.statements) {
return tree;
}
return new FunctionBody(tree.location, statements);
},
transformFunctionDeclaration: function(tree) {
var name = this.transformAny(tree.name);
var parameterList = this.transformAny(tree.parameterList);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var annotations = this.transformList(tree.annotations);
var body = this.transformAny(tree.body);
if (name === tree.name && parameterList === tree.parameterList && typeAnnotation === tree.typeAnnotation && annotations === tree.annotations && body === tree.body) {
return tree;
}
return new FunctionDeclaration(tree.location, name, tree.functionKind, parameterList, typeAnnotation, annotations, body);
},
transformFunctionExpression: function(tree) {
var name = this.transformAny(tree.name);
var parameterList = this.transformAny(tree.parameterList);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var annotations = this.transformList(tree.annotations);
var body = this.transformAny(tree.body);
if (name === tree.name && parameterList === tree.parameterList && typeAnnotation === tree.typeAnnotation && annotations === tree.annotations && body === tree.body) {
return tree;
}
return new FunctionExpression(tree.location, name, tree.functionKind, parameterList, typeAnnotation, annotations, body);
},
transformGeneratorComprehension: function(tree) {
var comprehensionList = this.transformList(tree.comprehensionList);
var expression = this.transformAny(tree.expression);
if (comprehensionList === tree.comprehensionList && expression === tree.expression) {
return tree;
}
return new GeneratorComprehension(tree.location, comprehensionList, expression);
},
transformGetAccessor: function(tree) {
var name = this.transformAny(tree.name);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var annotations = this.transformList(tree.annotations);
var body = this.transformAny(tree.body);
if (name === tree.name && typeAnnotation === tree.typeAnnotation && annotations === tree.annotations && body === tree.body) {
return tree;
}
return new GetAccessor(tree.location, tree.isStatic, name, typeAnnotation, annotations, body);
},
transformIdentifierExpression: function(tree) {
return tree;
},
transformIfStatement: function(tree) {
var condition = this.transformAny(tree.condition);
var ifClause = this.transformAny(tree.ifClause);
var elseClause = this.transformAny(tree.elseClause);
if (condition === tree.condition && ifClause === tree.ifClause && elseClause === tree.elseClause) {
return tree;
}
return new IfStatement(tree.location, condition, ifClause, elseClause);
},
transformImportedBinding: function(tree) {
var binding = this.transformAny(tree.binding);
if (binding === tree.binding) {
return tree;
}
return new ImportedBinding(tree.location, binding);
},
transformImportDeclaration: function(tree) {
var importClause = this.transformAny(tree.importClause);
var moduleSpecifier = this.transformAny(tree.moduleSpecifier);
if (importClause === tree.importClause && moduleSpecifier === tree.moduleSpecifier) {
return tree;
}
return new ImportDeclaration(tree.location, importClause, moduleSpecifier);
},
transformImportSpecifier: function(tree) {
return tree;
},
transformImportSpecifierSet: function(tree) {
var specifiers = this.transformList(tree.specifiers);
if (specifiers === tree.specifiers) {
return tree;
}
return new ImportSpecifierSet(tree.location, specifiers);
},
transformLabelledStatement: function(tree) {
var statement = this.transformAny(tree.statement);
if (statement === tree.statement) {
return tree;
}
return new LabelledStatement(tree.location, tree.name, statement);
},
transformLiteralExpression: function(tree) {
return tree;
},
transformLiteralPropertyName: function(tree) {
return tree;
},
transformMemberExpression: function(tree) {
var operand = this.transformAny(tree.operand);
if (operand === tree.operand) {
return tree;
}
return new MemberExpression(tree.location, operand, tree.memberName);
},
transformMemberLookupExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var memberExpression = this.transformAny(tree.memberExpression);
if (operand === tree.operand && memberExpression === tree.memberExpression) {
return tree;
}
return new MemberLookupExpression(tree.location, operand, memberExpression);
},
transformModule: function(tree) {
var scriptItemList = this.transformList(tree.scriptItemList);
if (scriptItemList === tree.scriptItemList) {
return tree;
}
return new Module(tree.location, scriptItemList, tree.moduleName);
},
transformModuleDeclaration: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ModuleDeclaration(tree.location, tree.identifier, expression);
},
transformModuleSpecifier: function(tree) {
return tree;
},
transformNamedExport: function(tree) {
var moduleSpecifier = this.transformAny(tree.moduleSpecifier);
var specifierSet = this.transformAny(tree.specifierSet);
if (moduleSpecifier === tree.moduleSpecifier && specifierSet === tree.specifierSet) {
return tree;
}
return new NamedExport(tree.location, moduleSpecifier, specifierSet);
},
transformNewExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var args = this.transformAny(tree.args);
if (operand === tree.operand && args === tree.args) {
return tree;
}
return new NewExpression(tree.location, operand, args);
},
transformObjectLiteralExpression: function(tree) {
var propertyNameAndValues = this.transformList(tree.propertyNameAndValues);
if (propertyNameAndValues === tree.propertyNameAndValues) {
return tree;
}
return new ObjectLiteralExpression(tree.location, propertyNameAndValues);
},
transformObjectPattern: function(tree) {
var fields = this.transformList(tree.fields);
if (fields === tree.fields) {
return tree;
}
return new ObjectPattern(tree.location, fields);
},
transformObjectPatternField: function(tree) {
var name = this.transformAny(tree.name);
var element = this.transformAny(tree.element);
if (name === tree.name && element === tree.element) {
return tree;
}
return new ObjectPatternField(tree.location, name, element);
},
transformParenExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ParenExpression(tree.location, expression);
},
transformPostfixExpression: function(tree) {
var operand = this.transformAny(tree.operand);
if (operand === tree.operand) {
return tree;
}
return new PostfixExpression(tree.location, operand, tree.operator);
},
transformPredefinedType: function(tree) {
return tree;
},
transformScript: function(tree) {
var scriptItemList = this.transformList(tree.scriptItemList);
if (scriptItemList === tree.scriptItemList) {
return tree;
}
return new Script(tree.location, scriptItemList, tree.moduleName);
},
transformPropertyMethodAssignment: function(tree) {
var name = this.transformAny(tree.name);
var parameterList = this.transformAny(tree.parameterList);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var annotations = this.transformList(tree.annotations);
var body = this.transformAny(tree.body);
if (name === tree.name && parameterList === tree.parameterList && typeAnnotation === tree.typeAnnotation && annotations === tree.annotations && body === tree.body) {
return tree;
}
return new PropertyMethodAssignment(tree.location, tree.isStatic, tree.functionKind, name, parameterList, typeAnnotation, annotations, body);
},
transformPropertyNameAssignment: function(tree) {
var name = this.transformAny(tree.name);
var value = this.transformAny(tree.value);
if (name === tree.name && value === tree.value) {
return tree;
}
return new PropertyNameAssignment(tree.location, name, value);
},
transformPropertyNameShorthand: function(tree) {
return tree;
},
transformRestParameter: function(tree) {
var identifier = this.transformAny(tree.identifier);
if (identifier === tree.identifier) {
return tree;
}
return new RestParameter(tree.location, identifier);
},
transformReturnStatement: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new ReturnStatement(tree.location, expression);
},
transformSetAccessor: function(tree) {
var name = this.transformAny(tree.name);
var parameterList = this.transformAny(tree.parameterList);
var annotations = this.transformList(tree.annotations);
var body = this.transformAny(tree.body);
if (name === tree.name && parameterList === tree.parameterList && annotations === tree.annotations && body === tree.body) {
return tree;
}
return new SetAccessor(tree.location, tree.isStatic, name, parameterList, annotations, body);
},
transformSpreadExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new SpreadExpression(tree.location, expression);
},
transformSpreadPatternElement: function(tree) {
var lvalue = this.transformAny(tree.lvalue);
if (lvalue === tree.lvalue) {
return tree;
}
return new SpreadPatternElement(tree.location, lvalue);
},
transformSuperExpression: function(tree) {
return tree;
},
transformSwitchStatement: function(tree) {
var expression = this.transformAny(tree.expression);
var caseClauses = this.transformList(tree.caseClauses);
if (expression === tree.expression && caseClauses === tree.caseClauses) {
return tree;
}
return new SwitchStatement(tree.location, expression, caseClauses);
},
transformSyntaxErrorTree: function(tree) {
return tree;
},
transformTemplateLiteralExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var elements = this.transformList(tree.elements);
if (operand === tree.operand && elements === tree.elements) {
return tree;
}
return new TemplateLiteralExpression(tree.location, operand, elements);
},
transformTemplateLiteralPortion: function(tree) {
return tree;
},
transformTemplateSubstitution: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new TemplateSubstitution(tree.location, expression);
},
transformThisExpression: function(tree) {
return tree;
},
transformThrowStatement: function(tree) {
var value = this.transformAny(tree.value);
if (value === tree.value) {
return tree;
}
return new ThrowStatement(tree.location, value);
},
transformTryStatement: function(tree) {
var body = this.transformAny(tree.body);
var catchBlock = this.transformAny(tree.catchBlock);
var finallyBlock = this.transformAny(tree.finallyBlock);
if (body === tree.body && catchBlock === tree.catchBlock && finallyBlock === tree.finallyBlock) {
return tree;
}
return new TryStatement(tree.location, body, catchBlock, finallyBlock);
},
transformTypeName: function(tree) {
var moduleName = this.transformAny(tree.moduleName);
if (moduleName === tree.moduleName) {
return tree;
}
return new TypeName(tree.location, moduleName, tree.name);
},
transformUnaryExpression: function(tree) {
var operand = this.transformAny(tree.operand);
if (operand === tree.operand) {
return tree;
}
return new UnaryExpression(tree.location, tree.operator, operand);
},
transformVariableDeclaration: function(tree) {
var lvalue = this.transformAny(tree.lvalue);
var typeAnnotation = this.transformAny(tree.typeAnnotation);
var initializer = this.transformAny(tree.initializer);
if (lvalue === tree.lvalue && typeAnnotation === tree.typeAnnotation && initializer === tree.initializer) {
return tree;
}
return new VariableDeclaration(tree.location, lvalue, typeAnnotation, initializer);
},
transformVariableDeclarationList: function(tree) {
var declarations = this.transformList(tree.declarations);
if (declarations === tree.declarations) {
return tree;
}
return new VariableDeclarationList(tree.location, tree.declarationType, declarations);
},
transformVariableStatement: function(tree) {
var declarations = this.transformAny(tree.declarations);
if (declarations === tree.declarations) {
return tree;
}
return new VariableStatement(tree.location, declarations);
},
transformWhileStatement: function(tree) {
var condition = this.transformAny(tree.condition);
var body = this.transformAny(tree.body);
if (condition === tree.condition && body === tree.body) {
return tree;
}
return new WhileStatement(tree.location, condition, body);
},
transformWithStatement: function(tree) {
var expression = this.transformAny(tree.expression);
var body = this.transformAny(tree.body);
if (expression === tree.expression && body === tree.body) {
return tree;
}
return new WithStatement(tree.location, expression, body);
},
transformYieldExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression) {
return tree;
}
return new YieldExpression(tree.location, expression, tree.isYieldFor);
}
}, {});
return {get ParseTreeTransformer() {
return ParseTreeTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/PlaceholderParser", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/PlaceholderParser";
var $__155 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARGUMENT_LIST = $__155.ARGUMENT_LIST,
BLOCK = $__155.BLOCK,
EXPRESSION_STATEMENT = $__155.EXPRESSION_STATEMENT,
IDENTIFIER_EXPRESSION = $__155.IDENTIFIER_EXPRESSION;
var IdentifierToken = System.get("traceur@0.0.52/src/syntax/IdentifierToken").IdentifierToken;
var LiteralToken = System.get("traceur@0.0.52/src/syntax/LiteralToken").LiteralToken;
var Map = System.get("traceur@0.0.52/src/runtime/polyfills/Map").Map;
var MutedErrorReporter = System.get("traceur@0.0.52/src/util/MutedErrorReporter").MutedErrorReporter;
var ParseTree = System.get("traceur@0.0.52/src/syntax/trees/ParseTree").ParseTree;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var Parser = System.get("traceur@0.0.52/src/syntax/Parser").Parser;
var $__163 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
LiteralExpression = $__163.LiteralExpression,
LiteralPropertyName = $__163.LiteralPropertyName;
var SourceFile = System.get("traceur@0.0.52/src/syntax/SourceFile").SourceFile;
var IDENTIFIER = System.get("traceur@0.0.52/src/syntax/TokenType").IDENTIFIER;
var $__166 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArrayLiteralExpression = $__166.createArrayLiteralExpression,
createBindingIdentifier = $__166.createBindingIdentifier,
createBlock = $__166.createBlock,
createBooleanLiteral = $__166.createBooleanLiteral,
createCommaExpression = $__166.createCommaExpression,
createExpressionStatement = $__166.createExpressionStatement,
createFunctionBody = $__166.createFunctionBody,
createIdentifierExpression = $__166.createIdentifierExpression,
createIdentifierToken = $__166.createIdentifierToken,
createMemberExpression = $__166.createMemberExpression,
createNullLiteral = $__166.createNullLiteral,
createNumberLiteral = $__166.createNumberLiteral,
createParenExpression = $__166.createParenExpression,
createStringLiteral = $__166.createStringLiteral,
createVoid0 = $__166.createVoid0;
var NOT_FOUND = {};
var PREFIX = '$__placeholder__';
var cache = new Map();
function parseExpression(sourceLiterals) {
for (var values = [],
$__168 = 1; $__168 < arguments.length; $__168++)
values[$__168 - 1] = arguments[$__168];
return parse(sourceLiterals, values, (function() {
return new PlaceholderParser().parseExpression(sourceLiterals);
}));
}
function parseStatement(sourceLiterals) {
for (var values = [],
$__169 = 1; $__169 < arguments.length; $__169++)
values[$__169 - 1] = arguments[$__169];
return parse(sourceLiterals, values, (function() {
return new PlaceholderParser().parseStatement(sourceLiterals);
}));
}
function parseStatements(sourceLiterals) {
for (var values = [],
$__170 = 1; $__170 < arguments.length; $__170++)
values[$__170 - 1] = arguments[$__170];
return parse(sourceLiterals, values, (function() {
return new PlaceholderParser().parseStatements(sourceLiterals);
}));
}
function parsePropertyDefinition(sourceLiterals) {
for (var values = [],
$__171 = 1; $__171 < arguments.length; $__171++)
values[$__171 - 1] = arguments[$__171];
return parse(sourceLiterals, values, (function() {
return new PlaceholderParser().parsePropertyDefinition(sourceLiterals);
}));
}
function parse(sourceLiterals, values, doParse) {
var tree = cache.get(sourceLiterals);
if (!tree) {
tree = doParse();
cache.set(sourceLiterals, tree);
}
if (!values.length)
return tree;
if (tree instanceof ParseTree)
return new PlaceholderTransformer(values).transformAny(tree);
return new PlaceholderTransformer(values).transformList(tree);
}
var counter = 0;
var PlaceholderParser = function PlaceholderParser() {};
($traceurRuntime.createClass)(PlaceholderParser, {
parseExpression: function(sourceLiterals) {
return this.parse_(sourceLiterals, (function(p) {
return p.parseExpression();
}));
},
parseStatement: function(sourceLiterals) {
return this.parse_(sourceLiterals, (function(p) {
return p.parseStatement();
}));
},
parseStatements: function(sourceLiterals) {
return this.parse_(sourceLiterals, (function(p) {
return p.parseStatements();
}));
},
parsePropertyDefinition: function(sourceLiterals) {
return this.parse_(sourceLiterals, (function(p) {
return p.parsePropertyDefinition();
}));
},
parse_: function(sourceLiterals, doParse) {
var source = sourceLiterals[0];
for (var i = 1; i < sourceLiterals.length; i++) {
source += PREFIX + (i - 1) + sourceLiterals[i];
}
var file = new SourceFile('@traceur/generated/TemplateParser/' + counter++, source);
var errorReporter = new MutedErrorReporter();
var parser = new Parser(file, errorReporter);
var tree = doParse(parser);
if (errorReporter.hadError() || !tree || !parser.isAtEnd())
throw new Error(("Internal error trying to parse:\n\n" + source));
return tree;
}
}, {});
function convertValueToExpression(value) {
if (value instanceof ParseTree)
return value;
if (value instanceof IdentifierToken)
return createIdentifierExpression(value);
if (value instanceof LiteralToken)
return new LiteralExpression(value.location, value);
if (Array.isArray(value)) {
if (value[0] instanceof ParseTree) {
if (value.length === 1)
return value[0];
if (value[0].isStatement())
return createBlock(value);
else
return createParenExpression(createCommaExpression(value));
}
return createArrayLiteralExpression(value.map(convertValueToExpression));
}
if (value === null)
return createNullLiteral();
if (value === undefined)
return createVoid0();
switch (typeof value) {
case 'string':
return createStringLiteral(value);
case 'boolean':
return createBooleanLiteral(value);
case 'number':
return createNumberLiteral(value);
}
throw new Error('Not implemented');
}
function convertValueToIdentifierToken(value) {
if (value instanceof IdentifierToken)
return value;
return createIdentifierToken(value);
}
var PlaceholderTransformer = function PlaceholderTransformer(values) {
$traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "constructor", []);
this.values = values;
};
var $PlaceholderTransformer = PlaceholderTransformer;
($traceurRuntime.createClass)(PlaceholderTransformer, {
getValueAt: function(index) {
return this.values[index];
},
getValue_: function(str) {
if (str.indexOf(PREFIX) !== 0)
return NOT_FOUND;
return this.getValueAt(Number(str.slice(PREFIX.length)));
},
transformIdentifierExpression: function(tree) {
var value = this.getValue_(tree.identifierToken.value);
if (value === NOT_FOUND)
return tree;
return convertValueToExpression(value);
},
transformBindingIdentifier: function(tree) {
var value = this.getValue_(tree.identifierToken.value);
if (value === NOT_FOUND)
return tree;
return createBindingIdentifier(value);
},
transformExpressionStatement: function(tree) {
if (tree.expression.type === IDENTIFIER_EXPRESSION) {
var transformedExpression = this.transformIdentifierExpression(tree.expression);
if (transformedExpression === tree.expression)
return tree;
if (transformedExpression.isStatement())
return transformedExpression;
return createExpressionStatement(transformedExpression);
}
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformExpressionStatement", [tree]);
},
transformBlock: function(tree) {
if (tree.statements.length === 1 && tree.statements[0].type === EXPRESSION_STATEMENT) {
var transformedStatement = this.transformExpressionStatement(tree.statements[0]);
if (transformedStatement === tree.statements[0])
return tree;
if (transformedStatement.type === BLOCK)
return transformedStatement;
}
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformBlock", [tree]);
},
transformFunctionBody: function(tree) {
if (tree.statements.length === 1 && tree.statements[0].type === EXPRESSION_STATEMENT) {
var transformedStatement = this.transformExpressionStatement(tree.statements[0]);
if (transformedStatement === tree.statements[0])
return tree;
if (transformedStatement.type === BLOCK)
return createFunctionBody(transformedStatement.statements);
}
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformFunctionBody", [tree]);
},
transformMemberExpression: function(tree) {
var value = this.getValue_(tree.memberName.value);
if (value === NOT_FOUND)
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformMemberExpression", [tree]);
var operand = this.transformAny(tree.operand);
return createMemberExpression(operand, value);
},
transformLiteralPropertyName: function(tree) {
if (tree.literalToken.type === IDENTIFIER) {
var value = this.getValue_(tree.literalToken.value);
if (value !== NOT_FOUND) {
return new LiteralPropertyName(null, convertValueToIdentifierToken(value));
}
}
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformLiteralPropertyName", [tree]);
},
transformArgumentList: function(tree) {
if (tree.args.length === 1 && tree.args[0].type === IDENTIFIER_EXPRESSION) {
var arg0 = this.transformAny(tree.args[0]);
if (arg0 === tree.args[0])
return tree;
if (arg0.type === ARGUMENT_LIST)
return arg0;
}
return $traceurRuntime.superCall(this, $PlaceholderTransformer.prototype, "transformArgumentList", [tree]);
}
}, {}, ParseTreeTransformer);
return {
get parseExpression() {
return parseExpression;
},
get parseStatement() {
return parseStatement;
},
get parseStatements() {
return parseStatements;
},
get parsePropertyDefinition() {
return parsePropertyDefinition;
},
get PlaceholderParser() {
return PlaceholderParser;
},
get PlaceholderTransformer() {
return PlaceholderTransformer;
}
};
});
System.register("traceur@0.0.52/src/codegeneration/PrependStatements", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/PrependStatements";
var $__172 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
EXPRESSION_STATEMENT = $__172.EXPRESSION_STATEMENT,
LITERAL_EXPRESSION = $__172.LITERAL_EXPRESSION;
var STRING = System.get("traceur@0.0.52/src/syntax/TokenType").STRING;
function isStringExpressionStatement(tree) {
return tree.type === EXPRESSION_STATEMENT && tree.expression.type === LITERAL_EXPRESSION && tree.expression.literalToken.type === STRING;
}
function prependStatements(statements) {
for (var statementsToPrepend = [],
$__174 = 1; $__174 < arguments.length; $__174++)
statementsToPrepend[$__174 - 1] = arguments[$__174];
if (!statements.length)
return statementsToPrepend;
if (!statementsToPrepend.length)
return statements;
var transformed = [];
var inProlog = true;
statements.forEach((function(statement) {
var $__175;
if (inProlog && !isStringExpressionStatement(statement)) {
($__175 = transformed).push.apply($__175, $traceurRuntime.spread(statementsToPrepend));
inProlog = false;
}
transformed.push(statement);
}));
return transformed;
}
return {get prependStatements() {
return prependStatements;
}};
});
System.register("traceur@0.0.52/src/codegeneration/TempVarTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/TempVarTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__177 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
Module = $__177.Module,
Script = $__177.Script;
var ARGUMENTS = System.get("traceur@0.0.52/src/syntax/PredefinedName").ARGUMENTS;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var $__180 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createFunctionBody = $__180.createFunctionBody,
createThisExpression = $__180.createThisExpression,
createIdentifierExpression = $__180.createIdentifierExpression,
createVariableDeclaration = $__180.createVariableDeclaration,
createVariableDeclarationList = $__180.createVariableDeclarationList,
createVariableStatement = $__180.createVariableStatement;
var prependStatements = System.get("traceur@0.0.52/src/codegeneration/PrependStatements").prependStatements;
var TempVarStatement = function TempVarStatement(name, initializer) {
this.name = name;
this.initializer = initializer;
};
($traceurRuntime.createClass)(TempVarStatement, {}, {});
var TempScope = function TempScope() {
this.identifiers = [];
};
($traceurRuntime.createClass)(TempScope, {
push: function(identifier) {
this.identifiers.push(identifier);
},
pop: function() {
return this.identifiers.pop();
},
release: function(obj) {
for (var i = this.identifiers.length - 1; i >= 0; i--) {
obj.release_(this.identifiers[i]);
}
}
}, {});
var VarScope = function VarScope() {
this.thisName = null;
this.argumentName = null;
this.tempVarStatements = [];
};
($traceurRuntime.createClass)(VarScope, {
push: function(tempVarStatement) {
this.tempVarStatements.push(tempVarStatement);
},
pop: function() {
return this.tempVarStatements.pop();
},
release: function(obj) {
for (var i = this.tempVarStatements.length - 1; i >= 0; i--) {
obj.release_(this.tempVarStatements[i].name);
}
},
isEmpty: function() {
return !this.tempVarStatements.length;
},
createVariableStatement: function() {
var declarations = [];
var seenNames = Object.create(null);
for (var i = 0; i < this.tempVarStatements.length; i++) {
var $__183 = $traceurRuntime.assertObject(this.tempVarStatements[i]),
name = $__183.name,
initializer = $__183.initializer;
if (name in seenNames) {
if (seenNames[name].initializer || initializer)
throw new Error('Invalid use of TempVarTransformer');
continue;
}
seenNames[name] = true;
declarations.push(createVariableDeclaration(name, initializer));
}
return createVariableStatement(createVariableDeclarationList(VAR, declarations));
}
}, {});
var TempVarTransformer = function TempVarTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $TempVarTransformer.prototype, "constructor", []);
this.identifierGenerator = identifierGenerator;
this.tempVarStack_ = [new VarScope()];
this.tempScopeStack_ = [new TempScope()];
this.namePool_ = [];
};
var $TempVarTransformer = TempVarTransformer;
($traceurRuntime.createClass)(TempVarTransformer, {
transformStatements_: function(statements) {
this.tempVarStack_.push(new VarScope());
var transformedStatements = this.transformList(statements);
var vars = this.tempVarStack_.pop();
if (vars.isEmpty())
return transformedStatements;
var variableStatement = vars.createVariableStatement();
vars.release(this);
return prependStatements(transformedStatements, variableStatement);
},
transformScript: function(tree) {
var scriptItemList = this.transformStatements_(tree.scriptItemList);
if (scriptItemList == tree.scriptItemList) {
return tree;
}
return new Script(tree.location, scriptItemList, tree.moduleName);
},
transformModule: function(tree) {
var scriptItemList = this.transformStatements_(tree.scriptItemList);
if (scriptItemList == tree.scriptItemList) {
return tree;
}
return new Module(tree.location, scriptItemList, tree.moduleName);
},
transformFunctionBody: function(tree) {
this.pushTempScope();
var statements = this.transformStatements_(tree.statements);
this.popTempScope();
if (statements == tree.statements)
return tree;
return createFunctionBody(statements);
},
getTempIdentifier: function() {
var name = this.getName_();
this.tempScopeStack_[this.tempScopeStack_.length - 1].push(name);
return name;
},
getName_: function() {
return this.namePool_.length ? this.namePool_.pop() : this.identifierGenerator.generateUniqueIdentifier();
},
addTempVar: function() {
var initializer = arguments[0] !== (void 0) ? arguments[0] : null;
var vars = this.tempVarStack_[this.tempVarStack_.length - 1];
var name = this.getName_();
vars.push(new TempVarStatement(name, initializer));
return name;
},
addTempVarForThis: function() {
var varScope = this.tempVarStack_[this.tempVarStack_.length - 1];
return varScope.thisName || (varScope.thisName = this.addTempVar(createThisExpression()));
},
addTempVarForArguments: function() {
var varScope = this.tempVarStack_[this.tempVarStack_.length - 1];
return varScope.argumentName || (varScope.argumentName = this.addTempVar(createIdentifierExpression(ARGUMENTS)));
},
pushTempScope: function() {
this.tempScopeStack_.push(new TempScope());
},
popTempScope: function() {
this.tempScopeStack_.pop().release(this);
},
release_: function(name) {
this.namePool_.push(name);
}
}, {}, ParseTreeTransformer);
return {get TempVarTransformer() {
return TempVarTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/DestructuringTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/DestructuringTransformer";
var $__184 = Object.freeze(Object.defineProperties(["$traceurRuntime.assertObject(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.assertObject(", ")"])}})),
$__185 = Object.freeze(Object.defineProperties(["", " = ", ""], {raw: {value: Object.freeze(["", " = ", ""])}})),
$__186 = Object.freeze(Object.defineProperties(["Array.prototype.slice.call(", ", ", ")"], {raw: {value: Object.freeze(["Array.prototype.slice.call(", ", ", ")"])}})),
$__187 = Object.freeze(Object.defineProperties(["(", " = ", ".", ") === void 0 ?\n ", " : ", ""], {raw: {value: Object.freeze(["(", " = ", ".", ") === void 0 ?\n ", " : ", ""])}})),
$__188 = Object.freeze(Object.defineProperties(["(", " = ", "[", "]) === void 0 ?\n ", " : ", ""], {raw: {value: Object.freeze(["(", " = ", "[", "]) === void 0 ?\n ", " : ", ""])}}));
var $__189 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARRAY_COMPREHENSION = $__189.ARRAY_COMPREHENSION,
ARRAY_LITERAL_EXPRESSION = $__189.ARRAY_LITERAL_EXPRESSION,
ARRAY_PATTERN = $__189.ARRAY_PATTERN,
ASSIGNMENT_ELEMENT = $__189.ASSIGNMENT_ELEMENT,
ARROW_FUNCTION_EXPRESSION = $__189.ARROW_FUNCTION_EXPRESSION,
BINDING_ELEMENT = $__189.BINDING_ELEMENT,
BINDING_IDENTIFIER = $__189.BINDING_IDENTIFIER,
BLOCK = $__189.BLOCK,
CALL_EXPRESSION = $__189.CALL_EXPRESSION,
CLASS_EXPRESSION = $__189.CLASS_EXPRESSION,
COMPUTED_PROPERTY_NAME = $__189.COMPUTED_PROPERTY_NAME,
FUNCTION_EXPRESSION = $__189.FUNCTION_EXPRESSION,
GENERATOR_COMPREHENSION = $__189.GENERATOR_COMPREHENSION,
IDENTIFIER_EXPRESSION = $__189.IDENTIFIER_EXPRESSION,
LITERAL_EXPRESSION = $__189.LITERAL_EXPRESSION,
MEMBER_EXPRESSION = $__189.MEMBER_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__189.MEMBER_LOOKUP_EXPRESSION,
OBJECT_LITERAL_EXPRESSION = $__189.OBJECT_LITERAL_EXPRESSION,
OBJECT_PATTERN = $__189.OBJECT_PATTERN,
OBJECT_PATTERN_FIELD = $__189.OBJECT_PATTERN_FIELD,
PAREN_EXPRESSION = $__189.PAREN_EXPRESSION,
THIS_EXPRESSION = $__189.THIS_EXPRESSION,
VARIABLE_DECLARATION_LIST = $__189.VARIABLE_DECLARATION_LIST;
var $__190 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AssignmentElement = $__190.AssignmentElement,
BindingElement = $__190.BindingElement,
Catch = $__190.Catch,
ForInStatement = $__190.ForInStatement,
ForOfStatement = $__190.ForOfStatement;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__192 = System.get("traceur@0.0.52/src/syntax/TokenType"),
EQUAL = $__192.EQUAL,
LET = $__192.LET,
REGULAR_EXPRESSION = $__192.REGULAR_EXPRESSION,
VAR = $__192.VAR;
var $__193 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignmentExpression = $__193.createAssignmentExpression,
createBindingIdentifier = $__193.createBindingIdentifier,
createBlock = $__193.createBlock,
createCommaExpression = $__193.createCommaExpression,
createExpressionStatement = $__193.createExpressionStatement,
createFunctionBody = $__193.createFunctionBody,
createIdentifierExpression = $__193.createIdentifierExpression,
createMemberExpression = $__193.createMemberExpression,
createMemberLookupExpression = $__193.createMemberLookupExpression,
createNumberLiteral = $__193.createNumberLiteral,
createParenExpression = $__193.createParenExpression,
createVariableDeclaration = $__193.createVariableDeclaration,
createVariableDeclarationList = $__193.createVariableDeclarationList,
createVariableStatement = $__193.createVariableStatement;
var options = System.get("traceur@0.0.52/src/Options").options;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
var prependStatements = System.get("traceur@0.0.52/src/codegeneration/PrependStatements").prependStatements;
var Desugaring = function Desugaring(rvalue) {
this.rvalue = rvalue;
};
($traceurRuntime.createClass)(Desugaring, {}, {});
var AssignmentExpressionDesugaring = function AssignmentExpressionDesugaring(rvalue) {
$traceurRuntime.superCall(this, $AssignmentExpressionDesugaring.prototype, "constructor", [rvalue]);
this.expressions = [];
};
var $AssignmentExpressionDesugaring = AssignmentExpressionDesugaring;
($traceurRuntime.createClass)(AssignmentExpressionDesugaring, {assign: function(lvalue, rvalue) {
lvalue = lvalue instanceof AssignmentElement ? lvalue.assignment : lvalue;
this.expressions.push(createAssignmentExpression(lvalue, rvalue));
}}, {}, Desugaring);
var VariableDeclarationDesugaring = function VariableDeclarationDesugaring(rvalue) {
$traceurRuntime.superCall(this, $VariableDeclarationDesugaring.prototype, "constructor", [rvalue]);
this.declarations = [];
};
var $VariableDeclarationDesugaring = VariableDeclarationDesugaring;
($traceurRuntime.createClass)(VariableDeclarationDesugaring, {assign: function(lvalue, rvalue) {
var binding = lvalue instanceof BindingElement ? lvalue.binding : createBindingIdentifier(lvalue);
this.declarations.push(createVariableDeclaration(binding, rvalue));
}}, {}, Desugaring);
function staticallyKnownObject(tree) {
switch (tree.type) {
case OBJECT_LITERAL_EXPRESSION:
case ARRAY_LITERAL_EXPRESSION:
case ARRAY_COMPREHENSION:
case GENERATOR_COMPREHENSION:
case ARROW_FUNCTION_EXPRESSION:
case FUNCTION_EXPRESSION:
case CLASS_EXPRESSION:
case THIS_EXPRESSION:
return true;
case LITERAL_EXPRESSION:
return tree.literalToken.type === REGULAR_EXPRESSION;
}
return false;
}
var DestructuringTransformer = function DestructuringTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "constructor", [identifierGenerator]);
this.parameterDeclarations = null;
};
var $DestructuringTransformer = DestructuringTransformer;
($traceurRuntime.createClass)(DestructuringTransformer, {
transformArrayPattern: function(tree) {
throw new Error('unreachable');
},
transformObjectPattern: function(tree) {
throw new Error('unreachable');
},
transformBinaryExpression: function(tree) {
this.pushTempScope();
var rv;
if (tree.operator.type == EQUAL && tree.left.isPattern()) {
rv = this.transformAny(this.desugarAssignment_(tree.left, tree.right));
} else {
rv = $traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "transformBinaryExpression", [tree]);
}
this.popTempScope();
return rv;
},
desugarAssignment_: function(lvalue, rvalue) {
var tempIdent = createIdentifierExpression(this.addTempVar());
var desugaring = new AssignmentExpressionDesugaring(tempIdent);
this.desugarPattern_(desugaring, lvalue);
desugaring.expressions.unshift(this.createGuardedAssignment(tempIdent, rvalue));
desugaring.expressions.push(tempIdent);
return createParenExpression(createCommaExpression(desugaring.expressions));
},
transformVariableDeclarationList: function(tree) {
var $__197 = this;
if (!this.destructuringInDeclaration_(tree)) {
return $traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "transformVariableDeclarationList", [tree]);
}
this.pushTempScope();
var desugaredDeclarations = [];
tree.declarations.forEach((function(declaration) {
var $__199;
if (declaration.lvalue.isPattern()) {
($__199 = desugaredDeclarations).push.apply($__199, $traceurRuntime.spread($__197.desugarVariableDeclaration_(declaration)));
} else {
desugaredDeclarations.push(declaration);
}
}));
var transformedTree = this.transformVariableDeclarationList(createVariableDeclarationList(tree.declarationType, desugaredDeclarations));
this.popTempScope();
return transformedTree;
},
transformForInStatement: function(tree) {
return this.transformForInOrOf_(tree, $traceurRuntime.superGet(this, $DestructuringTransformer.prototype, "transformForInStatement"), ForInStatement);
},
transformForOfStatement: function(tree) {
return this.transformForInOrOf_(tree, $traceurRuntime.superGet(this, $DestructuringTransformer.prototype, "transformForOfStatement"), ForOfStatement);
},
transformForInOrOf_: function(tree, superMethod, constr) {
var $__199;
if (!tree.initializer.isPattern() && (tree.initializer.type !== VARIABLE_DECLARATION_LIST || !this.destructuringInDeclaration_(tree.initializer))) {
return superMethod.call(this, tree);
}
this.pushTempScope();
var declarationType,
lvalue;
if (tree.initializer.isPattern()) {
declarationType = null;
lvalue = tree.initializer;
} else {
declarationType = tree.initializer.declarationType;
lvalue = tree.initializer.declarations[0].lvalue;
}
var statements = [];
var binding = this.desugarBinding_(lvalue, statements, declarationType);
var initializer = createVariableDeclarationList(VAR, binding, null);
var collection = this.transformAny(tree.collection);
var body = this.transformAny(tree.body);
if (body.type === BLOCK)
($__199 = statements).push.apply($__199, $traceurRuntime.spread(body.statements));
else
statements.push(body);
body = createBlock(statements);
this.popTempScope();
return new constr(tree.location, initializer, collection, body);
},
transformAssignmentElement: function(tree) {
throw new Error('unreachable');
},
transformBindingElement: function(tree) {
if (!tree.binding.isPattern() || tree.initializer)
return tree;
if (this.parameterDeclarations === null) {
this.parameterDeclarations = [];
this.pushTempScope();
}
var varName = this.getTempIdentifier();
var binding = createBindingIdentifier(varName);
var initializer = createIdentifierExpression(varName);
var decl = createVariableDeclaration(tree.binding, initializer);
this.parameterDeclarations.push(decl);
return new BindingElement(null, binding, null);
},
transformFunctionBody: function(tree) {
if (this.parameterDeclarations === null)
return $traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "transformFunctionBody", [tree]);
var list = createVariableDeclarationList(VAR, this.parameterDeclarations);
var statement = createVariableStatement(list);
var statements = prependStatements(tree.statements, statement);
var newBody = createFunctionBody(statements);
this.parameterDeclarations = null;
var result = $traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "transformFunctionBody", [newBody]);
this.popTempScope();
return result;
},
transformCatch: function(tree) {
var $__199;
if (!tree.binding.isPattern())
return $traceurRuntime.superCall(this, $DestructuringTransformer.prototype, "transformCatch", [tree]);
var body = this.transformAny(tree.catchBody);
var statements = [];
var kind = options.blockBinding ? LET : VAR;
var binding = this.desugarBinding_(tree.binding, statements, kind);
($__199 = statements).push.apply($__199, $traceurRuntime.spread(body.statements));
return new Catch(tree.location, binding, createBlock(statements));
},
desugarBinding_: function(bindingTree, statements, declarationType) {
var varName = this.getTempIdentifier();
var binding = createBindingIdentifier(varName);
var idExpr = createIdentifierExpression(varName);
var desugaring;
if (declarationType === null)
desugaring = new AssignmentExpressionDesugaring(idExpr);
else
desugaring = new VariableDeclarationDesugaring(idExpr);
this.desugarPattern_(desugaring, bindingTree);
if (declarationType === null) {
statements.push(createExpressionStatement(createCommaExpression(desugaring.expressions)));
} else {
statements.push(createVariableStatement(this.transformVariableDeclarationList(createVariableDeclarationList(declarationType, desugaring.declarations))));
}
return binding;
},
destructuringInDeclaration_: function(tree) {
return tree.declarations.some((function(declaration) {
return declaration.lvalue.isPattern();
}));
},
createGuardedExpression: function(tree) {
if (staticallyKnownObject(tree))
return tree;
return parseExpression($__184, tree);
},
createGuardedAssignment: function(lvalue, rvalue) {
return parseExpression($__185, lvalue, this.createGuardedExpression(rvalue));
},
desugarVariableDeclaration_: function(tree) {
var tempRValueName = this.getTempIdentifier();
var tempRValueIdent = createIdentifierExpression(tempRValueName);
var desugaring;
var initializer;
switch (tree.initializer.type) {
case ARRAY_LITERAL_EXPRESSION:
case CALL_EXPRESSION:
case IDENTIFIER_EXPRESSION:
case LITERAL_EXPRESSION:
case MEMBER_EXPRESSION:
case MEMBER_LOOKUP_EXPRESSION:
case OBJECT_LITERAL_EXPRESSION:
case PAREN_EXPRESSION:
initializer = tree.initializer;
default:
desugaring = new VariableDeclarationDesugaring(tempRValueIdent);
desugaring.assign(desugaring.rvalue, this.createGuardedExpression(tree.initializer));
var initializerFound = this.desugarPattern_(desugaring, tree.lvalue);
if (initializerFound || desugaring.declarations.length > 2)
return desugaring.declarations;
initializer = this.createGuardedExpression(initializer || tree.initializer);
desugaring = new VariableDeclarationDesugaring(initializer);
this.desugarPattern_(desugaring, tree.lvalue);
return desugaring.declarations;
}
},
desugarPattern_: function(desugaring, tree) {
var $__197 = this;
var initializerFound = false;
switch (tree.type) {
case ARRAY_PATTERN:
var pattern = tree;
for (var i = 0; i < pattern.elements.length; i++) {
var lvalue = pattern.elements[i];
if (lvalue === null) {
continue;
} else if (lvalue.isSpreadPatternElement()) {
desugaring.assign(lvalue.lvalue, parseExpression($__186, desugaring.rvalue, i));
} else {
if (lvalue.initializer)
initializerFound = true;
desugaring.assign(lvalue, this.createConditionalMemberLookupExpression(desugaring.rvalue, createNumberLiteral(i), lvalue.initializer));
}
}
break;
case OBJECT_PATTERN:
var pattern = tree;
var elementHelper = (function(lvalue, initializer) {
if (initializer)
initializerFound = true;
var lookup = $__197.createConditionalMemberExpression(desugaring.rvalue, lvalue, initializer);
desugaring.assign(lvalue, lookup);
});
pattern.fields.forEach((function(field) {
var lookup;
switch (field.type) {
case ASSIGNMENT_ELEMENT:
elementHelper(field.assignment, field.initializer);
break;
case BINDING_ELEMENT:
elementHelper(field.binding, field.initializer);
break;
case OBJECT_PATTERN_FIELD:
if (field.element.initializer)
initializerFound = true;
var name = field.name;
lookup = $__197.createConditionalMemberExpression(desugaring.rvalue, name, field.element.initializer);
desugaring.assign(field.element, lookup);
break;
default:
throw Error('unreachable');
}
}));
break;
case PAREN_EXPRESSION:
return this.desugarPattern_(desugaring, tree.expression);
default:
throw new Error('unreachable');
}
if (desugaring instanceof VariableDeclarationDesugaring && desugaring.declarations.length === 0) {
desugaring.assign(createBindingIdentifier(this.getTempIdentifier()), desugaring.rvalue);
}
return initializerFound;
},
createConditionalMemberExpression: function(rvalue, name, initializer) {
if (name.type === COMPUTED_PROPERTY_NAME) {
return this.createConditionalMemberLookupExpression(rvalue, name.expression, initializer);
}
var token;
switch (name.type) {
case BINDING_IDENTIFIER:
case IDENTIFIER_EXPRESSION:
token = name.identifierToken;
break;
default:
token = name.literalToken;
}
if (!initializer)
return createMemberExpression(rvalue, token);
var tempIdent = createIdentifierExpression(this.addTempVar());
return parseExpression($__187, tempIdent, rvalue, token, initializer, tempIdent);
},
createConditionalMemberLookupExpression: function(rvalue, index, initializer) {
if (!initializer)
return createMemberLookupExpression(rvalue, index);
var tempIdent = createIdentifierExpression(this.addTempVar());
return parseExpression($__188, tempIdent, rvalue, index, initializer, tempIdent);
}
}, {}, TempVarTransformer);
return {get DestructuringTransformer() {
return DestructuringTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/ModuleSymbol", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ModuleSymbol";
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var ExportsList = function ExportsList(normalizedName) {
this.exports_ = Object.create(null);
if (normalizedName !== null)
this.normalizedName = normalizedName.replace(/\\/g, '/');
else
this.normalizedName = null;
};
($traceurRuntime.createClass)(ExportsList, {
addExport: function(name, tree) {
assert(!this.exports_[name]);
this.exports_[name] = tree;
},
getExport: function(name) {
return this.exports_[name];
},
getExports: function() {
return Object.keys(this.exports_);
}
}, {});
var ModuleDescription = function ModuleDescription(normalizedName, module) {
var $__201 = this;
$traceurRuntime.superCall(this, $ModuleDescription.prototype, "constructor", [normalizedName]);
Object.getOwnPropertyNames(module).forEach((function(name) {
$__201.addExport(name, true);
}));
};
var $ModuleDescription = ModuleDescription;
($traceurRuntime.createClass)(ModuleDescription, {}, {}, ExportsList);
var ModuleSymbol = function ModuleSymbol(tree, normalizedName) {
$traceurRuntime.superCall(this, $ModuleSymbol.prototype, "constructor", [normalizedName]);
this.tree = tree;
this.imports_ = Object.create(null);
};
var $ModuleSymbol = ModuleSymbol;
($traceurRuntime.createClass)(ModuleSymbol, {
addImport: function(name, tree) {
assert(!this.imports_[name]);
this.imports_[name] = tree;
},
getImport: function(name) {
return this.imports_[name];
}
}, {}, ExportsList);
return {
get ModuleDescription() {
return ModuleDescription;
},
get ModuleSymbol() {
return ModuleSymbol;
}
};
});
System.register("traceur@0.0.52/src/codegeneration/module/ModuleVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ModuleVisitor";
var ModuleDescription = System.get("traceur@0.0.52/src/codegeneration/module/ModuleSymbol").ModuleDescription;
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var $__205 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
MODULE_DECLARATION = $__205.MODULE_DECLARATION,
EXPORT_DECLARATION = $__205.EXPORT_DECLARATION,
IMPORT_DECLARATION = $__205.IMPORT_DECLARATION;
var ModuleVisitor = function ModuleVisitor(reporter, loader, moduleSymbol) {
this.reporter = reporter;
this.loader_ = loader;
this.moduleSymbol = moduleSymbol;
};
($traceurRuntime.createClass)(ModuleVisitor, {
getModuleDescriptionFromCodeUnit_: function(name, codeUnitToModuleInfo) {
var referrer = this.moduleSymbol.normalizedName;
var codeUnit = this.loader_.getCodeUnitForModuleSpecifier(name, referrer);
var moduleDescription = codeUnitToModuleInfo(codeUnit);
if (!moduleDescription) {
var msg = (name + " is not a module, required by " + referrer);
this.reportError(codeUnit.metadata.tree, msg);
return null;
}
return moduleDescription;
},
getModuleSymbolForModuleSpecifier: function(name) {
return this.getModuleDescriptionFromCodeUnit_(name, (function(codeUnit) {
return codeUnit.metadata.moduleSymbol;
}));
},
getModuleDescriptionForModuleSpecifier: function(name) {
return this.getModuleDescriptionFromCodeUnit_(name, (function(codeUnit) {
var moduleDescription = codeUnit.metadata.moduleSymbol;
if (!moduleDescription && codeUnit.result) {
moduleDescription = new ModuleDescription(codeUnit.normalizedName, codeUnit.result);
}
return moduleDescription;
}));
},
visitFunctionDeclaration: function(tree) {},
visitFunctionExpression: function(tree) {},
visitFunctionBody: function(tree) {},
visitBlock: function(tree) {},
visitClassDeclaration: function(tree) {},
visitClassExpression: function(tree) {},
visitModuleElement_: function(element) {
switch (element.type) {
case MODULE_DECLARATION:
case EXPORT_DECLARATION:
case IMPORT_DECLARATION:
this.visitAny(element);
}
},
visitScript: function(tree) {
tree.scriptItemList.forEach(this.visitModuleElement_, this);
},
visitModule: function(tree) {
tree.scriptItemList.forEach(this.visitModuleElement_, this);
},
reportError: function(tree, message) {
this.reporter.reportError(tree.location.start, message);
}
}, {}, ParseTreeVisitor);
return {get ModuleVisitor() {
return ModuleVisitor;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/ExportVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ExportVisitor";
var ModuleVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ModuleVisitor").ModuleVisitor;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var ExportVisitor = function ExportVisitor(reporter, loaderHooks, moduleSymbol) {
$traceurRuntime.superCall(this, $ExportVisitor.prototype, "constructor", [reporter, loaderHooks, moduleSymbol]);
this.inExport_ = false;
this.moduleSpecifier = null;
};
var $ExportVisitor = ExportVisitor;
($traceurRuntime.createClass)(ExportVisitor, {
addExport_: function(name, tree) {
assert(typeof name == 'string');
if (this.inExport_)
this.addExport(name, tree);
},
addExport: function(name, tree) {
var moduleSymbol = this.moduleSymbol;
var existingExport = moduleSymbol.getExport(name);
if (existingExport) {
this.reportError(tree, ("Duplicate export. '" + name + "' was previously ") + ("exported at " + existingExport.location.start));
} else {
moduleSymbol.addExport(name, tree);
}
},
visitClassDeclaration: function(tree) {
this.addExport_(tree.name.identifierToken.value, tree);
},
visitExportDeclaration: function(tree) {
this.inExport_ = true;
this.visitAny(tree.declaration);
this.inExport_ = false;
},
visitNamedExport: function(tree) {
this.moduleSpecifier = tree.moduleSpecifier;
this.visitAny(tree.specifierSet);
this.moduleSpecifier = null;
},
visitExportDefault: function(tree) {
this.addExport_('default', tree);
},
visitExportSpecifier: function(tree) {
this.addExport_((tree.rhs || tree.lhs).value, tree);
},
visitExportStar: function(tree) {
var $__209 = this;
var name = this.moduleSpecifier.token.processedValue;
var moduleDescription = this.getModuleDescriptionForModuleSpecifier(name);
if (moduleDescription) {
moduleDescription.getExports().forEach((function(name) {
$__209.addExport(name, tree);
}));
}
},
visitFunctionDeclaration: function(tree) {
this.addExport_(tree.name.identifierToken.value, tree);
},
visitModuleDeclaration: function(tree) {
this.addExport_(tree.identifier.value, tree);
},
visitVariableDeclaration: function(tree) {
this.addExport_(tree.lvalue.identifierToken.value, tree);
}
}, {}, ModuleVisitor);
return {get ExportVisitor() {
return ExportVisitor;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/DirectExportVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/DirectExportVisitor";
var ExportVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ExportVisitor").ExportVisitor;
var DirectExportVisitor = function DirectExportVisitor() {
$traceurRuntime.superCall(this, $DirectExportVisitor.prototype, "constructor", [null, null, null]);
this.namedExports = [];
this.starExports = [];
};
var $DirectExportVisitor = DirectExportVisitor;
($traceurRuntime.createClass)(DirectExportVisitor, {
addExport: function(name, tree) {
this.namedExports.push({
name: name,
tree: tree,
moduleSpecifier: this.moduleSpecifier
});
},
visitExportStar: function(tree) {
this.starExports.push(this.moduleSpecifier);
},
hasExports: function() {
return this.namedExports.length != 0 || this.starExports.length != 0;
}
}, {}, ExportVisitor);
return {get DirectExportVisitor() {
return DirectExportVisitor;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ModuleTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ModuleTransformer";
var $__213 = Object.freeze(Object.defineProperties(["var __moduleName = ", ";"], {raw: {value: Object.freeze(["var __moduleName = ", ";"])}})),
$__214 = Object.freeze(Object.defineProperties(["function() {\n ", "\n }"], {raw: {value: Object.freeze(["function() {\n ", "\n }"])}})),
$__215 = Object.freeze(Object.defineProperties(["$traceurRuntime.ModuleStore.getAnonymousModule(\n ", ");"], {raw: {value: Object.freeze(["$traceurRuntime.ModuleStore.getAnonymousModule(\n ", ");"])}})),
$__216 = Object.freeze(Object.defineProperties(["System.register(", ", [], ", ");"], {raw: {value: Object.freeze(["System.register(", ", [], ", ");"])}})),
$__217 = Object.freeze(Object.defineProperties(["get ", "() { return ", "; }"], {raw: {value: Object.freeze(["get ", "() { return ", "; }"])}})),
$__218 = Object.freeze(Object.defineProperties(["$traceurRuntime.exportStar(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.exportStar(", ")"])}})),
$__219 = Object.freeze(Object.defineProperties(["return ", ""], {raw: {value: Object.freeze(["return ", ""])}})),
$__220 = Object.freeze(Object.defineProperties(["var $__default = ", ""], {raw: {value: Object.freeze(["var $__default = ", ""])}})),
$__221 = Object.freeze(Object.defineProperties(["var $__default = ", ""], {raw: {value: Object.freeze(["var $__default = ", ""])}})),
$__222 = Object.freeze(Object.defineProperties(["System.get(", ")"], {raw: {value: Object.freeze(["System.get(", ")"])}}));
var $__223 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__223.AnonBlock,
BindingElement = $__223.BindingElement,
BindingIdentifier = $__223.BindingIdentifier,
EmptyStatement = $__223.EmptyStatement,
LiteralPropertyName = $__223.LiteralPropertyName,
ObjectPattern = $__223.ObjectPattern,
ObjectPatternField = $__223.ObjectPatternField,
Script = $__223.Script;
var DestructuringTransformer = System.get("traceur@0.0.52/src/codegeneration/DestructuringTransformer").DestructuringTransformer;
var DirectExportVisitor = System.get("traceur@0.0.52/src/codegeneration/module/DirectExportVisitor").DirectExportVisitor;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__227 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
CLASS_DECLARATION = $__227.CLASS_DECLARATION,
EXPORT_DEFAULT = $__227.EXPORT_DEFAULT,
EXPORT_SPECIFIER = $__227.EXPORT_SPECIFIER,
FUNCTION_DECLARATION = $__227.FUNCTION_DECLARATION,
IMPORT_SPECIFIER_SET = $__227.IMPORT_SPECIFIER_SET;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var $__230 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__230.createArgumentList,
createBindingIdentifier = $__230.createBindingIdentifier,
createExpressionStatement = $__230.createExpressionStatement,
createIdentifierExpression = $__230.createIdentifierExpression,
createIdentifierToken = $__230.createIdentifierToken,
createMemberExpression = $__230.createMemberExpression,
createObjectLiteralExpression = $__230.createObjectLiteralExpression,
createUseStrictDirective = $__230.createUseStrictDirective,
createVariableStatement = $__230.createVariableStatement;
var $__231 = System.get("traceur@0.0.52/src/Options"),
parseOptions = $__231.parseOptions,
transformOptions = $__231.transformOptions;
var $__232 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__232.parseExpression,
parsePropertyDefinition = $__232.parsePropertyDefinition,
parseStatement = $__232.parseStatement,
parseStatements = $__232.parseStatements;
var DestructImportVarStatement = function DestructImportVarStatement() {
$traceurRuntime.defaultSuperCall(this, $DestructImportVarStatement.prototype, arguments);
};
var $DestructImportVarStatement = DestructImportVarStatement;
($traceurRuntime.createClass)(DestructImportVarStatement, {createGuardedExpression: function(tree) {
return tree;
}}, {}, DestructuringTransformer);
var ModuleTransformer = function ModuleTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $ModuleTransformer.prototype, "constructor", [identifierGenerator]);
this.exportVisitor_ = new DirectExportVisitor();
this.moduleSpecifierKind_ = null;
this.moduleName = null;
};
var $ModuleTransformer = ModuleTransformer;
($traceurRuntime.createClass)(ModuleTransformer, {
getTempVarNameForModuleName: function(moduleName) {
return '$__' + moduleName.replace(/[^a-zA-Z0-9$]/g, function(c) {
return '_' + c.charCodeAt(0) + '_';
}) + '__';
},
getTempVarNameForModuleSpecifier: function(moduleSpecifier) {
var normalizedName = System.normalize(moduleSpecifier.token.processedValue, this.moduleName);
return this.getTempVarNameForModuleName(normalizedName);
},
transformScript: function(tree) {
this.moduleName = tree.moduleName;
return $traceurRuntime.superCall(this, $ModuleTransformer.prototype, "transformScript", [tree]);
},
transformModule: function(tree) {
this.moduleName = tree.moduleName;
this.pushTempScope();
var statements = this.transformList(tree.scriptItemList);
statements = this.appendExportStatement(statements);
this.popTempScope();
statements = this.wrapModule(this.moduleProlog().concat(statements));
return new Script(tree.location, statements);
},
moduleProlog: function() {
var statements = [createUseStrictDirective()];
if (this.moduleName)
statements.push(parseStatement($__213, this.moduleName));
return statements;
},
wrapModule: function(statements) {
var functionExpression = parseExpression($__214, statements);
if (this.moduleName === null) {
return parseStatements($__215, functionExpression);
}
return parseStatements($__216, this.moduleName, functionExpression);
},
getGetterExport: function($__235) {
var $__236 = $traceurRuntime.assertObject($__235),
name = $__236.name,
tree = $__236.tree,
moduleSpecifier = $__236.moduleSpecifier;
var returnExpression;
switch (tree.type) {
case EXPORT_DEFAULT:
returnExpression = createIdentifierExpression('$__default');
break;
case EXPORT_SPECIFIER:
if (moduleSpecifier) {
var idName = this.getTempVarNameForModuleSpecifier(moduleSpecifier);
returnExpression = createMemberExpression(idName, tree.lhs);
} else {
returnExpression = createIdentifierExpression(tree.lhs);
}
break;
default:
returnExpression = createIdentifierExpression(name);
break;
}
return parsePropertyDefinition($__217, name, returnExpression);
},
getExportProperties: function() {
var $__233 = this;
return this.exportVisitor_.namedExports.map((function(exp) {
return $__233.getGetterExport(exp);
})).concat(this.exportVisitor_.namedExports.map((function(exp) {
return $__233.getSetterExport(exp);
}))).filter((function(e) {
return e;
}));
},
getSetterExport: function($__235) {
var $__236 = $traceurRuntime.assertObject($__235),
name = $__236.name,
tree = $__236.tree,
moduleSpecifier = $__236.moduleSpecifier;
return null;
},
getExportObject: function() {
var $__233 = this;
var exportObject = createObjectLiteralExpression(this.getExportProperties());
if (this.exportVisitor_.starExports.length) {
var starExports = this.exportVisitor_.starExports;
var starIdents = starExports.map((function(moduleSpecifier) {
return createIdentifierExpression($__233.getTempVarNameForModuleSpecifier(moduleSpecifier));
}));
var args = createArgumentList($traceurRuntime.spread([exportObject], starIdents));
return parseExpression($__218, args);
}
return exportObject;
},
appendExportStatement: function(statements) {
var exportObject = this.getExportObject();
statements.push(parseStatement($__219, exportObject));
return statements;
},
hasExports: function() {
return this.exportVisitor_.hasExports();
},
transformExportDeclaration: function(tree) {
this.exportVisitor_.visitAny(tree);
return this.transformAny(tree.declaration);
},
transformExportDefault: function(tree) {
switch (tree.expression.type) {
case CLASS_DECLARATION:
case FUNCTION_DECLARATION:
var nameBinding = tree.expression.name;
var name = createIdentifierExpression(nameBinding.identifierToken);
return new AnonBlock(null, [tree.expression, parseStatement($__220, name)]);
}
return parseStatement($__221, tree.expression);
},
transformNamedExport: function(tree) {
var moduleSpecifier = tree.moduleSpecifier;
if (moduleSpecifier) {
var expression = this.transformAny(moduleSpecifier);
var idName = this.getTempVarNameForModuleSpecifier(moduleSpecifier);
return createVariableStatement(VAR, idName, expression);
}
return new EmptyStatement(null);
},
transformModuleSpecifier: function(tree) {
assert(this.moduleName);
var name = tree.token.processedValue;
var normalizedName = System.normalize(name, this.moduleName);
return parseExpression($__222, normalizedName);
},
transformModuleDeclaration: function(tree) {
this.moduleSpecifierKind_ = 'module';
var initializer = this.transformAny(tree.expression);
return createVariableStatement(VAR, tree.identifier, initializer);
},
transformImportedBinding: function(tree) {
var bindingElement = new BindingElement(tree.location, tree.binding, null);
var name = new LiteralPropertyName(null, createIdentifierToken('default'));
return new ObjectPattern(null, [new ObjectPatternField(null, name, bindingElement)]);
},
transformImportDeclaration: function(tree) {
this.moduleSpecifierKind_ = 'import';
if (!tree.importClause || (tree.importClause.type === IMPORT_SPECIFIER_SET && tree.importClause.specifiers.length === 0)) {
return createExpressionStatement(this.transformAny(tree.moduleSpecifier));
}
var binding = this.transformAny(tree.importClause);
var initializer = this.transformAny(tree.moduleSpecifier);
var varStatement = createVariableStatement(VAR, binding, initializer);
if (transformOptions.destructuring || !parseOptions.destructuring) {
var destructuringTransformer = new DestructImportVarStatement(this.identifierGenerator);
varStatement = varStatement.transform(destructuringTransformer);
}
return varStatement;
},
transformImportSpecifierSet: function(tree) {
var fields = this.transformList(tree.specifiers);
return new ObjectPattern(null, fields);
},
transformImportSpecifier: function(tree) {
if (tree.rhs) {
var binding = new BindingIdentifier(tree.location, tree.rhs);
var bindingElement = new BindingElement(tree.location, binding, null);
var name = new LiteralPropertyName(tree.lhs.location, tree.lhs);
return new ObjectPatternField(tree.location, name, bindingElement);
}
return new BindingElement(tree.location, createBindingIdentifier(tree.lhs), null);
}
}, {}, TempVarTransformer);
return {get ModuleTransformer() {
return ModuleTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/globalThis", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/globalThis";
var $__237 = Object.freeze(Object.defineProperties(["Reflect.global"], {raw: {value: Object.freeze(["Reflect.global"])}}));
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
var expr;
function globalThis() {
if (!expr)
expr = parseExpression($__237);
return expr;
}
var $__default = globalThis;
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/codegeneration/FindInFunctionScope", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/FindInFunctionScope";
var FindVisitor = System.get("traceur@0.0.52/src/codegeneration/FindVisitor").FindVisitor;
var FindInFunctionScope = function FindInFunctionScope() {
$traceurRuntime.defaultSuperCall(this, $FindInFunctionScope.prototype, arguments);
};
var $FindInFunctionScope = FindInFunctionScope;
($traceurRuntime.createClass)(FindInFunctionScope, {
visitFunctionDeclaration: function(tree) {},
visitFunctionExpression: function(tree) {},
visitSetAccessor: function(tree) {},
visitGetAccessor: function(tree) {},
visitPropertyMethodAssignment: function(tree) {}
}, {}, FindVisitor);
return {get FindInFunctionScope() {
return FindInFunctionScope;
}};
});
System.register("traceur@0.0.52/src/codegeneration/scopeContainsThis", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/scopeContainsThis";
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var FindThis = function FindThis() {
$traceurRuntime.defaultSuperCall(this, $FindThis.prototype, arguments);
};
var $FindThis = FindThis;
($traceurRuntime.createClass)(FindThis, {visitThisExpression: function(tree) {
this.found = true;
}}, {}, FindInFunctionScope);
function scopeContainsThis(tree) {
var visitor = new FindThis(tree);
return visitor.found;
}
var $__default = scopeContainsThis;
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/codegeneration/AmdTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/AmdTransformer";
var $__243 = Object.freeze(Object.defineProperties(["__esModule: true"], {raw: {value: Object.freeze(["__esModule: true"])}})),
$__244 = Object.freeze(Object.defineProperties(["if (!", " || !", ".__esModule)\n ", " = { 'default': ", " }"], {raw: {value: Object.freeze(["if (!", " || !", ".__esModule)\n ", " = { 'default': ", " }"])}})),
$__245 = Object.freeze(Object.defineProperties(["function(", ") {\n ", "\n }"], {raw: {value: Object.freeze(["function(", ") {\n ", "\n }"])}})),
$__246 = Object.freeze(Object.defineProperties(["", ".bind(", ")"], {raw: {value: Object.freeze(["", ".bind(", ")"])}})),
$__247 = Object.freeze(Object.defineProperties(["define(", ", ", ", ", ");"], {raw: {value: Object.freeze(["define(", ", ", ", ", ");"])}})),
$__248 = Object.freeze(Object.defineProperties(["define(", ", ", ");"], {raw: {value: Object.freeze(["define(", ", ", ");"])}}));
var ModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/ModuleTransformer").ModuleTransformer;
var $__250 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createBindingIdentifier = $__250.createBindingIdentifier,
createIdentifierExpression = $__250.createIdentifierExpression;
var globalThis = System.get("traceur@0.0.52/src/codegeneration/globalThis").default;
var $__252 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__252.parseExpression,
parseStatement = $__252.parseStatement,
parseStatements = $__252.parseStatements,
parsePropertyDefinition = $__252.parsePropertyDefinition;
var scopeContainsThis = System.get("traceur@0.0.52/src/codegeneration/scopeContainsThis").default;
var AmdTransformer = function AmdTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $AmdTransformer.prototype, "constructor", [identifierGenerator]);
this.dependencies = [];
};
var $AmdTransformer = AmdTransformer;
($traceurRuntime.createClass)(AmdTransformer, {
getExportProperties: function() {
var properties = $traceurRuntime.superCall(this, $AmdTransformer.prototype, "getExportProperties", []);
if (this.exportVisitor_.hasExports())
properties.push(parsePropertyDefinition($__243));
return properties;
},
moduleProlog: function() {
var locals = this.dependencies.map((function(dep) {
var local = createIdentifierExpression(dep.local);
return parseStatement($__244, local, local, local, local);
}));
return $traceurRuntime.superCall(this, $AmdTransformer.prototype, "moduleProlog", []).concat(locals);
},
wrapModule: function(statements) {
var depPaths = this.dependencies.map((function(dep) {
return dep.path;
}));
var depLocals = this.dependencies.map((function(dep) {
return dep.local;
}));
var hasTopLevelThis = statements.some(scopeContainsThis);
var func = parseExpression($__245, depLocals, statements);
if (hasTopLevelThis)
func = parseExpression($__246, func, globalThis());
if (this.moduleName) {
return parseStatements($__247, this.moduleName, depPaths, func);
} else {
return parseStatements($__248, depPaths, func);
}
},
transformModuleSpecifier: function(tree) {
var localName = this.getTempIdentifier();
this.dependencies.push({
path: tree.token,
local: localName
});
return createBindingIdentifier(localName);
}
}, {}, ModuleTransformer);
return {get AmdTransformer() {
return AmdTransformer;
}};
});
System.register("traceur@0.0.52/src/staticsemantics/PropName", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/staticsemantics/PropName";
var $__255 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
COMPUTED_PROPERTY_NAME = $__255.COMPUTED_PROPERTY_NAME,
GET_ACCESSOR = $__255.GET_ACCESSOR,
LITERAL_PROPERTY_NAME = $__255.LITERAL_PROPERTY_NAME,
PROPERTY_METHOD_ASSIGNMENT = $__255.PROPERTY_METHOD_ASSIGNMENT,
PROPERTY_NAME_ASSIGNMENT = $__255.PROPERTY_NAME_ASSIGNMENT,
PROPERTY_NAME_SHORTHAND = $__255.PROPERTY_NAME_SHORTHAND,
SET_ACCESSOR = $__255.SET_ACCESSOR;
var IDENTIFIER = System.get("traceur@0.0.52/src/syntax/TokenType").IDENTIFIER;
function propName(tree) {
switch (tree.type) {
case LITERAL_PROPERTY_NAME:
var token = tree.literalToken;
if (token.isKeyword() || token.type === IDENTIFIER)
return token.toString();
return String(tree.literalToken.processedValue);
case COMPUTED_PROPERTY_NAME:
return '';
case PROPERTY_NAME_SHORTHAND:
return tree.name.toString();
case PROPERTY_METHOD_ASSIGNMENT:
case PROPERTY_NAME_ASSIGNMENT:
case GET_ACCESSOR:
case SET_ACCESSOR:
return propName(tree.name);
}
}
return {get propName() {
return propName;
}};
});
System.register("traceur@0.0.52/src/codegeneration/AnnotationsTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/AnnotationsTransformer";
var $__257 = Object.freeze(Object.defineProperties(["Object.getOwnPropertyDescriptor(", ")"], {raw: {value: Object.freeze(["Object.getOwnPropertyDescriptor(", ")"])}}));
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var CONSTRUCTOR = System.get("traceur@0.0.52/src/syntax/PredefinedName").CONSTRUCTOR;
var STRING = System.get("traceur@0.0.52/src/syntax/TokenType").STRING;
var $__261 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__261.AnonBlock,
ClassDeclaration = $__261.ClassDeclaration,
ExportDeclaration = $__261.ExportDeclaration,
FormalParameter = $__261.FormalParameter,
FunctionDeclaration = $__261.FunctionDeclaration,
GetAccessor = $__261.GetAccessor,
LiteralExpression = $__261.LiteralExpression,
PropertyMethodAssignment = $__261.PropertyMethodAssignment,
SetAccessor = $__261.SetAccessor;
var propName = System.get("traceur@0.0.52/src/staticsemantics/PropName").propName;
var $__263 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__263.createArgumentList,
createArrayLiteralExpression = $__263.createArrayLiteralExpression,
createAssignmentStatement = $__263.createAssignmentStatement,
createIdentifierExpression = $__263.createIdentifierExpression,
createMemberExpression = $__263.createMemberExpression,
createNewExpression = $__263.createNewExpression,
createStringLiteralToken = $__263.createStringLiteralToken;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
var AnnotationsScope = function AnnotationsScope() {
this.className = null;
this.isExport = false;
this.constructorParameters = [];
this.annotations = [];
this.metadata = [];
};
($traceurRuntime.createClass)(AnnotationsScope, {get inClassScope() {
return this.className !== null;
}}, {});
var AnnotationsTransformer = function AnnotationsTransformer() {
this.stack_ = [new AnnotationsScope()];
};
var $AnnotationsTransformer = AnnotationsTransformer;
($traceurRuntime.createClass)(AnnotationsTransformer, {
transformExportDeclaration: function(tree) {
var $__267;
var scope = this.pushAnnotationScope_();
scope.isExport = true;
($__267 = scope.annotations).push.apply($__267, $traceurRuntime.spread(tree.annotations));
var declaration = this.transformAny(tree.declaration);
if (declaration !== tree.declaration || tree.annotations.length > 0)
tree = new ExportDeclaration(tree.location, declaration, []);
return this.appendMetadata_(tree);
},
transformClassDeclaration: function(tree) {
var $__267,
$__268;
var elementsChanged = false;
var exportAnnotations = this.scope.isExport ? this.scope.annotations : [];
var scope = this.pushAnnotationScope_();
scope.className = tree.name;
($__267 = scope.annotations).push.apply($__267, $traceurRuntime.spread(exportAnnotations, tree.annotations));
tree = $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformClassDeclaration", [tree]);
($__268 = scope.metadata).unshift.apply($__268, $traceurRuntime.spread(this.transformMetadata_(createIdentifierExpression(tree.name), scope.annotations, scope.constructorParameters)));
if (tree.annotations.length > 0) {
tree = new ClassDeclaration(tree.location, tree.name, tree.superClass, tree.elements, []);
}
return this.appendMetadata_(tree);
},
transformFunctionDeclaration: function(tree) {
var $__267,
$__268;
var exportAnnotations = this.scope.isExport ? this.scope.annotations : [];
var scope = this.pushAnnotationScope_();
($__267 = scope.annotations).push.apply($__267, $traceurRuntime.spread(exportAnnotations, tree.annotations));
($__268 = scope.metadata).push.apply($__268, $traceurRuntime.spread(this.transformMetadata_(createIdentifierExpression(tree.name), scope.annotations, tree.parameterList.parameters)));
tree = $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformFunctionDeclaration", [tree]);
if (tree.annotations.length > 0) {
tree = new FunctionDeclaration(tree.location, tree.name, tree.functionKind, tree.parameterList, tree.typeAnnotation, [], tree.body);
}
return this.appendMetadata_(tree);
},
transformFormalParameter: function(tree) {
if (tree.annotations.length > 0) {
tree = new FormalParameter(tree.location, tree.parameter, tree.typeAnnotation, []);
}
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformFormalParameter", [tree]);
},
transformGetAccessor: function(tree) {
var $__267;
if (!this.scope.inClassScope)
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformGetAccessor", [tree]);
($__267 = this.scope.metadata).push.apply($__267, $traceurRuntime.spread(this.transformMetadata_(this.transformAccessor_(tree, this.scope.className, 'get'), tree.annotations, [])));
if (tree.annotations.length > 0) {
tree = new GetAccessor(tree.location, tree.isStatic, tree.name, tree.typeAnnotation, [], tree.body);
}
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformGetAccessor", [tree]);
},
transformSetAccessor: function(tree) {
var $__267;
if (!this.scope.inClassScope)
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformSetAccessor", [tree]);
($__267 = this.scope.metadata).push.apply($__267, $traceurRuntime.spread(this.transformMetadata_(this.transformAccessor_(tree, this.scope.className, 'set'), tree.annotations, tree.parameterList.parameters)));
var parameterList = this.transformAny(tree.parameterList);
if (parameterList !== tree.parameterList || tree.annotations.length > 0) {
tree = new SetAccessor(tree.location, tree.isStatic, tree.name, parameterList, [], tree.body);
}
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformSetAccessor", [tree]);
},
transformPropertyMethodAssignment: function(tree) {
var $__267,
$__268;
if (!this.scope.inClassScope)
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformPropertyMethodAssignment", [tree]);
if (!tree.isStatic && propName(tree) === CONSTRUCTOR) {
($__267 = this.scope.annotations).push.apply($__267, $traceurRuntime.spread(tree.annotations));
this.scope.constructorParameters = tree.parameterList.parameters;
} else {
($__268 = this.scope.metadata).push.apply($__268, $traceurRuntime.spread(this.transformMetadata_(this.transformPropertyMethod_(tree, this.scope.className), tree.annotations, tree.parameterList.parameters)));
}
var parameterList = this.transformAny(tree.parameterList);
if (parameterList !== tree.parameterList || tree.annotations.length > 0) {
tree = new PropertyMethodAssignment(tree.location, tree.isStatic, tree.functionKind, tree.name, parameterList, tree.typeAnnotation, [], tree.body);
}
return $traceurRuntime.superCall(this, $AnnotationsTransformer.prototype, "transformPropertyMethodAssignment", [tree]);
},
appendMetadata_: function(tree) {
var $__267;
var metadata = this.stack_.pop().metadata;
if (metadata.length > 0) {
if (this.scope.isExport) {
($__267 = this.scope.metadata).push.apply($__267, $traceurRuntime.spread(metadata));
} else {
tree = new AnonBlock(null, $traceurRuntime.spread([tree], metadata));
}
}
return tree;
},
transformClassReference_: function(tree, className) {
var parent = createIdentifierExpression(className);
if (!tree.isStatic)
parent = createMemberExpression(parent, 'prototype');
return parent;
},
transformPropertyMethod_: function(tree, className) {
return createMemberExpression(this.transformClassReference_(tree, className), tree.name.literalToken);
},
transformAccessor_: function(tree, className, accessor) {
var args = createArgumentList([this.transformClassReference_(tree, className), this.createLiteralStringExpression_(tree.name)]);
var descriptor = parseExpression($__257, args);
return createMemberExpression(descriptor, accessor);
},
transformParameters_: function(parameters) {
var $__265 = this;
var hasParameterMetadata = false;
parameters = parameters.map((function(param) {
var $__267;
var metadata = [];
if (param.typeAnnotation)
metadata.push($__265.transformAny(param.typeAnnotation));
if (param.annotations && param.annotations.length > 0)
($__267 = metadata).push.apply($__267, $traceurRuntime.spread($__265.transformAnnotations_(param.annotations)));
if (metadata.length > 0) {
hasParameterMetadata = true;
return createArrayLiteralExpression(metadata);
}
return createArrayLiteralExpression([]);
}));
return hasParameterMetadata ? parameters : [];
},
transformAnnotations_: function(annotations) {
return annotations.map((function(annotation) {
return createNewExpression(annotation.name, annotation.args);
}));
},
transformMetadata_: function(target, annotations, parameters) {
var metadataStatements = [];
if (annotations !== null) {
annotations = this.transformAnnotations_(annotations);
if (annotations.length > 0) {
metadataStatements.push(createAssignmentStatement(createMemberExpression(target, 'annotations'), createArrayLiteralExpression(annotations)));
}
}
if (parameters !== null) {
parameters = this.transformParameters_(parameters);
if (parameters.length > 0) {
metadataStatements.push(createAssignmentStatement(createMemberExpression(target, 'parameters'), createArrayLiteralExpression(parameters)));
}
}
return metadataStatements;
},
createLiteralStringExpression_: function(tree) {
var token = tree.literalToken;
if (tree.literalToken.type !== STRING)
token = createStringLiteralToken(tree.literalToken.value);
return new LiteralExpression(null, token);
},
get scope() {
return this.stack_[this.stack_.length - 1];
},
pushAnnotationScope_: function() {
var scope = new AnnotationsScope();
this.stack_.push(scope);
return scope;
}
}, {}, ParseTreeTransformer);
return {get AnnotationsTransformer() {
return AnnotationsTransformer;
}};
});
System.register("traceur@0.0.52/src/semantics/VariableBinder", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/semantics/VariableBinder";
var ScopeChainBuilder = System.get("traceur@0.0.52/src/semantics/ScopeChainBuilder").ScopeChainBuilder;
function variablesInBlock(tree) {
var includeFunctionScope = arguments[1];
var builder = new ScopeChainBuilder(null);
builder.visitAny(tree);
var scope = builder.getScopeForTree(tree);
var names = scope.getLexicalBindingNames();
if (!includeFunctionScope) {
return names;
}
var variableBindingNames = scope.getVariableBindingNames();
for (var name in variableBindingNames) {
names[name] = true;
}
return names;
}
function variablesInFunction(tree) {
var builder = new ScopeChainBuilder(null);
builder.visitAny(tree);
var scope = builder.getScopeForTree(tree);
return scope.getVariableBindingNames();
}
return {
get variablesInBlock() {
return variablesInBlock;
},
get variablesInFunction() {
return variablesInFunction;
}
};
});
System.register("traceur@0.0.52/src/codegeneration/ScopeTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ScopeTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__271 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
ARGUMENTS = $__271.ARGUMENTS,
THIS = $__271.THIS;
var $__272 = System.get("traceur@0.0.52/src/semantics/VariableBinder"),
variablesInBlock = $__272.variablesInBlock,
variablesInFunction = $__272.variablesInFunction;
var ScopeTransformer = function ScopeTransformer(varName) {
$traceurRuntime.superCall(this, $ScopeTransformer.prototype, "constructor", []);
this.varName_ = varName;
};
var $ScopeTransformer = ScopeTransformer;
($traceurRuntime.createClass)(ScopeTransformer, {
transformBlock: function(tree) {
if (this.varName_ in variablesInBlock(tree)) {
return tree;
} else {
return $traceurRuntime.superCall(this, $ScopeTransformer.prototype, "transformBlock", [tree]);
}
},
transformThisExpression: function(tree) {
if (this.varName_ !== THIS)
return tree;
return $traceurRuntime.superCall(this, $ScopeTransformer.prototype, "transformThisExpression", [tree]);
},
transformFunctionDeclaration: function(tree) {
if (this.getDoNotRecurse(tree))
return tree;
return $traceurRuntime.superCall(this, $ScopeTransformer.prototype, "transformFunctionDeclaration", [tree]);
},
transformFunctionExpression: function(tree) {
if (this.getDoNotRecurse(tree))
return tree;
return $traceurRuntime.superCall(this, $ScopeTransformer.prototype, "transformFunctionExpression", [tree]);
},
getDoNotRecurse: function(tree) {
return this.varName_ === ARGUMENTS || this.varName_ === THIS || this.varName_ in variablesInFunction(tree);
},
transformCatch: function(tree) {
if (!tree.binding.isPattern() && this.varName_ === tree.binding.identifierToken.value) {
return tree;
}
return $traceurRuntime.superCall(this, $ScopeTransformer.prototype, "transformCatch", [tree]);
}
}, {}, ParseTreeTransformer);
return {get ScopeTransformer() {
return ScopeTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/AlphaRenamer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/AlphaRenamer";
var ScopeTransformer = System.get("traceur@0.0.52/src/codegeneration/ScopeTransformer").ScopeTransformer;
var $__275 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FunctionDeclaration = $__275.FunctionDeclaration,
FunctionExpression = $__275.FunctionExpression;
var THIS = System.get("traceur@0.0.52/src/syntax/PredefinedName").THIS;
var createIdentifierExpression = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createIdentifierExpression;
var AlphaRenamer = function AlphaRenamer(varName, newName) {
$traceurRuntime.superCall(this, $AlphaRenamer.prototype, "constructor", [varName]);
this.newName_ = newName;
};
var $AlphaRenamer = AlphaRenamer;
($traceurRuntime.createClass)(AlphaRenamer, {
transformIdentifierExpression: function(tree) {
if (this.varName_ == tree.identifierToken.value) {
return createIdentifierExpression(this.newName_);
} else {
return tree;
}
},
transformThisExpression: function(tree) {
if (this.varName_ !== THIS)
return tree;
return createIdentifierExpression(this.newName_);
},
transformFunctionDeclaration: function(tree) {
if (this.varName_ === tree.name) {
tree = new FunctionDeclaration(tree.location, this.newName_, tree.functionKind, tree.parameterList, tree.typeAnnotation, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $AlphaRenamer.prototype, "transformFunctionDeclaration", [tree]);
},
transformFunctionExpression: function(tree) {
if (this.varName_ === tree.name) {
tree = new FunctionExpression(tree.location, this.newName_, tree.functionKind, tree.parameterList, tree.typeAnnotation, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $AlphaRenamer.prototype, "transformFunctionExpression", [tree]);
}
}, {rename: function(tree, varName, newName) {
return new $AlphaRenamer(varName, newName).transformAny(tree);
}}, ScopeTransformer);
return {get AlphaRenamer() {
return AlphaRenamer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/alphaRenameThisAndArguments", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/alphaRenameThisAndArguments";
var $__279 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
ARGUMENTS = $__279.ARGUMENTS,
THIS = $__279.THIS;
var AlphaRenamer = System.get("traceur@0.0.52/src/codegeneration/AlphaRenamer").AlphaRenamer;
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var FindThisOrArguments = function FindThisOrArguments(tree) {
this.foundThis = false;
this.foundArguments = false;
$traceurRuntime.superCall(this, $FindThisOrArguments.prototype, "constructor", [tree]);
};
var $FindThisOrArguments = FindThisOrArguments;
($traceurRuntime.createClass)(FindThisOrArguments, {
visitThisExpression: function(tree) {
this.foundThis = true;
this.found = this.foundArguments;
},
visitIdentifierExpression: function(tree) {
if (tree.identifierToken.value === ARGUMENTS) {
this.foundArguments = true;
this.found = this.foundThis;
}
}
}, {}, FindInFunctionScope);
function alphaRenameThisAndArguments(tempVarTransformer, tree) {
var finder = new FindThisOrArguments(tree);
if (finder.foundArguments) {
var argumentsTempName = tempVarTransformer.addTempVarForArguments();
tree = AlphaRenamer.rename(tree, ARGUMENTS, argumentsTempName);
}
if (finder.foundThis) {
var thisTempName = tempVarTransformer.addTempVarForThis();
tree = AlphaRenamer.rename(tree, THIS, thisTempName);
}
return tree;
}
var $__default = alphaRenameThisAndArguments;
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ComprehensionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ComprehensionTransformer";
var alphaRenameThisAndArguments = System.get("traceur@0.0.52/src/codegeneration/alphaRenameThisAndArguments").default;
var FunctionExpression = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").FunctionExpression;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__286 = System.get("traceur@0.0.52/src/syntax/TokenType"),
LET = $__286.LET,
STAR = $__286.STAR,
VAR = $__286.VAR;
var $__287 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
COMPREHENSION_FOR = $__287.COMPREHENSION_FOR,
COMPREHENSION_IF = $__287.COMPREHENSION_IF;
var Token = System.get("traceur@0.0.52/src/syntax/Token").Token;
var $__289 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createCallExpression = $__289.createCallExpression,
createEmptyParameterList = $__289.createEmptyParameterList,
createForOfStatement = $__289.createForOfStatement,
createFunctionBody = $__289.createFunctionBody,
createIfStatement = $__289.createIfStatement,
createParenExpression = $__289.createParenExpression,
createVariableDeclarationList = $__289.createVariableDeclarationList;
var options = System.get("traceur@0.0.52/src/Options").options;
var ComprehensionTransformer = function ComprehensionTransformer() {
$traceurRuntime.defaultSuperCall(this, $ComprehensionTransformer.prototype, arguments);
};
var $ComprehensionTransformer = ComprehensionTransformer;
($traceurRuntime.createClass)(ComprehensionTransformer, {transformComprehension: function(tree, statement, isGenerator) {
var prefix = arguments[3];
var suffix = arguments[4];
var bindingKind = isGenerator || !options.blockBinding ? VAR : LET;
var statements = prefix ? [prefix] : [];
for (var i = tree.comprehensionList.length - 1; i >= 0; i--) {
var item = tree.comprehensionList[i];
switch (item.type) {
case COMPREHENSION_IF:
var expression = this.transformAny(item.expression);
statement = createIfStatement(expression, statement);
break;
case COMPREHENSION_FOR:
var left = this.transformAny(item.left);
var iterator = this.transformAny(item.iterator);
var initializer = createVariableDeclarationList(bindingKind, left, null);
statement = createForOfStatement(initializer, iterator, statement);
break;
default:
throw new Error('Unreachable.');
}
}
statement = alphaRenameThisAndArguments(this, statement);
statements.push(statement);
if (suffix)
statements.push(suffix);
var functionKind = isGenerator ? new Token(STAR, null) : null;
var func = new FunctionExpression(null, null, functionKind, createEmptyParameterList(), null, [], createFunctionBody(statements));
return createParenExpression(createCallExpression(func));
}}, {}, TempVarTransformer);
return {get ComprehensionTransformer() {
return ComprehensionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ArrayComprehensionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ArrayComprehensionTransformer";
var $__292 = Object.freeze(Object.defineProperties(["var ", " = 0, ", " = [];"], {raw: {value: Object.freeze(["var ", " = 0, ", " = [];"])}})),
$__293 = Object.freeze(Object.defineProperties(["", "[", "++] = ", ";"], {raw: {value: Object.freeze(["", "[", "++] = ", ";"])}})),
$__294 = Object.freeze(Object.defineProperties(["return ", ";"], {raw: {value: Object.freeze(["return ", ";"])}}));
var ComprehensionTransformer = System.get("traceur@0.0.52/src/codegeneration/ComprehensionTransformer").ComprehensionTransformer;
var createIdentifierExpression = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createIdentifierExpression;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
var ArrayComprehensionTransformer = function ArrayComprehensionTransformer() {
$traceurRuntime.defaultSuperCall(this, $ArrayComprehensionTransformer.prototype, arguments);
};
var $ArrayComprehensionTransformer = ArrayComprehensionTransformer;
($traceurRuntime.createClass)(ArrayComprehensionTransformer, {transformArrayComprehension: function(tree) {
this.pushTempScope();
var expression = this.transformAny(tree.expression);
var index = createIdentifierExpression(this.getTempIdentifier());
var result = createIdentifierExpression(this.getTempIdentifier());
var tempVarsStatatement = parseStatement($__292, index, result);
var statement = parseStatement($__293, result, index, expression);
var returnStatement = parseStatement($__294, result);
var functionKind = null;
var result = this.transformComprehension(tree, statement, functionKind, tempVarsStatatement, returnStatement);
this.popTempScope();
return result;
}}, {}, ComprehensionTransformer);
return {get ArrayComprehensionTransformer() {
return ArrayComprehensionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ArrowFunctionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ArrowFunctionTransformer";
var FunctionExpression = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").FunctionExpression;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var FUNCTION_BODY = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType").FUNCTION_BODY;
var alphaRenameThisAndArguments = System.get("traceur@0.0.52/src/codegeneration/alphaRenameThisAndArguments").default;
var $__303 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createFunctionBody = $__303.createFunctionBody,
createParenExpression = $__303.createParenExpression,
createReturnStatement = $__303.createReturnStatement;
function convertConciseBody(tree) {
if (tree.type !== FUNCTION_BODY)
return createFunctionBody([createReturnStatement(tree)]);
return tree;
}
var ArrowFunctionTransformer = function ArrowFunctionTransformer() {
$traceurRuntime.defaultSuperCall(this, $ArrowFunctionTransformer.prototype, arguments);
};
var $ArrowFunctionTransformer = ArrowFunctionTransformer;
($traceurRuntime.createClass)(ArrowFunctionTransformer, {transformArrowFunctionExpression: function(tree) {
var alphaRenamed = alphaRenameThisAndArguments(this, tree);
var parameterList = this.transformAny(alphaRenamed.parameterList);
var body = this.transformAny(alphaRenamed.body);
body = convertConciseBody(body);
var functionExpression = new FunctionExpression(tree.location, null, tree.functionKind, parameterList, null, [], body);
return createParenExpression(functionExpression);
}}, {transform: function(tempVarTransformer, tree) {
tree = alphaRenameThisAndArguments(tempVarTransformer, tree);
var body = convertConciseBody(tree.body);
return new FunctionExpression(tree.location, null, tree.functionKind, tree.parameterList, null, [], body);
}}, TempVarTransformer);
return {get ArrowFunctionTransformer() {
return ArrowFunctionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/BlockBindingTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/BlockBindingTransformer";
var AlphaRenamer = System.get("traceur@0.0.52/src/codegeneration/AlphaRenamer").AlphaRenamer;
var $__306 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BINDING_IDENTIFIER = $__306.BINDING_IDENTIFIER,
BLOCK = $__306.BLOCK,
VARIABLE_DECLARATION_LIST = $__306.VARIABLE_DECLARATION_LIST;
var $__307 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FunctionDeclaration = $__307.FunctionDeclaration,
FunctionExpression = $__307.FunctionExpression;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__309 = System.get("traceur@0.0.52/src/syntax/TokenType"),
CONST = $__309.CONST,
LET = $__309.LET,
VAR = $__309.VAR;
var $__310 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignmentExpression = $__310.createAssignmentExpression,
createBindingIdentifier = $__310.createBindingIdentifier,
createBlock = $__310.createBlock,
createCatch = $__310.createCatch,
createEmptyStatement = $__310.createEmptyStatement,
createExpressionStatement = $__310.createExpressionStatement,
createFinally = $__310.createFinally,
createForInStatement = $__310.createForInStatement,
createForStatement = $__310.createForStatement,
createFunctionBody = $__310.createFunctionBody,
createIdentifierExpression = $__310.createIdentifierExpression,
createIdentifierToken = $__310.createIdentifierToken,
createThrowStatement = $__310.createThrowStatement,
createTryStatement = $__310.createTryStatement,
createUndefinedExpression = $__310.createUndefinedExpression,
createVariableDeclaration = $__310.createVariableDeclaration,
createVariableDeclarationList = $__310.createVariableDeclarationList,
createVariableStatement = $__310.createVariableStatement;
var ScopeType = {
SCRIPT: 'SCRIPT',
FUNCTION: 'FUNCTION',
BLOCK: 'BLOCK'
};
var Scope = function Scope(parent, type) {
this.parent = parent;
this.type = type;
this.blockVariables = null;
};
($traceurRuntime.createClass)(Scope, {addBlockScopedVariable: function(value) {
if (!this.blockVariables) {
this.blockVariables = Object.create(null);
}
this.blockVariables[value] = true;
}}, {});
;
var Rename = function Rename(oldName, newName) {
this.oldName = oldName;
this.newName = newName;
};
($traceurRuntime.createClass)(Rename, {}, {});
function renameAll(renames, tree) {
renames.forEach((function(rename) {
tree = AlphaRenamer.rename(tree, rename.oldName, rename.newName);
}));
return tree;
}
function toBlock(statement) {
return statement.type == BLOCK ? statement : createBlock([statement]);
}
var BlockBindingTransformer = function BlockBindingTransformer(stateAllocator) {
$traceurRuntime.superCall(this, $BlockBindingTransformer.prototype, "constructor", []);
this.scope_ = null;
};
var $BlockBindingTransformer = BlockBindingTransformer;
($traceurRuntime.createClass)(BlockBindingTransformer, {
createScriptScope_: function() {
return new Scope(this.scope_, ScopeType.SCRIPT);
},
createFunctionScope_: function() {
if (this.scope_ == null) {
throw new Error('Top level function scope found.');
}
return new Scope(this.scope_, ScopeType.FUNCTION);
},
createBlockScope_: function() {
if (this.scope_ == null) {
throw new Error('Top level block scope found.');
}
return new Scope(this.scope_, ScopeType.BLOCK);
},
push_: function(scope) {
this.scope_ = scope;
return scope;
},
pop_: function(scope) {
if (this.scope_ != scope) {
throw new Error('BlockBindingTransformer scope mismatch');
}
this.scope_ = scope.parent;
},
transformBlock: function(tree) {
var scope = this.push_(this.createBlockScope_());
var statements = this.transformList(tree.statements);
if (scope.blockVariables != null) {
tree = createBlock([this.rewriteAsCatch_(scope.blockVariables, createBlock(statements))]);
} else if (statements != tree.statements) {
tree = createBlock(statements);
}
this.pop_(scope);
return tree;
},
rewriteAsCatch_: function(blockVariables, statement) {
for (var variable in blockVariables) {
statement = createTryStatement(createBlock([createThrowStatement(createUndefinedExpression())]), createCatch(createBindingIdentifier(variable), createBlock([statement])), null);
}
return statement;
},
transformClassDeclaration: function(tree) {
throw new Error('ClassDeclaration should be transformed away.');
},
transformForInStatement: function(tree) {
var treeBody = tree.body;
var initializer;
if (tree.initializer != null && tree.initializer.type == VARIABLE_DECLARATION_LIST) {
var variables = tree.initializer;
if (variables.declarations.length != 1) {
throw new Error('for .. in has != 1 variables');
}
var variable = variables.declarations[0];
var variableName = this.getVariableName_(variable);
switch (variables.declarationType) {
case LET:
case CONST:
{
if (variable.initializer != null) {
throw new Error('const/let in for-in may not have an initializer');
}
initializer = createVariableDeclarationList(VAR, ("$" + variableName), null);
treeBody = this.prependToBlock_(createVariableStatement(LET, variableName, createIdentifierExpression(("$" + variableName))), treeBody);
break;
}
case VAR:
initializer = this.transformVariables_(variables);
break;
default:
throw new Error('Unreachable.');
}
} else {
initializer = this.transformAny(tree.initializer);
}
var result = tree;
var collection = this.transformAny(tree.collection);
var body = this.transformAny(treeBody);
if (initializer != tree.initializer || collection != tree.collection || body != tree.body) {
result = createForInStatement(initializer, collection, body);
}
return result;
},
prependToBlock_: function(statement, body) {
if (body.type == BLOCK) {
return createBlock($traceurRuntime.spread([statement], body.statements));
} else {
return createBlock([statement, body]);
}
},
transformForStatement: function(tree) {
var initializer;
if (tree.initializer != null && tree.initializer.type == VARIABLE_DECLARATION_LIST) {
var variables = tree.initializer;
switch (variables.declarationType) {
case LET:
case CONST:
return this.transformForLet_(tree, variables);
case VAR:
initializer = this.transformVariables_(variables);
break;
default:
throw new Error('Reached unreachable.');
}
} else {
initializer = this.transformAny(tree.initializer);
}
var condition = this.transformAny(tree.condition);
var increment = this.transformAny(tree.increment);
var body = this.transformAny(tree.body);
var result = tree;
if (initializer != tree.initializer || condition != tree.condition || increment != tree.increment || body != tree.body) {
result = createForStatement(initializer, condition, increment, body);
}
return result;
},
transformForLet_: function(tree, variables) {
var $__311 = this;
var copyFwd = [];
var copyBak = [];
var hoisted = [];
var renames = [];
variables.declarations.forEach((function(variable) {
var variableName = $__311.getVariableName_(variable);
var hoistedName = ("$" + variableName);
var initializer = renameAll(renames, variable.initializer);
hoisted.push(createVariableDeclaration(hoistedName, initializer));
copyFwd.push(createVariableDeclaration(variableName, createIdentifierExpression(hoistedName)));
copyBak.push(createExpressionStatement(createAssignmentExpression(createIdentifierExpression(hoistedName), createIdentifierExpression(variableName))));
renames.push(new Rename(variableName, hoistedName));
}));
var condition = renameAll(renames, tree.condition);
var increment = renameAll(renames, tree.increment);
var transformedForLoop = createBlock([createVariableStatement(createVariableDeclarationList(LET, hoisted)), createForStatement(null, condition, increment, createBlock([createVariableStatement(createVariableDeclarationList(LET, copyFwd)), createTryStatement(toBlock(tree.body), null, createFinally(createBlock(copyBak)))]))]);
return this.transformAny(transformedForLoop);
},
transformFunctionDeclaration: function(tree) {
var body = this.transformFunctionBody(tree.body);
var parameterList = this.transformAny(tree.parameterList);
if (this.scope_.type === ScopeType.BLOCK) {
this.scope_.addBlockScopedVariable(tree.name.identifierToken.value);
return createExpressionStatement(createAssignmentExpression(createIdentifierExpression(tree.name.identifierToken), new FunctionExpression(tree.location, null, tree.functionKind, parameterList, tree.typeAnnotation, tree.annotations, body)));
}
if (body === tree.body && parameterList === tree.parameterList) {
return tree;
}
return new FunctionDeclaration(tree.location, tree.name, tree.functionKind, parameterList, tree.typeAnnotation, tree.annotations, body);
},
transformScript: function(tree) {
var scope = this.push_(this.createScriptScope_());
var result = $traceurRuntime.superCall(this, $BlockBindingTransformer.prototype, "transformScript", [tree]);
this.pop_(scope);
return result;
},
transformVariableDeclaration: function(tree) {
throw new Error('Should never see variable declaration tree.');
},
transformVariableDeclarationList: function(tree) {
throw new Error('Should never see variable declaration list.');
},
transformVariableStatement: function(tree) {
if (this.scope_.type == ScopeType.BLOCK) {
switch (tree.declarations.declarationType) {
case CONST:
case LET:
return this.transformBlockVariables_(tree.declarations);
default:
break;
}
}
var variables = this.transformVariables_(tree.declarations);
if (variables != tree.declarations) {
tree = createVariableStatement(variables);
}
return tree;
},
transformBlockVariables_: function(tree) {
var $__311 = this;
var variables = tree.declarations;
var commaExpressions = [];
variables.forEach((function(variable) {
switch (tree.declarationType) {
case LET:
case CONST:
break;
default:
throw new Error('Only let/const allowed here.');
}
var variableName = $__311.getVariableName_(variable);
$__311.scope_.addBlockScopedVariable(variableName);
var initializer = $__311.transformAny(variable.initializer);
if (initializer != null) {
commaExpressions.push(createAssignmentExpression(createIdentifierExpression(variableName), initializer));
}
}));
switch (commaExpressions.length) {
case 0:
return createEmptyStatement();
case 1:
return createExpressionStatement(commaExpressions[0]);
default:
for (var i = 0; i < commaExpressions.length; i++) {
commaExpressions[i] = createExpressionStatement(commaExpressions[i]);
}
return createBlock(commaExpressions);
}
},
transformVariables_: function(tree) {
var variables = tree.declarations;
var transformed = null;
for (var index = 0; index < variables.length; index++) {
var variable = variables[index];
var variableName = this.getVariableName_(variable);
var initializer = this.transformAny(variable.initializer);
if (transformed != null || initializer != variable.initializer) {
if (transformed == null) {
transformed = variables.slice(0, index);
}
transformed.push(createVariableDeclaration(createIdentifierToken(variableName), initializer));
}
}
if (transformed != null || tree.declarationType != VAR) {
var declarations = transformed != null ? transformed : tree.declarations;
var declarationType = tree.declarationType != VAR ? VAR : tree.declarationType;
tree = createVariableDeclarationList(declarationType, declarations);
}
return tree;
},
transformFunctionBody: function(body) {
var scope = this.push_(this.createFunctionScope_());
body = this.transformFunctionBodyStatements_(body);
this.pop_(scope);
return body;
},
transformFunctionBodyStatements_: function(tree) {
var statements = this.transformList(tree.statements);
if (this.scope_.blockVariables != null) {
tree = this.rewriteAsCatch_(this.scope_.blockVariables, createBlock(statements));
} else if (statements != tree.statements) {
tree = createFunctionBody(statements);
}
return tree;
},
getVariableName_: function(variable) {
var lvalue = variable.lvalue;
if (lvalue.type == BINDING_IDENTIFIER) {
return lvalue.identifierToken.value;
}
throw new Error('Unexpected destructuring declaration found.');
}
}, {}, ParseTreeTransformer);
return {get BlockBindingTransformer() {
return BlockBindingTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/MakeStrictTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/MakeStrictTransformer";
var $__313 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FunctionBody = $__313.FunctionBody,
Script = $__313.Script;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var createUseStrictDirective = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createUseStrictDirective;
var hasUseStrict = System.get("traceur@0.0.52/src/semantics/util").hasUseStrict;
function prepend(statements) {
return $traceurRuntime.spread([createUseStrictDirective()], statements);
}
var MakeStrictTransformer = function MakeStrictTransformer() {
$traceurRuntime.defaultSuperCall(this, $MakeStrictTransformer.prototype, arguments);
};
var $MakeStrictTransformer = MakeStrictTransformer;
($traceurRuntime.createClass)(MakeStrictTransformer, {
transformScript: function(tree) {
if (hasUseStrict(tree.scriptItemList))
return tree;
return new Script(tree.location, prepend(tree.scriptItemList));
},
transformFunctionBody: function(tree) {
if (hasUseStrict(tree.statements))
return tree;
return new FunctionBody(tree.location, prepend(tree.statements));
}
}, {transformTree: function(tree) {
return new $MakeStrictTransformer().transformAny(tree);
}}, ParseTreeTransformer);
return {get MakeStrictTransformer() {
return MakeStrictTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/assignmentOperatorToBinaryOperator", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/assignmentOperatorToBinaryOperator";
var $__318 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AMPERSAND = $__318.AMPERSAND,
AMPERSAND_EQUAL = $__318.AMPERSAND_EQUAL,
BAR = $__318.BAR,
BAR_EQUAL = $__318.BAR_EQUAL,
CARET = $__318.CARET,
CARET_EQUAL = $__318.CARET_EQUAL,
LEFT_SHIFT = $__318.LEFT_SHIFT,
LEFT_SHIFT_EQUAL = $__318.LEFT_SHIFT_EQUAL,
MINUS = $__318.MINUS,
MINUS_EQUAL = $__318.MINUS_EQUAL,
PERCENT = $__318.PERCENT,
PERCENT_EQUAL = $__318.PERCENT_EQUAL,
PLUS = $__318.PLUS,
PLUS_EQUAL = $__318.PLUS_EQUAL,
RIGHT_SHIFT = $__318.RIGHT_SHIFT,
RIGHT_SHIFT_EQUAL = $__318.RIGHT_SHIFT_EQUAL,
SLASH = $__318.SLASH,
SLASH_EQUAL = $__318.SLASH_EQUAL,
STAR = $__318.STAR,
STAR_EQUAL = $__318.STAR_EQUAL,
UNSIGNED_RIGHT_SHIFT = $__318.UNSIGNED_RIGHT_SHIFT,
UNSIGNED_RIGHT_SHIFT_EQUAL = $__318.UNSIGNED_RIGHT_SHIFT_EQUAL;
function assignmentOperatorToBinaryOperator(type) {
switch (type) {
case STAR_EQUAL:
return STAR;
case SLASH_EQUAL:
return SLASH;
case PERCENT_EQUAL:
return PERCENT;
case PLUS_EQUAL:
return PLUS;
case MINUS_EQUAL:
return MINUS;
case LEFT_SHIFT_EQUAL:
return LEFT_SHIFT;
case RIGHT_SHIFT_EQUAL:
return RIGHT_SHIFT;
case UNSIGNED_RIGHT_SHIFT_EQUAL:
return UNSIGNED_RIGHT_SHIFT;
case AMPERSAND_EQUAL:
return AMPERSAND;
case CARET_EQUAL:
return CARET;
case BAR_EQUAL:
return BAR;
default:
throw Error('unreachable');
}
}
var $__default = assignmentOperatorToBinaryOperator;
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ExplodeExpressionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ExplodeExpressionTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__320 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignmentExpression = $__320.createAssignmentExpression,
createCommaExpression = $__320.createCommaExpression,
id = $__320.createIdentifierExpression,
createMemberExpression = $__320.createMemberExpression,
createNumberLiteral = $__320.createNumberLiteral,
createOperatorToken = $__320.createOperatorToken,
createParenExpression = $__320.createParenExpression;
var $__321 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AND = $__321.AND,
EQUAL = $__321.EQUAL,
MINUS = $__321.MINUS,
MINUS_EQUAL = $__321.MINUS_EQUAL,
MINUS_MINUS = $__321.MINUS_MINUS,
OR = $__321.OR,
PLUS = $__321.PLUS,
PLUS_EQUAL = $__321.PLUS_EQUAL,
PLUS_PLUS = $__321.PLUS_PLUS;
var $__322 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
COMMA_EXPRESSION = $__322.COMMA_EXPRESSION,
IDENTIFIER_EXPRESSION = $__322.IDENTIFIER_EXPRESSION,
MEMBER_EXPRESSION = $__322.MEMBER_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__322.MEMBER_LOOKUP_EXPRESSION,
PROPERTY_NAME_ASSIGNMENT = $__322.PROPERTY_NAME_ASSIGNMENT,
SPREAD_EXPRESSION = $__322.SPREAD_EXPRESSION,
TEMPLATE_LITERAL_PORTION = $__322.TEMPLATE_LITERAL_PORTION;
var $__323 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
ArgumentList = $__323.ArgumentList,
ArrayLiteralExpression = $__323.ArrayLiteralExpression,
AwaitExpression = $__323.AwaitExpression,
BinaryExpression = $__323.BinaryExpression,
CallExpression = $__323.CallExpression,
ConditionalExpression = $__323.ConditionalExpression,
MemberExpression = $__323.MemberExpression,
MemberLookupExpression = $__323.MemberLookupExpression,
NewExpression = $__323.NewExpression,
ObjectLiteralExpression = $__323.ObjectLiteralExpression,
PropertyNameAssignment = $__323.PropertyNameAssignment,
SpreadExpression = $__323.SpreadExpression,
TemplateLiteralExpression = $__323.TemplateLiteralExpression,
TemplateSubstitution = $__323.TemplateSubstitution,
UnaryExpression = $__323.UnaryExpression,
YieldExpression = $__323.YieldExpression;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var assignmentOperatorToBinaryOperator = System.get("traceur@0.0.52/src/codegeneration/assignmentOperatorToBinaryOperator").default;
var CommaExpressionBuilder = function CommaExpressionBuilder(tempVar) {
this.tempVar = tempVar;
this.expressions = [];
};
($traceurRuntime.createClass)(CommaExpressionBuilder, {
add: function(tree) {
var $__327;
if (tree.type === COMMA_EXPRESSION)
($__327 = this.expressions).push.apply($__327, $traceurRuntime.spread(getExpressions(tree)));
return this;
},
build: function(tree) {
var tempVar = this.tempVar;
this.expressions.push(createAssignmentExpression(tempVar, tree), tempVar);
return createCommaExpression(this.expressions);
}
}, {});
function getResult(tree) {
if (tree.type === COMMA_EXPRESSION)
return tree.expressions[tree.expressions.length - 1];
return tree;
}
function getExpressions(tree) {
if (tree.type === COMMA_EXPRESSION)
return tree.expressions.slice(0, -1);
return [];
}
var ExplodeExpressionTransformer = function ExplodeExpressionTransformer(tempVarTransformer) {
$traceurRuntime.superCall(this, $ExplodeExpressionTransformer.prototype, "constructor", []);
this.tempVarTransformer_ = tempVarTransformer;
};
var $ExplodeExpressionTransformer = ExplodeExpressionTransformer;
($traceurRuntime.createClass)(ExplodeExpressionTransformer, {
addTempVar: function() {
var tmpId = this.tempVarTransformer_.addTempVar();
return id(tmpId);
},
transformUnaryExpression: function(tree) {
if (tree.operator.type == PLUS_PLUS)
return this.transformUnaryNumeric(tree, PLUS_EQUAL);
if (tree.operator.type == MINUS_MINUS)
return this.transformUnaryNumeric(tree, MINUS_EQUAL);
var operand = this.transformAny(tree.operand);
if (operand === tree.operand)
return tree;
var expressions = $traceurRuntime.spread(getExpressions(operand), [new UnaryExpression(tree.location, tree.operator, getResult(operand))]);
return createCommaExpression(expressions);
},
transformUnaryNumeric: function(tree, operator) {
return this.transformAny(new BinaryExpression(tree.location, tree.operand, createOperatorToken(operator), createNumberLiteral(1)));
},
transformPostfixExpression: function(tree) {
if (tree.operand.type === MEMBER_EXPRESSION)
return this.transformPostfixMemberExpression(tree);
if (tree.operand.type === MEMBER_LOOKUP_EXPRESSION)
return this.transformPostfixMemberLookupExpression(tree);
assert(tree.operand.type === IDENTIFIER_EXPRESSION);
var operand = tree.operand;
var tmp = this.addTempVar();
var operator = tree.operator.type === PLUS_PLUS ? PLUS : MINUS;
var expressions = [createAssignmentExpression(tmp, operand), createAssignmentExpression(operand, new BinaryExpression(tree.location, tmp, createOperatorToken(operator), createNumberLiteral(1))), tmp];
return createCommaExpression(expressions);
},
transformPostfixMemberExpression: function(tree) {
var memberName = tree.operand.memberName;
var operand = this.transformAny(tree.operand.operand);
var tmp = this.addTempVar();
var memberExpression = new MemberExpression(tree.operand.location, getResult(operand), memberName);
var operator = tree.operator.type === PLUS_PLUS ? PLUS : MINUS;
var expressions = $traceurRuntime.spread(getExpressions(operand), [createAssignmentExpression(tmp, memberExpression), createAssignmentExpression(memberExpression, new BinaryExpression(tree.location, tmp, createOperatorToken(operator), createNumberLiteral(1))), tmp]);
return createCommaExpression(expressions);
},
transformPostfixMemberLookupExpression: function(tree) {
var memberExpression = this.transformAny(tree.operand.memberExpression);
var operand = this.transformAny(tree.operand.operand);
var tmp = this.addTempVar();
var memberLookupExpression = new MemberLookupExpression(null, getResult(operand), getResult(memberExpression));
var operator = tree.operator.type === PLUS_PLUS ? PLUS : MINUS;
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(memberExpression), [createAssignmentExpression(tmp, memberLookupExpression), createAssignmentExpression(memberLookupExpression, new BinaryExpression(tree.location, tmp, createOperatorToken(operator), createNumberLiteral(1))), tmp]);
return createCommaExpression(expressions);
},
transformYieldExpression: function(tree) {
var expression = this.transformAny(tree.expression);
return this.createCommaExpressionBuilder().add(expression).build(new YieldExpression(tree.location, getResult(expression), tree.isYieldFor));
},
transformAwaitExpression: function(tree) {
var expression = this.transformAny(tree.expression);
return this.createCommaExpressionBuilder().add(expression).build(new AwaitExpression(tree.location, getResult(expression)));
},
transformParenExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression)
return tree;
var result = getResult(expression);
if (result.type === IDENTIFIER_EXPRESSION)
return expression;
return this.createCommaExpressionBuilder().add(expression).build(result);
},
transformCommaExpression: function(tree) {
var expressions = this.transformList(tree.expressions);
if (expressions === tree.expressions)
return tree;
var builder = new CommaExpressionBuilder(null);
for (var i = 0; i < expressions.length; i++) {
builder.add(expressions[i]);
}
return createCommaExpression($traceurRuntime.spread(builder.expressions, [getResult(expressions[expressions.length - 1])]));
},
transformMemberExpression: function(tree) {
var operand = this.transformAny(tree.operand);
return this.createCommaExpressionBuilder().add(operand).build(new MemberExpression(tree.location, getResult(operand), tree.memberName));
},
transformMemberLookupExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var memberExpression = this.transformAny(tree.memberExpression);
return this.createCommaExpressionBuilder().add(operand).add(memberExpression).build(new MemberLookupExpression(tree.location, getResult(operand), getResult(memberExpression)));
},
transformBinaryExpression: function(tree) {
if (tree.operator.isAssignmentOperator())
return this.transformAssignmentExpression(tree);
var left = this.transformAny(tree.left);
var right = this.transformAny(tree.right);
if (left === tree.left && right === tree.right)
return tree;
if (tree.operator.type === OR)
return this.transformOr(left, right);
if (tree.operator.type === AND)
return this.transformAnd(left, right);
var expressions = $traceurRuntime.spread(getExpressions(left), getExpressions(right), [new BinaryExpression(tree.location, getResult(left), tree.operator, getResult(right))]);
return createCommaExpression(expressions);
},
transformAssignmentExpression: function(tree) {
var left = tree.left;
if (left.type === MEMBER_EXPRESSION)
return this.transformAssignMemberExpression(tree);
if (left.type === MEMBER_LOOKUP_EXPRESSION)
return this.transformAssignMemberLookupExpression(tree);
assert(tree.left.type === IDENTIFIER_EXPRESSION);
if (tree.operator.type === EQUAL) {
var left = this.transformAny(left);
var right = this.transformAny(tree.right);
var expressions = $traceurRuntime.spread(getExpressions(right), [createAssignmentExpression(left, getResult(right)), getResult(right)]);
return createCommaExpression(expressions);
}
var right = this.transformAny(tree.right);
var tmp = this.addTempVar();
var binop = createOperatorToken(assignmentOperatorToBinaryOperator(tree.operator.type));
var expressions = $traceurRuntime.spread(getExpressions(right), [createAssignmentExpression(tmp, new BinaryExpression(tree.location, left, binop, getResult(right))), createAssignmentExpression(left, tmp), tmp]);
return createCommaExpression(expressions);
},
transformAssignMemberExpression: function(tree) {
var left = tree.left;
if (tree.operator.type === EQUAL) {
var operand = this.transformAny(left.operand);
var right = this.transformAny(tree.right);
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(right), [new BinaryExpression(tree.location, new MemberExpression(left.location, getResult(operand), left.memberName), tree.operator, getResult(right)), getResult(right)]);
return createCommaExpression(expressions);
}
var operand = this.transformAny(left.operand);
var right = this.transformAny(tree.right);
var tmp = this.addTempVar();
var memberExpression = new MemberExpression(left.location, getResult(operand), left.memberName);
var tmp2 = this.addTempVar();
var binop = createOperatorToken(assignmentOperatorToBinaryOperator(tree.operator.type));
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(right), [createAssignmentExpression(tmp, memberExpression), createAssignmentExpression(tmp2, new BinaryExpression(tree.location, tmp, binop, getResult(right))), createAssignmentExpression(memberExpression, tmp2), tmp2]);
return createCommaExpression(expressions);
},
transformAssignMemberLookupExpression: function(tree) {
var left = tree.left;
if (tree.operator.type === EQUAL) {
var operand = this.transformAny(left.operand);
var memberExpression = this.transformAny(left.memberExpression);
var right = this.transformAny(tree.right);
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(memberExpression), getExpressions(right), [new BinaryExpression(tree.location, new MemberLookupExpression(left.location, getResult(operand), getResult(memberExpression)), tree.operator, getResult(right)), getResult(right)]);
return createCommaExpression(expressions);
}
var operand = this.transformAny(left.operand);
var memberExpression = this.transformAny(left.memberExpression);
var right = this.transformAny(tree.right);
var tmp = this.addTempVar();
var memberLookupExpression = new MemberLookupExpression(left.location, getResult(operand), getResult(memberExpression));
var tmp2 = this.addTempVar();
var binop = createOperatorToken(assignmentOperatorToBinaryOperator(tree.operator.type));
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(memberExpression), getExpressions(right), [createAssignmentExpression(tmp, memberLookupExpression), createAssignmentExpression(tmp2, new BinaryExpression(tree.location, tmp, binop, getResult(right))), createAssignmentExpression(memberLookupExpression, tmp2), tmp2]);
return createCommaExpression(expressions);
},
transformArrayLiteralExpression: function(tree) {
var elements = this.transformList(tree.elements);
if (elements === tree.elements)
return tree;
var builder = this.createCommaExpressionBuilder();
var results = [];
for (var i = 0; i < elements.length; i++) {
builder.add(elements[i]);
results.push(getResult(elements[i]));
}
return builder.build(new ArrayLiteralExpression(tree.location, results));
},
transformObjectLiteralExpression: function(tree) {
var propertyNameAndValues = this.transformList(tree.propertyNameAndValues);
if (propertyNameAndValues === tree.propertyNameAndValues)
return tree;
var builder = this.createCommaExpressionBuilder();
var results = [];
for (var i = 0; i < propertyNameAndValues.length; i++) {
if (propertyNameAndValues[i].type === PROPERTY_NAME_ASSIGNMENT) {
builder.add(propertyNameAndValues[i].value);
results.push(new PropertyNameAssignment(propertyNameAndValues[i].location, propertyNameAndValues[i].name, getResult(propertyNameAndValues[i].value)));
} else {
results.push(propertyNameAndValues[i]);
}
}
return builder.build(new ObjectLiteralExpression(tree.location, results));
},
transformTemplateLiteralExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var elements = this.transformList(tree.elements);
if (!operand && operand === tree.operand && elements === tree.elements)
return tree;
var builder = this.createCommaExpressionBuilder();
if (operand)
builder.add(operand);
var results = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].type === TEMPLATE_LITERAL_PORTION) {
results.push(elements[i]);
} else {
var expression = elements[i].expression;
builder.add(expression);
var result = getResult(expression);
results.push(new TemplateSubstitution(expression.location, result));
}
}
return builder.build(new TemplateLiteralExpression(tree.location, operand && getResult(operand), results));
},
transformCallExpression: function(tree) {
if (tree.operand.type === MEMBER_EXPRESSION)
return this.transformCallMemberExpression(tree);
if (tree.operand.type === MEMBER_LOOKUP_EXPRESSION)
return this.transformCallMemberLookupExpression(tree);
return this.transformCallAndNew_(tree, CallExpression);
},
transformNewExpression: function(tree) {
return this.transformCallAndNew_(tree, NewExpression);
},
transformCallAndNew_: function(tree, ctor) {
var operand = this.transformAny(tree.operand);
var args = this.transformAny(tree.args);
var builder = this.createCommaExpressionBuilder().add(operand);
var argResults = [];
args.args.forEach((function(arg) {
builder.add(arg);
argResults.push(getResult(arg));
}));
return builder.build(new ctor(tree.location, getResult(operand), new ArgumentList(args.location, argResults)));
},
transformCallMemberExpression: function(tree) {
var memberName = tree.operand.memberName;
var operand = this.transformAny(tree.operand.operand);
var tmp = this.addTempVar();
var memberExpresssion = new MemberExpression(tree.operand.location, getResult(operand), memberName);
var args = this.transformAny(tree.args);
var expressions = $traceurRuntime.spread(getExpressions(operand), [createAssignmentExpression(tmp, memberExpresssion)]);
var argResults = [getResult(operand)];
args.args.forEach((function(arg) {
var $__327;
($__327 = expressions).push.apply($__327, $traceurRuntime.spread(getExpressions(arg)));
argResults.push(getResult(arg));
}));
var callExpression = new CallExpression(tree.location, createMemberExpression(tmp, 'call'), new ArgumentList(args.location, argResults));
var tmp2 = this.addTempVar();
expressions.push(createAssignmentExpression(tmp2, callExpression), tmp2);
return createCommaExpression(expressions);
},
transformCallMemberLookupExpression: function(tree) {
var operand = this.transformAny(tree.operand.operand);
var memberExpression = this.transformAny(tree.operand.memberExpression);
var tmp = this.addTempVar();
var lookupExpresssion = new MemberLookupExpression(tree.operand.location, getResult(operand), getResult(memberExpression));
var args = this.transformAny(tree.args);
var expressions = $traceurRuntime.spread(getExpressions(operand), getExpressions(memberExpression), [createAssignmentExpression(tmp, lookupExpresssion)]);
var argResults = [getResult(operand)];
args.args.forEach((function(arg, i) {
var $__327;
($__327 = expressions).push.apply($__327, $traceurRuntime.spread(getExpressions(arg)));
var result = getResult(arg);
if (tree.args.args[i].type === SPREAD_EXPRESSION)
result = new SpreadExpression(arg.location, result);
argResults.push(result);
}));
var callExpression = new CallExpression(tree.location, createMemberExpression(tmp, 'call'), new ArgumentList(args.location, argResults));
var tmp2 = this.addTempVar();
expressions.push(createAssignmentExpression(tmp2, callExpression), tmp2);
return createCommaExpression(expressions);
},
transformConditionalExpression: function(tree) {
var condition = this.transformAny(tree.condition);
var left = this.transformAny(tree.left);
var right = this.transformAny(tree.right);
if (condition === tree.condition && left === tree.left && right === tree.right)
return tree;
var res = this.addTempVar();
var leftTree = createCommaExpression($traceurRuntime.spread(getExpressions(left), [createAssignmentExpression(res, getResult(left))]));
var rightTree = createCommaExpression($traceurRuntime.spread(getExpressions(right), [createAssignmentExpression(res, getResult(right))]));
var expressions = $traceurRuntime.spread(getExpressions(condition), [new ConditionalExpression(tree.location, getResult(condition), createParenExpression(leftTree), createParenExpression(rightTree)), res]);
return createCommaExpression(expressions);
},
transformOr: function(left, right) {
var res = this.addTempVar();
var leftTree = createCommaExpression([createAssignmentExpression(res, getResult(left))]);
var rightTree = createCommaExpression($traceurRuntime.spread(getExpressions(right), [createAssignmentExpression(res, getResult(right))]));
var expressions = $traceurRuntime.spread(getExpressions(left), [new ConditionalExpression(left.location, getResult(left), createParenExpression(leftTree), createParenExpression(rightTree)), res]);
return createCommaExpression(expressions);
},
transformAnd: function(left, right) {
var res = this.addTempVar();
var leftTree = createCommaExpression($traceurRuntime.spread(getExpressions(right), [createAssignmentExpression(res, getResult(right))]));
var rightTree = createCommaExpression([createAssignmentExpression(res, getResult(left))]);
var expressions = $traceurRuntime.spread(getExpressions(left), [new ConditionalExpression(left.location, getResult(left), createParenExpression(leftTree), createParenExpression(rightTree)), res]);
return createCommaExpression(expressions);
},
transformSpreadExpression: function(tree) {
var expression = this.transformAny(tree.expression);
if (expression === tree.expression)
return tree;
var result = getResult(expression);
if (result.type !== SPREAD_EXPRESSION)
result = new SpreadExpression(result.location, result);
var expressions = $traceurRuntime.spread(getExpressions(expression), [result]);
return createCommaExpression(expressions);
},
createCommaExpressionBuilder: function() {
return new CommaExpressionBuilder(this.addTempVar());
}
}, {}, ParseTreeTransformer);
return {get ExplodeExpressionTransformer() {
return ExplodeExpressionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/SuperTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/SuperTransformer";
var $__328 = Object.freeze(Object.defineProperties(["$traceurRuntime.superCall(", ", ", ", ", ",\n ", ")"], {raw: {value: Object.freeze(["$traceurRuntime.superCall(", ", ", ", ", ",\n ", ")"])}})),
$__329 = Object.freeze(Object.defineProperties(["$traceurRuntime.superGet(", ", ", ", ", ")"], {raw: {value: Object.freeze(["$traceurRuntime.superGet(", ", ", ", ", ")"])}})),
$__330 = Object.freeze(Object.defineProperties(["$traceurRuntime.superSet(", ", ", ", ", ",\n ", ")"], {raw: {value: Object.freeze(["$traceurRuntime.superSet(", ", ", ", ", ",\n ", ")"])}}));
var ExplodeExpressionTransformer = System.get("traceur@0.0.52/src/codegeneration/ExplodeExpressionTransformer").ExplodeExpressionTransformer;
var $__332 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FunctionDeclaration = $__332.FunctionDeclaration,
FunctionExpression = $__332.FunctionExpression;
var $__333 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
LITERAL_PROPERTY_NAME = $__333.LITERAL_PROPERTY_NAME,
MEMBER_EXPRESSION = $__333.MEMBER_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__333.MEMBER_LOOKUP_EXPRESSION,
SUPER_EXPRESSION = $__333.SUPER_EXPRESSION;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__335 = System.get("traceur@0.0.52/src/syntax/TokenType"),
EQUAL = $__335.EQUAL,
MINUS_MINUS = $__335.MINUS_MINUS,
PLUS_PLUS = $__335.PLUS_PLUS;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var $__337 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArrayLiteralExpression = $__337.createArrayLiteralExpression,
createIdentifierExpression = $__337.createIdentifierExpression,
createParenExpression = $__337.createParenExpression,
createStringLiteral = $__337.createStringLiteral,
createThisExpression = $__337.createThisExpression;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
var ExplodeSuperExpression = function ExplodeSuperExpression() {
$traceurRuntime.defaultSuperCall(this, $ExplodeSuperExpression.prototype, arguments);
};
var $ExplodeSuperExpression = ExplodeSuperExpression;
($traceurRuntime.createClass)(ExplodeSuperExpression, {
transformArrowFunctionExpression: function(tree) {
return tree;
},
transformClassExpression: function(tree) {
return tree;
},
transformFunctionBody: function(tree) {
return tree;
}
}, {}, ExplodeExpressionTransformer);
var SuperTransformer = function SuperTransformer(tempVarTransformer, protoName, methodTree, thisName) {
this.tempVarTransformer_ = tempVarTransformer;
this.protoName_ = protoName;
this.method_ = methodTree;
this.superCount_ = 0;
this.thisVar_ = createIdentifierExpression(thisName);
this.inNestedFunc_ = 0;
this.nestedSuperCount_ = 0;
};
var $SuperTransformer = SuperTransformer;
($traceurRuntime.createClass)(SuperTransformer, {
get hasSuper() {
return this.superCount_ > 0;
},
get nestedSuper() {
return this.nestedSuperCount_ > 0;
},
transformFunctionDeclaration: function(tree) {
return this.transformFunction_(tree, FunctionDeclaration);
},
transformFunctionExpression: function(tree) {
return this.transformFunction_(tree, FunctionExpression);
},
transformFunction_: function(tree, constructor) {
var oldSuperCount = this.superCount_;
this.inNestedFunc_++;
var transformedTree = constructor === FunctionExpression ? $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformFunctionExpression", [tree]) : $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformFunctionDeclaration", [tree]);
this.inNestedFunc_--;
if (oldSuperCount !== this.superCount_)
this.nestedSuperCount_ += this.superCount_ - oldSuperCount;
return transformedTree;
},
transformGetAccessor: function(tree) {
return tree;
},
transformSetAccessor: function(tree) {
return tree;
},
transformPropertyMethodAssignMent: function(tree) {
return tree;
},
transformCallExpression: function(tree) {
if (this.method_ && tree.operand.type == SUPER_EXPRESSION) {
this.superCount_++;
assert(this.method_.name.type === LITERAL_PROPERTY_NAME);
var methodName = this.method_.name.literalToken.value;
return this.createSuperCallExpression_(methodName, tree);
}
if (hasSuperMemberExpression(tree.operand)) {
this.superCount_++;
var name;
if (tree.operand.type == MEMBER_EXPRESSION)
name = tree.operand.memberName.value;
else
name = tree.operand.memberExpression;
return this.createSuperCallExpression_(name, tree);
}
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformCallExpression", [tree]);
},
createSuperCallExpression_: function(methodName, tree) {
var thisExpr = this.inNestedFunc_ ? this.thisVar_ : createThisExpression();
var args = createArrayLiteralExpression(tree.args.args);
return this.createSuperCallExpression(thisExpr, this.protoName_, methodName, args);
},
createSuperCallExpression: function(thisExpr, protoName, methodName, args) {
return parseExpression($__328, thisExpr, protoName, methodName, args);
},
transformMemberShared_: function(tree, name) {
var thisExpr = this.inNestedFunc_ ? this.thisVar_ : createThisExpression();
return parseExpression($__329, thisExpr, this.protoName_, name);
},
transformMemberExpression: function(tree) {
if (tree.operand.type === SUPER_EXPRESSION) {
this.superCount_++;
return this.transformMemberShared_(tree, createStringLiteral(tree.memberName.value));
}
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformMemberExpression", [tree]);
},
transformMemberLookupExpression: function(tree) {
if (tree.operand.type === SUPER_EXPRESSION)
return this.transformMemberShared_(tree, tree.memberExpression);
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformMemberLookupExpression", [tree]);
},
transformBinaryExpression: function(tree) {
if (tree.operator.isAssignmentOperator() && hasSuperMemberExpression(tree.left)) {
if (tree.operator.type !== EQUAL) {
var exploded = new ExplodeSuperExpression(this.tempVarTransformer_).transformAny(tree);
return this.transformAny(createParenExpression(exploded));
}
this.superCount_++;
var name = tree.left.type === MEMBER_LOOKUP_EXPRESSION ? tree.left.memberExpression : createStringLiteral(tree.left.memberName.value);
var thisExpr = this.inNestedFunc_ ? this.thisVar_ : createThisExpression();
var right = this.transformAny(tree.right);
return parseExpression($__330, thisExpr, this.protoName_, name, right);
}
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformBinaryExpression", [tree]);
},
transformUnaryExpression: function(tree) {
var transformed = this.transformIncrementDecrement_(tree);
if (transformed)
return transformed;
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformUnaryExpression", [tree]);
},
transformPostfixExpression: function(tree) {
var transformed = this.transformIncrementDecrement_(tree);
if (transformed)
return transformed;
return $traceurRuntime.superCall(this, $SuperTransformer.prototype, "transformPostfixExpression", [tree]);
},
transformIncrementDecrement_: function(tree) {
var operator = tree.operator;
var operand = tree.operand;
if ((operator.type === PLUS_PLUS || operator.type === MINUS_MINUS) && hasSuperMemberExpression(operand)) {
var exploded = new ExplodeSuperExpression(this.tempVarTransformer_).transformAny(tree);
if (exploded !== tree)
exploded = createParenExpression(exploded);
return this.transformAny(exploded);
}
return null;
}
}, {}, ParseTreeTransformer);
function hasSuperMemberExpression(tree) {
if (tree.type !== MEMBER_EXPRESSION && tree.type !== MEMBER_LOOKUP_EXPRESSION)
return false;
return tree.operand.type === SUPER_EXPRESSION;
}
return {get SuperTransformer() {
return SuperTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ClassTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ClassTransformer";
var $__340 = Object.freeze(Object.defineProperties(["($traceurRuntime.createClass)(", ", ", ", ", ",\n ", ")"], {raw: {value: Object.freeze(["($traceurRuntime.createClass)(", ", ", ", ", ",\n ", ")"])}})),
$__341 = Object.freeze(Object.defineProperties(["($traceurRuntime.createClass)(", ", ", ", ", ")"], {raw: {value: Object.freeze(["($traceurRuntime.createClass)(", ", ", ", ", ")"])}})),
$__342 = Object.freeze(Object.defineProperties(["var ", " = ", ""], {raw: {value: Object.freeze(["var ", " = ", ""])}})),
$__343 = Object.freeze(Object.defineProperties(["var ", " = ", ""], {raw: {value: Object.freeze(["var ", " = ", ""])}})),
$__344 = Object.freeze(Object.defineProperties(["function($__super) {\n var ", " = ", ";\n return ($traceurRuntime.createClass)(", ", ", ",\n ", ", $__super);\n }(", ")"], {raw: {value: Object.freeze(["function($__super) {\n var ", " = ", ";\n return ($traceurRuntime.createClass)(", ", ", ",\n ", ", $__super);\n }(", ")"])}})),
$__345 = Object.freeze(Object.defineProperties(["function() {\n var ", " = ", ";\n return ($traceurRuntime.createClass)(", ", ", ",\n ", ");\n }()"], {raw: {value: Object.freeze(["function() {\n var ", " = ", ";\n return ($traceurRuntime.createClass)(", ", ", ",\n ", ");\n }()"])}})),
$__346 = Object.freeze(Object.defineProperties(["$traceurRuntime.defaultSuperCall(this,\n ", ".prototype, arguments)"], {raw: {value: Object.freeze(["$traceurRuntime.defaultSuperCall(this,\n ", ".prototype, arguments)"])}}));
var AlphaRenamer = System.get("traceur@0.0.52/src/codegeneration/AlphaRenamer").AlphaRenamer;
var CONSTRUCTOR = System.get("traceur@0.0.52/src/syntax/PredefinedName").CONSTRUCTOR;
var $__349 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__349.AnonBlock,
ExportDeclaration = $__349.ExportDeclaration,
FunctionExpression = $__349.FunctionExpression,
GetAccessor = $__349.GetAccessor,
PropertyMethodAssignment = $__349.PropertyMethodAssignment,
SetAccessor = $__349.SetAccessor;
var $__350 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
GET_ACCESSOR = $__350.GET_ACCESSOR,
PROPERTY_METHOD_ASSIGNMENT = $__350.PROPERTY_METHOD_ASSIGNMENT,
SET_ACCESSOR = $__350.SET_ACCESSOR;
var SuperTransformer = System.get("traceur@0.0.52/src/codegeneration/SuperTransformer").SuperTransformer;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var MakeStrictTransformer = System.get("traceur@0.0.52/src/codegeneration/MakeStrictTransformer").MakeStrictTransformer;
var $__355 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createEmptyParameterList = $__355.createEmptyParameterList,
createExpressionStatement = $__355.createExpressionStatement,
createFunctionBody = $__355.createFunctionBody,
id = $__355.createIdentifierExpression,
createMemberExpression = $__355.createMemberExpression,
createObjectLiteralExpression = $__355.createObjectLiteralExpression,
createParenExpression = $__355.createParenExpression,
createThisExpression = $__355.createThisExpression,
createVariableStatement = $__355.createVariableStatement;
var hasUseStrict = System.get("traceur@0.0.52/src/semantics/util").hasUseStrict;
var $__357 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__357.parseExpression,
parseStatement = $__357.parseStatement,
parseStatements = $__357.parseStatements;
var propName = System.get("traceur@0.0.52/src/staticsemantics/PropName").propName;
function classCall(func, object, staticObject, superClass) {
if (superClass) {
return parseExpression($__340, func, object, staticObject, superClass);
}
return parseExpression($__341, func, object, staticObject);
}
var ClassTransformer = function ClassTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $ClassTransformer.prototype, "constructor", [identifierGenerator]);
this.strictCount_ = 0;
this.state_ = null;
};
var $ClassTransformer = ClassTransformer;
($traceurRuntime.createClass)(ClassTransformer, {
transformExportDeclaration: function(tree) {
var transformed = $traceurRuntime.superCall(this, $ClassTransformer.prototype, "transformExportDeclaration", [tree]);
if (transformed === tree)
return tree;
var declaration = transformed.declaration;
if (declaration instanceof AnonBlock) {
var statements = $traceurRuntime.spread([new ExportDeclaration(null, declaration.statements[0], [])], declaration.statements.slice(1));
return new AnonBlock(null, statements);
}
return transformed;
},
transformModule: function(tree) {
this.strictCount_ = 1;
return $traceurRuntime.superCall(this, $ClassTransformer.prototype, "transformModule", [tree]);
},
transformScript: function(tree) {
this.strictCount_ = +hasUseStrict(tree.scriptItemList);
return $traceurRuntime.superCall(this, $ClassTransformer.prototype, "transformScript", [tree]);
},
transformFunctionBody: function(tree) {
var useStrict = +hasUseStrict(tree.statements);
this.strictCount_ += useStrict;
var result = $traceurRuntime.superCall(this, $ClassTransformer.prototype, "transformFunctionBody", [tree]);
this.strictCount_ -= useStrict;
return result;
},
makeStrict_: function(tree) {
if (this.strictCount_)
return tree;
return MakeStrictTransformer.transformTree(tree);
},
transformClassElements_: function(tree, internalName) {
var $__359 = this;
var oldState = this.state_;
this.state_ = {hasSuper: false};
var superClass = this.transformAny(tree.superClass);
var hasConstructor = false;
var protoElements = [],
staticElements = [];
var constructorBody,
constructorParams;
tree.elements.forEach((function(tree) {
var elements,
homeObject;
if (tree.isStatic) {
elements = staticElements;
homeObject = internalName;
} else {
elements = protoElements;
homeObject = createMemberExpression(internalName, 'prototype');
}
switch (tree.type) {
case GET_ACCESSOR:
elements.push($__359.transformGetAccessor_(tree, homeObject));
break;
case SET_ACCESSOR:
elements.push($__359.transformSetAccessor_(tree, homeObject));
break;
case PROPERTY_METHOD_ASSIGNMENT:
var transformed = $__359.transformPropertyMethodAssignment_(tree, homeObject);
if (!tree.isStatic && propName(tree) === CONSTRUCTOR) {
hasConstructor = true;
constructorParams = transformed.parameterList;
constructorBody = transformed.body;
} else {
elements.push(transformed);
}
break;
default:
throw new Error(("Unexpected class element: " + tree.type));
}
}));
var object = createObjectLiteralExpression(protoElements);
var staticObject = createObjectLiteralExpression(staticElements);
var func;
if (!hasConstructor) {
func = this.getDefaultConstructor_(tree, internalName);
} else {
func = new FunctionExpression(tree.location, tree.name, false, constructorParams, null, [], constructorBody);
}
var state = this.state_;
this.state_ = oldState;
return {
func: func,
superClass: superClass,
object: object,
staticObject: staticObject,
hasSuper: state.hasSuper
};
},
transformClassDeclaration: function(tree) {
var name = tree.name.identifierToken;
var internalName = id(("$" + name));
var renamed = AlphaRenamer.rename(tree, name.value, internalName.identifierToken.value);
var referencesClassName = renamed !== tree;
var tree = renamed;
var $__361 = $traceurRuntime.assertObject(this.transformClassElements_(tree, internalName)),
func = $__361.func,
hasSuper = $__361.hasSuper,
object = $__361.object,
staticObject = $__361.staticObject,
superClass = $__361.superClass;
var statements = parseStatements($__342, name, func);
var expr = classCall(name, object, staticObject, superClass);
if (hasSuper || referencesClassName) {
statements.push(parseStatement($__343, internalName, name));
}
statements.push(createExpressionStatement(expr));
var anonBlock = new AnonBlock(null, statements);
return this.makeStrict_(anonBlock);
},
transformClassExpression: function(tree) {
this.pushTempScope();
var name;
if (tree.name)
name = tree.name.identifierToken;
else
name = id(this.getTempIdentifier());
var $__361 = $traceurRuntime.assertObject(this.transformClassElements_(tree, name)),
func = $__361.func,
hasSuper = $__361.hasSuper,
object = $__361.object,
staticObject = $__361.staticObject,
superClass = $__361.superClass;
var expression;
if (hasSuper || tree.name) {
if (superClass) {
expression = parseExpression($__344, name, func, name, object, staticObject, superClass);
} else {
expression = parseExpression($__345, name, func, name, object, staticObject);
}
} else {
expression = classCall(func, object, staticObject, superClass);
}
this.popTempScope();
return createParenExpression(this.makeStrict_(expression));
},
transformPropertyMethodAssignment_: function(tree, internalName) {
var parameterList = this.transformAny(tree.parameterList);
var body = this.transformSuperInFunctionBody_(tree, tree.body, internalName);
if (!tree.isStatic && parameterList === tree.parameterList && body === tree.body) {
return tree;
}
var isStatic = false;
return new PropertyMethodAssignment(tree.location, isStatic, tree.functionKind, tree.name, parameterList, tree.typeAnnotation, tree.annotations, body);
},
transformGetAccessor_: function(tree, internalName) {
var body = this.transformSuperInFunctionBody_(tree, tree.body, internalName);
if (!tree.isStatic && body === tree.body)
return tree;
return new GetAccessor(tree.location, false, tree.name, tree.typeAnnotation, tree.annotations, body);
},
transformSetAccessor_: function(tree, internalName) {
var parameterList = this.transformAny(tree.parameterList);
var body = this.transformSuperInFunctionBody_(tree, tree.body, internalName);
if (!tree.isStatic && body === tree.body)
return tree;
return new SetAccessor(tree.location, false, tree.name, parameterList, tree.annotations, body);
},
transformSuperInFunctionBody_: function(methodTree, tree, internalName) {
this.pushTempScope();
var thisName = this.getTempIdentifier();
var thisDecl = createVariableStatement(VAR, thisName, createThisExpression());
var superTransformer = new SuperTransformer(this, internalName, methodTree, thisName);
var transformedTree = superTransformer.transformFunctionBody(this.transformFunctionBody(tree));
if (superTransformer.hasSuper)
this.state_.hasSuper = true;
this.popTempScope();
if (superTransformer.nestedSuper)
return createFunctionBody([thisDecl].concat(transformedTree.statements));
return transformedTree;
},
getDefaultConstructor_: function(tree, internalName) {
var constructorParams = createEmptyParameterList();
var constructorBody;
if (tree.superClass) {
var statement = parseStatement($__346, internalName);
constructorBody = createFunctionBody([statement]);
this.state_.hasSuper = true;
} else {
constructorBody = createFunctionBody([]);
}
return new FunctionExpression(tree.location, tree.name, false, constructorParams, null, [], constructorBody);
}
}, {}, TempVarTransformer);
return {get ClassTransformer() {
return ClassTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/CommonJsModuleTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/CommonJsModuleTransformer";
var $__362 = Object.freeze(Object.defineProperties(["module.exports = function() {\n ", "\n }.call(", ");"], {raw: {value: Object.freeze(["module.exports = function() {\n ", "\n }.call(", ");"])}})),
$__363 = Object.freeze(Object.defineProperties(["Object.defineProperties(exports, ", ");"], {raw: {value: Object.freeze(["Object.defineProperties(exports, ", ");"])}})),
$__364 = Object.freeze(Object.defineProperties(["{get: ", "}"], {raw: {value: Object.freeze(["{get: ", "}"])}})),
$__365 = Object.freeze(Object.defineProperties(["{value: ", "}"], {raw: {value: Object.freeze(["{value: ", "}"])}})),
$__366 = Object.freeze(Object.defineProperties(["require(", ")"], {raw: {value: Object.freeze(["require(", ")"])}})),
$__367 = Object.freeze(Object.defineProperties(["__esModule: true"], {raw: {value: Object.freeze(["__esModule: true"])}}));
var ModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/ModuleTransformer").ModuleTransformer;
var $__369 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
GET_ACCESSOR = $__369.GET_ACCESSOR,
OBJECT_LITERAL_EXPRESSION = $__369.OBJECT_LITERAL_EXPRESSION,
PROPERTY_NAME_ASSIGNMENT = $__369.PROPERTY_NAME_ASSIGNMENT,
RETURN_STATEMENT = $__369.RETURN_STATEMENT;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var globalThis = System.get("traceur@0.0.52/src/codegeneration/globalThis").default;
var $__372 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__372.parseExpression,
parsePropertyDefinition = $__372.parsePropertyDefinition,
parseStatement = $__372.parseStatement,
parseStatements = $__372.parseStatements;
var scopeContainsThis = System.get("traceur@0.0.52/src/codegeneration/scopeContainsThis").default;
var $__374 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createEmptyParameterList = $__374.createEmptyParameterList,
createFunctionExpression = $__374.createFunctionExpression,
createObjectLiteralExpression = $__374.createObjectLiteralExpression,
createPropertyNameAssignment = $__374.createPropertyNameAssignment;
var prependStatements = System.get("traceur@0.0.52/src/codegeneration/PrependStatements").prependStatements;
var CommonJsModuleTransformer = function CommonJsModuleTransformer() {
$traceurRuntime.defaultSuperCall(this, $CommonJsModuleTransformer.prototype, arguments);
};
var $CommonJsModuleTransformer = CommonJsModuleTransformer;
($traceurRuntime.createClass)(CommonJsModuleTransformer, {
wrapModule: function(statements) {
var needsIife = statements.some(scopeContainsThis);
if (needsIife) {
return parseStatements($__362, statements, globalThis());
}
var last = statements[statements.length - 1];
statements = statements.slice(0, -1);
assert(last.type === RETURN_STATEMENT);
var exportObject = last.expression;
if (this.hasExports()) {
var descriptors = this.transformObjectLiteralToDescriptors(exportObject);
var exportStatement = parseStatement($__363, descriptors);
statements = prependStatements(statements, exportStatement);
}
return statements;
},
transformObjectLiteralToDescriptors: function(literalTree) {
assert(literalTree.type === OBJECT_LITERAL_EXPRESSION);
var props = literalTree.propertyNameAndValues.map((function(exp) {
var descriptor;
switch (exp.type) {
case GET_ACCESSOR:
var getterFunction = createFunctionExpression(createEmptyParameterList(), exp.body);
descriptor = parseExpression($__364, getterFunction);
break;
case PROPERTY_NAME_ASSIGNMENT:
descriptor = parseExpression($__365, exp.value);
break;
default:
throw new Error(("Unexpected property type " + exp.type));
}
return createPropertyNameAssignment(exp.name, descriptor);
}));
return createObjectLiteralExpression(props);
},
transformModuleSpecifier: function(tree) {
return parseExpression($__366, tree.token);
},
getExportProperties: function() {
var properties = $traceurRuntime.superCall(this, $CommonJsModuleTransformer.prototype, "getExportProperties", []);
if (this.exportVisitor_.hasExports())
properties.push(parsePropertyDefinition($__367));
return properties;
}
}, {}, ModuleTransformer);
return {get CommonJsModuleTransformer() {
return CommonJsModuleTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ParameterTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ParameterTransformer";
var FunctionBody = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").FunctionBody;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var prependStatements = System.get("traceur@0.0.52/src/codegeneration/PrependStatements").prependStatements;
var stack = [];
var ParameterTransformer = function ParameterTransformer() {
$traceurRuntime.defaultSuperCall(this, $ParameterTransformer.prototype, arguments);
};
var $ParameterTransformer = ParameterTransformer;
($traceurRuntime.createClass)(ParameterTransformer, {
transformArrowFunctionExpression: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformArrowFunctionExpression", [tree]);
},
transformFunctionDeclaration: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformFunctionDeclaration", [tree]);
},
transformFunctionExpression: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformFunctionExpression", [tree]);
},
transformGetAccessor: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformGetAccessor", [tree]);
},
transformSetAccessor: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformSetAccessor", [tree]);
},
transformPropertyMethodAssignment: function(tree) {
stack.push([]);
return $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformPropertyMethodAssignment", [tree]);
},
transformFunctionBody: function(tree) {
var transformedTree = $traceurRuntime.superCall(this, $ParameterTransformer.prototype, "transformFunctionBody", [tree]);
var statements = stack.pop();
if (!statements.length)
return transformedTree;
statements = prependStatements.apply(null, $traceurRuntime.spread([transformedTree.statements], statements));
return new FunctionBody(transformedTree.location, statements);
},
get parameterStatements() {
return stack[stack.length - 1];
}
}, {}, TempVarTransformer);
return {get ParameterTransformer() {
return ParameterTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/DefaultParametersTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/DefaultParametersTransformer";
var $__381 = System.get("traceur@0.0.52/src/semantics/util"),
isUndefined = $__381.isUndefined,
isVoidExpression = $__381.isVoidExpression;
var FormalParameterList = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").FormalParameterList;
var ParameterTransformer = System.get("traceur@0.0.52/src/codegeneration/ParameterTransformer").ParameterTransformer;
var ARGUMENTS = System.get("traceur@0.0.52/src/syntax/PredefinedName").ARGUMENTS;
var $__385 = System.get("traceur@0.0.52/src/syntax/TokenType"),
NOT_EQUAL_EQUAL = $__385.NOT_EQUAL_EQUAL,
VAR = $__385.VAR;
var $__386 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createBinaryExpression = $__386.createBinaryExpression,
createConditionalExpression = $__386.createConditionalExpression,
createIdentifierExpression = $__386.createIdentifierExpression,
createMemberLookupExpression = $__386.createMemberLookupExpression,
createNumberLiteral = $__386.createNumberLiteral,
createOperatorToken = $__386.createOperatorToken,
createVariableStatement = $__386.createVariableStatement,
createVoid0 = $__386.createVoid0;
function createDefaultAssignment(index, binding, initializer) {
var argumentsExpression = createMemberLookupExpression(createIdentifierExpression(ARGUMENTS), createNumberLiteral(index));
var assignmentExpression;
if (initializer === null || isUndefined(initializer) || isVoidExpression(initializer)) {
assignmentExpression = argumentsExpression;
} else {
assignmentExpression = createConditionalExpression(createBinaryExpression(argumentsExpression, createOperatorToken(NOT_EQUAL_EQUAL), createVoid0()), argumentsExpression, initializer);
}
return createVariableStatement(VAR, binding, assignmentExpression);
}
var DefaultParametersTransformer = function DefaultParametersTransformer() {
$traceurRuntime.defaultSuperCall(this, $DefaultParametersTransformer.prototype, arguments);
};
var $DefaultParametersTransformer = DefaultParametersTransformer;
($traceurRuntime.createClass)(DefaultParametersTransformer, {transformFormalParameterList: function(tree) {
var parameters = [];
var changed = false;
var defaultToUndefined = false;
for (var i = 0; i < tree.parameters.length; i++) {
var param = this.transformAny(tree.parameters[i]);
if (param !== tree.parameters[i])
changed = true;
if (param.isRestParameter() || !param.parameter.initializer && !defaultToUndefined) {
parameters.push(param);
} else {
defaultToUndefined = true;
changed = true;
this.parameterStatements.push(createDefaultAssignment(i, param.parameter.binding, param.parameter.initializer));
}
}
if (!changed)
return tree;
return new FormalParameterList(tree.location, parameters);
}}, {}, ParameterTransformer);
return {get DefaultParametersTransformer() {
return DefaultParametersTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ForOfTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ForOfTransformer";
var $__388 = Object.freeze(Object.defineProperties(["", " = ", ".value;"], {raw: {value: Object.freeze(["", " = ", ".value;"])}})),
$__389 = Object.freeze(Object.defineProperties(["\n for (var ", " =\n ", "[Symbol.iterator](),\n ", ";\n !(", " = ", ".next()).done; ) {\n ", ";\n ", ";\n }"], {raw: {value: Object.freeze(["\n for (var ", " =\n ", "[Symbol.iterator](),\n ", ";\n !(", " = ", ".next()).done; ) {\n ", ";\n ", ";\n }"])}}));
var VARIABLE_DECLARATION_LIST = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType").VARIABLE_DECLARATION_LIST;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__392 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
id = $__392.createIdentifierExpression,
createMemberExpression = $__392.createMemberExpression,
createVariableStatement = $__392.createVariableStatement;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
var ForOfTransformer = function ForOfTransformer() {
$traceurRuntime.defaultSuperCall(this, $ForOfTransformer.prototype, arguments);
};
var $ForOfTransformer = ForOfTransformer;
($traceurRuntime.createClass)(ForOfTransformer, {transformForOfStatement: function(original) {
var tree = $traceurRuntime.superCall(this, $ForOfTransformer.prototype, "transformForOfStatement", [original]);
var iter = id(this.getTempIdentifier());
var result = id(this.getTempIdentifier());
var assignment;
if (tree.initializer.type === VARIABLE_DECLARATION_LIST) {
assignment = createVariableStatement(tree.initializer.declarationType, tree.initializer.declarations[0].lvalue, createMemberExpression(result, 'value'));
} else {
assignment = parseStatement($__388, tree.initializer, result);
}
return parseStatement($__389, iter, tree.collection, result, result, iter, assignment, tree.body);
}}, {}, TempVarTransformer);
return {get ForOfTransformer() {
return ForOfTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/GeneratorComprehensionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/GeneratorComprehensionTransformer";
var ComprehensionTransformer = System.get("traceur@0.0.52/src/codegeneration/ComprehensionTransformer").ComprehensionTransformer;
var createYieldStatement = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createYieldStatement;
var GeneratorComprehensionTransformer = function GeneratorComprehensionTransformer() {
$traceurRuntime.defaultSuperCall(this, $GeneratorComprehensionTransformer.prototype, arguments);
};
var $GeneratorComprehensionTransformer = GeneratorComprehensionTransformer;
($traceurRuntime.createClass)(GeneratorComprehensionTransformer, {transformGeneratorComprehension: function(tree) {
var expression = this.transformAny(tree.expression);
var statement = createYieldStatement(expression);
var isGenerator = true;
return this.transformComprehension(tree, statement, isGenerator);
}}, {}, ComprehensionTransformer);
return {get GeneratorComprehensionTransformer() {
return GeneratorComprehensionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/State", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/State";
var $__398 = Object.freeze(Object.defineProperties(["$ctx.finallyFallThrough = ", ""], {raw: {value: Object.freeze(["$ctx.finallyFallThrough = ", ""])}}));
var $__399 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignStateStatement = $__399.createAssignStateStatement,
createBreakStatement = $__399.createBreakStatement,
createCaseClause = $__399.createCaseClause,
createNumberLiteral = $__399.createNumberLiteral;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
var State = function State(id) {
this.id = id;
};
($traceurRuntime.createClass)(State, {
transformMachineState: function(enclosingFinally, machineEndState, reporter) {
return createCaseClause(createNumberLiteral(this.id), this.transform(enclosingFinally, machineEndState, reporter));
},
transformBreak: function(labelSet, breakState) {
return this;
},
transformBreakOrContinue: function(labelSet) {
var breakState = arguments[1];
var continueState = arguments[2];
return this;
}
}, {});
State.START_STATE = 0;
State.INVALID_STATE = -1;
State.END_STATE = -2;
State.RETHROW_STATE = -3;
State.generateJump = function(enclosingFinally, fallThroughState) {
return $traceurRuntime.spread(State.generateAssignState(enclosingFinally, fallThroughState), [createBreakStatement()]);
};
State.generateAssignState = function(enclosingFinally, fallThroughState) {
var assignState;
if (State.isFinallyExit(enclosingFinally, fallThroughState)) {
assignState = generateAssignStateOutOfFinally(enclosingFinally, fallThroughState);
} else {
assignState = [createAssignStateStatement(fallThroughState)];
}
return assignState;
};
State.isFinallyExit = function(enclosingFinally, destination) {
return enclosingFinally != null && enclosingFinally.tryStates.indexOf(destination) < 0;
};
function generateAssignStateOutOfFinally(enclosingFinally, destination) {
var finallyState = enclosingFinally.finallyState;
return [createAssignStateStatement(finallyState), parseStatement($__398, destination)];
}
State.replaceStateList = function(oldStates, oldState, newState) {
var states = [];
for (var i = 0; i < oldStates.length; i++) {
states.push(State.replaceStateId(oldStates[i], oldState, newState));
}
return states;
};
State.replaceStateId = function(current, oldState, newState) {
return current == oldState ? newState : current;
};
State.replaceAllStates = function(exceptionBlocks, oldState, newState) {
var result = [];
for (var i = 0; i < exceptionBlocks.length; i++) {
result.push(exceptionBlocks[i].replaceState(oldState, newState));
}
return result;
};
return {get State() {
return State;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/TryState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/TryState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var Kind = {
CATCH: 'catch',
FINALLY: 'finally'
};
var TryState = function TryState(kind, tryStates, nestedTrys) {
this.kind = kind;
this.tryStates = tryStates;
this.nestedTrys = nestedTrys;
};
($traceurRuntime.createClass)(TryState, {
replaceAllStates: function(oldState, newState) {
return State.replaceStateList(this.tryStates, oldState, newState);
},
replaceNestedTrys: function(oldState, newState) {
var states = [];
for (var i = 0; i < this.nestedTrys.length; i++) {
states.push(this.nestedTrys[i].replaceState(oldState, newState));
}
return states;
}
}, {});
TryState.Kind = Kind;
return {get TryState() {
return TryState;
}};
});
System.register("traceur@0.0.52/src/syntax/trees/StateMachine", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/trees/StateMachine";
var ParseTree = System.get("traceur@0.0.52/src/syntax/trees/ParseTree").ParseTree;
var STATE_MACHINE = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType").STATE_MACHINE;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var TryState = System.get("traceur@0.0.52/src/codegeneration/generator/TryState").TryState;
function addCatchOrFinallyStates(kind, enclosingMap, tryStates) {
for (var i = 0; i < tryStates.length; i++) {
var tryState = tryStates[i];
if (tryState.kind == kind) {
for (var j = 0; j < tryState.tryStates.length; j++) {
var id = tryState.tryStates[j];
enclosingMap[id] = tryState;
}
}
addCatchOrFinallyStates(kind, enclosingMap, tryState.nestedTrys);
}
}
function addAllCatchStates(tryStates, catches) {
for (var i = 0; i < tryStates.length; i++) {
var tryState = tryStates[i];
if (tryState.kind == TryState.Kind.CATCH) {
catches.push(tryState);
}
addAllCatchStates(tryState.nestedTrys, catches);
}
}
var StateMachine = function StateMachine(startState, fallThroughState, states, exceptionBlocks) {
this.location = null;
this.startState = startState;
this.fallThroughState = fallThroughState;
this.states = states;
this.exceptionBlocks = exceptionBlocks;
};
var $StateMachine = StateMachine;
($traceurRuntime.createClass)(StateMachine, {
get type() {
return STATE_MACHINE;
},
transform: function(transformer) {
return transformer.transformStateMachine(this);
},
visit: function(visitor) {
visitor.visitStateMachine(this);
},
getAllStateIDs: function() {
var result = [];
for (var i = 0; i < this.states.length; i++) {
result.push(this.states[i].id);
}
return result;
},
getEnclosingFinallyMap: function() {
var enclosingMap = Object.create(null);
addCatchOrFinallyStates(TryState.Kind.FINALLY, enclosingMap, this.exceptionBlocks);
return enclosingMap;
},
allCatchStates: function() {
var catches = [];
addAllCatchStates(this.exceptionBlocks, catches);
return catches;
},
replaceStateId: function(oldState, newState) {
return new $StateMachine(State.replaceStateId(this.startState, oldState, newState), State.replaceStateId(this.fallThroughState, oldState, newState), State.replaceAllStates(this.states, oldState, newState), State.replaceAllStates(this.exceptionBlocks, oldState, newState));
},
replaceStartState: function(newState) {
return this.replaceStateId(this.startState, newState);
},
replaceFallThroughState: function(newState) {
return this.replaceStateId(this.fallThroughState, newState);
},
append: function(nextMachine) {
var states = $traceurRuntime.spread(this.states);
for (var i = 0; i < nextMachine.states.length; i++) {
var otherState = nextMachine.states[i];
states.push(otherState.replaceState(nextMachine.startState, this.fallThroughState));
}
var exceptionBlocks = $traceurRuntime.spread(this.exceptionBlocks);
for (var i = 0; i < nextMachine.exceptionBlocks.length; i++) {
var tryState = nextMachine.exceptionBlocks[i];
exceptionBlocks.push(tryState.replaceState(nextMachine.startState, this.fallThroughState));
}
return new $StateMachine(this.startState, nextMachine.fallThroughState, states, exceptionBlocks);
}
}, {}, ParseTree);
return {get StateMachine() {
return StateMachine;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/AwaitState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/AwaitState";
var $__409 = Object.freeze(Object.defineProperties(["Promise.resolve(", ").then(\n $ctx.createCallback(", "), $ctx.errback);\n return"], {raw: {value: Object.freeze(["Promise.resolve(", ").then(\n $ctx.createCallback(", "), $ctx.errback);\n return"])}}));
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var parseStatements = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatements;
var AwaitState = function AwaitState(id, callbackState, expression) {
$traceurRuntime.superCall(this, $AwaitState.prototype, "constructor", [id]), this.callbackState = callbackState;
this.expression = expression;
this.statements_ = null;
};
var $AwaitState = AwaitState;
($traceurRuntime.createClass)(AwaitState, {
get statements() {
if (!this.statements_) {
this.statements_ = parseStatements($__409, this.expression, this.callbackState);
}
return this.statements_;
},
replaceState: function(oldState, newState) {
return new $AwaitState(State.replaceStateId(this.id, oldState, newState), State.replaceStateId(this.callbackState, oldState, newState), this.expression);
},
transform: function(enclosingFinally, machineEndState, reporter) {
return this.statements;
}
}, {}, State);
return {get AwaitState() {
return AwaitState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/HoistVariablesTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/HoistVariablesTransformer";
var $__413 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__413.AnonBlock,
Catch = $__413.Catch,
FunctionBody = $__413.FunctionBody,
ForInStatement = $__413.ForInStatement,
ForOfStatement = $__413.ForOfStatement,
ForStatement = $__413.ForStatement,
VariableDeclarationList = $__413.VariableDeclarationList,
VariableStatement = $__413.VariableStatement;
var $__414 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
OBJECT_PATTERN = $__414.OBJECT_PATTERN,
VARIABLE_DECLARATION_LIST = $__414.VARIABLE_DECLARATION_LIST;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var $__417 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignmentExpression = $__417.createAssignmentExpression,
createCommaExpression = $__417.createCommaExpression,
createExpressionStatement = $__417.createExpressionStatement,
id = $__417.createIdentifierExpression,
createParenExpression = $__417.createParenExpression,
createVariableDeclaration = $__417.createVariableDeclaration;
var prependStatements = System.get("traceur@0.0.52/src/codegeneration/PrependStatements").prependStatements;
var HoistVariablesTransformer = function HoistVariablesTransformer() {
$traceurRuntime.superCall(this, $HoistVariablesTransformer.prototype, "constructor", []);
this.hoistedVariables_ = Object.create(null);
this.keepBindingIdentifiers_ = false;
this.inBlockOrFor_ = false;
};
var $HoistVariablesTransformer = HoistVariablesTransformer;
($traceurRuntime.createClass)(HoistVariablesTransformer, {
transformFunctionBody: function(tree) {
var statements = this.transformList(tree.statements);
if (statements === tree.statements)
return tree;
var prepended = this.prependVariables(statements);
return new FunctionBody(tree.location, prepended);
},
addVariable: function(name) {
this.hoistedVariables_[name] = true;
},
hasVariables: function() {
for (var key in this.hoistedVariables_) {
return true;
}
return false;
},
getVariableNames: function() {
return Object.keys(this.hoistedVariables_);
},
getVariableStatement: function() {
if (!this.hasVariables())
return null;
var declarations = this.getVariableNames().map((function(name) {
return createVariableDeclaration(name, null);
}));
return new VariableStatement(null, new VariableDeclarationList(null, VAR, declarations));
},
prependVariables: function(statements) {
if (!this.hasVariables())
return statements;
return prependStatements(statements, this.getVariableStatement());
},
transformVariableStatement: function(tree) {
var declarations = this.transformAny(tree.declarations);
if (declarations == tree.declarations)
return tree;
if (declarations === null)
return new AnonBlock(null, []);
if (declarations.type === VARIABLE_DECLARATION_LIST)
return new VariableStatement(tree.location, declarations);
return createExpressionStatement(declarations);
},
transformVariableDeclaration: function(tree) {
var lvalue = this.transformAny(tree.lvalue);
var initializer = this.transformAny(tree.initializer);
if (initializer) {
var expression = createAssignmentExpression(lvalue, initializer);
if (lvalue.type === OBJECT_PATTERN)
expression = createParenExpression(expression);
return expression;
}
return null;
},
transformObjectPattern: function(tree) {
var keepBindingIdentifiers = this.keepBindingIdentifiers_;
this.keepBindingIdentifiers_ = true;
var transformed = $traceurRuntime.superCall(this, $HoistVariablesTransformer.prototype, "transformObjectPattern", [tree]);
this.keepBindingIdentifiers_ = keepBindingIdentifiers;
return transformed;
},
transformArrayPattern: function(tree) {
var keepBindingIdentifiers = this.keepBindingIdentifiers_;
this.keepBindingIdentifiers_ = true;
var transformed = $traceurRuntime.superCall(this, $HoistVariablesTransformer.prototype, "transformArrayPattern", [tree]);
this.keepBindingIdentifiers_ = keepBindingIdentifiers;
return transformed;
},
transformBindingIdentifier: function(tree) {
var idToken = tree.identifierToken;
this.addVariable(idToken.value);
if (this.keepBindingIdentifiers_)
return tree;
return id(idToken);
},
transformVariableDeclarationList: function(tree) {
if (tree.declarationType === VAR || !this.inBlockOrFor_) {
var expressions = this.transformList(tree.declarations);
expressions = expressions.filter((function(tree) {
return tree;
}));
if (expressions.length === 0)
return null;
if (expressions.length == 1)
return expressions[0];
return createCommaExpression(expressions);
}
return tree;
},
transformCatch: function(tree) {
var catchBody = this.transformAny(tree.catchBody);
if (catchBody === tree.catchBody)
return tree;
return new Catch(tree.location, tree.binding, catchBody);
},
transformForInStatement: function(tree) {
return this.transformLoop_(tree, ForInStatement);
},
transformForOfStatement: function(tree) {
return this.transformLoop_(tree, ForOfStatement);
},
transformLoop_: function(tree, ctor) {
var initializer = this.transformLoopIninitaliser_(tree.initializer);
var collection = this.transformAny(tree.collection);
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && collection === tree.collection && body === tree.body) {
return tree;
}
return new ctor(tree.location, initializer, collection, body);
},
transformLoopIninitaliser_: function(tree) {
if (tree.type !== VARIABLE_DECLARATION_LIST || tree.declarationType !== VAR)
return tree;
return this.transformAny(tree.declarations[0].lvalue);
},
transformForStatement: function(tree) {
var inBlockOrFor = this.inBlockOrFor_;
this.inBlockOrFor_ = true;
var initializer = this.transformAny(tree.initializer);
this.inBlockOrFor_ = inBlockOrFor;
var condition = this.transformAny(tree.condition);
var increment = this.transformAny(tree.increment);
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && condition === tree.condition && increment === tree.increment && body === tree.body) {
return tree;
}
return new ForStatement(tree.location, initializer, condition, increment, body);
},
transformBlock: function(tree) {
var inBlockOrFor = this.inBlockOrFor_;
this.inBlockOrFor_ = true;
tree = $traceurRuntime.superCall(this, $HoistVariablesTransformer.prototype, "transformBlock", [tree]);
this.inBlockOrFor_ = inBlockOrFor;
return tree;
},
addMachineVariable: function(name) {
this.machineVariables_[name] = true;
},
transformClassDeclaration: function(tree) {
return tree;
},
transformClassExpression: function(tree) {
return tree;
},
transformFunctionDeclaration: function(tree) {
return tree;
},
transformFunctionExpression: function(tree) {
return tree;
},
transformGetAccessor: function(tree) {
return tree;
},
transformSetAccessor: function(tree) {
return tree;
},
transformPropertyMethodAssignment: function(tree) {
return tree;
},
transformArrowFunctionExpression: function(tree) {
return tree;
},
transformComprehensionFor: function(tree) {
return tree;
}
}, {}, ParseTreeTransformer);
var $__default = HoistVariablesTransformer;
return {get default() {
return $__default;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/FallThroughState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/FallThroughState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var FallThroughState = function FallThroughState(id, fallThroughState, statements) {
$traceurRuntime.superCall(this, $FallThroughState.prototype, "constructor", [id]);
this.fallThroughState = fallThroughState;
this.statements = statements;
};
var $FallThroughState = FallThroughState;
($traceurRuntime.createClass)(FallThroughState, {
replaceState: function(oldState, newState) {
return new $FallThroughState(State.replaceStateId(this.id, oldState, newState), State.replaceStateId(this.fallThroughState, oldState, newState), this.statements);
},
transform: function(enclosingFinally, machineEndState, reporter) {
return $traceurRuntime.spread(this.statements, State.generateJump(enclosingFinally, this.fallThroughState));
}
}, {}, State);
return {get FallThroughState() {
return FallThroughState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/BreakState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/BreakState";
var FallThroughState = System.get("traceur@0.0.52/src/codegeneration/generator/FallThroughState").FallThroughState;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var BreakState = function BreakState(id, label) {
$traceurRuntime.superCall(this, $BreakState.prototype, "constructor", [id]);
this.label = label;
};
var $BreakState = BreakState;
($traceurRuntime.createClass)(BreakState, {
replaceState: function(oldState, newState) {
return new $BreakState(State.replaceStateId(this.id, oldState, newState), this.label);
},
transform: function(enclosingFinally, machineEndState, reporter) {
throw new Error('These should be removed before the transform step');
},
transformBreak: function(labelSet) {
var breakState = arguments[1];
if (this.label == null)
return new FallThroughState(this.id, breakState, []);
if (this.label in labelSet) {
return new FallThroughState(this.id, labelSet[this.label].fallThroughState, []);
}
return this;
},
transformBreakOrContinue: function(labelSet) {
var breakState = arguments[1];
var continueState = arguments[2];
return this.transformBreak(labelSet, breakState);
}
}, {}, State);
return {get BreakState() {
return BreakState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/ContinueState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/ContinueState";
var FallThroughState = System.get("traceur@0.0.52/src/codegeneration/generator/FallThroughState").FallThroughState;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var ContinueState = function ContinueState(id, label) {
$traceurRuntime.superCall(this, $ContinueState.prototype, "constructor", [id]);
this.label = label;
};
var $ContinueState = ContinueState;
($traceurRuntime.createClass)(ContinueState, {
replaceState: function(oldState, newState) {
return new $ContinueState(State.replaceStateId(this.id, oldState, newState), this.label);
},
transform: function(enclosingFinally, machineEndState, reporter) {
throw new Error('These should be removed before the transform step');
},
transformBreakOrContinue: function(labelSet) {
var breakState = arguments[1];
var continueState = arguments[2];
if (this.label == null)
return new FallThroughState(this.id, continueState, []);
if (this.label in labelSet) {
return new FallThroughState(this.id, labelSet[this.label].continueState, []);
}
return this;
}
}, {}, State);
return {get ContinueState() {
return ContinueState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/BreakContinueTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/BreakContinueTransformer";
var BreakState = System.get("traceur@0.0.52/src/codegeneration/generator/BreakState").BreakState;
var ContinueState = System.get("traceur@0.0.52/src/codegeneration/generator/ContinueState").ContinueState;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var StateMachine = System.get("traceur@0.0.52/src/syntax/trees/StateMachine").StateMachine;
function safeGetLabel(tree) {
return tree.name ? tree.name.value : null;
}
var BreakContinueTransformer = function BreakContinueTransformer(stateAllocator) {
$traceurRuntime.superCall(this, $BreakContinueTransformer.prototype, "constructor", []);
this.transformBreaks_ = true;
this.stateAllocator_ = stateAllocator;
};
var $BreakContinueTransformer = BreakContinueTransformer;
($traceurRuntime.createClass)(BreakContinueTransformer, {
allocateState_: function() {
return this.stateAllocator_.allocateState();
},
stateToStateMachine_: function(newState) {
var fallThroughState = this.allocateState_();
return new StateMachine(newState.id, fallThroughState, [newState], []);
},
transformBreakStatement: function(tree) {
return this.transformBreaks_ || tree.name ? this.stateToStateMachine_(new BreakState(this.allocateState_(), safeGetLabel(tree))) : tree;
},
transformContinueStatement: function(tree) {
return this.stateToStateMachine_(new ContinueState(this.allocateState_(), safeGetLabel(tree)));
},
transformDoWhileStatement: function(tree) {
return tree;
},
transformForOfStatement: function(tree) {
return tree;
},
transformForStatement: function(tree) {
return tree;
},
transformFunctionDeclaration: function(tree) {
return tree;
},
transformFunctionExpression: function(tree) {
return tree;
},
transformStateMachine: function(tree) {
return tree;
},
transformSwitchStatement: function(tree) {
var oldState = this.transformBreaks_;
this.transformBreaks_ = false;
var result = $traceurRuntime.superCall(this, $BreakContinueTransformer.prototype, "transformSwitchStatement", [tree]);
this.transformBreaks_ = oldState;
return result;
},
transformWhileStatement: function(tree) {
return tree;
}
}, {}, ParseTreeTransformer);
return {get BreakContinueTransformer() {
return BreakContinueTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/CatchState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/CatchState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var TryState = System.get("traceur@0.0.52/src/codegeneration/generator/TryState").TryState;
var CatchState = function CatchState(identifier, catchState, fallThroughState, allStates, nestedTrys) {
$traceurRuntime.superCall(this, $CatchState.prototype, "constructor", [TryState.Kind.CATCH, allStates, nestedTrys]);
this.identifier = identifier;
this.catchState = catchState;
this.fallThroughState = fallThroughState;
};
var $CatchState = CatchState;
($traceurRuntime.createClass)(CatchState, {replaceState: function(oldState, newState) {
return new $CatchState(this.identifier, State.replaceStateId(this.catchState, oldState, newState), State.replaceStateId(this.fallThroughState, oldState, newState), this.replaceAllStates(oldState, newState), this.replaceNestedTrys(oldState, newState));
}}, {}, TryState);
return {get CatchState() {
return CatchState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/ConditionalState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/ConditionalState";
var $__436 = Object.freeze(Object.defineProperties(["$ctx.state = (", ") ? ", " : ", ";\n break"], {raw: {value: Object.freeze(["$ctx.state = (", ") ? ", " : ", ";\n break"])}}));
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var $__438 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createBlock = $__438.createBlock,
createIfStatement = $__438.createIfStatement;
var parseStatements = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatements;
var ConditionalState = function ConditionalState(id, ifState, elseState, condition) {
$traceurRuntime.superCall(this, $ConditionalState.prototype, "constructor", [id]);
this.ifState = ifState;
this.elseState = elseState;
this.condition = condition;
};
var $ConditionalState = ConditionalState;
($traceurRuntime.createClass)(ConditionalState, {
replaceState: function(oldState, newState) {
return new $ConditionalState(State.replaceStateId(this.id, oldState, newState), State.replaceStateId(this.ifState, oldState, newState), State.replaceStateId(this.elseState, oldState, newState), this.condition);
},
transform: function(enclosingFinally, machineEndState, reporter) {
if (State.isFinallyExit(enclosingFinally, this.ifState) || State.isFinallyExit(enclosingFinally, this.elseState)) {
return [createIfStatement(this.condition, createBlock(State.generateJump(enclosingFinally, this.ifState)), createBlock(State.generateJump(enclosingFinally, this.elseState)))];
}
return parseStatements($__436, this.condition, this.ifState, this.elseState);
}
}, {}, State);
return {get ConditionalState() {
return ConditionalState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/FinallyFallThroughState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/FinallyFallThroughState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var FinallyFallThroughState = function FinallyFallThroughState() {
$traceurRuntime.defaultSuperCall(this, $FinallyFallThroughState.prototype, arguments);
};
var $FinallyFallThroughState = FinallyFallThroughState;
($traceurRuntime.createClass)(FinallyFallThroughState, {
replaceState: function(oldState, newState) {
return new $FinallyFallThroughState(State.replaceStateId(this.id, oldState, newState));
},
transformMachineState: function(enclosingFinally, machineEndState, reporter) {
return null;
},
transform: function(enclosingFinally, machineEndState, reporter) {
throw new Error('these are generated in addFinallyFallThroughDispatches');
}
}, {}, State);
return {get FinallyFallThroughState() {
return FinallyFallThroughState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/FinallyState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/FinallyState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var TryState = System.get("traceur@0.0.52/src/codegeneration/generator/TryState").TryState;
var FinallyState = function FinallyState(finallyState, fallThroughState, allStates, nestedTrys) {
$traceurRuntime.superCall(this, $FinallyState.prototype, "constructor", [TryState.Kind.FINALLY, allStates, nestedTrys]);
this.finallyState = finallyState;
this.fallThroughState = fallThroughState;
};
var $FinallyState = FinallyState;
($traceurRuntime.createClass)(FinallyState, {replaceState: function(oldState, newState) {
return new $FinallyState(State.replaceStateId(this.finallyState, oldState, newState), State.replaceStateId(this.fallThroughState, oldState, newState), this.replaceAllStates(oldState, newState), this.replaceNestedTrys(oldState, newState));
}}, {}, TryState);
return {get FinallyState() {
return FinallyState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/StateAllocator", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/StateAllocator";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var StateAllocator = function StateAllocator() {
this.nextState_ = State.START_STATE + 1;
};
($traceurRuntime.createClass)(StateAllocator, {allocateState: function() {
return this.nextState_++;
}}, {});
return {get StateAllocator() {
return StateAllocator;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/SwitchState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/SwitchState";
var $__448 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
CaseClause = $__448.CaseClause,
DefaultClause = $__448.DefaultClause,
SwitchStatement = $__448.SwitchStatement;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var createBreakStatement = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createBreakStatement;
var SwitchClause = function SwitchClause(first, second) {
this.first = first;
this.second = second;
};
($traceurRuntime.createClass)(SwitchClause, {}, {});
var SwitchState = function SwitchState(id, expression, clauses) {
$traceurRuntime.superCall(this, $SwitchState.prototype, "constructor", [id]);
this.expression = expression;
this.clauses = clauses;
};
var $SwitchState = SwitchState;
($traceurRuntime.createClass)(SwitchState, {
replaceState: function(oldState, newState) {
var clauses = this.clauses.map((function(clause) {
return new SwitchClause(clause.first, State.replaceStateId(clause.second, oldState, newState));
}));
return new $SwitchState(State.replaceStateId(this.id, oldState, newState), this.expression, clauses);
},
transform: function(enclosingFinally, machineEndState, reporter) {
var clauses = [];
for (var i = 0; i < this.clauses.length; i++) {
var clause = this.clauses[i];
if (clause.first == null) {
clauses.push(new DefaultClause(null, State.generateJump(enclosingFinally, clause.second)));
} else {
clauses.push(new CaseClause(null, clause.first, State.generateJump(enclosingFinally, clause.second)));
}
}
return [new SwitchStatement(null, this.expression, clauses), createBreakStatement()];
}
}, {}, State);
return {
get SwitchClause() {
return SwitchClause;
},
get SwitchState() {
return SwitchState;
}
};
});
System.register("traceur@0.0.52/src/codegeneration/generator/CPSTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/CPSTransformer";
var $__452 = Object.freeze(Object.defineProperties(["$ctx.pushTry(\n ", ",\n ", ");"], {raw: {value: Object.freeze(["$ctx.pushTry(\n ", ",\n ", ");"])}})),
$__453 = Object.freeze(Object.defineProperties(["$ctx.popTry();"], {raw: {value: Object.freeze(["$ctx.popTry();"])}})),
$__454 = Object.freeze(Object.defineProperties(["\n $ctx.popTry();\n ", " = $ctx.storedException;"], {raw: {value: Object.freeze(["\n $ctx.popTry();\n ", " = $ctx.storedException;"])}})),
$__455 = Object.freeze(Object.defineProperties(["$ctx.popTry();"], {raw: {value: Object.freeze(["$ctx.popTry();"])}})),
$__456 = Object.freeze(Object.defineProperties(["function($ctx) {\n while (true) ", "\n }"], {raw: {value: Object.freeze(["function($ctx) {\n while (true) ", "\n }"])}})),
$__457 = Object.freeze(Object.defineProperties(["var $arguments = arguments;"], {raw: {value: Object.freeze(["var $arguments = arguments;"])}})),
$__458 = Object.freeze(Object.defineProperties(["return ", "(\n ", ",\n ", ", this);"], {raw: {value: Object.freeze(["return ", "(\n ", ",\n ", ", this);"])}})),
$__459 = Object.freeze(Object.defineProperties(["return ", "(\n ", ", this);"], {raw: {value: Object.freeze(["return ", "(\n ", ", this);"])}})),
$__460 = Object.freeze(Object.defineProperties(["return $ctx.end()"], {raw: {value: Object.freeze(["return $ctx.end()"])}})),
$__461 = Object.freeze(Object.defineProperties(["\n $ctx.state = $ctx.finallyFallThrough;\n $ctx.finallyFallThrough = ", ";\n break;"], {raw: {value: Object.freeze(["\n $ctx.state = $ctx.finallyFallThrough;\n $ctx.finallyFallThrough = ", ";\n break;"])}})),
$__462 = Object.freeze(Object.defineProperties(["\n $ctx.state = $ctx.finallyFallThrough;\n break;"], {raw: {value: Object.freeze(["\n $ctx.state = $ctx.finallyFallThrough;\n break;"])}}));
var AlphaRenamer = System.get("traceur@0.0.52/src/codegeneration/AlphaRenamer").AlphaRenamer;
var BreakContinueTransformer = System.get("traceur@0.0.52/src/codegeneration/generator/BreakContinueTransformer").BreakContinueTransformer;
var $__465 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BLOCK = $__465.BLOCK,
CASE_CLAUSE = $__465.CASE_CLAUSE,
CONDITIONAL_EXPRESSION = $__465.CONDITIONAL_EXPRESSION,
EXPRESSION_STATEMENT = $__465.EXPRESSION_STATEMENT,
PAREN_EXPRESSION = $__465.PAREN_EXPRESSION,
STATE_MACHINE = $__465.STATE_MACHINE;
var $__466 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__466.AnonBlock,
Block = $__466.Block,
CaseClause = $__466.CaseClause,
IfStatement = $__466.IfStatement,
SwitchStatement = $__466.SwitchStatement;
var CatchState = System.get("traceur@0.0.52/src/codegeneration/generator/CatchState").CatchState;
var ConditionalState = System.get("traceur@0.0.52/src/codegeneration/generator/ConditionalState").ConditionalState;
var ExplodeExpressionTransformer = System.get("traceur@0.0.52/src/codegeneration/ExplodeExpressionTransformer").ExplodeExpressionTransformer;
var FallThroughState = System.get("traceur@0.0.52/src/codegeneration/generator/FallThroughState").FallThroughState;
var FinallyFallThroughState = System.get("traceur@0.0.52/src/codegeneration/generator/FinallyFallThroughState").FinallyFallThroughState;
var FinallyState = System.get("traceur@0.0.52/src/codegeneration/generator/FinallyState").FinallyState;
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var $__477 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__477.parseExpression,
parseStatement = $__477.parseStatement,
parseStatements = $__477.parseStatements;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var StateAllocator = System.get("traceur@0.0.52/src/codegeneration/generator/StateAllocator").StateAllocator;
var StateMachine = System.get("traceur@0.0.52/src/syntax/trees/StateMachine").StateMachine;
var $__481 = System.get("traceur@0.0.52/src/codegeneration/generator/SwitchState"),
SwitchClause = $__481.SwitchClause,
SwitchState = $__481.SwitchState;
var TryState = System.get("traceur@0.0.52/src/codegeneration/generator/TryState").TryState;
var $__483 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignStateStatement = $__483.createAssignStateStatement,
createBreakStatement = $__483.createBreakStatement,
createCaseClause = $__483.createCaseClause,
createDefaultClause = $__483.createDefaultClause,
createExpressionStatement = $__483.createExpressionStatement,
createFunctionBody = $__483.createFunctionBody,
id = $__483.createIdentifierExpression,
createMemberExpression = $__483.createMemberExpression,
createNumberLiteral = $__483.createNumberLiteral,
createSwitchStatement = $__483.createSwitchStatement;
var HoistVariablesTransformer = System.get("traceur@0.0.52/src/codegeneration/HoistVariablesTransformer").default;
var LabelState = function LabelState(name, continueState, fallThroughState) {
this.name = name;
this.continueState = continueState;
this.fallThroughState = fallThroughState;
};
($traceurRuntime.createClass)(LabelState, {}, {});
var NeedsStateMachine = function NeedsStateMachine() {
$traceurRuntime.defaultSuperCall(this, $NeedsStateMachine.prototype, arguments);
};
var $NeedsStateMachine = NeedsStateMachine;
($traceurRuntime.createClass)(NeedsStateMachine, {
visitBreakStatement: function(tree) {
this.found = true;
},
visitContinueStatement: function(tree) {
this.found = true;
},
visitStateMachine: function(tree) {
this.found = true;
},
visitYieldExpression: function(tee) {
this.found = true;
}
}, {}, FindInFunctionScope);
function needsStateMachine(tree) {
var visitor = new NeedsStateMachine(tree);
return visitor.found;
}
var HoistVariables = function HoistVariables() {
$traceurRuntime.defaultSuperCall(this, $HoistVariables.prototype, arguments);
};
var $HoistVariables = HoistVariables;
($traceurRuntime.createClass)(HoistVariables, {prependVariables: function(statements) {
return statements;
}}, {}, HoistVariablesTransformer);
var CPSTransformer = function CPSTransformer(identifierGenerator, reporter) {
$traceurRuntime.superCall(this, $CPSTransformer.prototype, "constructor", [identifierGenerator]);
this.reporter = reporter;
this.stateAllocator_ = new StateAllocator();
this.labelSet_ = Object.create(null);
this.currentLabel_ = null;
this.hoistVariablesTransformer_ = new HoistVariables();
};
var $CPSTransformer = CPSTransformer;
($traceurRuntime.createClass)(CPSTransformer, {
expressionNeedsStateMachine: function(tree) {
return false;
},
allocateState: function() {
return this.stateAllocator_.allocateState();
},
transformBlock: function(tree) {
var labels = this.getLabels_();
var label = this.clearCurrentLabel_();
var transformedTree = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformBlock", [tree]);
var machine = this.transformStatementList_(transformedTree.statements);
if (machine === null)
return transformedTree;
if (label) {
var states = [];
for (var i = 0; i < machine.states.length; i++) {
var state = machine.states[i];
states.push(state.transformBreakOrContinue(labels));
}
machine = new StateMachine(machine.startState, machine.fallThroughState, states, machine.exceptionBlocks);
}
return machine;
},
transformFunctionBody: function(tree) {
this.pushTempScope();
var oldLabels = this.clearLabels_();
var transformedTree = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformFunctionBody", [tree]);
var machine = this.transformStatementList_(transformedTree.statements);
this.restoreLabels_(oldLabels);
this.popTempScope();
return machine == null ? transformedTree : machine;
},
transformStatementList_: function(trees) {
var groups = [];
var newMachine;
for (var i = 0; i < trees.length; i++) {
if (trees[i].type === STATE_MACHINE) {
groups.push(trees[i]);
} else if (needsStateMachine(trees[i])) {
newMachine = this.ensureTransformed_(trees[i]);
groups.push(newMachine);
} else {
var last = groups[groups.length - 1];
if (!(last instanceof Array))
groups.push(last = []);
last.push(trees[i]);
}
}
if (groups.length === 1 && groups[0] instanceof Array)
return null;
var machine = null;
for (var i = 0; i < groups.length; i++) {
if (groups[i] instanceof Array) {
newMachine = this.statementsToStateMachine_(groups[i]);
} else {
newMachine = groups[i];
}
if (i === 0)
machine = newMachine;
else
machine = machine.append(newMachine);
}
return machine;
},
needsStateMachine_: function(statements) {
if (statements instanceof Array) {
for (var i = 0; i < statements.length; i++) {
if (needsStateMachine(statements[i]))
return true;
}
return false;
}
assert(statements instanceof SwitchStatement);
return needsStateMachine(statements);
},
transformCaseClause: function(tree) {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformCaseClause", [tree]);
var machine = this.transformStatementList_(result.statements);
return machine == null ? result : new CaseClause(null, result.expression, [machine]);
},
transformDoWhileStatement: function(tree) {
var $__489;
var $__487,
$__488;
var labels = this.getLabels_();
var label = this.clearCurrentLabel_();
var machine,
condition,
body;
if (this.expressionNeedsStateMachine(tree.condition)) {
(($__487 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.condition)), machine = $__487.machine, condition = $__487.expression, $__487));
body = this.transformAny(tree.body);
} else {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformDoWhileStatement", [tree]);
(($__488 = $traceurRuntime.assertObject(result), condition = $__488.condition, body = $__488.body, $__488));
if (body.type != STATE_MACHINE)
return result;
}
var loopBodyMachine = this.ensureTransformed_(body);
var startState = loopBodyMachine.startState;
var conditionState = loopBodyMachine.fallThroughState;
var fallThroughState = this.allocateState();
var states = [];
this.addLoopBodyStates_(loopBodyMachine, conditionState, fallThroughState, labels, states);
if (machine) {
machine = machine.replaceStartState(conditionState);
conditionState = machine.fallThroughState;
($__489 = states).push.apply($__489, $traceurRuntime.spread(machine.states));
}
states.push(new ConditionalState(conditionState, startState, fallThroughState, condition));
var machine = new StateMachine(startState, fallThroughState, states, loopBodyMachine.exceptionBlocks);
if (label)
machine = machine.replaceStateId(conditionState, label.continueState);
return machine;
},
addLoopBodyStates_: function(loopBodyMachine, continueState, breakState, labels, states) {
for (var i = 0; i < loopBodyMachine.states.length; i++) {
var state = loopBodyMachine.states[i];
states.push(state.transformBreakOrContinue(labels, breakState, continueState));
}
},
transformForStatement: function(tree) {
var $__489,
$__490,
$__491;
var labels = this.getLabels_();
var label = this.clearCurrentLabel_();
var tmp;
var initializer = null,
initializerMachine;
if (tree.initializer) {
if (this.expressionNeedsStateMachine(tree.initializer)) {
tmp = this.expressionToStateMachine(tree.initializer);
initializer = tmp.expression;
initializerMachine = tmp.machine;
} else {
initializer = this.transformAny(tree.initializer);
}
}
var condition = null,
conditionMachine;
if (tree.condition) {
if (this.expressionNeedsStateMachine(tree.condition)) {
tmp = this.expressionToStateMachine(tree.condition);
condition = tmp.expression;
conditionMachine = tmp.machine;
} else {
condition = this.transformAny(tree.condition);
}
}
var increment = null,
incrementMachine;
if (tree.increment) {
if (this.expressionNeedsStateMachine(tree.increment)) {
tmp = this.expressionToStateMachine(tree.increment);
increment = tmp.expression;
incrementMachine = tmp.machine;
} else {
increment = this.transformAny(tree.increment);
}
}
var body = this.transformAny(tree.body);
if (initializer === tree.initializer && condition === tree.condition && increment === tree.increment && body === tree.body) {
return tree;
}
if (!initializerMachine && !conditionMachine && !incrementMachine && body.type !== STATE_MACHINE) {
return new ForStatement(tree.location, initializer, condition, increment, body);
}
var loopBodyMachine = this.ensureTransformed_(body);
var bodyFallThroughId = loopBodyMachine.fallThroughState;
var fallThroughId = this.allocateState();
var startId;
var initializerStartId = initializer ? this.allocateState() : State.INVALID_STATE;
var conditionStartId = increment ? this.allocateState() : bodyFallThroughId;
var loopStartId = loopBodyMachine.startState;
var incrementStartId = bodyFallThroughId;
var states = [];
if (initializer) {
startId = initializerStartId;
var initialiserFallThroughId;
if (condition)
initialiserFallThroughId = conditionStartId;
else
initialiserFallThroughId = loopStartId;
var tmpId = initializerStartId;
if (initializerMachine) {
initializerMachine = initializerMachine.replaceStartState(initializerStartId);
tmpId = initializerMachine.fallThroughState;
($__489 = states).push.apply($__489, $traceurRuntime.spread(initializerMachine.states));
}
states.push(new FallThroughState(tmpId, initialiserFallThroughId, [createExpressionStatement(initializer)]));
}
if (condition) {
if (!initializer)
startId = conditionStartId;
var tmpId = conditionStartId;
if (conditionMachine) {
conditionMachine = conditionMachine.replaceStartState(conditionStartId);
tmpId = conditionMachine.fallThroughState;
($__490 = states).push.apply($__490, $traceurRuntime.spread(conditionMachine.states));
}
states.push(new ConditionalState(tmpId, loopStartId, fallThroughId, condition));
}
if (increment) {
var incrementFallThroughId;
if (condition)
incrementFallThroughId = conditionStartId;
else
incrementFallThroughId = loopStartId;
var tmpId = incrementStartId;
if (incrementMachine) {
incrementMachine = incrementMachine.replaceStartState(incrementStartId);
tmpId = incrementMachine.fallThroughState;
($__491 = states).push.apply($__491, $traceurRuntime.spread(incrementMachine.states));
}
states.push(new FallThroughState(tmpId, incrementFallThroughId, [createExpressionStatement(increment)]));
}
if (!initializer && !condition)
startId = loopStartId;
var continueId;
if (increment)
continueId = incrementStartId;
else if (condition)
continueId = conditionStartId;
else
continueId = loopStartId;
if (!increment && !condition) {
loopBodyMachine = loopBodyMachine.replaceFallThroughState(loopBodyMachine.startState);
}
this.addLoopBodyStates_(loopBodyMachine, continueId, fallThroughId, labels, states);
var machine = new StateMachine(startId, fallThroughId, states, loopBodyMachine.exceptionBlocks);
if (label)
machine = machine.replaceStateId(continueId, label.continueState);
return machine;
},
transformForInStatement: function(tree) {
return tree;
},
transformForOfStatement: function(tree) {
throw new Error('for of statements should be transformed before this pass');
},
transformIfStatement: function(tree) {
var $__489,
$__490,
$__491;
var $__487,
$__488;
var machine,
condition,
ifClause,
elseClause;
if (this.expressionNeedsStateMachine(tree.condition)) {
(($__487 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.condition)), machine = $__487.machine, condition = $__487.expression, $__487));
ifClause = this.transformAny(tree.ifClause);
elseClause = this.transformAny(tree.elseClause);
} else {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformIfStatement", [tree]);
(($__488 = $traceurRuntime.assertObject(result), condition = $__488.condition, ifClause = $__488.ifClause, elseClause = $__488.elseClause, $__488));
if (ifClause.type !== STATE_MACHINE && (elseClause === null || elseClause.type !== STATE_MACHINE)) {
return result;
}
}
ifClause = this.ensureTransformed_(ifClause);
elseClause = this.ensureTransformed_(elseClause);
var startState = this.allocateState();
var fallThroughState = ifClause.fallThroughState;
var ifState = ifClause.startState;
var elseState = elseClause == null ? fallThroughState : elseClause.startState;
var states = [];
var exceptionBlocks = [];
states.push(new ConditionalState(startState, ifState, elseState, condition));
($__489 = states).push.apply($__489, $traceurRuntime.spread(ifClause.states));
($__490 = exceptionBlocks).push.apply($__490, $traceurRuntime.spread(ifClause.exceptionBlocks));
if (elseClause != null) {
this.replaceAndAddStates_(elseClause.states, elseClause.fallThroughState, fallThroughState, states);
($__491 = exceptionBlocks).push.apply($__491, $traceurRuntime.spread(State.replaceAllStates(elseClause.exceptionBlocks, elseClause.fallThroughState, fallThroughState)));
}
var ifMachine = new StateMachine(startState, fallThroughState, states, exceptionBlocks);
if (machine)
ifMachine = machine.append(ifMachine);
return ifMachine;
},
removeEmptyStates: function(oldStates) {
var emptyStates = [],
newStates = [];
for (var i = 0; i < oldStates.length; i++) {
if (oldStates[i] instanceof FallThroughState && oldStates[i].statements.length === 0) {
emptyStates.push(oldStates[i]);
} else {
newStates.push(oldStates[i]);
}
}
for (i = 0; i < newStates.length; i++) {
newStates[i] = emptyStates.reduce((function(state, $__487) {
var $__488 = $traceurRuntime.assertObject($__487),
id = $__488.id,
fallThroughState = $__488.fallThroughState;
return state.replaceState(id, fallThroughState);
}), newStates[i]);
}
return newStates;
},
replaceAndAddStates_: function(oldStates, oldState, newState, newStates) {
for (var i = 0; i < oldStates.length; i++) {
newStates.push(oldStates[i].replaceState(oldState, newState));
}
},
transformLabelledStatement: function(tree) {
var startState = this.allocateState();
var continueState = this.allocateState();
var fallThroughState = this.allocateState();
var label = new LabelState(tree.name.value, continueState, fallThroughState);
var oldLabels = this.addLabel_(label);
this.currentLabel_ = label;
var result = this.transformAny(tree.statement);
if (result === tree.statement) {
result = tree;
} else if (result.type === STATE_MACHINE) {
result = result.replaceStartState(startState);
result = result.replaceFallThroughState(fallThroughState);
}
this.restoreLabels_(oldLabels);
return result;
},
getLabels_: function() {
return this.labelSet_;
},
restoreLabels_: function(oldLabels) {
this.labelSet_ = oldLabels;
},
addLabel_: function(label) {
var oldLabels = this.labelSet_;
var labelSet = Object.create(null);
for (var k in this.labelSet_) {
labelSet[k] = this.labelSet_[k];
}
labelSet[label.name] = label;
this.labelSet_ = labelSet;
return oldLabels;
},
clearLabels_: function() {
var result = this.labelSet_;
this.labelSet_ = Object.create(null);
return result;
},
clearCurrentLabel_: function() {
var result = this.currentLabel_;
this.currentLabel_ = null;
return result;
},
transformSwitchStatement: function(tree) {
var $__487,
$__488;
var labels = this.getLabels_();
var expression,
machine,
caseClauses;
if (this.expressionNeedsStateMachine(tree.expression)) {
(($__487 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.expression)), expression = $__487.expression, machine = $__487.machine, $__487));
caseClauses = this.transformList(tree.caseClauses);
} else {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformSwitchStatement", [tree]);
if (!needsStateMachine(result))
return result;
(($__488 = $traceurRuntime.assertObject(result), expression = $__488.expression, caseClauses = $__488.caseClauses, $__488));
}
var startState = this.allocateState();
var fallThroughState = this.allocateState();
var nextState = fallThroughState;
var states = [];
var clauses = [];
var tryStates = [];
var hasDefault = false;
for (var index = caseClauses.length - 1; index >= 0; index--) {
var clause = caseClauses[index];
if (clause.type == CASE_CLAUSE) {
var caseClause = clause;
nextState = this.addSwitchClauseStates_(nextState, fallThroughState, labels, caseClause.statements, states, tryStates);
clauses.push(new SwitchClause(caseClause.expression, nextState));
} else {
hasDefault = true;
var defaultClause = clause;
nextState = this.addSwitchClauseStates_(nextState, fallThroughState, labels, defaultClause.statements, states, tryStates);
clauses.push(new SwitchClause(null, nextState));
}
}
if (!hasDefault) {
clauses.push(new SwitchClause(null, fallThroughState));
}
states.push(new SwitchState(startState, expression, clauses.reverse()));
var switchMachine = new StateMachine(startState, fallThroughState, states.reverse(), tryStates);
if (machine)
switchMachine = machine.append(switchMachine);
return switchMachine;
},
addSwitchClauseStates_: function(nextState, fallThroughState, labels, statements, states, tryStates) {
var $__489;
var machine = this.ensureTransformedList_(statements);
for (var i = 0; i < machine.states.length; i++) {
var state = machine.states[i];
var transformedState = state.transformBreak(labels, fallThroughState);
states.push(transformedState.replaceState(machine.fallThroughState, nextState));
}
($__489 = tryStates).push.apply($__489, $traceurRuntime.spread(machine.exceptionBlocks));
return machine.startState;
},
transformTryStatement: function(tree) {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformTryStatement", [tree]);
var $__487 = $traceurRuntime.assertObject(result),
body = $__487.body,
catchBlock = $__487.catchBlock,
finallyBlock = $__487.finallyBlock;
if (body.type != STATE_MACHINE && (catchBlock == null || catchBlock.catchBody.type != STATE_MACHINE) && (finallyBlock == null || finallyBlock.block.type != STATE_MACHINE)) {
return result;
}
var outerCatchState = this.allocateState();
var outerFinallyState = this.allocateState();
var pushTryState = this.statementToStateMachine_(parseStatement($__452, (catchBlock && outerCatchState), (finallyBlock && outerFinallyState)));
var tryMachine = this.ensureTransformed_(body);
tryMachine = pushTryState.append(tryMachine);
if (catchBlock !== null) {
var popTry = this.statementToStateMachine_(parseStatement($__453));
tryMachine = tryMachine.append(popTry);
var exceptionName = catchBlock.binding.identifierToken.value;
var catchMachine = this.ensureTransformed_(catchBlock.catchBody);
var catchStart = this.allocateState();
this.addMachineVariable(exceptionName);
var states = $traceurRuntime.spread(tryMachine.states, [new FallThroughState(catchStart, catchMachine.startState, parseStatements($__454, id(exceptionName)))]);
this.replaceAndAddStates_(catchMachine.states, catchMachine.fallThroughState, tryMachine.fallThroughState, states);
tryMachine = new StateMachine(tryMachine.startState, tryMachine.fallThroughState, states, [new CatchState(exceptionName, catchStart, tryMachine.fallThroughState, tryMachine.getAllStateIDs(), tryMachine.exceptionBlocks)]);
tryMachine = tryMachine.replaceStateId(catchStart, outerCatchState);
}
if (finallyBlock != null) {
var finallyMachine = this.ensureTransformed_(finallyBlock.block);
var popTry = this.statementToStateMachine_(parseStatement($__455));
finallyMachine = popTry.append(finallyMachine);
var states = $traceurRuntime.spread(tryMachine.states, finallyMachine.states, [new FinallyFallThroughState(finallyMachine.fallThroughState)]);
tryMachine = new StateMachine(tryMachine.startState, tryMachine.fallThroughState, states, [new FinallyState(finallyMachine.startState, finallyMachine.fallThroughState, tryMachine.getAllStateIDs(), tryMachine.exceptionBlocks)]);
tryMachine = tryMachine.replaceStateId(finallyMachine.startState, outerFinallyState);
}
return tryMachine;
},
transformWhileStatement: function(tree) {
var $__489;
var $__487,
$__488;
var labels = this.getLabels_();
var label = this.clearCurrentLabel_();
var condition,
machine,
body;
if (this.expressionNeedsStateMachine(tree.condition)) {
(($__487 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.condition)), machine = $__487.machine, condition = $__487.expression, $__487));
body = this.transformAny(tree.body);
} else {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformWhileStatement", [tree]);
(($__488 = $traceurRuntime.assertObject(result), condition = $__488.condition, body = $__488.body, $__488));
if (body.type !== STATE_MACHINE)
return result;
}
var loopBodyMachine = this.ensureTransformed_(body);
var startState = loopBodyMachine.fallThroughState;
var fallThroughState = this.allocateState();
var states = [];
var conditionStart = startState;
if (machine) {
machine = machine.replaceStartState(startState);
conditionStart = machine.fallThroughState;
($__489 = states).push.apply($__489, $traceurRuntime.spread(machine.states));
}
states.push(new ConditionalState(conditionStart, loopBodyMachine.startState, fallThroughState, condition));
this.addLoopBodyStates_(loopBodyMachine, startState, fallThroughState, labels, states);
var machine = new StateMachine(startState, fallThroughState, states, loopBodyMachine.exceptionBlocks);
if (label)
machine = machine.replaceStateId(startState, label.continueState);
return machine;
},
transformWithStatement: function(tree) {
var result = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformWithStatement", [tree]);
if (result.body.type != STATE_MACHINE) {
return result;
}
throw new Error('Unreachable - with statement not allowed in strict mode/harmony');
},
generateMachineInnerFunction: function(machine) {
var enclosingFinallyState = machine.getEnclosingFinallyMap();
var SwitchStatement = createSwitchStatement(createMemberExpression('$ctx', 'state'), this.transformMachineStates(machine, State.END_STATE, State.RETHROW_STATE, enclosingFinallyState));
return parseExpression($__456, SwitchStatement);
},
addTempVar: function() {
var name = this.getTempIdentifier();
this.addMachineVariable(name);
return name;
},
addMachineVariable: function(name) {
this.hoistVariablesTransformer_.addVariable(name);
},
transformCpsFunctionBody: function(tree, runtimeMethod) {
var functionRef = arguments[2];
var alphaRenamedTree = AlphaRenamer.rename(tree, 'arguments', '$arguments');
var hasArguments = alphaRenamedTree !== tree;
var hoistedTree = this.hoistVariablesTransformer_.transformAny(alphaRenamedTree);
var maybeMachine = this.transformAny(hoistedTree);
if (this.reporter.hadError())
return tree;
var machine;
if (maybeMachine.type !== STATE_MACHINE) {
machine = this.statementsToStateMachine_(maybeMachine.statements);
} else {
machine = new StateMachine(maybeMachine.startState, maybeMachine.fallThroughState, this.removeEmptyStates(maybeMachine.states), maybeMachine.exceptionBlocks);
}
machine = machine.replaceFallThroughState(State.END_STATE).replaceStartState(State.START_STATE);
var statements = [];
if (this.hoistVariablesTransformer_.hasVariables())
statements.push(this.hoistVariablesTransformer_.getVariableStatement());
if (hasArguments)
statements.push(parseStatement($__457));
if (functionRef) {
statements.push(parseStatement($__458, runtimeMethod, this.generateMachineInnerFunction(machine), functionRef));
} else {
statements.push(parseStatement($__459, runtimeMethod, this.generateMachineInnerFunction(machine)));
}
return createFunctionBody(statements);
},
transformFunctionDeclaration: function(tree) {
return tree;
},
transformFunctionExpression: function(tree) {
return tree;
},
transformGetAccessor: function(tree) {
return tree;
},
transformSetAccessor: function(tree) {
return tree;
},
transformArrowFunctionExpression: function(tree) {
return tree;
},
transformStateMachine: function(tree) {
return tree;
},
statementToStateMachine_: function(statement) {
var statements;
if (statement.type === BLOCK)
statements = statement.statements;
else
statements = [statement];
return this.statementsToStateMachine_(statements);
},
statementsToStateMachine_: function(statements) {
var startState = this.allocateState();
var fallThroughState = this.allocateState();
return this.stateToStateMachine_(new FallThroughState(startState, fallThroughState, statements), fallThroughState);
},
stateToStateMachine_: function(newState, fallThroughState) {
return new StateMachine(newState.id, fallThroughState, [newState], []);
},
transformMachineStates: function(machine, machineEndState, rethrowState, enclosingFinallyState) {
var cases = [];
for (var i = 0; i < machine.states.length; i++) {
var state = machine.states[i];
var stateCase = state.transformMachineState(enclosingFinallyState[state.id], machineEndState, this.reporter);
if (stateCase != null) {
cases.push(stateCase);
}
}
this.addFinallyFallThroughDispatches(null, machine.exceptionBlocks, cases);
cases.push(createDefaultClause(parseStatements($__460)));
return cases;
},
addFinallyFallThroughDispatches: function(enclosingFinallyState, tryStates, cases) {
for (var i = 0; i < tryStates.length; i++) {
var tryState = tryStates[i];
if (tryState.kind == TryState.Kind.FINALLY) {
var finallyState = tryState;
if (enclosingFinallyState != null) {
var caseClauses = [];
var index = 0;
for (var j = 0; j < enclosingFinallyState.tryStates.length; j++) {
var destination = enclosingFinallyState.tryStates[j];
index++;
var statements;
if (index < enclosingFinallyState.tryStates.length) {
statements = [];
} else {
statements = parseStatements($__461, State.INVALID_STATE);
}
caseClauses.push(createCaseClause(createNumberLiteral(destination), statements));
}
caseClauses.push(createDefaultClause([createAssignStateStatement(enclosingFinallyState.finallyState), createBreakStatement()]));
cases.push(createCaseClause(createNumberLiteral(finallyState.fallThroughState), [createSwitchStatement(createMemberExpression('$ctx', 'finallyFallThrough'), caseClauses), createBreakStatement()]));
} else {
cases.push(createCaseClause(createNumberLiteral(finallyState.fallThroughState), parseStatements($__462)));
}
this.addFinallyFallThroughDispatches(finallyState, finallyState.nestedTrys, cases);
} else {
this.addFinallyFallThroughDispatches(enclosingFinallyState, tryState.nestedTrys, cases);
}
}
},
transformVariableDeclarationList: function(tree) {
this.reporter.reportError(tree.location && tree.location.start, 'Traceur: const/let declarations in a block containing a yield are ' + 'not yet implemented');
return tree;
},
maybeTransformStatement_: function(maybeTransformedStatement) {
var breakContinueTransformed = new BreakContinueTransformer(this.stateAllocator_).transformAny(maybeTransformedStatement);
if (breakContinueTransformed != maybeTransformedStatement) {
breakContinueTransformed = this.transformAny(breakContinueTransformed);
}
return breakContinueTransformed;
},
ensureTransformed_: function(statement) {
if (statement == null) {
return null;
}
var maybeTransformed = this.maybeTransformStatement_(statement);
return maybeTransformed.type == STATE_MACHINE ? maybeTransformed : this.statementToStateMachine_(maybeTransformed);
},
ensureTransformedList_: function(statements) {
var maybeTransformedStatements = [];
var foundMachine = false;
for (var i = 0; i < statements.length; i++) {
var statement = statements[i];
var maybeTransformedStatement = this.maybeTransformStatement_(statement);
maybeTransformedStatements.push(maybeTransformedStatement);
if (maybeTransformedStatement.type == STATE_MACHINE) {
foundMachine = true;
}
}
if (!foundMachine) {
return this.statementsToStateMachine_(statements);
}
return this.transformStatementList_(maybeTransformedStatements);
},
expressionToStateMachine: function(tree) {
var commaExpression = new ExplodeExpressionTransformer(this).transformAny(tree);
var statements = $traceurRuntime.assertObject(new NormalizeCommaExpressionToStatementTransformer().transformAny(commaExpression)).statements;
var lastStatement = statements.pop();
assert(lastStatement.type === EXPRESSION_STATEMENT);
var expression = lastStatement.expression;
statements = $traceurRuntime.superCall(this, $CPSTransformer.prototype, "transformList", [statements]);
var machine = this.transformStatementList_(statements);
return {
expression: expression,
machine: machine
};
}
}, {}, TempVarTransformer);
var NormalizeCommaExpressionToStatementTransformer = function NormalizeCommaExpressionToStatementTransformer() {
$traceurRuntime.defaultSuperCall(this, $NormalizeCommaExpressionToStatementTransformer.prototype, arguments);
};
var $NormalizeCommaExpressionToStatementTransformer = NormalizeCommaExpressionToStatementTransformer;
($traceurRuntime.createClass)(NormalizeCommaExpressionToStatementTransformer, {
transformCommaExpression: function(tree) {
var $__485 = this;
var statements = tree.expressions.map((function(expr) {
if (expr.type === CONDITIONAL_EXPRESSION)
return $__485.transformAny(expr);
return createExpressionStatement(expr);
}));
return new AnonBlock(tree.location, statements);
},
transformConditionalExpression: function(tree) {
var ifBlock = this.transformAny(tree.left);
var elseBlock = this.transformAny(tree.right);
return new IfStatement(tree.location, tree.condition, anonBlockToBlock(ifBlock), anonBlockToBlock(elseBlock));
}
}, {}, ParseTreeTransformer);
function anonBlockToBlock(tree) {
if (tree.type === PAREN_EXPRESSION)
return anonBlockToBlock(tree.expression);
return new Block(tree.location, tree.statements);
}
return {get CPSTransformer() {
return CPSTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/EndState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/EndState";
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var EndState = function EndState() {
$traceurRuntime.defaultSuperCall(this, $EndState.prototype, arguments);
};
var $EndState = EndState;
($traceurRuntime.createClass)(EndState, {
replaceState: function(oldState, newState) {
return new $EndState(State.replaceStateId(this.id, oldState, newState));
},
transform: function(enclosingFinally, machineEndState, reporter) {
return State.generateJump(enclosingFinally, machineEndState);
}
}, {}, State);
return {get EndState() {
return EndState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/AsyncTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/AsyncTransformer";
var $__494 = Object.freeze(Object.defineProperties(["$ctx.value"], {raw: {value: Object.freeze(["$ctx.value"])}})),
$__495 = Object.freeze(Object.defineProperties(["$ctx.returnValue = ", ""], {raw: {value: Object.freeze(["$ctx.returnValue = ", ""])}})),
$__496 = Object.freeze(Object.defineProperties(["$ctx.resolve(", ")"], {raw: {value: Object.freeze(["$ctx.resolve(", ")"])}})),
$__497 = Object.freeze(Object.defineProperties(["$traceurRuntime.asyncWrap"], {raw: {value: Object.freeze(["$traceurRuntime.asyncWrap"])}}));
var AwaitState = System.get("traceur@0.0.52/src/codegeneration/generator/AwaitState").AwaitState;
var $__499 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
BinaryExpression = $__499.BinaryExpression,
ExpressionStatement = $__499.ExpressionStatement;
var CPSTransformer = System.get("traceur@0.0.52/src/codegeneration/generator/CPSTransformer").CPSTransformer;
var EndState = System.get("traceur@0.0.52/src/codegeneration/generator/EndState").EndState;
var FallThroughState = System.get("traceur@0.0.52/src/codegeneration/generator/FallThroughState").FallThroughState;
var $__503 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
AWAIT_EXPRESSION = $__503.AWAIT_EXPRESSION,
BINARY_EXPRESSION = $__503.BINARY_EXPRESSION,
STATE_MACHINE = $__503.STATE_MACHINE;
var $__504 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__504.parseExpression,
parseStatement = $__504.parseStatement,
parseStatements = $__504.parseStatements;
var StateMachine = System.get("traceur@0.0.52/src/syntax/trees/StateMachine").StateMachine;
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var createUndefinedExpression = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createUndefinedExpression;
function isAwaitAssign(tree) {
return tree.type === BINARY_EXPRESSION && tree.operator.isAssignmentOperator() && tree.right.type === AWAIT_EXPRESSION && tree.left.isLeftHandSideExpression();
}
var AwaitFinder = function AwaitFinder() {
$traceurRuntime.defaultSuperCall(this, $AwaitFinder.prototype, arguments);
};
var $AwaitFinder = AwaitFinder;
($traceurRuntime.createClass)(AwaitFinder, {visitAwaitExpression: function(tree) {
this.found = true;
}}, {}, FindInFunctionScope);
function scopeContainsAwait(tree) {
return new AwaitFinder(tree).found;
}
var AsyncTransformer = function AsyncTransformer() {
$traceurRuntime.defaultSuperCall(this, $AsyncTransformer.prototype, arguments);
};
var $AsyncTransformer = AsyncTransformer;
($traceurRuntime.createClass)(AsyncTransformer, {
expressionNeedsStateMachine: function(tree) {
if (tree === null)
return false;
return scopeContainsAwait(tree);
},
transformExpressionStatement: function(tree) {
var expression = tree.expression;
if (expression.type === AWAIT_EXPRESSION)
return this.transformAwaitExpression_(expression);
if (isAwaitAssign(expression))
return this.transformAwaitAssign_(expression);
if (this.expressionNeedsStateMachine(expression)) {
return this.expressionToStateMachine(expression).machine;
}
return $traceurRuntime.superCall(this, $AsyncTransformer.prototype, "transformExpressionStatement", [tree]);
},
transformAwaitExpression: function(tree) {
throw new Error('Internal error');
},
transformAwaitExpression_: function(tree) {
return this.transformAwait_(tree, tree.expression, null, null);
},
transformAwaitAssign_: function(tree) {
return this.transformAwait_(tree, tree.right.expression, tree.left, tree.operator);
},
transformAwait_: function(tree, inExpression, left, operator) {
var $__509;
var expression,
machine;
if (this.expressionNeedsStateMachine(inExpression)) {
(($__509 = $traceurRuntime.assertObject(this.expressionToStateMachine(inExpression)), expression = $__509.expression, machine = $__509.machine, $__509));
} else {
expression = this.transformAny(inExpression);
}
var createTaskState = this.allocateState();
var callbackState = this.allocateState();
var fallThroughState = this.allocateState();
if (!left)
callbackState = fallThroughState;
var states = [];
var expression = this.transformAny(expression);
states.push(new AwaitState(createTaskState, callbackState, expression));
if (left) {
var statement = new ExpressionStatement(tree.location, new BinaryExpression(tree.location, left, operator, parseExpression($__494)));
var assignment = [statement];
states.push(new FallThroughState(callbackState, fallThroughState, assignment));
}
var awaitMachine = new StateMachine(createTaskState, fallThroughState, states, []);
if (machine) {
awaitMachine = machine.append(awaitMachine);
}
return awaitMachine;
},
transformFinally: function(tree) {
var result = $traceurRuntime.superCall(this, $AsyncTransformer.prototype, "transformFinally", [tree]);
if (result.block.type != STATE_MACHINE) {
return result;
}
this.reporter.reportError(tree.location.start, 'await not permitted within a finally block.');
return result;
},
transformReturnStatement: function(tree) {
var $__509;
var expression,
machine;
if (this.expressionNeedsStateMachine(tree.expression)) {
(($__509 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.expression)), expression = $__509.expression, machine = $__509.machine, $__509));
} else {
expression = tree.expression || createUndefinedExpression();
}
var startState = this.allocateState();
var endState = this.allocateState();
var completeState = new FallThroughState(startState, endState, parseStatements($__495, expression));
var end = new EndState(endState);
var returnMachine = new StateMachine(startState, this.allocateState(), [completeState, end], []);
if (machine)
returnMachine = machine.append(returnMachine);
return returnMachine;
},
createCompleteTask_: function(result) {
return parseStatement($__496, result);
},
transformAsyncBody: function(tree) {
var runtimeFunction = parseExpression($__497);
return this.transformCpsFunctionBody(tree, runtimeFunction);
}
}, {transformAsyncBody: function(identifierGenerator, reporter, body) {
return new $AsyncTransformer(identifierGenerator, reporter).transformAsyncBody(body);
}}, CPSTransformer);
;
return {get AsyncTransformer() {
return AsyncTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/ForInTransformPass", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/ForInTransformPass";
var $__510 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BLOCK = $__510.BLOCK,
VARIABLE_DECLARATION_LIST = $__510.VARIABLE_DECLARATION_LIST,
IDENTIFIER_EXPRESSION = $__510.IDENTIFIER_EXPRESSION;
var $__511 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
LENGTH = $__511.LENGTH,
PUSH = $__511.PUSH;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__513 = System.get("traceur@0.0.52/src/syntax/TokenType"),
BANG = $__513.BANG,
IN = $__513.IN,
OPEN_ANGLE = $__513.OPEN_ANGLE,
PLUS_PLUS = $__513.PLUS_PLUS,
VAR = $__513.VAR;
var $__514 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__514.createArgumentList,
createAssignmentStatement = $__514.createAssignmentStatement,
createBinaryExpression = $__514.createBinaryExpression,
createBlock = $__514.createBlock,
createCallStatement = $__514.createCallStatement,
createContinueStatement = $__514.createContinueStatement,
createEmptyArrayLiteralExpression = $__514.createEmptyArrayLiteralExpression,
createForInStatement = $__514.createForInStatement,
createForStatement = $__514.createForStatement,
createIdentifierExpression = $__514.createIdentifierExpression,
createIfStatement = $__514.createIfStatement,
createMemberExpression = $__514.createMemberExpression,
createMemberLookupExpression = $__514.createMemberLookupExpression,
createNumberLiteral = $__514.createNumberLiteral,
createOperatorToken = $__514.createOperatorToken,
createParenExpression = $__514.createParenExpression,
createPostfixExpression = $__514.createPostfixExpression,
createUnaryExpression = $__514.createUnaryExpression,
createVariableDeclarationList = $__514.createVariableDeclarationList,
createVariableStatement = $__514.createVariableStatement;
var ForInTransformPass = function ForInTransformPass() {
$traceurRuntime.defaultSuperCall(this, $ForInTransformPass.prototype, arguments);
};
var $ForInTransformPass = ForInTransformPass;
($traceurRuntime.createClass)(ForInTransformPass, {transformForInStatement: function(original) {
var $__516,
$__517;
var tree = original;
var bodyStatements = [];
var body = this.transformAny(tree.body);
if (body.type == BLOCK) {
($__516 = bodyStatements).push.apply($__516, $traceurRuntime.spread(body.statements));
} else {
bodyStatements.push(body);
}
var elements = [];
var keys = this.getTempIdentifier();
elements.push(createVariableStatement(VAR, keys, createEmptyArrayLiteralExpression()));
var collection = this.getTempIdentifier();
elements.push(createVariableStatement(VAR, collection, tree.collection));
var p = this.getTempIdentifier();
elements.push(createForInStatement(createVariableDeclarationList(VAR, p, null), createIdentifierExpression(collection), createCallStatement(createMemberExpression(keys, PUSH), createArgumentList([createIdentifierExpression(p)]))));
var i = this.getTempIdentifier();
var lookup = createMemberLookupExpression(createIdentifierExpression(keys), createIdentifierExpression(i));
var originalKey,
assignOriginalKey;
if (tree.initializer.type == VARIABLE_DECLARATION_LIST) {
var decList = tree.initializer;
originalKey = createIdentifierExpression(decList.declarations[0].lvalue);
assignOriginalKey = createVariableStatement(decList.declarationType, originalKey.identifierToken, lookup);
} else if (tree.initializer.type == IDENTIFIER_EXPRESSION) {
originalKey = tree.initializer;
assignOriginalKey = createAssignmentStatement(tree.initializer, lookup);
} else {
throw new Error('Invalid left hand side of for in loop');
}
var innerBlock = [];
innerBlock.push(assignOriginalKey);
innerBlock.push(createIfStatement(createUnaryExpression(createOperatorToken(BANG), createParenExpression(createBinaryExpression(originalKey, createOperatorToken(IN), createIdentifierExpression(collection)))), createContinueStatement(), null));
($__517 = innerBlock).push.apply($__517, $traceurRuntime.spread(bodyStatements));
elements.push(createForStatement(createVariableDeclarationList(VAR, i, createNumberLiteral(0)), createBinaryExpression(createIdentifierExpression(i), createOperatorToken(OPEN_ANGLE), createMemberExpression(keys, LENGTH)), createPostfixExpression(createIdentifierExpression(i), createOperatorToken(PLUS_PLUS)), createBlock(innerBlock)));
return createBlock(elements);
}}, {}, TempVarTransformer);
return {get ForInTransformPass() {
return ForInTransformPass;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/YieldState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/YieldState";
var $__518 = Object.freeze(Object.defineProperties(["return ", ""], {raw: {value: Object.freeze(["return ", ""])}}));
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
var YieldState = function YieldState(id, fallThroughState, expression) {
$traceurRuntime.superCall(this, $YieldState.prototype, "constructor", [id]);
this.fallThroughState = fallThroughState;
this.expression = expression;
};
var $YieldState = YieldState;
($traceurRuntime.createClass)(YieldState, {
replaceState: function(oldState, newState) {
return new this.constructor(State.replaceStateId(this.id, oldState, newState), State.replaceStateId(this.fallThroughState, oldState, newState), this.expression);
},
transform: function(enclosingFinally, machineEndState, reporter) {
return $traceurRuntime.spread(State.generateAssignState(enclosingFinally, this.fallThroughState), [parseStatement($__518, this.expression)]);
}
}, {}, State);
return {get YieldState() {
return YieldState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/ReturnState", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/ReturnState";
var $__522 = Object.freeze(Object.defineProperties(["$ctx.returnValue = ", ""], {raw: {value: Object.freeze(["$ctx.returnValue = ", ""])}}));
var $__523 = System.get("traceur@0.0.52/src/semantics/util"),
isUndefined = $__523.isUndefined,
isVoidExpression = $__523.isVoidExpression;
var YieldState = System.get("traceur@0.0.52/src/codegeneration/generator/YieldState").YieldState;
var State = System.get("traceur@0.0.52/src/codegeneration/generator/State").State;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
var ReturnState = function ReturnState() {
$traceurRuntime.defaultSuperCall(this, $ReturnState.prototype, arguments);
};
var $ReturnState = ReturnState;
($traceurRuntime.createClass)(ReturnState, {transform: function(enclosingFinally, machineEndState, reporter) {
var $__528;
var e = this.expression;
var statements = [];
if (e && !isUndefined(e) && !isVoidExpression(e))
statements.push(parseStatement($__522, this.expression));
($__528 = statements).push.apply($__528, $traceurRuntime.spread(State.generateJump(enclosingFinally, machineEndState)));
return statements;
}}, {}, YieldState);
return {get ReturnState() {
return ReturnState;
}};
});
System.register("traceur@0.0.52/src/codegeneration/generator/GeneratorTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/generator/GeneratorTransformer";
var $__529 = Object.freeze(Object.defineProperties(["\n ", " = ", "[Symbol.iterator]();\n // received = void 0;\n $ctx.sent = void 0;\n // send = true; // roughly equivalent\n $ctx.action = 'next';\n\n for (;;) {\n ", " = ", "[$ctx.action]($ctx.sentIgnoreThrow);\n if (", ".done) {\n $ctx.sent = ", ".value;\n break;\n }\n ", ";\n }"], {raw: {value: Object.freeze(["\n ", " = ", "[Symbol.iterator]();\n // received = void 0;\n $ctx.sent = void 0;\n // send = true; // roughly equivalent\n $ctx.action = 'next';\n\n for (;;) {\n ", " = ", "[$ctx.action]($ctx.sentIgnoreThrow);\n if (", ".done) {\n $ctx.sent = ", ".value;\n break;\n }\n ", ";\n }"])}})),
$__530 = Object.freeze(Object.defineProperties(["$ctx.sentIgnoreThrow"], {raw: {value: Object.freeze(["$ctx.sentIgnoreThrow"])}})),
$__531 = Object.freeze(Object.defineProperties(["$ctx.sent"], {raw: {value: Object.freeze(["$ctx.sent"])}})),
$__532 = Object.freeze(Object.defineProperties(["$ctx.maybeThrow()"], {raw: {value: Object.freeze(["$ctx.maybeThrow()"])}})),
$__533 = Object.freeze(Object.defineProperties(["$traceurRuntime.createGeneratorInstance"], {raw: {value: Object.freeze(["$traceurRuntime.createGeneratorInstance"])}}));
var CPSTransformer = System.get("traceur@0.0.52/src/codegeneration/generator/CPSTransformer").CPSTransformer;
var $__535 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BINARY_EXPRESSION = $__535.BINARY_EXPRESSION,
YIELD_EXPRESSION = $__535.YIELD_EXPRESSION;
var $__536 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
BinaryExpression = $__536.BinaryExpression,
ExpressionStatement = $__536.ExpressionStatement;
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var ReturnState = System.get("traceur@0.0.52/src/codegeneration/generator/ReturnState").ReturnState;
var YieldState = System.get("traceur@0.0.52/src/codegeneration/generator/YieldState").YieldState;
var $__540 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
id = $__540.createIdentifierExpression,
createMemberExpression = $__540.createMemberExpression,
createUndefinedExpression = $__540.createUndefinedExpression,
createYieldStatement = $__540.createYieldStatement;
var $__541 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__541.parseExpression,
parseStatement = $__541.parseStatement,
parseStatements = $__541.parseStatements;
function isYieldAssign(tree) {
return tree.type === BINARY_EXPRESSION && tree.operator.isAssignmentOperator() && tree.right.type === YIELD_EXPRESSION && tree.left.isLeftHandSideExpression();
}
var YieldFinder = function YieldFinder() {
$traceurRuntime.defaultSuperCall(this, $YieldFinder.prototype, arguments);
};
var $YieldFinder = YieldFinder;
($traceurRuntime.createClass)(YieldFinder, {visitYieldExpression: function(tree) {
this.found = true;
}}, {}, FindInFunctionScope);
function scopeContainsYield(tree) {
return new YieldFinder(tree).found;
}
var GeneratorTransformer = function GeneratorTransformer(identifierGenerator, reporter) {
$traceurRuntime.superCall(this, $GeneratorTransformer.prototype, "constructor", [identifierGenerator, reporter]);
this.shouldAppendThrowCloseState_ = true;
};
var $GeneratorTransformer = GeneratorTransformer;
($traceurRuntime.createClass)(GeneratorTransformer, {
expressionNeedsStateMachine: function(tree) {
if (tree === null)
return false;
return scopeContainsYield(tree);
},
transformYieldExpression_: function(tree) {
var $__543;
var expression,
machine;
if (this.expressionNeedsStateMachine(tree.expression)) {
(($__543 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.expression)), expression = $__543.expression, machine = $__543.machine, $__543));
} else {
expression = this.transformAny(tree.expression);
if (!expression)
expression = createUndefinedExpression();
}
if (tree.isYieldFor)
return this.transformYieldForExpression_(expression, machine);
var startState = this.allocateState();
var fallThroughState = this.allocateState();
var yieldMachine = this.stateToStateMachine_(new YieldState(startState, fallThroughState, this.transformAny(expression)), fallThroughState);
if (machine)
yieldMachine = machine.append(yieldMachine);
if (this.shouldAppendThrowCloseState_)
yieldMachine = yieldMachine.append(this.createThrowCloseState_());
return yieldMachine;
},
transformYieldForExpression_: function(expression) {
var machine = arguments[1];
var gName = this.getTempIdentifier();
this.addMachineVariable(gName);
var g = id(gName);
var nextName = this.getTempIdentifier();
this.addMachineVariable(nextName);
var next = id(nextName);
var statements = parseStatements($__529, g, expression, next, g, next, next, createYieldStatement(createMemberExpression(next, 'value')));
var shouldAppendThrowCloseState = this.shouldAppendThrowCloseState_;
this.shouldAppendThrowCloseState_ = false;
statements = this.transformList(statements);
var yieldMachine = this.transformStatementList_(statements);
this.shouldAppendThrowCloseState_ = shouldAppendThrowCloseState;
if (machine)
yieldMachine = machine.append(yieldMachine);
return yieldMachine;
},
transformYieldExpression: function(tree) {
this.reporter.reportError(tree.location.start, 'Only \'a = yield b\' and \'var a = yield b\' currently supported.');
return tree;
},
transformYieldAssign_: function(tree) {
var shouldAppendThrowCloseState = this.shouldAppendThrowCloseState_;
this.shouldAppendThrowCloseState_ = false;
var machine = this.transformYieldExpression_(tree.right);
var left = this.transformAny(tree.left);
var sentExpression = tree.right.isYieldFor ? parseExpression($__530) : parseExpression($__531);
var statement = new ExpressionStatement(tree.location, new BinaryExpression(tree.location, left, tree.operator, sentExpression));
var assignMachine = this.statementToStateMachine_(statement);
this.shouldAppendThrowCloseState_ = shouldAppendThrowCloseState;
return machine.append(assignMachine);
},
createThrowCloseState_: function() {
return this.statementToStateMachine_(parseStatement($__532));
},
transformExpressionStatement: function(tree) {
var expression = tree.expression;
if (expression.type === YIELD_EXPRESSION)
return this.transformYieldExpression_(expression);
if (isYieldAssign(expression))
return this.transformYieldAssign_(expression);
if (this.expressionNeedsStateMachine(expression)) {
return this.expressionToStateMachine(expression).machine;
}
return $traceurRuntime.superCall(this, $GeneratorTransformer.prototype, "transformExpressionStatement", [tree]);
},
transformAwaitStatement: function(tree) {
this.reporter.reportError(tree.location.start, 'Generator function may not have an await statement.');
return tree;
},
transformReturnStatement: function(tree) {
var $__543;
var expression,
machine;
if (this.expressionNeedsStateMachine(tree.expression))
(($__543 = $traceurRuntime.assertObject(this.expressionToStateMachine(tree.expression)), expression = $__543.expression, machine = $__543.machine, $__543));
else
expression = tree.expression;
var startState = this.allocateState();
var fallThroughState = this.allocateState();
var returnMachine = this.stateToStateMachine_(new ReturnState(startState, fallThroughState, this.transformAny(expression)), fallThroughState);
if (machine)
return machine.append(returnMachine);
return returnMachine;
},
transformGeneratorBody: function(tree, name) {
var runtimeFunction = parseExpression($__533);
return this.transformCpsFunctionBody(tree, runtimeFunction, name);
}
}, {transformGeneratorBody: function(identifierGenerator, reporter, body, name) {
return new $GeneratorTransformer(identifierGenerator, reporter).transformGeneratorBody(body, name);
}}, CPSTransformer);
;
return {get GeneratorTransformer() {
return GeneratorTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/GeneratorTransformPass", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/GeneratorTransformPass";
var $__544 = Object.freeze(Object.defineProperties(["$traceurRuntime.initGeneratorFunction(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.initGeneratorFunction(", ")"])}})),
$__545 = Object.freeze(Object.defineProperties(["var ", " = ", ""], {raw: {value: Object.freeze(["var ", " = ", ""])}})),
$__546 = Object.freeze(Object.defineProperties(["$traceurRuntime.initGeneratorFunction(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.initGeneratorFunction(", ")"])}}));
var ArrowFunctionTransformer = System.get("traceur@0.0.52/src/codegeneration/ArrowFunctionTransformer").ArrowFunctionTransformer;
var AsyncTransformer = System.get("traceur@0.0.52/src/codegeneration/generator/AsyncTransformer").AsyncTransformer;
var ForInTransformPass = System.get("traceur@0.0.52/src/codegeneration/generator/ForInTransformPass").ForInTransformPass;
var GeneratorTransformer = System.get("traceur@0.0.52/src/codegeneration/generator/GeneratorTransformer").GeneratorTransformer;
var $__551 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__551.parseExpression,
parseStatement = $__551.parseStatement;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var FindInFunctionScope = System.get("traceur@0.0.52/src/codegeneration/FindInFunctionScope").FindInFunctionScope;
var $__554 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__554.AnonBlock,
FunctionDeclaration = $__554.FunctionDeclaration,
FunctionExpression = $__554.FunctionExpression;
var $__555 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createBindingIdentifier = $__555.createBindingIdentifier,
id = $__555.createIdentifierExpression,
createIdentifierToken = $__555.createIdentifierToken;
var transformOptions = System.get("traceur@0.0.52/src/Options").transformOptions;
var ForInFinder = function ForInFinder() {
$traceurRuntime.defaultSuperCall(this, $ForInFinder.prototype, arguments);
};
var $ForInFinder = ForInFinder;
($traceurRuntime.createClass)(ForInFinder, {visitForInStatement: function(tree) {
this.found = true;
}}, {}, FindInFunctionScope);
function needsTransform(tree) {
return transformOptions.generators && tree.isGenerator() || transformOptions.asyncFunctions && tree.isAsyncFunction();
}
var GeneratorTransformPass = function GeneratorTransformPass(identifierGenerator, reporter) {
$traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "constructor", [identifierGenerator]);
this.reporter_ = reporter;
this.inBlock_ = false;
};
var $GeneratorTransformPass = GeneratorTransformPass;
($traceurRuntime.createClass)(GeneratorTransformPass, {
transformFunctionDeclaration: function(tree) {
if (!needsTransform(tree))
return $traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "transformFunctionDeclaration", [tree]);
if (tree.isGenerator())
return this.transformGeneratorDeclaration_(tree);
return this.transformFunction_(tree, FunctionDeclaration, null);
},
transformGeneratorDeclaration_: function(tree) {
var nameIdExpression = id(tree.name.identifierToken);
var setupPrototypeExpression = parseExpression($__544, nameIdExpression);
var tmpVar = id(this.inBlock_ ? this.getTempIdentifier() : this.addTempVar(setupPrototypeExpression));
var funcDecl = this.transformFunction_(tree, FunctionDeclaration, tmpVar);
if (!this.inBlock_)
return funcDecl;
return new AnonBlock(null, [funcDecl, parseStatement($__545, tmpVar, setupPrototypeExpression)]);
},
transformFunctionExpression: function(tree) {
if (!needsTransform(tree))
return $traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "transformFunctionExpression", [tree]);
if (tree.isGenerator())
return this.transformGeneratorExpression_(tree);
return this.transformFunction_(tree, FunctionExpression, null);
},
transformGeneratorExpression_: function(tree) {
var name;
if (!tree.name) {
name = createIdentifierToken(this.getTempIdentifier());
tree = new FunctionExpression(tree.location, createBindingIdentifier(name), tree.functionKind, tree.parameterList, tree.typeAnnotation, tree.annotations, tree.body);
} else {
name = tree.name.identifierToken;
}
var functionExpression = this.transformFunction_(tree, FunctionExpression, id(name));
return parseExpression($__546, functionExpression);
},
transformFunction_: function(tree, constructor, nameExpression) {
var body = $traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "transformAny", [tree.body]);
var finder = new ForInFinder(body);
if (finder.found) {
body = new ForInTransformPass(this.identifierGenerator).transformAny(body);
}
if (transformOptions.generators && tree.isGenerator()) {
body = GeneratorTransformer.transformGeneratorBody(this.identifierGenerator, this.reporter_, body, nameExpression);
} else if (transformOptions.asyncFunctions && tree.isAsyncFunction()) {
body = AsyncTransformer.transformAsyncBody(this.identifierGenerator, this.reporter_, body);
}
var functionKind = null;
return new constructor(tree.location, tree.name, functionKind, tree.parameterList, tree.typeAnnotation || null, tree.annotations || null, body);
},
transformArrowFunctionExpression: function(tree) {
if (!tree.isAsyncFunction())
return $traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "transformArrowFunctionExpression", [tree]);
return this.transformAny(ArrowFunctionTransformer.transform(this, tree));
},
transformBlock: function(tree) {
var inBlock = this.inBlock_;
this.inBlock_ = true;
var rv = $traceurRuntime.superCall(this, $GeneratorTransformPass.prototype, "transformBlock", [tree]);
this.inBlock_ = inBlock;
return rv;
}
}, {}, TempVarTransformer);
return {get GeneratorTransformPass() {
return GeneratorTransformPass;
}};
});
System.register("traceur@0.0.52/src/codegeneration/InlineModuleTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/InlineModuleTransformer";
var VAR = System.get("traceur@0.0.52/src/syntax/TokenType").VAR;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var ModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/ModuleTransformer").ModuleTransformer;
var $__561 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createBindingIdentifier = $__561.createBindingIdentifier,
createEmptyStatement = $__561.createEmptyStatement,
createFunctionBody = $__561.createFunctionBody,
createImmediatelyInvokedFunctionExpression = $__561.createImmediatelyInvokedFunctionExpression,
createScopedExpression = $__561.createScopedExpression,
createVariableStatement = $__561.createVariableStatement;
var globalThis = System.get("traceur@0.0.52/src/codegeneration/globalThis").default;
var scopeContainsThis = System.get("traceur@0.0.52/src/codegeneration/scopeContainsThis").default;
var InlineModuleTransformer = function InlineModuleTransformer() {
$traceurRuntime.defaultSuperCall(this, $InlineModuleTransformer.prototype, arguments);
};
var $InlineModuleTransformer = InlineModuleTransformer;
($traceurRuntime.createClass)(InlineModuleTransformer, {
wrapModule: function(statements) {
assert(this.moduleName);
var idName = this.getTempVarNameForModuleName(this.moduleName);
var body = createFunctionBody(statements);
var moduleExpression;
if (statements.some(scopeContainsThis)) {
moduleExpression = createScopedExpression(body, globalThis());
} else {
moduleExpression = createImmediatelyInvokedFunctionExpression(body);
}
return [createVariableStatement(VAR, idName, moduleExpression)];
},
transformNamedExport: function(tree) {
return createEmptyStatement();
},
transformModuleSpecifier: function(tree) {
return createBindingIdentifier(this.getTempVarNameForModuleSpecifier(tree));
}
}, {}, ModuleTransformer);
return {get InlineModuleTransformer() {
return InlineModuleTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/InstantiateModuleTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/InstantiateModuleTransformer";
var $__565 = Object.freeze(Object.defineProperties(["", " = ", ""], {raw: {value: Object.freeze(["", " = ", ""])}})),
$__566 = Object.freeze(Object.defineProperties(["$__export(", ", ", ")"], {raw: {value: Object.freeze(["$__export(", ", ", ")"])}})),
$__567 = Object.freeze(Object.defineProperties(["($__export(", ", ", " + 1), ", ")"], {raw: {value: Object.freeze(["($__export(", ", ", " + 1), ", ")"])}})),
$__568 = Object.freeze(Object.defineProperties(["$__export(", ", ", ")}"], {raw: {value: Object.freeze(["$__export(", ", ", ")}"])}})),
$__569 = Object.freeze(Object.defineProperties(["System.register(", ", ", ", function($__export) {\n ", "\n });"], {raw: {value: Object.freeze(["System.register(", ", ", ", function($__export) {\n ", "\n });"])}})),
$__570 = Object.freeze(Object.defineProperties(["System.register(", ", function($__export) {\n ", "\n });"], {raw: {value: Object.freeze(["System.register(", ", function($__export) {\n ", "\n });"])}})),
$__571 = Object.freeze(Object.defineProperties(["", " = m.", ";"], {raw: {value: Object.freeze(["", " = m.", ";"])}})),
$__572 = Object.freeze(Object.defineProperties(["$__export(", ", m.", ");"], {raw: {value: Object.freeze(["$__export(", ", m.", ");"])}})),
$__573 = Object.freeze(Object.defineProperties(["", " = m;"], {raw: {value: Object.freeze(["", " = m;"])}})),
$__574 = Object.freeze(Object.defineProperties(["\n Object.keys(m).forEach(function(p) {\n $__export(p, m[p]);\n });\n "], {raw: {value: Object.freeze(["\n Object.keys(m).forEach(function(p) {\n $__export(p, m[p]);\n });\n "])}})),
$__575 = Object.freeze(Object.defineProperties(["function(m) {\n ", "\n }"], {raw: {value: Object.freeze(["function(m) {\n ", "\n }"])}})),
$__576 = Object.freeze(Object.defineProperties(["function(m) {}"], {raw: {value: Object.freeze(["function(m) {}"])}})),
$__577 = Object.freeze(Object.defineProperties(["\n $__export(", ", ", ")\n "], {raw: {value: Object.freeze(["\n $__export(", ", ", ")\n "])}})),
$__578 = Object.freeze(Object.defineProperties(["return {\n setters: ", ",\n execute: ", "\n }"], {raw: {value: Object.freeze(["return {\n setters: ", ",\n execute: ", "\n }"])}})),
$__579 = Object.freeze(Object.defineProperties(["$__export(", ", ", ")"], {raw: {value: Object.freeze(["$__export(", ", ", ")"])}})),
$__580 = Object.freeze(Object.defineProperties(["$__export(", ", ", ")"], {raw: {value: Object.freeze(["$__export(", ", ", ")"])}})),
$__581 = Object.freeze(Object.defineProperties(["var ", " = $__export(", ", ", ");"], {raw: {value: Object.freeze(["var ", " = $__export(", ", ", ");"])}})),
$__582 = Object.freeze(Object.defineProperties(["var ", ";"], {raw: {value: Object.freeze(["var ", ";"])}})),
$__583 = Object.freeze(Object.defineProperties(["$__export('default', ", ");"], {raw: {value: Object.freeze(["$__export('default', ", ");"])}})),
$__584 = Object.freeze(Object.defineProperties(["$__export(", ", ", ");"], {raw: {value: Object.freeze(["$__export(", ", ", ");"])}})),
$__585 = Object.freeze(Object.defineProperties(["var ", ";"], {raw: {value: Object.freeze(["var ", ";"])}}));
var $__586 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
AnonBlock = $__586.AnonBlock,
ArrayLiteralExpression = $__586.ArrayLiteralExpression,
ClassExpression = $__586.ClassExpression,
CommaExpression = $__586.CommaExpression,
ExpressionStatement = $__586.ExpressionStatement;
var $__587 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
FUNCTION_DECLARATION = $__587.FUNCTION_DECLARATION,
IDENTIFIER_EXPRESSION = $__587.IDENTIFIER_EXPRESSION,
IMPORT_SPECIFIER_SET = $__587.IMPORT_SPECIFIER_SET;
var ScopeTransformer = System.get("traceur@0.0.52/src/codegeneration/ScopeTransformer").ScopeTransformer;
var $__589 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
id = $__589.createIdentifierExpression,
createIdentifierToken = $__589.createIdentifierToken,
createVariableStatement = $__589.createVariableStatement,
createVariableDeclaration = $__589.createVariableDeclaration,
createVariableDeclarationList = $__589.createVariableDeclarationList;
var ModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/ModuleTransformer").ModuleTransformer;
var $__591 = System.get("traceur@0.0.52/src/syntax/TokenType"),
MINUS_MINUS = $__591.MINUS_MINUS,
PLUS_PLUS = $__591.PLUS_PLUS,
VAR = $__591.VAR;
var $__592 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__592.parseExpression,
parseStatement = $__592.parseStatement,
parseStatements = $__592.parseStatements;
var HoistVariablesTransformer = System.get("traceur@0.0.52/src/codegeneration/HoistVariablesTransformer").default;
var $__594 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createFunctionExpression = $__594.createFunctionExpression,
createEmptyParameterList = $__594.createEmptyParameterList,
createFunctionBody = $__594.createFunctionBody;
var DeclarationExtractionTransformer = function DeclarationExtractionTransformer() {
$traceurRuntime.superCall(this, $DeclarationExtractionTransformer.prototype, "constructor", []);
this.declarations_ = [];
};
var $DeclarationExtractionTransformer = DeclarationExtractionTransformer;
($traceurRuntime.createClass)(DeclarationExtractionTransformer, {
getDeclarationStatements: function() {
return $traceurRuntime.spread([this.getVariableStatement()], this.declarations_);
},
addDeclaration: function(tree) {
this.declarations_.push(tree);
},
transformFunctionDeclaration: function(tree) {
this.addDeclaration(tree);
return new AnonBlock(null, []);
},
transformClassDeclaration: function(tree) {
this.addVariable(tree.name.identifierToken.value);
tree = new ClassExpression(tree.location, tree.name, tree.superClass, tree.elements, tree.annotations);
return parseStatement($__565, tree.name.identifierToken, tree);
}
}, {}, HoistVariablesTransformer);
var InsertBindingAssignmentTransformer = function InsertBindingAssignmentTransformer(exportName, bindingName) {
$traceurRuntime.superCall(this, $InsertBindingAssignmentTransformer.prototype, "constructor", [bindingName]);
this.bindingName_ = bindingName;
this.exportName_ = exportName;
};
var $InsertBindingAssignmentTransformer = InsertBindingAssignmentTransformer;
($traceurRuntime.createClass)(InsertBindingAssignmentTransformer, {
matchesBindingName_: function(binding) {
return binding.type === IDENTIFIER_EXPRESSION && binding.identifierToken.value == this.bindingName_;
},
transformUnaryExpression: function(tree) {
if (!this.matchesBindingName_(tree.operand))
return $traceurRuntime.superCall(this, $InsertBindingAssignmentTransformer.prototype, "transformUnaryExpression", [tree]);
var operatorType = tree.operator.type;
if (operatorType !== PLUS_PLUS && operatorType !== MINUS_MINUS)
return $traceurRuntime.superCall(this, $InsertBindingAssignmentTransformer.prototype, "transformUnaryExpression", [tree]);
var operand = this.transformAny(tree.operand);
if (operand !== tree.operand)
tree = new UnaryExpression(tree.location, tree.operator, operand);
return parseExpression($__566, this.exportName_, tree);
},
transformPostfixExpression: function(tree) {
tree = $traceurRuntime.superCall(this, $InsertBindingAssignmentTransformer.prototype, "transformPostfixExpression", [tree]);
if (!this.matchesBindingName_(tree.operand))
return tree;
return parseExpression($__567, this.exportName_, tree.operand, tree);
},
transformBinaryExpression: function(tree) {
tree = $traceurRuntime.superCall(this, $InsertBindingAssignmentTransformer.prototype, "transformBinaryExpression", [tree]);
if (!tree.operator.isAssignmentOperator())
return tree;
if (!this.matchesBindingName_(tree.left))
return tree;
return parseExpression($__568, this.exportName_, tree);
}
}, {}, ScopeTransformer);
var InstantiateModuleTransformer = function InstantiateModuleTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $InstantiateModuleTransformer.prototype, "constructor", [identifierGenerator]);
this.inExport_ = false;
this.curDepIndex_ = null;
this.dependencies = [];
this.externalExportBindings = [];
this.importBindings = [];
this.localExportBindings = [];
this.functionDeclarations = [];
this.moduleBindings = [];
this.exportStarBindings = [];
};
var $InstantiateModuleTransformer = InstantiateModuleTransformer;
($traceurRuntime.createClass)(InstantiateModuleTransformer, {
wrapModule: function(statements) {
if (this.moduleName) {
return parseStatements($__569, this.moduleName, this.dependencies, statements);
} else {
return parseStatements($__570, this.dependencies, statements);
}
},
appendExportStatement: function(statements) {
var $__595 = this;
var declarationExtractionTransformer = new DeclarationExtractionTransformer();
this.localExportBindings.forEach((function(binding) {
statements = new InsertBindingAssignmentTransformer(binding.exportName, binding.localName).transformList(statements);
}));
var executionStatements = statements.map((function(statement) {
return declarationExtractionTransformer.transformAny(statement);
}));
var executionFunction = createFunctionExpression(createEmptyParameterList(), createFunctionBody(executionStatements));
var declarationStatements = declarationExtractionTransformer.getDeclarationStatements();
var setterFunctions = this.dependencies.map((function(dep, index) {
var importBindings = $__595.importBindings[index];
var externalExportBindings = $__595.externalExportBindings[index];
var exportStarBinding = $__595.exportStarBindings[index];
var moduleBinding = $__595.moduleBindings[index];
var setterStatements = [];
if (importBindings) {
importBindings.forEach((function(binding) {
setterStatements.push(parseStatement($__571, createIdentifierToken(binding.variableName), binding.exportName));
}));
}
if (externalExportBindings) {
externalExportBindings.forEach((function(binding) {
setterStatements.push(parseStatement($__572, binding.exportName, binding.importName));
}));
}
if (moduleBinding) {
setterStatements.push(parseStatement($__573, id(moduleBinding)));
}
if (exportStarBinding) {
setterStatements = setterStatements.concat(parseStatements($__574));
}
if (setterStatements.length) {
return parseExpression($__575, setterStatements);
} else {
return parseExpression($__576);
}
}));
declarationStatements = declarationStatements.concat(this.functionDeclarations.map((function(binding) {
return parseStatement($__577, binding.exportName, createIdentifierToken(binding.functionName));
})));
declarationStatements.push(parseStatement($__578, new ArrayLiteralExpression(null, setterFunctions), executionFunction));
return declarationStatements;
},
addLocalExportBinding: function(exportName) {
var localName = arguments[1] !== (void 0) ? arguments[1] : exportName;
this.localExportBindings.push({
exportName: exportName,
localName: localName
});
},
addImportBinding: function(depIndex, variableName, exportName) {
this.importBindings[depIndex] = this.importBindings[depIndex] || [];
this.importBindings[depIndex].push({
variableName: variableName,
exportName: exportName
});
},
addExternalExportBinding: function(depIndex, exportName, importName) {
this.externalExportBindings[depIndex] = this.externalExportBindings[depIndex] || [];
this.externalExportBindings[depIndex].push({
exportName: exportName,
importName: importName
});
},
addExportStarBinding: function(depIndex) {
this.exportStarBindings[depIndex] = true;
},
addModuleBinding: function(depIndex, variableName) {
this.moduleBindings[depIndex] = variableName;
},
addExportFunction: function(exportName) {
var functionName = arguments[1] !== (void 0) ? arguments[1] : exportName;
this.functionDeclarations.push({
exportName: exportName,
functionName: functionName
});
},
getOrCreateDependencyIndex: function(moduleSpecifier) {
var name = moduleSpecifier.token.processedValue;
var depIndex = this.dependencies.indexOf(name);
if (depIndex == -1) {
depIndex = this.dependencies.length;
this.dependencies.push(name);
}
return depIndex;
},
transformExportDeclaration: function(tree) {
this.inExport_ = true;
if (tree.declaration.moduleSpecifier) {
this.curDepIndex_ = this.getOrCreateDependencyIndex(tree.declaration.moduleSpecifier);
} else {
this.curDepIndex_ = null;
}
var transformed = this.transformAny(tree.declaration);
this.inExport_ = false;
return transformed;
},
transformVariableStatement: function(tree) {
var $__595 = this;
if (!this.inExport_)
return $traceurRuntime.superCall(this, $InstantiateModuleTransformer.prototype, "transformVariableStatement", [tree]);
this.inExport_ = false;
return createVariableStatement(createVariableDeclarationList(VAR, tree.declarations.declarations.map((function(declaration) {
var varName = declaration.lvalue.identifierToken.value;
var initializer;
$__595.addLocalExportBinding(varName);
if (declaration.initializer)
initializer = parseExpression($__579, varName, $__595.transformAny(declaration.initializer));
else
initializer = parseExpression($__580, varName, id(varName));
return createVariableDeclaration(varName, initializer);
}))));
},
transformExportStar: function(tree) {
this.inExport_ = false;
this.addExportStarBinding(this.curDepIndex_);
return new AnonBlock(null, []);
},
transformClassDeclaration: function(tree) {
if (!this.inExport_)
return $traceurRuntime.superCall(this, $InstantiateModuleTransformer.prototype, "transformClassDeclaration", [tree]);
this.inExport_ = false;
var name = this.transformAny(tree.name);
var superClass = this.transformAny(tree.superClass);
var elements = this.transformList(tree.elements);
var annotations = this.transformList(tree.annotations);
var varName = name.identifierToken.value;
var classExpression = new ClassExpression(tree.location, name, superClass, elements, annotations);
this.addLocalExportBinding(varName);
return parseStatement($__581, varName, varName, classExpression);
},
transformFunctionDeclaration: function(tree) {
if (this.inExport_) {
this.addLocalExportBinding(tree.name.identifierToken.value);
this.addExportFunction(tree.name.identifierToken.value);
this.inExport_ = false;
}
return $traceurRuntime.superCall(this, $InstantiateModuleTransformer.prototype, "transformFunctionDeclaration", [tree]);
},
transformNamedExport: function(tree) {
this.transformAny(tree.moduleSpecifier);
var specifierSet = this.transformAny(tree.specifierSet);
if (this.curDepIndex_ === null) {
return specifierSet;
} else {
return new AnonBlock(null, []);
}
},
transformImportDeclaration: function(tree) {
this.curDepIndex_ = this.getOrCreateDependencyIndex(tree.moduleSpecifier);
var initializer = this.transformAny(tree.moduleSpecifier);
if (!tree.importClause)
return new AnonBlock(null, []);
var importClause = this.transformAny(tree.importClause);
if (tree.importClause.type === IMPORT_SPECIFIER_SET) {
return importClause;
} else {
this.addImportBinding(this.curDepIndex_, tree.importClause.binding.identifierToken.value, 'default');
return parseStatement($__582, tree.importClause.binding.identifierToken.value);
}
return new AnonBlock(null, []);
},
transformImportSpecifierSet: function(tree) {
return createVariableStatement(createVariableDeclarationList(VAR, this.transformList(tree.specifiers)));
},
transformExportDefault: function(tree) {
var expression = this.transformAny(tree.expression);
this.addLocalExportBinding('default');
if (expression.type === FUNCTION_DECLARATION) {
this.addExportFunction('default', expression.name.identifierToken.value);
return expression;
} else {
return parseStatement($__583, expression);
}
},
transformExportSpecifier: function(tree) {
var exportName;
var bindingName;
if (tree.rhs) {
exportName = tree.rhs.value;
bindingName = tree.lhs.value;
} else {
exportName = tree.lhs.value;
bindingName = tree.lhs.value;
}
if (this.curDepIndex_ !== null) {
this.addExternalExportBinding(this.curDepIndex_, exportName, bindingName);
} else {
this.addLocalExportBinding(exportName, bindingName);
return parseExpression($__584, exportName, id(bindingName));
}
},
transformExportSpecifierSet: function(tree) {
var specifiers = this.transformList(tree.specifiers);
return new ExpressionStatement(tree.location, new CommaExpression(tree.location, specifiers.filter((function(specifier) {
return specifier;
}))));
},
transformImportSpecifier: function(tree) {
var importName;
var localBinding;
if (tree.rhs) {
localBinding = tree.rhs;
importName = tree.lhs.value;
} else {
localBinding = tree.lhs;
importName = tree.lhs.value;
}
this.addImportBinding(this.curDepIndex_, localBinding.value, importName);
return createVariableDeclaration(localBinding);
},
transformModuleDeclaration: function(tree) {
this.transformAny(tree.expression);
this.addModuleBinding(this.curDepIndex_, tree.identifier.value);
return parseStatement($__585, tree.identifier.value);
},
transformModuleSpecifier: function(tree) {
this.curDepIndex_ = this.getOrCreateDependencyIndex(tree);
return tree;
}
}, {}, ModuleTransformer);
return {get InstantiateModuleTransformer() {
return InstantiateModuleTransformer;
}};
});
System.register("traceur@0.0.52/src/outputgeneration/ParseTreeWriter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/outputgeneration/ParseTreeWriter";
var $__597 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BLOCK = $__597.BLOCK,
CLASS_DECLARATION = $__597.CLASS_DECLARATION,
FUNCTION_DECLARATION = $__597.FUNCTION_DECLARATION,
IF_STATEMENT = $__597.IF_STATEMENT,
LITERAL_EXPRESSION = $__597.LITERAL_EXPRESSION,
POSTFIX_EXPRESSION = $__597.POSTFIX_EXPRESSION,
UNARY_EXPRESSION = $__597.UNARY_EXPRESSION;
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var $__599 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
AS = $__599.AS,
ASYNC = $__599.ASYNC,
AWAIT = $__599.AWAIT,
FROM = $__599.FROM,
GET = $__599.GET,
OF = $__599.OF,
MODULE = $__599.MODULE,
SET = $__599.SET;
var $__600 = System.get("traceur@0.0.52/src/syntax/Scanner"),
isIdentifierPart = $__600.isIdentifierPart,
isWhitespace = $__600.isWhitespace;
var $__601 = System.get("traceur@0.0.52/src/syntax/TokenType"),
ARROW = $__601.ARROW,
AT = $__601.AT,
BACK_QUOTE = $__601.BACK_QUOTE,
BREAK = $__601.BREAK,
CASE = $__601.CASE,
CATCH = $__601.CATCH,
CLASS = $__601.CLASS,
CLOSE_CURLY = $__601.CLOSE_CURLY,
CLOSE_PAREN = $__601.CLOSE_PAREN,
CLOSE_SQUARE = $__601.CLOSE_SQUARE,
COLON = $__601.COLON,
COMMA = $__601.COMMA,
CONTINUE = $__601.CONTINUE,
DEBUGGER = $__601.DEBUGGER,
DEFAULT = $__601.DEFAULT,
DO = $__601.DO,
DOT_DOT_DOT = $__601.DOT_DOT_DOT,
ELSE = $__601.ELSE,
EQUAL = $__601.EQUAL,
EXPORT = $__601.EXPORT,
EXTENDS = $__601.EXTENDS,
FINALLY = $__601.FINALLY,
FOR = $__601.FOR,
FUNCTION = $__601.FUNCTION,
IF = $__601.IF,
IMPORT = $__601.IMPORT,
IN = $__601.IN,
MINUS = $__601.MINUS,
MINUS_MINUS = $__601.MINUS_MINUS,
NEW = $__601.NEW,
NUMBER = $__601.NUMBER,
OPEN_CURLY = $__601.OPEN_CURLY,
OPEN_PAREN = $__601.OPEN_PAREN,
OPEN_SQUARE = $__601.OPEN_SQUARE,
PERIOD = $__601.PERIOD,
PLUS = $__601.PLUS,
PLUS_PLUS = $__601.PLUS_PLUS,
QUESTION = $__601.QUESTION,
RETURN = $__601.RETURN,
SEMI_COLON = $__601.SEMI_COLON,
STAR = $__601.STAR,
STATIC = $__601.STATIC,
SUPER = $__601.SUPER,
SWITCH = $__601.SWITCH,
THIS = $__601.THIS,
THROW = $__601.THROW,
TRY = $__601.TRY,
WHILE = $__601.WHILE,
WITH = $__601.WITH,
YIELD = $__601.YIELD;
var NEW_LINE = '\n';
var LINE_LENGTH = 80;
var ParseTreeWriter = function ParseTreeWriter() {
var $__604,
$__605,
$__606;
var $__603 = $traceurRuntime.assertObject(arguments[0] !== (void 0) ? arguments[0] : {}),
highlighted = ($__604 = $__603.highlighted) === void 0 ? false : $__604,
showLineNumbers = ($__605 = $__603.showLineNumbers) === void 0 ? false : $__605,
prettyPrint = ($__606 = $__603.prettyPrint) === void 0 ? true : $__606;
$traceurRuntime.superCall(this, $ParseTreeWriter.prototype, "constructor", []);
this.highlighted_ = highlighted;
this.showLineNumbers_ = showLineNumbers;
this.prettyPrint_ = prettyPrint;
this.result_ = '';
this.currentLine_ = '';
this.currentLineComment_ = null;
this.indentDepth_ = 0;
this.currentParameterTypeAnnotation_ = null;
};
var $ParseTreeWriter = ParseTreeWriter;
($traceurRuntime.createClass)(ParseTreeWriter, {
toString: function() {
if (this.currentLine_.length > 0) {
this.result_ += this.currentLine_;
this.currentLine_ = '';
}
return this.result_;
},
visitAny: function(tree) {
if (!tree) {
return;
}
if (tree === this.highlighted_) {
this.write_('\x1B[41m');
}
if (tree.location !== null && tree.location.start !== null && this.showLineNumbers_) {
var line = tree.location.start.line + 1;
var column = tree.location.start.column;
this.currentLineComment_ = ("Line: " + line + "." + column);
}
$traceurRuntime.superCall(this, $ParseTreeWriter.prototype, "visitAny", [tree]);
if (tree === this.highlighted_) {
this.write_('\x1B[0m');
}
},
visitAnnotation: function(tree) {
this.write_(AT);
this.visitAny(tree.name);
if (tree.args !== null) {
this.write_(OPEN_PAREN);
this.writeList_(tree.args, COMMA, false);
this.write_(CLOSE_PAREN);
}
},
visitArgumentList: function(tree) {
this.write_(OPEN_PAREN);
this.writeList_(tree.args, COMMA, false);
this.write_(CLOSE_PAREN);
},
visitArrayComprehension: function(tree) {
this.write_(OPEN_SQUARE);
this.visitList(tree.comprehensionList);
this.visitAny(tree.expression);
this.write_(CLOSE_SQUARE);
},
visitArrayLiteralExpression: function(tree) {
this.write_(OPEN_SQUARE);
this.writeList_(tree.elements, COMMA, false);
this.write_(CLOSE_SQUARE);
},
visitArrayPattern: function(tree) {
this.write_(OPEN_SQUARE);
this.writeList_(tree.elements, COMMA, false);
this.write_(CLOSE_SQUARE);
},
visitArrowFunctionExpression: function(tree) {
if (tree.functionKind) {
this.write_(tree.functionKind);
this.writeSpace_();
}
this.write_(OPEN_PAREN);
this.visitAny(tree.parameterList);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.write_(ARROW);
this.writeSpace_();
this.visitAny(tree.body);
},
visitAssignmentElement: function(tree) {
this.visitAny(tree.assignment);
if (tree.initializer) {
this.writeSpace_();
this.write_(EQUAL);
this.writeSpace_();
this.visitAny(tree.initializer);
}
},
visitAwaitExpression: function(tree) {
this.write_(AWAIT);
this.writeSpace_();
this.visitAny(tree.expression);
},
visitBinaryExpression: function(tree) {
var left = tree.left;
this.visitAny(left);
var operator = tree.operator;
if (left.type === POSTFIX_EXPRESSION && requiresSpaceBetween(left.operator.type, operator.type)) {
this.writeRequiredSpace_();
} else {
this.writeSpace_();
}
this.write_(operator);
var right = tree.right;
if (right.type === UNARY_EXPRESSION && requiresSpaceBetween(operator.type, right.operator.type)) {
this.writeRequiredSpace_();
} else {
this.writeSpace_();
}
this.visitAny(right);
},
visitBindingElement: function(tree) {
var typeAnnotation = this.currentParameterTypeAnnotation_;
this.currentParameterTypeAnnotation_ = null;
this.visitAny(tree.binding);
this.writeTypeAnnotation_(typeAnnotation);
if (tree.initializer) {
this.writeSpace_();
this.write_(EQUAL);
this.writeSpace_();
this.visitAny(tree.initializer);
}
},
visitBindingIdentifier: function(tree) {
this.write_(tree.identifierToken);
},
visitBlock: function(tree) {
this.write_(OPEN_CURLY);
this.writelnList_(tree.statements);
this.write_(CLOSE_CURLY);
},
visitBreakStatement: function(tree) {
this.write_(BREAK);
if (tree.name !== null) {
this.writeSpace_();
this.write_(tree.name);
}
this.write_(SEMI_COLON);
},
visitCallExpression: function(tree) {
this.visitAny(tree.operand);
this.visitAny(tree.args);
},
visitCaseClause: function(tree) {
this.write_(CASE);
this.writeSpace_();
this.visitAny(tree.expression);
this.write_(COLON);
this.indentDepth_++;
this.writelnList_(tree.statements);
this.indentDepth_--;
},
visitCatch: function(tree) {
this.write_(CATCH);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.binding);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.visitAny(tree.catchBody);
},
visitClassShared_: function(tree) {
this.writeAnnotations_(tree.annotations);
this.write_(CLASS);
this.writeSpace_();
this.visitAny(tree.name);
if (tree.superClass !== null) {
this.writeSpace_();
this.write_(EXTENDS);
this.writeSpace_();
this.visitAny(tree.superClass);
}
this.writeSpace_();
this.write_(OPEN_CURLY);
this.writelnList_(tree.elements);
this.write_(CLOSE_CURLY);
},
visitClassDeclaration: function(tree) {
this.visitClassShared_(tree);
},
visitClassExpression: function(tree) {
this.visitClassShared_(tree);
},
visitCommaExpression: function(tree) {
this.writeList_(tree.expressions, COMMA, false);
},
visitComprehensionFor: function(tree) {
this.write_(FOR);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.left);
this.writeSpace_();
this.write_(OF);
this.writeSpace_();
this.visitAny(tree.iterator);
this.write_(CLOSE_PAREN);
this.writeSpace_();
},
visitComprehensionIf: function(tree) {
this.write_(IF);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.expression);
this.write_(CLOSE_PAREN);
this.writeSpace_();
},
visitComputedPropertyName: function(tree) {
this.write_(OPEN_SQUARE);
this.visitAny(tree.expression);
this.write_(CLOSE_SQUARE);
},
visitConditionalExpression: function(tree) {
this.visitAny(tree.condition);
this.writeSpace_();
this.write_(QUESTION);
this.writeSpace_();
this.visitAny(tree.left);
this.writeSpace_();
this.write_(COLON);
this.writeSpace_();
this.visitAny(tree.right);
},
visitContinueStatement: function(tree) {
this.write_(CONTINUE);
if (tree.name !== null) {
this.writeSpace_();
this.write_(tree.name);
}
this.write_(SEMI_COLON);
},
visitCoverInitializedName: function(tree) {
this.write_(tree.name);
this.writeSpace_();
this.write_(tree.equalToken);
this.writeSpace_();
this.visitAny(tree.initializer);
},
visitDebuggerStatement: function(tree) {
this.write_(DEBUGGER);
this.write_(SEMI_COLON);
},
visitDefaultClause: function(tree) {
this.write_(DEFAULT);
this.write_(COLON);
this.indentDepth_++;
this.writelnList_(tree.statements);
this.indentDepth_--;
},
visitDoWhileStatement: function(tree) {
this.write_(DO);
this.visitAnyBlockOrIndent_(tree.body);
this.writeSpace_();
this.write_(WHILE);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.condition);
this.write_(CLOSE_PAREN);
this.write_(SEMI_COLON);
},
visitEmptyStatement: function(tree) {
this.write_(SEMI_COLON);
},
visitExportDeclaration: function(tree) {
this.writeAnnotations_(tree.annotations);
this.write_(EXPORT);
this.writeSpace_();
this.visitAny(tree.declaration);
},
visitExportDefault: function(tree) {
this.write_(DEFAULT);
this.writeSpace_();
this.visitAny(tree.expression);
switch (tree.expression.type) {
case CLASS_DECLARATION:
case FUNCTION_DECLARATION:
break;
default:
this.write_(SEMI_COLON);
}
},
visitNamedExport: function(tree) {
this.visitAny(tree.specifierSet);
if (tree.moduleSpecifier) {
this.writeSpace_();
this.write_(FROM);
this.writeSpace_();
this.visitAny(tree.moduleSpecifier);
}
this.write_(SEMI_COLON);
},
visitExportSpecifier: function(tree) {
this.write_(tree.lhs);
if (tree.rhs) {
this.writeSpace_();
this.write_(AS);
this.writeSpace_();
this.write_(tree.rhs);
}
},
visitExportSpecifierSet: function(tree) {
this.write_(OPEN_CURLY);
this.writeList_(tree.specifiers, COMMA, false);
this.write_(CLOSE_CURLY);
},
visitExportStar: function(tree) {
this.write_(STAR);
},
visitExpressionStatement: function(tree) {
this.visitAny(tree.expression);
this.write_(SEMI_COLON);
},
visitFinally: function(tree) {
this.write_(FINALLY);
this.writeSpace_();
this.visitAny(tree.block);
},
visitForOfStatement: function(tree) {
this.write_(FOR);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.initializer);
this.writeSpace_();
this.write_(OF);
this.writeSpace_();
this.visitAny(tree.collection);
this.write_(CLOSE_PAREN);
this.visitAnyBlockOrIndent_(tree.body);
},
visitForInStatement: function(tree) {
this.write_(FOR);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.initializer);
this.writeSpace_();
this.write_(IN);
this.writeSpace_();
this.visitAny(tree.collection);
this.write_(CLOSE_PAREN);
this.visitAnyBlockOrIndent_(tree.body);
},
visitForStatement: function(tree) {
this.write_(FOR);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.initializer);
this.write_(SEMI_COLON);
this.writeSpace_();
this.visitAny(tree.condition);
this.write_(SEMI_COLON);
this.writeSpace_();
this.visitAny(tree.increment);
this.write_(CLOSE_PAREN);
this.visitAnyBlockOrIndent_(tree.body);
},
visitFormalParameterList: function(tree) {
var first = true;
for (var i = 0; i < tree.parameters.length; i++) {
var parameter = tree.parameters[i];
if (first) {
first = false;
} else {
this.write_(COMMA);
this.writeSpace_();
}
this.visitAny(parameter);
}
},
visitFormalParameter: function(tree) {
this.writeAnnotations_(tree.annotations, false);
this.currentParameterTypeAnnotation_ = tree.typeAnnotation;
this.visitAny(tree.parameter);
this.currentParameterTypeAnnotation_ = null;
},
visitFunctionBody: function(tree) {
this.write_(OPEN_CURLY);
this.writelnList_(tree.statements);
this.write_(CLOSE_CURLY);
},
visitFunctionDeclaration: function(tree) {
this.visitFunction_(tree);
},
visitFunctionExpression: function(tree) {
this.visitFunction_(tree);
},
visitFunction_: function(tree) {
this.writeAnnotations_(tree.annotations);
if (tree.isAsyncFunction())
this.write_(tree.functionKind);
this.write_(FUNCTION);
if (tree.isGenerator())
this.write_(tree.functionKind);
if (tree.name) {
this.writeSpace_();
this.visitAny(tree.name);
}
this.write_(OPEN_PAREN);
this.visitAny(tree.parameterList);
this.write_(CLOSE_PAREN);
this.writeTypeAnnotation_(tree.typeAnnotation);
this.writeSpace_();
this.visitAny(tree.body);
},
visitGeneratorComprehension: function(tree) {
this.write_(OPEN_PAREN);
this.visitList(tree.comprehensionList);
this.visitAny(tree.expression);
this.write_(CLOSE_PAREN);
},
visitGetAccessor: function(tree) {
this.writeAnnotations_(tree.annotations);
if (tree.isStatic) {
this.write_(STATIC);
this.writeSpace_();
}
this.write_(GET);
this.writeSpace_();
this.visitAny(tree.name);
this.write_(OPEN_PAREN);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.writeTypeAnnotation_(tree.typeAnnotation);
this.visitAny(tree.body);
},
visitIdentifierExpression: function(tree) {
this.write_(tree.identifierToken);
},
visitIfStatement: function(tree) {
this.write_(IF);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.condition);
this.write_(CLOSE_PAREN);
this.visitAnyBlockOrIndent_(tree.ifClause);
if (tree.elseClause) {
if (tree.ifClause.type === BLOCK)
this.writeSpace_();
this.write_(ELSE);
if (tree.elseClause.type === IF_STATEMENT) {
this.writeSpace_();
this.visitAny(tree.elseClause);
} else {
this.visitAnyBlockOrIndent_(tree.elseClause);
}
}
},
visitAnyBlockOrIndent_: function(tree) {
if (tree.type === BLOCK) {
this.writeSpace_();
this.visitAny(tree);
} else {
this.visitAnyIndented_(tree);
}
},
visitAnyIndented_: function(tree) {
var indent = arguments[1] !== (void 0) ? arguments[1] : 1;
if (this.prettyPrint_) {
this.indentDepth_ += indent;
this.writeln_();
}
this.visitAny(tree);
if (this.prettyPrint_) {
this.indentDepth_ -= indent;
this.writeln_();
}
},
visitImportDeclaration: function(tree) {
this.write_(IMPORT);
this.writeSpace_();
if (tree.importClause) {
this.visitAny(tree.importClause);
this.writeSpace_();
this.write_(FROM);
this.writeSpace_();
}
this.visitAny(tree.moduleSpecifier);
this.write_(SEMI_COLON);
},
visitImportSpecifier: function(tree) {
this.write_(tree.lhs);
if (tree.rhs !== null) {
this.writeSpace_();
this.write_(AS);
this.writeSpace_();
this.write_(tree.rhs);
}
},
visitImportSpecifierSet: function(tree) {
if (tree.specifiers.type == STAR) {
this.write_(STAR);
} else {
this.write_(OPEN_CURLY);
this.writelnList_(tree.specifiers, COMMA);
this.write_(CLOSE_CURLY);
}
},
visitLabelledStatement: function(tree) {
this.write_(tree.name);
this.write_(COLON);
this.writeSpace_();
this.visitAny(tree.statement);
},
visitLiteralExpression: function(tree) {
this.write_(tree.literalToken);
},
visitLiteralPropertyName: function(tree) {
this.write_(tree.literalToken);
},
visitMemberExpression: function(tree) {
this.visitAny(tree.operand);
if (tree.operand.type === LITERAL_EXPRESSION && tree.operand.literalToken.type === NUMBER) {
if (!/\.|e|E/.test(tree.operand.literalToken.value))
this.writeRequiredSpace_();
}
this.write_(PERIOD);
this.write_(tree.memberName);
},
visitMemberLookupExpression: function(tree) {
this.visitAny(tree.operand);
this.write_(OPEN_SQUARE);
this.visitAny(tree.memberExpression);
this.write_(CLOSE_SQUARE);
},
visitSyntaxErrorTree: function(tree) {
this.write_('(function() {' + ("throw SyntaxError(" + JSON.stringify(tree.message) + ");") + '})()');
},
visitModule: function(tree) {
this.writelnList_(tree.scriptItemList, null);
},
visitModuleSpecifier: function(tree) {
this.write_(tree.token);
},
visitModuleDeclaration: function(tree) {
this.write_(MODULE);
this.writeSpace_();
this.write_(tree.identifier);
this.writeSpace_();
this.write_(FROM);
this.writeSpace_();
this.visitAny(tree.expression);
this.write_(SEMI_COLON);
},
visitNewExpression: function(tree) {
this.write_(NEW);
this.writeSpace_();
this.visitAny(tree.operand);
this.visitAny(tree.args);
},
visitObjectLiteralExpression: function(tree) {
this.write_(OPEN_CURLY);
if (tree.propertyNameAndValues.length > 1)
this.writeln_();
this.writelnList_(tree.propertyNameAndValues, COMMA);
if (tree.propertyNameAndValues.length > 1)
this.writeln_();
this.write_(CLOSE_CURLY);
},
visitObjectPattern: function(tree) {
this.write_(OPEN_CURLY);
this.writelnList_(tree.fields, COMMA);
this.write_(CLOSE_CURLY);
},
visitObjectPatternField: function(tree) {
this.visitAny(tree.name);
if (tree.element !== null) {
this.write_(COLON);
this.writeSpace_();
this.visitAny(tree.element);
}
},
visitParenExpression: function(tree) {
this.write_(OPEN_PAREN);
$traceurRuntime.superCall(this, $ParseTreeWriter.prototype, "visitParenExpression", [tree]);
this.write_(CLOSE_PAREN);
},
visitPostfixExpression: function(tree) {
this.visitAny(tree.operand);
if (tree.operand.type === POSTFIX_EXPRESSION && tree.operand.operator.type === tree.operator.type) {
this.writeRequiredSpace_();
}
this.write_(tree.operator);
},
visitPredefinedType: function(tree) {
this.write_(tree.typeToken);
},
visitScript: function(tree) {
this.writelnList_(tree.scriptItemList, null);
},
visitPropertyMethodAssignment: function(tree) {
this.writeAnnotations_(tree.annotations);
if (tree.isStatic) {
this.write_(STATIC);
this.writeSpace_();
}
if (tree.isGenerator())
this.write_(STAR);
if (tree.isAsyncFunction())
this.write_(ASYNC);
this.visitAny(tree.name);
this.write_(OPEN_PAREN);
this.visitAny(tree.parameterList);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.writeTypeAnnotation_(tree.typeAnnotation);
this.visitAny(tree.body);
},
visitPropertyNameAssignment: function(tree) {
this.visitAny(tree.name);
this.write_(COLON);
this.writeSpace_();
this.visitAny(tree.value);
},
visitPropertyNameShorthand: function(tree) {
this.write_(tree.name);
},
visitTemplateLiteralExpression: function(tree) {
if (tree.operand) {
this.visitAny(tree.operand);
this.writeSpace_();
}
this.writeRaw_(BACK_QUOTE);
this.visitList(tree.elements);
this.writeRaw_(BACK_QUOTE);
},
visitTemplateLiteralPortion: function(tree) {
this.writeRaw_(tree.value);
},
visitTemplateSubstitution: function(tree) {
this.writeRaw_('$');
this.writeRaw_(OPEN_CURLY);
this.visitAny(tree.expression);
this.writeRaw_(CLOSE_CURLY);
},
visitReturnStatement: function(tree) {
this.write_(RETURN);
this.writeSpace_(tree.expression);
this.visitAny(tree.expression);
this.write_(SEMI_COLON);
},
visitRestParameter: function(tree) {
this.write_(DOT_DOT_DOT);
this.write_(tree.identifier.identifierToken);
this.writeTypeAnnotation_(this.currentParameterTypeAnnotation_);
},
visitSetAccessor: function(tree) {
this.writeAnnotations_(tree.annotations);
if (tree.isStatic) {
this.write_(STATIC);
this.writeSpace_();
}
this.write_(SET);
this.writeSpace_();
this.visitAny(tree.name);
this.write_(OPEN_PAREN);
this.visitAny(tree.parameterList);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.visitAny(tree.body);
},
visitSpreadExpression: function(tree) {
this.write_(DOT_DOT_DOT);
this.visitAny(tree.expression);
},
visitSpreadPatternElement: function(tree) {
this.write_(DOT_DOT_DOT);
this.visitAny(tree.lvalue);
},
visitStateMachine: function(tree) {
throw new Error('State machines cannot be converted to source');
},
visitSuperExpression: function(tree) {
this.write_(SUPER);
},
visitSwitchStatement: function(tree) {
this.write_(SWITCH);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.expression);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.write_(OPEN_CURLY);
this.writelnList_(tree.caseClauses);
this.write_(CLOSE_CURLY);
},
visitThisExpression: function(tree) {
this.write_(THIS);
},
visitThrowStatement: function(tree) {
this.write_(THROW);
this.writeSpace_();
this.visitAny(tree.value);
this.write_(SEMI_COLON);
},
visitTryStatement: function(tree) {
this.write_(TRY);
this.writeSpace_();
this.visitAny(tree.body);
if (tree.catchBlock) {
this.writeSpace_();
this.visitAny(tree.catchBlock);
}
if (tree.finallyBlock) {
this.writeSpace_();
this.visitAny(tree.finallyBlock);
}
},
visitTypeName: function(tree) {
if (tree.moduleName) {
this.visitAny(tree.moduleName);
this.write_(PERIOD);
}
this.write_(tree.name);
},
visitUnaryExpression: function(tree) {
var op = tree.operator;
this.write_(op);
var operand = tree.operand;
if (operand.type === UNARY_EXPRESSION && requiresSpaceBetween(op.type, operand.operator.type)) {
this.writeRequiredSpace_();
}
this.visitAny(operand);
},
visitVariableDeclarationList: function(tree) {
this.write_(tree.declarationType);
this.writeSpace_();
this.writeList_(tree.declarations, COMMA, true, 2);
},
visitVariableDeclaration: function(tree) {
this.visitAny(tree.lvalue);
this.writeTypeAnnotation_(tree.typeAnnotation);
if (tree.initializer !== null) {
this.writeSpace_();
this.write_(EQUAL);
this.writeSpace_();
this.visitAny(tree.initializer);
}
},
visitVariableStatement: function(tree) {
$traceurRuntime.superCall(this, $ParseTreeWriter.prototype, "visitVariableStatement", [tree]);
this.write_(SEMI_COLON);
},
visitWhileStatement: function(tree) {
this.write_(WHILE);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.condition);
this.write_(CLOSE_PAREN);
this.visitAnyBlockOrIndent_(tree.body);
},
visitWithStatement: function(tree) {
this.write_(WITH);
this.writeSpace_();
this.write_(OPEN_PAREN);
this.visitAny(tree.expression);
this.write_(CLOSE_PAREN);
this.writeSpace_();
this.visitAny(tree.body);
},
visitYieldExpression: function(tree) {
this.write_(YIELD);
if (tree.isYieldFor)
this.write_(STAR);
if (tree.expression) {
this.writeSpace_();
this.visitAny(tree.expression);
}
},
writeCurrentln_: function() {
this.result_ += this.currentLine_ + NEW_LINE;
},
writeln_: function() {
if (this.currentLineComment_) {
while (this.currentLine_.length < LINE_LENGTH) {
this.currentLine_ += ' ';
}
this.currentLine_ += ' // ' + this.currentLineComment_;
this.currentLineComment_ = null;
}
if (this.currentLine_)
this.writeCurrentln_();
this.currentLine_ = '';
},
writelnList_: function(list, delimiter) {
if (delimiter) {
this.writeList_(list, delimiter, true);
} else {
if (list.length > 0)
this.writeln_();
this.writeList_(list, null, true);
if (list.length > 0)
this.writeln_();
}
},
writeList_: function(list, delimiter, writeNewLine) {
var indent = arguments[3] !== (void 0) ? arguments[3] : 0;
var first = true;
for (var i = 0; i < list.length; i++) {
var element = list[i];
if (first) {
first = false;
} else {
if (delimiter !== null) {
this.write_(delimiter);
if (!writeNewLine)
this.writeSpace_();
}
if (writeNewLine) {
if (i === 1)
this.indentDepth_ += indent;
this.writeln_();
}
}
this.visitAny(element);
}
if (writeNewLine && list.length > 1)
this.indentDepth_ -= indent;
},
writeRaw_: function(value) {
this.currentLine_ += value;
},
write_: function(value) {
if (value === CLOSE_CURLY)
this.indentDepth_--;
if (value !== null) {
if (this.prettyPrint_) {
if (!this.currentLine_) {
for (var i = 0,
indent = this.indentDepth_; i < indent; i++) {
this.currentLine_ += ' ';
}
}
}
if (this.needsSpace_(value))
this.currentLine_ += ' ';
this.currentLine_ += value;
}
if (value === OPEN_CURLY)
this.indentDepth_++;
},
writeSpace_: function() {
var useSpace = arguments[0] !== (void 0) ? arguments[0] : this.prettyPrint_;
if (useSpace && !endsWithSpace(this.currentLine_))
this.currentLine_ += ' ';
},
writeRequiredSpace_: function() {
this.writeSpace_(true);
},
writeTypeAnnotation_: function(typeAnnotation) {
if (typeAnnotation !== null) {
this.write_(COLON);
this.writeSpace_();
this.visitAny(typeAnnotation);
}
},
writeAnnotations_: function(annotations) {
var writeNewLine = arguments[1] !== (void 0) ? arguments[1] : this.prettyPrint_;
if (annotations.length > 0) {
this.writeList_(annotations, null, writeNewLine);
if (writeNewLine)
this.writeln_();
}
},
needsSpace_: function(token) {
var line = this.currentLine_;
if (!line)
return false;
var lastCode = line.charCodeAt(line.length - 1);
if (isWhitespace(lastCode))
return false;
var firstCode = token.toString().charCodeAt(0);
return isIdentifierPart(firstCode) && (isIdentifierPart(lastCode) || lastCode === 47);
}
}, {}, ParseTreeVisitor);
function requiresSpaceBetween(first, second) {
return (first === MINUS || first === MINUS_MINUS) && (second === MINUS || second === MINUS_MINUS) || (first === PLUS || first === PLUS_PLUS) && (second === PLUS || second === PLUS_PLUS);
}
function endsWithSpace(s) {
return isWhitespace(s.charCodeAt(s.length - 1));
}
return {get ParseTreeWriter() {
return ParseTreeWriter;
}};
});
System.register("traceur@0.0.52/src/outputgeneration/ParseTreeMapWriter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/outputgeneration/ParseTreeMapWriter";
var ParseTreeWriter = System.get("traceur@0.0.52/src/outputgeneration/ParseTreeWriter").ParseTreeWriter;
var ParseTreeMapWriter = function ParseTreeMapWriter(sourceMapGenerator) {
var options = arguments[1];
$traceurRuntime.superCall(this, $ParseTreeMapWriter.prototype, "constructor", [options]);
this.sourceMapGenerator_ = sourceMapGenerator;
this.outputLineCount_ = 1;
this.isFirstMapping_ = true;
};
var $ParseTreeMapWriter = ParseTreeMapWriter;
($traceurRuntime.createClass)(ParseTreeMapWriter, {
visitAny: function(tree) {
if (!tree) {
return;
}
if (tree.location)
this.enterBranch(tree.location);
$traceurRuntime.superCall(this, $ParseTreeMapWriter.prototype, "visitAny", [tree]);
if (tree.location)
this.exitBranch(tree.location);
},
writeCurrentln_: function() {
$traceurRuntime.superCall(this, $ParseTreeMapWriter.prototype, "writeCurrentln_", []);
this.flushMappings();
this.outputLineCount_++;
this.generated_ = {
line: this.outputLineCount_,
column: 0
};
this.flushMappings();
},
write_: function(value) {
if (this.entered_) {
this.generate();
$traceurRuntime.superCall(this, $ParseTreeMapWriter.prototype, "write_", [value]);
this.generate();
} else {
this.generate();
$traceurRuntime.superCall(this, $ParseTreeMapWriter.prototype, "write_", [value]);
this.generate();
}
},
generate: function() {
var column = this.currentLine_.length ? this.currentLine_.length - 1 : 0;
this.generated_ = {
line: this.outputLineCount_,
column: column
};
this.flushMappings();
},
enterBranch: function(location) {
this.originate(location.start);
this.entered_ = true;
},
exitBranch: function(location) {
var position = location.end;
var endOfPreviousToken = {
line: position.line,
column: position.column ? position.column - 1 : 0,
source: {
name: position.source.name,
contents: position.source.contents
}
};
this.originate(endOfPreviousToken);
this.entered_ = false;
},
originate: function(position) {
var line = position.line + 1;
if (this.original_ && this.original_.line !== line)
this.flushMappings();
this.original_ = {
line: line,
column: position.column || 0
};
if (position.source.name !== this.sourceName_) {
this.sourceName_ = position.source.name;
this.sourceMapGenerator_.setSourceContent(position.source.name, position.source.contents);
}
this.flushMappings();
},
flushMappings: function() {
if (this.original_ && this.generated_) {
this.addMapping();
this.original_ = null;
this.generated_ = null;
}
},
isSame: function(lhs, rhs) {
return lhs.line === rhs.line && lhs.column === rhs.column;
},
isSameMapping: function() {
if (!this.previousMapping_)
return false;
if (this.isSame(this.previousMapping_.generated, this.generated_) && this.isSame(this.previousMapping_.original, this.original_))
return true;
;
},
addMapping: function() {
if (this.isSameMapping())
return;
var mapping = {
generated: this.generated_,
original: this.original_,
source: this.sourceName_
};
this.sourceMapGenerator_.addMapping(mapping);
this.previousMapping_ = mapping;
}
}, {}, ParseTreeWriter);
return {get ParseTreeMapWriter() {
return ParseTreeMapWriter;
}};
});
System.register("traceur@0.0.52/src/outputgeneration/SourceMapIntegration", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/outputgeneration/SourceMapIntegration";
function makeDefine(mapping, id) {
var require = function(id) {
return mapping[id];
};
var exports = mapping[id] = {};
var module = null;
return function(factory) {
factory(require, exports, module);
};
}
var define,
m = {};
define = makeDefine(m, './util');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
function getArg(aArgs, aName, aDefaultValue) {
if (aName in aArgs) {
return aArgs[aName];
} else if (arguments.length === 3) {
return aDefaultValue;
} else {
throw new Error('"' + aName + '" is a required argument.');
}
}
exports.getArg = getArg;
var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
var dataUrlRegexp = /^data:.+\,.+$/;
function urlParse(aUrl) {
var match = aUrl.match(urlRegexp);
if (!match) {
return null;
}
return {
scheme: match[1],
auth: match[2],
host: match[3],
port: match[4],
path: match[5]
};
}
exports.urlParse = urlParse;
function urlGenerate(aParsedUrl) {
var url = '';
if (aParsedUrl.scheme) {
url += aParsedUrl.scheme + ':';
}
url += '//';
if (aParsedUrl.auth) {
url += aParsedUrl.auth + '@';
}
if (aParsedUrl.host) {
url += aParsedUrl.host;
}
if (aParsedUrl.port) {
url += ":" + aParsedUrl.port;
}
if (aParsedUrl.path) {
url += aParsedUrl.path;
}
return url;
}
exports.urlGenerate = urlGenerate;
function normalize(aPath) {
var path = aPath;
var url = urlParse(aPath);
if (url) {
if (!url.path) {
return aPath;
}
path = url.path;
}
var isAbsolute = (path.charAt(0) === '/');
var parts = path.split(/\/+/);
for (var part,
up = 0,
i = parts.length - 1; i >= 0; i--) {
part = parts[i];
if (part === '.') {
parts.splice(i, 1);
} else if (part === '..') {
up++;
} else if (up > 0) {
if (part === '') {
parts.splice(i + 1, up);
up = 0;
} else {
parts.splice(i, 2);
up--;
}
}
}
path = parts.join('/');
if (path === '') {
path = isAbsolute ? '/' : '.';
}
if (url) {
url.path = path;
return urlGenerate(url);
}
return path;
}
exports.normalize = normalize;
function join(aRoot, aPath) {
var aPathUrl = urlParse(aPath);
var aRootUrl = urlParse(aRoot);
if (aRootUrl) {
aRoot = aRootUrl.path || '/';
}
if (aPathUrl && !aPathUrl.scheme) {
if (aRootUrl) {
aPathUrl.scheme = aRootUrl.scheme;
}
return urlGenerate(aPathUrl);
}
if (aPathUrl || aPath.match(dataUrlRegexp)) {
return aPath;
}
if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
aRootUrl.host = aPath;
return urlGenerate(aRootUrl);
}
var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
if (aRootUrl) {
aRootUrl.path = joined;
return urlGenerate(aRootUrl);
}
return joined;
}
exports.join = join;
function toSetString(aStr) {
return '$' + aStr;
}
exports.toSetString = toSetString;
function fromSetString(aStr) {
return aStr.substr(1);
}
exports.fromSetString = fromSetString;
function relative(aRoot, aPath) {
aRoot = aRoot.replace(/\/$/, '');
var url = urlParse(aRoot);
if (aPath.charAt(0) == "/" && url && url.path == "/") {
return aPath.slice(1);
}
return aPath.indexOf(aRoot + '/') === 0 ? aPath.substr(aRoot.length + 1) : aPath;
}
exports.relative = relative;
function strcmp(aStr1, aStr2) {
var s1 = aStr1 || "";
var s2 = aStr2 || "";
return (s1 > s2) - (s1 < s2);
}
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
var cmp;
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp || onlyCompareOriginal) {
return cmp;
}
cmp = strcmp(mappingA.name, mappingB.name);
if (cmp) {
return cmp;
}
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp) {
return cmp;
}
return mappingA.generatedColumn - mappingB.generatedColumn;
}
;
exports.compareByOriginalPositions = compareByOriginalPositions;
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
var cmp;
cmp = mappingA.generatedLine - mappingB.generatedLine;
if (cmp) {
return cmp;
}
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
if (cmp || onlyCompareGenerated) {
return cmp;
}
cmp = strcmp(mappingA.source, mappingB.source);
if (cmp) {
return cmp;
}
cmp = mappingA.originalLine - mappingB.originalLine;
if (cmp) {
return cmp;
}
cmp = mappingA.originalColumn - mappingB.originalColumn;
if (cmp) {
return cmp;
}
return strcmp(mappingA.name, mappingB.name);
}
;
exports.compareByGeneratedPositions = compareByGeneratedPositions;
});
define = makeDefine(m, './array-set');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var util = require('./util');
function ArraySet() {
this._array = [];
this._set = {};
}
ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
var set = new ArraySet();
for (var i = 0,
len = aArray.length; i < len; i++) {
set.add(aArray[i], aAllowDuplicates);
}
return set;
};
ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
var isDuplicate = this.has(aStr);
var idx = this._array.length;
if (!isDuplicate || aAllowDuplicates) {
this._array.push(aStr);
}
if (!isDuplicate) {
this._set[util.toSetString(aStr)] = idx;
}
};
ArraySet.prototype.has = function ArraySet_has(aStr) {
return Object.prototype.hasOwnProperty.call(this._set, util.toSetString(aStr));
};
ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
if (this.has(aStr)) {
return this._set[util.toSetString(aStr)];
}
throw new Error('"' + aStr + '" is not in the set.');
};
ArraySet.prototype.at = function ArraySet_at(aIdx) {
if (aIdx >= 0 && aIdx < this._array.length) {
return this._array[aIdx];
}
throw new Error('No element indexed by ' + aIdx);
};
ArraySet.prototype.toArray = function ArraySet_toArray() {
return this._array.slice();
};
exports.ArraySet = ArraySet;
});
define = makeDefine(m, './base64');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var charToIntMap = {};
var intToCharMap = {};
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('').forEach(function(ch, index) {
charToIntMap[ch] = index;
intToCharMap[index] = ch;
});
exports.encode = function base64_encode(aNumber) {
if (aNumber in intToCharMap) {
return intToCharMap[aNumber];
}
throw new TypeError("Must be between 0 and 63: " + aNumber);
};
exports.decode = function base64_decode(aChar) {
if (aChar in charToIntMap) {
return charToIntMap[aChar];
}
throw new TypeError("Not a valid base 64 digit: " + aChar);
};
});
define = makeDefine(m, './base64-vlq');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var base64 = require('./base64');
var VLQ_BASE_SHIFT = 5;
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
var VLQ_BASE_MASK = VLQ_BASE - 1;
var VLQ_CONTINUATION_BIT = VLQ_BASE;
function toVLQSigned(aValue) {
return aValue < 0 ? ((-aValue) << 1) + 1 : (aValue << 1) + 0;
}
function fromVLQSigned(aValue) {
var isNegative = (aValue & 1) === 1;
var shifted = aValue >> 1;
return isNegative ? -shifted : shifted;
}
exports.encode = function base64VLQ_encode(aValue) {
var encoded = "";
var digit;
var vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
exports.decode = function base64VLQ_decode(aStr) {
var i = 0;
var strLen = aStr.length;
var result = 0;
var shift = 0;
var continuation,
digit;
do {
if (i >= strLen) {
throw new Error("Expected more digits in base 64 VLQ value.");
}
digit = base64.decode(aStr.charAt(i++));
continuation = !!(digit & VLQ_CONTINUATION_BIT);
digit &= VLQ_BASE_MASK;
result = result + (digit << shift);
shift += VLQ_BASE_SHIFT;
} while (continuation);
return {
value: fromVLQSigned(result),
rest: aStr.slice(i)
};
};
});
define = makeDefine(m, './binary-search');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
var mid = Math.floor((aHigh - aLow) / 2) + aLow;
var cmp = aCompare(aNeedle, aHaystack[mid], true);
if (cmp === 0) {
return aHaystack[mid];
} else if (cmp > 0) {
if (aHigh - mid > 1) {
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare);
}
return aHaystack[mid];
} else {
if (mid - aLow > 1) {
return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare);
}
return aLow < 0 ? null : aHaystack[aLow];
}
}
exports.search = function search(aNeedle, aHaystack, aCompare) {
return aHaystack.length > 0 ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) : null;
};
});
define = makeDefine(m, './source-map-generator');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var base64VLQ = require('./base64-vlq');
var util = require('./util');
var ArraySet = require('./array-set').ArraySet;
function SourceMapGenerator(aArgs) {
if (!aArgs) {
aArgs = {};
}
this._file = util.getArg(aArgs, 'file', null);
this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
this._sources = new ArraySet();
this._names = new ArraySet();
this._mappings = [];
this._sourcesContents = null;
}
SourceMapGenerator.prototype._version = 3;
SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
var sourceRoot = aSourceMapConsumer.sourceRoot;
var generator = new SourceMapGenerator({
file: aSourceMapConsumer.file,
sourceRoot: sourceRoot
});
aSourceMapConsumer.eachMapping(function(mapping) {
var newMapping = {generated: {
line: mapping.generatedLine,
column: mapping.generatedColumn
}};
if (mapping.source) {
newMapping.source = mapping.source;
if (sourceRoot) {
newMapping.source = util.relative(sourceRoot, newMapping.source);
}
newMapping.original = {
line: mapping.originalLine,
column: mapping.originalColumn
};
if (mapping.name) {
newMapping.name = mapping.name;
}
}
generator.addMapping(newMapping);
});
aSourceMapConsumer.sources.forEach(function(sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content) {
generator.setSourceContent(sourceFile, content);
}
});
return generator;
};
SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
var generated = util.getArg(aArgs, 'generated');
var original = util.getArg(aArgs, 'original', null);
var source = util.getArg(aArgs, 'source', null);
var name = util.getArg(aArgs, 'name', null);
this._validateMapping(generated, original, source, name);
if (source && !this._sources.has(source)) {
this._sources.add(source);
}
if (name && !this._names.has(name)) {
this._names.add(name);
}
this._mappings.push({
generatedLine: generated.line,
generatedColumn: generated.column,
originalLine: original != null && original.line,
originalColumn: original != null && original.column,
source: source,
name: name
});
};
SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
var source = aSourceFile;
if (this._sourceRoot) {
source = util.relative(this._sourceRoot, source);
}
if (aSourceContent !== null) {
if (!this._sourcesContents) {
this._sourcesContents = {};
}
this._sourcesContents[util.toSetString(source)] = aSourceContent;
} else {
delete this._sourcesContents[util.toSetString(source)];
if (Object.keys(this._sourcesContents).length === 0) {
this._sourcesContents = null;
}
}
};
SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
if (!aSourceFile) {
if (!aSourceMapConsumer.file) {
throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
}
aSourceFile = aSourceMapConsumer.file;
}
var sourceRoot = this._sourceRoot;
if (sourceRoot) {
aSourceFile = util.relative(sourceRoot, aSourceFile);
}
var newSources = new ArraySet();
var newNames = new ArraySet();
this._mappings.forEach(function(mapping) {
if (mapping.source === aSourceFile && mapping.originalLine) {
var original = aSourceMapConsumer.originalPositionFor({
line: mapping.originalLine,
column: mapping.originalColumn
});
if (original.source !== null) {
mapping.source = original.source;
if (aSourceMapPath) {
mapping.source = util.join(aSourceMapPath, mapping.source);
}
if (sourceRoot) {
mapping.source = util.relative(sourceRoot, mapping.source);
}
mapping.originalLine = original.line;
mapping.originalColumn = original.column;
if (original.name !== null && mapping.name !== null) {
mapping.name = original.name;
}
}
}
var source = mapping.source;
if (source && !newSources.has(source)) {
newSources.add(source);
}
var name = mapping.name;
if (name && !newNames.has(name)) {
newNames.add(name);
}
}, this);
this._sources = newSources;
this._names = newNames;
aSourceMapConsumer.sources.forEach(function(sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content) {
if (aSourceMapPath) {
sourceFile = util.join(aSourceMapPath, sourceFile);
}
if (sourceRoot) {
sourceFile = util.relative(sourceRoot, sourceFile);
}
this.setSourceContent(sourceFile, content);
}
}, this);
};
SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
return;
} else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
return;
} else {
throw new Error('Invalid mapping: ' + JSON.stringify({
generated: aGenerated,
source: aSource,
original: aOriginal,
name: aName
}));
}
};
SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
var previousGeneratedColumn = 0;
var previousGeneratedLine = 1;
var previousOriginalColumn = 0;
var previousOriginalLine = 0;
var previousName = 0;
var previousSource = 0;
var result = '';
var mapping;
this._mappings.sort(util.compareByGeneratedPositions);
for (var i = 0,
len = this._mappings.length; i < len; i++) {
mapping = this._mappings[i];
if (mapping.generatedLine !== previousGeneratedLine) {
previousGeneratedColumn = 0;
while (mapping.generatedLine !== previousGeneratedLine) {
result += ';';
previousGeneratedLine++;
}
} else {
if (i > 0) {
if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) {
continue;
}
result += ',';
}
}
result += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
previousGeneratedColumn = mapping.generatedColumn;
if (mapping.source) {
result += base64VLQ.encode(this._sources.indexOf(mapping.source) - previousSource);
previousSource = this._sources.indexOf(mapping.source);
result += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
previousOriginalLine = mapping.originalLine - 1;
result += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
previousOriginalColumn = mapping.originalColumn;
if (mapping.name) {
result += base64VLQ.encode(this._names.indexOf(mapping.name) - previousName);
previousName = this._names.indexOf(mapping.name);
}
}
}
return result;
};
SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
return aSources.map(function(source) {
if (!this._sourcesContents) {
return null;
}
if (aSourceRoot) {
source = util.relative(aSourceRoot, source);
}
var key = util.toSetString(source);
return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
}, this);
};
SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
var map = {
version: this._version,
file: this._file,
sources: this._sources.toArray(),
names: this._names.toArray(),
mappings: this._serializeMappings()
};
if (this._sourceRoot) {
map.sourceRoot = this._sourceRoot;
}
if (this._sourcesContents) {
map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
}
return map;
};
SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
return JSON.stringify(this);
};
exports.SourceMapGenerator = SourceMapGenerator;
});
define = makeDefine(m, './source-map-consumer');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var util = require('./util');
var binarySearch = require('./binary-search');
var ArraySet = require('./array-set').ArraySet;
var base64VLQ = require('./base64-vlq');
function SourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
if (typeof aSourceMap === 'string') {
sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
}
var version = util.getArg(sourceMap, 'version');
var sources = util.getArg(sourceMap, 'sources');
var names = util.getArg(sourceMap, 'names', []);
var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
var mappings = util.getArg(sourceMap, 'mappings');
var file = util.getArg(sourceMap, 'file', null);
if (version != this._version) {
throw new Error('Unsupported version: ' + version);
}
this._names = ArraySet.fromArray(names, true);
this._sources = ArraySet.fromArray(sources, true);
this.sourceRoot = sourceRoot;
this.sourcesContent = sourcesContent;
this._mappings = mappings;
this.file = file;
}
SourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
var smc = Object.create(SourceMapConsumer.prototype);
smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
smc.sourceRoot = aSourceMap._sourceRoot;
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
smc.file = aSourceMap._file;
smc.__generatedMappings = aSourceMap._mappings.slice().sort(util.compareByGeneratedPositions);
smc.__originalMappings = aSourceMap._mappings.slice().sort(util.compareByOriginalPositions);
return smc;
};
SourceMapConsumer.prototype._version = 3;
Object.defineProperty(SourceMapConsumer.prototype, 'sources', {get: function() {
return this._sources.toArray().map(function(s) {
return this.sourceRoot ? util.join(this.sourceRoot, s) : s;
}, this);
}});
SourceMapConsumer.prototype.__generatedMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {get: function() {
if (!this.__generatedMappings) {
this.__generatedMappings = [];
this.__originalMappings = [];
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__generatedMappings;
}});
SourceMapConsumer.prototype.__originalMappings = null;
Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {get: function() {
if (!this.__originalMappings) {
this.__generatedMappings = [];
this.__originalMappings = [];
this._parseMappings(this._mappings, this.sourceRoot);
}
return this.__originalMappings;
}});
SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
var generatedLine = 1;
var previousGeneratedColumn = 0;
var previousOriginalLine = 0;
var previousOriginalColumn = 0;
var previousSource = 0;
var previousName = 0;
var mappingSeparator = /^[,;]/;
var str = aStr;
var mapping;
var temp;
while (str.length > 0) {
if (str.charAt(0) === ';') {
generatedLine++;
str = str.slice(1);
previousGeneratedColumn = 0;
} else if (str.charAt(0) === ',') {
str = str.slice(1);
} else {
mapping = {};
mapping.generatedLine = generatedLine;
temp = base64VLQ.decode(str);
mapping.generatedColumn = previousGeneratedColumn + temp.value;
previousGeneratedColumn = mapping.generatedColumn;
str = temp.rest;
if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
temp = base64VLQ.decode(str);
mapping.source = this._sources.at(previousSource + temp.value);
previousSource += temp.value;
str = temp.rest;
if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
throw new Error('Found a source, but no line and column');
}
temp = base64VLQ.decode(str);
mapping.originalLine = previousOriginalLine + temp.value;
previousOriginalLine = mapping.originalLine;
mapping.originalLine += 1;
str = temp.rest;
if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
throw new Error('Found a source and line, but no column');
}
temp = base64VLQ.decode(str);
mapping.originalColumn = previousOriginalColumn + temp.value;
previousOriginalColumn = mapping.originalColumn;
str = temp.rest;
if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
temp = base64VLQ.decode(str);
mapping.name = this._names.at(previousName + temp.value);
previousName += temp.value;
str = temp.rest;
}
}
this.__generatedMappings.push(mapping);
if (typeof mapping.originalLine === 'number') {
this.__originalMappings.push(mapping);
}
}
}
this.__generatedMappings.sort(util.compareByGeneratedPositions);
this.__originalMappings.sort(util.compareByOriginalPositions);
};
SourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator) {
if (aNeedle[aLineName] <= 0) {
throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
}
if (aNeedle[aColumnName] < 0) {
throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
}
return binarySearch.search(aNeedle, aMappings, aComparator);
};
SourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
var needle = {
generatedLine: util.getArg(aArgs, 'line'),
generatedColumn: util.getArg(aArgs, 'column')
};
var mapping = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositions);
if (mapping && mapping.generatedLine === needle.generatedLine) {
var source = util.getArg(mapping, 'source', null);
if (source && this.sourceRoot) {
source = util.join(this.sourceRoot, source);
}
return {
source: source,
line: util.getArg(mapping, 'originalLine', null),
column: util.getArg(mapping, 'originalColumn', null),
name: util.getArg(mapping, 'name', null)
};
}
return {
source: null,
line: null,
column: null,
name: null
};
};
SourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource) {
if (!this.sourcesContent) {
return null;
}
if (this.sourceRoot) {
aSource = util.relative(this.sourceRoot, aSource);
}
if (this._sources.has(aSource)) {
return this.sourcesContent[this._sources.indexOf(aSource)];
}
var url;
if (this.sourceRoot && (url = util.urlParse(this.sourceRoot))) {
var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
}
if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
return this.sourcesContent[this._sources.indexOf("/" + aSource)];
}
}
throw new Error('"' + aSource + '" is not in the SourceMap.');
};
SourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
var needle = {
source: util.getArg(aArgs, 'source'),
originalLine: util.getArg(aArgs, 'line'),
originalColumn: util.getArg(aArgs, 'column')
};
if (this.sourceRoot) {
needle.source = util.relative(this.sourceRoot, needle.source);
}
var mapping = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions);
if (mapping) {
return {
line: util.getArg(mapping, 'generatedLine', null),
column: util.getArg(mapping, 'generatedColumn', null)
};
}
return {
line: null,
column: null
};
};
SourceMapConsumer.GENERATED_ORDER = 1;
SourceMapConsumer.ORIGINAL_ORDER = 2;
SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
var context = aContext || null;
var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
var mappings;
switch (order) {
case SourceMapConsumer.GENERATED_ORDER:
mappings = this._generatedMappings;
break;
case SourceMapConsumer.ORIGINAL_ORDER:
mappings = this._originalMappings;
break;
default:
throw new Error("Unknown order of iteration.");
}
var sourceRoot = this.sourceRoot;
mappings.map(function(mapping) {
var source = mapping.source;
if (source && sourceRoot) {
source = util.join(sourceRoot, source);
}
return {
source: source,
generatedLine: mapping.generatedLine,
generatedColumn: mapping.generatedColumn,
originalLine: mapping.originalLine,
originalColumn: mapping.originalColumn,
name: mapping.name
};
}).forEach(aCallback, context);
};
exports.SourceMapConsumer = SourceMapConsumer;
});
define = makeDefine(m, './source-node');
if (typeof define !== 'function') {
var define = require('amdefine')(module, require);
}
define(function(require, exports, module) {
var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
var util = require('./util');
var REGEX_NEWLINE = /(\r?\n)/g;
var REGEX_CHARACTER = /\r\n|[\s\S]/g;
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
this.children = [];
this.sourceContents = {};
this.line = aLine === undefined ? null : aLine;
this.column = aColumn === undefined ? null : aColumn;
this.source = aSource === undefined ? null : aSource;
this.name = aName === undefined ? null : aName;
if (aChunks != null)
this.add(aChunks);
}
SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) {
var node = new SourceNode();
var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
var shiftNextLine = function() {
var lineContents = remainingLines.shift();
var newLine = remainingLines.shift() || "";
return lineContents + newLine;
};
var lastGeneratedLine = 1,
lastGeneratedColumn = 0;
var lastMapping = null;
aSourceMapConsumer.eachMapping(function(mapping) {
if (lastMapping !== null) {
if (lastGeneratedLine < mapping.generatedLine) {
var code = "";
addMappingWithCode(lastMapping, shiftNextLine());
lastGeneratedLine++;
lastGeneratedColumn = 0;
} else {
var nextLine = remainingLines[0];
var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
remainingLines[0] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
lastGeneratedColumn = mapping.generatedColumn;
addMappingWithCode(lastMapping, code);
lastMapping = mapping;
return;
}
}
while (lastGeneratedLine < mapping.generatedLine) {
node.add(shiftNextLine());
lastGeneratedLine++;
}
if (lastGeneratedColumn < mapping.generatedColumn) {
var nextLine = remainingLines[0];
node.add(nextLine.substr(0, mapping.generatedColumn));
remainingLines[0] = nextLine.substr(mapping.generatedColumn);
lastGeneratedColumn = mapping.generatedColumn;
}
lastMapping = mapping;
}, this);
if (remainingLines.length > 0) {
if (lastMapping) {
addMappingWithCode(lastMapping, shiftNextLine());
}
node.add(remainingLines.join(""));
}
aSourceMapConsumer.sources.forEach(function(sourceFile) {
var content = aSourceMapConsumer.sourceContentFor(sourceFile);
if (content) {
node.setSourceContent(sourceFile, content);
}
});
return node;
function addMappingWithCode(mapping, code) {
if (mapping === null || mapping.source === undefined) {
node.add(code);
} else {
node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, mapping.source, code, mapping.name));
}
}
};
SourceNode.prototype.add = function SourceNode_add(aChunk) {
if (Array.isArray(aChunk)) {
aChunk.forEach(function(chunk) {
this.add(chunk);
}, this);
} else if (aChunk instanceof SourceNode || typeof aChunk === "string") {
if (aChunk) {
this.children.push(aChunk);
}
} else {
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
}
return this;
};
SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
if (Array.isArray(aChunk)) {
for (var i = aChunk.length - 1; i >= 0; i--) {
this.prepend(aChunk[i]);
}
} else if (aChunk instanceof SourceNode || typeof aChunk === "string") {
this.children.unshift(aChunk);
} else {
throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
}
return this;
};
SourceNode.prototype.walk = function SourceNode_walk(aFn) {
var chunk;
for (var i = 0,
len = this.children.length; i < len; i++) {
chunk = this.children[i];
if (chunk instanceof SourceNode) {
chunk.walk(aFn);
} else {
if (chunk !== '') {
aFn(chunk, {
source: this.source,
line: this.line,
column: this.column,
name: this.name
});
}
}
}
};
SourceNode.prototype.join = function SourceNode_join(aSep) {
var newChildren;
var i;
var len = this.children.length;
if (len > 0) {
newChildren = [];
for (i = 0; i < len - 1; i++) {
newChildren.push(this.children[i]);
newChildren.push(aSep);
}
newChildren.push(this.children[i]);
this.children = newChildren;
}
return this;
};
SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
var lastChild = this.children[this.children.length - 1];
if (lastChild instanceof SourceNode) {
lastChild.replaceRight(aPattern, aReplacement);
} else if (typeof lastChild === 'string') {
this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
} else {
this.children.push(''.replace(aPattern, aReplacement));
}
return this;
};
SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
};
SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
for (var i = 0,
len = this.children.length; i < len; i++) {
if (this.children[i] instanceof SourceNode) {
this.children[i].walkSourceContents(aFn);
}
}
var sources = Object.keys(this.sourceContents);
for (var i = 0,
len = sources.length; i < len; i++) {
aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
}
};
SourceNode.prototype.toString = function SourceNode_toString() {
var str = "";
this.walk(function(chunk) {
str += chunk;
});
return str;
};
SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
var generated = {
code: "",
line: 1,
column: 0
};
var map = new SourceMapGenerator(aArgs);
var sourceMappingActive = false;
var lastOriginalSource = null;
var lastOriginalLine = null;
var lastOriginalColumn = null;
var lastOriginalName = null;
this.walk(function(chunk, original) {
generated.code += chunk;
if (original.source !== null && original.line !== null && original.column !== null) {
if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
lastOriginalSource = original.source;
lastOriginalLine = original.line;
lastOriginalColumn = original.column;
lastOriginalName = original.name;
sourceMappingActive = true;
} else if (sourceMappingActive) {
map.addMapping({generated: {
line: generated.line,
column: generated.column
}});
lastOriginalSource = null;
sourceMappingActive = false;
}
chunk.match(REGEX_CHARACTER).forEach(function(ch, idx, array) {
if (REGEX_NEWLINE.test(ch)) {
generated.line++;
generated.column = 0;
if (idx + 1 === array.length) {
lastOriginalSource = null;
sourceMappingActive = false;
} else if (sourceMappingActive) {
map.addMapping({
source: original.source,
original: {
line: original.line,
column: original.column
},
generated: {
line: generated.line,
column: generated.column
},
name: original.name
});
}
} else {
generated.column += ch.length;
}
});
});
this.walkSourceContents(function(sourceFile, sourceContent) {
map.setSourceContent(sourceFile, sourceContent);
});
return {
code: generated.code,
map: map
};
};
exports.SourceNode = SourceNode;
});
var SourceMapGenerator = m['./source-map-generator'].SourceMapGenerator;
var SourceMapConsumer = m['./source-map-consumer'].SourceMapConsumer;
var SourceNode = m['./source-node'].SourceNode;
return {
get SourceMapGenerator() {
return SourceMapGenerator;
},
get SourceMapConsumer() {
return SourceMapConsumer;
},
get SourceNode() {
return SourceNode;
}
};
});
System.register("traceur@0.0.52/src/outputgeneration/toSource", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/outputgeneration/toSource";
var ParseTreeMapWriter = System.get("traceur@0.0.52/src/outputgeneration/ParseTreeMapWriter").ParseTreeMapWriter;
var ParseTreeWriter = System.get("traceur@0.0.52/src/outputgeneration/ParseTreeWriter").ParseTreeWriter;
var SourceMapGenerator = System.get("traceur@0.0.52/src/outputgeneration/SourceMapIntegration").SourceMapGenerator;
function toSource(tree) {
var options = arguments[1];
var sourceMapGenerator = options && options.sourceMapGenerator;
if (!sourceMapGenerator && options && options.sourceMaps) {
sourceMapGenerator = new SourceMapGenerator({
file: options.filename,
sourceRoot: null
});
}
var writer;
if (sourceMapGenerator)
writer = new ParseTreeMapWriter(sourceMapGenerator, options);
else
writer = new ParseTreeWriter(options);
writer.visitAny(tree);
return [writer.toString(), sourceMapGenerator && sourceMapGenerator.toString()];
}
return {get toSource() {
return toSource;
}};
});
System.register("traceur@0.0.52/src/outputgeneration/TreeWriter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/outputgeneration/TreeWriter";
var toSource = System.get("traceur@0.0.52/src/outputgeneration/toSource").toSource;
function write(tree) {
var options = arguments[1];
var $__613 = $traceurRuntime.assertObject(toSource(tree, options)),
result = $__613[0],
sourceMap = $__613[1];
if (sourceMap)
options.generatedSourceMap = sourceMap;
return result;
}
var TreeWriter = function TreeWriter() {};
($traceurRuntime.createClass)(TreeWriter, {}, {});
TreeWriter.write = write;
return {
get write() {
return write;
},
get TreeWriter() {
return TreeWriter;
}
};
});
System.register("traceur@0.0.52/src/syntax/ParseTreeValidator", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/syntax/ParseTreeValidator";
var NewExpression = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").NewExpression;
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var TreeWriter = System.get("traceur@0.0.52/src/outputgeneration/TreeWriter").TreeWriter;
var $__617 = System.get("traceur@0.0.52/src/syntax/TokenType"),
AMPERSAND = $__617.AMPERSAND,
AMPERSAND_EQUAL = $__617.AMPERSAND_EQUAL,
AND = $__617.AND,
BAR = $__617.BAR,
BAR_EQUAL = $__617.BAR_EQUAL,
CARET = $__617.CARET,
CARET_EQUAL = $__617.CARET_EQUAL,
CLOSE_ANGLE = $__617.CLOSE_ANGLE,
EQUAL = $__617.EQUAL,
EQUAL_EQUAL = $__617.EQUAL_EQUAL,
EQUAL_EQUAL_EQUAL = $__617.EQUAL_EQUAL_EQUAL,
GREATER_EQUAL = $__617.GREATER_EQUAL,
IDENTIFIER = $__617.IDENTIFIER,
IN = $__617.IN,
INSTANCEOF = $__617.INSTANCEOF,
LEFT_SHIFT = $__617.LEFT_SHIFT,
LEFT_SHIFT_EQUAL = $__617.LEFT_SHIFT_EQUAL,
LESS_EQUAL = $__617.LESS_EQUAL,
MINUS = $__617.MINUS,
MINUS_EQUAL = $__617.MINUS_EQUAL,
NOT_EQUAL = $__617.NOT_EQUAL,
NOT_EQUAL_EQUAL = $__617.NOT_EQUAL_EQUAL,
NUMBER = $__617.NUMBER,
OPEN_ANGLE = $__617.OPEN_ANGLE,
OR = $__617.OR,
PERCENT = $__617.PERCENT,
PERCENT_EQUAL = $__617.PERCENT_EQUAL,
PLUS = $__617.PLUS,
PLUS_EQUAL = $__617.PLUS_EQUAL,
RIGHT_SHIFT = $__617.RIGHT_SHIFT,
RIGHT_SHIFT_EQUAL = $__617.RIGHT_SHIFT_EQUAL,
SLASH = $__617.SLASH,
SLASH_EQUAL = $__617.SLASH_EQUAL,
STAR = $__617.STAR,
STAR_EQUAL = $__617.STAR_EQUAL,
STRING = $__617.STRING,
UNSIGNED_RIGHT_SHIFT = $__617.UNSIGNED_RIGHT_SHIFT,
UNSIGNED_RIGHT_SHIFT_EQUAL = $__617.UNSIGNED_RIGHT_SHIFT_EQUAL;
var $__618 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
ARRAY_PATTERN = $__618.ARRAY_PATTERN,
ASSIGNMENT_ELEMENT = $__618.ASSIGNMENT_ELEMENT,
BINDING_ELEMENT = $__618.BINDING_ELEMENT,
BINDING_IDENTIFIER = $__618.BINDING_IDENTIFIER,
BLOCK = $__618.BLOCK,
CASE_CLAUSE = $__618.CASE_CLAUSE,
CATCH = $__618.CATCH,
CLASS_DECLARATION = $__618.CLASS_DECLARATION,
COMPUTED_PROPERTY_NAME = $__618.COMPUTED_PROPERTY_NAME,
DEFAULT_CLAUSE = $__618.DEFAULT_CLAUSE,
EXPORT_DEFAULT = $__618.EXPORT_DEFAULT,
EXPORT_SPECIFIER = $__618.EXPORT_SPECIFIER,
EXPORT_SPECIFIER_SET = $__618.EXPORT_SPECIFIER_SET,
EXPORT_STAR = $__618.EXPORT_STAR,
FINALLY = $__618.FINALLY,
FORMAL_PARAMETER = $__618.FORMAL_PARAMETER,
FORMAL_PARAMETER_LIST = $__618.FORMAL_PARAMETER_LIST,
FUNCTION_BODY = $__618.FUNCTION_BODY,
FUNCTION_DECLARATION = $__618.FUNCTION_DECLARATION,
GET_ACCESSOR = $__618.GET_ACCESSOR,
IDENTIFIER_EXPRESSION = $__618.IDENTIFIER_EXPRESSION,
LITERAL_PROPERTY_NAME = $__618.LITERAL_PROPERTY_NAME,
MODULE_DECLARATION = $__618.MODULE_DECLARATION,
MODULE_SPECIFIER = $__618.MODULE_SPECIFIER,
NAMED_EXPORT = $__618.NAMED_EXPORT,
OBJECT_PATTERN = $__618.OBJECT_PATTERN,
OBJECT_PATTERN_FIELD = $__618.OBJECT_PATTERN_FIELD,
PROPERTY_METHOD_ASSIGNMENT = $__618.PROPERTY_METHOD_ASSIGNMENT,
PROPERTY_NAME_ASSIGNMENT = $__618.PROPERTY_NAME_ASSIGNMENT,
PROPERTY_NAME_SHORTHAND = $__618.PROPERTY_NAME_SHORTHAND,
REST_PARAMETER = $__618.REST_PARAMETER,
SET_ACCESSOR = $__618.SET_ACCESSOR,
TEMPLATE_LITERAL_PORTION = $__618.TEMPLATE_LITERAL_PORTION,
TEMPLATE_SUBSTITUTION = $__618.TEMPLATE_SUBSTITUTION,
VARIABLE_DECLARATION_LIST = $__618.VARIABLE_DECLARATION_LIST,
VARIABLE_STATEMENT = $__618.VARIABLE_STATEMENT;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var ValidationError = function ValidationError(tree, message) {
this.tree = tree;
this.message = message;
};
($traceurRuntime.createClass)(ValidationError, {}, {}, Error);
var ParseTreeValidator = function ParseTreeValidator() {
$traceurRuntime.defaultSuperCall(this, $ParseTreeValidator.prototype, arguments);
};
var $ParseTreeValidator = ParseTreeValidator;
($traceurRuntime.createClass)(ParseTreeValidator, {
fail_: function(tree, message) {
throw new ValidationError(tree, message);
},
check_: function(condition, tree, message) {
if (!condition) {
this.fail_(tree, message);
}
},
checkVisit_: function(condition, tree, message) {
this.check_(condition, tree, message);
this.visitAny(tree);
},
checkType_: function(type, tree, message) {
this.checkVisit_(tree.type === type, tree, message);
},
visitArgumentList: function(tree) {
for (var i = 0; i < tree.args.length; i++) {
var argument = tree.args[i];
this.checkVisit_(argument.isAssignmentOrSpread(), argument, 'assignment or spread expected');
}
},
visitArrayLiteralExpression: function(tree) {
for (var i = 0; i < tree.elements.length; i++) {
var element = tree.elements[i];
this.checkVisit_(element === null || element.isAssignmentOrSpread(), element, 'assignment or spread expected');
}
},
visitArrayPattern: function(tree) {
for (var i = 0; i < tree.elements.length; i++) {
var element = tree.elements[i];
this.checkVisit_(element === null || element.type === BINDING_ELEMENT || element.type == ASSIGNMENT_ELEMENT || element.isLeftHandSideExpression() || element.isPattern() || element.isSpreadPatternElement(), element, 'null, sub pattern, left hand side expression or spread expected');
if (element && element.isSpreadPatternElement()) {
this.check_(i === (tree.elements.length - 1), element, 'spread in array patterns must be the last element');
}
}
},
visitBinaryExpression: function(tree) {
switch (tree.operator.type) {
case EQUAL:
case STAR_EQUAL:
case SLASH_EQUAL:
case PERCENT_EQUAL:
case PLUS_EQUAL:
case MINUS_EQUAL:
case LEFT_SHIFT_EQUAL:
case RIGHT_SHIFT_EQUAL:
case UNSIGNED_RIGHT_SHIFT_EQUAL:
case AMPERSAND_EQUAL:
case CARET_EQUAL:
case BAR_EQUAL:
this.check_(tree.left.isLeftHandSideExpression() || tree.left.isPattern(), tree.left, 'left hand side expression or pattern expected');
this.check_(tree.right.isAssignmentExpression(), tree.right, 'assignment expression expected');
break;
case AND:
case OR:
case BAR:
case CARET:
case AMPERSAND:
case EQUAL_EQUAL:
case NOT_EQUAL:
case EQUAL_EQUAL_EQUAL:
case NOT_EQUAL_EQUAL:
case OPEN_ANGLE:
case CLOSE_ANGLE:
case GREATER_EQUAL:
case LESS_EQUAL:
case INSTANCEOF:
case IN:
case LEFT_SHIFT:
case RIGHT_SHIFT:
case UNSIGNED_RIGHT_SHIFT:
case PLUS:
case MINUS:
case STAR:
case SLASH:
case PERCENT:
this.check_(tree.left.isAssignmentExpression(), tree.left, 'assignment expression expected');
this.check_(tree.right.isAssignmentExpression(), tree.right, 'assignment expression expected');
break;
default:
this.fail_(tree, 'unexpected binary operator');
}
this.visitAny(tree.left);
this.visitAny(tree.right);
},
visitBindingElement: function(tree) {
var binding = tree.binding;
this.checkVisit_(binding.type == BINDING_IDENTIFIER || binding.type == OBJECT_PATTERN || binding.type == ARRAY_PATTERN, binding, 'expected valid binding element');
this.visitAny(tree.initializer);
},
visitAssignmentElement: function(tree) {
var assignment = tree.assignment;
this.checkVisit_(assignment.type == OBJECT_PATTERN || assignment.type == ARRAY_PATTERN || assignment.isLeftHandSideExpression(), assignment, 'expected valid assignment element');
this.visitAny(tree.initializer);
},
visitBlock: function(tree) {
for (var i = 0; i < tree.statements.length; i++) {
var statement = tree.statements[i];
this.checkVisit_(statement.isStatementListItem(), statement, 'statement or function declaration expected');
}
},
visitCallExpression: function(tree) {
this.check_(tree.operand.isMemberExpression(), tree.operand, 'member expression expected');
if (tree.operand instanceof NewExpression) {
this.check_(tree.operand.args !== null, tree.operand, 'new args expected');
}
this.visitAny(tree.operand);
this.visitAny(tree.args);
},
visitCaseClause: function(tree) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
for (var i = 0; i < tree.statements.length; i++) {
var statement = tree.statements[i];
this.checkVisit_(statement.isStatement(), statement, 'statement expected');
}
},
visitCatch: function(tree) {
this.checkVisit_(tree.binding.isPattern() || tree.binding.type == BINDING_IDENTIFIER, tree.binding, 'binding identifier expected');
this.checkVisit_(tree.catchBody.type === BLOCK, tree.catchBody, 'block expected');
},
visitClassDeclaration: function(tree) {
for (var i = 0; i < tree.elements.length; i++) {
var element = tree.elements[i];
switch (element.type) {
case GET_ACCESSOR:
case SET_ACCESSOR:
case PROPERTY_METHOD_ASSIGNMENT:
break;
default:
this.fail_(element, 'class element expected');
}
this.visitAny(element);
}
},
visitCommaExpression: function(tree) {
for (var i = 0; i < tree.expressions.length; i++) {
var expression = tree.expressions[i];
this.checkVisit_(expression.isAssignmentExpression(), expression, 'expression expected');
}
},
visitConditionalExpression: function(tree) {
this.checkVisit_(tree.condition.isAssignmentExpression(), tree.condition, 'expression expected');
this.checkVisit_(tree.left.isAssignmentExpression(), tree.left, 'expression expected');
this.checkVisit_(tree.right.isAssignmentExpression(), tree.right, 'expression expected');
},
visitCoverFormals: function(tree) {
this.fail_(tree, 'CoverFormals should have been removed');
},
visitCoverInitializedName: function(tree) {
this.fail_(tree, 'CoverInitializedName should have been removed');
},
visitDefaultClause: function(tree) {
for (var i = 0; i < tree.statements.length; i++) {
var statement = tree.statements[i];
this.checkVisit_(statement.isStatement(), statement, 'statement expected');
}
},
visitDoWhileStatement: function(tree) {
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
this.checkVisit_(tree.condition.isExpression(), tree.condition, 'expression expected');
},
visitExportDeclaration: function(tree) {
var declType = tree.declaration.type;
this.checkVisit_(declType == VARIABLE_STATEMENT || declType == FUNCTION_DECLARATION || declType == MODULE_DECLARATION || declType == CLASS_DECLARATION || declType == NAMED_EXPORT || declType == EXPORT_DEFAULT, tree.declaration, 'expected valid export tree');
},
visitNamedExport: function(tree) {
if (tree.moduleSpecifier) {
this.checkVisit_(tree.moduleSpecifier.type == MODULE_SPECIFIER, tree.moduleSpecifier, 'module expression expected');
}
var specifierType = tree.specifierSet.type;
this.checkVisit_(specifierType == EXPORT_SPECIFIER_SET || specifierType == EXPORT_STAR, tree.specifierSet, 'specifier set or identifier expected');
},
visitExportSpecifierSet: function(tree) {
this.check_(tree.specifiers.length > 0, tree, 'expected at least one identifier');
for (var i = 0; i < tree.specifiers.length; i++) {
var specifier = tree.specifiers[i];
this.checkVisit_(specifier.type == EXPORT_SPECIFIER || specifier.type == IDENTIFIER_EXPRESSION, specifier, 'expected valid export specifier');
}
},
visitExpressionStatement: function(tree) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
},
visitFinally: function(tree) {
this.checkVisit_(tree.block.type === BLOCK, tree.block, 'block expected');
},
visitForOfStatement: function(tree) {
this.checkVisit_(tree.initializer.isPattern() || tree.initializer.type === IDENTIFIER_EXPRESSION || tree.initializer.type === VARIABLE_DECLARATION_LIST && tree.initializer.declarations.length === 1, tree.initializer, 'for-each statement may not have more than one variable declaration');
this.checkVisit_(tree.collection.isExpression(), tree.collection, 'expression expected');
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
},
visitForInStatement: function(tree) {
if (tree.initializer.type === VARIABLE_DECLARATION_LIST) {
this.checkVisit_(tree.initializer.declarations.length <= 1, tree.initializer, 'for-in statement may not have more than one variable declaration');
} else {
this.checkVisit_(tree.initializer.isPattern() || tree.initializer.isExpression(), tree.initializer, 'variable declaration, expression or ' + 'pattern expected');
}
this.checkVisit_(tree.collection.isExpression(), tree.collection, 'expression expected');
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
},
visitFormalParameterList: function(tree) {
for (var i = 0; i < tree.parameters.length; i++) {
var parameter = tree.parameters[i];
assert(parameter.type === FORMAL_PARAMETER);
parameter = parameter.parameter;
switch (parameter.type) {
case BINDING_ELEMENT:
break;
case REST_PARAMETER:
this.checkVisit_(i === tree.parameters.length - 1, parameter, 'rest parameters must be the last parameter in a parameter list');
this.checkType_(BINDING_IDENTIFIER, parameter.identifier, 'binding identifier expected');
break;
default:
this.fail_(parameter, 'parameters must be identifiers or rest' + (" parameters. Found: " + parameter.type));
break;
}
this.visitAny(parameter);
}
},
visitForStatement: function(tree) {
if (tree.initializer !== null) {
this.checkVisit_(tree.initializer.isExpression() || tree.initializer.type === VARIABLE_DECLARATION_LIST, tree.initializer, 'variable declaration list or expression expected');
}
if (tree.condition !== null) {
this.checkVisit_(tree.condition.isExpression(), tree.condition, 'expression expected');
}
if (tree.increment !== null) {
this.checkVisit_(tree.increment.isExpression(), tree.increment, 'expression expected');
}
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
},
visitFunctionBody: function(tree) {
for (var i = 0; i < tree.statements.length; i++) {
var statement = tree.statements[i];
this.checkVisit_(statement.isStatementListItem(), statement, 'statement expected');
}
},
visitFunctionDeclaration: function(tree) {
this.checkType_(BINDING_IDENTIFIER, tree.name, 'binding identifier expected');
this.visitFunction_(tree);
},
visitFunctionExpression: function(tree) {
if (tree.name !== null) {
this.checkType_(BINDING_IDENTIFIER, tree.name, 'binding identifier expected');
}
this.visitFunction_(tree);
},
visitFunction_: function(tree) {
this.checkType_(FORMAL_PARAMETER_LIST, tree.parameterList, 'formal parameters expected');
this.checkType_(FUNCTION_BODY, tree.body, 'function body expected');
},
visitGetAccessor: function(tree) {
this.checkPropertyName_(tree.name);
this.checkType_(FUNCTION_BODY, tree.body, 'function body expected');
},
visitIfStatement: function(tree) {
this.checkVisit_(tree.condition.isExpression(), tree.condition, 'expression expected');
this.checkVisit_(tree.ifClause.isStatement(), tree.ifClause, 'statement expected');
if (tree.elseClause !== null) {
this.checkVisit_(tree.elseClause.isStatement(), tree.elseClause, 'statement expected');
}
},
visitLabelledStatement: function(tree) {
this.checkVisit_(tree.statement.isStatement(), tree.statement, 'statement expected');
},
visitMemberExpression: function(tree) {
this.check_(tree.operand.isMemberExpression(), tree.operand, 'member expression expected');
if (tree.operand instanceof NewExpression) {
this.check_(tree.operand.args !== null, tree.operand, 'new args expected');
}
this.visitAny(tree.operand);
},
visitMemberLookupExpression: function(tree) {
this.check_(tree.operand.isMemberExpression(), tree.operand, 'member expression expected');
if (tree.operand instanceof NewExpression) {
this.check_(tree.operand.args !== null, tree.operand, 'new args expected');
}
this.visitAny(tree.operand);
},
visitSyntaxErrorTree: function(tree) {
this.fail_(tree, ("parse tree contains SyntaxError: " + tree.message));
},
visitModuleSpecifier: function(tree) {
this.check_(tree.token.type == STRING || tree.moduleName, 'string or identifier expected');
},
visitModuleDeclaration: function(tree) {
this.checkType_(MODULE_SPECIFIER, tree.expression, 'module expression expected');
},
visitNewExpression: function(tree) {
this.checkVisit_(tree.operand.isMemberExpression(), tree.operand, 'member expression expected');
this.visitAny(tree.args);
},
visitObjectLiteralExpression: function(tree) {
for (var i = 0; i < tree.propertyNameAndValues.length; i++) {
var propertyNameAndValue = tree.propertyNameAndValues[i];
switch (propertyNameAndValue.type) {
case GET_ACCESSOR:
case SET_ACCESSOR:
case PROPERTY_METHOD_ASSIGNMENT:
this.check_(!propertyNameAndValue.isStatic, propertyNameAndValue, 'static is not allowed in object literal expression');
case PROPERTY_NAME_ASSIGNMENT:
case PROPERTY_NAME_SHORTHAND:
break;
default:
this.fail_(propertyNameAndValue, 'accessor, property name ' + 'assignment or property method assigment expected');
}
this.visitAny(propertyNameAndValue);
}
},
visitObjectPattern: function(tree) {
for (var i = 0; i < tree.fields.length; i++) {
var field = tree.fields[i];
this.checkVisit_(field.type === OBJECT_PATTERN_FIELD || field.type === ASSIGNMENT_ELEMENT || field.type === BINDING_ELEMENT, field, 'object pattern field expected');
}
},
visitObjectPatternField: function(tree) {
this.checkPropertyName_(tree.name);
this.checkVisit_(tree.element.type === ASSIGNMENT_ELEMENT || tree.element.type === BINDING_ELEMENT || tree.element.isPattern() || tree.element.isLeftHandSideExpression(), tree.element, 'binding element expected');
},
visitParenExpression: function(tree) {
if (tree.expression.isPattern()) {
this.visitAny(tree.expression);
} else {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
}
},
visitPostfixExpression: function(tree) {
this.checkVisit_(tree.operand.isAssignmentExpression(), tree.operand, 'assignment expression expected');
},
visitPredefinedType: function(tree) {},
visitScript: function(tree) {
for (var i = 0; i < tree.scriptItemList.length; i++) {
var scriptItemList = tree.scriptItemList[i];
this.checkVisit_(scriptItemList.isScriptElement(), scriptItemList, 'global script item expected');
}
},
checkPropertyName_: function(tree) {
this.checkVisit_(tree.type === LITERAL_PROPERTY_NAME || tree.type === COMPUTED_PROPERTY_NAME, tree, 'property name expected');
},
visitPropertyNameAssignment: function(tree) {
this.checkPropertyName_(tree.name);
this.checkVisit_(tree.value.isAssignmentExpression(), tree.value, 'assignment expression expected');
},
visitPropertyNameShorthand: function(tree) {
this.check_(tree.name.type === IDENTIFIER, tree, 'identifier token expected');
},
visitLiteralPropertyName: function(tree) {
var type = tree.literalToken.type;
this.check_(tree.literalToken.isKeyword() || type === IDENTIFIER || type === NUMBER || type === STRING, tree, 'Unexpected token in literal property name');
},
visitTemplateLiteralExpression: function(tree) {
if (tree.operand) {
this.checkVisit_(tree.operand.isMemberExpression(), tree.operand, 'member or call expression expected');
}
for (var i = 0; i < tree.elements.length; i++) {
var element = tree.elements[i];
if (i % 2) {
this.checkType_(TEMPLATE_SUBSTITUTION, element, 'Template literal substitution expected');
} else {
this.checkType_(TEMPLATE_LITERAL_PORTION, element, 'Template literal portion expected');
}
}
},
visitReturnStatement: function(tree) {
if (tree.expression !== null) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
}
},
visitSetAccessor: function(tree) {
this.checkPropertyName_(tree.name);
this.checkType_(FUNCTION_BODY, tree.body, 'function body expected');
},
visitSpreadExpression: function(tree) {
this.checkVisit_(tree.expression.isAssignmentExpression(), tree.expression, 'assignment expression expected');
},
visitStateMachine: function(tree) {
this.fail_(tree, 'State machines are never valid outside of the ' + 'GeneratorTransformer pass.');
},
visitSwitchStatement: function(tree) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
var defaultCount = 0;
for (var i = 0; i < tree.caseClauses.length; i++) {
var caseClause = tree.caseClauses[i];
if (caseClause.type === DEFAULT_CLAUSE) {
++defaultCount;
this.checkVisit_(defaultCount <= 1, caseClause, 'no more than one default clause allowed');
} else {
this.checkType_(CASE_CLAUSE, caseClause, 'case or default clause expected');
}
}
},
visitThrowStatement: function(tree) {
if (tree.value === null) {
return;
}
this.checkVisit_(tree.value.isExpression(), tree.value, 'expression expected');
},
visitTryStatement: function(tree) {
this.checkType_(BLOCK, tree.body, 'block expected');
if (tree.catchBlock !== null) {
this.checkType_(CATCH, tree.catchBlock, 'catch block expected');
}
if (tree.finallyBlock !== null) {
this.checkType_(FINALLY, tree.finallyBlock, 'finally block expected');
}
if (tree.catchBlock === null && tree.finallyBlock === null) {
this.fail_(tree, 'either catch or finally must be present');
}
},
visitTypeName: function(tree) {},
visitUnaryExpression: function(tree) {
this.checkVisit_(tree.operand.isAssignmentExpression(), tree.operand, 'assignment expression expected');
},
visitVariableDeclaration: function(tree) {
this.checkVisit_(tree.lvalue.isPattern() || tree.lvalue.type == BINDING_IDENTIFIER, tree.lvalue, 'binding identifier expected, found: ' + tree.lvalue.type);
if (tree.initializer !== null) {
this.checkVisit_(tree.initializer.isAssignmentExpression(), tree.initializer, 'assignment expression expected');
}
},
visitWhileStatement: function(tree) {
this.checkVisit_(tree.condition.isExpression(), tree.condition, 'expression expected');
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
},
visitWithStatement: function(tree) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
this.checkVisit_(tree.body.isStatement(), tree.body, 'statement expected');
},
visitYieldExpression: function(tree) {
if (tree.expression !== null) {
this.checkVisit_(tree.expression.isExpression(), tree.expression, 'expression expected');
}
}
}, {}, ParseTreeVisitor);
ParseTreeValidator.validate = function(tree) {
var validator = new ParseTreeValidator();
try {
validator.visitAny(tree);
} catch (e) {
if (!(e instanceof ValidationError)) {
throw e;
}
var location = null;
if (e.tree !== null) {
location = e.tree.location;
}
if (location === null) {
location = tree.location;
}
var locationString = location !== null ? location.start.toString() : '(unknown)';
throw new Error(("Parse tree validation failure '" + e.message + "' at " + locationString + ":") + '\n\n' + TreeWriter.write(tree, {
highlighted: e.tree,
showLineNumbers: true
}) + '\n');
}
};
return {get ParseTreeValidator() {
return ParseTreeValidator;
}};
});
System.register("traceur@0.0.52/src/codegeneration/MultiTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/MultiTransformer";
var ParseTreeValidator = System.get("traceur@0.0.52/src/syntax/ParseTreeValidator").ParseTreeValidator;
var MultiTransformer = function MultiTransformer(reporter, validate) {
this.reporter_ = reporter;
this.validate_ = validate;
this.treeTransformers_ = [];
};
($traceurRuntime.createClass)(MultiTransformer, {
append: function(treeTransformer) {
this.treeTransformers_.push(treeTransformer);
},
transform: function(tree) {
var reporter = this.reporter_;
var validate = this.validate_;
this.treeTransformers_.every((function(transformTree) {
tree = transformTree(tree);
if (reporter.hadError())
return false;
if (validate)
ParseTreeValidator.validate(tree);
return true;
}));
return tree;
}
}, {});
return {get MultiTransformer() {
return MultiTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/NumericLiteralTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/NumericLiteralTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__624 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
LiteralExpression = $__624.LiteralExpression,
LiteralPropertyName = $__624.LiteralPropertyName;
var LiteralToken = System.get("traceur@0.0.52/src/syntax/LiteralToken").LiteralToken;
var NUMBER = System.get("traceur@0.0.52/src/syntax/TokenType").NUMBER;
function needsTransform(token) {
return token.type === NUMBER && /^0[bBoO]/.test(token.value);
}
function transformToken(token) {
return new LiteralToken(NUMBER, String(token.processedValue), token.location);
}
var NumericLiteralTransformer = function NumericLiteralTransformer() {
$traceurRuntime.defaultSuperCall(this, $NumericLiteralTransformer.prototype, arguments);
};
var $NumericLiteralTransformer = NumericLiteralTransformer;
($traceurRuntime.createClass)(NumericLiteralTransformer, {
transformLiteralExpression: function(tree) {
var token = tree.literalToken;
if (needsTransform(token))
return new LiteralExpression(tree.location, transformToken(token));
return tree;
},
transformLiteralPropertyName: function(tree) {
var token = tree.literalToken;
if (needsTransform(token))
return new LiteralPropertyName(tree.location, transformToken(token));
return tree;
}
}, {}, ParseTreeTransformer);
return {get NumericLiteralTransformer() {
return NumericLiteralTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/ObjectLiteralTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/ObjectLiteralTransformer";
var FindVisitor = System.get("traceur@0.0.52/src/codegeneration/FindVisitor").FindVisitor;
var $__629 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FunctionExpression = $__629.FunctionExpression,
IdentifierExpression = $__629.IdentifierExpression,
LiteralExpression = $__629.LiteralExpression;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var IDENTIFIER = System.get("traceur@0.0.52/src/syntax/TokenType").IDENTIFIER;
var $__632 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
COMPUTED_PROPERTY_NAME = $__632.COMPUTED_PROPERTY_NAME,
LITERAL_PROPERTY_NAME = $__632.LITERAL_PROPERTY_NAME;
var $__633 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createAssignmentExpression = $__633.createAssignmentExpression,
createCommaExpression = $__633.createCommaExpression,
createDefineProperty = $__633.createDefineProperty,
createEmptyParameterList = $__633.createEmptyParameterList,
createFunctionExpression = $__633.createFunctionExpression,
createIdentifierExpression = $__633.createIdentifierExpression,
createObjectCreate = $__633.createObjectCreate,
createObjectLiteralExpression = $__633.createObjectLiteralExpression,
createParenExpression = $__633.createParenExpression,
createPropertyNameAssignment = $__633.createPropertyNameAssignment,
createStringLiteral = $__633.createStringLiteral;
var propName = System.get("traceur@0.0.52/src/staticsemantics/PropName").propName;
var transformOptions = System.get("traceur@0.0.52/src/Options").transformOptions;
var FindAdvancedProperty = function FindAdvancedProperty(tree) {
this.protoExpression = null;
$traceurRuntime.superCall(this, $FindAdvancedProperty.prototype, "constructor", [tree, true]);
};
var $FindAdvancedProperty = FindAdvancedProperty;
($traceurRuntime.createClass)(FindAdvancedProperty, {
visitPropertyNameAssignment: function(tree) {
if (isProtoName(tree.name))
this.protoExpression = tree.value;
else
$traceurRuntime.superCall(this, $FindAdvancedProperty.prototype, "visitPropertyNameAssignment", [tree]);
},
visitComputedPropertyName: function(tree) {
if (transformOptions.computedPropertyNames)
this.found = true;
}
}, {}, FindVisitor);
function isProtoName(tree) {
return propName(tree) === '__proto__';
}
var ObjectLiteralTransformer = function ObjectLiteralTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "constructor", [identifierGenerator]);
this.protoExpression = null;
this.needsAdvancedTransform = false;
this.seenAccessors = null;
};
var $ObjectLiteralTransformer = ObjectLiteralTransformer;
($traceurRuntime.createClass)(ObjectLiteralTransformer, {
findSeenAccessor_: function(name) {
if (name.type === COMPUTED_PROPERTY_NAME)
return null;
var s = propName(name);
return this.seenAccessors[s];
},
removeSeenAccessor_: function(name) {
if (name.type === COMPUTED_PROPERTY_NAME)
return;
var s = propName(name);
delete this.seenAccessors[s];
},
addSeenAccessor_: function(name, descr) {
if (name.type === COMPUTED_PROPERTY_NAME)
return;
var s = propName(name);
this.seenAccessors[s] = descr;
},
createProperty_: function(name, descr) {
var expression;
if (name.type === LITERAL_PROPERTY_NAME) {
if (this.needsAdvancedTransform)
expression = this.getPropertyName_(name);
else
expression = name;
} else {
expression = name.expression;
}
if (descr.get || descr.set) {
var oldAccessor = this.findSeenAccessor_(name);
if (oldAccessor) {
oldAccessor.get = descr.get || oldAccessor.get;
oldAccessor.set = descr.set || oldAccessor.set;
this.removeSeenAccessor_(name);
return null;
} else {
this.addSeenAccessor_(name, descr);
}
}
return [expression, descr];
},
getPropertyName_: function(nameTree) {
var token = nameTree.literalToken;
switch (token.type) {
case IDENTIFIER:
return createStringLiteral(token.value);
default:
if (token.isKeyword())
return createStringLiteral(token.type);
return new LiteralExpression(token.location, token);
}
},
transformClassDeclaration: function(tree) {
return tree;
},
transformClassExpression: function(tree) {
return tree;
},
transformObjectLiteralExpression: function(tree) {
var oldNeedsTransform = this.needsAdvancedTransform;
var oldSeenAccessors = this.seenAccessors;
try {
var finder = new FindAdvancedProperty(tree);
if (!finder.found) {
this.needsAdvancedTransform = false;
return $traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "transformObjectLiteralExpression", [tree]);
}
this.needsAdvancedTransform = true;
this.seenAccessors = Object.create(null);
var properties = this.transformList(tree.propertyNameAndValues);
properties = properties.filter((function(tree) {
return tree;
}));
var tempVar = this.addTempVar();
var tempVarIdentifierExpression = createIdentifierExpression(tempVar);
var expressions = properties.map((function(property) {
var expression = property[0];
var descr = property[1];
return createDefineProperty(tempVarIdentifierExpression, expression, descr);
}));
var protoExpression = this.transformAny(finder.protoExpression);
var objectExpression;
if (protoExpression)
objectExpression = createObjectCreate(protoExpression);
else
objectExpression = createObjectLiteralExpression([]);
expressions.unshift(createAssignmentExpression(tempVarIdentifierExpression, objectExpression));
expressions.push(tempVarIdentifierExpression);
return createParenExpression(createCommaExpression(expressions));
} finally {
this.needsAdvancedTransform = oldNeedsTransform;
this.seenAccessors = oldSeenAccessors;
}
},
transformPropertyNameAssignment: function(tree) {
if (!this.needsAdvancedTransform)
return $traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "transformPropertyNameAssignment", [tree]);
if (isProtoName(tree.name))
return null;
return this.createProperty_(tree.name, {
value: this.transformAny(tree.value),
configurable: true,
enumerable: true,
writable: true
});
},
transformGetAccessor: function(tree) {
if (!this.needsAdvancedTransform)
return $traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "transformGetAccessor", [tree]);
var body = this.transformAny(tree.body);
var func = createFunctionExpression(createEmptyParameterList(), body);
return this.createProperty_(tree.name, {
get: func,
configurable: true,
enumerable: true
});
},
transformSetAccessor: function(tree) {
if (!this.needsAdvancedTransform)
return $traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "transformSetAccessor", [tree]);
var body = this.transformAny(tree.body);
var parameterList = this.transformAny(tree.parameterList);
var func = createFunctionExpression(parameterList, body);
return this.createProperty_(tree.name, {
set: func,
configurable: true,
enumerable: true
});
},
transformPropertyMethodAssignment: function(tree) {
var func = new FunctionExpression(tree.location, null, tree.functionKind, this.transformAny(tree.parameterList), tree.typeAnnotation, [], this.transformAny(tree.body));
if (!this.needsAdvancedTransform) {
return createPropertyNameAssignment(tree.name, func);
}
var expression = this.transformAny(tree.name);
return this.createProperty_(tree.name, {
value: func,
configurable: true,
enumerable: true,
writable: true
});
},
transformPropertyNameShorthand: function(tree) {
if (!this.needsAdvancedTransform)
return $traceurRuntime.superCall(this, $ObjectLiteralTransformer.prototype, "transformPropertyNameShorthand", [tree]);
var expression = this.transformAny(tree.name);
return this.createProperty_(tree.name, {
value: new IdentifierExpression(tree.location, tree.name.identifierToken),
configurable: true,
enumerable: false,
writable: true
});
}
}, {}, TempVarTransformer);
return {get ObjectLiteralTransformer() {
return ObjectLiteralTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/PropertyNameShorthandTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/PropertyNameShorthandTransformer";
var $__637 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
IdentifierExpression = $__637.IdentifierExpression,
LiteralPropertyName = $__637.LiteralPropertyName,
PropertyNameAssignment = $__637.PropertyNameAssignment;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var PropertyNameShorthandTransformer = function PropertyNameShorthandTransformer() {
$traceurRuntime.defaultSuperCall(this, $PropertyNameShorthandTransformer.prototype, arguments);
};
var $PropertyNameShorthandTransformer = PropertyNameShorthandTransformer;
($traceurRuntime.createClass)(PropertyNameShorthandTransformer, {transformPropertyNameShorthand: function(tree) {
return new PropertyNameAssignment(tree.location, new LiteralPropertyName(tree.location, tree.name), new IdentifierExpression(tree.location, tree.name));
}}, {}, ParseTreeTransformer);
return {get PropertyNameShorthandTransformer() {
return PropertyNameShorthandTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/RestParameterTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/RestParameterTransformer";
var $__640 = Object.freeze(Object.defineProperties(["\n for (var ", " = [], ", " = ", ";\n ", " < arguments.length; ", "++)\n ", "[", " - ", "] = arguments[", "];"], {raw: {value: Object.freeze(["\n for (var ", " = [], ", " = ", ";\n ", " < arguments.length; ", "++)\n ", "[", " - ", "] = arguments[", "];"])}})),
$__641 = Object.freeze(Object.defineProperties(["\n for (var ", " = [], ", " = 0;\n ", " < arguments.length; ", "++)\n ", "[", "] = arguments[", "];"], {raw: {value: Object.freeze(["\n for (var ", " = [], ", " = 0;\n ", " < arguments.length; ", "++)\n ", "[", "] = arguments[", "];"])}}));
var FormalParameterList = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").FormalParameterList;
var ParameterTransformer = System.get("traceur@0.0.52/src/codegeneration/ParameterTransformer").ParameterTransformer;
var createIdentifierToken = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createIdentifierToken;
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
function hasRestParameter(parameterList) {
var parameters = parameterList.parameters;
return parameters.length > 0 && parameters[parameters.length - 1].isRestParameter();
}
function getRestParameterLiteralToken(parameterList) {
var parameters = parameterList.parameters;
return parameters[parameters.length - 1].parameter.identifier.identifierToken;
}
var RestParameterTransformer = function RestParameterTransformer() {
$traceurRuntime.defaultSuperCall(this, $RestParameterTransformer.prototype, arguments);
};
var $RestParameterTransformer = RestParameterTransformer;
($traceurRuntime.createClass)(RestParameterTransformer, {transformFormalParameterList: function(tree) {
var transformed = $traceurRuntime.superCall(this, $RestParameterTransformer.prototype, "transformFormalParameterList", [tree]);
if (hasRestParameter(transformed)) {
var parametersWithoutRestParam = new FormalParameterList(transformed.location, transformed.parameters.slice(0, -1));
var startIndex = transformed.parameters.length - 1;
var i = createIdentifierToken(this.getTempIdentifier());
var name = getRestParameterLiteralToken(transformed);
var loop;
if (startIndex) {
loop = parseStatement($__640, name, i, startIndex, i, i, name, i, startIndex, i);
} else {
loop = parseStatement($__641, name, i, i, i, name, i, i);
}
this.parameterStatements.push(loop);
return parametersWithoutRestParam;
}
return transformed;
}}, {}, ParameterTransformer);
return {get RestParameterTransformer() {
return RestParameterTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/SpreadTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/SpreadTransformer";
var $__647 = Object.freeze(Object.defineProperties(["$traceurRuntime.spread(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.spread(", ")"])}}));
var $__648 = System.get("traceur@0.0.52/src/syntax/PredefinedName"),
APPLY = $__648.APPLY,
BIND = $__648.BIND,
FUNCTION = $__648.FUNCTION,
PROTOTYPE = $__648.PROTOTYPE;
var $__649 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
MEMBER_EXPRESSION = $__649.MEMBER_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__649.MEMBER_LOOKUP_EXPRESSION,
SPREAD_EXPRESSION = $__649.SPREAD_EXPRESSION;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__651 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__651.createArgumentList,
createArrayLiteralExpression = $__651.createArrayLiteralExpression,
createAssignmentExpression = $__651.createAssignmentExpression,
createCallExpression = $__651.createCallExpression,
createEmptyArgumentList = $__651.createEmptyArgumentList,
createIdentifierExpression = $__651.createIdentifierExpression,
createMemberExpression = $__651.createMemberExpression,
createMemberLookupExpression = $__651.createMemberLookupExpression,
createNewExpression = $__651.createNewExpression,
createNullLiteral = $__651.createNullLiteral,
createParenExpression = $__651.createParenExpression;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
function hasSpreadMember(trees) {
return trees.some((function(tree) {
return tree && tree.type == SPREAD_EXPRESSION;
}));
}
var SpreadTransformer = function SpreadTransformer() {
$traceurRuntime.defaultSuperCall(this, $SpreadTransformer.prototype, arguments);
};
var $SpreadTransformer = SpreadTransformer;
($traceurRuntime.createClass)(SpreadTransformer, {
createArrayFromElements_: function(elements) {
var length = elements.length;
var args = [];
var lastArray;
for (var i = 0; i < length; i++) {
if (elements[i] && elements[i].type === SPREAD_EXPRESSION) {
if (lastArray) {
args.push(createArrayLiteralExpression(lastArray));
lastArray = null;
}
args.push(this.transformAny(elements[i].expression));
} else {
if (!lastArray)
lastArray = [];
lastArray.push(this.transformAny(elements[i]));
}
}
if (lastArray)
args.push(createArrayLiteralExpression(lastArray));
return parseExpression($__647, createArgumentList(args));
},
desugarCallSpread_: function(tree) {
var operand = this.transformAny(tree.operand);
var functionObject,
contextObject;
this.pushTempScope();
if (operand.type == MEMBER_EXPRESSION) {
var tempIdent = createIdentifierExpression(this.addTempVar());
var parenExpression = createParenExpression(createAssignmentExpression(tempIdent, operand.operand));
var memberName = operand.memberName;
contextObject = tempIdent;
functionObject = createMemberExpression(parenExpression, memberName);
} else if (tree.operand.type == MEMBER_LOOKUP_EXPRESSION) {
var tempIdent = createIdentifierExpression(this.addTempVar());
var parenExpression = createParenExpression(createAssignmentExpression(tempIdent, operand.operand));
var memberExpression = this.transformAny(operand.memberExpression);
contextObject = tempIdent;
functionObject = createMemberLookupExpression(parenExpression, memberExpression);
} else {
contextObject = createNullLiteral();
functionObject = operand;
}
this.popTempScope();
var arrayExpression = this.createArrayFromElements_(tree.args.args);
return createCallExpression(createMemberExpression(functionObject, APPLY), createArgumentList([contextObject, arrayExpression]));
},
desugarNewSpread_: function(tree) {
var arrayExpression = $traceurRuntime.spread([createNullLiteral()], tree.args.args);
arrayExpression = this.createArrayFromElements_(arrayExpression);
return createNewExpression(createParenExpression(createCallExpression(createMemberExpression(FUNCTION, PROTOTYPE, BIND, APPLY), createArgumentList([this.transformAny(tree.operand), arrayExpression]))), createEmptyArgumentList());
},
transformArrayLiteralExpression: function(tree) {
if (hasSpreadMember(tree.elements)) {
return this.createArrayFromElements_(tree.elements);
}
return $traceurRuntime.superCall(this, $SpreadTransformer.prototype, "transformArrayLiteralExpression", [tree]);
},
transformCallExpression: function(tree) {
if (hasSpreadMember(tree.args.args)) {
return this.desugarCallSpread_(tree);
}
return $traceurRuntime.superCall(this, $SpreadTransformer.prototype, "transformCallExpression", [tree]);
},
transformNewExpression: function(tree) {
if (tree.args != null && hasSpreadMember(tree.args.args)) {
return this.desugarNewSpread_(tree);
}
return $traceurRuntime.superCall(this, $SpreadTransformer.prototype, "transformNewExpression", [tree]);
}
}, {}, TempVarTransformer);
return {get SpreadTransformer() {
return SpreadTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/SymbolTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/SymbolTransformer";
var $__654 = Object.freeze(Object.defineProperties(["$traceurRuntime.toProperty(", ") in ", ""], {raw: {value: Object.freeze(["$traceurRuntime.toProperty(", ") in ", ""])}})),
$__655 = Object.freeze(Object.defineProperties(["$traceurRuntime.setProperty(", ",\n ", ", ", ")"], {raw: {value: Object.freeze(["$traceurRuntime.setProperty(", ",\n ", ", ", ")"])}})),
$__656 = Object.freeze(Object.defineProperties(["", "[$traceurRuntime.toProperty(", ")]"], {raw: {value: Object.freeze(["", "[$traceurRuntime.toProperty(", ")]"])}})),
$__657 = Object.freeze(Object.defineProperties(["$traceurRuntime.typeof(", ")"], {raw: {value: Object.freeze(["$traceurRuntime.typeof(", ")"])}})),
$__658 = Object.freeze(Object.defineProperties(["(typeof ", " === 'undefined' ?\n 'undefined' : ", ")"], {raw: {value: Object.freeze(["(typeof ", " === 'undefined' ?\n 'undefined' : ", ")"])}}));
var $__659 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
BinaryExpression = $__659.BinaryExpression,
MemberLookupExpression = $__659.MemberLookupExpression,
UnaryExpression = $__659.UnaryExpression;
var ExplodeExpressionTransformer = System.get("traceur@0.0.52/src/codegeneration/ExplodeExpressionTransformer").ExplodeExpressionTransformer;
var $__661 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
IDENTIFIER_EXPRESSION = $__661.IDENTIFIER_EXPRESSION,
LITERAL_EXPRESSION = $__661.LITERAL_EXPRESSION,
MEMBER_LOOKUP_EXPRESSION = $__661.MEMBER_LOOKUP_EXPRESSION,
UNARY_EXPRESSION = $__661.UNARY_EXPRESSION;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__663 = System.get("traceur@0.0.52/src/syntax/TokenType"),
EQUAL = $__663.EQUAL,
EQUAL_EQUAL = $__663.EQUAL_EQUAL,
EQUAL_EQUAL_EQUAL = $__663.EQUAL_EQUAL_EQUAL,
IN = $__663.IN,
NOT_EQUAL = $__663.NOT_EQUAL,
NOT_EQUAL_EQUAL = $__663.NOT_EQUAL_EQUAL,
STRING = $__663.STRING,
TYPEOF = $__663.TYPEOF;
var createParenExpression = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory").createParenExpression;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
var ExplodeSymbolExpression = function ExplodeSymbolExpression() {
$traceurRuntime.defaultSuperCall(this, $ExplodeSymbolExpression.prototype, arguments);
};
var $ExplodeSymbolExpression = ExplodeSymbolExpression;
($traceurRuntime.createClass)(ExplodeSymbolExpression, {
transformArrowFunctionExpression: function(tree) {
return tree;
},
transformClassExpression: function(tree) {
return tree;
},
transformFunctionBody: function(tree) {
return tree;
}
}, {}, ExplodeExpressionTransformer);
function isEqualityExpression(tree) {
switch (tree.operator.type) {
case EQUAL_EQUAL:
case EQUAL_EQUAL_EQUAL:
case NOT_EQUAL:
case NOT_EQUAL_EQUAL:
return true;
}
return false;
}
function isTypeof(tree) {
return tree.type === UNARY_EXPRESSION && tree.operator.type === TYPEOF;
}
function isSafeTypeofString(tree) {
if (tree.type !== LITERAL_EXPRESSION)
return false;
var value = tree.literalToken.processedValue;
switch (value) {
case 'symbol':
case 'object':
return false;
}
return true;
}
var SymbolTransformer = function SymbolTransformer() {
$traceurRuntime.defaultSuperCall(this, $SymbolTransformer.prototype, arguments);
};
var $SymbolTransformer = SymbolTransformer;
($traceurRuntime.createClass)(SymbolTransformer, {
transformTypeofOperand_: function(tree) {
var operand = this.transformAny(tree.operand);
return new UnaryExpression(tree.location, tree.operator, operand);
},
transformBinaryExpression: function(tree) {
if (tree.operator.type === IN) {
var name = this.transformAny(tree.left);
var object = this.transformAny(tree.right);
if (name.type === LITERAL_EXPRESSION)
return new BinaryExpression(tree.location, name, tree.operator, object);
return parseExpression($__654, name, object);
}
if (isEqualityExpression(tree)) {
if (isTypeof(tree.left) && isSafeTypeofString(tree.right)) {
var left = this.transformTypeofOperand_(tree.left);
var right = tree.right;
return new BinaryExpression(tree.location, left, tree.operator, right);
}
if (isTypeof(tree.right) && isSafeTypeofString(tree.left)) {
var left = tree.left;
var right = this.transformTypeofOperand_(tree.right);
return new BinaryExpression(tree.location, left, tree.operator, right);
}
}
if (tree.left.type === MEMBER_LOOKUP_EXPRESSION && tree.operator.isAssignmentOperator()) {
if (tree.operator.type !== EQUAL) {
var exploded = new ExplodeSymbolExpression(this).transformAny(tree);
return this.transformAny(createParenExpression(exploded));
}
var operand = this.transformAny(tree.left.operand);
var memberExpression = this.transformAny(tree.left.memberExpression);
var value = this.transformAny(tree.right);
return parseExpression($__655, operand, memberExpression, value);
}
return $traceurRuntime.superCall(this, $SymbolTransformer.prototype, "transformBinaryExpression", [tree]);
},
transformMemberLookupExpression: function(tree) {
var operand = this.transformAny(tree.operand);
var memberExpression = this.transformAny(tree.memberExpression);
if (memberExpression.type === LITERAL_EXPRESSION && memberExpression.literalToken.type !== STRING) {
return new MemberLookupExpression(tree.location, operand, memberExpression);
}
return parseExpression($__656, operand, memberExpression);
},
transformUnaryExpression: function(tree) {
if (tree.operator.type !== TYPEOF)
return $traceurRuntime.superCall(this, $SymbolTransformer.prototype, "transformUnaryExpression", [tree]);
var operand = this.transformAny(tree.operand);
var expression = parseExpression($__657, operand);
if (operand.type === IDENTIFIER_EXPRESSION) {
return parseExpression($__658, operand, expression);
}
return expression;
}
}, {}, TempVarTransformer);
return {get SymbolTransformer() {
return SymbolTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/TemplateLiteralTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/TemplateLiteralTransformer";
var $__667 = Object.freeze(Object.defineProperties(["Object.freeze(Object.defineProperties(", ", {\n raw: {\n value: Object.freeze(", ")\n }\n }))"], {raw: {value: Object.freeze(["Object.freeze(Object.defineProperties(", ", {\n raw: {\n value: Object.freeze(", ")\n }\n }))"])}}));
var $__668 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BINARY_EXPRESSION = $__668.BINARY_EXPRESSION,
COMMA_EXPRESSION = $__668.COMMA_EXPRESSION,
CONDITIONAL_EXPRESSION = $__668.CONDITIONAL_EXPRESSION,
TEMPLATE_LITERAL_PORTION = $__668.TEMPLATE_LITERAL_PORTION;
var $__669 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
LiteralExpression = $__669.LiteralExpression,
ParenExpression = $__669.ParenExpression;
var LiteralToken = System.get("traceur@0.0.52/src/syntax/LiteralToken").LiteralToken;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var TempVarTransformer = System.get("traceur@0.0.52/src/codegeneration/TempVarTransformer").TempVarTransformer;
var $__673 = System.get("traceur@0.0.52/src/syntax/TokenType"),
PERCENT = $__673.PERCENT,
PLUS = $__673.PLUS,
SLASH = $__673.SLASH,
STAR = $__673.STAR,
STRING = $__673.STRING;
var $__674 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__674.createArgumentList,
createArrayLiteralExpression = $__674.createArrayLiteralExpression,
createBinaryExpression = $__674.createBinaryExpression,
createCallExpression = $__674.createCallExpression,
createIdentifierExpression = $__674.createIdentifierExpression,
createOperatorToken = $__674.createOperatorToken,
createStringLiteral = $__674.createStringLiteral;
var parseExpression = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseExpression;
function createCallSiteIdObject(tree) {
var elements = tree.elements;
var cooked = createCookedStringArray(elements);
var raw = createRawStringArray(elements);
return parseExpression($__667, cooked, raw);
}
function maybeAddEmptyStringAtEnd(elements, items) {
var length = elements.length;
if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION)
items.push(createStringLiteral(''));
}
function createRawStringArray(elements) {
var items = [];
for (var i = 0; i < elements.length; i += 2) {
var str = elements[i].value.value;
str = str.replace(/\r\n?/g, '\n');
str = JSON.stringify(str);
str = replaceRaw(str);
var loc = elements[i].location;
var expr = new LiteralExpression(loc, new LiteralToken(STRING, str, loc));
items.push(expr);
}
maybeAddEmptyStringAtEnd(elements, items);
return createArrayLiteralExpression(items);
}
function createCookedStringLiteralExpression(tree) {
var str = cookString(tree.value.value);
var loc = tree.location;
return new LiteralExpression(loc, new LiteralToken(STRING, str, loc));
}
function createCookedStringArray(elements) {
var items = [];
for (var i = 0; i < elements.length; i += 2) {
items.push(createCookedStringLiteralExpression(elements[i]));
}
maybeAddEmptyStringAtEnd(elements, items);
return createArrayLiteralExpression(items);
}
function replaceRaw(s) {
return s.replace(/\u2028|\u2029/g, function(c) {
switch (c) {
case '\u2028':
return '\\u2028';
case '\u2029':
return '\\u2029';
default:
throw Error('Not reachable');
}
});
}
function cookString(s) {
var sb = ['"'];
var i = 0,
k = 1,
c,
c2;
while (i < s.length) {
c = s[i++];
switch (c) {
case '\\':
c2 = s[i++];
switch (c2) {
case '\n':
case '\u2028':
case '\u2029':
break;
case '\r':
if (s[i + 1] === '\n') {
i++;
}
break;
default:
sb[k++] = c;
sb[k++] = c2;
}
break;
case '"':
sb[k++] = '\\"';
break;
case '\n':
sb[k++] = '\\n';
break;
case '\r':
if (s[i] === '\n')
i++;
sb[k++] = '\\n';
break;
case '\t':
sb[k++] = '\\t';
break;
case '\f':
sb[k++] = '\\f';
break;
case '\b':
sb[k++] = '\\b';
break;
case '\u2028':
sb[k++] = '\\u2028';
break;
case '\u2029':
sb[k++] = '\\u2029';
break;
default:
sb[k++] = c;
}
}
sb[k++] = '"';
return sb.join('');
}
var TemplateLiteralTransformer = function TemplateLiteralTransformer() {
$traceurRuntime.defaultSuperCall(this, $TemplateLiteralTransformer.prototype, arguments);
};
var $TemplateLiteralTransformer = TemplateLiteralTransformer;
($traceurRuntime.createClass)(TemplateLiteralTransformer, {
transformFunctionBody: function(tree) {
return ParseTreeTransformer.prototype.transformFunctionBody.call(this, tree);
},
transformTemplateLiteralExpression: function(tree) {
if (!tree.operand)
return this.createDefaultTemplateLiteral(tree);
var operand = this.transformAny(tree.operand);
var elements = tree.elements;
var callsiteIdObject = createCallSiteIdObject(tree);
var idName = this.addTempVar(callsiteIdObject);
var args = [createIdentifierExpression(idName)];
for (var i = 1; i < elements.length; i += 2) {
args.push(this.transformAny(elements[i]));
}
return createCallExpression(operand, createArgumentList(args));
},
transformTemplateSubstitution: function(tree) {
var transformedTree = this.transformAny(tree.expression);
switch (transformedTree.type) {
case BINARY_EXPRESSION:
switch (transformedTree.operator.type) {
case STAR:
case PERCENT:
case SLASH:
return transformedTree;
}
case COMMA_EXPRESSION:
case CONDITIONAL_EXPRESSION:
return new ParenExpression(null, transformedTree);
}
return transformedTree;
},
transformTemplateLiteralPortion: function(tree) {
return createCookedStringLiteralExpression(tree);
},
createDefaultTemplateLiteral: function(tree) {
var length = tree.elements.length;
if (length === 0) {
var loc = tree.location;
return new LiteralExpression(loc, new LiteralToken(STRING, '""', loc));
}
var firstNonEmpty = tree.elements[0].value.value === '' ? -1 : 0;
var binaryExpression = this.transformAny(tree.elements[0]);
if (length == 1)
return binaryExpression;
var plusToken = createOperatorToken(PLUS);
for (var i = 1; i < length; i++) {
var element = tree.elements[i];
if (element.type === TEMPLATE_LITERAL_PORTION) {
if (element.value.value === '')
continue;
else if (firstNonEmpty < 0 && i === 2)
binaryExpression = binaryExpression.right;
}
var transformedTree = this.transformAny(tree.elements[i]);
binaryExpression = createBinaryExpression(binaryExpression, plusToken, transformedTree);
}
return new ParenExpression(null, binaryExpression);
}
}, {}, TempVarTransformer);
return {get TemplateLiteralTransformer() {
return TemplateLiteralTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/TypeAssertionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/TypeAssertionTransformer";
var $__677 = Object.freeze(Object.defineProperties(["assert.type(", ", ", ")"], {raw: {value: Object.freeze(["assert.type(", ", ", ")"])}})),
$__678 = Object.freeze(Object.defineProperties(["assert.argumentTypes(", ")"], {raw: {value: Object.freeze(["assert.argumentTypes(", ")"])}})),
$__679 = Object.freeze(Object.defineProperties(["return assert.returnType((", "), ", ")"], {raw: {value: Object.freeze(["return assert.returnType((", "), ", ")"])}})),
$__680 = Object.freeze(Object.defineProperties(["$traceurRuntime.type.any"], {raw: {value: Object.freeze(["$traceurRuntime.type.any"])}}));
var $__681 = System.get("traceur@0.0.52/src/syntax/trees/ParseTreeType"),
BINDING_ELEMENT = $__681.BINDING_ELEMENT,
REST_PARAMETER = $__681.REST_PARAMETER;
var $__682 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
ImportDeclaration = $__682.ImportDeclaration,
ImportSpecifier = $__682.ImportSpecifier,
ImportSpecifierSet = $__682.ImportSpecifierSet,
Module = $__682.Module,
ModuleSpecifier = $__682.ModuleSpecifier,
Script = $__682.Script,
VariableDeclaration = $__682.VariableDeclaration;
var $__683 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createArgumentList = $__683.createArgumentList,
createIdentifierExpression = $__683.createIdentifierExpression,
createIdentifierToken = $__683.createIdentifierToken,
createStringLiteralToken = $__683.createStringLiteralToken;
var $__684 = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser"),
parseExpression = $__684.parseExpression,
parseStatement = $__684.parseStatement;
var ParameterTransformer = System.get("traceur@0.0.52/src/codegeneration/ParameterTransformer").ParameterTransformer;
var options = System.get("traceur@0.0.52/src/Options").options;
var TypeAssertionTransformer = function TypeAssertionTransformer(identifierGenerator) {
$traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "constructor", [identifierGenerator]);
this.returnTypeStack_ = [];
this.parametersStack_ = [];
this.assertionAdded_ = false;
};
var $TypeAssertionTransformer = TypeAssertionTransformer;
($traceurRuntime.createClass)(TypeAssertionTransformer, {
transformScript: function(tree) {
return this.prependAssertionImport_($traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformScript", [tree]), Script);
},
transformModule: function(tree) {
return this.prependAssertionImport_($traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformModule", [tree]), Module);
},
transformVariableDeclaration: function(tree) {
if (tree.typeAnnotation && tree.initializer) {
var assert = parseExpression($__677, tree.initializer, tree.typeAnnotation);
tree = new VariableDeclaration(tree.location, tree.lvalue, tree.typeAnnotation, assert);
this.assertionAdded_ = true;
}
return $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformVariableDeclaration", [tree]);
},
transformFormalParameterList: function(tree) {
this.parametersStack_.push({
atLeastOneParameterTyped: false,
arguments: []
});
var transformed = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformFormalParameterList", [tree]);
var params = this.parametersStack_.pop();
if (params.atLeastOneParameterTyped) {
var argumentList = createArgumentList(params.arguments);
var assertStatement = parseStatement($__678, argumentList);
this.parameterStatements.push(assertStatement);
this.assertionAdded_ = true;
}
return transformed;
},
transformFormalParameter: function(tree) {
var transformed = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformFormalParameter", [tree]);
switch (transformed.parameter.type) {
case BINDING_ELEMENT:
this.transformBindingElementParameter_(transformed.parameter, transformed.typeAnnotation);
break;
case REST_PARAMETER:
break;
}
return transformed;
},
transformGetAccessor: function(tree) {
this.pushReturnType_(tree.typeAnnotation);
tree = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformGetAccessor", [tree]);
this.popReturnType_();
return tree;
},
transformPropertyMethodAssignment: function(tree) {
this.pushReturnType_(tree.typeAnnotation);
tree = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformPropertyMethodAssignment", [tree]);
this.popReturnType_();
return tree;
},
transformFunctionDeclaration: function(tree) {
this.pushReturnType_(tree.typeAnnotation);
tree = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformFunctionDeclaration", [tree]);
this.popReturnType_();
return tree;
},
transformFunctionExpression: function(tree) {
this.pushReturnType_(tree.typeAnnotation);
tree = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformFunctionExpression", [tree]);
this.popReturnType_();
return tree;
},
transformReturnStatement: function(tree) {
tree = $traceurRuntime.superCall(this, $TypeAssertionTransformer.prototype, "transformReturnStatement", [tree]);
if (this.returnType_ && tree.expression) {
this.assertionAdded_ = true;
return parseStatement($__679, tree.expression, this.returnType_);
}
return tree;
},
transformBindingElementParameter_: function(element, typeAnnotation) {
if (!element.binding.isPattern()) {
if (typeAnnotation) {
this.paramTypes_.atLeastOneParameterTyped = true;
} else {
typeAnnotation = parseExpression($__680);
}
this.paramTypes_.arguments.push(createIdentifierExpression(element.binding.identifierToken), typeAnnotation);
return;
}
},
pushReturnType_: function(typeAnnotation) {
this.returnTypeStack_.push(this.transformAny(typeAnnotation));
},
prependAssertionImport_: function(tree, Ctor) {
if (!this.assertionAdded_ || options.typeAssertionModule === null)
return tree;
var importStatement = new ImportDeclaration(null, new ImportSpecifierSet(null, [new ImportSpecifier(null, createIdentifierToken('assert'), null)]), new ModuleSpecifier(null, createStringLiteralToken(options.typeAssertionModule)));
tree = new Ctor(tree.location, $traceurRuntime.spread([importStatement], tree.scriptItemList), tree.moduleName);
return tree;
},
popReturnType_: function() {
return this.returnTypeStack_.pop();
},
get returnType_() {
return this.returnTypeStack_.length > 0 ? this.returnTypeStack_[this.returnTypeStack_.length - 1] : null;
},
get paramTypes_() {
return this.parametersStack_[this.parametersStack_.length - 1];
}
}, {}, ParameterTransformer);
return {get TypeAssertionTransformer() {
return TypeAssertionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/TypeToExpressionTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/TypeToExpressionTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__689 = System.get("traceur@0.0.52/src/codegeneration/ParseTreeFactory"),
createIdentifierExpression = $__689.createIdentifierExpression,
createMemberExpression = $__689.createMemberExpression;
var TypeToExpressionTransformer = function TypeToExpressionTransformer() {
$traceurRuntime.defaultSuperCall(this, $TypeToExpressionTransformer.prototype, arguments);
};
var $TypeToExpressionTransformer = TypeToExpressionTransformer;
($traceurRuntime.createClass)(TypeToExpressionTransformer, {
transformTypeName: function(tree) {
return createIdentifierExpression(tree.name);
},
transformPredefinedType: function(tree) {
return createMemberExpression('$traceurRuntime', 'type', tree.typeToken);
}
}, {}, ParseTreeTransformer);
return {get TypeToExpressionTransformer() {
return TypeToExpressionTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/TypeTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/TypeTransformer";
var $__691 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
FormalParameter = $__691.FormalParameter,
FunctionDeclaration = $__691.FunctionDeclaration,
FunctionExpression = $__691.FunctionExpression,
GetAccessor = $__691.GetAccessor,
PropertyMethodAssignment = $__691.PropertyMethodAssignment,
VariableDeclaration = $__691.VariableDeclaration;
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var TypeTransformer = function TypeTransformer() {
$traceurRuntime.defaultSuperCall(this, $TypeTransformer.prototype, arguments);
};
var $TypeTransformer = TypeTransformer;
($traceurRuntime.createClass)(TypeTransformer, {
transformVariableDeclaration: function(tree) {
if (tree.typeAnnotation) {
tree = new VariableDeclaration(tree.location, tree.lvalue, null, tree.initializer);
}
return $traceurRuntime.superCall(this, $TypeTransformer.prototype, "transformVariableDeclaration", [tree]);
},
transformFormalParameter: function(tree) {
if (tree.typeAnnotation !== null)
return new FormalParameter(tree.location, tree.parameter, null, []);
return tree;
},
transformFunctionDeclaration: function(tree) {
if (tree.typeAnnotation) {
tree = new FunctionDeclaration(tree.location, tree.name, tree.functionKind, tree.parameterList, null, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $TypeTransformer.prototype, "transformFunctionDeclaration", [tree]);
},
transformFunctionExpression: function(tree) {
if (tree.typeAnnotation) {
tree = new FunctionExpression(tree.location, tree.name, tree.functionKind, tree.parameterList, null, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $TypeTransformer.prototype, "transformFunctionExpression", [tree]);
},
transformPropertyMethodAssignment: function(tree) {
if (tree.typeAnnotation) {
tree = new PropertyMethodAssignment(tree.location, tree.isStatic, tree.functionKind, tree.name, tree.parameterList, null, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $TypeTransformer.prototype, "transformPropertyMethodAssignment", [tree]);
},
transformGetAccessor: function(tree) {
if (tree.typeAnnotation) {
tree = new GetAccessor(tree.location, tree.isStatic, tree.name, null, tree.annotations, tree.body);
}
return $traceurRuntime.superCall(this, $TypeTransformer.prototype, "transformGetAccessor", [tree]);
}
}, {}, ParseTreeTransformer);
return {get TypeTransformer() {
return TypeTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/UniqueIdentifierGenerator", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/UniqueIdentifierGenerator";
var UniqueIdentifierGenerator = function UniqueIdentifierGenerator() {
this.identifierIndex = 0;
};
($traceurRuntime.createClass)(UniqueIdentifierGenerator, {generateUniqueIdentifier: function() {
return ("$__" + this.identifierIndex++);
}}, {});
return {get UniqueIdentifierGenerator() {
return UniqueIdentifierGenerator;
}};
});
System.register("traceur@0.0.52/src/codegeneration/FromOptionsTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/FromOptionsTransformer";
var AmdTransformer = System.get("traceur@0.0.52/src/codegeneration/AmdTransformer").AmdTransformer;
var AnnotationsTransformer = System.get("traceur@0.0.52/src/codegeneration/AnnotationsTransformer").AnnotationsTransformer;
var ArrayComprehensionTransformer = System.get("traceur@0.0.52/src/codegeneration/ArrayComprehensionTransformer").ArrayComprehensionTransformer;
var ArrowFunctionTransformer = System.get("traceur@0.0.52/src/codegeneration/ArrowFunctionTransformer").ArrowFunctionTransformer;
var BlockBindingTransformer = System.get("traceur@0.0.52/src/codegeneration/BlockBindingTransformer").BlockBindingTransformer;
var ClassTransformer = System.get("traceur@0.0.52/src/codegeneration/ClassTransformer").ClassTransformer;
var CommonJsModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/CommonJsModuleTransformer").CommonJsModuleTransformer;
var validateConst = System.get("traceur@0.0.52/src/semantics/ConstChecker").validate;
var DefaultParametersTransformer = System.get("traceur@0.0.52/src/codegeneration/DefaultParametersTransformer").DefaultParametersTransformer;
var DestructuringTransformer = System.get("traceur@0.0.52/src/codegeneration/DestructuringTransformer").DestructuringTransformer;
var ForOfTransformer = System.get("traceur@0.0.52/src/codegeneration/ForOfTransformer").ForOfTransformer;
var validateFreeVariables = System.get("traceur@0.0.52/src/semantics/FreeVariableChecker").validate;
var GeneratorComprehensionTransformer = System.get("traceur@0.0.52/src/codegeneration/GeneratorComprehensionTransformer").GeneratorComprehensionTransformer;
var GeneratorTransformPass = System.get("traceur@0.0.52/src/codegeneration/GeneratorTransformPass").GeneratorTransformPass;
var InlineModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/InlineModuleTransformer").InlineModuleTransformer;
var ModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/ModuleTransformer").ModuleTransformer;
var MultiTransformer = System.get("traceur@0.0.52/src/codegeneration/MultiTransformer").MultiTransformer;
var NumericLiteralTransformer = System.get("traceur@0.0.52/src/codegeneration/NumericLiteralTransformer").NumericLiteralTransformer;
var ObjectLiteralTransformer = System.get("traceur@0.0.52/src/codegeneration/ObjectLiteralTransformer").ObjectLiteralTransformer;
var PropertyNameShorthandTransformer = System.get("traceur@0.0.52/src/codegeneration/PropertyNameShorthandTransformer").PropertyNameShorthandTransformer;
var InstantiateModuleTransformer = System.get("traceur@0.0.52/src/codegeneration/InstantiateModuleTransformer").InstantiateModuleTransformer;
var RestParameterTransformer = System.get("traceur@0.0.52/src/codegeneration/RestParameterTransformer").RestParameterTransformer;
var SpreadTransformer = System.get("traceur@0.0.52/src/codegeneration/SpreadTransformer").SpreadTransformer;
var SymbolTransformer = System.get("traceur@0.0.52/src/codegeneration/SymbolTransformer").SymbolTransformer;
var TemplateLiteralTransformer = System.get("traceur@0.0.52/src/codegeneration/TemplateLiteralTransformer").TemplateLiteralTransformer;
var TypeTransformer = System.get("traceur@0.0.52/src/codegeneration/TypeTransformer").TypeTransformer;
var TypeAssertionTransformer = System.get("traceur@0.0.52/src/codegeneration/TypeAssertionTransformer").TypeAssertionTransformer;
var TypeToExpressionTransformer = System.get("traceur@0.0.52/src/codegeneration/TypeToExpressionTransformer").TypeToExpressionTransformer;
var UniqueIdentifierGenerator = System.get("traceur@0.0.52/src/codegeneration/UniqueIdentifierGenerator").UniqueIdentifierGenerator;
var $__724 = System.get("traceur@0.0.52/src/Options"),
options = $__724.options,
transformOptions = $__724.transformOptions;
var FromOptionsTransformer = function FromOptionsTransformer(reporter) {
var idGenerator = arguments[1] !== (void 0) ? arguments[1] : new UniqueIdentifierGenerator();
var $__725 = this;
$traceurRuntime.superCall(this, $FromOptionsTransformer.prototype, "constructor", [reporter, options.validate]);
var append = (function(transformer) {
$__725.append((function(tree) {
return new transformer(idGenerator, reporter).transformAny(tree);
}));
});
if (transformOptions.blockBinding) {
this.append((function(tree) {
validateConst(tree, reporter);
return tree;
}));
}
if (options.freeVariableChecker) {
this.append((function(tree) {
validateFreeVariables(tree, reporter);
return tree;
}));
}
if (transformOptions.numericLiterals)
append(NumericLiteralTransformer);
if (transformOptions.templateLiterals)
append(TemplateLiteralTransformer);
if (options.types) {
append(TypeToExpressionTransformer);
}
if (transformOptions.annotations)
append(AnnotationsTransformer);
if (options.typeAssertions)
append(TypeAssertionTransformer);
if (transformOptions.propertyNameShorthand)
append(PropertyNameShorthandTransformer);
if (transformOptions.modules) {
switch (transformOptions.modules) {
case 'commonjs':
append(CommonJsModuleTransformer);
break;
case 'amd':
append(AmdTransformer);
break;
case 'inline':
append(InlineModuleTransformer);
break;
case 'instantiate':
append(InstantiateModuleTransformer);
break;
case 'register':
append(ModuleTransformer);
break;
default:
throw new Error('Invalid modules transform option');
}
}
if (transformOptions.arrowFunctions)
append(ArrowFunctionTransformer);
if (transformOptions.classes)
append(ClassTransformer);
if (transformOptions.propertyMethods || transformOptions.computedPropertyNames) {
append(ObjectLiteralTransformer);
}
if (transformOptions.generatorComprehension)
append(GeneratorComprehensionTransformer);
if (transformOptions.arrayComprehension)
append(ArrayComprehensionTransformer);
if (transformOptions.forOf)
append(ForOfTransformer);
if (transformOptions.restParameters)
append(RestParameterTransformer);
if (transformOptions.defaultParameters)
append(DefaultParametersTransformer);
if (transformOptions.destructuring)
append(DestructuringTransformer);
if (transformOptions.types)
append(TypeTransformer);
if (transformOptions.spread)
append(SpreadTransformer);
if (transformOptions.blockBinding)
append(BlockBindingTransformer);
if (transformOptions.generators || transformOptions.asyncFuntions)
append(GeneratorTransformPass);
if (transformOptions.symbols)
append(SymbolTransformer);
};
var $FromOptionsTransformer = FromOptionsTransformer;
($traceurRuntime.createClass)(FromOptionsTransformer, {}, {}, MultiTransformer);
return {get FromOptionsTransformer() {
return FromOptionsTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/PureES6Transformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/PureES6Transformer";
var AnnotationsTransformer = System.get("traceur@0.0.52/src/codegeneration/AnnotationsTransformer").AnnotationsTransformer;
var validateFreeVariables = System.get("traceur@0.0.52/src/semantics/FreeVariableChecker").validate;
var MultiTransformer = System.get("traceur@0.0.52/src/codegeneration/MultiTransformer").MultiTransformer;
var TypeTransformer = System.get("traceur@0.0.52/src/codegeneration/TypeTransformer").TypeTransformer;
var UniqueIdentifierGenerator = System.get("traceur@0.0.52/src/codegeneration/UniqueIdentifierGenerator").UniqueIdentifierGenerator;
var options = System.get("traceur@0.0.52/src/Options").options;
var PureES6Transformer = function PureES6Transformer(reporter) {
var idGenerator = arguments[1] !== (void 0) ? arguments[1] : new UniqueIdentifierGenerator();
var $__733 = this;
$traceurRuntime.superCall(this, $PureES6Transformer.prototype, "constructor", [reporter, options.validate]);
var append = (function(transformer) {
$__733.append((function(tree) {
return new transformer(idGenerator, reporter).transformAny(tree);
}));
});
if (options.freeVariableChecker) {
this.append((function(tree) {
validateFreeVariables(tree, reporter);
return tree;
}));
}
append(AnnotationsTransformer);
append(TypeTransformer);
};
var $PureES6Transformer = PureES6Transformer;
($traceurRuntime.createClass)(PureES6Transformer, {}, {}, MultiTransformer);
return {get PureES6Transformer() {
return PureES6Transformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/AttachModuleNameTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/AttachModuleNameTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__736 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
Module = $__736.Module,
Script = $__736.Script;
var AttachModuleNameTransformer = function AttachModuleNameTransformer(moduleName) {
this.moduleName_ = moduleName;
};
($traceurRuntime.createClass)(AttachModuleNameTransformer, {
transformModule: function(tree) {
return new Module(tree.location, tree.scriptItemList, this.moduleName_);
},
transformScript: function(tree) {
return new Script(tree.location, tree.scriptItemList, this.moduleName_);
}
}, {}, ParseTreeTransformer);
return {get AttachModuleNameTransformer() {
return AttachModuleNameTransformer;
}};
});
System.register("traceur@0.0.52/src/util/CollectingErrorReporter", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/CollectingErrorReporter";
var ErrorReporter = System.get("traceur@0.0.52/src/util/ErrorReporter").ErrorReporter;
var CollectingErrorReporter = function CollectingErrorReporter() {
$traceurRuntime.superCall(this, $CollectingErrorReporter.prototype, "constructor", []);
this.errors = [];
};
var $CollectingErrorReporter = CollectingErrorReporter;
($traceurRuntime.createClass)(CollectingErrorReporter, {
reportMessageInternal: function(location, message) {
if (location)
message = (location + ": " + message);
this.errors.push(message);
},
errorsAsString: function() {
return this.errors.join('\n');
},
toException: function() {
return new Error(this.errorsAsString());
}
}, {}, ErrorReporter);
return {get CollectingErrorReporter() {
return CollectingErrorReporter;
}};
});
System.register("traceur@0.0.52/src/Compiler", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/Compiler";
var AttachModuleNameTransformer = System.get("traceur@0.0.52/src/codegeneration/module/AttachModuleNameTransformer").AttachModuleNameTransformer;
var FromOptionsTransformer = System.get("traceur@0.0.52/src/codegeneration/FromOptionsTransformer").FromOptionsTransformer;
var Parser = System.get("traceur@0.0.52/src/syntax/Parser").Parser;
var PureES6Transformer = System.get("traceur@0.0.52/src/codegeneration/PureES6Transformer").PureES6Transformer;
var SourceFile = System.get("traceur@0.0.52/src/syntax/SourceFile").SourceFile;
var SourceMapGenerator = System.get("traceur@0.0.52/src/outputgeneration/SourceMapIntegration").SourceMapGenerator;
var CollectingErrorReporter = System.get("traceur@0.0.52/src/util/CollectingErrorReporter").CollectingErrorReporter;
var $__747 = System.get("traceur@0.0.52/src/Options"),
traceurOptions = $__747.options,
versionLockedOptions = $__747.versionLockedOptions;
var write = System.get("traceur@0.0.52/src/outputgeneration/TreeWriter").write;
function merge() {
for (var srcs = [],
$__751 = 0; $__751 < arguments.length; $__751++)
srcs[$__751] = arguments[$__751];
var dest = Object.create(null);
srcs.forEach((function(src) {
Object.keys(src).forEach((function(key) {
dest[key] = src[key];
}));
var srcModules = src.modules;
if (typeof srcModules !== 'undefined') {
dest.modules = srcModules;
}
}));
return dest;
}
var Compiler = function Compiler() {
var overridingOptions = arguments[0] !== (void 0) ? arguments[0] : {};
this.defaultOptions_ = merge(this.defaultOptions(), overridingOptions);
};
($traceurRuntime.createClass)(Compiler, {
script: function(content) {
var options = arguments[1] !== (void 0) ? arguments[1] : {};
options.modules = false;
return this.compile(content, options);
},
module: function(content) {
var options = arguments[1] !== (void 0) ? arguments[1] : {};
options.modules = 'register';
return this.compile(content, options);
},
compile: function(content) {
var options = arguments[1] !== (void 0) ? arguments[1] : {};
var $__749 = this;
return this.parse({
content: content,
options: options
}).then((function(result) {
return $__749.transform(result);
})).then((function(result) {
return $__749.write(result);
}));
},
stringToString: function(content) {
var options = arguments[1] !== (void 0) ? arguments[1] : {};
var output = this.stringToTree({
content: content,
options: options
});
if (output.errors.length)
return output;
output = this.treeToTree(output);
if (output.errors.length)
return output;
return this.treeToString(output);
},
stringToTree: function($__752) {
var $__754;
var $__753 = $traceurRuntime.assertObject($__752),
content = $__753.content,
options = ($__754 = $__753.options) === void 0 ? {} : $__754;
var mergedOptions = merge(this.defaultOptions_, options);
options = traceurOptions.setFromObject(mergedOptions);
var errorReporter = new CollectingErrorReporter();
var sourceFile = new SourceFile(mergedOptions.filename, content);
var parser = new Parser(sourceFile, errorReporter);
var tree = mergedOptions.modules ? parser.parseModule() : parser.parseScript();
return {
tree: tree,
options: mergedOptions,
errors: errorReporter.errors
};
},
parse: function(input) {
return this.promise(this.stringToTree, input);
},
treeToTree: function($__752) {
var $__754 = $traceurRuntime.assertObject($__752),
tree = $__754.tree,
options = $__754.options;
var transformer;
if (options.moduleName) {
var moduleName = options.moduleName;
if (typeof moduleName !== 'string')
moduleName = this.resolveModuleName(options.filename);
if (moduleName) {
transformer = new AttachModuleNameTransformer(moduleName);
tree = transformer.transformAny(tree);
}
}
var errorReporter = new CollectingErrorReporter();
if (options.outputLanguage.toLowerCase() === 'es6') {
transformer = new PureES6Transformer(errorReporter);
} else {
transformer = new FromOptionsTransformer(errorReporter);
}
var transformedTree = transformer.transform(tree);
if (errorReporter.hadError()) {
return {
js: null,
errors: errorReporter.errors
};
} else {
return {
tree: transformedTree,
options: options,
errors: errorReporter.errors
};
}
},
transform: function(input) {
return this.promise(this.treeToTree, input);
},
treeToString: function($__752) {
var $__754 = $traceurRuntime.assertObject($__752),
tree = $__754.tree,
options = $__754.options,
errors = $__754.errors;
var treeWriterOptions = {};
if (options.sourceMaps) {
treeWriterOptions.sourceMapGenerator = new SourceMapGenerator({
file: options.filename,
sourceRoot: this.sourceRootForFilename(options.filename)
});
}
return {
js: write(tree, treeWriterOptions),
errors: errors,
generatedSourceMap: treeWriterOptions.generatedSourceMap || null
};
},
write: function(input) {
return this.promise(this.treeToString, input);
},
resolveModuleName: function(filename) {
return filename;
},
sourceRootForFilename: function(filename) {
return filename;
},
defaultOptions: function() {
return versionLockedOptions;
},
promise: function(method, input) {
var $__749 = this;
return new Promise((function(resolve, reject) {
var output = method.call($__749, input);
if (output.errors.length)
reject(new Error(output.errors.join('\n')));
else
resolve(output);
}));
}
}, {
amdOptions: function() {
var options = arguments[0] !== (void 0) ? arguments[0] : {};
var amdOptions = {
modules: 'amd',
filename: undefined,
sourceMap: false,
moduleName: true
};
return merge(amdOptions, options);
},
commonJSOptions: function() {
var options = arguments[0] !== (void 0) ? arguments[0] : {};
var commonjsOptions = {
modules: 'commonjs',
filename: '<unknown file>',
sourceMap: false,
moduleName: false
};
return merge(commonjsOptions, options);
}
});
return {get Compiler() {
return Compiler;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/ValidationVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ValidationVisitor";
var ModuleVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ModuleVisitor").ModuleVisitor;
var ValidationVisitor = function ValidationVisitor() {
$traceurRuntime.defaultSuperCall(this, $ValidationVisitor.prototype, arguments);
};
var $ValidationVisitor = ValidationVisitor;
($traceurRuntime.createClass)(ValidationVisitor, {
checkExport_: function(tree, name) {
var description = this.validatingModuleDescription_;
if (description && !description.getExport(name)) {
var moduleName = description.normalizedName;
this.reportError(tree, ("'" + name + "' is not exported by '" + moduleName + "'"));
}
},
checkImport_: function(tree, name) {
var existingImport = this.moduleSymbol.getImport(name);
if (existingImport) {
this.reportError(tree, ("'" + name + "' was previously imported at " + existingImport.location.start));
} else {
this.moduleSymbol.addImport(name, tree);
}
},
visitAndValidate_: function(moduleDescription, tree) {
var validatingModuleDescription = this.validatingModuleDescription_;
this.validatingModuleDescription_ = moduleDescription;
this.visitAny(tree);
this.validatingModuleDescription_ = validatingModuleDescription;
},
visitNamedExport: function(tree) {
if (tree.moduleSpecifier) {
var name = tree.moduleSpecifier.token.processedValue;
var moduleDescription = this.getModuleDescriptionForModuleSpecifier(name);
this.visitAndValidate_(moduleDescription, tree.specifierSet);
}
},
visitExportSpecifier: function(tree) {
this.checkExport_(tree, tree.lhs.value);
},
visitImportDeclaration: function(tree) {
var name = tree.moduleSpecifier.token.processedValue;
var moduleDescription = this.getModuleDescriptionForModuleSpecifier(name);
this.visitAndValidate_(moduleDescription, tree.importClause);
},
visitImportSpecifier: function(tree) {
var importName = tree.rhs ? tree.rhs.value : tree.lhs.value;
this.checkImport_(tree, importName);
this.checkExport_(tree, tree.lhs.value);
},
visitImportedBinding: function(tree) {
var importName = tree.binding.identifierToken.value;
this.checkImport_(tree, importName);
this.checkExport_(tree, 'default');
}
}, {}, ModuleVisitor);
return {get ValidationVisitor() {
return ValidationVisitor;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/ExportListBuilder", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ExportListBuilder";
var ExportVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ExportVisitor").ExportVisitor;
var ValidationVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ValidationVisitor").ValidationVisitor;
var transformOptions = System.get("traceur@0.0.52/src/Options").transformOptions;
function buildExportList(deps, loader, reporter) {
if (!transformOptions.modules)
return;
function doVisit(ctor) {
for (var i = 0; i < deps.length; i++) {
var visitor = new ctor(reporter, loader, deps[i].moduleSymbol);
visitor.visitAny(deps[i].tree);
}
}
function reverseVisit(ctor) {
for (var i = deps.length - 1; i >= 0; i--) {
var visitor = new ctor(reporter, loader, deps[i].moduleSymbol);
visitor.visitAny(deps[i].tree);
}
}
reverseVisit(ExportVisitor);
doVisit(ValidationVisitor);
}
return {get buildExportList() {
return buildExportList;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/ModuleSpecifierVisitor", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/ModuleSpecifierVisitor";
var ParseTreeVisitor = System.get("traceur@0.0.52/src/syntax/ParseTreeVisitor").ParseTreeVisitor;
var options = System.get("traceur@0.0.52/src/Options").options;
var ModuleSpecifierVisitor = function ModuleSpecifierVisitor() {
$traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "constructor", []);
this.moduleSpecifiers_ = Object.create(null);
};
var $ModuleSpecifierVisitor = ModuleSpecifierVisitor;
($traceurRuntime.createClass)(ModuleSpecifierVisitor, {
get moduleSpecifiers() {
return Object.keys(this.moduleSpecifiers_);
},
visitModuleSpecifier: function(tree) {
this.moduleSpecifiers_[tree.token.processedValue] = true;
},
visitVariableDeclaration: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitVariableDeclaration", [tree]);
},
visitFormalParameter: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitFormalParameter", [tree]);
},
visitGetAccessor: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitGetAccessor", [tree]);
},
visitPropertyMethodAssignment: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitPropertyMethodAssignment", [tree]);
},
visitFunctionDeclaration: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitFunctionDeclaration", [tree]);
},
visitFunctionExpression: function(tree) {
this.addTypeAssertionDependency_(tree.typeAnnotation);
return $traceurRuntime.superCall(this, $ModuleSpecifierVisitor.prototype, "visitFunctionExpression", [tree]);
},
addTypeAssertionDependency_: function(typeAnnotation) {
if (typeAnnotation !== null && options.typeAssertionModule !== null)
this.moduleSpecifiers_[options.typeAssertionModule] = true;
}
}, {}, ParseTreeVisitor);
return {get ModuleSpecifierVisitor() {
return ModuleSpecifierVisitor;
}};
});
System.register("traceur@0.0.52/src/runtime/system-map", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/system-map";
function prefixMatchLength(name, prefix) {
var prefixParts = prefix.split('/');
var nameParts = name.split('/');
if (prefixParts.length > nameParts.length)
return 0;
for (var i = 0; i < prefixParts.length; i++) {
if (nameParts[i] != prefixParts[i])
return 0;
}
return prefixParts.length;
}
function applyMap(map, name, parentName) {
var curMatch,
curMatchLength = 0;
var curParent,
curParentMatchLength = 0;
if (parentName) {
var mappedName;
Object.getOwnPropertyNames(map).some(function(p) {
var curMap = map[p];
if (curMap && typeof curMap === 'object') {
if (prefixMatchLength(parentName, p) <= curParentMatchLength)
return;
Object.getOwnPropertyNames(curMap).forEach(function(q) {
if (prefixMatchLength(name, q) > curMatchLength) {
curMatch = q;
curMatchLength = q.split('/').length;
curParent = p;
curParentMatchLength = p.split('/').length;
}
});
}
if (curMatch) {
var subPath = name.split('/').splice(curMatchLength).join('/');
mappedName = map[curParent][curMatch] + (subPath ? '/' + subPath : '');
return mappedName;
}
});
}
if (mappedName)
return mappedName;
Object.getOwnPropertyNames(map).forEach(function(p) {
var curMap = map[p];
if (curMap && typeof curMap === 'string') {
if (prefixMatchLength(name, p) > curMatchLength) {
curMatch = p;
curMatchLength = p.split('/').length;
}
}
});
if (!curMatch)
return name;
var subPath = name.split('/').splice(curMatchLength).join('/');
return map[curMatch] + (subPath ? '/' + subPath : '');
}
var systemjs = {applyMap: applyMap};
return {get systemjs() {
return systemjs;
}};
});
System.register("traceur@0.0.52/src/util/url", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/util/url";
var canonicalizeUrl = $traceurRuntime.canonicalizeUrl;
var isAbsolute = $traceurRuntime.isAbsolute;
var removeDotSegments = $traceurRuntime.removeDotSegments;
var resolveUrl = $traceurRuntime.resolveUrl;
return {
get canonicalizeUrl() {
return canonicalizeUrl;
},
get isAbsolute() {
return isAbsolute;
},
get removeDotSegments() {
return removeDotSegments;
},
get resolveUrl() {
return resolveUrl;
}
};
});
System.register("traceur@0.0.52/src/runtime/webLoader", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/webLoader";
var webLoader = {load: function(url, callback, errback) {
var xhr = new XMLHttpRequest();
xhr.onload = (function() {
if (xhr.status == 200 || xhr.status == 0) {
callback(xhr.responseText);
} else {
var err;
if (xhr.status === 404)
err = 'File not found \'' + url + '\'';
else
err = xhr.status + xhr.statusText;
errback(err);
}
xhr = null;
});
xhr.onerror = (function(err) {
errback(err);
});
xhr.open('GET', url, true);
xhr.send();
return (function() {
xhr && xhr.abort();
});
}};
return {get webLoader() {
return webLoader;
}};
});
System.register("traceur@0.0.52/src/runtime/LoaderHooks", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/LoaderHooks";
var AttachModuleNameTransformer = System.get("traceur@0.0.52/src/codegeneration/module/AttachModuleNameTransformer").AttachModuleNameTransformer;
var FromOptionsTransformer = System.get("traceur@0.0.52/src/codegeneration/FromOptionsTransformer").FromOptionsTransformer;
var buildExportList = System.get("traceur@0.0.52/src/codegeneration/module/ExportListBuilder").buildExportList;
var CollectingErrorReporter = System.get("traceur@0.0.52/src/util/CollectingErrorReporter").CollectingErrorReporter;
var ModuleSpecifierVisitor = System.get("traceur@0.0.52/src/codegeneration/module/ModuleSpecifierVisitor").ModuleSpecifierVisitor;
var ModuleSymbol = System.get("traceur@0.0.52/src/codegeneration/module/ModuleSymbol").ModuleSymbol;
var Parser = System.get("traceur@0.0.52/src/syntax/Parser").Parser;
var options = System.get("traceur@0.0.52/src/Options").options;
var SourceFile = System.get("traceur@0.0.52/src/syntax/SourceFile").SourceFile;
var systemjs = System.get("traceur@0.0.52/src/runtime/system-map").systemjs;
var UniqueIdentifierGenerator = System.get("traceur@0.0.52/src/codegeneration/UniqueIdentifierGenerator").UniqueIdentifierGenerator;
var $__774 = System.get("traceur@0.0.52/src/util/url"),
isAbsolute = $__774.isAbsolute,
resolveUrl = $__774.resolveUrl;
var webLoader = System.get("traceur@0.0.52/src/runtime/webLoader").webLoader;
var assert = System.get("traceur@0.0.52/src/util/assert").assert;
var NOT_STARTED = 0;
var LOADING = 1;
var LOADED = 2;
var PARSED = 3;
var TRANSFORMING = 4;
var TRANSFORMED = 5;
var COMPLETE = 6;
var ERROR = 7;
var identifierGenerator = new UniqueIdentifierGenerator();
var LoaderHooks = function LoaderHooks(reporter, baseURL) {
var fileLoader = arguments[2] !== (void 0) ? arguments[2] : webLoader;
var moduleStore = arguments[3] !== (void 0) ? arguments[3] : $traceurRuntime.ModuleStore;
this.baseURL_ = baseURL;
this.moduleStore_ = moduleStore;
this.fileLoader = fileLoader;
};
($traceurRuntime.createClass)(LoaderHooks, {
get: function(normalizedName) {
return this.moduleStore_.get(normalizedName);
},
set: function(normalizedName, module) {
this.moduleStore_.set(normalizedName, module);
},
normalize: function(name, referrerName, referrerAddress) {
var normalizedName = this.moduleStore_.normalize(name, referrerName, referrerAddress);
if (System.map)
return systemjs.applyMap(System.map, normalizedName, referrerName);
else
return normalizedName;
},
get baseURL() {
return this.baseURL_;
},
set baseURL(value) {
this.baseURL_ = String(value);
},
getModuleSpecifiers: function(codeUnit) {
this.parse(codeUnit);
codeUnit.state = PARSED;
var moduleSpecifierVisitor = new ModuleSpecifierVisitor();
moduleSpecifierVisitor.visit(codeUnit.metadata.tree);
return moduleSpecifierVisitor.moduleSpecifiers;
},
parse: function(codeUnit) {
assert(!codeUnit.metadata.tree);
var reporter = new CollectingErrorReporter();
var normalizedName = codeUnit.normalizedName;
var program = codeUnit.source;
var url = codeUnit.url || normalizedName;
var file = new SourceFile(url, program);
this.checkForErrors((function(reporter) {
var parser = new Parser(file, reporter);
if (codeUnit.type == 'module')
codeUnit.metadata.tree = parser.parseModule();
else
codeUnit.metadata.tree = parser.parseScript();
}));
codeUnit.metadata.moduleSymbol = new ModuleSymbol(codeUnit.metadata.tree, normalizedName);
},
transform: function(codeUnit) {
var transformer = new AttachModuleNameTransformer(codeUnit.normalizedName);
var transformedTree = transformer.transformAny(codeUnit.metadata.tree);
return this.checkForErrors((function(reporter) {
transformer = new FromOptionsTransformer(reporter, identifierGenerator);
return transformer.transform(transformedTree);
}));
},
fetch: function(load) {
var $__777 = this;
return new Promise((function(resolve, reject) {
if (!load)
reject(new TypeError('fetch requires argument object'));
else if (!load.address || typeof load.address !== 'string')
reject(new TypeError('fetch({address}) missing required string.'));
else
$__777.fileLoader.load(load.address, resolve, reject);
}));
},
translate: function(load) {
return new Promise((function(resolve, reject) {
resolve(load.source);
}));
},
instantiate: function($__779) {
var $__780 = $traceurRuntime.assertObject($__779),
name = $__780.name,
metadata = $__780.metadata,
address = $__780.address,
source = $__780.source,
sourceMap = $__780.sourceMap;
return new Promise((function(resolve, reject) {
resolve(undefined);
}));
},
locate: function(load) {
load.url = this.locate_(load);
return load.url;
},
locate_: function(load) {
var normalizedModuleName = load.normalizedName;
var asJS;
if (load.type === 'script') {
asJS = normalizedModuleName;
} else {
asJS = normalizedModuleName + '.js';
}
if (options.referrer) {
if (asJS.indexOf(options.referrer) === 0) {
asJS = asJS.slice(options.referrer.length);
load.metadata.locateMap = {
pattern: options.referrer,
replacement: ''
};
}
}
if (isAbsolute(asJS))
return asJS;
var baseURL = load.metadata && load.metadata.baseURL;
baseURL = baseURL || this.baseURL;
if (baseURL) {
load.metadata.baseURL = baseURL;
return resolveUrl(baseURL, asJS);
}
return asJS;
},
nameTrace: function(load) {
var trace = '';
if (load.metadata.locateMap) {
trace += this.locateMapTrace(load);
}
var base = load.metadata.baseURL || this.baseURL;
if (base) {
trace += this.baseURLTrace(base);
} else {
trace += 'No baseURL\n';
}
return trace;
},
locateMapTrace: function(load) {
var map = load.metadata.locateMap;
return ("LoaderHooks.locate found \'" + map.pattern + "\' -> \'" + map.replacement + "\'\n");
},
baseURLTrace: function(base) {
return 'LoaderHooks.locate resolved against base \'' + base + '\'\n';
},
evaluateCodeUnit: function(codeUnit) {
var result = ('global', eval)(codeUnit.metadata.transcoded);
codeUnit.metadata.transformedTree = null;
return result;
},
analyzeDependencies: function(dependencies, loader) {
var deps = [];
for (var i = 0; i < dependencies.length; i++) {
var codeUnit = dependencies[i];
assert(codeUnit.state >= PARSED);
if (codeUnit.state == PARSED) {
deps.push(codeUnit.metadata);
}
}
this.checkForErrors((function(reporter) {
return buildExportList(deps, loader, reporter);
}));
},
bundledModule: function(name) {
return this.moduleStore_.bundleStore[name];
},
checkForErrors: function(fncOfReporter) {
var reporter = new CollectingErrorReporter();
var result = fncOfReporter(reporter);
if (reporter.hadError())
throw reporter.toException();
return result;
}
}, {});
return {get LoaderHooks() {
return LoaderHooks;
}};
});
System.register("traceur@0.0.52/src/runtime/InterceptOutputLoaderHooks", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/InterceptOutputLoaderHooks";
var LoaderHooks = System.get("traceur@0.0.52/src/runtime/LoaderHooks").LoaderHooks;
var InterceptOutputLoaderHooks = function InterceptOutputLoaderHooks() {
for (var args = [],
$__783 = 0; $__783 < arguments.length; $__783++)
args[$__783] = arguments[$__783];
$traceurRuntime.superCall(this, $InterceptOutputLoaderHooks.prototype, "constructor", $traceurRuntime.spread(args));
this.sourceMap = null;
this.transcoded = null;
this.onTranscoded = (function() {});
};
var $InterceptOutputLoaderHooks = InterceptOutputLoaderHooks;
($traceurRuntime.createClass)(InterceptOutputLoaderHooks, {instantiate: function($__784) {
var $__785 = $traceurRuntime.assertObject($__784),
metadata = $__785.metadata,
url = $__785.url;
this.sourceMap = metadata.sourceMap;
this.transcoded = metadata.transcoded;
this.onTranscoded(metadata, url);
return undefined;
}}, {}, LoaderHooks);
return {get InterceptOutputLoaderHooks() {
return InterceptOutputLoaderHooks;
}};
});
System.register("traceur@0.0.52/src/runtime/InternalLoader", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/InternalLoader";
var LoaderHooks = System.get("traceur@0.0.52/src/runtime/LoaderHooks").LoaderHooks;
var Map = System.get("traceur@0.0.52/src/runtime/polyfills/Map").Map;
var $__788 = System.get("traceur@0.0.52/src/util/url"),
isAbsolute = $__788.isAbsolute,
resolveUrl = $__788.resolveUrl;
var options = System.get("traceur@0.0.52/src/Options").options;
var toSource = System.get("traceur@0.0.52/src/outputgeneration/toSource").toSource;
var NOT_STARTED = 0;
var LOADING = 1;
var LOADED = 2;
var PARSED = 3;
var TRANSFORMING = 4;
var TRANSFORMED = 5;
var COMPLETE = 6;
var ERROR = 7;
function mapToValues(map) {
var array = [];
map.forEach((function(v) {
array.push(v);
}));
return array;
}
var CodeUnit = function CodeUnit(loaderHooks, normalizedName, type, state, name, referrerName, address) {
var $__791 = this;
this.promise = new Promise((function(res, rej) {
$__791.loaderHooks = loaderHooks;
$__791.normalizedName = normalizedName;
$__791.type = type;
$__791.name_ = name;
$__791.referrerName_ = referrerName;
$__791.address = address;
$__791.url = InternalLoader.uniqueName(normalizedName, address);
$__791.state_ = state || NOT_STARTED;
$__791.error = null;
$__791.result = null;
$__791.data_ = {};
$__791.dependencies = [];
$__791.resolve = res;
$__791.reject = rej;
}));
};
($traceurRuntime.createClass)(CodeUnit, {
get state() {
return this.state_;
},
set state(state) {
if (state < this.state_) {
throw new Error('Invalid state change');
}
this.state_ = state;
},
get metadata() {
return this.data_;
},
nameTrace: function() {
var trace = this.specifiedAs();
if (isAbsolute(this.name_)) {
return trace + 'An absolute name.\n';
}
if (this.referrerName_) {
return trace + this.importedBy() + this.normalizesTo();
}
return trace + this.normalizesTo();
},
specifiedAs: function() {
return ("Specified as " + this.name_ + ".\n");
},
importedBy: function() {
return ("Imported by " + this.referrerName_ + ".\n");
},
normalizesTo: function() {
return 'Normalizes to ' + this.normalizedName + '\n';
},
transform: function() {
return this.loaderHooks.transform(this);
},
instantiate: function(load) {
return this.loaderHooks.instantiate(this);
}
}, {});
var PreCompiledCodeUnit = function PreCompiledCodeUnit(loaderHooks, normalizedName, name, referrerName, address, module) {
$traceurRuntime.superCall(this, $PreCompiledCodeUnit.prototype, "constructor", [loaderHooks, normalizedName, 'module', COMPLETE, name, referrerName, address]);
this.result = module;
this.resolve(this.result);
};
var $PreCompiledCodeUnit = PreCompiledCodeUnit;
($traceurRuntime.createClass)(PreCompiledCodeUnit, {}, {}, CodeUnit);
var BundledCodeUnit = function BundledCodeUnit(loaderHooks, normalizedName, name, referrerName, address, deps, execute) {
$traceurRuntime.superCall(this, $BundledCodeUnit.prototype, "constructor", [loaderHooks, normalizedName, 'module', TRANSFORMED, name, referrerName, address]);
this.deps = deps;
this.execute = execute;
};
var $BundledCodeUnit = BundledCodeUnit;
($traceurRuntime.createClass)(BundledCodeUnit, {
getModuleSpecifiers: function() {
return this.deps;
},
evaluate: function() {
var $__791 = this;
var normalizedNames = this.deps.map((function(name) {
return $__791.loaderHooks.normalize(name);
}));
var module = this.execute.apply(Reflect.global, normalizedNames);
System.set(this.normalizedName, module);
return module;
}
}, {}, CodeUnit);
var HookedCodeUnit = function HookedCodeUnit() {
$traceurRuntime.defaultSuperCall(this, $HookedCodeUnit.prototype, arguments);
};
var $HookedCodeUnit = HookedCodeUnit;
($traceurRuntime.createClass)(HookedCodeUnit, {
getModuleSpecifiers: function() {
return this.loaderHooks.getModuleSpecifiers(this);
},
evaluate: function() {
return this.loaderHooks.evaluateCodeUnit(this);
}
}, {}, CodeUnit);
var LoadCodeUnit = function LoadCodeUnit(loaderHooks, normalizedName, name, referrerName, address) {
$traceurRuntime.superCall(this, $LoadCodeUnit.prototype, "constructor", [loaderHooks, normalizedName, 'module', NOT_STARTED, name, referrerName, address]);
};
var $LoadCodeUnit = LoadCodeUnit;
($traceurRuntime.createClass)(LoadCodeUnit, {}, {}, HookedCodeUnit);
var EvalCodeUnit = function EvalCodeUnit(loaderHooks, code) {
var type = arguments[2] !== (void 0) ? arguments[2] : 'script';
var normalizedName = arguments[3];
var referrerName = arguments[4];
var address = arguments[5];
$traceurRuntime.superCall(this, $EvalCodeUnit.prototype, "constructor", [loaderHooks, normalizedName, type, LOADED, null, referrerName, address]);
this.source = code;
};
var $EvalCodeUnit = EvalCodeUnit;
($traceurRuntime.createClass)(EvalCodeUnit, {}, {}, HookedCodeUnit);
var uniqueNameCount = 0;
var InternalLoader = function InternalLoader(loaderHooks) {
this.loaderHooks = loaderHooks;
this.cache = new Map();
this.urlToKey = Object.create(null);
this.sync_ = false;
};
($traceurRuntime.createClass)(InternalLoader, {
load: function(name) {
var referrerName = arguments[1] !== (void 0) ? arguments[1] : this.loaderHooks.baseURL;
var address = arguments[2];
var type = arguments[3] !== (void 0) ? arguments[3] : 'script';
var codeUnit = this.load_(name, referrerName, address, type);
return codeUnit.promise.then((function() {
return codeUnit;
}));
},
load_: function(name, referrerName, address, type) {
var $__791 = this;
var codeUnit = this.getCodeUnit_(name, referrerName, address, type);
if (codeUnit.state === ERROR) {
return codeUnit;
}
if (codeUnit.state === TRANSFORMED) {
this.handleCodeUnitLoaded(codeUnit);
} else {
if (codeUnit.state !== NOT_STARTED)
return codeUnit;
codeUnit.state = LOADING;
codeUnit.address = this.loaderHooks.locate(codeUnit);
this.loaderHooks.fetch(codeUnit).then((function(text) {
codeUnit.source = text;
return codeUnit;
})).then(this.loaderHooks.translate.bind(this.loaderHooks)).then((function(source) {
codeUnit.source = source;
codeUnit.state = LOADED;
$__791.handleCodeUnitLoaded(codeUnit);
return codeUnit;
})).catch((function(err) {
try {
codeUnit.state = ERROR;
codeUnit.error = err;
$__791.handleCodeUnitLoadError(codeUnit);
} catch (ex) {
console.error('Internal Error ' + (ex.stack || ex));
}
}));
}
return codeUnit;
},
module: function(code, referrerName, address) {
var codeUnit = new EvalCodeUnit(this.loaderHooks, code, 'module', null, referrerName, address);
this.cache.set({}, codeUnit);
this.handleCodeUnitLoaded(codeUnit);
return codeUnit.promise;
},
define: function(normalizedName, code, address) {
var codeUnit = new EvalCodeUnit(this.loaderHooks, code, 'module', normalizedName, null, address);
var key = this.getKey(normalizedName, 'module');
this.cache.set(key, codeUnit);
this.handleCodeUnitLoaded(codeUnit);
return codeUnit.promise;
},
script: function(code, name, referrerName, address) {
var normalizedName = System.normalize(name || '', referrerName, address);
var codeUnit = new EvalCodeUnit(this.loaderHooks, code, 'script', normalizedName, referrerName, address);
var key = {};
if (name)
key = this.getKey(normalizedName, 'script');
this.cache.set(key, codeUnit);
this.handleCodeUnitLoaded(codeUnit);
return codeUnit.promise;
},
sourceMapInfo: function(normalizedName, type) {
var key = this.getKey(normalizedName, type);
var codeUnit = this.cache.get(key);
return {
sourceMap: codeUnit && codeUnit.metadata && codeUnit.metadata.sourceMap,
url: codeUnit && codeUnit.url
};
},
getKey: function(url, type) {
var combined = type + ':' + url;
if (combined in this.urlToKey) {
return this.urlToKey[combined];
}
return this.urlToKey[combined] = {};
},
getCodeUnit_: function(name, referrerName, address, type) {
var normalizedName = System.normalize(name, referrerName, address);
var key = this.getKey(normalizedName, type);
var cacheObject = this.cache.get(key);
if (!cacheObject) {
var module = this.loaderHooks.get(normalizedName);
if (module) {
cacheObject = new PreCompiledCodeUnit(this.loaderHooks, normalizedName, name, referrerName, address, module);
cacheObject.type = 'module';
} else {
var bundledModule = this.loaderHooks.bundledModule(name);
if (bundledModule) {
cacheObject = new BundledCodeUnit(this.loaderHooks, normalizedName, name, referrerName, address, bundledModule.deps, bundledModule.execute);
} else {
cacheObject = new LoadCodeUnit(this.loaderHooks, normalizedName, name, referrerName, address);
cacheObject.type = type;
}
}
this.cache.set(key, cacheObject);
}
return cacheObject;
},
areAll: function(state) {
return mapToValues(this.cache).every((function(codeUnit) {
return codeUnit.state >= state;
}));
},
getCodeUnitForModuleSpecifier: function(name, referrerName) {
return this.getCodeUnit_(name, referrerName, null, 'module');
},
handleCodeUnitLoaded: function(codeUnit) {
var $__791 = this;
var referrerName = codeUnit.normalizedName;
try {
var moduleSpecifiers = codeUnit.getModuleSpecifiers();
if (!moduleSpecifiers) {
this.abortAll(("No module specifiers in " + referrerName));
return;
}
codeUnit.dependencies = moduleSpecifiers.sort().map((function(name) {
return $__791.getCodeUnit_(name, referrerName, null, 'module');
}));
} catch (error) {
this.rejectOneAndAll(codeUnit, error);
return;
}
codeUnit.dependencies.forEach((function(dependency) {
$__791.load(dependency.normalizedName, null, null, 'module');
}));
if (this.areAll(PARSED)) {
try {
this.analyze();
this.transform();
this.evaluate();
} catch (error) {
this.rejectOneAndAll(codeUnit, error);
}
}
},
rejectOneAndAll: function(codeUnit, error) {
codeUnit.state.ERROR;
codeUnit.error = error;
codeUnit.reject(error);
this.abortAll(error);
},
handleCodeUnitLoadError: function(codeUnit) {
var message = codeUnit.error ? String(codeUnit.error) + '\n' : ("Failed to load '" + codeUnit.address + "'.\n");
message += codeUnit.nameTrace() + this.loaderHooks.nameTrace(codeUnit);
this.rejectOneAndAll(codeUnit, new Error(message));
},
abortAll: function(errorMessage) {
this.cache.forEach((function(codeUnit) {
if (codeUnit.state !== ERROR)
codeUnit.reject(errorMessage);
}));
},
analyze: function() {
this.loaderHooks.analyzeDependencies(mapToValues(this.cache), this);
},
transform: function() {
this.transformDependencies_(mapToValues(this.cache));
},
transformDependencies_: function(dependencies, dependentName) {
for (var i = 0; i < dependencies.length; i++) {
var codeUnit = dependencies[i];
if (codeUnit.state >= TRANSFORMED) {
continue;
}
if (codeUnit.state === TRANSFORMING) {
var cir = codeUnit.normalizedName;
var cle = dependentName;
this.rejectOneAndAll(codeUnit, new Error(("Unsupported circular dependency between " + cir + " and " + cle)));
return;
}
codeUnit.state = TRANSFORMING;
try {
this.transformCodeUnit_(codeUnit);
} catch (error) {
this.rejectOneAndAll(codeUnit, error);
return;
}
}
},
transformCodeUnit_: function(codeUnit) {
var $__793;
this.transformDependencies_(codeUnit.dependencies, codeUnit.normalizedName);
if (codeUnit.state === ERROR)
return;
var metadata = codeUnit.metadata;
metadata.transformedTree = codeUnit.transform();
codeUnit.state = TRANSFORMED;
var filename = codeUnit.address || codeUnit.normalizedName;
($__793 = $traceurRuntime.assertObject(toSource(metadata.transformedTree, options, filename)), metadata.transcoded = $__793[0], metadata.sourceMap = $__793[1], $__793);
if (codeUnit.address && metadata.transcoded)
metadata.transcoded += '//# sourceURL=' + codeUnit.address;
codeUnit.instantiate();
},
orderDependencies: function() {
var visited = new Map();
var ordered = [];
function orderCodeUnits(codeUnit) {
if (visited.has(codeUnit)) {
return;
}
visited.set(codeUnit, true);
codeUnit.dependencies.forEach(orderCodeUnits);
ordered.push(codeUnit);
}
this.cache.forEach(orderCodeUnits);
return ordered;
},
evaluate: function() {
var dependencies = this.orderDependencies();
for (var i = 0; i < dependencies.length; i++) {
var codeUnit = dependencies[i];
if (codeUnit.state >= COMPLETE) {
continue;
}
var result;
try {
result = codeUnit.evaluate();
} catch (ex) {
this.rejectOneAndAll(codeUnit, ex);
return;
}
codeUnit.result = result;
codeUnit.source = null;
}
for (var i = 0; i < dependencies.length; i++) {
var codeUnit = dependencies[i];
if (codeUnit.state >= COMPLETE) {
continue;
}
codeUnit.state = COMPLETE;
codeUnit.resolve(codeUnit.result);
}
}
}, {uniqueName: function(normalizedName, referrerAddress) {
var importerAddress = referrerAddress || System.baseURL;
if (!importerAddress)
throw new Error('The System.baseURL is an empty string');
var path = normalizedName || String(uniqueNameCount++);
return resolveUrl(importerAddress, path);
}});
var SystemLoaderHooks = LoaderHooks;
var internals = {
CodeUnit: CodeUnit,
EvalCodeUnit: EvalCodeUnit,
LoadCodeUnit: LoadCodeUnit,
LoaderHooks: LoaderHooks
};
return {
get InternalLoader() {
return InternalLoader;
},
get internals() {
return internals;
}
};
});
System.register("traceur@0.0.52/src/runtime/Loader", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/Loader";
var InternalLoader = System.get("traceur@0.0.52/src/runtime/InternalLoader").InternalLoader;
var Loader = function Loader(loaderHooks) {
this.internalLoader_ = new InternalLoader(loaderHooks);
this.loaderHooks_ = loaderHooks;
};
($traceurRuntime.createClass)(Loader, {
import: function(name) {
var $__797 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
referrerName = $__797.referrerName,
address = $__797.address;
var $__795 = this;
return this.internalLoader_.load(name, referrerName, address, 'module').then((function(codeUnit) {
return $__795.get(codeUnit.normalizedName);
}));
},
module: function(source) {
var $__797 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
referrerName = $__797.referrerName,
address = $__797.address;
return this.internalLoader_.module(source, referrerName, address);
},
define: function(normalizedName, source) {
var $__797 = $traceurRuntime.assertObject(arguments[2] !== (void 0) ? arguments[2] : {}),
address = $__797.address,
metadata = $__797.metadata;
return this.internalLoader_.define(normalizedName, source, address, metadata);
},
get: function(normalizedName) {
return this.loaderHooks_.get(normalizedName);
},
set: function(normalizedName, module) {
this.loaderHooks_.set(normalizedName, module);
},
normalize: function(name, referrerName, referrerAddress) {
return this.loaderHooks_.normalize(name, referrerName, referrerAddress);
},
locate: function(load) {
return this.loaderHooks_.locate(load);
},
fetch: function(load) {
return this.loaderHooks_.fetch(load);
},
translate: function(load) {
return this.loaderHooks_.translate(load);
},
instantiate: function(load) {
return this.loaderHooks_.instantiate(load);
}
}, {});
;
return {
get Loader() {
return Loader;
},
get LoaderHooks() {
return LoaderHooks;
}
};
});
System.register("traceur@0.0.52/src/WebPageTranscoder", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/WebPageTranscoder";
var Loader = System.get("traceur@0.0.52/src/runtime/Loader").Loader;
var ErrorReporter = System.get("traceur@0.0.52/src/util/ErrorReporter").ErrorReporter;
var InterceptOutputLoaderHooks = System.get("traceur@0.0.52/src/runtime/InterceptOutputLoaderHooks").InterceptOutputLoaderHooks;
var webLoader = System.get("traceur@0.0.52/src/runtime/webLoader").webLoader;
var WebPageTranscoder = function WebPageTranscoder(url) {
this.url = url;
this.numPending_ = 0;
this.numberInlined_ = 0;
};
($traceurRuntime.createClass)(WebPageTranscoder, {
asyncLoad_: function(url, fncOfContent, onScriptsReady) {
var $__802 = this;
this.numPending_++;
webLoader.load(url, (function(content) {
if (content)
fncOfContent(content);
else
console.warn('Failed to load', url);
if (--$__802.numPending_ <= 0)
onScriptsReady();
}), (function(error) {
console.error('WebPageTranscoder FAILED to load ' + url, error.stack || error);
}));
},
addFileFromScriptElement: function(scriptElement, name, content) {
var nameInfo = {
address: name,
referrerName: window.location.href
};
this.loader.module(content, nameInfo).catch(function(error) {
console.error(error.stack || error);
});
},
nextInlineScriptName_: function() {
this.numberInlined_ += 1;
if (!this.inlineScriptNameBase_) {
var segments = this.url.split('.');
segments.pop();
this.inlineScriptNameBase_ = segments.join('.');
}
return this.inlineScriptNameBase_ + '_' + this.numberInlined_ + '.js';
},
addFilesFromScriptElements: function(scriptElements, onScriptsReady) {
for (var i = 0,
length = scriptElements.length; i < length; i++) {
var scriptElement = scriptElements[i];
if (!scriptElement.src) {
var name = this.nextInlineScriptName_();
var content = scriptElement.textContent;
this.addFileFromScriptElement(scriptElement, name, content);
} else {
var name = scriptElement.src;
this.asyncLoad_(name, this.addFileFromScriptElement.bind(this, scriptElement, name), onScriptsReady);
}
}
if (this.numPending_ <= 0)
onScriptsReady();
},
get reporter() {
if (!this.reporter_) {
this.reporter_ = new ErrorReporter();
}
return this.reporter_;
},
get loader() {
if (!this.loader_) {
var loaderHooks = new InterceptOutputLoaderHooks(this.reporter, this.url);
this.loader_ = new Loader(loaderHooks);
}
return this.loader_;
},
putFile: function(file) {
var scriptElement = document.createElement('script');
scriptElement.setAttribute('data-traceur-src-url', file.name);
scriptElement.textContent = file.generatedSource;
var parent = file.scriptElement.parentNode;
parent.insertBefore(scriptElement, file.scriptElement || null);
},
selectAndProcessScripts: function(done) {
var selector = 'script[type="module"]';
var scripts = document.querySelectorAll(selector);
if (!scripts.length) {
done();
return;
}
this.addFilesFromScriptElements(scripts, (function() {
done();
}));
},
run: function() {
var done = arguments[0] !== (void 0) ? arguments[0] : (function() {});
var $__802 = this;
var ready = document.readyState;
if (ready === 'complete' || ready === 'loaded') {
this.selectAndProcessScripts(done);
} else {
document.addEventListener('DOMContentLoaded', (function() {
return $__802.selectAndProcessScripts(done);
}), false);
}
}
}, {});
return {get WebPageTranscoder() {
return WebPageTranscoder;
}};
});
System.register("traceur@0.0.52/src/codegeneration/CloneTreeTransformer", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/CloneTreeTransformer";
var ParseTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/ParseTreeTransformer").ParseTreeTransformer;
var $__805 = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees"),
BindingIdentifier = $__805.BindingIdentifier,
BreakStatement = $__805.BreakStatement,
ContinueStatement = $__805.ContinueStatement,
DebuggerStatement = $__805.DebuggerStatement,
EmptyStatement = $__805.EmptyStatement,
ExportSpecifier = $__805.ExportSpecifier,
ExportStar = $__805.ExportStar,
IdentifierExpression = $__805.IdentifierExpression,
ImportSpecifier = $__805.ImportSpecifier,
LiteralExpression = $__805.LiteralExpression,
ModuleSpecifier = $__805.ModuleSpecifier,
PredefinedType = $__805.PredefinedType,
PropertyNameShorthand = $__805.PropertyNameShorthand,
TemplateLiteralPortion = $__805.TemplateLiteralPortion,
SuperExpression = $__805.SuperExpression,
ThisExpression = $__805.ThisExpression;
var CloneTreeTransformer = function CloneTreeTransformer() {
$traceurRuntime.defaultSuperCall(this, $CloneTreeTransformer.prototype, arguments);
};
var $CloneTreeTransformer = CloneTreeTransformer;
($traceurRuntime.createClass)(CloneTreeTransformer, {
transformBindingIdentifier: function(tree) {
return new BindingIdentifier(tree.location, tree.identifierToken);
},
transformBreakStatement: function(tree) {
return new BreakStatement(tree.location, tree.name);
},
transformContinueStatement: function(tree) {
return new ContinueStatement(tree.location, tree.name);
},
transformDebuggerStatement: function(tree) {
return new DebuggerStatement(tree.location);
},
transformEmptyStatement: function(tree) {
return new EmptyStatement(tree.location);
},
transformExportSpecifier: function(tree) {
return new ExportSpecifier(tree.location, tree.lhs, tree.rhs);
},
transformExportStar: function(tree) {
return new ExportStar(tree.location);
},
transformIdentifierExpression: function(tree) {
return new IdentifierExpression(tree.location, tree.identifierToken);
},
transformImportSpecifier: function(tree) {
return new ImportSpecifier(tree.location, tree.lhs, tree.rhs);
},
transformList: function(list) {
if (!list) {
return null;
} else if (list.length == 0) {
return [];
} else {
return $traceurRuntime.superCall(this, $CloneTreeTransformer.prototype, "transformList", [list]);
}
},
transformLiteralExpression: function(tree) {
return new LiteralExpression(tree.location, tree.literalToken);
},
transformModuleSpecifier: function(tree) {
return new ModuleSpecifier(tree.location, tree.token);
},
transformPredefinedType: function(tree) {
return new PredefinedType(tree.location, tree.typeToken);
},
transformPropertyNameShorthand: function(tree) {
return new PropertyNameShorthand(tree.location, tree.name);
},
transformTemplateLiteralPortion: function(tree) {
return new TemplateLiteralPortion(tree.location, tree.value);
},
transformSuperExpression: function(tree) {
return new SuperExpression(tree.location);
},
transformThisExpression: function(tree) {
return new ThisExpression(tree.location);
}
}, {}, ParseTreeTransformer);
CloneTreeTransformer.cloneTree = function(tree) {
return new CloneTreeTransformer().transformAny(tree);
};
return {get CloneTreeTransformer() {
return CloneTreeTransformer;
}};
});
System.register("traceur@0.0.52/src/codegeneration/module/createModuleEvaluationStatement", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/codegeneration/module/createModuleEvaluationStatement";
var $__807 = Object.freeze(Object.defineProperties(["System.get(", " +'')"], {raw: {value: Object.freeze(["System.get(", " +'')"])}}));
var parseStatement = System.get("traceur@0.0.52/src/codegeneration/PlaceholderParser").parseStatement;
function createModuleEvaluationStatement(normalizedName) {
return parseStatement($__807, normalizedName);
}
return {get createModuleEvaluationStatement() {
return createModuleEvaluationStatement;
}};
});
System.register("traceur@0.0.52/src/runtime/InlineLoaderHooks", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/InlineLoaderHooks";
var LoaderHooks = System.get("traceur@0.0.52/src/runtime/LoaderHooks").LoaderHooks;
var Script = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").Script;
var InlineLoaderHooks = function InlineLoaderHooks(url, elements, fileLoader, moduleStore) {
$traceurRuntime.superCall(this, $InlineLoaderHooks.prototype, "constructor", [null, url, fileLoader, moduleStore]);
this.elements = elements;
};
var $InlineLoaderHooks = InlineLoaderHooks;
($traceurRuntime.createClass)(InlineLoaderHooks, {
evaluateCodeUnit: function(codeUnit) {
var $__812;
var tree = codeUnit.metadata.transformedTree;
($__812 = this.elements).push.apply($__812, $traceurRuntime.spread(tree.scriptItemList));
},
toTree: function() {
return new Script(null, this.elements);
}
}, {}, LoaderHooks);
return {get InlineLoaderHooks() {
return InlineLoaderHooks;
}};
});
System.register("traceur@0.0.52/src/runtime/TraceurLoader", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/TraceurLoader";
var Loader = System.get("traceur@0.0.52/src/runtime/Loader").Loader;
var version = __moduleName.slice(0, __moduleName.indexOf('/'));
var TraceurLoader = function TraceurLoader(loaderHooks) {
if (loaderHooks.translateSynchronous) {
loaderHooks.translate = function(load) {
return new Promise((function(resolve, reject) {
resolve(loaderHooks.translateSynchronous(load));
}));
};
}
$traceurRuntime.superCall(this, $TraceurLoader.prototype, "constructor", [loaderHooks]);
};
var $TraceurLoader = TraceurLoader;
($traceurRuntime.createClass)(TraceurLoader, {
importAll: function(names) {
var $__816 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
referrerName = $__816.referrerName,
address = $__816.address;
var $__814 = this;
return Promise.all(names.map((function(name) {
return $__814.import(name, {
referrerName: referrerName,
address: address
});
})));
},
loadAsScript: function(name) {
var $__816 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
referrerName = $__816.referrerName,
address = $__816.address;
return this.internalLoader_.load(name, referrerName, address, 'script').then((function(codeUnit) {
return codeUnit.result;
}));
},
loadAsScriptAll: function(names) {
var $__816 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
referrerName = $__816.referrerName,
address = $__816.address;
var $__814 = this;
return Promise.all(names.map((function(name) {
return $__814.loadAsScript(name, {
referrerName: referrerName,
address: address
});
})));
},
script: function(source) {
var $__816 = $traceurRuntime.assertObject(arguments[1] !== (void 0) ? arguments[1] : {}),
name = $__816.name,
referrerName = $__816.referrerName,
address = $__816.address;
return this.internalLoader_.script(source, name, referrerName, address);
},
semVerRegExp_: function() {
return /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/;
},
semverMap: function(normalizedName) {
var slash = normalizedName.indexOf('/');
var version = normalizedName.slice(0, slash);
var at = version.indexOf('@');
if (at !== -1) {
var semver = version.slice(at + 1);
var m = this.semVerRegExp_().exec(semver);
if (m) {
var major = m[1];
var minor = m[2];
var packageName = version.slice(0, at);
var map = Object.create(null);
map[packageName] = version;
map[packageName + '@' + major] = version;
map[packageName + '@' + major + '.' + minor] = version;
}
}
return map;
},
get version() {
return version;
},
sourceMapInfo: function(normalizedName, type) {
return this.internalLoader_.sourceMapInfo(normalizedName, type);
},
register: function(normalizedName, deps, factoryFunction) {
$traceurRuntime.ModuleStore.register(normalizedName, deps, factoryFunction);
},
get baseURL() {
return this.loaderHooks_.baseURL;
},
set baseURL(value) {
this.loaderHooks_.baseURL = value;
}
}, {}, Loader);
return {get TraceurLoader() {
return TraceurLoader;
}};
});
System.register("traceur@0.0.52/src/runtime/System", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/runtime/System";
var ErrorReporter = System.get("traceur@0.0.52/src/util/ErrorReporter").ErrorReporter;
var TraceurLoader = System.get("traceur@0.0.52/src/runtime/TraceurLoader").TraceurLoader;
var LoaderHooks = System.get("traceur@0.0.52/src/runtime/LoaderHooks").LoaderHooks;
var webLoader = System.get("traceur@0.0.52/src/runtime/webLoader").webLoader;
var url;
var fileLoader;
if (typeof window !== 'undefined' && window.location) {
url = window.location.href;
fileLoader = webLoader;
}
var loaderHooks = new LoaderHooks(new ErrorReporter(), url, fileLoader);
var traceurLoader = new TraceurLoader(loaderHooks);
Reflect.global.System = traceurLoader;
;
traceurLoader.map = traceurLoader.semverMap(__moduleName);
return {get System() {
return traceurLoader;
}};
});
System.register("traceur@0.0.52/src/traceur", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/traceur";
System.get("traceur@0.0.52/src/runtime/System");
var $___64_traceur_47_src_47_runtime_47_ModuleStore__ = System.get("@traceur/src/runtime/ModuleStore");
;
var $__traceur_64_0_46_0_46_52_47_src_47_WebPageTranscoder__ = System.get("traceur@0.0.52/src/WebPageTranscoder");
var $__traceur_64_0_46_0_46_52_47_src_47_Options__ = System.get("traceur@0.0.52/src/Options");
var $__821 = System.get("traceur@0.0.52/src/Options"),
addOptions = $__821.addOptions,
CommandOptions = $__821.CommandOptions;
var $__traceur_64_0_46_0_46_52_47_src_47_Compiler__ = System.get("traceur@0.0.52/src/Compiler");
var ErrorReporter = System.get("traceur@0.0.52/src/util/ErrorReporter").ErrorReporter;
var CollectingErrorReporter = System.get("traceur@0.0.52/src/util/CollectingErrorReporter").CollectingErrorReporter;
var util = {
addOptions: addOptions,
CommandOptions: CommandOptions,
ErrorReporter: ErrorReporter,
CollectingErrorReporter: CollectingErrorReporter
};
var Parser = System.get("traceur@0.0.52/src/syntax/Parser").Parser;
var Scanner = System.get("traceur@0.0.52/src/syntax/Scanner").Scanner;
var Script = System.get("traceur@0.0.52/src/syntax/trees/ParseTrees").Script;
var SourceFile = System.get("traceur@0.0.52/src/syntax/SourceFile").SourceFile;
var syntax = {
Parser: Parser,
Scanner: Scanner,
SourceFile: SourceFile,
trees: {Script: Script}
};
var ParseTreeMapWriter = System.get("traceur@0.0.52/src/outputgeneration/ParseTreeMapWriter").ParseTreeMapWriter;
var ParseTreeWriter = System.get("traceur@0.0.52/src/outputgeneration/ParseTreeWriter").ParseTreeWriter;
var SourceMapConsumer = System.get("traceur@0.0.52/src/outputgeneration/SourceMapIntegration").SourceMapConsumer;
var SourceMapGenerator = System.get("traceur@0.0.52/src/outputgeneration/SourceMapIntegration").SourceMapGenerator;
var TreeWriter = System.get("traceur@0.0.52/src/outputgeneration/TreeWriter").TreeWriter;
var outputgeneration = {
ParseTreeMapWriter: ParseTreeMapWriter,
ParseTreeWriter: ParseTreeWriter,
SourceMapConsumer: SourceMapConsumer,
SourceMapGenerator: SourceMapGenerator,
TreeWriter: TreeWriter
};
var AttachModuleNameTransformer = System.get("traceur@0.0.52/src/codegeneration/module/AttachModuleNameTransformer").AttachModuleNameTransformer;
var CloneTreeTransformer = System.get("traceur@0.0.52/src/codegeneration/CloneTreeTransformer").CloneTreeTransformer;
var FromOptionsTransformer = System.get("traceur@0.0.52/src/codegeneration/FromOptionsTransformer").FromOptionsTransformer;
var PureES6Transformer = System.get("traceur@0.0.52/src/codegeneration/PureES6Transformer").PureES6Transformer;
var createModuleEvaluationStatement = System.get("traceur@0.0.52/src/codegeneration/module/createModuleEvaluationStatement").createModuleEvaluationStatement;
var codegeneration = {
CloneTreeTransformer: CloneTreeTransformer,
FromOptionsTransformer: FromOptionsTransformer,
PureES6Transformer: PureES6Transformer,
module: {
AttachModuleNameTransformer: AttachModuleNameTransformer,
createModuleEvaluationStatement: createModuleEvaluationStatement
}
};
var Loader = System.get("traceur@0.0.52/src/runtime/Loader").Loader;
var LoaderHooks = System.get("traceur@0.0.52/src/runtime/LoaderHooks").LoaderHooks;
var InlineLoaderHooks = System.get("traceur@0.0.52/src/runtime/InlineLoaderHooks").InlineLoaderHooks;
var InterceptOutputLoaderHooks = System.get("traceur@0.0.52/src/runtime/InterceptOutputLoaderHooks").InterceptOutputLoaderHooks;
var TraceurLoader = System.get("traceur@0.0.52/src/runtime/TraceurLoader").TraceurLoader;
var runtime = {
InlineLoaderHooks: InlineLoaderHooks,
InterceptOutputLoaderHooks: InterceptOutputLoaderHooks,
Loader: Loader,
LoaderHooks: LoaderHooks,
TraceurLoader: TraceurLoader
};
return {
get ModuleStore() {
return $___64_traceur_47_src_47_runtime_47_ModuleStore__.ModuleStore;
},
get System() {
return System;
},
get WebPageTranscoder() {
return $__traceur_64_0_46_0_46_52_47_src_47_WebPageTranscoder__.WebPageTranscoder;
},
get options() {
return $__traceur_64_0_46_0_46_52_47_src_47_Options__.options;
},
get Compiler() {
return $__traceur_64_0_46_0_46_52_47_src_47_Compiler__.Compiler;
},
get util() {
return util;
},
get syntax() {
return syntax;
},
get outputgeneration() {
return outputgeneration;
},
get codegeneration() {
return codegeneration;
},
get runtime() {
return runtime;
}
};
});
System.register("traceur@0.0.52/src/traceur-import", [], function() {
"use strict";
var __moduleName = "traceur@0.0.52/src/traceur-import";
var traceur = System.get("traceur@0.0.52/src/traceur");
Reflect.global.traceur = traceur;
$traceurRuntime.ModuleStore.set('traceur@', traceur);
return {};
});
System.get("traceur@0.0.52/src/traceur-import" + '');
|
stories/components/atoms/footer/index.js | one-love/storybook | import React from 'react';
import cssModules from 'react-css-modules';
import styles from './footer.scss';
function Footer() {
return (
<div styleName="footer">
Made by: <a href="http://tilda.center/" target="_blank">Tilda Center</a>
</div>
);
}
export default cssModules(Footer, styles);
|
packages/material-ui-icons/lib/esm/LooksTwo.js | mbrookes/material-ui | import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z"
}), 'LooksTwo'); |
src/wics/node_modules/flat-cache/cache.js | civiclee/Hack4Cause2017 | var path = require( 'path' );
var fs = require( 'graceful-fs' );
var del = require( 'del' ).sync;
var utils = require( './utils' );
var writeJSON = utils.writeJSON;
var cache = {
/**
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
* cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted
* then the cache module directory `./cache` will be used instead
*
* @method load
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
*/
load: function ( docId, cacheDir ) {
var me = this;
me._visited = { };
me._persisted = { };
me._pathToFile = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
if ( fs.existsSync( me._pathToFile ) ) {
me._persisted = utils.tryParse( me._pathToFile, { } );
}
},
/**
* Load the cache from the provided file
* @method loadFile
* @param {String} pathToFile the path to the file containing the info for the cache
*/
loadFile: function ( pathToFile ) {
var me = this;
var dir = path.dirname( pathToFile );
var fName = path.basename( pathToFile );
me.load( fName, dir );
},
keys: function () {
return Object.keys( this._persisted );
},
/**
* sets a key to a given value
* @method setKey
* @param key {string} the key to set
* @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify
*/
setKey: function ( key, value ) {
this._visited[ key ] = true;
this._persisted[ key ] = value;
},
/**
* remove a given key from the cache
* @method removeKey
* @param key {String} the key to remove from the object
*/
removeKey: function ( key ) {
delete this._visited[ key ]; // esfmt-ignore-line
delete this._persisted[ key ]; // esfmt-ignore-line
},
/**
* Return the value of the provided key
* @method getKey
* @param key {String} the name of the key to retrieve
* @returns {*} the value from the key
*/
getKey: function ( key ) {
this._visited[ key ] = true;
return this._persisted[ key ];
},
/**
* Remove keys that were not accessed/set since the
* last time the `prune` method was called.
* @method _prune
* @private
*/
_prune: function () {
var me = this;
var obj = { };
var keys = Object.keys( me._visited );
// no keys visited for either get or set value
if ( keys.length === 0 ) {
return;
}
keys.forEach( function ( key ) {
obj[ key ] = me._persisted[ key ];
} );
me._visited = { };
me._persisted = obj;
},
/**
* Save the state of the cache identified by the docId to disk
* as a JSON structure
* @param [noPrune=false] {Boolean} whether to remove from cache the non visited files
* @method save
*/
save: function ( noPrune ) {
var me = this;
(!noPrune) && me._prune();
writeJSON( me._pathToFile, me._persisted );
},
/**
* remove the file where the cache is persisted
* @method removeCacheFile
* @return {Boolean} true or false if the file was successfully deleted
*/
removeCacheFile: function () {
return del( this._pathToFile, { force: true } );
},
/**
* Destroy the file cache and cache content.
* @method destroy
*/
destroy: function () {
var me = this;
me._visited = { };
me._persisted = { };
me.removeCacheFile();
}
};
module.exports = {
/**
* Alias for create. Should be considered depreacted. Will be removed in next releases
*
* @method load
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
* @returns {cache} cache instance
*/
load: function ( docId, cacheDir ) {
return this.create( docId, cacheDir );
},
/**
* Load a cache identified by the given Id. If the element does not exists, then initialize an empty
* cache storage.
*
* @method create
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param [cacheDir] {String} directory for the cache entry
* @returns {cache} cache instance
*/
create: function ( docId, cacheDir ) {
var obj = Object.create( cache );
obj.load( docId, cacheDir );
return obj;
},
createFromFile: function ( filePath ) {
var obj = Object.create( cache );
obj.loadFile( filePath );
return obj;
},
/**
* Clear the cache identified by the given id. Caches stored in a different cache directory can be deleted directly
*
* @method clearCache
* @param docId {String} the id of the cache, would also be used as the name of the file cache
* @param cacheDir {String} the directory where the cache file was written
* @returns {Boolean} true if the cache folder was deleted. False otherwise
*/
clearCacheById: function ( docId, cacheDir ) {
var filePath = cacheDir ? path.resolve( cacheDir, docId ) : path.resolve( __dirname, './.cache/', docId );
return del( filePath, { force: true } ).length > 0;
},
/**
* Remove all cache stored in the cache directory
* @method clearAll
* @returns {Boolean} true if the cache folder was deleted. False otherwise
*/
clearAll: function ( cacheDir ) {
var filePath = cacheDir ? path.resolve( cacheDir ) : path.resolve( __dirname, './.cache/' );
return del( filePath, { force: true } ).length > 0;
}
};
|
ajax/libs/forerunnerdb/1.3.738/fdb-core+views.js | kiwi89/cdnjs | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
var Core = _dereq_('./core'),
View = _dereq_('../lib/View');
if (typeof window !== 'undefined') {
window.ForerunnerDB = Core;
}
module.exports = Core;
},{"../lib/View":33,"./core":2}],2:[function(_dereq_,module,exports){
var Core = _dereq_('../lib/Core'),
ShimIE8 = _dereq_('../lib/Shim.IE8');
if (typeof window !== 'undefined') {
window.ForerunnerDB = Core;
}
module.exports = Core;
},{"../lib/Core":8,"../lib/Shim.IE8":32}],3:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path'),
sharedPathSolver;
/**
* Creates an always-sorted multi-key bucket that allows ForerunnerDB to
* know the index that a document will occupy in an array with minimal
* processing, speeding up things like sorted views.
* @param {object} orderBy An order object.
* @constructor
*/
var ActiveBucket = function (orderBy) {
this._primaryKey = '_id';
this._keyArr = [];
this._data = [];
this._objLookup = {};
this._count = 0;
this._keyArr = sharedPathSolver.parse(orderBy, true);
};
Shared.addModule('ActiveBucket', ActiveBucket);
Shared.mixin(ActiveBucket.prototype, 'Mixin.Sorting');
sharedPathSolver = new Path();
/**
* Gets / sets the primary key used by the active bucket.
* @returns {String} The current primary key.
*/
Shared.synthesize(ActiveBucket.prototype, 'primaryKey');
/**
* Quicksorts a single document into the passed array and
* returns the index that the document should occupy.
* @param {object} obj The document to calculate index for.
* @param {array} arr The array the document index will be
* calculated for.
* @param {string} item The string key representation of the
* document whose index is being calculated.
* @param {function} fn The comparison function that is used
* to determine if a document is sorted below or above the
* document we are calculating the index for.
* @returns {number} The index the document should occupy.
*/
ActiveBucket.prototype.qs = function (obj, arr, item, fn) {
// If the array is empty then return index zero
if (!arr.length) {
return 0;
}
var lastMidwayIndex = -1,
midwayIndex,
lookupItem,
result,
start = 0,
end = arr.length - 1;
// Loop the data until our range overlaps
while (end >= start) {
// Calculate the midway point (divide and conquer)
midwayIndex = Math.floor((start + end) / 2);
if (lastMidwayIndex === midwayIndex) {
// No more items to scan
break;
}
// Get the item to compare against
lookupItem = arr[midwayIndex];
if (lookupItem !== undefined) {
// Compare items
result = fn(this, obj, item, lookupItem);
if (result > 0) {
start = midwayIndex + 1;
}
if (result < 0) {
end = midwayIndex - 1;
}
}
lastMidwayIndex = midwayIndex;
}
if (result > 0) {
return midwayIndex + 1;
} else {
return midwayIndex;
}
};
/**
* Calculates the sort position of an item against another item.
* @param {object} sorter An object or instance that contains
* sortAsc and sortDesc methods.
* @param {object} obj The document to compare.
* @param {string} a The first key to compare.
* @param {string} b The second key to compare.
* @returns {number} Either 1 for sort a after b or -1 to sort
* a before b.
* @private
*/
ActiveBucket.prototype._sortFunc = function (sorter, obj, a, b) {
var aVals = a.split('.:.'),
bVals = b.split('.:.'),
arr = sorter._keyArr,
count = arr.length,
index,
sortType,
castType;
for (index = 0; index < count; index++) {
sortType = arr[index];
castType = typeof sharedPathSolver.get(obj, sortType.path);
if (castType === 'number') {
aVals[index] = Number(aVals[index]);
bVals[index] = Number(bVals[index]);
}
// Check for non-equal items
if (aVals[index] !== bVals[index]) {
// Return the sorted items
if (sortType.value === 1) {
return sorter.sortAsc(aVals[index], bVals[index]);
}
if (sortType.value === -1) {
return sorter.sortDesc(aVals[index], bVals[index]);
}
}
}
};
/**
* Inserts a document into the active bucket.
* @param {object} obj The document to insert.
* @returns {number} The index the document now occupies.
*/
ActiveBucket.prototype.insert = function (obj) {
var key,
keyIndex;
key = this.documentKey(obj);
keyIndex = this._data.indexOf(key);
if (keyIndex === -1) {
// Insert key
keyIndex = this.qs(obj, this._data, key, this._sortFunc);
this._data.splice(keyIndex, 0, key);
} else {
this._data.splice(keyIndex, 0, key);
}
this._objLookup[obj[this._primaryKey]] = key;
this._count++;
return keyIndex;
};
/**
* Removes a document from the active bucket.
* @param {object} obj The document to remove.
* @returns {boolean} True if the document was removed
* successfully or false if it wasn't found in the active
* bucket.
*/
ActiveBucket.prototype.remove = function (obj) {
var key,
keyIndex;
key = this._objLookup[obj[this._primaryKey]];
if (key) {
keyIndex = this._data.indexOf(key);
if (keyIndex > -1) {
this._data.splice(keyIndex, 1);
delete this._objLookup[obj[this._primaryKey]];
this._count--;
return true;
} else {
return false;
}
}
return false;
};
/**
* Get the index that the passed document currently occupies
* or the index it will occupy if added to the active bucket.
* @param {object} obj The document to get the index for.
* @returns {number} The index.
*/
ActiveBucket.prototype.index = function (obj) {
var key,
keyIndex;
key = this.documentKey(obj);
keyIndex = this._data.indexOf(key);
if (keyIndex === -1) {
// Get key index
keyIndex = this.qs(obj, this._data, key, this._sortFunc);
}
return keyIndex;
};
/**
* The key that represents the passed document.
* @param {object} obj The document to get the key for.
* @returns {string} The document key.
*/
ActiveBucket.prototype.documentKey = function (obj) {
var key = '',
arr = this._keyArr,
count = arr.length,
index,
sortType;
for (index = 0; index < count; index++) {
sortType = arr[index];
if (key) {
key += '.:.';
}
key += sharedPathSolver.get(obj, sortType.path);
}
// Add the unique identifier on the end of the key
key += '.:.' + obj[this._primaryKey];
return key;
};
/**
* Get the number of documents currently indexed in the active
* bucket instance.
* @returns {number} The number of documents.
*/
ActiveBucket.prototype.count = function () {
return this._count;
};
Shared.finishModule('ActiveBucket');
module.exports = ActiveBucket;
},{"./Path":28,"./Shared":31}],4:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path'),
sharedPathSolver = new Path();
var BinaryTree = function (data, compareFunc, hashFunc) {
this.init.apply(this, arguments);
};
BinaryTree.prototype.init = function (data, index, primaryKey, compareFunc, hashFunc) {
this._store = [];
this._keys = [];
if (primaryKey !== undefined) { this.primaryKey(primaryKey); }
if (index !== undefined) { this.index(index); }
if (compareFunc !== undefined) { this.compareFunc(compareFunc); }
if (hashFunc !== undefined) { this.hashFunc(hashFunc); }
if (data !== undefined) { this.data(data); }
};
Shared.addModule('BinaryTree', BinaryTree);
Shared.mixin(BinaryTree.prototype, 'Mixin.ChainReactor');
Shared.mixin(BinaryTree.prototype, 'Mixin.Sorting');
Shared.mixin(BinaryTree.prototype, 'Mixin.Common');
Shared.synthesize(BinaryTree.prototype, 'compareFunc');
Shared.synthesize(BinaryTree.prototype, 'hashFunc');
Shared.synthesize(BinaryTree.prototype, 'indexDir');
Shared.synthesize(BinaryTree.prototype, 'primaryKey');
Shared.synthesize(BinaryTree.prototype, 'keys');
Shared.synthesize(BinaryTree.prototype, 'index', function (index) {
if (index !== undefined) {
if (this.debug()) {
console.log('Setting index', index, sharedPathSolver.parse(index, true));
}
// Convert the index object to an array of key val objects
this.keys(sharedPathSolver.parse(index, true));
}
return this.$super.call(this, index);
});
/**
* Remove all data from the binary tree.
*/
BinaryTree.prototype.clear = function () {
delete this._data;
delete this._left;
delete this._right;
this._store = [];
};
/**
* Sets this node's data object. All further inserted documents that
* match this node's key and value will be pushed via the push()
* method into the this._store array. When deciding if a new data
* should be created left, right or middle (pushed) of this node the
* new data is checked against the data set via this method.
* @param val
* @returns {*}
*/
BinaryTree.prototype.data = function (val) {
if (val !== undefined) {
this._data = val;
if (this._hashFunc) { this._hash = this._hashFunc(val); }
return this;
}
return this._data;
};
/**
* Pushes an item to the binary tree node's store array.
* @param {*} val The item to add to the store.
* @returns {*}
*/
BinaryTree.prototype.push = function (val) {
if (val !== undefined) {
this._store.push(val);
return this;
}
return false;
};
/**
* Pulls an item from the binary tree node's store array.
* @param {*} val The item to remove from the store.
* @returns {*}
*/
BinaryTree.prototype.pull = function (val) {
if (val !== undefined) {
var index = this._store.indexOf(val);
if (index > -1) {
this._store.splice(index, 1);
return this;
}
}
return false;
};
/**
* Default compare method. Can be overridden.
* @param a
* @param b
* @returns {number}
* @private
*/
BinaryTree.prototype._compareFunc = function (a, b) {
// Loop the index array
var i,
indexData,
result = 0;
for (i = 0; i < this._keys.length; i++) {
indexData = this._keys[i];
if (indexData.value === 1) {
result = this.sortAsc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path));
} else if (indexData.value === -1) {
result = this.sortDesc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path));
}
if (this.debug()) {
console.log('Compared %s with %s order %d in path %s and result was %d', sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path), indexData.value, indexData.path, result);
}
if (result !== 0) {
if (this.debug()) {
console.log('Retuning result %d', result);
}
return result;
}
}
if (this.debug()) {
console.log('Retuning result %d', result);
}
return result;
};
/**
* Default hash function. Can be overridden.
* @param obj
* @private
*/
BinaryTree.prototype._hashFunc = function (obj) {
/*var i,
indexData,
hash = '';
for (i = 0; i < this._keys.length; i++) {
indexData = this._keys[i];
if (hash) { hash += '_'; }
hash += obj[indexData.path];
}
return hash;*/
return obj[this._keys[0].path];
};
/**
* Removes (deletes reference to) either left or right child if the passed
* node matches one of them.
* @param {BinaryTree} node The node to remove.
*/
BinaryTree.prototype.removeChildNode = function (node) {
if (this._left === node) {
// Remove left
delete this._left;
} else if (this._right === node) {
// Remove right
delete this._right;
}
};
/**
* Returns the branch this node matches (left or right).
* @param node
* @returns {String}
*/
BinaryTree.prototype.nodeBranch = function (node) {
if (this._left === node) {
return 'left';
} else if (this._right === node) {
return 'right';
}
};
/**
* Inserts a document into the binary tree.
* @param data
* @returns {*}
*/
BinaryTree.prototype.insert = function (data) {
var result,
inserted,
failed,
i;
if (data instanceof Array) {
// Insert array of data
inserted = [];
failed = [];
for (i = 0; i < data.length; i++) {
if (this.insert(data[i])) {
inserted.push(data[i]);
} else {
failed.push(data[i]);
}
}
return {
inserted: inserted,
failed: failed
};
}
if (this.debug()) {
console.log('Inserting', data);
}
if (!this._data) {
if (this.debug()) {
console.log('Node has no data, setting data', data);
}
// Insert into this node (overwrite) as there is no data
this.data(data);
//this.push(data);
return true;
}
result = this._compareFunc(this._data, data);
if (result === 0) {
if (this.debug()) {
console.log('Data is equal (currrent, new)', this._data, data);
}
//this.push(data);
// Less than this node
if (this._left) {
// Propagate down the left branch
this._left.insert(data);
} else {
// Assign to left branch
this._left = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc);
this._left._parent = this;
}
return true;
}
if (result === -1) {
if (this.debug()) {
console.log('Data is greater (currrent, new)', this._data, data);
}
// Greater than this node
if (this._right) {
// Propagate down the right branch
this._right.insert(data);
} else {
// Assign to right branch
this._right = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc);
this._right._parent = this;
}
return true;
}
if (result === 1) {
if (this.debug()) {
console.log('Data is less (currrent, new)', this._data, data);
}
// Less than this node
if (this._left) {
// Propagate down the left branch
this._left.insert(data);
} else {
// Assign to left branch
this._left = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc);
this._left._parent = this;
}
return true;
}
return false;
};
BinaryTree.prototype.remove = function (data) {
var pk = this.primaryKey(),
result,
removed,
i;
if (data instanceof Array) {
// Insert array of data
removed = [];
for (i = 0; i < data.length; i++) {
if (this.remove(data[i])) {
removed.push(data[i]);
}
}
return removed;
}
if (this.debug()) {
console.log('Removing', data);
}
if (this._data[pk] === data[pk]) {
// Remove this node
return this._remove(this);
}
// Compare the data to work out which branch to send the remove command down
result = this._compareFunc(this._data, data);
if (result === -1 && this._right) {
return this._right.remove(data);
}
if (result === 1 && this._left) {
return this._left.remove(data);
}
return false;
};
BinaryTree.prototype._remove = function (node) {
var leftNode,
rightNode;
if (this._left) {
// Backup branch data
leftNode = this._left;
rightNode = this._right;
// Copy data from left node
this._left = leftNode._left;
this._right = leftNode._right;
this._data = leftNode._data;
this._store = leftNode._store;
if (rightNode) {
// Attach the rightNode data to the right-most node
// of the leftNode
leftNode.rightMost()._right = rightNode;
}
} else if (this._right) {
// Backup branch data
rightNode = this._right;
// Copy data from right node
this._left = rightNode._left;
this._right = rightNode._right;
this._data = rightNode._data;
this._store = rightNode._store;
} else {
this.clear();
}
return true;
};
BinaryTree.prototype.leftMost = function () {
if (!this._left) {
return this;
} else {
return this._left.leftMost();
}
};
BinaryTree.prototype.rightMost = function () {
if (!this._right) {
return this;
} else {
return this._right.rightMost();
}
};
/**
* Searches the binary tree for all matching documents based on the data
* passed (query).
* @param data
* @param options
* @param {Array=} resultArr The results passed between recursive calls.
* Do not pass anything into this argument when calling externally.
* @returns {*|Array}
*/
BinaryTree.prototype.lookup = function (data, options, resultArr) {
var result = this._compareFunc(this._data, data);
resultArr = resultArr || [];
if (result === 0) {
if (this._left) { this._left.lookup(data, options, resultArr); }
resultArr.push(this._data);
if (this._right) { this._right.lookup(data, options, resultArr); }
}
if (result === -1) {
if (this._right) { this._right.lookup(data, options, resultArr); }
}
if (result === 1) {
if (this._left) { this._left.lookup(data, options, resultArr); }
}
return resultArr;
};
/**
* Returns the entire binary tree ordered.
* @param {String} type
* @param resultArr
* @returns {*|Array}
*/
BinaryTree.prototype.inOrder = function (type, resultArr) {
resultArr = resultArr || [];
if (this._left) {
this._left.inOrder(type, resultArr);
}
switch (type) {
case 'hash':
resultArr.push(this._hash);
break;
case 'data':
resultArr.push(this._data);
break;
default:
resultArr.push({
key: this._data,
arr: this._store
});
break;
}
if (this._right) {
this._right.inOrder(type, resultArr);
}
return resultArr;
};
/**
* Searches the binary tree for all matching documents based on the regular
* expression passed.
* @param path
* @param val
* @param regex
* @param {Array=} resultArr The results passed between recursive calls.
* Do not pass anything into this argument when calling externally.
* @returns {*|Array}
*/
BinaryTree.prototype.startsWith = function (path, val, regex, resultArr) {
var reTest,
thisDataPathVal = sharedPathSolver.get(this._data, path),
thisDataPathValSubStr = thisDataPathVal.substr(0, val.length),
result;
regex = regex || new RegExp('^' + val);
resultArr = resultArr || [];
if (resultArr._visited === undefined) { resultArr._visited = 0; }
resultArr._visited++;
result = this.sortAsc(thisDataPathVal, val);
reTest = thisDataPathValSubStr === val;
if (result === 0) {
if (this._left) { this._left.startsWith(path, val, regex, resultArr); }
if (reTest) { resultArr.push(this._data); }
if (this._right) { this._right.startsWith(path, val, regex, resultArr); }
}
if (result === -1) {
if (reTest) { resultArr.push(this._data); }
if (this._right) { this._right.startsWith(path, val, regex, resultArr); }
}
if (result === 1) {
if (this._left) { this._left.startsWith(path, val, regex, resultArr); }
if (reTest) { resultArr.push(this._data); }
}
return resultArr;
};
/*BinaryTree.prototype.find = function (type, search, resultArr) {
resultArr = resultArr || [];
if (this._left) {
this._left.find(type, search, resultArr);
}
// Check if this node's data is greater or less than the from value
var fromResult = this.sortAsc(this._data[key], from),
toResult = this.sortAsc(this._data[key], to);
if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) {
// This data node is greater than or equal to the from value,
// and less than or equal to the to value so include it
switch (type) {
case 'hash':
resultArr.push(this._hash);
break;
case 'data':
resultArr.push(this._data);
break;
default:
resultArr.push({
key: this._data,
arr: this._store
});
break;
}
}
if (this._right) {
this._right.find(type, search, resultArr);
}
return resultArr;
};*/
/**
*
* @param {String} type
* @param {String} key The data key / path to range search against.
* @param {Number} from Range search from this value (inclusive)
* @param {Number} to Range search to this value (inclusive)
* @param {Array=} resultArr Leave undefined when calling (internal use),
* passes the result array between recursive calls to be returned when
* the recursion chain completes.
* @param {Path=} pathResolver Leave undefined when calling (internal use),
* caches the path resolver instance for performance.
* @returns {Array} Array of matching document objects
*/
BinaryTree.prototype.findRange = function (type, key, from, to, resultArr, pathResolver) {
resultArr = resultArr || [];
pathResolver = pathResolver || new Path(key);
if (this._left) {
this._left.findRange(type, key, from, to, resultArr, pathResolver);
}
// Check if this node's data is greater or less than the from value
var pathVal = pathResolver.value(this._data),
fromResult = this.sortAsc(pathVal, from),
toResult = this.sortAsc(pathVal, to);
if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) {
// This data node is greater than or equal to the from value,
// and less than or equal to the to value so include it
switch (type) {
case 'hash':
resultArr.push(this._hash);
break;
case 'data':
resultArr.push(this._data);
break;
default:
resultArr.push({
key: this._data,
arr: this._store
});
break;
}
}
if (this._right) {
this._right.findRange(type, key, from, to, resultArr, pathResolver);
}
return resultArr;
};
/*BinaryTree.prototype.findRegExp = function (type, key, pattern, resultArr) {
resultArr = resultArr || [];
if (this._left) {
this._left.findRegExp(type, key, pattern, resultArr);
}
// Check if this node's data is greater or less than the from value
var fromResult = this.sortAsc(this._data[key], from),
toResult = this.sortAsc(this._data[key], to);
if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) {
// This data node is greater than or equal to the from value,
// and less than or equal to the to value so include it
switch (type) {
case 'hash':
resultArr.push(this._hash);
break;
case 'data':
resultArr.push(this._data);
break;
default:
resultArr.push({
key: this._data,
arr: this._store
});
break;
}
}
if (this._right) {
this._right.findRegExp(type, key, pattern, resultArr);
}
return resultArr;
};*/
/**
* Determines if the passed query and options object will be served
* by this index successfully or not and gives a score so that the
* DB search system can determine how useful this index is in comparison
* to other indexes on the same collection.
* @param query
* @param queryOptions
* @param matchOptions
* @returns {{matchedKeys: Array, totalKeyCount: Number, score: number}}
*/
BinaryTree.prototype.match = function (query, queryOptions, matchOptions) {
// Check if the passed query has data in the keys our index
// operates on and if so, is the query sort matching our order
var indexKeyArr,
queryArr,
matchedKeys = [],
matchedKeyCount = 0,
i;
indexKeyArr = sharedPathSolver.parseArr(this._index, {
verbose: true
});
queryArr = sharedPathSolver.parseArr(query, matchOptions && matchOptions.pathOptions ? matchOptions.pathOptions : {
ignore:/\$/,
verbose: true
});
// Loop the query array and check the order of keys against the
// index key array to see if this index can be used
for (i = 0; i < indexKeyArr.length; i++) {
if (queryArr[i] === indexKeyArr[i]) {
matchedKeyCount++;
matchedKeys.push(queryArr[i]);
}
}
return {
matchedKeys: matchedKeys,
totalKeyCount: queryArr.length,
score: matchedKeyCount
};
//return sharedPathSolver.countObjectPaths(this._keys, query);
};
Shared.finishModule('BinaryTree');
module.exports = BinaryTree;
},{"./Path":28,"./Shared":31}],5:[function(_dereq_,module,exports){
"use strict";
var crcTable,
checksum;
crcTable = (function () {
var crcTable = [],
c, n, k;
for (n = 0; n < 256; n++) {
c = n;
for (k = 0; k < 8; k++) {
c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); // jshint ignore:line
}
crcTable[n] = c;
}
return crcTable;
}());
/**
* Returns a checksum of a string.
* @param {String} str The string to checksum.
* @return {Number} The checksum generated.
*/
checksum = function(str) {
var crc = 0 ^ (-1), // jshint ignore:line
i;
for (i = 0; i < str.length; i++) {
crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF]; // jshint ignore:line
}
return (crc ^ (-1)) >>> 0; // jshint ignore:line
};
module.exports = checksum;
},{}],6:[function(_dereq_,module,exports){
"use strict";
var Shared,
Db,
Metrics,
KeyValueStore,
Path,
IndexHashMap,
IndexBinaryTree,
Index2d,
Overload,
ReactorIO,
sharedPathSolver;
Shared = _dereq_('./Shared');
/**
* Creates a new collection. Collections store multiple documents and
* handle CRUD against those documents.
* @constructor
*/
var Collection = function (name, options) {
this.init.apply(this, arguments);
};
Collection.prototype.init = function (name, options) {
this.sharedPathSolver = sharedPathSolver;
this._primaryKey = '_id';
this._primaryIndex = new KeyValueStore('primary');
this._primaryCrc = new KeyValueStore('primaryCrc');
this._crcLookup = new KeyValueStore('crcLookup');
this._name = name;
this._data = [];
this._metrics = new Metrics();
this._options = options || {
changeTimestamp: false
};
if (this._options.db) {
this.db(this._options.db);
}
// Create an object to store internal protected data
this._metaData = {};
this._deferQueue = {
insert: [],
update: [],
remove: [],
upsert: [],
async: []
};
this._deferThreshold = {
insert: 100,
update: 100,
remove: 100,
upsert: 100
};
this._deferTime = {
insert: 1,
update: 1,
remove: 1,
upsert: 1
};
this._deferredCalls = true;
// Set the subset to itself since it is the root collection
this.subsetOf(this);
};
Shared.addModule('Collection', Collection);
Shared.mixin(Collection.prototype, 'Mixin.Common');
Shared.mixin(Collection.prototype, 'Mixin.Events');
Shared.mixin(Collection.prototype, 'Mixin.ChainReactor');
Shared.mixin(Collection.prototype, 'Mixin.CRUD');
Shared.mixin(Collection.prototype, 'Mixin.Constants');
Shared.mixin(Collection.prototype, 'Mixin.Triggers');
Shared.mixin(Collection.prototype, 'Mixin.Sorting');
Shared.mixin(Collection.prototype, 'Mixin.Matching');
Shared.mixin(Collection.prototype, 'Mixin.Updating');
Shared.mixin(Collection.prototype, 'Mixin.Tags');
Metrics = _dereq_('./Metrics');
KeyValueStore = _dereq_('./KeyValueStore');
Path = _dereq_('./Path');
IndexHashMap = _dereq_('./IndexHashMap');
IndexBinaryTree = _dereq_('./IndexBinaryTree');
Index2d = _dereq_('./Index2d');
Db = Shared.modules.Db;
Overload = _dereq_('./Overload');
ReactorIO = _dereq_('./ReactorIO');
sharedPathSolver = new Path();
/**
* Gets / sets the deferred calls flag. If set to true (default)
* then operations on large data sets can be broken up and done
* over multiple CPU cycles (creating an async state). For purely
* synchronous behaviour set this to false.
* @param {Boolean=} val The value to set.
* @returns {Boolean}
*/
Shared.synthesize(Collection.prototype, 'deferredCalls');
/**
* Gets / sets the current state.
* @param {String=} val The name of the state to set.
* @returns {*}
*/
Shared.synthesize(Collection.prototype, 'state');
/**
* Gets / sets the name of the collection.
* @param {String=} val The name of the collection to set.
* @returns {*}
*/
Shared.synthesize(Collection.prototype, 'name');
/**
* Gets / sets the metadata stored in the collection.
*/
Shared.synthesize(Collection.prototype, 'metaData');
/**
* Gets / sets boolean to determine if the collection should be
* capped or not.
*/
Shared.synthesize(Collection.prototype, 'capped');
/**
* Gets / sets capped collection size. This is the maximum number
* of records that the capped collection will store.
*/
Shared.synthesize(Collection.prototype, 'cappedSize');
Collection.prototype._asyncPending = function (key) {
this._deferQueue.async.push(key);
};
Collection.prototype._asyncComplete = function (key) {
// Remove async flag for this type
var index = this._deferQueue.async.indexOf(key);
while (index > -1) {
this._deferQueue.async.splice(index, 1);
index = this._deferQueue.async.indexOf(key);
}
if (this._deferQueue.async.length === 0) {
this.deferEmit('ready');
}
};
/**
* Get the data array that represents the collection's data.
* This data is returned by reference and should not be altered outside
* of the provided CRUD functionality of the collection as doing so
* may cause unstable index behaviour within the collection.
* @returns {Array}
*/
Collection.prototype.data = function () {
return this._data;
};
/**
* Drops a collection and all it's stored data from the database.
* @returns {boolean} True on success, false on failure.
*/
Collection.prototype.drop = function (callback) {
var key;
if (!this.isDropped()) {
if (this._db && this._db._collection && this._name) {
if (this.debug()) {
console.log(this.logIdentifier() + ' Dropping');
}
this._state = 'dropped';
this.emit('drop', this);
delete this._db._collection[this._name];
// Remove any reactor IO chain links
if (this._collate) {
for (key in this._collate) {
if (this._collate.hasOwnProperty(key)) {
this.collateRemove(key);
}
}
}
delete this._primaryKey;
delete this._primaryIndex;
delete this._primaryCrc;
delete this._crcLookup;
delete this._data;
delete this._metrics;
delete this._listeners;
if (callback) { callback.call(this, false, true); }
return true;
}
} else {
if (callback) { callback.call(this, false, true); }
return true;
}
if (callback) { callback.call(this, false, true); }
return false;
};
/**
* Gets / sets the primary key for this collection.
* @param {String=} keyName The name of the primary key.
* @returns {*}
*/
Collection.prototype.primaryKey = function (keyName) {
if (keyName !== undefined) {
if (this._primaryKey !== keyName) {
var oldKey = this._primaryKey;
this._primaryKey = keyName;
// Set the primary key index primary key
this._primaryIndex.primaryKey(keyName);
// Rebuild the primary key index
this.rebuildPrimaryKeyIndex();
// Propagate change down the chain
this.chainSend('primaryKey', {
keyName: keyName,
oldData: oldKey
});
}
return this;
}
return this._primaryKey;
};
/**
* Handles insert events and routes changes to binds and views as required.
* @param {Array} inserted An array of inserted documents.
* @param {Array} failed An array of documents that failed to insert.
* @private
*/
Collection.prototype._onInsert = function (inserted, failed) {
this.emit('insert', inserted, failed);
};
/**
* Handles update events and routes changes to binds and views as required.
* @param {Array} items An array of updated documents.
* @private
*/
Collection.prototype._onUpdate = function (items) {
this.emit('update', items);
};
/**
* Handles remove events and routes changes to binds and views as required.
* @param {Array} items An array of removed documents.
* @private
*/
Collection.prototype._onRemove = function (items) {
this.emit('remove', items);
};
/**
* Handles any change to the collection.
* @private
*/
Collection.prototype._onChange = function () {
if (this._options.changeTimestamp) {
// Record the last change timestamp
this._metaData.lastChange = this.serialiser.convert(new Date());
}
};
/**
* Gets / sets the db instance this class instance belongs to.
* @param {Db=} db The db instance.
* @returns {*}
*/
Shared.synthesize(Collection.prototype, 'db', function (db) {
if (db) {
if (this.primaryKey() === '_id') {
// Set primary key to the db's key by default
this.primaryKey(db.primaryKey());
// Apply the same debug settings
this.debug(db.debug());
}
}
return this.$super.apply(this, arguments);
});
/**
* Gets / sets mongodb emulation mode.
* @param {Boolean=} val True to enable, false to disable.
* @returns {*}
*/
Shared.synthesize(Collection.prototype, 'mongoEmulation');
/**
* Sets the collection's data to the array / documents passed. If any
* data already exists in the collection it will be removed before the
* new data is set.
* @param {Array|Object} data The array of documents or a single document
* that will be set as the collections data.
* @param options Optional options object.
* @param callback Optional callback function.
*/
Collection.prototype.setData = new Overload('Collection.prototype.setData', {
'*': function (data) {
return this.$main.call(this, data, {});
},
'*, object': function (data, options) {
return this.$main.call(this, data, options);
},
'*, function': function (data, callback) {
return this.$main.call(this, data, {}, callback);
},
'*, *, function': function (data, options, callback) {
return this.$main.call(this, data, options, callback);
},
'*, *, *': function (data, options, callback) {
return this.$main.call(this, data, options, callback);
},
'$main': function (data, options, callback) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
if (data) {
var deferredSetting = this.deferredCalls(),
oldData = [].concat(this._data);
// Switch off deferred calls since setData should be
// a synchronous call
this.deferredCalls(false);
options = this.options(options);
if (options.$decouple) {
data = this.decouple(data);
}
if (!(data instanceof Array)) {
data = [data];
}
// Remove all items from the collection
this.remove({});
// Insert the new data
this.insert(data);
// Switch deferred calls back to previous settings
this.deferredCalls(deferredSetting);
this._onChange();
this.emit('setData', this._data, oldData);
}
if (callback) { callback.call(this); }
return this;
}
});
/**
* Drops and rebuilds the primary key index for all documents in the collection.
* @param {Object=} options An optional options object.
* @private
*/
Collection.prototype.rebuildPrimaryKeyIndex = function (options) {
options = options || {
$ensureKeys: undefined,
$violationCheck: undefined
};
var ensureKeys = options && options.$ensureKeys !== undefined ? options.$ensureKeys : true,
violationCheck = options && options.$violationCheck !== undefined ? options.$violationCheck : true,
arr,
arrCount,
arrItem,
pIndex = this._primaryIndex,
crcIndex = this._primaryCrc,
crcLookup = this._crcLookup,
pKey = this._primaryKey,
jString;
// Drop the existing primary index
pIndex.truncate();
crcIndex.truncate();
crcLookup.truncate();
// Loop the data and check for a primary key in each object
arr = this._data;
arrCount = arr.length;
while (arrCount--) {
arrItem = arr[arrCount];
if (ensureKeys) {
// Make sure the item has a primary key
this.ensurePrimaryKey(arrItem);
}
if (violationCheck) {
// Check for primary key violation
if (!pIndex.uniqueSet(arrItem[pKey], arrItem)) {
// Primary key violation
throw(this.logIdentifier() + ' Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: ' + arrItem[this._primaryKey]);
}
} else {
pIndex.set(arrItem[pKey], arrItem);
}
// Generate a hash string
jString = this.hash(arrItem);
crcIndex.set(arrItem[pKey], jString);
crcLookup.set(jString, arrItem);
}
};
/**
* Checks for a primary key on the document and assigns one if none
* currently exists.
* @param {Object} obj The object to check a primary key against.
* @private
*/
Collection.prototype.ensurePrimaryKey = function (obj) {
if (obj[this._primaryKey] === undefined) {
// Assign a primary key automatically
obj[this._primaryKey] = this.objectId();
}
};
/**
* Clears all data from the collection.
* @returns {Collection}
*/
Collection.prototype.truncate = function () {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
// TODO: This should use remove so that chain reactor events are properly
// TODO: handled, but ensure that chunking is switched off
this.emit('truncate', this._data);
// Clear all the data from the collection
this._data.length = 0;
// Re-create the primary index data
this._primaryIndex = new KeyValueStore('primary');
this._primaryCrc = new KeyValueStore('primaryCrc');
this._crcLookup = new KeyValueStore('crcLookup');
this._onChange();
this.emit('immediateChange', {type: 'truncate'});
this.deferEmit('change', {type: 'truncate'});
return this;
};
/**
* Modifies an existing document or documents in a collection. This will update
* all matches for 'query' with the data held in 'update'. It will not overwrite
* the matched documents with the update document.
*
* @param {Object} obj The document object to upsert or an array containing
* documents to upsert.
*
* If the document contains a primary key field (based on the collections's primary
* key) then the database will search for an existing document with a matching id.
* If a matching document is found, the document will be updated. Any keys that
* match keys on the existing document will be overwritten with new data. Any keys
* that do not currently exist on the document will be added to the document.
*
* If the document does not contain an id or the id passed does not match an existing
* document, an insert is performed instead. If no id is present a new primary key
* id is provided for the item.
*
* @param {Function=} callback Optional callback method.
* @returns {Object} An object containing two keys, "op" contains either "insert" or
* "update" depending on the type of operation that was performed and "result"
* contains the return data from the operation used.
*/
Collection.prototype.upsert = function (obj, callback) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
if (obj) {
var queue = this._deferQueue.upsert,
deferThreshold = this._deferThreshold.upsert,
returnData = {},
query,
i;
// Determine if the object passed is an array or not
if (obj instanceof Array) {
if (this._deferredCalls && obj.length > deferThreshold) {
// Break up upsert into blocks
this._deferQueue.upsert = queue.concat(obj);
this._asyncPending('upsert');
// Fire off the insert queue handler
this.processQueue('upsert', callback);
return {};
} else {
// Loop the array and upsert each item
returnData = [];
for (i = 0; i < obj.length; i++) {
returnData.push(this.upsert(obj[i]));
}
if (callback) { callback.call(this); }
return returnData;
}
}
// Determine if the operation is an insert or an update
if (obj[this._primaryKey]) {
// Check if an object with this primary key already exists
query = {};
query[this._primaryKey] = obj[this._primaryKey];
if (this._primaryIndex.lookup(query)[0]) {
// The document already exists with this id, this operation is an update
returnData.op = 'update';
} else {
// No document with this id exists, this operation is an insert
returnData.op = 'insert';
}
} else {
// The document passed does not contain an id, this operation is an insert
returnData.op = 'insert';
}
switch (returnData.op) {
case 'insert':
returnData.result = this.insert(obj, callback);
break;
case 'update':
returnData.result = this.update(query, obj, {}, callback);
break;
default:
break;
}
return returnData;
} else {
if (callback) { callback.call(this); }
}
return {};
};
/**
* Executes a method against each document that matches query and returns an
* array of documents that may have been modified by the method.
* @param {Object} query The query object.
* @param {Function} func The method that each document is passed to. If this method
* returns false for a particular document it is excluded from the results.
* @param {Object=} options Optional options object.
* @returns {Array}
*/
Collection.prototype.filter = function (query, func, options) {
return (this.find(query, options)).filter(func);
};
/**
* Executes a method against each document that matches query and then executes
* an update based on the return data of the method.
* @param {Object} query The query object.
* @param {Function} func The method that each document is passed to. If this method
* returns false for a particular document it is excluded from the update.
* @param {Object=} options Optional options object passed to the initial find call.
* @returns {Array}
*/
Collection.prototype.filterUpdate = function (query, func, options) {
var items = this.find(query, options),
results = [],
singleItem,
singleQuery,
singleUpdate,
pk = this.primaryKey(),
i;
for (i = 0; i < items.length; i++) {
singleItem = items[i];
singleUpdate = func(singleItem);
if (singleUpdate) {
singleQuery = {};
singleQuery[pk] = singleItem[pk];
results.push(this.update(singleQuery, singleUpdate));
}
}
return results;
};
/**
* Modifies an existing document or documents in a collection. This will update
* all matches for 'query' with the data held in 'update'. It will not overwrite
* the matched documents with the update document.
*
* @param {Object} query The query that must be matched for a document to be
* operated on.
* @param {Object} update The object containing updated key/values. Any keys that
* match keys on the existing document will be overwritten with this data. Any
* keys that do not currently exist on the document will be added to the document.
* @param {Object=} options An options object.
* @param {Function=} callback The callback method to call when the update is
* complete.
* @returns {Array} The items that were updated.
*/
Collection.prototype.update = function (query, update, options, callback) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
// Convert queries from mongo dot notation to forerunner queries
if (this.mongoEmulation()) {
this.convertToFdb(query);
this.convertToFdb(update);
} else {
// Decouple the update data
update = this.decouple(update);
}
// Handle transform
update = this.transformIn(update);
return this._handleUpdate(query, update, options, callback);
};
Collection.prototype._handleUpdate = function (query, update, options, callback) {
var self = this,
op = this._metrics.create('update'),
dataSet,
updated,
updateCall = function (referencedDoc) {
var oldDoc = self.decouple(referencedDoc),
newDoc,
triggerOperation,
result;
if (self.willTrigger(self.TYPE_UPDATE, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_UPDATE, self.PHASE_AFTER)) {
newDoc = self.decouple(referencedDoc);
triggerOperation = {
type: 'update',
query: self.decouple(query),
update: self.decouple(update),
options: self.decouple(options),
op: op
};
// Update newDoc with the update criteria so we know what the data will look
// like AFTER the update is processed
result = self.updateObject(newDoc, triggerOperation.update, triggerOperation.query, triggerOperation.options, '');
if (self.processTrigger(triggerOperation, self.TYPE_UPDATE, self.PHASE_BEFORE, referencedDoc, newDoc) !== false) {
// No triggers complained so let's execute the replacement of the existing
// object with the new one
result = self.updateObject(referencedDoc, newDoc, triggerOperation.query, triggerOperation.options, '');
// NOTE: If for some reason we would only like to fire this event if changes are actually going
// to occur on the object from the proposed update then we can add "result &&" to the if
self.processTrigger(triggerOperation, self.TYPE_UPDATE, self.PHASE_AFTER, oldDoc, newDoc);
} else {
// Trigger cancelled operation so tell result that it was not updated
result = false;
}
} else {
// No triggers complained so let's execute the replacement of the existing
// object with the new one
result = self.updateObject(referencedDoc, update, query, options, '');
}
// Inform indexes of the change
self._updateIndexes(oldDoc, referencedDoc);
return result;
};
op.start();
op.time('Retrieve documents to update');
dataSet = this.find(query, {$decouple: false});
op.time('Retrieve documents to update');
if (dataSet.length) {
op.time('Update documents');
updated = dataSet.filter(updateCall);
op.time('Update documents');
if (updated.length) {
if (this.debug()) {
console.log(this.logIdentifier() + ' Updated some data');
}
op.time('Resolve chains');
if (this.chainWillSend()) {
this.chainSend('update', {
query: query,
update: update,
dataSet: this.decouple(updated)
}, options);
}
op.time('Resolve chains');
this._onUpdate(updated);
this._onChange();
if (callback) { callback.call(this); }
this.emit('immediateChange', {type: 'update', data: updated});
this.deferEmit('change', {type: 'update', data: updated});
}
}
op.stop();
// TODO: Should we decouple the updated array before return by default?
return updated || [];
};
/**
* Replaces an existing object with data from the new object without
* breaking data references.
* @param {Object} currentObj The object to alter.
* @param {Object} newObj The new object to overwrite the existing one with.
* @returns {*} Chain.
* @private
*/
Collection.prototype._replaceObj = function (currentObj, newObj) {
var i;
// Check if the new document has a different primary key value from the existing one
// Remove item from indexes
this._removeFromIndexes(currentObj);
// Remove existing keys from current object
for (i in currentObj) {
if (currentObj.hasOwnProperty(i)) {
delete currentObj[i];
}
}
// Add new keys to current object
for (i in newObj) {
if (newObj.hasOwnProperty(i)) {
currentObj[i] = newObj[i];
}
}
// Update the item in the primary index
if (!this._insertIntoIndexes(currentObj)) {
throw(this.logIdentifier() + ' Primary key violation in update! Key violated: ' + currentObj[this._primaryKey]);
}
// Update the object in the collection data
//this._data.splice(this._data.indexOf(currentObj), 1, newObj);
return this;
};
/**
* Helper method to update a document from it's id.
* @param {String} id The id of the document.
* @param {Object} update The object containing the key/values to update to.
* @returns {Object} The document that was updated or undefined
* if no document was updated.
*/
Collection.prototype.updateById = function (id, update) {
var searchObj = {};
searchObj[this._primaryKey] = id;
return this.update(searchObj, update)[0];
};
/**
* Internal method for document updating.
* @param {Object} doc The document to update.
* @param {Object} update The object with key/value pairs to update the document with.
* @param {Object} query The query object that we need to match to perform an update.
* @param {Object} options An options object.
* @param {String} path The current recursive path.
* @param {String} opType The type of update operation to perform, if none is specified
* default is to set new data against matching fields.
* @returns {Boolean} True if the document was updated with new / changed data or
* false if it was not updated because the data was the same.
* @private
*/
Collection.prototype.updateObject = function (doc, update, query, options, path, opType) {
// TODO: This method is long, try to break it into smaller pieces
update = this.decouple(update);
// Clear leading dots from path
path = path || '';
if (path.substr(0, 1) === '.') { path = path.substr(1, path.length -1); }
//var oldDoc = this.decouple(doc),
var updated = false,
recurseUpdated = false,
operation,
tmpArray,
tmpIndex,
tmpCount,
tempIndex,
tempKey,
replaceObj,
pk,
pathInstance,
sourceIsArray,
updateIsArray,
i;
// Loop each key in the update object
for (i in update) {
if (update.hasOwnProperty(i)) {
// Reset operation flag
operation = false;
// Check if the property starts with a dollar (function)
if (i.substr(0, 1) === '$') {
// Check for commands
switch (i) {
case '$key':
case '$index':
case '$data':
case '$min':
case '$max':
// Ignore some operators
operation = true;
break;
case '$each':
operation = true;
// Loop over the array of updates and run each one
tmpCount = update.$each.length;
for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) {
recurseUpdated = this.updateObject(doc, update.$each[tmpIndex], query, options, path);
if (recurseUpdated) {
updated = true;
}
}
updated = updated || recurseUpdated;
break;
case '$replace':
operation = true;
replaceObj = update.$replace;
pk = this.primaryKey();
// Loop the existing item properties and compare with
// the replacement (never remove primary key)
for (tempKey in doc) {
if (doc.hasOwnProperty(tempKey) && tempKey !== pk) {
if (replaceObj[tempKey] === undefined) {
// The new document doesn't have this field, remove it from the doc
this._updateUnset(doc, tempKey);
updated = true;
}
}
}
// Loop the new item props and update the doc
for (tempKey in replaceObj) {
if (replaceObj.hasOwnProperty(tempKey) && tempKey !== pk) {
this._updateOverwrite(doc, tempKey, replaceObj[tempKey]);
updated = true;
}
}
break;
default:
operation = true;
// Now run the operation
recurseUpdated = this.updateObject(doc, update[i], query, options, path, i);
updated = updated || recurseUpdated;
break;
}
}
// Check if the key has a .$ at the end, denoting an array lookup
if (this._isPositionalKey(i)) {
operation = true;
// Modify i to be the name of the field
i = i.substr(0, i.length - 2);
pathInstance = new Path(path + '.' + i);
// Check if the key is an array and has items
if (doc[i] && doc[i] instanceof Array && doc[i].length) {
tmpArray = [];
// Loop the array and find matches to our search
for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) {
if (this._match(doc[i][tmpIndex], pathInstance.value(query)[0], options, '', {})) {
tmpArray.push(tmpIndex);
}
}
// Loop the items that matched and update them
for (tmpIndex = 0; tmpIndex < tmpArray.length; tmpIndex++) {
recurseUpdated = this.updateObject(doc[i][tmpArray[tmpIndex]], update[i + '.$'], query, options, path + '.' + i, opType);
updated = updated || recurseUpdated;
}
}
}
if (!operation) {
if (!opType && typeof(update[i]) === 'object') {
if (doc[i] !== null && typeof(doc[i]) === 'object') {
// Check if we are dealing with arrays
sourceIsArray = doc[i] instanceof Array;
updateIsArray = update[i] instanceof Array;
if (sourceIsArray || updateIsArray) {
// Check if the update is an object and the doc is an array
if (!updateIsArray && sourceIsArray) {
// Update is an object, source is an array so match the array items
// with our query object to find the one to update inside this array
// Loop the array and find matches to our search
for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) {
recurseUpdated = this.updateObject(doc[i][tmpIndex], update[i], query, options, path + '.' + i, opType);
updated = updated || recurseUpdated;
}
} else {
// Either both source and update are arrays or the update is
// an array and the source is not, so set source to update
if (doc[i] !== update[i]) {
this._updateProperty(doc, i, update[i]);
updated = true;
}
}
} else {
// The doc key is an object so traverse the
// update further
recurseUpdated = this.updateObject(doc[i], update[i], query, options, path + '.' + i, opType);
updated = updated || recurseUpdated;
}
} else {
if (doc[i] !== update[i]) {
this._updateProperty(doc, i, update[i]);
updated = true;
}
}
} else {
switch (opType) {
case '$inc':
var doUpdate = true;
// Check for a $min / $max operator
if (update[i] > 0) {
if (update.$max) {
// Check current value
if (doc[i] >= update.$max) {
// Don't update
doUpdate = false;
}
}
} else if (update[i] < 0) {
if (update.$min) {
// Check current value
if (doc[i] <= update.$min) {
// Don't update
doUpdate = false;
}
}
}
if (doUpdate) {
this._updateIncrement(doc, i, update[i]);
updated = true;
}
break;
case '$cast':
// Casts a property to the type specified if it is not already
// that type. If the cast is an array or an object and the property
// is not already that type a new array or object is created and
// set to the property, overwriting the previous value
switch (update[i]) {
case 'array':
if (!(doc[i] instanceof Array)) {
// Cast to an array
this._updateProperty(doc, i, update.$data || []);
updated = true;
}
break;
case 'object':
if (!(doc[i] instanceof Object) || (doc[i] instanceof Array)) {
// Cast to an object
this._updateProperty(doc, i, update.$data || {});
updated = true;
}
break;
case 'number':
if (typeof doc[i] !== 'number') {
// Cast to a number
this._updateProperty(doc, i, Number(doc[i]));
updated = true;
}
break;
case 'string':
if (typeof doc[i] !== 'string') {
// Cast to a string
this._updateProperty(doc, i, String(doc[i]));
updated = true;
}
break;
default:
throw(this.logIdentifier() + ' Cannot update cast to unknown type: ' + update[i]);
}
break;
case '$push':
// Check if the target key is undefined and if so, create an array
if (doc[i] === undefined) {
// Initialise a new array
this._updateProperty(doc, i, []);
}
// Check that the target key is an array
if (doc[i] instanceof Array) {
// Check for a $position modifier with an $each
if (update[i].$position !== undefined && update[i].$each instanceof Array) {
// Grab the position to insert at
tempIndex = update[i].$position;
// Loop the each array and push each item
tmpCount = update[i].$each.length;
for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) {
this._updateSplicePush(doc[i], tempIndex + tmpIndex, update[i].$each[tmpIndex]);
}
} else if (update[i].$each instanceof Array) {
// Do a loop over the each to push multiple items
tmpCount = update[i].$each.length;
for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) {
this._updatePush(doc[i], update[i].$each[tmpIndex]);
}
} else {
// Do a standard push
this._updatePush(doc[i], update[i]);
}
updated = true;
} else {
throw(this.logIdentifier() + ' Cannot push to a key that is not an array! (' + i + ')');
}
break;
case '$pull':
if (doc[i] instanceof Array) {
tmpArray = [];
// Loop the array and find matches to our search
for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) {
if (this._match(doc[i][tmpIndex], update[i], options, '', {})) {
tmpArray.push(tmpIndex);
}
}
tmpCount = tmpArray.length;
// Now loop the pull array and remove items to be pulled
while (tmpCount--) {
this._updatePull(doc[i], tmpArray[tmpCount]);
updated = true;
}
}
break;
case '$pullAll':
if (doc[i] instanceof Array) {
if (update[i] instanceof Array) {
tmpArray = doc[i];
tmpCount = tmpArray.length;
if (tmpCount > 0) {
// Now loop the pull array and remove items to be pulled
while (tmpCount--) {
for (tempIndex = 0; tempIndex < update[i].length; tempIndex++) {
if (tmpArray[tmpCount] === update[i][tempIndex]) {
this._updatePull(doc[i], tmpCount);
tmpCount--;
updated = true;
}
}
if (tmpCount < 0) {
break;
}
}
}
} else {
throw(this.logIdentifier() + ' Cannot pullAll without being given an array of values to pull! (' + i + ')');
}
}
break;
case '$addToSet':
// Check if the target key is undefined and if so, create an array
if (doc[i] === undefined) {
// Initialise a new array
this._updateProperty(doc, i, []);
}
// Check that the target key is an array
if (doc[i] instanceof Array) {
// Loop the target array and check for existence of item
var targetArr = doc[i],
targetArrIndex,
targetArrCount = targetArr.length,
objHash,
addObj = true,
optionObj = (options && options.$addToSet),
hashMode,
pathSolver;
// Check if we have an options object for our operation
if (update[i].$key) {
hashMode = false;
pathSolver = new Path(update[i].$key);
objHash = pathSolver.value(update[i])[0];
// Remove the key from the object before we add it
delete update[i].$key;
} else if (optionObj && optionObj.key) {
hashMode = false;
pathSolver = new Path(optionObj.key);
objHash = pathSolver.value(update[i])[0];
} else {
objHash = this.jStringify(update[i]);
hashMode = true;
}
for (targetArrIndex = 0; targetArrIndex < targetArrCount; targetArrIndex++) {
if (hashMode) {
// Check if objects match via a string hash (JSON)
if (this.jStringify(targetArr[targetArrIndex]) === objHash) {
// The object already exists, don't add it
addObj = false;
break;
}
} else {
// Check if objects match based on the path
if (objHash === pathSolver.value(targetArr[targetArrIndex])[0]) {
// The object already exists, don't add it
addObj = false;
break;
}
}
}
if (addObj) {
this._updatePush(doc[i], update[i]);
updated = true;
}
} else {
throw(this.logIdentifier() + ' Cannot addToSet on a key that is not an array! (' + i + ')');
}
break;
case '$splicePush':
// Check if the target key is undefined and if so, create an array
if (doc[i] === undefined) {
// Initialise a new array
this._updateProperty(doc, i, []);
}
// Check that the target key is an array
if (doc[i] instanceof Array) {
tempIndex = update.$index;
if (tempIndex !== undefined) {
delete update.$index;
// Check for out of bounds index
if (tempIndex > doc[i].length) {
tempIndex = doc[i].length;
}
this._updateSplicePush(doc[i], tempIndex, update[i]);
updated = true;
} else {
throw(this.logIdentifier() + ' Cannot splicePush without a $index integer value!');
}
} else {
throw(this.logIdentifier() + ' Cannot splicePush with a key that is not an array! (' + i + ')');
}
break;
case '$move':
if (doc[i] instanceof Array) {
// Loop the array and find matches to our search
for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) {
if (this._match(doc[i][tmpIndex], update[i], options, '', {})) {
var moveToIndex = update.$index;
if (moveToIndex !== undefined) {
delete update.$index;
this._updateSpliceMove(doc[i], tmpIndex, moveToIndex);
updated = true;
} else {
throw(this.logIdentifier() + ' Cannot move without a $index integer value!');
}
break;
}
}
} else {
throw(this.logIdentifier() + ' Cannot move on a key that is not an array! (' + i + ')');
}
break;
case '$mul':
this._updateMultiply(doc, i, update[i]);
updated = true;
break;
case '$rename':
this._updateRename(doc, i, update[i]);
updated = true;
break;
case '$overwrite':
this._updateOverwrite(doc, i, update[i]);
updated = true;
break;
case '$unset':
this._updateUnset(doc, i);
updated = true;
break;
case '$clear':
this._updateClear(doc, i);
updated = true;
break;
case '$pop':
if (doc[i] instanceof Array) {
if (this._updatePop(doc[i], update[i])) {
updated = true;
}
} else {
throw(this.logIdentifier() + ' Cannot pop from a key that is not an array! (' + i + ')');
}
break;
case '$toggle':
// Toggle the boolean property between true and false
this._updateProperty(doc, i, !doc[i]);
updated = true;
break;
default:
if (doc[i] !== update[i]) {
this._updateProperty(doc, i, update[i]);
updated = true;
}
break;
}
}
}
}
}
return updated;
};
/**
* Determines if the passed key has an array positional mark (a dollar at the end
* of its name).
* @param {String} key The key to check.
* @returns {Boolean} True if it is a positional or false if not.
* @private
*/
Collection.prototype._isPositionalKey = function (key) {
return key.substr(key.length - 2, 2) === '.$';
};
/**
* Removes any documents from the collection that match the search query
* key/values.
* @param {Object} query The query object.
* @param {Object=} options An options object.
* @param {Function=} callback A callback method.
* @returns {Array} An array of the documents that were removed.
*/
Collection.prototype.remove = function (query, options, callback) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
var self = this,
dataSet,
index,
arrIndex,
returnArr,
removeMethod,
triggerOperation,
doc,
newDoc;
if (typeof(options) === 'function') {
callback = options;
options = {};
}
// Convert queries from mongo dot notation to forerunner queries
if (this.mongoEmulation()) {
this.convertToFdb(query);
}
if (query instanceof Array) {
returnArr = [];
for (arrIndex = 0; arrIndex < query.length; arrIndex++) {
returnArr.push(this.remove(query[arrIndex], {noEmit: true}));
}
if (!options || (options && !options.noEmit)) {
this._onRemove(returnArr);
}
if (callback) { callback.call(this, false, returnArr); }
return returnArr;
} else {
returnArr = [];
dataSet = this.find(query, {$decouple: false});
if (dataSet.length) {
removeMethod = function (dataItem) {
// Remove the item from the collection's indexes
self._removeFromIndexes(dataItem);
// Remove data from internal stores
index = self._data.indexOf(dataItem);
self._dataRemoveAtIndex(index);
returnArr.push(dataItem);
};
// Remove the data from the collection
for (var i = 0; i < dataSet.length; i++) {
doc = dataSet[i];
if (self.willTrigger(self.TYPE_REMOVE, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_REMOVE, self.PHASE_AFTER)) {
triggerOperation = {
type: 'remove'
};
newDoc = self.decouple(doc);
if (self.processTrigger(triggerOperation, self.TYPE_REMOVE, self.PHASE_BEFORE, newDoc, newDoc) !== false) {
// The trigger didn't ask to cancel so execute the removal method
removeMethod(doc);
self.processTrigger(triggerOperation, self.TYPE_REMOVE, self.PHASE_AFTER, newDoc, newDoc);
}
} else {
// No triggers to execute
removeMethod(doc);
}
}
if (returnArr.length) {
//op.time('Resolve chains');
self.chainSend('remove', {
query: query,
dataSet: returnArr
}, options);
//op.time('Resolve chains');
if (!options || (options && !options.noEmit)) {
this._onRemove(returnArr);
}
this._onChange();
this.emit('immediateChange', {type: 'remove', data: returnArr});
this.deferEmit('change', {type: 'remove', data: returnArr});
}
}
if (callback) { callback.call(this, false, returnArr); }
return returnArr;
}
};
/**
* Helper method that removes a document that matches the given id.
* @param {String} id The id of the document to remove.
* @returns {Object} The document that was removed or undefined if
* nothing was removed.
*/
Collection.prototype.removeById = function (id) {
var searchObj = {};
searchObj[this._primaryKey] = id;
return this.remove(searchObj)[0];
};
/**
* Processes a deferred action queue.
* @param {String} type The queue name to process.
* @param {Function} callback A method to call when the queue has processed.
* @param {Object=} resultObj A temp object to hold results in.
*/
Collection.prototype.processQueue = function (type, callback, resultObj) {
var self = this,
queue = this._deferQueue[type],
deferThreshold = this._deferThreshold[type],
deferTime = this._deferTime[type],
dataArr,
result;
resultObj = resultObj || {
deferred: true
};
if (queue.length) {
// Process items up to the threshold
if (queue.length > deferThreshold) {
// Grab items up to the threshold value
dataArr = queue.splice(0, deferThreshold);
} else {
// Grab all the remaining items
dataArr = queue.splice(0, queue.length);
}
result = self[type](dataArr);
switch (type) {
case 'insert':
resultObj.inserted = resultObj.inserted || [];
resultObj.failed = resultObj.failed || [];
resultObj.inserted = resultObj.inserted.concat(result.inserted);
resultObj.failed = resultObj.failed.concat(result.failed);
break;
}
// Queue another process
setTimeout(function () {
self.processQueue.call(self, type, callback, resultObj);
}, deferTime);
} else {
if (callback) { callback.call(this, resultObj); }
this._asyncComplete(type);
}
// Check if all queues are complete
if (!this.isProcessingQueue()) {
this.deferEmit('queuesComplete');
}
};
/**
* Checks if any CRUD operations have been deferred and are still waiting to
* be processed.
* @returns {Boolean} True if there are still deferred CRUD operations to process
* or false if all queues are clear.
*/
Collection.prototype.isProcessingQueue = function () {
var i;
for (i in this._deferQueue) {
if (this._deferQueue.hasOwnProperty(i)) {
if (this._deferQueue[i].length) {
return true;
}
}
}
return false;
};
/**
* Inserts a document or array of documents into the collection.
* @param {Object|Array} data Either a document object or array of document
* @param {Number=} index Optional index to insert the record at.
* @param {Function=} callback Optional callback called once action is complete.
* objects to insert into the collection.
*/
Collection.prototype.insert = function (data, index, callback) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
if (typeof(index) === 'function') {
callback = index;
index = this._data.length;
} else if (index === undefined) {
index = this._data.length;
}
data = this.transformIn(data);
return this._insertHandle(data, index, callback);
};
/**
* Inserts a document or array of documents into the collection.
* @param {Object|Array} data Either a document object or array of document
* @param {Number=} index Optional index to insert the record at.
* @param {Function=} callback Optional callback called once action is complete.
* objects to insert into the collection.
*/
Collection.prototype._insertHandle = function (data, index, callback) {
var //self = this,
queue = this._deferQueue.insert,
deferThreshold = this._deferThreshold.insert,
//deferTime = this._deferTime.insert,
inserted = [],
failed = [],
insertResult,
resultObj,
i;
if (data instanceof Array) {
// Check if there are more insert items than the insert defer
// threshold, if so, break up inserts so we don't tie up the
// ui or thread
if (this._deferredCalls && data.length > deferThreshold) {
// Break up insert into blocks
this._deferQueue.insert = queue.concat(data);
this._asyncPending('insert');
// Fire off the insert queue handler
this.processQueue('insert', callback);
return;
} else {
// Loop the array and add items
for (i = 0; i < data.length; i++) {
insertResult = this._insert(data[i], index + i);
if (insertResult === true) {
inserted.push(data[i]);
} else {
failed.push({
doc: data[i],
reason: insertResult
});
}
}
}
} else {
// Store the data item
insertResult = this._insert(data, index);
if (insertResult === true) {
inserted.push(data);
} else {
failed.push({
doc: data,
reason: insertResult
});
}
}
resultObj = {
deferred: false,
inserted: inserted,
failed: failed
};
this._onInsert(inserted, failed);
if (callback) { callback.call(this, resultObj); }
this._onChange();
this.emit('immediateChange', {type: 'insert', data: inserted});
this.deferEmit('change', {type: 'insert', data: inserted});
return resultObj;
};
/**
* Internal method to insert a document into the collection. Will
* check for index violations before allowing the document to be inserted.
* @param {Object} doc The document to insert after passing index violation
* tests.
* @param {Number=} index Optional index to insert the document at.
* @returns {Boolean|Object} True on success, false if no document passed,
* or an object containing details about an index violation if one occurred.
* @private
*/
Collection.prototype._insert = function (doc, index) {
if (doc) {
var self = this,
indexViolation,
triggerOperation,
insertMethod,
newDoc,
capped = this.capped(),
cappedSize = this.cappedSize();
this.ensurePrimaryKey(doc);
// Check indexes are not going to be broken by the document
indexViolation = this.insertIndexViolation(doc);
insertMethod = function (doc) {
// Add the item to the collection's indexes
self._insertIntoIndexes(doc);
// Check index overflow
if (index > self._data.length) {
index = self._data.length;
}
// Insert the document
self._dataInsertAtIndex(index, doc);
// Check capped collection status and remove first record
// if we are over the threshold
if (capped && self._data.length > cappedSize) {
// Remove the first item in the data array
self.removeById(self._data[0][self._primaryKey]);
}
//op.time('Resolve chains');
if (self.chainWillSend()) {
self.chainSend('insert', {
dataSet: self.decouple([doc])
}, {
index: index
});
}
//op.time('Resolve chains');
};
if (!indexViolation) {
if (self.willTrigger(self.TYPE_INSERT, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_INSERT, self.PHASE_AFTER)) {
triggerOperation = {
type: 'insert'
};
if (self.processTrigger(triggerOperation, self.TYPE_INSERT, self.PHASE_BEFORE, {}, doc) !== false) {
insertMethod(doc);
if (self.willTrigger(self.TYPE_INSERT, self.PHASE_AFTER)) {
// Clone the doc so that the programmer cannot update the internal document
// on the "after" phase trigger
newDoc = self.decouple(doc);
self.processTrigger(triggerOperation, self.TYPE_INSERT, self.PHASE_AFTER, {}, newDoc);
}
} else {
// The trigger just wants to cancel the operation
return 'Trigger cancelled operation';
}
} else {
// No triggers to execute
insertMethod(doc);
}
return true;
} else {
return 'Index violation in index: ' + indexViolation;
}
}
return 'No document passed to insert';
};
/**
* Inserts a document into the internal collection data array at
* Inserts a document into the internal collection data array at
* the specified index.
* @param {number} index The index to insert at.
* @param {object} doc The document to insert.
* @private
*/
Collection.prototype._dataInsertAtIndex = function (index, doc) {
this._data.splice(index, 0, doc);
};
/**
* Removes a document from the internal collection data array at
* the specified index.
* @param {number} index The index to remove from.
* @private
*/
Collection.prototype._dataRemoveAtIndex = function (index) {
this._data.splice(index, 1);
};
/**
* Replaces all data in the collection's internal data array with
* the passed array of data.
* @param {array} data The array of data to replace existing data with.
* @private
*/
Collection.prototype._dataReplace = function (data) {
// Clear the array - using a while loop with pop is by far the
// fastest way to clear an array currently
while (this._data.length) {
this._data.pop();
}
// Append new items to the array
this._data = this._data.concat(data);
};
/**
* Inserts a document into the collection indexes.
* @param {Object} doc The document to insert.
* @private
*/
Collection.prototype._insertIntoIndexes = function (doc) {
var arr = this._indexByName,
arrIndex,
violated,
hash = this.hash(doc),
pk = this._primaryKey;
// Insert to primary key index
violated = this._primaryIndex.uniqueSet(doc[pk], doc);
this._primaryCrc.uniqueSet(doc[pk], hash);
this._crcLookup.uniqueSet(hash, doc);
// Insert into other indexes
for (arrIndex in arr) {
if (arr.hasOwnProperty(arrIndex)) {
arr[arrIndex].insert(doc);
}
}
return violated;
};
/**
* Removes a document from the collection indexes.
* @param {Object} doc The document to remove.
* @private
*/
Collection.prototype._removeFromIndexes = function (doc) {
var arr = this._indexByName,
arrIndex,
hash = this.hash(doc),
pk = this._primaryKey;
// Remove from primary key index
this._primaryIndex.unSet(doc[pk]);
this._primaryCrc.unSet(doc[pk]);
this._crcLookup.unSet(hash);
// Remove from other indexes
for (arrIndex in arr) {
if (arr.hasOwnProperty(arrIndex)) {
arr[arrIndex].remove(doc);
}
}
};
/**
* Updates collection index data for the passed document.
* @param {Object} oldDoc The old document as it was before the update.
* @param {Object} newDoc The document as it now is after the update.
* @private
*/
Collection.prototype._updateIndexes = function (oldDoc, newDoc) {
this._removeFromIndexes(oldDoc);
this._insertIntoIndexes(newDoc);
};
/**
* Rebuild collection indexes.
* @private
*/
Collection.prototype._rebuildIndexes = function () {
var arr = this._indexByName,
arrIndex;
// Remove from other indexes
for (arrIndex in arr) {
if (arr.hasOwnProperty(arrIndex)) {
arr[arrIndex].rebuild();
}
}
};
/**
* Uses the passed query to generate a new collection with results
* matching the query parameters.
*
* @param {Object} query The query object to generate the subset with.
* @param {Object=} options An options object.
* @returns {*}
*/
Collection.prototype.subset = function (query, options) {
var result = this.find(query, options),
coll;
coll = new Collection();
coll.db(this._db);
coll.subsetOf(this)
.primaryKey(this._primaryKey)
.setData(result);
return coll;
};
/**
* Gets / sets the collection that this collection is a subset of.
* @param {Collection=} collection The collection to set as the parent of this subset.
* @returns {Collection}
*/
Shared.synthesize(Collection.prototype, 'subsetOf');
/**
* Checks if the collection is a subset of the passed collection.
* @param {Collection} collection The collection to test against.
* @returns {Boolean} True if the passed collection is the parent of
* the current collection.
*/
Collection.prototype.isSubsetOf = function (collection) {
return this._subsetOf === collection;
};
/**
* Find the distinct values for a specified field across a single collection and
* returns the results in an array.
* @param {String} key The field path to return distinct values for e.g. "person.name".
* @param {Object=} query The query to use to filter the documents used to return values from.
* @param {Object=} options The query options to use when running the query.
* @returns {Array}
*/
Collection.prototype.distinct = function (key, query, options) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
var data = this.find(query, options),
pathSolver = new Path(key),
valueUsed = {},
distinctValues = [],
value,
i;
// Loop the data and build array of distinct values
for (i = 0; i < data.length; i++) {
value = pathSolver.value(data[i])[0];
if (value && !valueUsed[value]) {
valueUsed[value] = true;
distinctValues.push(value);
}
}
return distinctValues;
};
/**
* Helper method to find a document by it's id.
* @param {String} id The id of the document.
* @param {Object=} options The options object, allowed keys are sort and limit.
* @returns {Array} The items that were updated.
*/
Collection.prototype.findById = function (id, options) {
var searchObj = {};
searchObj[this._primaryKey] = id;
return this.find(searchObj, options)[0];
};
/**
* Finds all documents that contain the passed string or search object
* regardless of where the string might occur within the document. This
* will match strings from the start, middle or end of the document's
* string (partial match).
* @param search The string to search for. Case sensitive.
* @param options A standard find() options object.
* @returns {Array} An array of documents that matched the search string.
*/
Collection.prototype.peek = function (search, options) {
// Loop all items
var arr = this._data,
arrCount = arr.length,
arrIndex,
arrItem,
tempColl = new Collection(),
typeOfSearch = typeof search;
if (typeOfSearch === 'string') {
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
// Get json representation of object
arrItem = this.jStringify(arr[arrIndex]);
// Check if string exists in object json
if (arrItem.indexOf(search) > -1) {
// Add this item to the temp collection
tempColl.insert(arr[arrIndex]);
}
}
return tempColl.find({}, options);
} else {
return this.find(search, options);
}
};
/**
* Provides a query plan / operations log for a query.
* @param {Object} query The query to execute.
* @param {Object=} options Optional options object.
* @returns {Object} The query plan.
*/
Collection.prototype.explain = function (query, options) {
var result = this.find(query, options);
return result.__fdbOp._data;
};
/**
* Generates an options object with default values or adds default
* values to a passed object if those values are not currently set
* to anything.
* @param {object=} obj Optional options object to modify.
* @returns {object} The options object.
*/
Collection.prototype.options = function (obj) {
obj = obj || {};
obj.$decouple = obj.$decouple !== undefined ? obj.$decouple : true;
obj.$explain = obj.$explain !== undefined ? obj.$explain : false;
return obj;
};
/**
* Queries the collection based on the query object passed.
* @param {Object} query The query key/values that a document must match in
* order for it to be returned in the result array.
* @param {Object=} options An optional options object.
* @param {Function=} callback !! DO NOT USE, THIS IS NON-OPERATIONAL !!
* Optional callback. If specified the find process
* will not return a value and will assume that you wish to operate under an
* async mode. This will break up large find requests into smaller chunks and
* process them in a non-blocking fashion allowing large datasets to be queried
* without causing the browser UI to pause. Results from this type of operation
* will be passed back to the callback once completed.
*
* @returns {Array} The results array from the find operation, containing all
* documents that matched the query.
*/
Collection.prototype.find = function (query, options, callback) {
// Convert queries from mongo dot notation to forerunner queries
if (this.mongoEmulation()) {
this.convertToFdb(query);
}
if (callback) {
// Check the size of the collection's data array
// Split operation into smaller tasks and callback when complete
callback.call(this, 'Callbacks for the find() operation are not yet implemented!', []);
return [];
}
return this._find.call(this, query, options, callback);
};
Collection.prototype._find = function (query, options) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
// TODO: This method is quite long, break into smaller pieces
query = query || {};
var op = this._metrics.create('find'),
pk = this.primaryKey(),
self = this,
analysis,
scanLength,
requiresTableScan = true,
resultArr,
joinIndex,
joinSource = {},
joinQuery,
joinPath,
joinSourceKey,
joinSourceType,
joinSourceIdentifier,
joinSourceData,
resultRemove = [],
i, j, k,
fieldListOn = [],
fieldListOff = [],
elemMatchPathSolver,
elemMatchSubArr,
elemMatchSpliceArr,
matcherTmpOptions = {},
result,
cursor = {},
pathSolver,
waterfallCollection,
matcher;
if (!(options instanceof Array)) {
options = this.options(options);
}
matcher = function (doc) {
return self._match(doc, query, options, 'and', matcherTmpOptions);
};
op.start();
if (query) {
// Check if the query is an array (multi-operation waterfall query)
if (query instanceof Array) {
waterfallCollection = this;
// Loop the query operations
for (i = 0; i < query.length; i++) {
// Execute each operation and pass the result into the next
// query operation
waterfallCollection = waterfallCollection.subset(query[i], options && options[i] ? options[i] : {});
}
return waterfallCollection.find();
}
// Pre-process any data-changing query operators first
if (query.$findSub) {
// Check we have all the parts we need
if (!query.$findSub.$path) {
throw('$findSub missing $path property!');
}
return this.findSub(
query.$findSub.$query,
query.$findSub.$path,
query.$findSub.$subQuery,
query.$findSub.$subOptions
);
}
if (query.$findSubOne) {
// Check we have all the parts we need
if (!query.$findSubOne.$path) {
throw('$findSubOne missing $path property!');
}
return this.findSubOne(
query.$findSubOne.$query,
query.$findSubOne.$path,
query.$findSubOne.$subQuery,
query.$findSubOne.$subOptions
);
}
// Get query analysis to execute best optimised code path
op.time('analyseQuery');
analysis = this._analyseQuery(self.decouple(query), options, op);
op.time('analyseQuery');
op.data('analysis', analysis);
// Check if the query tries to limit by data that would only exist after
// the join operation has been completed
if (analysis.hasJoin && analysis.queriesJoin) {
// The query has a join and tries to limit by it's joined data
// Get references to the join sources
op.time('joinReferences');
for (joinIndex = 0; joinIndex < analysis.joinsOn.length; joinIndex++) {
joinSourceData = analysis.joinsOn[joinIndex];
joinSourceKey = joinSourceData.key;
joinSourceType = joinSourceData.type;
joinSourceIdentifier = joinSourceData.id;
joinPath = new Path(analysis.joinQueries[joinSourceKey]);
joinQuery = joinPath.value(query)[0];
joinSource[joinSourceIdentifier] = this._db[joinSourceType](joinSourceKey).subset(joinQuery);
// Remove join clause from main query
delete query[analysis.joinQueries[joinSourceKey]];
}
op.time('joinReferences');
}
// Check if an index lookup can be used to return this result
if (analysis.indexMatch.length && (!options || (options && !options.$skipIndex))) {
op.data('index.potential', analysis.indexMatch);
op.data('index.used', analysis.indexMatch[0].index);
// Get the data from the index
op.time('indexLookup');
resultArr = analysis.indexMatch[0].lookup || [];
op.time('indexLookup');
// Check if the index coverage is all keys, if not we still need to table scan it
if (analysis.indexMatch[0].keyData.totalKeyCount === analysis.indexMatch[0].keyData.score) {
// Don't require a table scan to find relevant documents
requiresTableScan = false;
}
} else {
op.flag('usedIndex', false);
}
if (requiresTableScan) {
if (resultArr && resultArr.length) {
scanLength = resultArr.length;
op.time('tableScan: ' + scanLength);
// Filter the source data and return the result
resultArr = resultArr.filter(matcher);
} else {
// Filter the source data and return the result
scanLength = this._data.length;
op.time('tableScan: ' + scanLength);
resultArr = this._data.filter(matcher);
}
op.time('tableScan: ' + scanLength);
}
// Order the array if we were passed a sort clause
if (options.$orderBy) {
op.time('sort');
resultArr = this.sort(options.$orderBy, resultArr);
op.time('sort');
}
if (options.$page !== undefined && options.$limit !== undefined) {
// Record paging data
cursor.page = options.$page;
cursor.pages = Math.ceil(resultArr.length / options.$limit);
cursor.records = resultArr.length;
// Check if we actually need to apply the paging logic
if (options.$page && options.$limit > 0) {
op.data('cursor', cursor);
// Skip to the page specified based on limit
resultArr.splice(0, options.$page * options.$limit);
}
}
if (options.$skip) {
cursor.skip = options.$skip;
// Skip past the number of records specified
resultArr.splice(0, options.$skip);
op.data('skip', options.$skip);
}
if (options.$limit && resultArr && resultArr.length > options.$limit) {
cursor.limit = options.$limit;
resultArr.length = options.$limit;
op.data('limit', options.$limit);
}
if (options.$decouple) {
// Now decouple the data from the original objects
op.time('decouple');
resultArr = this.decouple(resultArr);
op.time('decouple');
op.data('flag.decouple', true);
}
// Now process any joins on the final data
if (options.$join) {
resultRemove = resultRemove.concat(this.applyJoin(resultArr, options.$join, joinSource));
op.data('flag.join', true);
}
// Process removal queue
if (resultRemove.length) {
op.time('removalQueue');
this.spliceArrayByIndexList(resultArr, resultRemove);
op.time('removalQueue');
}
if (options.$transform) {
op.time('transform');
for (i = 0; i < resultArr.length; i++) {
resultArr.splice(i, 1, options.$transform(resultArr[i]));
}
op.time('transform');
op.data('flag.transform', true);
}
// Process transforms
if (this._transformEnabled && this._transformOut) {
op.time('transformOut');
resultArr = this.transformOut(resultArr);
op.time('transformOut');
}
op.data('results', resultArr.length);
} else {
resultArr = [];
}
// Check for an $as operator in the options object and if it exists
// iterate over the fields and generate a rename function that will
// operate over the entire returned data array and rename each object's
// fields to their new names
// TODO: Enable $as in collection find to allow renaming fields
/*if (options.$as) {
renameFieldPath = new Path();
renameFieldMethod = function (obj, oldFieldPath, newFieldName) {
renameFieldPath.path(oldFieldPath);
renameFieldPath.rename(newFieldName);
};
for (i in options.$as) {
if (options.$as.hasOwnProperty(i)) {
}
}
}*/
if (!options.$aggregate) {
// Generate a list of fields to limit data by
// Each property starts off being enabled by default (= 1) then
// if any property is explicitly specified as 1 then all switch to
// zero except _id.
//
// Any that are explicitly set to zero are switched off.
op.time('scanFields');
for (i in options) {
if (options.hasOwnProperty(i) && i.indexOf('$') !== 0) {
if (options[i] === 1) {
fieldListOn.push(i);
} else if (options[i] === 0) {
fieldListOff.push(i);
}
}
}
op.time('scanFields');
// Limit returned fields by the options data
if (fieldListOn.length || fieldListOff.length) {
op.data('flag.limitFields', true);
op.data('limitFields.on', fieldListOn);
op.data('limitFields.off', fieldListOff);
op.time('limitFields');
// We have explicit fields switched on or off
for (i = 0; i < resultArr.length; i++) {
result = resultArr[i];
for (j in result) {
if (result.hasOwnProperty(j)) {
if (fieldListOn.length) {
// We have explicit fields switched on so remove all fields
// that are not explicitly switched on
// Check if the field name is not the primary key
if (j !== pk) {
if (fieldListOn.indexOf(j) === -1) {
// This field is not in the on list, remove it
delete result[j];
}
}
}
if (fieldListOff.length) {
// We have explicit fields switched off so remove fields
// that are explicitly switched off
if (fieldListOff.indexOf(j) > -1) {
// This field is in the off list, remove it
delete result[j];
}
}
}
}
}
op.time('limitFields');
}
// Now run any projections on the data required
if (options.$elemMatch) {
op.data('flag.elemMatch', true);
op.time('projection-elemMatch');
for (i in options.$elemMatch) {
if (options.$elemMatch.hasOwnProperty(i)) {
elemMatchPathSolver = new Path(i);
// Loop the results array
for (j = 0; j < resultArr.length; j++) {
elemMatchSubArr = elemMatchPathSolver.value(resultArr[j])[0];
// Check we have a sub-array to loop
if (elemMatchSubArr && elemMatchSubArr.length) {
// Loop the sub-array and check for projection query matches
for (k = 0; k < elemMatchSubArr.length; k++) {
// Check if the current item in the sub-array matches the projection query
if (self._match(elemMatchSubArr[k], options.$elemMatch[i], options, '', {})) {
// The item matches the projection query so set the sub-array
// to an array that ONLY contains the matching item and then
// exit the loop since we only want to match the first item
elemMatchPathSolver.set(resultArr[j], i, [elemMatchSubArr[k]]);
break;
}
}
}
}
}
}
op.time('projection-elemMatch');
}
if (options.$elemsMatch) {
op.data('flag.elemsMatch', true);
op.time('projection-elemsMatch');
for (i in options.$elemsMatch) {
if (options.$elemsMatch.hasOwnProperty(i)) {
elemMatchPathSolver = new Path(i);
// Loop the results array
for (j = 0; j < resultArr.length; j++) {
elemMatchSubArr = elemMatchPathSolver.value(resultArr[j])[0];
// Check we have a sub-array to loop
if (elemMatchSubArr && elemMatchSubArr.length) {
elemMatchSpliceArr = [];
// Loop the sub-array and check for projection query matches
for (k = 0; k < elemMatchSubArr.length; k++) {
// Check if the current item in the sub-array matches the projection query
if (self._match(elemMatchSubArr[k], options.$elemsMatch[i], options, '', {})) {
// The item matches the projection query so add it to the final array
elemMatchSpliceArr.push(elemMatchSubArr[k]);
}
}
// Now set the final sub-array to the matched items
elemMatchPathSolver.set(resultArr[j], i, elemMatchSpliceArr);
}
}
}
}
op.time('projection-elemsMatch');
}
}
// Process aggregation
if (options.$aggregate) {
op.data('flag.aggregate', true);
op.time('aggregate');
pathSolver = new Path(options.$aggregate);
resultArr = pathSolver.value(resultArr);
op.time('aggregate');
}
op.stop();
resultArr.__fdbOp = op;
resultArr.$cursor = cursor;
return resultArr;
};
/**
* Returns one document that satisfies the specified query criteria. If multiple
* documents satisfy the query, this method returns the first document to match
* the query.
* @returns {*}
*/
Collection.prototype.findOne = function () {
return (this.find.apply(this, arguments))[0];
};
/**
* Gets the index in the collection data array of the first item matched by
* the passed query object.
* @param {Object} query The query to run to find the item to return the index of.
* @param {Object=} options An options object.
* @returns {Number}
*/
Collection.prototype.indexOf = function (query, options) {
var item = this.find(query, {$decouple: false})[0],
sortedData;
if (item) {
if (!options || options && !options.$orderBy) {
// Basic lookup from order of insert
return this._data.indexOf(item);
} else {
// Trying to locate index based on query with sort order
options.$decouple = false;
sortedData = this.find(query, options);
return sortedData.indexOf(item);
}
}
return -1;
};
/**
* Returns the index of the document identified by the passed item's primary key.
* @param {*} itemLookup The document whose primary key should be used to lookup
* or the id to lookup.
* @param {Object=} options An options object.
* @returns {Number} The index the item with the matching primary key is occupying.
*/
Collection.prototype.indexOfDocById = function (itemLookup, options) {
var item,
sortedData;
if (typeof itemLookup !== 'object') {
item = this._primaryIndex.get(itemLookup);
} else {
item = this._primaryIndex.get(itemLookup[this._primaryKey]);
}
if (item) {
if (!options || options && !options.$orderBy) {
// Basic lookup
return this._data.indexOf(item);
} else {
// Sorted lookup
options.$decouple = false;
sortedData = this.find({}, options);
return sortedData.indexOf(item);
}
}
return -1;
};
/**
* Removes a document from the collection by it's index in the collection's
* data array.
* @param {Number} index The index of the document to remove.
* @returns {Object} The document that has been removed or false if none was
* removed.
*/
Collection.prototype.removeByIndex = function (index) {
var doc,
docId;
doc = this._data[index];
if (doc !== undefined) {
doc = this.decouple(doc);
docId = doc[this.primaryKey()];
return this.removeById(docId);
}
return false;
};
/**
* Gets / sets the collection transform options.
* @param {Object} obj A collection transform options object.
* @returns {*}
*/
Collection.prototype.transform = function (obj) {
if (obj !== undefined) {
if (typeof obj === "object") {
if (obj.enabled !== undefined) {
this._transformEnabled = obj.enabled;
}
if (obj.dataIn !== undefined) {
this._transformIn = obj.dataIn;
}
if (obj.dataOut !== undefined) {
this._transformOut = obj.dataOut;
}
} else {
this._transformEnabled = obj !== false;
}
return this;
}
return {
enabled: this._transformEnabled,
dataIn: this._transformIn,
dataOut: this._transformOut
};
};
/**
* Transforms data using the set transformIn method.
* @param {Object} data The data to transform.
* @returns {*}
*/
Collection.prototype.transformIn = function (data) {
if (this._transformEnabled && this._transformIn) {
if (data instanceof Array) {
var finalArr = [],
transformResult,
i;
for (i = 0; i < data.length; i++) {
transformResult = this._transformIn(data[i]);
// Support transforms returning multiple items
if (transformResult instanceof Array) {
finalArr = finalArr.concat(transformResult);
} else {
finalArr.push(transformResult);
}
}
return finalArr;
} else {
return this._transformIn(data);
}
}
return data;
};
/**
* Transforms data using the set transformOut method.
* @param {Object} data The data to transform.
* @returns {*}
*/
Collection.prototype.transformOut = function (data) {
if (this._transformEnabled && this._transformOut) {
if (data instanceof Array) {
var finalArr = [],
transformResult,
i;
for (i = 0; i < data.length; i++) {
transformResult = this._transformOut(data[i]);
// Support transforms returning multiple items
if (transformResult instanceof Array) {
finalArr = finalArr.concat(transformResult);
} else {
finalArr.push(transformResult);
}
}
return finalArr;
} else {
return this._transformOut(data);
}
}
return data;
};
/**
* Sorts an array of documents by the given sort path.
* @param {*} sortObj The keys and orders the array objects should be sorted by.
* @param {Array} arr The array of documents to sort.
* @returns {Array}
*/
Collection.prototype.sort = function (sortObj, arr) {
// Convert the index object to an array of key val objects
var self = this,
keys = sharedPathSolver.parse(sortObj, true);
if (keys.length) {
// Execute sort
arr.sort(function (a, b) {
// Loop the index array
var i,
indexData,
result = 0;
for (i = 0; i < keys.length; i++) {
indexData = keys[i];
if (indexData.value === 1) {
result = self.sortAsc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path));
} else if (indexData.value === -1) {
result = self.sortDesc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path));
}
if (result !== 0) {
return result;
}
}
return result;
});
}
return arr;
};
// Commented as we have a new method that was originally implemented for binary trees.
// This old method actually has problems with nested sort objects
/*Collection.prototype.sortold = function (sortObj, arr) {
// Make sure we have an array object
arr = arr || [];
var sortArr = [],
sortKey,
sortSingleObj;
for (sortKey in sortObj) {
if (sortObj.hasOwnProperty(sortKey)) {
sortSingleObj = {};
sortSingleObj[sortKey] = sortObj[sortKey];
sortSingleObj.___fdbKey = String(sortKey);
sortArr.push(sortSingleObj);
}
}
if (sortArr.length < 2) {
// There is only one sort criteria, do a simple sort and return it
return this._sort(sortObj, arr);
} else {
return this._bucketSort(sortArr, arr);
}
};*/
/**
* Takes array of sort paths and sorts them into buckets before returning final
* array fully sorted by multi-keys.
* @param keyArr
* @param arr
* @returns {*}
* @private
*/
/*Collection.prototype._bucketSort = function (keyArr, arr) {
var keyObj = keyArr.shift(),
arrCopy,
bucketData,
bucketOrder,
bucketKey,
buckets,
i,
finalArr = [];
if (keyArr.length > 0) {
// Sort array by bucket key
arr = this._sort(keyObj, arr);
// Split items into buckets
bucketData = this.bucket(keyObj.___fdbKey, arr);
bucketOrder = bucketData.order;
buckets = bucketData.buckets;
// Loop buckets and sort contents
for (i = 0; i < bucketOrder.length; i++) {
bucketKey = bucketOrder[i];
arrCopy = [].concat(keyArr);
finalArr = finalArr.concat(this._bucketSort(arrCopy, buckets[bucketKey]));
}
return finalArr;
} else {
return this._sort(keyObj, arr);
}
};*/
/**
* Takes an array of objects and returns a new object with the array items
* split into buckets by the passed key.
* @param {String} key The key to split the array into buckets by.
* @param {Array} arr An array of objects.
* @returns {Object}
*/
/*Collection.prototype.bucket = function (key, arr) {
var i,
oldField,
field,
fieldArr = [],
buckets = {};
for (i = 0; i < arr.length; i++) {
field = String(arr[i][key]);
if (oldField !== field) {
fieldArr.push(field);
oldField = field;
}
buckets[field] = buckets[field] || [];
buckets[field].push(arr[i]);
}
return {
buckets: buckets,
order: fieldArr
};
};*/
/**
* Sorts array by individual sort path.
* @param key
* @param arr
* @returns {Array|*}
* @private
*/
Collection.prototype._sort = function (key, arr) {
var self = this,
sorterMethod,
pathSolver = new Path(),
dataPath = pathSolver.parse(key, true)[0];
pathSolver.path(dataPath.path);
if (dataPath.value === 1) {
// Sort ascending
sorterMethod = function (a, b) {
var valA = pathSolver.value(a)[0],
valB = pathSolver.value(b)[0];
return self.sortAsc(valA, valB);
};
} else if (dataPath.value === -1) {
// Sort descending
sorterMethod = function (a, b) {
var valA = pathSolver.value(a)[0],
valB = pathSolver.value(b)[0];
return self.sortDesc(valA, valB);
};
} else {
throw(this.logIdentifier() + ' $orderBy clause has invalid direction: ' + dataPath.value + ', accepted values are 1 or -1 for ascending or descending!');
}
return arr.sort(sorterMethod);
};
/**
* Internal method that takes a search query and options and returns an object
* containing details about the query which can be used to optimise the search.
*
* @param query
* @param options
* @param op
* @returns {Object}
* @private
*/
Collection.prototype._analyseQuery = function (query, options, op) {
var analysis = {
queriesOn: [{id: '$collection.' + this._name, type: 'colletion', key: this._name}],
indexMatch: [],
hasJoin: false,
queriesJoin: false,
joinQueries: {},
query: query,
options: options
},
joinSourceIndex,
joinSourceKey,
joinSourceType,
joinSourceIdentifier,
joinMatch,
joinSources = [],
joinSourceReferences = [],
queryPath,
index,
indexMatchData,
indexRef,
indexRefName,
indexLookup,
pathSolver,
queryKeyCount,
pkQueryType,
lookupResult,
i;
// Check if the query is a primary key lookup
op.time('checkIndexes');
pathSolver = new Path();
queryKeyCount = pathSolver.parseArr(query, {
ignore:/\$/,
verbose: true
}).length;
if (queryKeyCount) {
if (query[this._primaryKey] !== undefined) {
// Check suitability of querying key value index
pkQueryType = typeof query[this._primaryKey];
if (pkQueryType === 'string' || pkQueryType === 'number' || query[this._primaryKey] instanceof Array) {
// Return item via primary key possible
op.time('checkIndexMatch: Primary Key');
lookupResult = this._primaryIndex.lookup(query, options);
analysis.indexMatch.push({
lookup: lookupResult,
keyData: {
matchedKeys: [this._primaryKey],
totalKeyCount: queryKeyCount,
score: 1
},
index: this._primaryIndex
});
op.time('checkIndexMatch: Primary Key');
}
}
// Check if an index can speed up the query
for (i in this._indexById) {
if (this._indexById.hasOwnProperty(i)) {
indexRef = this._indexById[i];
indexRefName = indexRef.name();
op.time('checkIndexMatch: ' + indexRefName);
indexMatchData = indexRef.match(query, options);
if (indexMatchData.score > 0) {
// This index can be used, store it
indexLookup = indexRef.lookup(query, options);
analysis.indexMatch.push({
lookup: indexLookup,
keyData: indexMatchData,
index: indexRef
});
}
op.time('checkIndexMatch: ' + indexRefName);
if (indexMatchData.score === queryKeyCount) {
// Found an optimal index, do not check for any more
break;
}
}
}
op.time('checkIndexes');
// Sort array descending on index key count (effectively a measure of relevance to the query)
if (analysis.indexMatch.length > 1) {
op.time('findOptimalIndex');
analysis.indexMatch.sort(function (a, b) {
if (a.keyData.score > b.keyData.score) {
// This index has a higher score than the other
return -1;
}
if (a.keyData.score < b.keyData.score) {
// This index has a lower score than the other
return 1;
}
// The indexes have the same score but can still be compared by the number of records
// they return from the query. The fewer records they return the better so order by
// record count
if (a.keyData.score === b.keyData.score) {
return a.lookup.length - b.lookup.length;
}
});
op.time('findOptimalIndex');
}
}
// Check for join data
if (options.$join) {
analysis.hasJoin = true;
// Loop all join operations
for (joinSourceIndex = 0; joinSourceIndex < options.$join.length; joinSourceIndex++) {
// Loop the join sources and keep a reference to them
for (joinSourceKey in options.$join[joinSourceIndex]) {
if (options.$join[joinSourceIndex].hasOwnProperty(joinSourceKey)) {
joinMatch = options.$join[joinSourceIndex][joinSourceKey];
joinSourceType = joinMatch.$sourceType || 'collection';
joinSourceIdentifier = '$' + joinSourceType + '.' + joinSourceKey;
joinSources.push({
id: joinSourceIdentifier,
type: joinSourceType,
key: joinSourceKey
});
// Check if the join uses an $as operator
if (options.$join[joinSourceIndex][joinSourceKey].$as !== undefined) {
joinSourceReferences.push(options.$join[joinSourceIndex][joinSourceKey].$as);
} else {
joinSourceReferences.push(joinSourceKey);
}
}
}
}
// Loop the join source references and determine if the query references
// any of the sources that are used in the join. If there no queries against
// joined sources the find method can use a code path optimised for this.
// Queries against joined sources requires the joined sources to be filtered
// first and then joined so requires a little more work.
for (index = 0; index < joinSourceReferences.length; index++) {
// Check if the query references any source data that the join will create
queryPath = this._queryReferencesSource(query, joinSourceReferences[index], '');
if (queryPath) {
analysis.joinQueries[joinSources[index].key] = queryPath;
analysis.queriesJoin = true;
}
}
analysis.joinsOn = joinSources;
analysis.queriesOn = analysis.queriesOn.concat(joinSources);
}
return analysis;
};
/**
* Checks if the passed query references a source object (such
* as a collection) by name.
* @param {Object} query The query object to scan.
* @param {String} sourceName The source name to scan for in the query.
* @param {String=} path The path to scan from.
* @returns {*}
* @private
*/
Collection.prototype._queryReferencesSource = function (query, sourceName, path) {
var i;
for (i in query) {
if (query.hasOwnProperty(i)) {
// Check if this key is a reference match
if (i === sourceName) {
if (path) { path += '.'; }
return path + i;
} else {
if (typeof(query[i]) === 'object') {
// Recurse
if (path) { path += '.'; }
path += i;
return this._queryReferencesSource(query[i], sourceName, path);
}
}
}
}
return false;
};
/**
* Returns the number of documents currently in the collection.
* @returns {Number}
*/
Collection.prototype.count = function (query, options) {
if (!query) {
return this._data.length;
} else {
// Run query and return count
return this.find(query, options).length;
}
};
/**
* Finds sub-documents from the collection's documents.
* @param {Object} match The query object to use when matching parent documents
* from which the sub-documents are queried.
* @param {String} path The path string used to identify the key in which
* sub-documents are stored in parent documents.
* @param {Object=} subDocQuery The query to use when matching which sub-documents
* to return.
* @param {Object=} subDocOptions The options object to use when querying for
* sub-documents.
* @returns {*}
*/
Collection.prototype.findSub = function (match, path, subDocQuery, subDocOptions) {
return this._findSub(this.find(match), path, subDocQuery, subDocOptions);
};
Collection.prototype._findSub = function (docArr, path, subDocQuery, subDocOptions) {
var pathHandler = new Path(path),
docCount = docArr.length,
docIndex,
subDocArr,
subDocCollection = new Collection('__FDB_temp_' + this.objectId()).db(this._db),
subDocResults,
resultObj = {
parents: docCount,
subDocTotal: 0,
subDocs: [],
pathFound: false,
err: ''
};
subDocOptions = subDocOptions || {};
for (docIndex = 0; docIndex < docCount; docIndex++) {
subDocArr = pathHandler.value(docArr[docIndex])[0];
if (subDocArr) {
subDocCollection.setData(subDocArr);
subDocResults = subDocCollection.find(subDocQuery, subDocOptions);
if (subDocOptions.returnFirst && subDocResults.length) {
return subDocResults[0];
}
if (subDocOptions.$split) {
resultObj.subDocs.push(subDocResults);
} else {
resultObj.subDocs = resultObj.subDocs.concat(subDocResults);
}
resultObj.subDocTotal += subDocResults.length;
resultObj.pathFound = true;
}
}
// Drop the sub-document collection
subDocCollection.drop();
if (!resultObj.pathFound) {
resultObj.err = 'No objects found in the parent documents with a matching path of: ' + path;
}
// Check if the call should not return stats, if so return only subDocs array
if (subDocOptions.$stats) {
return resultObj;
} else {
return resultObj.subDocs;
}
};
/**
* Finds the first sub-document from the collection's documents that matches
* the subDocQuery parameter.
* @param {Object} match The query object to use when matching parent documents
* from which the sub-documents are queried.
* @param {String} path The path string used to identify the key in which
* sub-documents are stored in parent documents.
* @param {Object=} subDocQuery The query to use when matching which sub-documents
* to return.
* @param {Object=} subDocOptions The options object to use when querying for
* sub-documents.
* @returns {Object}
*/
Collection.prototype.findSubOne = function (match, path, subDocQuery, subDocOptions) {
return this.findSub(match, path, subDocQuery, subDocOptions)[0];
};
/**
* Checks that the passed document will not violate any index rules if
* inserted into the collection.
* @param {Object} doc The document to check indexes against.
* @returns {Boolean} Either false (no violation occurred) or true if
* a violation was detected.
*/
Collection.prototype.insertIndexViolation = function (doc) {
var indexViolated,
arr = this._indexByName,
arrIndex,
arrItem;
// Check the item's primary key is not already in use
if (this._primaryIndex.get(doc[this._primaryKey])) {
indexViolated = this._primaryIndex;
} else {
// Check violations of other indexes
for (arrIndex in arr) {
if (arr.hasOwnProperty(arrIndex)) {
arrItem = arr[arrIndex];
if (arrItem.unique()) {
if (arrItem.violation(doc)) {
indexViolated = arrItem;
break;
}
}
}
}
}
return indexViolated ? indexViolated.name() : false;
};
/**
* Creates an index on the specified keys.
* @param {Object} keys The object containing keys to index.
* @param {Object} options An options object.
* @returns {*}
*/
Collection.prototype.ensureIndex = function (keys, options) {
if (this.isDropped()) {
throw(this.logIdentifier() + ' Cannot operate in a dropped state!');
}
this._indexByName = this._indexByName || {};
this._indexById = this._indexById || {};
var index,
time = {
start: new Date().getTime()
};
if (options) {
if (options.type) {
// Check if the specified type is available
if (Shared.index[options.type]) {
// We found the type, generate it
index = new Shared.index[options.type](keys, options, this);
} else {
throw(this.logIdentifier() + ' Cannot create index of type "' + options.type + '", type not found in the index type register (Shared.index)');
}
} else {
// Create default index type
index = new IndexHashMap(keys, options, this);
}
} else {
// Default
index = new IndexHashMap(keys, options, this);
}
// Check the index does not already exist
if (this._indexByName[index.name()]) {
// Index already exists
return {
err: 'Index with that name already exists'
};
}
/*if (this._indexById[index.id()]) {
// Index already exists
return {
err: 'Index with those keys already exists'
};
}*/
// Create the index
index.rebuild();
// Add the index
this._indexByName[index.name()] = index;
this._indexById[index.id()] = index;
time.end = new Date().getTime();
time.total = time.end - time.start;
this._lastOp = {
type: 'ensureIndex',
stats: {
time: time
}
};
return {
index: index,
id: index.id(),
name: index.name(),
state: index.state()
};
};
/**
* Gets an index by it's name.
* @param {String} name The name of the index to retreive.
* @returns {*}
*/
Collection.prototype.index = function (name) {
if (this._indexByName) {
return this._indexByName[name];
}
};
/**
* Gets the last reporting operation's details such as run time.
* @returns {Object}
*/
Collection.prototype.lastOp = function () {
return this._metrics.list();
};
/**
* Generates a difference object that contains insert, update and remove arrays
* representing the operations to execute to make this collection have the same
* data as the one passed.
* @param {Collection} collection The collection to diff against.
* @returns {{}}
*/
Collection.prototype.diff = function (collection) {
var diff = {
insert: [],
update: [],
remove: []
};
var pk = this.primaryKey(),
arr,
arrIndex,
arrItem,
arrCount;
// Check if the primary key index of each collection can be utilised
if (pk !== collection.primaryKey()) {
throw(this.logIdentifier() + ' Diffing requires that both collections have the same primary key!');
}
// Use the collection primary key index to do the diff (super-fast)
arr = collection._data;
// Check if we have an array or another collection
while (arr && !(arr instanceof Array)) {
// We don't have an array, assign collection and get data
collection = arr;
arr = collection._data;
}
arrCount = arr.length;
// Loop the collection's data array and check for matching items
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
arrItem = arr[arrIndex];
// Check for a matching item in this collection
if (this._primaryIndex.get(arrItem[pk])) {
// Matching item exists, check if the data is the same
if (this._primaryCrc.get(arrItem[pk]) !== collection._primaryCrc.get(arrItem[pk])) {
// The documents exist in both collections but data differs, update required
diff.update.push(arrItem);
}
} else {
// The document is missing from this collection, insert required
diff.insert.push(arrItem);
}
}
// Now loop this collection's data and check for matching items
arr = this._data;
arrCount = arr.length;
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
arrItem = arr[arrIndex];
if (!collection._primaryIndex.get(arrItem[pk])) {
// The document does not exist in the other collection, remove required
diff.remove.push(arrItem);
}
}
return diff;
};
Collection.prototype.collateAdd = new Overload('Collection.prototype.collateAdd', {
/**
* Adds a data source to collate data from and specifies the
* key name to collate data to.
* @func collateAdd
* @memberof Collection
* @param {Collection} collection The collection to collate data from.
* @param {String=} keyName Optional name of the key to collate data to.
* If none is provided the record CRUD is operated on the root collection
* data.
*/
'object, string': function (collection, keyName) {
var self = this;
self.collateAdd(collection, function (packet) {
var obj1,
obj2;
switch (packet.type) {
case 'insert':
if (keyName) {
obj1 = {
$push: {}
};
obj1.$push[keyName] = self.decouple(packet.data.dataSet);
self.update({}, obj1);
} else {
self.insert(packet.data.dataSet);
}
break;
case 'update':
if (keyName) {
obj1 = {};
obj2 = {};
obj1[keyName] = packet.data.query;
obj2[keyName + '.$'] = packet.data.update;
self.update(obj1, obj2);
} else {
self.update(packet.data.query, packet.data.update);
}
break;
case 'remove':
if (keyName) {
obj1 = {
$pull: {}
};
obj1.$pull[keyName] = {};
obj1.$pull[keyName][self.primaryKey()] = packet.data.dataSet[0][collection.primaryKey()];
self.update({}, obj1);
} else {
self.remove(packet.data.dataSet);
}
break;
default:
}
});
},
/**
* Adds a data source to collate data from and specifies a process
* method that will handle the collation functionality (for custom
* collation).
* @func collateAdd
* @memberof Collection
* @param {Collection} collection The collection to collate data from.
* @param {Function} process The process method.
*/
'object, function': function (collection, process) {
if (typeof collection === 'string') {
// The collection passed is a name, not a reference so get
// the reference from the name
collection = this._db.collection(collection, {
autoCreate: false,
throwError: false
});
}
if (collection) {
this._collate = this._collate || {};
this._collate[collection.name()] = new ReactorIO(collection, this, process);
return this;
} else {
throw('Cannot collate from a non-existent collection!');
}
}
});
Collection.prototype.collateRemove = function (collection) {
if (typeof collection === 'object') {
// We need to have the name of the collection to remove it
collection = collection.name();
}
if (collection) {
// Drop the reactor IO chain node
this._collate[collection].drop();
// Remove the collection data from the collate object
delete this._collate[collection];
return this;
} else {
throw('No collection name passed to collateRemove() or collection not found!');
}
};
Db.prototype.collection = new Overload('Db.prototype.collection', {
/**
* Get a collection with no name (generates a random name). If the
* collection does not already exist then one is created for that
* name automatically.
* @func collection
* @memberof Db
* @returns {Collection}
*/
'': function () {
return this.$main.call(this, {
name: this.objectId()
});
},
/**
* Get a collection by name. If the collection does not already exist
* then one is created for that name automatically.
* @func collection
* @memberof Db
* @param {Object} data An options object or a collection instance.
* @returns {Collection}
*/
'object': function (data) {
// Handle being passed an instance
if (data instanceof Collection) {
if (data.state() !== 'droppped') {
return data;
} else {
return this.$main.call(this, {
name: data.name()
});
}
}
return this.$main.call(this, data);
},
/**
* Get a collection by name. If the collection does not already exist
* then one is created for that name automatically.
* @func collection
* @memberof Db
* @param {String} collectionName The name of the collection.
* @returns {Collection}
*/
'string': function (collectionName) {
return this.$main.call(this, {
name: collectionName
});
},
/**
* Get a collection by name. If the collection does not already exist
* then one is created for that name automatically.
* @func collection
* @memberof Db
* @param {String} collectionName The name of the collection.
* @param {String} primaryKey Optional primary key to specify the primary key field on the collection
* objects. Defaults to "_id".
* @returns {Collection}
*/
'string, string': function (collectionName, primaryKey) {
return this.$main.call(this, {
name: collectionName,
primaryKey: primaryKey
});
},
/**
* Get a collection by name. If the collection does not already exist
* then one is created for that name automatically.
* @func collection
* @memberof Db
* @param {String} collectionName The name of the collection.
* @param {Object} options An options object.
* @returns {Collection}
*/
'string, object': function (collectionName, options) {
options.name = collectionName;
return this.$main.call(this, options);
},
/**
* Get a collection by name. If the collection does not already exist
* then one is created for that name automatically.
* @func collection
* @memberof Db
* @param {String} collectionName The name of the collection.
* @param {String} primaryKey Optional primary key to specify the primary key field on the collection
* objects. Defaults to "_id".
* @param {Object} options An options object.
* @returns {Collection}
*/
'string, string, object': function (collectionName, primaryKey, options) {
options.name = collectionName;
options.primaryKey = primaryKey;
return this.$main.call(this, options);
},
/**
* The main handler method. This gets called by all the other variants and
* handles the actual logic of the overloaded method.
* @func collection
* @memberof Db
* @param {Object} options An options object.
* @returns {*}
*/
'$main': function (options) {
var self = this,
name = options.name;
if (name) {
if (this._collection[name]) {
return this._collection[name];
} else {
if (options && options.autoCreate === false) {
if (options && options.throwError !== false) {
throw(this.logIdentifier() + ' Cannot get collection ' + name + ' because it does not exist and auto-create has been disabled!');
}
return undefined;
}
if (this.debug()) {
console.log(this.logIdentifier() + ' Creating collection ' + name);
}
}
this._collection[name] = this._collection[name] || new Collection(name, options).db(this);
this._collection[name].mongoEmulation(this.mongoEmulation());
if (options.primaryKey !== undefined) {
this._collection[name].primaryKey(options.primaryKey);
}
if (options.capped !== undefined) {
// Check we have a size
if (options.size !== undefined) {
this._collection[name].capped(options.capped);
this._collection[name].cappedSize(options.size);
} else {
throw(this.logIdentifier() + ' Cannot create a capped collection without specifying a size!');
}
}
// Listen for events on this collection so we can fire global events
// on the database in response to it
self._collection[name].on('change', function () {
self.emit('change', self._collection[name], 'collection', name);
});
self.emit('create', self._collection[name], 'collection', name);
return this._collection[name];
} else {
if (!options || (options && options.throwError !== false)) {
throw(this.logIdentifier() + ' Cannot get collection with undefined name!');
}
}
}
});
/**
* Determine if a collection with the passed name already exists.
* @memberof Db
* @param {String} viewName The name of the collection to check for.
* @returns {boolean}
*/
Db.prototype.collectionExists = function (viewName) {
return Boolean(this._collection[viewName]);
};
/**
* Returns an array of collections the DB currently has.
* @memberof Db
* @param {String|RegExp=} search The optional search string or regular expression to use
* to match collection names against.
* @returns {Array} An array of objects containing details of each collection
* the database is currently managing.
*/
Db.prototype.collections = function (search) {
var arr = [],
collections = this._collection,
collection,
i;
if (search) {
if (!(search instanceof RegExp)) {
// Turn the search into a regular expression
search = new RegExp(search);
}
}
for (i in collections) {
if (collections.hasOwnProperty(i)) {
collection = collections[i];
if (search) {
if (search.exec(i)) {
arr.push({
name: i,
count: collection.count(),
linked: collection.isLinked !== undefined ? collection.isLinked() : false
});
}
} else {
arr.push({
name: i,
count: collection.count(),
linked: collection.isLinked !== undefined ? collection.isLinked() : false
});
}
}
}
arr.sort(function (a, b) {
return a.name.localeCompare(b.name);
});
return arr;
};
Shared.finishModule('Collection');
module.exports = Collection;
},{"./Index2d":11,"./IndexBinaryTree":12,"./IndexHashMap":13,"./KeyValueStore":14,"./Metrics":15,"./Overload":27,"./Path":28,"./ReactorIO":29,"./Shared":31}],7:[function(_dereq_,module,exports){
"use strict";
// Import external names locally
var Shared,
Db,
DbInit,
Collection;
Shared = _dereq_('./Shared');
/**
* Creates a new collection group. Collection groups allow single operations to be
* propagated to multiple collections at once. CRUD operations against a collection
* group are in fed to the group's collections. Useful when separating out slightly
* different data into multiple collections but querying as one collection.
* @constructor
*/
var CollectionGroup = function () {
this.init.apply(this, arguments);
};
CollectionGroup.prototype.init = function (name) {
var self = this;
self._name = name;
self._data = new Collection('__FDB__cg_data_' + self._name);
self._collections = [];
self._view = [];
};
Shared.addModule('CollectionGroup', CollectionGroup);
Shared.mixin(CollectionGroup.prototype, 'Mixin.Common');
Shared.mixin(CollectionGroup.prototype, 'Mixin.ChainReactor');
Shared.mixin(CollectionGroup.prototype, 'Mixin.Constants');
Shared.mixin(CollectionGroup.prototype, 'Mixin.Triggers');
Shared.mixin(CollectionGroup.prototype, 'Mixin.Tags');
Shared.mixin(CollectionGroup.prototype, 'Mixin.Events');
Collection = _dereq_('./Collection');
Db = Shared.modules.Db;
DbInit = Shared.modules.Db.prototype.init;
CollectionGroup.prototype.on = function () {
this._data.on.apply(this._data, arguments);
};
CollectionGroup.prototype.off = function () {
this._data.off.apply(this._data, arguments);
};
CollectionGroup.prototype.emit = function () {
this._data.emit.apply(this._data, arguments);
};
/**
* Gets / sets the primary key for this collection group.
* @param {String=} keyName The name of the primary key.
* @returns {*}
*/
CollectionGroup.prototype.primaryKey = function (keyName) {
if (keyName !== undefined) {
this._primaryKey = keyName;
return this;
}
return this._primaryKey;
};
/**
* Gets / sets the current state.
* @param {String=} val The name of the state to set.
* @returns {*}
*/
Shared.synthesize(CollectionGroup.prototype, 'state');
/**
* Gets / sets the db instance the collection group belongs to.
* @param {Db=} db The db instance.
* @returns {*}
*/
Shared.synthesize(CollectionGroup.prototype, 'db');
/**
* Gets / sets the instance name.
* @param {String=} name The new name to set.
* @returns {*}
*/
Shared.synthesize(CollectionGroup.prototype, 'name');
CollectionGroup.prototype.addCollection = function (collection) {
if (collection) {
if (this._collections.indexOf(collection) === -1) {
//var self = this;
// Check for compatible primary keys
if (this._collections.length) {
if (this._primaryKey !== collection.primaryKey()) {
throw(this.logIdentifier() + ' All collections in a collection group must have the same primary key!');
}
} else {
// Set the primary key to the first collection added
this.primaryKey(collection.primaryKey());
}
// Add the collection
this._collections.push(collection);
collection._groups = collection._groups || [];
collection._groups.push(this);
collection.chain(this);
// Hook the collection's drop event to destroy group data
collection.on('drop', function () {
// Remove collection from any group associations
if (collection._groups && collection._groups.length) {
var groupArr = [],
i;
// Copy the group array because if we call removeCollection on a group
// it will alter the groups array of this collection mid-loop!
for (i = 0; i < collection._groups.length; i++) {
groupArr.push(collection._groups[i]);
}
// Loop any groups we are part of and remove ourselves from them
for (i = 0; i < groupArr.length; i++) {
collection._groups[i].removeCollection(collection);
}
}
delete collection._groups;
});
// Add collection's data
this._data.insert(collection.find());
}
}
return this;
};
CollectionGroup.prototype.removeCollection = function (collection) {
if (collection) {
var collectionIndex = this._collections.indexOf(collection),
groupIndex;
if (collectionIndex !== -1) {
collection.unChain(this);
this._collections.splice(collectionIndex, 1);
collection._groups = collection._groups || [];
groupIndex = collection._groups.indexOf(this);
if (groupIndex !== -1) {
collection._groups.splice(groupIndex, 1);
}
collection.off('drop');
}
if (this._collections.length === 0) {
// Wipe the primary key
delete this._primaryKey;
}
}
return this;
};
CollectionGroup.prototype._chainHandler = function (chainPacket) {
//sender = chainPacket.sender;
switch (chainPacket.type) {
case 'setData':
// Decouple the data to ensure we are working with our own copy
chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet);
// Remove old data
this._data.remove(chainPacket.data.oldData);
// Add new data
this._data.insert(chainPacket.data.dataSet);
break;
case 'insert':
// Decouple the data to ensure we are working with our own copy
chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet);
// Add new data
this._data.insert(chainPacket.data.dataSet);
break;
case 'update':
// Update data
this._data.update(chainPacket.data.query, chainPacket.data.update, chainPacket.options);
break;
case 'remove':
this._data.remove(chainPacket.data.query, chainPacket.options);
break;
default:
break;
}
};
CollectionGroup.prototype.insert = function () {
this._collectionsRun('insert', arguments);
};
CollectionGroup.prototype.update = function () {
this._collectionsRun('update', arguments);
};
CollectionGroup.prototype.updateById = function () {
this._collectionsRun('updateById', arguments);
};
CollectionGroup.prototype.remove = function () {
this._collectionsRun('remove', arguments);
};
CollectionGroup.prototype._collectionsRun = function (type, args) {
for (var i = 0; i < this._collections.length; i++) {
this._collections[i][type].apply(this._collections[i], args);
}
};
CollectionGroup.prototype.find = function (query, options) {
return this._data.find(query, options);
};
/**
* Helper method that removes a document that matches the given id.
* @param {String} id The id of the document to remove.
*/
CollectionGroup.prototype.removeById = function (id) {
// Loop the collections in this group and apply the remove
for (var i = 0; i < this._collections.length; i++) {
this._collections[i].removeById(id);
}
};
/**
* Uses the passed query to generate a new collection with results
* matching the query parameters.
*
* @param query
* @param options
* @returns {*}
*/
CollectionGroup.prototype.subset = function (query, options) {
var result = this.find(query, options);
return new Collection()
.subsetOf(this)
.primaryKey(this._primaryKey)
.setData(result);
};
/**
* Drops a collection group from the database.
* @returns {boolean} True on success, false on failure.
*/
CollectionGroup.prototype.drop = function (callback) {
if (!this.isDropped()) {
var i,
collArr,
viewArr;
if (this._debug) {
console.log(this.logIdentifier() + ' Dropping');
}
this._state = 'dropped';
if (this._collections && this._collections.length) {
collArr = [].concat(this._collections);
for (i = 0; i < collArr.length; i++) {
this.removeCollection(collArr[i]);
}
}
if (this._view && this._view.length) {
viewArr = [].concat(this._view);
for (i = 0; i < viewArr.length; i++) {
this._removeView(viewArr[i]);
}
}
this.emit('drop', this);
delete this._listeners;
if (callback) { callback(false, true); }
}
return true;
};
// Extend DB to include collection groups
Db.prototype.init = function () {
this._collectionGroup = {};
DbInit.apply(this, arguments);
};
/**
* Creates a new collectionGroup instance or returns an existing
* instance if one already exists with the passed name.
* @func collectionGroup
* @memberOf Db
* @param {String} name The name of the instance.
* @returns {*}
*/
Db.prototype.collectionGroup = function (name) {
var self = this;
if (name) {
// Handle being passed an instance
if (name instanceof CollectionGroup) {
return name;
}
if (this._collectionGroup && this._collectionGroup[name]) {
return this._collectionGroup[name];
}
this._collectionGroup[name] = new CollectionGroup(name).db(this);
self.emit('create', self._collectionGroup[name], 'collectionGroup', name);
return this._collectionGroup[name];
} else {
// Return an object of collection data
return this._collectionGroup;
}
};
/**
* Returns an array of collection groups the DB currently has.
* @returns {Array} An array of objects containing details of each collection group
* the database is currently managing.
*/
Db.prototype.collectionGroups = function () {
var arr = [],
i;
for (i in this._collectionGroup) {
if (this._collectionGroup.hasOwnProperty(i)) {
arr.push({
name: i
});
}
}
return arr;
};
module.exports = CollectionGroup;
},{"./Collection":6,"./Shared":31}],8:[function(_dereq_,module,exports){
/*
License
Copyright (c) 2015 Irrelon Software Limited
http://www.irrelon.com
http://www.forerunnerdb.com
Please visit the license page to see latest license information:
http://www.forerunnerdb.com/licensing.html
*/
"use strict";
var Shared,
Db,
Metrics,
Overload,
_instances = [];
Shared = _dereq_('./Shared');
Overload = _dereq_('./Overload');
/**
* Creates a new ForerunnerDB instance. Core instances handle the lifecycle of
* multiple database instances.
* @constructor
*/
var Core = function (val) {
this.init.apply(this, arguments);
};
Core.prototype.init = function (name) {
this._db = {};
this._debug = {};
this._name = name || 'ForerunnerDB';
_instances.push(this);
};
/**
* Returns the number of instantiated ForerunnerDB objects.
* @returns {Number} The number of instantiated instances.
*/
Core.prototype.instantiatedCount = function () {
return _instances.length;
};
/**
* Get all instances as an array or a single ForerunnerDB instance
* by it's array index.
* @param {Number=} index Optional index of instance to get.
* @returns {Array|Object} Array of instances or a single instance.
*/
Core.prototype.instances = function (index) {
if (index !== undefined) {
return _instances[index];
}
return _instances;
};
/**
* Get all instances as an array of instance names or a single ForerunnerDB
* instance by it's name.
* @param {String=} name Optional name of instance to get.
* @returns {Array|Object} Array of instance names or a single instance.
*/
Core.prototype.namedInstances = function (name) {
var i,
instArr;
if (name !== undefined) {
for (i = 0; i < _instances.length; i++) {
if (_instances[i].name === name) {
return _instances[i];
}
}
return undefined;
}
instArr = [];
for (i = 0; i < _instances.length; i++) {
instArr.push(_instances[i].name);
}
return instArr;
};
Core.prototype.moduleLoaded = new Overload({
/**
* Checks if a module has been loaded into the database.
* @func moduleLoaded
* @memberof Core
* @param {String} moduleName The name of the module to check for.
* @returns {Boolean} True if the module is loaded, false if not.
*/
'string': function (moduleName) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
return false;
}
}
return true;
}
return false;
},
/**
* Checks if a module is loaded and if so calls the passed
* callback method.
* @func moduleLoaded
* @memberof Core
* @param {String} moduleName The name of the module to check for.
* @param {Function} callback The callback method to call if module is loaded.
*/
'string, function': function (moduleName, callback) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
return false;
}
}
if (callback) { callback(); }
}
},
/**
* Checks if an array of named modules are loaded and if so
* calls the passed callback method.
* @func moduleLoaded
* @memberof Core
* @param {Array} moduleName The array of module names to check for.
* @param {Function} callback The callback method to call if modules are loaded.
*/
'array, function': function (moduleNameArr, callback) {
var moduleName,
i;
for (i = 0; i < moduleNameArr.length; i++) {
moduleName = moduleNameArr[i];
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
return false;
}
}
}
}
if (callback) { callback(); }
},
/**
* Checks if a module is loaded and if so calls the passed
* success method, otherwise calls the failure method.
* @func moduleLoaded
* @memberof Core
* @param {String} moduleName The name of the module to check for.
* @param {Function} success The callback method to call if module is loaded.
* @param {Function} failure The callback method to call if module not loaded.
*/
'string, function, function': function (moduleName, success, failure) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
failure();
return false;
}
}
success();
}
}
});
/**
* Checks version against the string passed and if it matches (or partially matches)
* then the callback is called.
* @param {String} val The version to check against.
* @param {Function} callback The callback to call if match is true.
* @returns {Boolean}
*/
Core.prototype.version = function (val, callback) {
if (val !== undefined) {
if (Shared.version.indexOf(val) === 0) {
if (callback) { callback(); }
return true;
}
return false;
}
return Shared.version;
};
// Expose moduleLoaded() method to non-instantiated object ForerunnerDB
Core.moduleLoaded = Core.prototype.moduleLoaded;
// Expose version() method to non-instantiated object ForerunnerDB
Core.version = Core.prototype.version;
// Expose instances() method to non-instantiated object ForerunnerDB
Core.instances = Core.prototype.instances;
// Expose instantiatedCount() method to non-instantiated object ForerunnerDB
Core.instantiatedCount = Core.prototype.instantiatedCount;
// Provide public access to the Shared object
Core.shared = Shared;
Core.prototype.shared = Shared;
Shared.addModule('Core', Core);
Shared.mixin(Core.prototype, 'Mixin.Common');
Shared.mixin(Core.prototype, 'Mixin.Constants');
Db = _dereq_('./Db.js');
Metrics = _dereq_('./Metrics.js');
/**
* Gets / sets the name of the instance. This is primarily used for
* name-spacing persistent storage.
* @param {String=} val The name of the instance to set.
* @returns {*}
*/
Shared.synthesize(Core.prototype, 'name');
/**
* Gets / sets mongodb emulation mode.
* @param {Boolean=} val True to enable, false to disable.
* @returns {*}
*/
Shared.synthesize(Core.prototype, 'mongoEmulation');
// Set a flag to determine environment
Core.prototype._isServer = false;
/**
* Checks if the database is running on a client (browser) or
* a server (node.js).
* @returns {Boolean} Returns true if running on a browser.
*/
Core.prototype.isClient = function () {
return !this._isServer;
};
/**
* Checks if the database is running on a client (browser) or
* a server (node.js).
* @returns {Boolean} Returns true if running on a server.
*/
Core.prototype.isServer = function () {
return this._isServer;
};
/**
* Added to provide an error message for users who have not seen
* the new instantiation breaking change warning and try to get
* a collection directly from the core instance.
*/
Core.prototype.collection = function () {
throw("ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44");
};
module.exports = Core;
},{"./Db.js":9,"./Metrics.js":15,"./Overload":27,"./Shared":31}],9:[function(_dereq_,module,exports){
"use strict";
var Shared,
Core,
Collection,
Metrics,
Checksum,
Overload;
Shared = _dereq_('./Shared');
Overload = _dereq_('./Overload');
/**
* Creates a new ForerunnerDB database instance.
* @constructor
*/
var Db = function (name, core) {
this.init.apply(this, arguments);
};
Db.prototype.init = function (name, core) {
this.core(core);
this._primaryKey = '_id';
this._name = name;
this._collection = {};
this._debug = {};
};
Shared.addModule('Db', Db);
Db.prototype.moduleLoaded = new Overload({
/**
* Checks if a module has been loaded into the database.
* @func moduleLoaded
* @memberof Db
* @param {String} moduleName The name of the module to check for.
* @returns {Boolean} True if the module is loaded, false if not.
*/
'string': function (moduleName) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
return false;
}
}
return true;
}
return false;
},
/**
* Checks if a module is loaded and if so calls the passed
* callback method.
* @func moduleLoaded
* @memberof Db
* @param {String} moduleName The name of the module to check for.
* @param {Function} callback The callback method to call if module is loaded.
*/
'string, function': function (moduleName, callback) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
return false;
}
}
if (callback) { callback(); }
}
},
/**
* Checks if a module is loaded and if so calls the passed
* success method, otherwise calls the failure method.
* @func moduleLoaded
* @memberof Db
* @param {String} moduleName The name of the module to check for.
* @param {Function} success The callback method to call if module is loaded.
* @param {Function} failure The callback method to call if module not loaded.
*/
'string, function, function': function (moduleName, success, failure) {
if (moduleName !== undefined) {
moduleName = moduleName.replace(/ /g, '');
var modules = moduleName.split(','),
index;
for (index = 0; index < modules.length; index++) {
if (!Shared.modules[modules[index]]) {
failure();
return false;
}
}
success();
}
}
});
/**
* Checks version against the string passed and if it matches (or partially matches)
* then the callback is called.
* @param {String} val The version to check against.
* @param {Function} callback The callback to call if match is true.
* @returns {Boolean}
*/
Db.prototype.version = function (val, callback) {
if (val !== undefined) {
if (Shared.version.indexOf(val) === 0) {
if (callback) { callback(); }
return true;
}
return false;
}
return Shared.version;
};
// Expose moduleLoaded method to non-instantiated object ForerunnerDB
Db.moduleLoaded = Db.prototype.moduleLoaded;
// Expose version method to non-instantiated object ForerunnerDB
Db.version = Db.prototype.version;
// Provide public access to the Shared object
Db.shared = Shared;
Db.prototype.shared = Shared;
Shared.addModule('Db', Db);
Shared.mixin(Db.prototype, 'Mixin.Common');
Shared.mixin(Db.prototype, 'Mixin.ChainReactor');
Shared.mixin(Db.prototype, 'Mixin.Constants');
Shared.mixin(Db.prototype, 'Mixin.Tags');
Core = Shared.modules.Core;
Collection = _dereq_('./Collection.js');
Metrics = _dereq_('./Metrics.js');
Checksum = _dereq_('./Checksum.js');
Db.prototype._isServer = false;
/**
* Gets / sets the core object this database belongs to.
*/
Shared.synthesize(Db.prototype, 'core');
/**
* Gets / sets the default primary key for new collections.
* @param {String=} val The name of the primary key to set.
* @returns {*}
*/
Shared.synthesize(Db.prototype, 'primaryKey');
/**
* Gets / sets the current state.
* @param {String=} val The name of the state to set.
* @returns {*}
*/
Shared.synthesize(Db.prototype, 'state');
/**
* Gets / sets the name of the database.
* @param {String=} val The name of the database to set.
* @returns {*}
*/
Shared.synthesize(Db.prototype, 'name');
/**
* Gets / sets mongodb emulation mode.
* @param {Boolean=} val True to enable, false to disable.
* @returns {*}
*/
Shared.synthesize(Db.prototype, 'mongoEmulation');
/**
* Returns true if ForerunnerDB is running on a client browser.
* @returns {boolean}
*/
Db.prototype.isClient = function () {
return !this._isServer;
};
/**
* Returns true if ForerunnerDB is running on a server.
* @returns {boolean}
*/
Db.prototype.isServer = function () {
return this._isServer;
};
/**
* Returns a checksum of a string.
* @param {String} string The string to checksum.
* @return {String} The checksum generated.
*/
Db.prototype.Checksum = Checksum;
/**
* Checks if the database is running on a client (browser) or
* a server (node.js).
* @returns {Boolean} Returns true if running on a browser.
*/
Db.prototype.isClient = function () {
return !this._isServer;
};
/**
* Checks if the database is running on a client (browser) or
* a server (node.js).
* @returns {Boolean} Returns true if running on a server.
*/
Db.prototype.isServer = function () {
return this._isServer;
};
/**
* Converts a normal javascript array of objects into a DB collection.
* @param {Array} arr An array of objects.
* @returns {Collection} A new collection instance with the data set to the
* array passed.
*/
Db.prototype.arrayToCollection = function (arr) {
return new Collection().setData(arr);
};
/**
* Registers an event listener against an event name.
* @param {String} event The name of the event to listen for.
* @param {Function} listener The listener method to call when
* the event is fired.
* @returns {*}
*/
Db.prototype.on = function(event, listener) {
this._listeners = this._listeners || {};
this._listeners[event] = this._listeners[event] || [];
this._listeners[event].push(listener);
return this;
};
/**
* De-registers an event listener from an event name.
* @param {String} event The name of the event to stop listening for.
* @param {Function} listener The listener method passed to on() when
* registering the event listener.
* @returns {*}
*/
Db.prototype.off = function(event, listener) {
if (event in this._listeners) {
var arr = this._listeners[event],
index = arr.indexOf(listener);
if (index > -1) {
arr.splice(index, 1);
}
}
return this;
};
/**
* Emits an event by name with the given data.
* @param {String} event The name of the event to emit.
* @param {*=} data The data to emit with the event.
* @returns {*}
*/
Db.prototype.emit = function(event, data) {
this._listeners = this._listeners || {};
if (event in this._listeners) {
var arr = this._listeners[event],
arrCount = arr.length,
arrIndex;
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
arr[arrIndex].apply(this, Array.prototype.slice.call(arguments, 1));
}
}
return this;
};
Db.prototype.peek = function (search) {
var i,
coll,
arr = [],
typeOfSearch = typeof search;
// Loop collections
for (i in this._collection) {
if (this._collection.hasOwnProperty(i)) {
coll = this._collection[i];
if (typeOfSearch === 'string') {
arr = arr.concat(coll.peek(search));
} else {
arr = arr.concat(coll.find(search));
}
}
}
return arr;
};
/**
* Find all documents across all collections in the database that match the passed
* string or search object.
* @param search String or search object.
* @returns {Array}
*/
Db.prototype.peek = function (search) {
var i,
coll,
arr = [],
typeOfSearch = typeof search;
// Loop collections
for (i in this._collection) {
if (this._collection.hasOwnProperty(i)) {
coll = this._collection[i];
if (typeOfSearch === 'string') {
arr = arr.concat(coll.peek(search));
} else {
arr = arr.concat(coll.find(search));
}
}
}
return arr;
};
/**
* Find all documents across all collections in the database that match the passed
* string or search object and return them in an object where each key is the name
* of the collection that the document was matched in.
* @param search String or search object.
* @returns {object}
*/
Db.prototype.peekCat = function (search) {
var i,
coll,
cat = {},
arr,
typeOfSearch = typeof search;
// Loop collections
for (i in this._collection) {
if (this._collection.hasOwnProperty(i)) {
coll = this._collection[i];
if (typeOfSearch === 'string') {
arr = coll.peek(search);
if (arr && arr.length) {
cat[coll.name()] = arr;
}
} else {
arr = coll.find(search);
if (arr && arr.length) {
cat[coll.name()] = arr;
}
}
}
}
return cat;
};
Db.prototype.drop = new Overload({
/**
* Drops the database.
* @func drop
* @memberof Db
*/
'': function () {
if (!this.isDropped()) {
var arr = this.collections(),
arrCount = arr.length,
arrIndex;
this._state = 'dropped';
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
this.collection(arr[arrIndex].name).drop();
delete this._collection[arr[arrIndex].name];
}
this.emit('drop', this);
delete this._listeners;
delete this._core._db[this._name];
}
return true;
},
/**
* Drops the database with optional callback method.
* @func drop
* @memberof Db
* @param {Function} callback Optional callback method.
*/
'function': function (callback) {
if (!this.isDropped()) {
var arr = this.collections(),
arrCount = arr.length,
arrIndex,
finishCount = 0,
afterDrop = function () {
finishCount++;
if (finishCount === arrCount) {
if (callback) { callback(); }
}
};
this._state = 'dropped';
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
this.collection(arr[arrIndex].name).drop(afterDrop);
delete this._collection[arr[arrIndex].name];
}
this.emit('drop', this);
delete this._listeners;
delete this._core._db[this._name];
}
return true;
},
/**
* Drops the database with optional persistent storage drop. Persistent
* storage is dropped by default if no preference is provided.
* @func drop
* @memberof Db
* @param {Boolean} removePersist Drop persistent storage for this database.
*/
'boolean': function (removePersist) {
if (!this.isDropped()) {
var arr = this.collections(),
arrCount = arr.length,
arrIndex;
this._state = 'dropped';
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
this.collection(arr[arrIndex].name).drop(removePersist);
delete this._collection[arr[arrIndex].name];
}
this.emit('drop', this);
delete this._listeners;
delete this._core._db[this._name];
}
return true;
},
/**
* Drops the database and optionally controls dropping persistent storage
* and callback method.
* @func drop
* @memberof Db
* @param {Boolean} removePersist Drop persistent storage for this database.
* @param {Function} callback Optional callback method.
*/
'boolean, function': function (removePersist, callback) {
if (!this.isDropped()) {
var arr = this.collections(),
arrCount = arr.length,
arrIndex,
finishCount = 0,
afterDrop = function () {
finishCount++;
if (finishCount === arrCount) {
if (callback) { callback(); }
}
};
this._state = 'dropped';
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
this.collection(arr[arrIndex].name).drop(removePersist, afterDrop);
delete this._collection[arr[arrIndex].name];
}
this.emit('drop', this);
delete this._listeners;
delete this._core._db[this._name];
}
return true;
}
});
/**
* Gets a database instance by name.
* @memberof Core
* @param {String=} name Optional name of the database. If none is provided
* a random name is assigned.
* @returns {Db}
*/
Core.prototype.db = function (name) {
// Handle being passed an instance
if (name instanceof Db) {
return name;
}
if (!name) {
name = this.objectId();
}
this._db[name] = this._db[name] || new Db(name, this);
this._db[name].mongoEmulation(this.mongoEmulation());
return this._db[name];
};
/**
* Returns an array of databases that ForerunnerDB currently has.
* @memberof Core
* @param {String|RegExp=} search The optional search string or regular expression to use
* to match collection names against.
* @returns {Array} An array of objects containing details of each database
* that ForerunnerDB is currently managing and it's child entities.
*/
Core.prototype.databases = function (search) {
var arr = [],
tmpObj,
addDb,
i;
if (search) {
if (!(search instanceof RegExp)) {
// Turn the search into a regular expression
search = new RegExp(search);
}
}
for (i in this._db) {
if (this._db.hasOwnProperty(i)) {
addDb = true;
if (search) {
if (!search.exec(i)) {
addDb = false;
}
}
if (addDb) {
tmpObj = {
name: i,
children: []
};
if (this.shared.moduleExists('Collection')) {
tmpObj.children.push({
module: 'collection',
moduleName: 'Collections',
count: this._db[i].collections().length
});
}
if (this.shared.moduleExists('CollectionGroup')) {
tmpObj.children.push({
module: 'collectionGroup',
moduleName: 'Collection Groups',
count: this._db[i].collectionGroups().length
});
}
if (this.shared.moduleExists('Document')) {
tmpObj.children.push({
module: 'document',
moduleName: 'Documents',
count: this._db[i].documents().length
});
}
if (this.shared.moduleExists('Grid')) {
tmpObj.children.push({
module: 'grid',
moduleName: 'Grids',
count: this._db[i].grids().length
});
}
if (this.shared.moduleExists('Overview')) {
tmpObj.children.push({
module: 'overview',
moduleName: 'Overviews',
count: this._db[i].overviews().length
});
}
if (this.shared.moduleExists('View')) {
tmpObj.children.push({
module: 'view',
moduleName: 'Views',
count: this._db[i].views().length
});
}
arr.push(tmpObj);
}
}
}
arr.sort(function (a, b) {
return a.name.localeCompare(b.name);
});
return arr;
};
Shared.finishModule('Db');
module.exports = Db;
},{"./Checksum.js":5,"./Collection.js":6,"./Metrics.js":15,"./Overload":27,"./Shared":31}],10:[function(_dereq_,module,exports){
// geohash.js
// Geohash library for Javascript
// (c) 2008 David Troy
// Distributed under the MIT License
// Original at: https://github.com/davetroy/geohash-js
// Modified by Irrelon Software Limited (http://www.irrelon.com)
// to clean up and modularise the code using Node.js-style exports
// and add a few helper methods.
// @by Rob Evans - rob@irrelon.com
"use strict";
/*
Define some shared constants that will be used by all instances
of the module.
*/
var bits,
base32,
neighbors,
borders;
bits = [16, 8, 4, 2, 1];
base32 = "0123456789bcdefghjkmnpqrstuvwxyz";
neighbors = {
right: {even: "bc01fg45238967deuvhjyznpkmstqrwx"},
left: {even: "238967debc01fg45kmstqrwxuvhjyznp"},
top: {even: "p0r21436x8zb9dcf5h7kjnmqesgutwvy"},
bottom: {even: "14365h7k9dcfesgujnmqp0r2twvyx8zb"}
};
borders = {
right: {even: "bcfguvyz"},
left: {even: "0145hjnp"},
top: {even: "prxz"},
bottom: {even: "028b"}
};
neighbors.bottom.odd = neighbors.left.even;
neighbors.top.odd = neighbors.right.even;
neighbors.left.odd = neighbors.bottom.even;
neighbors.right.odd = neighbors.top.even;
borders.bottom.odd = borders.left.even;
borders.top.odd = borders.right.even;
borders.left.odd = borders.bottom.even;
borders.right.odd = borders.top.even;
var GeoHash = function () {};
GeoHash.prototype.refineInterval = function (interval, cd, mask) {
if (cd & mask) { //jshint ignore: line
interval[0] = (interval[0] + interval[1]) / 2;
} else {
interval[1] = (interval[0] + interval[1]) / 2;
}
};
/**
* Calculates all surrounding neighbours of a hash and returns them.
* @param {String} centerHash The hash at the center of the grid.
* @param options
* @returns {*}
*/
GeoHash.prototype.calculateNeighbours = function (centerHash, options) {
var response;
if (!options || options.type === 'object') {
response = {
center: centerHash,
left: this.calculateAdjacent(centerHash, 'left'),
right: this.calculateAdjacent(centerHash, 'right'),
top: this.calculateAdjacent(centerHash, 'top'),
bottom: this.calculateAdjacent(centerHash, 'bottom')
};
response.topLeft = this.calculateAdjacent(response.left, 'top');
response.topRight = this.calculateAdjacent(response.right, 'top');
response.bottomLeft = this.calculateAdjacent(response.left, 'bottom');
response.bottomRight = this.calculateAdjacent(response.right, 'bottom');
} else {
response = [];
response[4] = centerHash;
response[3] = this.calculateAdjacent(centerHash, 'left');
response[5] = this.calculateAdjacent(centerHash, 'right');
response[1] = this.calculateAdjacent(centerHash, 'top');
response[7] = this.calculateAdjacent(centerHash, 'bottom');
response[0] = this.calculateAdjacent(response[3], 'top');
response[2] = this.calculateAdjacent(response[5], 'top');
response[6] = this.calculateAdjacent(response[3], 'bottom');
response[8] = this.calculateAdjacent(response[5], 'bottom');
}
return response;
};
/**
* Calculates an adjacent hash to the hash passed, in the direction
* specified.
* @param {String} srcHash The hash to calculate adjacent to.
* @param {String} dir Either "top", "left", "bottom" or "right".
* @returns {String} The resulting geohash.
*/
GeoHash.prototype.calculateAdjacent = function (srcHash, dir) {
srcHash = srcHash.toLowerCase();
var lastChr = srcHash.charAt(srcHash.length - 1),
type = (srcHash.length % 2) ? 'odd' : 'even',
base = srcHash.substring(0, srcHash.length - 1);
if (borders[dir][type].indexOf(lastChr) !== -1) {
base = this.calculateAdjacent(base, dir);
}
return base + base32[neighbors[dir][type].indexOf(lastChr)];
};
/**
* Decodes a string geohash back to longitude/latitude.
* @param {String} geohash The hash to decode.
* @returns {Object}
*/
GeoHash.prototype.decode = function (geohash) {
var isEven = 1,
lat = [],
lon = [],
i, c, cd, j, mask,
latErr,
lonErr;
lat[0] = -90.0;
lat[1] = 90.0;
lon[0] = -180.0;
lon[1] = 180.0;
latErr = 90.0;
lonErr = 180.0;
for (i = 0; i < geohash.length; i++) {
c = geohash[i];
cd = base32.indexOf(c);
for (j = 0; j < 5; j++) {
mask = bits[j];
if (isEven) {
lonErr /= 2;
this.refineInterval(lon, cd, mask);
} else {
latErr /= 2;
this.refineInterval(lat, cd, mask);
}
isEven = !isEven;
}
}
lat[2] = (lat[0] + lat[1]) / 2;
lon[2] = (lon[0] + lon[1]) / 2;
return {
latitude: lat,
longitude: lon
};
};
/**
* Encodes a longitude/latitude to geohash string.
* @param latitude
* @param longitude
* @param {Number=} precision Length of the geohash string. Defaults to 12.
* @returns {String}
*/
GeoHash.prototype.encode = function (latitude, longitude, precision) {
var isEven = 1,
mid,
lat = [],
lon = [],
bit = 0,
ch = 0,
geoHash = "";
if (!precision) { precision = 12; }
lat[0] = -90.0;
lat[1] = 90.0;
lon[0] = -180.0;
lon[1] = 180.0;
while (geoHash.length < precision) {
if (isEven) {
mid = (lon[0] + lon[1]) / 2;
if (longitude > mid) {
ch |= bits[bit]; //jshint ignore: line
lon[0] = mid;
} else {
lon[1] = mid;
}
} else {
mid = (lat[0] + lat[1]) / 2;
if (latitude > mid) {
ch |= bits[bit]; //jshint ignore: line
lat[0] = mid;
} else {
lat[1] = mid;
}
}
isEven = !isEven;
if (bit < 4) {
bit++;
} else {
geoHash += base32[ch];
bit = 0;
ch = 0;
}
}
return geoHash;
};
module.exports = GeoHash;
},{}],11:[function(_dereq_,module,exports){
"use strict";
/*
name(string)
id(string)
rebuild(null)
state ?? needed?
match(query, options)
lookup(query, options)
insert(doc)
remove(doc)
primaryKey(string)
collection(collection)
*/
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path'),
BinaryTree = _dereq_('./BinaryTree'),
GeoHash = _dereq_('./GeoHash'),
sharedPathSolver = new Path(),
sharedGeoHashSolver = new GeoHash(),
// GeoHash Distances in Kilometers
geoHashDistance = [
5000,
1250,
156,
39.1,
4.89,
1.22,
0.153,
0.0382,
0.00477,
0.00119,
0.000149,
0.0000372
];
/**
* The index class used to instantiate 2d indexes that the database can
* use to handle high-performance geospatial queries.
* @constructor
*/
var Index2d = function () {
this.init.apply(this, arguments);
};
/**
* Create the index.
* @param {Object} keys The object with the keys that the user wishes the index
* to operate on.
* @param {Object} options Can be undefined, if passed is an object with arbitrary
* options keys and values.
* @param {Collection} collection The collection the index should be created for.
*/
Index2d.prototype.init = function (keys, options, collection) {
this._btree = new BinaryTree();
this._btree.index(keys);
this._size = 0;
this._id = this._itemKeyHash(keys, keys);
this._debug = options && options.debug ? options.debug : false;
this.unique(options && options.unique ? options.unique : false);
if (keys !== undefined) {
this.keys(keys);
}
if (collection !== undefined) {
this.collection(collection);
this._btree.primaryKey(collection.primaryKey());
}
this.name(options && options.name ? options.name : this._id);
this._btree.debug(this._debug);
};
Shared.addModule('Index2d', Index2d);
Shared.mixin(Index2d.prototype, 'Mixin.Common');
Shared.mixin(Index2d.prototype, 'Mixin.ChainReactor');
Shared.mixin(Index2d.prototype, 'Mixin.Sorting');
Index2d.prototype.id = function () {
return this._id;
};
Index2d.prototype.state = function () {
return this._state;
};
Index2d.prototype.size = function () {
return this._size;
};
Shared.synthesize(Index2d.prototype, 'data');
Shared.synthesize(Index2d.prototype, 'name');
Shared.synthesize(Index2d.prototype, 'collection');
Shared.synthesize(Index2d.prototype, 'type');
Shared.synthesize(Index2d.prototype, 'unique');
Index2d.prototype.keys = function (val) {
if (val !== undefined) {
this._keys = val;
// Count the keys
this._keyCount = sharedPathSolver.parse(this._keys).length;
return this;
}
return this._keys;
};
Index2d.prototype.rebuild = function () {
// Do we have a collection?
if (this._collection) {
// Get sorted data
var collection = this._collection.subset({}, {
$decouple: false,
$orderBy: this._keys
}),
collectionData = collection.find(),
dataIndex,
dataCount = collectionData.length;
// Clear the index data for the index
this._btree.clear();
this._size = 0;
if (this._unique) {
this._uniqueLookup = {};
}
// Loop the collection data
for (dataIndex = 0; dataIndex < dataCount; dataIndex++) {
this.insert(collectionData[dataIndex]);
}
}
this._state = {
name: this._name,
keys: this._keys,
indexSize: this._size,
built: new Date(),
updated: new Date(),
ok: true
};
};
Index2d.prototype.insert = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash;
dataItem = this.decouple(dataItem);
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
this._uniqueLookup[uniqueHash] = dataItem;
}
// Convert 2d indexed values to geohashes
var keys = this._btree.keys(),
pathVal,
geoHash,
lng,
lat,
i;
for (i = 0; i < keys.length; i++) {
pathVal = sharedPathSolver.get(dataItem, keys[i].path);
if (pathVal instanceof Array) {
lng = pathVal[0];
lat = pathVal[1];
geoHash = sharedGeoHashSolver.encode(lng, lat);
sharedPathSolver.set(dataItem, keys[i].path, geoHash);
}
}
if (this._btree.insert(dataItem)) {
this._size++;
return true;
}
return false;
};
Index2d.prototype.remove = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash;
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
delete this._uniqueLookup[uniqueHash];
}
if (this._btree.remove(dataItem)) {
this._size--;
return true;
}
return false;
};
Index2d.prototype.violation = function (dataItem) {
// Generate item hash
var uniqueHash = this._itemHash(dataItem, this._keys);
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
Index2d.prototype.hashViolation = function (uniqueHash) {
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
Index2d.prototype.lookup = function (query, options) {
// Loop the indexed keys and determine if the query has any operators
// that we want to handle differently from a standard lookup
var keys = this._btree.keys(),
pathStr,
pathVal,
results,
i;
for (i = 0; i < keys.length; i++) {
pathStr = keys[i].path;
pathVal = sharedPathSolver.get(query, pathStr);
if (typeof pathVal === 'object') {
if (pathVal.$near) {
results = [];
// Do a near point lookup
results = results.concat(this.near(pathStr, pathVal.$near, options));
}
if (pathVal.$geoWithin) {
results = [];
// Do a geoWithin shape lookup
results = results.concat(this.geoWithin(pathStr, pathVal.$geoWithin, options));
}
return results;
}
}
return this._btree.lookup(query, options);
};
Index2d.prototype.near = function (pathStr, query, options) {
var self = this,
geoHash,
neighbours,
visited,
search,
results,
finalResults = [],
precision,
maxDistanceKm,
distance,
distCache,
latLng,
pk = this._collection.primaryKey(),
i;
// Calculate the required precision to encapsulate the distance
// TODO: Instead of opting for the "one size larger" than the distance boxes,
// TODO: we should calculate closest divisible box size as a multiple and then
// TODO: scan neighbours until we have covered the area otherwise we risk
// TODO: opening the results up to vastly more information as the box size
// TODO: increases dramatically between the geohash precisions
if (query.$distanceUnits === 'km') {
maxDistanceKm = query.$maxDistance;
for (i = 0; i < geoHashDistance.length; i++) {
if (maxDistanceKm > geoHashDistance[i]) {
precision = i;
break;
}
}
if (precision === 0) {
precision = 1;
}
} else if (query.$distanceUnits === 'miles') {
maxDistanceKm = query.$maxDistance * 1.60934;
for (i = 0; i < geoHashDistance.length; i++) {
if (maxDistanceKm > geoHashDistance[i]) {
precision = i;
break;
}
}
if (precision === 0) {
precision = 1;
}
}
// Get the lngLat geohash from the query
geoHash = sharedGeoHashSolver.encode(query.$point[0], query.$point[1], precision);
// Calculate 9 box geohashes
neighbours = sharedGeoHashSolver.calculateNeighbours(geoHash, {type: 'array'});
// Lookup all matching co-ordinates from the btree
results = [];
visited = 0;
for (i = 0; i < 9; i++) {
search = this._btree.startsWith(pathStr, neighbours[i]);
visited += search._visited;
results = results.concat(search);
}
// Work with original data
results = this._collection._primaryIndex.lookup(results);
if (results.length) {
distance = {};
// Loop the results and calculate distance
for (i = 0; i < results.length; i++) {
latLng = sharedPathSolver.get(results[i], pathStr);
distCache = distance[results[i][pk]] = this.distanceBetweenPoints(query.$point[0], query.$point[1], latLng[0], latLng[1]);
if (distCache <= maxDistanceKm) {
// Add item inside radius distance
finalResults.push(results[i]);
}
}
// Sort by distance from center
finalResults.sort(function (a, b) {
return self.sortAsc(distance[a[pk]], distance[b[pk]]);
});
}
// Return data
return finalResults;
};
Index2d.prototype.geoWithin = function (pathStr, query, options) {
return [];
};
Index2d.prototype.distanceBetweenPoints = function (lat1, lng1, lat2, lng2) {
var R = 6371; // kilometres
var lat1Rad = this.toRadians(lat1);
var lat2Rad = this.toRadians(lat2);
var lat2MinusLat1Rad = this.toRadians(lat2-lat1);
var lng2MinusLng1Rad = this.toRadians(lng2-lng1);
var a = Math.sin(lat2MinusLat1Rad/2) * Math.sin(lat2MinusLat1Rad/2) +
Math.cos(lat1Rad) * Math.cos(lat2Rad) *
Math.sin(lng2MinusLng1Rad/2) * Math.sin(lng2MinusLng1Rad/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
return R * c;
};
Index2d.prototype.toRadians = function (degrees) {
return degrees * 0.01747722222222;
};
Index2d.prototype.match = function (query, options) {
// TODO: work out how to represent that this is a better match if the query has $near than
// TODO: a basic btree index which will not be able to resolve a $near operator
return this._btree.match(query, options);
};
Index2d.prototype._itemHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.value(item, pathData[k].path).join(':');
}
return hash;
};
Index2d.prototype._itemKeyHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.keyValue(item, pathData[k].path);
}
return hash;
};
Index2d.prototype._itemHashArr = function (item, keys) {
var path = new Path(),
pathData,
//hash = '',
hashArr = [],
valArr,
i, k, j;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
valArr = path.value(item, pathData[k].path);
for (i = 0; i < valArr.length; i++) {
if (k === 0) {
// Setup the initial hash array
hashArr.push(valArr[i]);
} else {
// Loop the hash array and concat the value to it
for (j = 0; j < hashArr.length; j++) {
hashArr[j] = hashArr[j] + '_' + valArr[i];
}
}
}
}
return hashArr;
};
// Register this index on the shared object
Shared.index['2d'] = Index2d;
Shared.finishModule('Index2d');
module.exports = Index2d;
},{"./BinaryTree":4,"./GeoHash":10,"./Path":28,"./Shared":31}],12:[function(_dereq_,module,exports){
"use strict";
/*
name(string)
id(string)
rebuild(null)
state ?? needed?
match(query, options)
lookup(query, options)
insert(doc)
remove(doc)
primaryKey(string)
collection(collection)
*/
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path'),
BinaryTree = _dereq_('./BinaryTree');
/**
* The index class used to instantiate btree indexes that the database can
* use to speed up queries on collections and views.
* @constructor
*/
var IndexBinaryTree = function () {
this.init.apply(this, arguments);
};
IndexBinaryTree.prototype.init = function (keys, options, collection) {
this._btree = new BinaryTree();
this._btree.index(keys);
this._size = 0;
this._id = this._itemKeyHash(keys, keys);
this._debug = options && options.debug ? options.debug : false;
this.unique(options && options.unique ? options.unique : false);
if (keys !== undefined) {
this.keys(keys);
}
if (collection !== undefined) {
this.collection(collection);
this._btree.primaryKey(collection.primaryKey());
}
this.name(options && options.name ? options.name : this._id);
this._btree.debug(this._debug);
};
Shared.addModule('IndexBinaryTree', IndexBinaryTree);
Shared.mixin(IndexBinaryTree.prototype, 'Mixin.ChainReactor');
Shared.mixin(IndexBinaryTree.prototype, 'Mixin.Sorting');
IndexBinaryTree.prototype.id = function () {
return this._id;
};
IndexBinaryTree.prototype.state = function () {
return this._state;
};
IndexBinaryTree.prototype.size = function () {
return this._size;
};
Shared.synthesize(IndexBinaryTree.prototype, 'data');
Shared.synthesize(IndexBinaryTree.prototype, 'name');
Shared.synthesize(IndexBinaryTree.prototype, 'collection');
Shared.synthesize(IndexBinaryTree.prototype, 'type');
Shared.synthesize(IndexBinaryTree.prototype, 'unique');
IndexBinaryTree.prototype.keys = function (val) {
if (val !== undefined) {
this._keys = val;
// Count the keys
this._keyCount = (new Path()).parse(this._keys).length;
return this;
}
return this._keys;
};
IndexBinaryTree.prototype.rebuild = function () {
// Do we have a collection?
if (this._collection) {
// Get sorted data
var collection = this._collection.subset({}, {
$decouple: false,
$orderBy: this._keys
}),
collectionData = collection.find(),
dataIndex,
dataCount = collectionData.length;
// Clear the index data for the index
this._btree.clear();
this._size = 0;
if (this._unique) {
this._uniqueLookup = {};
}
// Loop the collection data
for (dataIndex = 0; dataIndex < dataCount; dataIndex++) {
this.insert(collectionData[dataIndex]);
}
}
this._state = {
name: this._name,
keys: this._keys,
indexSize: this._size,
built: new Date(),
updated: new Date(),
ok: true
};
};
IndexBinaryTree.prototype.insert = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash;
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
this._uniqueLookup[uniqueHash] = dataItem;
}
if (this._btree.insert(dataItem)) {
this._size++;
return true;
}
return false;
};
IndexBinaryTree.prototype.remove = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash;
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
delete this._uniqueLookup[uniqueHash];
}
if (this._btree.remove(dataItem)) {
this._size--;
return true;
}
return false;
};
IndexBinaryTree.prototype.violation = function (dataItem) {
// Generate item hash
var uniqueHash = this._itemHash(dataItem, this._keys);
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
IndexBinaryTree.prototype.hashViolation = function (uniqueHash) {
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
IndexBinaryTree.prototype.lookup = function (query, options) {
return this._btree.lookup(query, options);
};
IndexBinaryTree.prototype.match = function (query, options) {
return this._btree.match(query, options);
};
IndexBinaryTree.prototype._itemHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.value(item, pathData[k].path).join(':');
}
return hash;
};
IndexBinaryTree.prototype._itemKeyHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.keyValue(item, pathData[k].path);
}
return hash;
};
IndexBinaryTree.prototype._itemHashArr = function (item, keys) {
var path = new Path(),
pathData,
//hash = '',
hashArr = [],
valArr,
i, k, j;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
valArr = path.value(item, pathData[k].path);
for (i = 0; i < valArr.length; i++) {
if (k === 0) {
// Setup the initial hash array
hashArr.push(valArr[i]);
} else {
// Loop the hash array and concat the value to it
for (j = 0; j < hashArr.length; j++) {
hashArr[j] = hashArr[j] + '_' + valArr[i];
}
}
}
}
return hashArr;
};
// Register this index on the shared object
Shared.index.btree = IndexBinaryTree;
Shared.finishModule('IndexBinaryTree');
module.exports = IndexBinaryTree;
},{"./BinaryTree":4,"./Path":28,"./Shared":31}],13:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path');
/**
* The index class used to instantiate hash map indexes that the database can
* use to speed up queries on collections and views.
* @constructor
*/
var IndexHashMap = function () {
this.init.apply(this, arguments);
};
IndexHashMap.prototype.init = function (keys, options, collection) {
this._crossRef = {};
this._size = 0;
this._id = this._itemKeyHash(keys, keys);
this.data({});
this.unique(options && options.unique ? options.unique : false);
if (keys !== undefined) {
this.keys(keys);
}
if (collection !== undefined) {
this.collection(collection);
}
this.name(options && options.name ? options.name : this._id);
};
Shared.addModule('IndexHashMap', IndexHashMap);
Shared.mixin(IndexHashMap.prototype, 'Mixin.ChainReactor');
IndexHashMap.prototype.id = function () {
return this._id;
};
IndexHashMap.prototype.state = function () {
return this._state;
};
IndexHashMap.prototype.size = function () {
return this._size;
};
Shared.synthesize(IndexHashMap.prototype, 'data');
Shared.synthesize(IndexHashMap.prototype, 'name');
Shared.synthesize(IndexHashMap.prototype, 'collection');
Shared.synthesize(IndexHashMap.prototype, 'type');
Shared.synthesize(IndexHashMap.prototype, 'unique');
IndexHashMap.prototype.keys = function (val) {
if (val !== undefined) {
this._keys = val;
// Count the keys
this._keyCount = (new Path()).parse(this._keys).length;
return this;
}
return this._keys;
};
IndexHashMap.prototype.rebuild = function () {
// Do we have a collection?
if (this._collection) {
// Get sorted data
var collection = this._collection.subset({}, {
$decouple: false,
$orderBy: this._keys
}),
collectionData = collection.find(),
dataIndex,
dataCount = collectionData.length;
// Clear the index data for the index
this._data = {};
this._size = 0;
if (this._unique) {
this._uniqueLookup = {};
}
// Loop the collection data
for (dataIndex = 0; dataIndex < dataCount; dataIndex++) {
this.insert(collectionData[dataIndex]);
}
}
this._state = {
name: this._name,
keys: this._keys,
indexSize: this._size,
built: new Date(),
updated: new Date(),
ok: true
};
};
IndexHashMap.prototype.insert = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash,
itemHashArr,
hashIndex;
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
this._uniqueLookup[uniqueHash] = dataItem;
}
// Generate item hash
itemHashArr = this._itemHashArr(dataItem, this._keys);
// Get the path search results and store them
for (hashIndex = 0; hashIndex < itemHashArr.length; hashIndex++) {
this.pushToPathValue(itemHashArr[hashIndex], dataItem);
}
};
IndexHashMap.prototype.update = function (dataItem, options) {
// TODO: Write updates to work
// 1: Get uniqueHash for the dataItem primary key value (may need to generate a store for this)
// 2: Remove the uniqueHash as it currently stands
// 3: Generate a new uniqueHash for dataItem
// 4: Insert the new uniqueHash
};
IndexHashMap.prototype.remove = function (dataItem, options) {
var uniqueFlag = this._unique,
uniqueHash,
itemHashArr,
hashIndex;
if (uniqueFlag) {
uniqueHash = this._itemHash(dataItem, this._keys);
delete this._uniqueLookup[uniqueHash];
}
// Generate item hash
itemHashArr = this._itemHashArr(dataItem, this._keys);
// Get the path search results and store them
for (hashIndex = 0; hashIndex < itemHashArr.length; hashIndex++) {
this.pullFromPathValue(itemHashArr[hashIndex], dataItem);
}
};
IndexHashMap.prototype.violation = function (dataItem) {
// Generate item hash
var uniqueHash = this._itemHash(dataItem, this._keys);
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
IndexHashMap.prototype.hashViolation = function (uniqueHash) {
// Check if the item breaks the unique constraint
return Boolean(this._uniqueLookup[uniqueHash]);
};
IndexHashMap.prototype.pushToPathValue = function (hash, obj) {
var pathValArr = this._data[hash] = this._data[hash] || [];
// Make sure we have not already indexed this object at this path/value
if (pathValArr.indexOf(obj) === -1) {
// Index the object
pathValArr.push(obj);
// Record the reference to this object in our index size
this._size++;
// Cross-reference this association for later lookup
this.pushToCrossRef(obj, pathValArr);
}
};
IndexHashMap.prototype.pullFromPathValue = function (hash, obj) {
var pathValArr = this._data[hash],
indexOfObject;
// Make sure we have already indexed this object at this path/value
indexOfObject = pathValArr.indexOf(obj);
if (indexOfObject > -1) {
// Un-index the object
pathValArr.splice(indexOfObject, 1);
// Record the reference to this object in our index size
this._size--;
// Remove object cross-reference
this.pullFromCrossRef(obj, pathValArr);
}
// Check if we should remove the path value array
if (!pathValArr.length) {
// Remove the array
delete this._data[hash];
}
};
IndexHashMap.prototype.pull = function (obj) {
// Get all places the object has been used and remove them
var id = obj[this._collection.primaryKey()],
crossRefArr = this._crossRef[id],
arrIndex,
arrCount = crossRefArr.length,
arrItem;
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
arrItem = crossRefArr[arrIndex];
// Remove item from this index lookup array
this._pullFromArray(arrItem, obj);
}
// Record the reference to this object in our index size
this._size--;
// Now remove the cross-reference entry for this object
delete this._crossRef[id];
};
IndexHashMap.prototype._pullFromArray = function (arr, obj) {
var arrCount = arr.length;
while (arrCount--) {
if (arr[arrCount] === obj) {
arr.splice(arrCount, 1);
}
}
};
IndexHashMap.prototype.pushToCrossRef = function (obj, pathValArr) {
var id = obj[this._collection.primaryKey()],
crObj;
this._crossRef[id] = this._crossRef[id] || [];
// Check if the cross-reference to the pathVal array already exists
crObj = this._crossRef[id];
if (crObj.indexOf(pathValArr) === -1) {
// Add the cross-reference
crObj.push(pathValArr);
}
};
IndexHashMap.prototype.pullFromCrossRef = function (obj, pathValArr) {
var id = obj[this._collection.primaryKey()];
delete this._crossRef[id];
};
IndexHashMap.prototype.lookup = function (query) {
return this._data[this._itemHash(query, this._keys)] || [];
};
IndexHashMap.prototype.match = function (query, options) {
// Check if the passed query has data in the keys our index
// operates on and if so, is the query sort matching our order
var pathSolver = new Path();
var indexKeyArr = pathSolver.parseArr(this._keys),
queryArr = pathSolver.parseArr(query),
matchedKeys = [],
matchedKeyCount = 0,
i;
// Loop the query array and check the order of keys against the
// index key array to see if this index can be used
for (i = 0; i < indexKeyArr.length; i++) {
if (queryArr[i] === indexKeyArr[i]) {
matchedKeyCount++;
matchedKeys.push(queryArr[i]);
} else {
// Query match failed - this is a hash map index so partial key match won't work
return {
matchedKeys: [],
totalKeyCount: queryArr.length,
score: 0
};
}
}
return {
matchedKeys: matchedKeys,
totalKeyCount: queryArr.length,
score: matchedKeyCount
};
//return pathSolver.countObjectPaths(this._keys, query);
};
IndexHashMap.prototype._itemHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.value(item, pathData[k].path).join(':');
}
return hash;
};
IndexHashMap.prototype._itemKeyHash = function (item, keys) {
var path = new Path(),
pathData,
hash = '',
k;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
if (hash) { hash += '_'; }
hash += path.keyValue(item, pathData[k].path);
}
return hash;
};
IndexHashMap.prototype._itemHashArr = function (item, keys) {
var path = new Path(),
pathData,
//hash = '',
hashArr = [],
valArr,
i, k, j;
pathData = path.parse(keys);
for (k = 0; k < pathData.length; k++) {
valArr = path.value(item, pathData[k].path);
for (i = 0; i < valArr.length; i++) {
if (k === 0) {
// Setup the initial hash array
hashArr.push(valArr[i]);
} else {
// Loop the hash array and concat the value to it
for (j = 0; j < hashArr.length; j++) {
hashArr[j] = hashArr[j] + '_' + valArr[i];
}
}
}
}
return hashArr;
};
// Register this index on the shared object
Shared.index.hashed = IndexHashMap;
Shared.finishModule('IndexHashMap');
module.exports = IndexHashMap;
},{"./Path":28,"./Shared":31}],14:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared');
/**
* The key value store class used when storing basic in-memory KV data,
* and can be queried for quick retrieval. Mostly used for collection
* primary key indexes and lookups.
* @param {String=} name Optional KV store name.
* @constructor
*/
var KeyValueStore = function (name) {
this.init.apply(this, arguments);
};
KeyValueStore.prototype.init = function (name) {
this._name = name;
this._data = {};
this._primaryKey = '_id';
};
Shared.addModule('KeyValueStore', KeyValueStore);
Shared.mixin(KeyValueStore.prototype, 'Mixin.ChainReactor');
/**
* Get / set the name of the key/value store.
* @param {String} val The name to set.
* @returns {*}
*/
Shared.synthesize(KeyValueStore.prototype, 'name');
/**
* Get / set the primary key.
* @param {String} key The key to set.
* @returns {*}
*/
KeyValueStore.prototype.primaryKey = function (key) {
if (key !== undefined) {
this._primaryKey = key;
return this;
}
return this._primaryKey;
};
/**
* Removes all data from the store.
* @returns {*}
*/
KeyValueStore.prototype.truncate = function () {
this._data = {};
return this;
};
/**
* Sets data against a key in the store.
* @param {String} key The key to set data for.
* @param {*} value The value to assign to the key.
* @returns {*}
*/
KeyValueStore.prototype.set = function (key, value) {
this._data[key] = value ? value : true;
return this;
};
/**
* Gets data stored for the passed key.
* @param {String} key The key to get data for.
* @returns {*}
*/
KeyValueStore.prototype.get = function (key) {
return this._data[key];
};
/**
* Get / set the primary key.
* @param {*} val A lookup query.
* @returns {*}
*/
KeyValueStore.prototype.lookup = function (val) {
var pk = this._primaryKey,
valType = typeof val,
arrIndex,
arrCount,
lookupItem,
result = [];
// Check for early exit conditions
if (valType === 'string' || valType === 'number') {
lookupItem = this.get(val);
if (lookupItem !== undefined) {
return [lookupItem];
} else {
return [];
}
} else if (valType === 'object') {
if (val instanceof Array) {
// An array of primary keys, find all matches
arrCount = val.length;
result = [];
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
lookupItem = this.lookup(val[arrIndex]);
if (lookupItem) {
if (lookupItem instanceof Array) {
result = result.concat(lookupItem);
} else {
result.push(lookupItem);
}
}
}
return result;
} else if (val[pk]) {
return this.lookup(val[pk]);
}
}
// COMMENTED AS CODE WILL NEVER BE REACHED
// Complex lookup
/*lookupData = this._lookupKeys(val);
keys = lookupData.keys;
negate = lookupData.negate;
if (!negate) {
// Loop keys and return values
for (arrIndex = 0; arrIndex < keys.length; arrIndex++) {
result.push(this.get(keys[arrIndex]));
}
} else {
// Loop data and return non-matching keys
for (arrIndex in this._data) {
if (this._data.hasOwnProperty(arrIndex)) {
if (keys.indexOf(arrIndex) === -1) {
result.push(this.get(arrIndex));
}
}
}
}
return result;*/
};
// COMMENTED AS WE ARE NOT CURRENTLY PASSING COMPLEX QUERIES TO KEYVALUESTORE INDEXES
/*KeyValueStore.prototype._lookupKeys = function (val) {
var pk = this._primaryKey,
valType = typeof val,
arrIndex,
arrCount,
lookupItem,
bool,
result;
if (valType === 'string' || valType === 'number') {
return {
keys: [val],
negate: false
};
} else if (valType === 'object') {
if (val instanceof RegExp) {
// Create new data
result = [];
for (arrIndex in this._data) {
if (this._data.hasOwnProperty(arrIndex)) {
if (val.test(arrIndex)) {
result.push(arrIndex);
}
}
}
return {
keys: result,
negate: false
};
} else if (val instanceof Array) {
// An array of primary keys, find all matches
arrCount = val.length;
result = [];
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
result = result.concat(this._lookupKeys(val[arrIndex]).keys);
}
return {
keys: result,
negate: false
};
} else if (val.$in && (val.$in instanceof Array)) {
return {
keys: this._lookupKeys(val.$in).keys,
negate: false
};
} else if (val.$nin && (val.$nin instanceof Array)) {
return {
keys: this._lookupKeys(val.$nin).keys,
negate: true
};
} else if (val.$ne) {
return {
keys: this._lookupKeys(val.$ne, true).keys,
negate: true
};
} else if (val.$or && (val.$or instanceof Array)) {
// Create new data
result = [];
for (arrIndex = 0; arrIndex < val.$or.length; arrIndex++) {
result = result.concat(this._lookupKeys(val.$or[arrIndex]).keys);
}
return {
keys: result,
negate: false
};
} else if (val[pk]) {
return this._lookupKeys(val[pk]);
}
}
};*/
/**
* Removes data for the given key from the store.
* @param {String} key The key to un-set.
* @returns {*}
*/
KeyValueStore.prototype.unSet = function (key) {
delete this._data[key];
return this;
};
/**
* Sets data for the give key in the store only where the given key
* does not already have a value in the store.
* @param {String} key The key to set data for.
* @param {*} value The value to assign to the key.
* @returns {Boolean} True if data was set or false if data already
* exists for the key.
*/
KeyValueStore.prototype.uniqueSet = function (key, value) {
if (this._data[key] === undefined) {
this._data[key] = value;
return true;
}
return false;
};
Shared.finishModule('KeyValueStore');
module.exports = KeyValueStore;
},{"./Shared":31}],15:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared'),
Operation = _dereq_('./Operation');
/**
* The metrics class used to store details about operations.
* @constructor
*/
var Metrics = function () {
this.init.apply(this, arguments);
};
Metrics.prototype.init = function () {
this._data = [];
};
Shared.addModule('Metrics', Metrics);
Shared.mixin(Metrics.prototype, 'Mixin.ChainReactor');
/**
* Creates an operation within the metrics instance and if metrics
* are currently enabled (by calling the start() method) the operation
* is also stored in the metrics log.
* @param {String} name The name of the operation.
* @returns {Operation}
*/
Metrics.prototype.create = function (name) {
var op = new Operation(name);
if (this._enabled) {
this._data.push(op);
}
return op;
};
/**
* Starts logging operations.
* @returns {Metrics}
*/
Metrics.prototype.start = function () {
this._enabled = true;
return this;
};
/**
* Stops logging operations.
* @returns {Metrics}
*/
Metrics.prototype.stop = function () {
this._enabled = false;
return this;
};
/**
* Clears all logged operations.
* @returns {Metrics}
*/
Metrics.prototype.clear = function () {
this._data = [];
return this;
};
/**
* Returns an array of all logged operations.
* @returns {Array}
*/
Metrics.prototype.list = function () {
return this._data;
};
Shared.finishModule('Metrics');
module.exports = Metrics;
},{"./Operation":26,"./Shared":31}],16:[function(_dereq_,module,exports){
"use strict";
var CRUD = {
preSetData: function () {
},
postSetData: function () {
}
};
module.exports = CRUD;
},{}],17:[function(_dereq_,module,exports){
"use strict";
/**
* The chain reactor mixin, provides methods to the target object that allow chain
* reaction events to propagate to the target and be handled, processed and passed
* on down the chain.
* @mixin
*/
var ChainReactor = {
/**
* Creates a chain link between the current reactor node and the passed
* reactor node. Chain packets that are send by this reactor node will
* then be propagated to the passed node for subsequent packets.
* @param {*} obj The chain reactor node to link to.
*/
chain: function (obj) {
if (this.debug && this.debug()) {
if (obj._reactorIn && obj._reactorOut) {
console.log(obj._reactorIn.logIdentifier() + ' Adding target "' + obj._reactorOut.instanceIdentifier() + '" to the chain reactor target list');
} else {
console.log(this.logIdentifier() + ' Adding target "' + obj.instanceIdentifier() + '" to the chain reactor target list');
}
}
this._chain = this._chain || [];
var index = this._chain.indexOf(obj);
if (index === -1) {
this._chain.push(obj);
}
},
/**
* Removes a chain link between the current reactor node and the passed
* reactor node. Chain packets sent from this reactor node will no longer
* be received by the passed node.
* @param {*} obj The chain reactor node to unlink from.
*/
unChain: function (obj) {
if (this.debug && this.debug()) {
if (obj._reactorIn && obj._reactorOut) {
console.log(obj._reactorIn.logIdentifier() + ' Removing target "' + obj._reactorOut.instanceIdentifier() + '" from the chain reactor target list');
} else {
console.log(this.logIdentifier() + ' Removing target "' + obj.instanceIdentifier() + '" from the chain reactor target list');
}
}
if (this._chain) {
var index = this._chain.indexOf(obj);
if (index > -1) {
this._chain.splice(index, 1);
}
}
},
/**
* Determines if this chain reactor node has any listeners downstream.
* @returns {Boolean} True if there are nodes downstream of this node.
*/
chainWillSend: function () {
return Boolean(this._chain);
},
/**
* Sends a chain reactor packet downstream from this node to any of its
* chained targets that were linked to this node via a call to chain().
* @param {String} type The type of chain reactor packet to send. This
* can be any string but the receiving reactor nodes will not react to
* it unless they recognise the string. Built-in strings include: "insert",
* "update", "remove", "setData" and "debug".
* @param {Object} data A data object that usually contains a key called
* "dataSet" which is an array of items to work on, and can contain other
* custom keys that help describe the operation.
* @param {Object=} options An options object. Can also contain custom
* key/value pairs that your custom chain reactor code can operate on.
*/
chainSend: function (type, data, options) {
if (this._chain) {
var arr = this._chain,
arrItem,
count = arr.length,
index,
dataCopy = this.decouple(data, count);
for (index = 0; index < count; index++) {
arrItem = arr[index];
if (!arrItem._state || (arrItem._state && !arrItem.isDropped())) {
if (this.debug && this.debug()) {
if (arrItem._reactorIn && arrItem._reactorOut) {
console.log(arrItem._reactorIn.logIdentifier() + ' Sending data down the chain reactor pipe to "' + arrItem._reactorOut.instanceIdentifier() + '"');
} else {
console.log(this.logIdentifier() + ' Sending data down the chain reactor pipe to "' + arrItem.instanceIdentifier() + '"');
}
}
if (arrItem.chainReceive) {
arrItem.chainReceive(this, type, dataCopy[index], options);
}
} else {
console.log('Reactor Data:', type, data, options);
console.log('Reactor Node:', arrItem);
throw('Chain reactor attempting to send data to target reactor node that is in a dropped state!');
}
}
}
},
/**
* Handles receiving a chain reactor message that was sent via the chainSend()
* method. Creates the chain packet object and then allows it to be processed.
* @param {Object} sender The node that is sending the packet.
* @param {String} type The type of packet.
* @param {Object} data The data related to the packet.
* @param {Object=} options An options object.
*/
chainReceive: function (sender, type, data, options) {
var chainPacket = {
sender: sender,
type: type,
data: data,
options: options
},
cancelPropagate = false;
if (this.debug && this.debug()) {
console.log(this.logIdentifier() + ' Received data from parent reactor node');
}
// Check if we have a chain handler method
if (this._chainHandler) {
// Fire our internal handler
cancelPropagate = this._chainHandler(chainPacket);
}
// Check if we were told to cancel further propagation
if (!cancelPropagate) {
// Propagate the message down the chain
this.chainSend(chainPacket.type, chainPacket.data, chainPacket.options);
}
}
};
module.exports = ChainReactor;
},{}],18:[function(_dereq_,module,exports){
"use strict";
var idCounter = 0,
Overload = _dereq_('./Overload'),
Serialiser = _dereq_('./Serialiser'),
Common,
serialiser = new Serialiser();
/**
* Provides commonly used methods to most classes in ForerunnerDB.
* @mixin
*/
Common = {
// Expose the serialiser object so it can be extended with new data handlers.
serialiser: serialiser,
/**
* Generates a JSON serialisation-compatible object instance. After the
* instance has been passed through this method, it will be able to survive
* a JSON.stringify() and JSON.parse() cycle and still end up as an
* instance at the end. Further information about this process can be found
* in the ForerunnerDB wiki at: https://github.com/Irrelon/ForerunnerDB/wiki/Serialiser-&-Performance-Benchmarks
* @param {*} val The object instance such as "new Date()" or "new RegExp()".
*/
make: function (val) {
// This is a conversion request, hand over to serialiser
return serialiser.convert(val);
},
/**
* Gets / sets data in the item store. The store can be used to set and
* retrieve data against a key. Useful for adding arbitrary key/value data
* to a collection / view etc and retrieving it later.
* @param {String|*} key The key under which to store the passed value or
* retrieve the existing stored value.
* @param {*=} val Optional value. If passed will overwrite the existing value
* stored against the specified key if one currently exists.
* @returns {*}
*/
store: function (key, val) {
if (key !== undefined) {
if (val !== undefined) {
// Store the data
this._store = this._store || {};
this._store[key] = val;
return this;
}
if (this._store) {
return this._store[key];
}
}
return undefined;
},
/**
* Removes a previously stored key/value pair from the item store, set previously
* by using the store() method.
* @param {String|*} key The key of the key/value pair to remove;
* @returns {Common} Returns this for chaining.
*/
unStore: function (key) {
if (key !== undefined) {
delete this._store[key];
}
return this;
},
/**
* Returns a non-referenced version of the passed object / array.
* @param {Object} data The object or array to return as a non-referenced version.
* @param {Number=} copies Optional number of copies to produce. If specified, the return
* value will be an array of decoupled objects, each distinct from the other.
* @returns {*}
*/
decouple: function (data, copies) {
if (data !== undefined && data !== "") {
if (!copies) {
return this.jParse(this.jStringify(data));
} else {
var i,
json = this.jStringify(data),
copyArr = [];
for (i = 0; i < copies; i++) {
copyArr.push(this.jParse(json));
}
return copyArr;
}
}
return undefined;
},
/**
* Parses and returns data from stringified version.
* @param {String} data The stringified version of data to parse.
* @returns {Object} The parsed JSON object from the data.
*/
jParse: function (data) {
return JSON.parse(data, serialiser.reviver());
},
/**
* Converts a JSON object into a stringified version.
* @param {Object} data The data to stringify.
* @returns {String} The stringified data.
*/
jStringify: function (data) {
//return serialiser.stringify(data);
return JSON.stringify(data);
},
/**
* Generates a new 16-character hexadecimal unique ID or
* generates a new 16-character hexadecimal ID based on
* the passed string. Will always generate the same ID
* for the same string.
* @param {String=} str A string to generate the ID from.
* @return {String}
*/
objectId: function (str) {
var id,
pow = Math.pow(10, 17);
if (!str) {
idCounter++;
id = (idCounter + (
Math.random() * pow +
Math.random() * pow +
Math.random() * pow +
Math.random() * pow
)).toString(16);
} else {
var val = 0,
count = str.length,
i;
for (i = 0; i < count; i++) {
val += str.charCodeAt(i) * pow;
}
id = val.toString(16);
}
return id;
},
/**
* Generates a unique hash for the passed object.
* @param {Object} obj The object to generate a hash for.
* @returns {String}
*/
hash: function (obj) {
return JSON.stringify(obj);
},
/**
* Gets / sets debug flag that can enable debug message output to the
* console if required.
* @param {Boolean} val The value to set debug flag to.
* @return {Boolean} True if enabled, false otherwise.
*/
/**
* Sets debug flag for a particular type that can enable debug message
* output to the console if required.
* @param {String} type The name of the debug type to set flag for.
* @param {Boolean} val The value to set debug flag to.
* @return {Boolean} True if enabled, false otherwise.
*/
debug: new Overload([
function () {
return this._debug && this._debug.all;
},
function (val) {
if (val !== undefined) {
if (typeof val === 'boolean') {
this._debug = this._debug || {};
this._debug.all = val;
this.chainSend('debug', this._debug);
return this;
} else {
return (this._debug && this._debug[val]) || (this._db && this._db._debug && this._db._debug[val]) || (this._debug && this._debug.all);
}
}
return this._debug && this._debug.all;
},
function (type, val) {
if (type !== undefined) {
if (val !== undefined) {
this._debug = this._debug || {};
this._debug[type] = val;
this.chainSend('debug', this._debug);
return this;
}
return (this._debug && this._debug[val]) || (this._db && this._db._debug && this._db._debug[type]);
}
return this._debug && this._debug.all;
}
]),
/**
* Returns a string describing the class this instance is derived from.
* @returns {string}
*/
classIdentifier: function () {
return 'ForerunnerDB.' + this.className;
},
/**
* Returns a string describing the instance by it's class name and instance
* object name.
* @returns {String} The instance identifier.
*/
instanceIdentifier: function () {
return '[' + this.className + ']' + this.name();
},
/**
* Returns a string used to denote a console log against this instance,
* consisting of the class identifier and instance identifier.
* @returns {string} The log identifier.
*/
logIdentifier: function () {
return 'ForerunnerDB ' + this.instanceIdentifier();
},
/**
* Converts a query object with MongoDB dot notation syntax
* to Forerunner's object notation syntax.
* @param {Object} obj The object to convert.
*/
convertToFdb: function (obj) {
var varName,
splitArr,
objCopy,
i;
for (i in obj) {
if (obj.hasOwnProperty(i)) {
objCopy = obj;
if (i.indexOf('.') > -1) {
// Replace .$ with a placeholder before splitting by . char
i = i.replace('.$', '[|$|]');
splitArr = i.split('.');
while ((varName = splitArr.shift())) {
// Replace placeholder back to original .$
varName = varName.replace('[|$|]', '.$');
if (splitArr.length) {
objCopy[varName] = {};
} else {
objCopy[varName] = obj[i];
}
objCopy = objCopy[varName];
}
delete obj[i];
}
}
}
},
/**
* Checks if the state is dropped.
* @returns {boolean} True when dropped, false otherwise.
*/
isDropped: function () {
return this._state === 'dropped';
},
/**
* Registers a timed callback that will overwrite itself if
* the same id is used within the timeout period. Useful
* for de-bouncing fast-calls.
* @param {String} id An ID for the call (use the same one
* to debounce the same calls).
* @param {Function} callback The callback method to call on
* timeout.
* @param {Number} timeout The timeout in milliseconds before
* the callback is called.
*/
debounce: function (id, callback, timeout) {
var self = this,
newData;
self._debounce = self._debounce || {};
if (self._debounce[id]) {
// Clear timeout for this item
clearTimeout(self._debounce[id].timeout);
}
newData = {
callback: callback,
timeout: setTimeout(function () {
// Delete existing reference
delete self._debounce[id];
// Call the callback
callback();
}, timeout)
};
// Save current data
self._debounce[id] = newData;
}
};
module.exports = Common;
},{"./Overload":27,"./Serialiser":30}],19:[function(_dereq_,module,exports){
"use strict";
/**
* Provides some database constants.
* @mixin
*/
var Constants = {
TYPE_INSERT: 0,
TYPE_UPDATE: 1,
TYPE_REMOVE: 2,
PHASE_BEFORE: 0,
PHASE_AFTER: 1
};
module.exports = Constants;
},{}],20:[function(_dereq_,module,exports){
"use strict";
var Overload = _dereq_('./Overload');
/**
* Provides event emitter functionality including the methods: on, off, once, emit, deferEmit.
* @mixin
*/
var Events = {
on: new Overload({
/**
* Attach an event listener to the passed event.
* @param {String} event The name of the event to listen for.
* @param {Function} listener The method to call when the event is fired.
*/
'string, function': function (event, listener) {
this._listeners = this._listeners || {};
this._listeners[event] = this._listeners[event] || {};
this._listeners[event]['*'] = this._listeners[event]['*'] || [];
this._listeners[event]['*'].push(listener);
return this;
},
/**
* Attach an event listener to the passed event only if the passed
* id matches the document id for the event being fired.
* @param {String} event The name of the event to listen for.
* @param {*} id The document id to match against.
* @param {Function} listener The method to call when the event is fired.
*/
'string, *, function': function (event, id, listener) {
this._listeners = this._listeners || {};
this._listeners[event] = this._listeners[event] || {};
this._listeners[event][id] = this._listeners[event][id] || [];
this._listeners[event][id].push(listener);
return this;
}
}),
once: new Overload({
'string, function': function (eventName, callback) {
var self = this,
internalCallback = function () {
self.off(eventName, internalCallback);
callback.apply(self, arguments);
};
return this.on(eventName, internalCallback);
},
'string, *, function': function (eventName, id, callback) {
var self = this,
internalCallback = function () {
self.off(eventName, id, internalCallback);
callback.apply(self, arguments);
};
return this.on(eventName, id, internalCallback);
}
}),
off: new Overload({
'string': function (event) {
if (this._listeners && this._listeners[event] && event in this._listeners) {
delete this._listeners[event];
}
return this;
},
'string, function': function (event, listener) {
var arr,
index;
if (typeof(listener) === 'string') {
if (this._listeners && this._listeners[event] && this._listeners[event][listener]) {
delete this._listeners[event][listener];
}
} else {
if (this._listeners && event in this._listeners) {
arr = this._listeners[event]['*'];
index = arr.indexOf(listener);
if (index > -1) {
arr.splice(index, 1);
}
}
}
return this;
},
'string, *, function': function (event, id, listener) {
if (this._listeners && event in this._listeners && id in this.listeners[event]) {
var arr = this._listeners[event][id],
index = arr.indexOf(listener);
if (index > -1) {
arr.splice(index, 1);
}
}
},
'string, *': function (event, id) {
if (this._listeners && event in this._listeners && id in this._listeners[event]) {
// Kill all listeners for this event id
delete this._listeners[event][id];
}
}
}),
emit: function (event, data) {
this._listeners = this._listeners || {};
if (event in this._listeners) {
var arrIndex,
arrCount,
tmpFunc,
arr,
listenerIdArr,
listenerIdCount,
listenerIdIndex;
// Handle global emit
if (this._listeners[event]['*']) {
arr = this._listeners[event]['*'];
arrCount = arr.length;
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
// Check we have a function to execute
tmpFunc = arr[arrIndex];
if (typeof tmpFunc === 'function') {
tmpFunc.apply(this, Array.prototype.slice.call(arguments, 1));
}
}
}
// Handle individual emit
if (data instanceof Array) {
// Check if the array is an array of objects in the collection
if (data[0] && data[0][this._primaryKey]) {
// Loop the array and check for listeners against the primary key
listenerIdArr = this._listeners[event];
arrCount = data.length;
for (arrIndex = 0; arrIndex < arrCount; arrIndex++) {
if (listenerIdArr[data[arrIndex][this._primaryKey]]) {
// Emit for this id
listenerIdCount = listenerIdArr[data[arrIndex][this._primaryKey]].length;
for (listenerIdIndex = 0; listenerIdIndex < listenerIdCount; listenerIdIndex++) {
tmpFunc = listenerIdArr[data[arrIndex][this._primaryKey]][listenerIdIndex];
if (typeof tmpFunc === 'function') {
listenerIdArr[data[arrIndex][this._primaryKey]][listenerIdIndex].apply(this, Array.prototype.slice.call(arguments, 1));
}
}
}
}
}
}
}
return this;
},
/**
* Queues an event to be fired. This has automatic de-bouncing so that any
* events of the same type that occur within 100 milliseconds of a previous
* one will all be wrapped into a single emit rather than emitting tons of
* events for lots of chained inserts etc. Only the data from the last
* de-bounced event will be emitted.
* @param {String} eventName The name of the event to emit.
* @param {*=} data Optional data to emit with the event.
*/
deferEmit: function (eventName, data) {
var self = this,
args;
if (!this._noEmitDefer && (!this._db || (this._db && !this._db._noEmitDefer))) {
args = arguments;
// Check for an existing timeout
this._deferTimeout = this._deferTimeout || {};
if (this._deferTimeout[eventName]) {
clearTimeout(this._deferTimeout[eventName]);
}
// Set a timeout
this._deferTimeout[eventName] = setTimeout(function () {
if (self.debug()) {
console.log(self.logIdentifier() + ' Emitting ' + args[0]);
}
self.emit.apply(self, args);
}, 1);
} else {
this.emit.apply(this, arguments);
}
return this;
}
};
module.exports = Events;
},{"./Overload":27}],21:[function(_dereq_,module,exports){
"use strict";
/**
* Provides object matching algorithm methods.
* @mixin
*/
var Matching = {
/**
* Internal method that checks a document against a test object.
* @param {*} source The source object or value to test against.
* @param {*} test The test object or value to test with.
* @param {Object} queryOptions The options the query was passed with.
* @param {String=} opToApply The special operation to apply to the test such
* as 'and' or an 'or' operator.
* @param {Object=} options An object containing options to apply to the
* operation such as limiting the fields returned etc.
* @returns {Boolean} True if the test was positive, false on negative.
* @private
*/
_match: function (source, test, queryOptions, opToApply, options) {
// TODO: This method is quite long, break into smaller pieces
var operation,
applyOp = opToApply,
recurseVal,
tmpIndex,
sourceType = typeof source,
testType = typeof test,
matchedAll = true,
opResult,
substringCache,
i;
if (sourceType === 'object' && source === null) {
sourceType = 'null';
}
if (testType === 'object' && test === null) {
testType = 'null';
}
options = options || {};
queryOptions = queryOptions || {};
// Check if options currently holds a root query object
if (!options.$rootQuery) {
// Root query not assigned, hold the root query
options.$rootQuery = test;
}
// Check if options currently holds a root source object
if (!options.$rootSource) {
// Root query not assigned, hold the root query
options.$rootSource = source;
}
// Assign current query data
options.$currentQuery = test;
options.$rootData = options.$rootData || {};
// Check if the comparison data are both strings or numbers
if ((sourceType === 'string' || sourceType === 'number' || sourceType === 'null') && (testType === 'string' || testType === 'number' || testType === 'null')) {
// The source and test data are flat types that do not require recursive searches,
// so just compare them and return the result
if (sourceType === 'number' || sourceType === 'null' || testType === 'null') {
// Number or null comparison
if (source !== test) {
matchedAll = false;
}
} else {
// String comparison
// TODO: We can probably use a queryOptions.$locale as a second parameter here
// TODO: to satisfy https://github.com/Irrelon/ForerunnerDB/issues/35
if (source.localeCompare(test)) {
matchedAll = false;
}
}
} else if ((sourceType === 'string' || sourceType === 'number') && (testType === 'object' && test instanceof RegExp)) {
if (!test.test(source)) {
matchedAll = false;
}
} else {
for (i in test) {
if (test.hasOwnProperty(i)) {
// Assign previous query data
options.$previousQuery = options.$parent;
// Assign parent query data
options.$parent = {
query: test[i],
key: i,
parent: options.$previousQuery
};
// Reset operation flag
operation = false;
// Grab first two chars of the key name to check for $
substringCache = i.substr(0, 2);
// Check if the property is a comment (ignorable)
if (substringCache === '//') {
// Skip this property
continue;
}
// Check if the property starts with a dollar (function)
if (substringCache.indexOf('$') === 0) {
// Ask the _matchOp method to handle the operation
opResult = this._matchOp(i, source, test[i], queryOptions, options);
// Check the result of the matchOp operation
// If the result is -1 then no operation took place, otherwise the result
// will be a boolean denoting a match (true) or no match (false)
if (opResult > -1) {
if (opResult) {
if (opToApply === 'or') {
return true;
}
} else {
// Set the matchedAll flag to the result of the operation
// because the operation did not return true
matchedAll = opResult;
}
// Record that an operation was handled
operation = true;
}
}
// Check for regex
if (!operation && test[i] instanceof RegExp) {
operation = true;
if (sourceType === 'object' && source[i] !== undefined && test[i].test(source[i])) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
}
if (!operation) {
// Check if our query is an object
if (typeof(test[i]) === 'object') {
// Because test[i] is an object, source must also be an object
// Check if our source data we are checking the test query against
// is an object or an array
if (source[i] !== undefined) {
if (source[i] instanceof Array && !(test[i] instanceof Array)) {
// The source data is an array, so check each item until a
// match is found
recurseVal = false;
for (tmpIndex = 0; tmpIndex < source[i].length; tmpIndex++) {
recurseVal = this._match(source[i][tmpIndex], test[i], queryOptions, applyOp, options);
if (recurseVal) {
// One of the array items matched the query so we can
// include this item in the results, so break now
break;
}
}
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
} else if (!(source[i] instanceof Array) && test[i] instanceof Array) {
// The test key data is an array and the source key data is not so check
// each item in the test key data to see if the source item matches one
// of them. This is effectively an $in search.
recurseVal = false;
for (tmpIndex = 0; tmpIndex < test[i].length; tmpIndex++) {
recurseVal = this._match(source[i], test[i][tmpIndex], queryOptions, applyOp, options);
if (recurseVal) {
// One of the array items matched the query so we can
// include this item in the results, so break now
break;
}
}
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
} else if (typeof(source) === 'object') {
// Recurse down the object tree
recurseVal = this._match(source[i], test[i], queryOptions, applyOp, options);
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
} else {
recurseVal = this._match(undefined, test[i], queryOptions, applyOp, options);
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
}
} else {
// First check if the test match is an $exists
if (test[i] && test[i].$exists !== undefined) {
// Push the item through another match recurse
recurseVal = this._match(undefined, test[i], queryOptions, applyOp, options);
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
} else {
matchedAll = false;
}
}
} else {
// Check if the prop matches our test value
if (source && source[i] === test[i]) {
if (opToApply === 'or') {
return true;
}
} else if (source && source[i] && source[i] instanceof Array && test[i] && typeof(test[i]) !== "object") {
// We are looking for a value inside an array
// The source data is an array, so check each item until a
// match is found
recurseVal = false;
for (tmpIndex = 0; tmpIndex < source[i].length; tmpIndex++) {
recurseVal = this._match(source[i][tmpIndex], test[i], queryOptions, applyOp, options);
if (recurseVal) {
// One of the array items matched the query so we can
// include this item in the results, so break now
break;
}
}
if (recurseVal) {
if (opToApply === 'or') {
return true;
}
} else {
matchedAll = false;
}
} else {
matchedAll = false;
}
}
}
if (opToApply === 'and' && !matchedAll) {
return false;
}
}
}
}
return matchedAll;
},
/**
* Internal method, performs a matching process against a query operator such as $gt or $nin.
* @param {String} key The property name in the test that matches the operator to perform
* matching against.
* @param {*} source The source data to match the query against.
* @param {*} test The query to match the source against.
* @param {Object} queryOptions The options the query was passed with.
* @param {Object=} options An options object.
* @returns {*}
* @private
*/
_matchOp: function (key, source, test, queryOptions, options) {
// Check for commands
switch (key) {
case '$gt':
// Greater than
return source > test;
case '$gte':
// Greater than or equal
return source >= test;
case '$lt':
// Less than
return source < test;
case '$lte':
// Less than or equal
return source <= test;
case '$exists':
// Property exists
return (source === undefined) !== test;
case '$eq': // Equals
return source == test; // jshint ignore:line
case '$eeq': // Equals equals
return source === test;
case '$ne': // Not equals
return source != test; // jshint ignore:line
case '$nee': // Not equals equals
return source !== test;
case '$or':
// Match true on ANY check to pass
for (var orIndex = 0; orIndex < test.length; orIndex++) {
if (this._match(source, test[orIndex], queryOptions, 'and', options)) {
return true;
}
}
return false;
case '$and':
// Match true on ALL checks to pass
for (var andIndex = 0; andIndex < test.length; andIndex++) {
if (!this._match(source, test[andIndex], queryOptions, 'and', options)) {
return false;
}
}
return true;
case '$in': // In
// Check that the in test is an array
if (test instanceof Array) {
var inArr = test,
inArrCount = inArr.length,
inArrIndex;
for (inArrIndex = 0; inArrIndex < inArrCount; inArrIndex++) {
if (this._match(source, inArr[inArrIndex], queryOptions, 'and', options)) {
return true;
}
}
return false;
} else if (typeof test === 'object') {
return this._match(source, test, queryOptions, 'and', options);
} else {
console.log(this.logIdentifier() + ' Cannot use an $in operator on a non-array key: ' + key, options.$rootQuery);
return false;
}
break;
case '$nin': // Not in
// Check that the not-in test is an array
if (test instanceof Array) {
var notInArr = test,
notInArrCount = notInArr.length,
notInArrIndex;
for (notInArrIndex = 0; notInArrIndex < notInArrCount; notInArrIndex++) {
if (this._match(source, notInArr[notInArrIndex], queryOptions, 'and', options)) {
return false;
}
}
return true;
} else if (typeof test === 'object') {
return this._match(source, test, queryOptions, 'and', options);
} else {
console.log(this.logIdentifier() + ' Cannot use a $nin operator on a non-array key: ' + key, options.$rootQuery);
return false;
}
break;
case '$distinct':
// Ensure options holds a distinct lookup
options.$rootData['//distinctLookup'] = options.$rootData['//distinctLookup'] || {};
for (var distinctProp in test) {
if (test.hasOwnProperty(distinctProp)) {
options.$rootData['//distinctLookup'][distinctProp] = options.$rootData['//distinctLookup'][distinctProp] || {};
// Check if the options distinct lookup has this field's value
if (options.$rootData['//distinctLookup'][distinctProp][source[distinctProp]]) {
// Value is already in use
return false;
} else {
// Set the value in the lookup
options.$rootData['//distinctLookup'][distinctProp][source[distinctProp]] = true;
// Allow the item in the results
return true;
}
}
}
break;
case '$count':
var countKey,
countArr,
countVal;
// Iterate the count object's keys
for (countKey in test) {
if (test.hasOwnProperty(countKey)) {
// Check the property exists and is an array. If the property being counted is not
// an array (or doesn't exist) then use a value of zero in any further count logic
countArr = source[countKey];
if (typeof countArr === 'object' && countArr instanceof Array) {
countVal = countArr.length;
} else {
countVal = 0;
}
// Now recurse down the query chain further to satisfy the query for this key (countKey)
if (!this._match(countVal, test[countKey], queryOptions, 'and', options)) {
return false;
}
}
}
// Allow the item in the results
return true;
case '$find':
case '$findOne':
case '$findSub':
var fromType = 'collection',
findQuery,
findOptions,
subQuery,
subOptions,
subPath,
result,
operation = {};
// Check all parts of the $find operation exist
if (!test.$from) {
throw(key + ' missing $from property!');
}
if (test.$fromType) {
fromType = test.$fromType;
// Check the fromType exists as a method
if (!this.db()[fromType] || typeof this.db()[fromType] !== 'function') {
throw(key + ' cannot operate against $fromType "' + fromType + '" because the database does not recognise this type of object!');
}
}
// Perform the find operation
findQuery = test.$query || {};
findOptions = test.$options || {};
if (key === '$findSub') {
if (!test.$path) {
throw(key + ' missing $path property!');
}
subPath = test.$path;
subQuery = test.$subQuery || {};
subOptions = test.$subOptions || {};
if (options.$parent && options.$parent.parent && options.$parent.parent.key) {
result = this.db()[fromType](test.$from).findSub(findQuery, subPath, subQuery, subOptions);
} else {
// This is a root $find* query
// Test the source against the main findQuery
if (this._match(source, findQuery, {}, 'and', options)) {
result = this._findSub([source], subPath, subQuery, subOptions);
}
return result && result.length > 0;
}
} else {
result = this.db()[fromType](test.$from)[key.substr(1)](findQuery, findOptions);
}
operation[options.$parent.parent.key] = result;
return this._match(source, operation, queryOptions, 'and', options);
}
return -1;
},
/**
*
* @param {Array | Object} docArr An array of objects to run the join
* operation against or a single object.
* @param {Array} joinClause The join clause object array (the array in
* the $join key of a normal join options object).
* @param {Object} joinSource An object containing join source reference
* data or a blank object if you are doing a bespoke join operation.
* @param {Object} options An options object or blank object if no options.
* @returns {Array}
* @private
*/
applyJoin: function (docArr, joinClause, joinSource, options) {
var self = this,
joinSourceIndex,
joinSourceKey,
joinMatch,
joinSourceType,
joinSourceIdentifier,
resultKeyName,
joinSourceInstance,
resultIndex,
joinSearchQuery,
joinMulti,
joinRequire,
joinPrefix,
joinMatchIndex,
joinMatchData,
joinSearchOptions,
joinFindResults,
joinFindResult,
joinItem,
resultRemove = [],
l;
if (!(docArr instanceof Array)) {
// Turn the document into an array
docArr = [docArr];
}
for (joinSourceIndex = 0; joinSourceIndex < joinClause.length; joinSourceIndex++) {
for (joinSourceKey in joinClause[joinSourceIndex]) {
if (joinClause[joinSourceIndex].hasOwnProperty(joinSourceKey)) {
// Get the match data for the join
joinMatch = joinClause[joinSourceIndex][joinSourceKey];
// Check if the join is to a collection (default) or a specified source type
// e.g 'view' or 'collection'
joinSourceType = joinMatch.$sourceType || 'collection';
joinSourceIdentifier = '$' + joinSourceType + '.' + joinSourceKey;
// Set the key to store the join result in to the collection name by default
// can be overridden by the '$as' clause in the join object
resultKeyName = joinSourceKey;
// Get the join collection instance from the DB
if (joinSource[joinSourceIdentifier]) {
// We have a joinSource for this identifier already (given to us by
// an index when we analysed the query earlier on) and we can use
// that source instead.
joinSourceInstance = joinSource[joinSourceIdentifier];
} else {
// We do not already have a joinSource so grab the instance from the db
if (this._db[joinSourceType] && typeof this._db[joinSourceType] === 'function') {
joinSourceInstance = this._db[joinSourceType](joinSourceKey);
}
}
// Loop our result data array
for (resultIndex = 0; resultIndex < docArr.length; resultIndex++) {
// Loop the join conditions and build a search object from them
joinSearchQuery = {};
joinMulti = false;
joinRequire = false;
joinPrefix = '';
for (joinMatchIndex in joinMatch) {
if (joinMatch.hasOwnProperty(joinMatchIndex)) {
joinMatchData = joinMatch[joinMatchIndex];
// Check the join condition name for a special command operator
if (joinMatchIndex.substr(0, 1) === '$') {
// Special command
switch (joinMatchIndex) {
case '$where':
if (joinMatchData.$query || joinMatchData.$options) {
if (joinMatchData.$query) {
// Commented old code here, new one does dynamic reverse lookups
//joinSearchQuery = joinMatchData.query;
joinSearchQuery = self.resolveDynamicQuery(joinMatchData.$query, docArr[resultIndex]);
}
if (joinMatchData.$options) {
joinSearchOptions = joinMatchData.$options;
}
} else {
throw('$join $where clause requires "$query" and / or "$options" keys to work!');
}
break;
case '$as':
// Rename the collection when stored in the result document
resultKeyName = joinMatchData;
break;
case '$multi':
// Return an array of documents instead of a single matching document
joinMulti = joinMatchData;
break;
case '$require':
// Remove the result item if no matching join data is found
joinRequire = joinMatchData;
break;
case '$prefix':
// Add a prefix to properties mixed in
joinPrefix = joinMatchData;
break;
default:
break;
}
} else {
// Get the data to match against and store in the search object
// Resolve complex referenced query
joinSearchQuery[joinMatchIndex] = self.resolveDynamicQuery(joinMatchData, docArr[resultIndex]);
}
}
}
// Do a find on the target collection against the match data
joinFindResults = joinSourceInstance.find(joinSearchQuery, joinSearchOptions);
// Check if we require a joined row to allow the result item
if (!joinRequire || (joinRequire && joinFindResults[0])) {
// Join is not required or condition is met
if (resultKeyName === '$root') {
// The property name to store the join results in is $root
// which means we need to mixin the results but this only
// works if joinMulti is disabled
if (joinMulti !== false) {
// Throw an exception here as this join is not physically possible!
throw(this.logIdentifier() + ' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!');
}
// Mixin the result
joinFindResult = joinFindResults[0];
joinItem = docArr[resultIndex];
for (l in joinFindResult) {
if (joinFindResult.hasOwnProperty(l) && joinItem[joinPrefix + l] === undefined) {
// Properties are only mixed in if they do not already exist
// in the target item (are undefined). Using a prefix denoted via
// $prefix is a good way to prevent property name conflicts
joinItem[joinPrefix + l] = joinFindResult[l];
}
}
} else {
docArr[resultIndex][resultKeyName] = joinMulti === false ? joinFindResults[0] : joinFindResults;
}
} else {
// Join required but condition not met, add item to removal queue
resultRemove.push(resultIndex);
}
}
}
}
}
return resultRemove;
},
/**
* Takes a query object with dynamic references and converts the references
* into actual values from the references source.
* @param {Object} query The query object with dynamic references.
* @param {Object} item The document to apply the references to.
* @returns {*}
* @private
*/
resolveDynamicQuery: function (query, item) {
var self = this,
newQuery,
propType,
propVal,
pathResult,
i;
// Check for early exit conditions
if (typeof query === 'string') {
// Check if the property name starts with a back-reference
if (query.substr(0, 3) === '$$.') {
// Fill the query with a back-referenced value
pathResult = this.sharedPathSolver.value(item, query.substr(3, query.length - 3));
} else {
pathResult = this.sharedPathSolver.value(item, query);
}
if (pathResult.length > 1) {
return {$in: pathResult};
} else {
return pathResult[0];
}
}
newQuery = {};
for (i in query) {
if (query.hasOwnProperty(i)) {
propType = typeof query[i];
propVal = query[i];
switch (propType) {
case 'string':
// Check if the property name starts with a back-reference
if (propVal.substr(0, 3) === '$$.') {
// Fill the query with a back-referenced value
newQuery[i] = this.sharedPathSolver.value(item, propVal.substr(3, propVal.length - 3))[0];
} else {
newQuery[i] = propVal;
}
break;
case 'object':
newQuery[i] = self.resolveDynamicQuery(propVal, item);
break;
default:
newQuery[i] = propVal;
break;
}
}
}
return newQuery;
},
spliceArrayByIndexList: function (arr, list) {
var i;
for (i = list.length - 1; i >= 0; i--) {
arr.splice(list[i], 1);
}
}
};
module.exports = Matching;
},{}],22:[function(_dereq_,module,exports){
"use strict";
/**
* Provides sorting methods.
* @mixin
*/
var Sorting = {
/**
* Sorts the passed value a against the passed value b ascending.
* @param {*} a The first value to compare.
* @param {*} b The second value to compare.
* @returns {*} 1 if a is sorted after b, -1 if a is sorted before b.
*/
sortAsc: function (a, b) {
if (typeof(a) === 'string' && typeof(b) === 'string') {
return a.localeCompare(b);
} else {
if (a > b) {
return 1;
} else if (a < b) {
return -1;
}
}
return 0;
},
/**
* Sorts the passed value a against the passed value b descending.
* @param {*} a The first value to compare.
* @param {*} b The second value to compare.
* @returns {*} 1 if a is sorted after b, -1 if a is sorted before b.
*/
sortDesc: function (a, b) {
if (typeof(a) === 'string' && typeof(b) === 'string') {
return b.localeCompare(a);
} else {
if (a > b) {
return -1;
} else if (a < b) {
return 1;
}
}
return 0;
}
};
module.exports = Sorting;
},{}],23:[function(_dereq_,module,exports){
"use strict";
var Tags,
tagMap = {};
/**
* Provides class instance tagging and tag operation methods.
* @mixin
*/
Tags = {
/**
* Tags a class instance for later lookup.
* @param {String} name The tag to add.
* @returns {boolean}
*/
tagAdd: function (name) {
var i,
self = this,
mapArr = tagMap[name] = tagMap[name] || [];
for (i = 0; i < mapArr.length; i++) {
if (mapArr[i] === self) {
return true;
}
}
mapArr.push(self);
// Hook the drop event for this so we can react
if (self.on) {
self.on('drop', function () {
// We've been dropped so remove ourselves from the tag map
self.tagRemove(name);
});
}
return true;
},
/**
* Removes a tag from a class instance.
* @param {String} name The tag to remove.
* @returns {boolean}
*/
tagRemove: function (name) {
var i,
mapArr = tagMap[name];
if (mapArr) {
for (i = 0; i < mapArr.length; i++) {
if (mapArr[i] === this) {
mapArr.splice(i, 1);
return true;
}
}
}
return false;
},
/**
* Gets an array of all instances tagged with the passed tag name.
* @param {String} name The tag to lookup.
* @returns {Array} The array of instances that have the passed tag.
*/
tagLookup: function (name) {
return tagMap[name] || [];
},
/**
* Drops all instances that are tagged with the passed tag name.
* @param {String} name The tag to lookup.
* @param {Function} callback Callback once dropping has completed
* for all instances that match the passed tag name.
* @returns {boolean}
*/
tagDrop: function (name, callback) {
var arr = this.tagLookup(name),
dropCb,
dropCount,
i;
dropCb = function () {
dropCount--;
if (callback && dropCount === 0) {
callback(false);
}
};
if (arr.length) {
dropCount = arr.length;
// Loop the array and drop all items
for (i = arr.length - 1; i >= 0; i--) {
arr[i].drop(dropCb);
}
}
return true;
}
};
module.exports = Tags;
},{}],24:[function(_dereq_,module,exports){
"use strict";
var Overload = _dereq_('./Overload');
/**
* Provides trigger functionality methods.
* @mixin
*/
var Triggers = {
/**
* When called in a before phase the newDoc object can be directly altered
* to modify the data in it before the operation is carried out.
* @callback addTriggerCallback
* @param {Object} operation The details about the operation.
* @param {Object} oldDoc The document before the operation.
* @param {Object} newDoc The document after the operation.
*/
/**
* Add a trigger by id.
* @param {String} id The id of the trigger. This must be unique to the type and
* phase of the trigger. Only one trigger may be added with this id per type and
* phase.
* @param {Constants} type The type of operation to apply the trigger to. See
* Mixin.Constants for constants to use.
* @param {Constants} phase The phase of an operation to fire the trigger on. See
* Mixin.Constants for constants to use.
* @param {addTriggerCallback} method The method to call when the trigger is fired.
* @returns {boolean} True if the trigger was added successfully, false if not.
*/
addTrigger: function (id, type, phase, method) {
var self = this,
triggerIndex;
// Check if the trigger already exists
triggerIndex = self._triggerIndexOf(id, type, phase);
if (triggerIndex === -1) {
self.triggerStack = {};
// The trigger does not exist, create it
self._trigger = self._trigger || {};
self._trigger[type] = self._trigger[type] || {};
self._trigger[type][phase] = self._trigger[type][phase] || [];
self._trigger[type][phase].push({
id: id,
method: method,
enabled: true
});
return true;
}
return false;
},
/**
*
* @param {String} id The id of the trigger to remove.
* @param {Number} type The type of operation to remove the trigger from. See
* Mixin.Constants for constants to use.
* @param {Number} phase The phase of the operation to remove the trigger from.
* See Mixin.Constants for constants to use.
* @returns {boolean} True if removed successfully, false if not.
*/
removeTrigger: function (id, type, phase) {
var self = this,
triggerIndex;
// Check if the trigger already exists
triggerIndex = self._triggerIndexOf(id, type, phase);
if (triggerIndex > -1) {
// The trigger exists, remove it
self._trigger[type][phase].splice(triggerIndex, 1);
}
return false;
},
/**
* Tells the current instance to fire or ignore all triggers whether they
* are enabled or not.
* @param {Boolean} val Set to true to ignore triggers or false to not
* ignore them.
* @returns {*}
*/
ignoreTriggers: function (val) {
if (val !== undefined) {
this._ignoreTriggers = val;
return this;
}
return this._ignoreTriggers;
},
/**
* Generates triggers that fire in the after phase for all CRUD ops
* that automatically transform data back and forth and keep both
* import and export collections in sync with each other.
* @param {String} id The unique id for this link IO.
* @param {Object} ioData The settings for the link IO.
*/
addLinkIO: function (id, ioData) {
var self = this,
matchAll,
exportData,
importData,
exportTriggerMethod,
importTriggerMethod,
exportTo,
importFrom,
allTypes,
i;
// Store the linkIO
self._linkIO = self._linkIO || {};
self._linkIO[id] = ioData;
exportData = ioData['export'];
importData = ioData['import'];
if (exportData) {
exportTo = self.db().collection(exportData.to);
}
if (importData) {
importFrom = self.db().collection(importData.from);
}
allTypes = [
self.TYPE_INSERT,
self.TYPE_UPDATE,
self.TYPE_REMOVE
];
matchAll = function (data, callback) {
// Match all
callback(false, true);
};
if (exportData) {
// Check for export match method
if (!exportData.match) {
// No match method found, use the match all method
exportData.match = matchAll;
}
// Check for export types
if (!exportData.types) {
exportData.types = allTypes;
}
exportTriggerMethod = function (operation, oldDoc, newDoc) {
// Check if we should execute against this data
exportData.match(newDoc, function (err, doExport) {
if (doExport) {
// Get data to upsert (if any)
exportData.data(newDoc, operation.type, function (err, data, callback) {
if (data) {
// Disable all currently enabled triggers so that we
// don't go into a trigger loop
exportTo.ignoreTriggers(true);
if (operation.type !== 'remove') {
// Do upsert
exportTo.upsert(data, callback);
} else {
// Do remove
exportTo.remove(data, callback);
}
// Re-enable the previous triggers
exportTo.ignoreTriggers(false);
}
});
}
});
};
}
if (importData) {
// Check for import match method
if (!importData.match) {
// No match method found, use the match all method
importData.match = matchAll;
}
// Check for import types
if (!importData.types) {
importData.types = allTypes;
}
importTriggerMethod = function (operation, oldDoc, newDoc) {
// Check if we should execute against this data
importData.match(newDoc, function (err, doExport) {
if (doExport) {
// Get data to upsert (if any)
importData.data(newDoc, operation.type, function (err, data, callback) {
if (data) {
// Disable all currently enabled triggers so that we
// don't go into a trigger loop
exportTo.ignoreTriggers(true);
if (operation.type !== 'remove') {
// Do upsert
self.upsert(data, callback);
} else {
// Do remove
self.remove(data, callback);
}
// Re-enable the previous triggers
exportTo.ignoreTriggers(false);
}
});
}
});
};
}
if (exportData) {
for (i = 0; i < exportData.types.length; i++) {
self.addTrigger(id + 'export' + exportData.types[i], exportData.types[i], self.PHASE_AFTER, exportTriggerMethod);
}
}
if (importData) {
for (i = 0; i < importData.types.length; i++) {
importFrom.addTrigger(id + 'import' + importData.types[i], importData.types[i], self.PHASE_AFTER, importTriggerMethod);
}
}
},
/**
* Removes a previously added link IO via it's ID.
* @param {String} id The id of the link IO to remove.
* @returns {boolean} True if successful, false if the link IO
* was not found.
*/
removeLinkIO: function (id) {
var self = this,
linkIO = self._linkIO[id],
exportData,
importData,
importFrom,
i;
if (linkIO) {
exportData = linkIO['export'];
importData = linkIO['import'];
if (exportData) {
for (i = 0; i < exportData.types.length; i++) {
self.removeTrigger(id + 'export' + exportData.types[i], exportData.types[i], self.db.PHASE_AFTER);
}
}
if (importData) {
importFrom = self.db().collection(importData.from);
for (i = 0; i < importData.types.length; i++) {
importFrom.removeTrigger(id + 'import' + importData.types[i], importData.types[i], self.db.PHASE_AFTER);
}
}
delete self._linkIO[id];
return true;
}
return false;
},
enableTrigger: new Overload({
'string': function (id) {
// Alter all triggers of this type
var self = this,
types = self._trigger,
phases,
triggers,
result = false,
i, k, j;
if (types) {
for (j in types) {
if (types.hasOwnProperty(j)) {
phases = types[j];
if (phases) {
for (i in phases) {
if (phases.hasOwnProperty(i)) {
triggers = phases[i];
// Loop triggers and set enabled flag
for (k = 0; k < triggers.length; k++) {
if (triggers[k].id === id) {
triggers[k].enabled = true;
result = true;
}
}
}
}
}
}
}
}
return result;
},
'number': function (type) {
// Alter all triggers of this type
var self = this,
phases = self._trigger[type],
triggers,
result = false,
i, k;
if (phases) {
for (i in phases) {
if (phases.hasOwnProperty(i)) {
triggers = phases[i];
// Loop triggers and set to enabled
for (k = 0; k < triggers.length; k++) {
triggers[k].enabled = true;
result = true;
}
}
}
}
return result;
},
'number, number': function (type, phase) {
// Alter all triggers of this type and phase
var self = this,
phases = self._trigger[type],
triggers,
result = false,
k;
if (phases) {
triggers = phases[phase];
if (triggers) {
// Loop triggers and set to enabled
for (k = 0; k < triggers.length; k++) {
triggers[k].enabled = true;
result = true;
}
}
}
return result;
},
'string, number, number': function (id, type, phase) {
// Check if the trigger already exists
var self = this,
triggerIndex = self._triggerIndexOf(id, type, phase);
if (triggerIndex > -1) {
// Update the trigger
self._trigger[type][phase][triggerIndex].enabled = true;
return true;
}
return false;
}
}),
disableTrigger: new Overload({
'string': function (id) {
// Alter all triggers of this type
var self = this,
types = self._trigger,
phases,
triggers,
result = false,
i, k, j;
if (types) {
for (j in types) {
if (types.hasOwnProperty(j)) {
phases = types[j];
if (phases) {
for (i in phases) {
if (phases.hasOwnProperty(i)) {
triggers = phases[i];
// Loop triggers and set enabled flag
for (k = 0; k < triggers.length; k++) {
if (triggers[k].id === id) {
triggers[k].enabled = false;
result = true;
}
}
}
}
}
}
}
}
return result;
},
'number': function (type) {
// Alter all triggers of this type
var self = this,
phases = self._trigger[type],
triggers,
result = false,
i, k;
if (phases) {
for (i in phases) {
if (phases.hasOwnProperty(i)) {
triggers = phases[i];
// Loop triggers and set to disabled
for (k = 0; k < triggers.length; k++) {
triggers[k].enabled = false;
result = true;
}
}
}
}
return result;
},
'number, number': function (type, phase) {
// Alter all triggers of this type and phase
var self = this,
phases = self._trigger[type],
triggers,
result = false,
k;
if (phases) {
triggers = phases[phase];
if (triggers) {
// Loop triggers and set to disabled
for (k = 0; k < triggers.length; k++) {
triggers[k].enabled = false;
result = true;
}
}
}
return result;
},
'string, number, number': function (id, type, phase) {
// Check if the trigger already exists
var self = this,
triggerIndex = self._triggerIndexOf(id, type, phase);
if (triggerIndex > -1) {
// Update the trigger
self._trigger[type][phase][triggerIndex].enabled = false;
return true;
}
return false;
}
}),
/**
* Checks if a trigger will fire based on the type and phase provided.
* @param {Number} type The type of operation. See Mixin.Constants for
* constants to use.
* @param {Number} phase The phase of the operation. See Mixin.Constants
* for constants to use.
* @returns {Boolean} True if the trigger will fire, false otherwise.
*/
willTrigger: function (type, phase) {
if (!this._ignoreTriggers && this._trigger && this._trigger[type] && this._trigger[type][phase] && this._trigger[type][phase].length) {
// Check if a trigger in this array is enabled
var arr = this._trigger[type][phase],
i;
for (i = 0; i < arr.length; i++) {
if (arr[i].enabled) {
return true;
}
}
}
return false;
},
/**
* Processes trigger actions based on the operation, type and phase.
* @param {Object} operation Operation data to pass to the trigger.
* @param {Number} type The type of operation. See Mixin.Constants for
* constants to use.
* @param {Number} phase The phase of the operation. See Mixin.Constants
* for constants to use.
* @param {Object} oldDoc The document snapshot before operations are
* carried out against the data.
* @param {Object} newDoc The document snapshot after operations are
* carried out against the data.
* @returns {boolean}
*/
processTrigger: function (operation, type, phase, oldDoc, newDoc) {
var self = this,
triggerArr,
triggerIndex,
triggerCount,
triggerItem,
response,
typeName,
phaseName;
if (!self._ignoreTriggers && self._trigger && self._trigger[type] && self._trigger[type][phase]) {
triggerArr = self._trigger[type][phase];
triggerCount = triggerArr.length;
for (triggerIndex = 0; triggerIndex < triggerCount; triggerIndex++) {
triggerItem = triggerArr[triggerIndex];
// Check if the trigger is enabled
if (triggerItem.enabled) {
if (self.debug()) {
switch (type) {
case this.TYPE_INSERT:
typeName = 'insert';
break;
case this.TYPE_UPDATE:
typeName = 'update';
break;
case this.TYPE_REMOVE:
typeName = 'remove';
break;
default:
typeName = '';
break;
}
switch (phase) {
case this.PHASE_BEFORE:
phaseName = 'before';
break;
case this.PHASE_AFTER:
phaseName = 'after';
break;
default:
phaseName = '';
break;
}
console.log('Triggers: Processing trigger "' + triggerItem.id + '" for ' + typeName + ' in phase "' + phaseName + '"');
}
// Check if the trigger is already in the stack, if it is,
// don't fire it again (this is so we avoid infinite loops
// where a trigger triggers another trigger which calls this
// one and so on)
if (self.triggerStack && self.triggerStack[type] && self.triggerStack[type][phase] && self.triggerStack[type][phase][triggerItem.id]) {
// The trigger is already in the stack, do not fire the trigger again
if (self.debug()) {
console.log('Triggers: Will not run trigger "' + triggerItem.id + '" for ' + typeName + ' in phase "' + phaseName + '" as it is already in the stack!');
}
continue;
}
// Add the trigger to the stack so we don't go down an endless
// trigger loop
self.triggerStack = self.triggerStack || {};
self.triggerStack[type] = {};
self.triggerStack[type][phase] = {};
self.triggerStack[type][phase][triggerItem.id] = true;
// Run the trigger's method and store the response
response = triggerItem.method.call(self, operation, oldDoc, newDoc);
// Remove the trigger from the stack
self.triggerStack = self.triggerStack || {};
self.triggerStack[type] = {};
self.triggerStack[type][phase] = {};
self.triggerStack[type][phase][triggerItem.id] = false;
// Check the response for a non-expected result (anything other than
// [undefined, true or false] is considered a throwable error)
if (response === false) {
// The trigger wants us to cancel operations
return false;
}
if (response !== undefined && response !== true && response !== false) {
// Trigger responded with error, throw the error
throw('ForerunnerDB.Mixin.Triggers: Trigger error: ' + response);
}
}
}
// Triggers all ran without issue, return a success (true)
return true;
}
},
/**
* Returns the index of a trigger by id based on type and phase.
* @param {String} id The id of the trigger to find the index of.
* @param {Number} type The type of operation. See Mixin.Constants for
* constants to use.
* @param {Number} phase The phase of the operation. See Mixin.Constants
* for constants to use.
* @returns {number}
* @private
*/
_triggerIndexOf: function (id, type, phase) {
var self = this,
triggerArr,
triggerCount,
triggerIndex;
if (self._trigger && self._trigger[type] && self._trigger[type][phase]) {
triggerArr = self._trigger[type][phase];
triggerCount = triggerArr.length;
for (triggerIndex = 0; triggerIndex < triggerCount; triggerIndex++) {
if (triggerArr[triggerIndex].id === id) {
return triggerIndex;
}
}
}
return -1;
}
};
module.exports = Triggers;
},{"./Overload":27}],25:[function(_dereq_,module,exports){
"use strict";
/**
* Provides methods to handle object update operations.
* @mixin
*/
var Updating = {
/**
* Updates a property on an object.
* @param {Object} doc The object whose property is to be updated.
* @param {String} prop The property to update.
* @param {*} val The new value of the property.
* @private
*/
_updateProperty: function (doc, prop, val) {
doc[prop] = val;
if (this.debug()) {
console.log(this.logIdentifier() + ' Setting non-data-bound document property "' + prop + '" to val "' + val + '"');
}
},
/**
* Increments a value for a property on a document by the passed number.
* @param {Object} doc The document to modify.
* @param {String} prop The property to modify.
* @param {Number} val The amount to increment by.
* @private
*/
_updateIncrement: function (doc, prop, val) {
doc[prop] += val;
},
/**
* Changes the index of an item in the passed array.
* @param {Array} arr The array to modify.
* @param {Number} indexFrom The index to move the item from.
* @param {Number} indexTo The index to move the item to.
* @private
*/
_updateSpliceMove: function (arr, indexFrom, indexTo) {
arr.splice(indexTo, 0, arr.splice(indexFrom, 1)[0]);
if (this.debug()) {
console.log(this.logIdentifier() + ' Moving non-data-bound document array index from "' + indexFrom + '" to "' + indexTo + '"');
}
},
/**
* Inserts an item into the passed array at the specified index.
* @param {Array} arr The array to insert into.
* @param {Number} index The index to insert at.
* @param {Object} doc The document to insert.
* @private
*/
_updateSplicePush: function (arr, index, doc) {
if (arr.length > index) {
arr.splice(index, 0, doc);
} else {
arr.push(doc);
}
},
/**
* Inserts an item at the end of an array.
* @param {Array} arr The array to insert the item into.
* @param {Object} doc The document to insert.
* @private
*/
_updatePush: function (arr, doc) {
arr.push(doc);
},
/**
* Removes an item from the passed array.
* @param {Array} arr The array to modify.
* @param {Number} index The index of the item in the array to remove.
* @private
*/
_updatePull: function (arr, index) {
arr.splice(index, 1);
},
/**
* Multiplies a value for a property on a document by the passed number.
* @param {Object} doc The document to modify.
* @param {String} prop The property to modify.
* @param {Number} val The amount to multiply by.
* @private
*/
_updateMultiply: function (doc, prop, val) {
doc[prop] *= val;
},
/**
* Renames a property on a document to the passed property.
* @param {Object} doc The document to modify.
* @param {String} prop The property to rename.
* @param {Number} val The new property name.
* @private
*/
_updateRename: function (doc, prop, val) {
doc[val] = doc[prop];
delete doc[prop];
},
/**
* Sets a property on a document to the passed value.
* @param {Object} doc The document to modify.
* @param {String} prop The property to set.
* @param {*} val The new property value.
* @private
*/
_updateOverwrite: function (doc, prop, val) {
doc[prop] = val;
},
/**
* Deletes a property on a document.
* @param {Object} doc The document to modify.
* @param {String} prop The property to delete.
* @private
*/
_updateUnset: function (doc, prop) {
delete doc[prop];
},
/**
* Removes all properties from an object without destroying
* the object instance, thereby maintaining data-bound linking.
* @param {Object} doc The parent object to modify.
* @param {String} prop The name of the child object to clear.
* @private
*/
_updateClear: function (doc, prop) {
var obj = doc[prop],
i;
if (obj && typeof obj === 'object') {
for (i in obj) {
if (obj.hasOwnProperty(i)) {
this._updateUnset(obj, i);
}
}
}
},
/**
* Pops an item or items from the array stack.
* @param {Object} doc The document to modify.
* @param {Number} val If set to a positive integer, will pop the number specified
* from the stack, if set to a negative integer will shift the number specified
* from the stack.
* @return {Boolean}
* @private
*/
_updatePop: function (doc, val) {
var updated = false,
i;
if (doc.length > 0) {
if (val > 0) {
for (i = 0; i < val; i++) {
doc.pop();
}
updated = true;
} else if (val < 0) {
for (i = 0; i > val; i--) {
doc.shift();
}
updated = true;
}
}
return updated;
}
};
module.exports = Updating;
},{}],26:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared'),
Path = _dereq_('./Path');
/**
* The operation class, used to store details about an operation being
* performed by the database.
* @param {String} name The name of the operation.
* @constructor
*/
var Operation = function (name) {
this.pathSolver = new Path();
this.counter = 0;
this.init.apply(this, arguments);
};
Operation.prototype.init = function (name) {
this._data = {
operation: name, // The name of the operation executed such as "find", "update" etc
index: {
potential: [], // Indexes that could have potentially been used
used: false // The index that was picked to use
},
steps: [], // The steps taken to generate the query results,
time: {
startMs: 0,
stopMs: 0,
totalMs: 0,
process: {}
},
flag: {}, // An object with flags that denote certain execution paths
log: [] // Any extra data that might be useful such as warnings or helpful hints
};
};
Shared.addModule('Operation', Operation);
Shared.mixin(Operation.prototype, 'Mixin.ChainReactor');
/**
* Starts the operation timer.
*/
Operation.prototype.start = function () {
this._data.time.startMs = new Date().getTime();
};
/**
* Adds an item to the operation log.
* @param {String} event The item to log.
* @returns {*}
*/
Operation.prototype.log = function (event) {
if (event) {
var lastLogTime = this._log.length > 0 ? this._data.log[this._data.log.length - 1].time : 0,
logObj = {
event: event,
time: new Date().getTime(),
delta: 0
};
this._data.log.push(logObj);
if (lastLogTime) {
logObj.delta = logObj.time - lastLogTime;
}
return this;
}
return this._data.log;
};
/**
* Called when starting and ending a timed operation, used to time
* internal calls within an operation's execution.
* @param {String} section An operation name.
* @returns {*}
*/
Operation.prototype.time = function (section) {
if (section !== undefined) {
var process = this._data.time.process,
processObj = process[section] = process[section] || {};
if (!processObj.startMs) {
// Timer started
processObj.startMs = new Date().getTime();
processObj.stepObj = {
name: section
};
this._data.steps.push(processObj.stepObj);
} else {
processObj.stopMs = new Date().getTime();
processObj.totalMs = processObj.stopMs - processObj.startMs;
processObj.stepObj.totalMs = processObj.totalMs;
delete processObj.stepObj;
}
return this;
}
return this._data.time;
};
/**
* Used to set key/value flags during operation execution.
* @param {String} key
* @param {String} val
* @returns {*}
*/
Operation.prototype.flag = function (key, val) {
if (key !== undefined && val !== undefined) {
this._data.flag[key] = val;
} else if (key !== undefined) {
return this._data.flag[key];
} else {
return this._data.flag;
}
};
Operation.prototype.data = function (path, val, noTime) {
if (val !== undefined) {
// Assign value to object path
this.pathSolver.set(this._data, path, val);
return this;
}
return this.pathSolver.get(this._data, path);
};
Operation.prototype.pushData = function (path, val, noTime) {
// Assign value to object path
this.pathSolver.push(this._data, path, val);
};
/**
* Stops the operation timer.
*/
Operation.prototype.stop = function () {
this._data.time.stopMs = new Date().getTime();
this._data.time.totalMs = this._data.time.stopMs - this._data.time.startMs;
};
Shared.finishModule('Operation');
module.exports = Operation;
},{"./Path":28,"./Shared":31}],27:[function(_dereq_,module,exports){
"use strict";
/**
* Allows a method to accept overloaded calls with different parameters controlling
* which passed overload function is called.
* @param {String=} name A name to provide this overload to help identify
* it if any errors occur during the resolving phase of the overload. This
* is purely for debug purposes and serves no functional purpose.
* @param {Object} def The overload definition.
* @returns {Function}
* @constructor
*/
var Overload = function (name, def) {
if (!def) {
def = name;
name = undefined;
}
if (def) {
var self = this,
index,
count,
tmpDef,
defNewKey,
sigIndex,
signatures;
if (!(def instanceof Array)) {
tmpDef = {};
// Def is an object, make sure all prop names are devoid of spaces
for (index in def) {
if (def.hasOwnProperty(index)) {
defNewKey = index.replace(/ /g, '');
// Check if the definition array has a * string in it
if (defNewKey.indexOf('*') === -1) {
// No * found
tmpDef[defNewKey] = def[index];
} else {
// A * was found, generate the different signatures that this
// definition could represent
signatures = this.generateSignaturePermutations(defNewKey);
for (sigIndex = 0; sigIndex < signatures.length; sigIndex++) {
if (!tmpDef[signatures[sigIndex]]) {
tmpDef[signatures[sigIndex]] = def[index];
}
}
}
}
}
def = tmpDef;
}
return function () {
var arr = [],
lookup,
type,
overloadName;
// Check if we are being passed a key/function object or an array of functions
if (def instanceof Array) {
// We were passed an array of functions
count = def.length;
for (index = 0; index < count; index++) {
if (def[index].length === arguments.length) {
return self.callExtend(this, '$main', def, def[index], arguments);
}
}
} else {
// Generate lookup key from arguments
// Copy arguments to an array
for (index = 0; index < arguments.length; index++) {
type = typeof arguments[index];
// Handle detecting arrays
if (type === 'object' && arguments[index] instanceof Array) {
type = 'array';
}
// Handle been presented with a single undefined argument
if (arguments.length === 1 && type === 'undefined') {
break;
}
// Add the type to the argument types array
arr.push(type);
}
lookup = arr.join(',');
// Check for an exact lookup match
if (def[lookup]) {
return self.callExtend(this, '$main', def, def[lookup], arguments);
} else {
for (index = arr.length; index >= 0; index--) {
// Get the closest match
lookup = arr.slice(0, index).join(',');
if (def[lookup + ',...']) {
// Matched against arguments + "any other"
return self.callExtend(this, '$main', def, def[lookup + ',...'], arguments);
}
}
}
}
overloadName = name !== undefined ? name : typeof this.name === 'function' ? this.name() : 'Unknown';
console.log('Overload Definition:', def);
throw('ForerunnerDB.Overload "' + overloadName + '": Overloaded method does not have a matching signature "' + lookup + '" for the passed arguments: ' + this.jStringify(arr));
};
}
return function () {};
};
/**
* Generates an array of all the different definition signatures that can be
* created from the passed string with a catch-all wildcard *. E.g. it will
* convert the signature: string,*,string to all potentials:
* string,string,string
* string,number,string
* string,object,string,
* string,function,string,
* string,undefined,string
*
* @param {String} str Signature string with a wildcard in it.
* @returns {Array} An array of signature strings that are generated.
*/
Overload.prototype.generateSignaturePermutations = function (str) {
var signatures = [],
newSignature,
types = ['array', 'string', 'object', 'number', 'function', 'undefined'],
index;
if (str.indexOf('*') > -1) {
// There is at least one "any" type, break out into multiple keys
// We could do this at query time with regular expressions but
// would be significantly slower
for (index = 0; index < types.length; index++) {
newSignature = str.replace('*', types[index]);
signatures = signatures.concat(this.generateSignaturePermutations(newSignature));
}
} else {
signatures.push(str);
}
return signatures;
};
Overload.prototype.callExtend = function (context, prop, propContext, func, args) {
var tmp,
ret;
if (context && propContext[prop]) {
tmp = context[prop];
context[prop] = propContext[prop];
ret = func.apply(context, args);
context[prop] = tmp;
return ret;
} else {
return func.apply(context, args);
}
};
module.exports = Overload;
},{}],28:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared');
/**
* Path object used to resolve object paths and retrieve data from
* objects by using paths.
* @param {String=} path The path to assign.
* @constructor
*/
var Path = function (path) {
this.init.apply(this, arguments);
};
Path.prototype.init = function (path) {
if (path) {
this.path(path);
}
};
Shared.addModule('Path', Path);
Shared.mixin(Path.prototype, 'Mixin.Common');
Shared.mixin(Path.prototype, 'Mixin.ChainReactor');
/**
* Gets / sets the given path for the Path instance.
* @param {String=} path The path to assign.
*/
Path.prototype.path = function (path) {
if (path !== undefined) {
this._path = this.clean(path);
this._pathParts = this._path.split('.');
return this;
}
return this._path;
};
/**
* Tests if the passed object has the paths that are specified and that
* a value exists in those paths.
* @param {Object} testKeys The object describing the paths to test for.
* @param {Object} testObj The object to test paths against.
* @returns {Boolean} True if the object paths exist.
*/
Path.prototype.hasObjectPaths = function (testKeys, testObj) {
var result = true,
i;
for (i in testKeys) {
if (testKeys.hasOwnProperty(i)) {
if (testObj[i] === undefined) {
return false;
}
if (typeof testKeys[i] === 'object') {
// Recurse object
result = this.hasObjectPaths(testKeys[i], testObj[i]);
// Should we exit early?
if (!result) {
return false;
}
}
}
}
return result;
};
/**
* Counts the total number of key endpoints in the passed object.
* @param {Object} testObj The object to count key endpoints for.
* @returns {Number} The number of endpoints.
*/
Path.prototype.countKeys = function (testObj) {
var totalKeys = 0,
i;
for (i in testObj) {
if (testObj.hasOwnProperty(i)) {
if (testObj[i] !== undefined) {
if (typeof testObj[i] !== 'object') {
totalKeys++;
} else {
totalKeys += this.countKeys(testObj[i]);
}
}
}
}
return totalKeys;
};
/**
* Tests if the passed object has the paths that are specified and that
* a value exists in those paths and if so returns the number matched.
* @param {Object} testKeys The object describing the paths to test for.
* @param {Object} testObj The object to test paths against.
* @returns {Object} Stats on the matched keys
*/
Path.prototype.countObjectPaths = function (testKeys, testObj) {
var matchData,
matchedKeys = {},
matchedKeyCount = 0,
totalKeyCount = 0,
i;
for (i in testObj) {
if (testObj.hasOwnProperty(i)) {
if (typeof testObj[i] === 'object') {
// The test / query object key is an object, recurse
matchData = this.countObjectPaths(testKeys[i], testObj[i]);
matchedKeys[i] = matchData.matchedKeys;
totalKeyCount += matchData.totalKeyCount;
matchedKeyCount += matchData.matchedKeyCount;
} else {
// The test / query object has a property that is not an object so add it as a key
totalKeyCount++;
// Check if the test keys also have this key and it is also not an object
if (testKeys && testKeys[i] && typeof testKeys[i] !== 'object') {
matchedKeys[i] = true;
matchedKeyCount++;
} else {
matchedKeys[i] = false;
}
}
}
}
return {
matchedKeys: matchedKeys,
matchedKeyCount: matchedKeyCount,
totalKeyCount: totalKeyCount
};
};
/**
* Takes a non-recursive object and converts the object hierarchy into
* a path string.
* @param {Object} obj The object to parse.
* @param {Boolean=} withValue If true will include a 'value' key in the returned
* object that represents the value the object path points to.
* @returns {Object}
*/
Path.prototype.parse = function (obj, withValue) {
var paths = [],
path = '',
resultData,
i, k;
for (i in obj) {
if (obj.hasOwnProperty(i)) {
// Set the path to the key
path = i;
if (typeof(obj[i]) === 'object') {
if (withValue) {
resultData = this.parse(obj[i], withValue);
for (k = 0; k < resultData.length; k++) {
paths.push({
path: path + '.' + resultData[k].path,
value: resultData[k].value
});
}
} else {
resultData = this.parse(obj[i]);
for (k = 0; k < resultData.length; k++) {
paths.push({
path: path + '.' + resultData[k].path
});
}
}
} else {
if (withValue) {
paths.push({
path: path,
value: obj[i]
});
} else {
paths.push({
path: path
});
}
}
}
}
return paths;
};
/**
* Takes a non-recursive object and converts the object hierarchy into
* an array of path strings that allow you to target all possible paths
* in an object.
*
* The options object accepts an "ignore" field with a regular expression
* as the value. If any key matches the expression it is not included in
* the results.
*
* The options object accepts a boolean "verbose" field. If set to true
* the results will include all paths leading up to endpoints as well as
* they endpoints themselves.
*
* @returns {Array}
*/
Path.prototype.parseArr = function (obj, options) {
options = options || {};
return this._parseArr(obj, '', [], options);
};
Path.prototype._parseArr = function (obj, path, paths, options) {
var i,
newPath = '';
path = path || '';
paths = paths || [];
for (i in obj) {
if (obj.hasOwnProperty(i)) {
if (!options.ignore || (options.ignore && !options.ignore.test(i))) {
if (path) {
newPath = path + '.' + i;
} else {
newPath = i;
}
if (typeof(obj[i]) === 'object') {
if (options.verbose) {
paths.push(newPath);
}
this._parseArr(obj[i], newPath, paths, options);
} else {
paths.push(newPath);
}
}
}
}
return paths;
};
/**
* Sets a value on an object for the specified path.
* @param {Object} obj The object to update.
* @param {String} path The path to update.
* @param {*} val The value to set the object path to.
* @returns {*}
*/
Path.prototype.set = function (obj, path, val) {
if (obj !== undefined && path !== undefined) {
var pathParts,
part;
path = this.clean(path);
pathParts = path.split('.');
part = pathParts.shift();
if (pathParts.length) {
// Generate the path part in the object if it does not already exist
obj[part] = obj[part] || {};
// Recurse
this.set(obj[part], pathParts.join('.'), val);
} else {
// Set the value
obj[part] = val;
}
}
return obj;
};
/**
* Gets a single value from the passed object and given path.
* @param {Object} obj The object to inspect.
* @param {String} path The path to retrieve data from.
* @returns {*}
*/
Path.prototype.get = function (obj, path) {
return this.value(obj, path)[0];
};
/**
* Gets the value(s) that the object contains for the currently assigned path string.
* @param {Object} obj The object to evaluate the path against.
* @param {String=} path A path to use instead of the existing one passed in path().
* @param {Object=} options An optional options object.
* @returns {Array} An array of values for the given path.
*/
Path.prototype.value = function (obj, path, options) {
var pathParts,
arr,
arrCount,
objPart,
objPartParent,
valuesArr,
returnArr,
i, k;
// Detect early exit
if (path && path.indexOf('.') === -1) {
return [obj[path]];
}
if (obj !== undefined && typeof obj === 'object') {
if (!options || options && !options.skipArrCheck) {
// Check if we were passed an array of objects and if so,
// iterate over the array and return the value from each
// array item
if (obj instanceof Array) {
returnArr = [];
for (i = 0; i < obj.length; i++) {
returnArr.push(this.get(obj[i], path));
}
return returnArr;
}
}
valuesArr = [];
if (path !== undefined) {
path = this.clean(path);
pathParts = path.split('.');
}
arr = pathParts || this._pathParts;
arrCount = arr.length;
objPart = obj;
for (i = 0; i < arrCount; i++) {
objPart = objPart[arr[i]];
if (objPartParent instanceof Array) {
// Search inside the array for the next key
for (k = 0; k < objPartParent.length; k++) {
valuesArr = valuesArr.concat(this.value(objPartParent, k + '.' + arr[i], {skipArrCheck: true}));
}
return valuesArr;
} else {
if (!objPart || typeof(objPart) !== 'object') {
break;
}
}
objPartParent = objPart;
}
return [objPart];
} else {
return [];
}
};
/**
* Push a value to an array on an object for the specified path.
* @param {Object} obj The object to update.
* @param {String} path The path to the array to push to.
* @param {*} val The value to push to the array at the object path.
* @returns {*}
*/
Path.prototype.push = function (obj, path, val) {
if (obj !== undefined && path !== undefined) {
var pathParts,
part;
path = this.clean(path);
pathParts = path.split('.');
part = pathParts.shift();
if (pathParts.length) {
// Generate the path part in the object if it does not already exist
obj[part] = obj[part] || {};
// Recurse
this.set(obj[part], pathParts.join('.'), val);
} else {
// Set the value
obj[part] = obj[part] || [];
if (obj[part] instanceof Array) {
obj[part].push(val);
} else {
throw('ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!');
}
}
}
return obj;
};
/**
* Gets the value(s) that the object contains for the currently assigned path string
* with their associated keys.
* @param {Object} obj The object to evaluate the path against.
* @param {String=} path A path to use instead of the existing one passed in path().
* @returns {Array} An array of values for the given path with the associated key.
*/
Path.prototype.keyValue = function (obj, path) {
var pathParts,
arr,
arrCount,
objPart,
objPartParent,
objPartHash,
i;
if (path !== undefined) {
path = this.clean(path);
pathParts = path.split('.');
}
arr = pathParts || this._pathParts;
arrCount = arr.length;
objPart = obj;
for (i = 0; i < arrCount; i++) {
objPart = objPart[arr[i]];
if (!objPart || typeof(objPart) !== 'object') {
objPartHash = arr[i] + ':' + objPart;
break;
}
objPartParent = objPart;
}
return objPartHash;
};
/**
* Sets a value on an object for the specified path.
* @param {Object} obj The object to update.
* @param {String} path The path to update.
* @param {*} val The value to set the object path to.
* @returns {*}
*/
Path.prototype.set = function (obj, path, val) {
if (obj !== undefined && path !== undefined) {
var pathParts,
part;
path = this.clean(path);
pathParts = path.split('.');
part = pathParts.shift();
if (pathParts.length) {
// Generate the path part in the object if it does not already exist
obj[part] = obj[part] || {};
// Recurse
this.set(obj[part], pathParts.join('.'), val);
} else {
// Set the value
obj[part] = val;
}
}
return obj;
};
/**
* Removes leading period (.) from string and returns it.
* @param {String} str The string to clean.
* @returns {*}
*/
Path.prototype.clean = function (str) {
if (str.substr(0, 1) === '.') {
str = str.substr(1, str.length -1);
}
return str;
};
Shared.finishModule('Path');
module.exports = Path;
},{"./Shared":31}],29:[function(_dereq_,module,exports){
"use strict";
var Shared = _dereq_('./Shared');
/**
* Provides chain reactor node linking so that a chain reaction can propagate
* down a node tree. Effectively creates a chain link between the reactorIn and
* reactorOut objects where a chain reaction from the reactorIn is passed through
* the reactorProcess before being passed to the reactorOut object. Reactor
* packets are only passed through to the reactorOut if the reactor IO method
* chainSend is used.
* @param {*} reactorIn An object that has the Mixin.ChainReactor methods mixed
* in to it. Chain reactions that occur inside this object will be passed through
* to the reactorOut object.
* @param {*} reactorOut An object that has the Mixin.ChainReactor methods mixed
* in to it. Chain reactions that occur in the reactorIn object will be passed
* through to this object.
* @param {Function} reactorProcess The processing method to use when chain
* reactions occur.
* @constructor
*/
var ReactorIO = function (reactorIn, reactorOut, reactorProcess) {
if (reactorIn && reactorOut && reactorProcess) {
this._reactorIn = reactorIn;
this._reactorOut = reactorOut;
this._chainHandler = reactorProcess;
if (!reactorIn.chain) {
throw('ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!');
}
// Register the reactorIO with the input
reactorIn.chain(this);
// Register the output with the reactorIO
this.chain(reactorOut);
} else {
throw('ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!');
}
};
Shared.addModule('ReactorIO', ReactorIO);
/**
* Drop a reactor IO object, breaking the reactor link between the in and out
* reactor nodes.
* @returns {boolean}
*/
ReactorIO.prototype.drop = function () {
if (!this.isDropped()) {
this._state = 'dropped';
// Remove links
if (this._reactorIn) {
this._reactorIn.unChain(this);
}
if (this._reactorOut) {
this.unChain(this._reactorOut);
}
delete this._reactorIn;
delete this._reactorOut;
delete this._chainHandler;
this.emit('drop', this);
delete this._listeners;
}
return true;
};
/**
* Gets / sets the current state.
* @param {String=} val The name of the state to set.
* @returns {*}
*/
Shared.synthesize(ReactorIO.prototype, 'state');
Shared.mixin(ReactorIO.prototype, 'Mixin.Common');
Shared.mixin(ReactorIO.prototype, 'Mixin.ChainReactor');
Shared.mixin(ReactorIO.prototype, 'Mixin.Events');
Shared.finishModule('ReactorIO');
module.exports = ReactorIO;
},{"./Shared":31}],30:[function(_dereq_,module,exports){
"use strict";
/**
* Provides functionality to encode and decode JavaScript objects to strings
* and back again. This differs from JSON.stringify and JSON.parse in that
* special objects such as dates can be encoded to strings and back again
* so that the reconstituted version of the string still contains a JavaScript
* date object.
* @constructor
*/
var Serialiser = function () {
this.init.apply(this, arguments);
};
Serialiser.prototype.init = function () {
var self = this;
this._encoder = [];
this._decoder = [];
// Handler for Date() objects
this.registerHandler('$date', function (objInstance) {
if (objInstance instanceof Date) {
// Augment this date object with a new toJSON method
objInstance.toJSON = function () {
return "$date:" + this.toISOString();
};
// Tell the converter we have matched this object
return true;
}
// Tell converter to keep looking, we didn't match this object
return false;
}, function (data) {
if (typeof data === 'string' && data.indexOf('$date:') === 0) {
return self.convert(new Date(data.substr(6)));
}
return undefined;
});
// Handler for RegExp() objects
this.registerHandler('$regexp', function (objInstance) {
if (objInstance instanceof RegExp) {
objInstance.toJSON = function () {
return "$regexp:" + this.source.length + ":" + this.source + ":" + (this.global ? 'g' : '') + (this.ignoreCase ? 'i' : '');
/*return {
source: this.source,
params: '' + (this.global ? 'g' : '') + (this.ignoreCase ? 'i' : '')
};*/
};
// Tell the converter we have matched this object
return true;
}
// Tell converter to keep looking, we didn't match this object
return false;
}, function (data) {
if (typeof data === 'string' && data.indexOf('$regexp:') === 0) {
var dataStr = data.substr(8),//±
lengthEnd = dataStr.indexOf(':'),
sourceLength = Number(dataStr.substr(0, lengthEnd)),
source = dataStr.substr(lengthEnd + 1, sourceLength),
params = dataStr.substr(lengthEnd + sourceLength + 2);
return self.convert(new RegExp(source, params));
}
return undefined;
});
};
Serialiser.prototype.registerHandler = function (handles, encoder, decoder) {
if (handles !== undefined) {
// Register encoder
this._encoder.push(encoder);
// Register decoder
this._decoder.push(decoder);
}
};
Serialiser.prototype.convert = function (data) {
// Run through converters and check for match
var arr = this._encoder,
i;
for (i = 0; i < arr.length; i++) {
if (arr[i](data)) {
// The converter we called matched the object and converted it
// so let's return it now.
return data;
}
}
// No converter matched the object, return the unaltered one
return data;
};
Serialiser.prototype.reviver = function () {
var arr = this._decoder;
return function (key, value) {
// Check if we have a decoder method for this key
var decodedData,
i;
for (i = 0; i < arr.length; i++) {
decodedData = arr[i](value);
if (decodedData !== undefined) {
// The decoder we called matched the object and decoded it
// so let's return it now.
return decodedData;
}
}
// No decoder, return basic value
return value;
};
};
module.exports = Serialiser;
},{}],31:[function(_dereq_,module,exports){
"use strict";
var Overload = _dereq_('./Overload');
/**
* A shared object that can be used to store arbitrary data between class
* instances, and access helper methods.
* @mixin
*/
var Shared = {
version: '1.3.738',
modules: {},
plugins: {},
index: {},
_synth: {},
/**
* Adds a module to ForerunnerDB.
* @memberof Shared
* @param {String} name The name of the module.
* @param {Function} module The module class.
*/
addModule: function (name, module) {
// Store the module in the module registry
this.modules[name] = module;
// Tell the universe we are loading this module
this.emit('moduleLoad', [name, module]);
},
/**
* Called by the module once all processing has been completed. Used to determine
* if the module is ready for use by other modules.
* @memberof Shared
* @param {String} name The name of the module.
*/
finishModule: function (name) {
if (this.modules[name]) {
// Set the finished loading flag to true
this.modules[name]._fdbFinished = true;
// Assign the module name to itself so it knows what it
// is called
if (this.modules[name].prototype) {
this.modules[name].prototype.className = name;
} else {
this.modules[name].className = name;
}
this.emit('moduleFinished', [name, this.modules[name]]);
} else {
throw('ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): ' + name);
}
},
/**
* Will call your callback method when the specified module has loaded. If the module
* is already loaded the callback is called immediately.
* @memberof Shared
* @param {String} name The name of the module.
* @param {Function} callback The callback method to call when the module is loaded.
*/
moduleFinished: function (name, callback) {
if (this.modules[name] && this.modules[name]._fdbFinished) {
if (callback) { callback(name, this.modules[name]); }
} else {
this.on('moduleFinished', callback);
}
},
/**
* Determines if a module has been added to ForerunnerDB or not.
* @memberof Shared
* @param {String} name The name of the module.
* @returns {Boolean} True if the module exists or false if not.
*/
moduleExists: function (name) {
return Boolean(this.modules[name]);
},
mixin: new Overload({
/**
* Adds the properties and methods defined in the mixin to the passed
* object.
* @memberof Shared
* @name mixin
* @param {Object} obj The target object to add mixin key/values to.
* @param {String} mixinName The name of the mixin to add to the object.
*/
'object, string': function (obj, mixinName) {
var mixinObj;
if (typeof mixinName === 'string') {
mixinObj = this.mixins[mixinName];
if (!mixinObj) {
throw('ForerunnerDB.Shared: Cannot find mixin named: ' + mixinName);
}
}
return this.$main.call(this, obj, mixinObj);
},
/**
* Adds the properties and methods defined in the mixin to the passed
* object.
* @memberof Shared
* @name mixin
* @param {Object} obj The target object to add mixin key/values to.
* @param {Object} mixinObj The object containing the keys to mix into
* the target object.
*/
'object, *': function (obj, mixinObj) {
return this.$main.call(this, obj, mixinObj);
},
'$main': function (obj, mixinObj) {
if (mixinObj && typeof mixinObj === 'object') {
for (var i in mixinObj) {
if (mixinObj.hasOwnProperty(i)) {
obj[i] = mixinObj[i];
}
}
}
return obj;
}
}),
/**
* Generates a generic getter/setter method for the passed method name.
* @memberof Shared
* @param {Object} obj The object to add the getter/setter to.
* @param {String} name The name of the getter/setter to generate.
* @param {Function=} extend A method to call before executing the getter/setter.
* The existing getter/setter can be accessed from the extend method via the
* $super e.g. this.$super();
*/
synthesize: function (obj, name, extend) {
this._synth[name] = this._synth[name] || function (val) {
if (val !== undefined) {
this['_' + name] = val;
return this;
}
return this['_' + name];
};
if (extend) {
var self = this;
obj[name] = function () {
var tmp = this.$super,
ret;
this.$super = self._synth[name];
ret = extend.apply(this, arguments);
this.$super = tmp;
return ret;
};
} else {
obj[name] = this._synth[name];
}
},
/**
* Allows a method to be overloaded.
* @memberof Shared
* @param arr
* @returns {Function}
* @constructor
*/
overload: Overload,
/**
* Define the mixins that other modules can use as required.
* @memberof Shared
*/
mixins: {
'Mixin.Common': _dereq_('./Mixin.Common'),
'Mixin.Events': _dereq_('./Mixin.Events'),
'Mixin.ChainReactor': _dereq_('./Mixin.ChainReactor'),
'Mixin.CRUD': _dereq_('./Mixin.CRUD'),
'Mixin.Constants': _dereq_('./Mixin.Constants'),
'Mixin.Triggers': _dereq_('./Mixin.Triggers'),
'Mixin.Sorting': _dereq_('./Mixin.Sorting'),
'Mixin.Matching': _dereq_('./Mixin.Matching'),
'Mixin.Updating': _dereq_('./Mixin.Updating'),
'Mixin.Tags': _dereq_('./Mixin.Tags')
}
};
// Add event handling to shared
Shared.mixin(Shared, 'Mixin.Events');
module.exports = Shared;
},{"./Mixin.CRUD":16,"./Mixin.ChainReactor":17,"./Mixin.Common":18,"./Mixin.Constants":19,"./Mixin.Events":20,"./Mixin.Matching":21,"./Mixin.Sorting":22,"./Mixin.Tags":23,"./Mixin.Triggers":24,"./Mixin.Updating":25,"./Overload":27}],32:[function(_dereq_,module,exports){
/* jshint strict:false */
if (!Array.prototype.filter) {
Array.prototype.filter = function(fun/*, thisArg*/) {
if (this === void 0 || this === null) {
throw new TypeError();
}
var t = Object(this);
var len = t.length >>> 0; // jshint ignore:line
if (typeof fun !== 'function') {
throw new TypeError();
}
var res = [];
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
for (var i = 0; i < len; i++) {
if (i in t) {
var val = t[i];
// NOTE: Technically this should Object.defineProperty at
// the next index, as push can be affected by
// properties on Object.prototype and Array.prototype.
// But that method's new, and collisions should be
// rare, so use the more-compatible alternative.
if (fun.call(thisArg, val, i, t)) {
res.push(val);
}
}
}
return res;
};
}
if (typeof Object.create !== 'function') {
Object.create = (function() {
var Temp = function() {};
return function (prototype) {
if (arguments.length > 1) {
throw Error('Second argument not supported');
}
if (typeof prototype !== 'object') {
throw TypeError('Argument must be an object');
}
Temp.prototype = prototype;
var result = new Temp();
Temp.prototype = null;
return result;
};
})();
}
// Production steps of ECMA-262, Edition 5, 15.4.4.14
// Reference: http://es5.github.io/#x15.4.4.14e
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(searchElement, fromIndex) {
var k;
// 1. Let O be the result of calling ToObject passing
// the this value as the argument.
if (this === null) {
throw new TypeError('"this" is null or not defined');
}
var O = Object(this);
// 2. Let lenValue be the result of calling the Get
// internal method of O with the argument "length".
// 3. Let len be ToUint32(lenValue).
var len = O.length >>> 0; // jshint ignore:line
// 4. If len is 0, return -1.
if (len === 0) {
return -1;
}
// 5. If argument fromIndex was passed let n be
// ToInteger(fromIndex); else let n be 0.
var n = +fromIndex || 0;
if (Math.abs(n) === Infinity) {
n = 0;
}
// 6. If n >= len, return -1.
if (n >= len) {
return -1;
}
// 7. If n >= 0, then Let k be n.
// 8. Else, n<0, Let k be len - abs(n).
// If k is less than 0, then let k be 0.
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
// 9. Repeat, while k < len
while (k < len) {
// a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the
// HasProperty internal method of O with argument Pk.
// This step can be combined with c
// c. If kPresent is true, then
// i. Let elementK be the result of calling the Get
// internal method of O with the argument ToString(k).
// ii. Let same be the result of applying the
// Strict Equality Comparison Algorithm to
// searchElement and elementK.
// iii. If same is true, return k.
if (k in O && O[k] === searchElement) {
return k;
}
k++;
}
return -1;
};
}
module.exports = {};
},{}],33:[function(_dereq_,module,exports){
"use strict";
// Import external names locally
var Shared,
Db,
Collection,
CollectionGroup,
CollectionInit,
DbInit,
ReactorIO,
ActiveBucket,
Overload = _dereq_('./Overload'),
Path,
sharedPathSolver;
Shared = _dereq_('./Shared');
/**
* Creates a new view instance.
* @param {String} name The name of the view.
* @param {Object=} query The view's query.
* @param {Object=} options An options object.
* @constructor
*/
var View = function (name, query, options) {
this.init.apply(this, arguments);
};
Shared.addModule('View', View);
Shared.mixin(View.prototype, 'Mixin.Common');
Shared.mixin(View.prototype, 'Mixin.Matching');
Shared.mixin(View.prototype, 'Mixin.ChainReactor');
Shared.mixin(View.prototype, 'Mixin.Constants');
Shared.mixin(View.prototype, 'Mixin.Triggers');
Shared.mixin(View.prototype, 'Mixin.Tags');
Collection = _dereq_('./Collection');
CollectionGroup = _dereq_('./CollectionGroup');
ActiveBucket = _dereq_('./ActiveBucket');
ReactorIO = _dereq_('./ReactorIO');
CollectionInit = Collection.prototype.init;
Db = Shared.modules.Db;
DbInit = Db.prototype.init;
Path = Shared.modules.Path;
sharedPathSolver = new Path();
View.prototype.init = function (name, query, options) {
var self = this;
this.sharedPathSolver = sharedPathSolver;
this._name = name;
this._listeners = {};
this._querySettings = {};
this._debug = {};
this.query(query, options, false);
this._collectionDroppedWrap = function () {
self._collectionDropped.apply(self, arguments);
};
this._data = new Collection(this.name() + '_internal');
};
/**
* This reactor IO node is given data changes from source data and
* then acts as a firewall process between the source and view data.
* Data needs to meet the requirements this IO node imposes before
* the data is passed down the reactor chain (to the view). This
* allows us to intercept data changes from the data source and act
* on them such as applying transforms, checking the data matches
* the view's query, applying joins to the data etc before sending it
* down the reactor chain via the this.chainSend() calls.
*
* Update packets are especially complex to handle because an update
* on the underlying source data could translate into an insert,
* update or remove call on the view. Take a scenario where the view's
* query limits the data see from the source. If the source data is
* updated and the data now falls inside the view's query limitations
* the data is technically now an insert on the view, not an update.
* The same is true in reverse where the update becomes a remove. If
* the updated data already exists in the view and will still exist
* after the update operation then the update can remain an update.
* @param {Object} chainPacket The chain reactor packet representing the
* data operation that has just been processed on the source data.
* @param {View} self The reference to the view we are operating for.
* @private
*/
View.prototype._handleChainIO = function (chainPacket, self) {
var type = chainPacket.type,
hasActiveJoin,
hasActiveQuery,
hasTransformIn,
sharedData;
// NOTE: "self" in this context is the view instance.
// NOTE: "this" in this context is the ReactorIO node sitting in
// between the source (sender) and the destination (listener) and
// in this case the source is the view's "from" data source and the
// destination is the view's _data collection. This means
// that "this.chainSend()" is asking the ReactorIO node to send the
// packet on to the destination listener.
// EARLY EXIT: Check that the packet is not a CRUD operation
if (type !== 'setData' && type !== 'insert' && type !== 'update' && type !== 'remove') {
// This packet is NOT a CRUD operation packet so exit early!
// Returning false informs the chain reactor to continue propagation
// of the chain packet down the graph tree
return false;
}
// We only need to check packets under three conditions
// 1) We have a limiting query on the view "active query",
// 2) We have a query options with a $join clause on the view "active join"
// 3) We have a transformIn operation registered on the view.
// If none of these conditions exist we can just allow the chain
// packet to proceed as normal
hasActiveJoin = Boolean(self._querySettings.options && self._querySettings.options.$join);
hasActiveQuery = Boolean(self._querySettings.query);
hasTransformIn = self._data._transformIn !== undefined;
// EARLY EXIT: Check for any complex operation flags and if none
// exist, send the packet on and exit early
if (!hasActiveJoin && !hasActiveQuery && !hasTransformIn) {
// We don't have any complex operation flags so exit early!
// Returning false informs the chain reactor to continue propagation
// of the chain packet down the graph tree
return false;
}
// We have either an active query, active join or a transformIn
// function registered on the view
// We create a shared data object here so that the disparate method
// calls can share data with each other via this object whilst
// still remaining separate methods to keep code relatively clean.
sharedData = {
dataArr: [],
removeArr: []
};
// Check the packet type to get the data arrays to work on
if (chainPacket.type === 'insert') {
// Check if the insert data is an array
if (chainPacket.data.dataSet instanceof Array) {
// Use the insert data array
sharedData.dataArr = chainPacket.data.dataSet;
} else {
// Generate an array from the single insert object
sharedData.dataArr = [chainPacket.data.dataSet];
}
} else if (chainPacket.type === 'update') {
// Use the dataSet array
sharedData.dataArr = chainPacket.data.dataSet;
} else if (chainPacket.type === 'remove') {
if (chainPacket.data.dataSet instanceof Array) {
// Use the remove data array
sharedData.removeArr = chainPacket.data.dataSet;
} else {
// Generate an array from the single remove object
sharedData.removeArr = [chainPacket.data.dataSet];
}
}
// Safety check
if (!(sharedData.dataArr instanceof Array)) {
// This shouldn't happen, let's log it
console.warn('WARNING: dataArr being processed by chain reactor in View class is inconsistent!');
sharedData.dataArr = [];
}
if (!(sharedData.removeArr instanceof Array)) {
// This shouldn't happen, let's log it
console.warn('WARNING: removeArr being processed by chain reactor in View class is inconsistent!');
sharedData.removeArr = [];
}
// We need to operate in this order:
// 1) Check if there is an active join - active joins are operated
// against the SOURCE data. The joined data can potentially be
// utilised by any active query or transformIn so we do this step first.
// 2) Check if there is an active query - this is a query that is run
// against the SOURCE data after any active joins have been resolved
// on the source data. This allows an active query to operate on data
// that would only exist after an active join has been executed.
// If the source data does not fall inside the limiting factors of the
// active query then we add it to a removal array. If it does fall
// inside the limiting factors when we add it to an upsert array. This
// is because data that falls inside the query could end up being
// either new data or updated data after a transformIn operation.
// 3) Check if there is a transformIn function. If a transformIn function
// exist we run it against the data after doing any active join and
// active query.
if (hasActiveJoin) {
if (this.debug()) {
console.time(this.logIdentifier() + ' :: _handleChainIO_ActiveJoin');
}
self._handleChainIO_ActiveJoin(chainPacket, sharedData);
if (this.debug()) {
console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_ActiveJoin');
}
}
if (hasActiveQuery) {
if (this.debug()) {
console.time(this.logIdentifier() + ' :: _handleChainIO_ActiveQuery');
}
self._handleChainIO_ActiveQuery(chainPacket, sharedData);
if (this.debug()) {
console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_ActiveQuery');
}
}
if (hasTransformIn) {
if (this.debug()) {
console.time(this.logIdentifier() + ' :: _handleChainIO_TransformIn');
}
self._handleChainIO_TransformIn(chainPacket, sharedData);
if (this.debug()) {
console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_TransformIn');
}
}
// Check if we still have data to operate on and exit
// if there is none left
if (!sharedData.dataArr.length && !sharedData.removeArr.length) {
// There is no more data to operate on, exit without
// sending any data down the chain reactor (return true
// will tell reactor to exit without continuing)!
return true;
}
// Grab the public data collection's primary key
sharedData.pk = self._data.primaryKey();
// We still have data left, let's work out how to handle it
// first let's loop through the removals as these are easy
if (sharedData.removeArr.length) {
if (this.debug()) {
console.time(this.logIdentifier() + ' :: _handleChainIO_RemovePackets');
}
self._handleChainIO_RemovePackets(this, chainPacket, sharedData);
if (this.debug()) {
console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_RemovePackets');
}
}
if (sharedData.dataArr.length) {
if (this.debug()) {
console.time(this.logIdentifier() + ' :: _handleChainIO_UpsertPackets');
}
self._handleChainIO_UpsertPackets(this, chainPacket, sharedData);
if (this.debug()) {
console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_UpsertPackets');
}
}
// Now return true to tell the chain reactor not to propagate
// the data itself as we have done all that work here
return true;
};
View.prototype._handleChainIO_ActiveJoin = function (chainPacket, sharedData) {
var dataArr = sharedData.dataArr,
removeArr;
// Since we have an active join, all we need to do is operate
// the join clause on each item in the packet's data array.
removeArr = this.applyJoin(dataArr, this._querySettings.options.$join, {}, {});
// Now that we've run our join keep in mind that joins can exclude data
// if there is no matching joined data and the require: true clause in
// the join options is enabled. This means we have to store a removal
// array that tells us which items from the original data we sent to
// join did not match the join data and were set with a require flag.
// Now that we have our array of items to remove, let's run through the
// original data and remove them from there.
this.spliceArrayByIndexList(dataArr, removeArr);
// Make sure we add any items we removed to the shared removeArr
sharedData.removeArr = sharedData.removeArr.concat(removeArr);
};
View.prototype._handleChainIO_ActiveQuery = function (chainPacket, sharedData) {
var self = this,
dataArr = sharedData.dataArr,
i;
// Now we need to run the data against the active query to
// see if the data should be in the final data list or not,
// so we use the _match method.
// Loop backwards so we can safely splice from the array
// while we are looping
for (i = dataArr.length - 1; i >= 0; i--) {
if (!self._match(dataArr[i], self._querySettings.query, self._querySettings.options, 'and', {})) {
// The data didn't match the active query, add it
// to the shared removeArr
sharedData.removeArr.push(dataArr[i]);
// Now remove it from the shared dataArr
dataArr.splice(i, 1);
}
}
};
View.prototype._handleChainIO_TransformIn = function (chainPacket, sharedData) {
var self = this,
dataArr = sharedData.dataArr,
removeArr = sharedData.removeArr,
dataIn = self._data._transformIn,
i;
// At this stage we take the remaining items still left in the data
// array and run our transformIn method on each one, modifying it
// from what it was to what it should be on the view. We also have
// to run this on items we want to remove too because transforms can
// affect primary keys and therefore stop us from identifying the
// correct items to run removal operations on.
// It is important that these are transformed BEFORE they are passed
// to the CRUD methods because we use the CU data to check the position
// of the item in the array and that can only happen if it is already
// pre-transformed. The removal stuff also needs pre-transformed
// because ids can be modified by a transform.
for (i = 0; i < dataArr.length; i++) {
// Assign the new value
dataArr[i] = dataIn(dataArr[i]);
}
for (i = 0; i < removeArr.length; i++) {
// Assign the new value
removeArr[i] = dataIn(removeArr[i]);
}
};
View.prototype._handleChainIO_RemovePackets = function (ioObj, chainPacket, sharedData) {
var $or = [],
pk = sharedData.pk,
removeArr = sharedData.removeArr,
packet = {
dataSet: removeArr,
query: {
$or: $or
}
},
orObj,
i;
for (i = 0; i < removeArr.length; i++) {
orObj = {};
orObj[pk] = removeArr[i][pk];
$or.push(orObj);
}
ioObj.chainSend('remove', packet);
};
View.prototype._handleChainIO_UpsertPackets = function (ioObj, chainPacket, sharedData) {
var data = this._data,
primaryIndex = data._primaryIndex,
primaryCrc = data._primaryCrc,
pk = sharedData.pk,
dataArr = sharedData.dataArr,
arrItem,
insertArr = [],
updateArr = [],
query,
i;
// Let's work out what type of operation this data should
// generate between an insert or an update.
for (i = 0; i < dataArr.length; i++) {
arrItem = dataArr[i];
// Check if the data already exists in the data
if (primaryIndex.get(arrItem[pk])) {
// Matching item exists, check if the data is the same
if (primaryCrc.get(arrItem[pk]) !== this.hash(arrItem[pk])) {
// The document exists in the data collection but data differs, update required
updateArr.push(arrItem);
}
} else {
// The document is missing from this collection, insert required
insertArr.push(arrItem);
}
}
if (insertArr.length) {
ioObj.chainSend('insert', {
dataSet: insertArr
});
}
if (updateArr.length) {
for (i = 0; i < updateArr.length; i++) {
arrItem = updateArr[i];
query = {};
query[pk] = arrItem[pk];
ioObj.chainSend('update', {
query: query,
update: arrItem,
dataSet: [arrItem]
});
}
}
};
/**
* Executes an insert against the view's underlying data-source.
* @see Collection::insert()
*/
View.prototype.insert = function () {
this._from.insert.apply(this._from, arguments);
};
/**
* Executes an update against the view's underlying data-source.
* @see Collection::update()
*/
View.prototype.update = function () {
this._from.update.apply(this._from, arguments);
};
/**
* Executes an updateById against the view's underlying data-source.
* @see Collection::updateById()
*/
View.prototype.updateById = function () {
this._from.updateById.apply(this._from, arguments);
};
/**
* Executes a remove against the view's underlying data-source.
* @see Collection::remove()
*/
View.prototype.remove = function () {
this._from.remove.apply(this._from, arguments);
};
/**
* Queries the view data.
* @see Collection::find()
* @returns {Array} The result of the find query.
*/
View.prototype.find = function (query, options) {
return this._data.find(query, options);
};
/**
* Queries the view data for a single document.
* @see Collection::findOne()
* @returns {Object} The result of the find query.
*/
View.prototype.findOne = function (query, options) {
return this._data.findOne(query, options);
};
/**
* Queries the view data by specific id.
* @see Collection::findById()
* @returns {Array} The result of the find query.
*/
View.prototype.findById = function (id, options) {
return this._data.findById(id, options);
};
/**
* Queries the view data in a sub-array.
* @see Collection::findSub()
* @returns {Array} The result of the find query.
*/
View.prototype.findSub = function (match, path, subDocQuery, subDocOptions) {
return this._data.findSub(match, path, subDocQuery, subDocOptions);
};
/**
* Queries the view data in a sub-array and returns first match.
* @see Collection::findSubOne()
* @returns {Object} The result of the find query.
*/
View.prototype.findSubOne = function (match, path, subDocQuery, subDocOptions) {
return this._data.findSubOne(match, path, subDocQuery, subDocOptions);
};
/**
* Gets the module's internal data collection.
* @returns {Collection}
*/
View.prototype.data = function () {
return this._data;
};
/**
* Sets the source from which the view will assemble its data.
* @param {Collection|View} source The source to use to assemble view data.
* @param {Function=} callback A callback method.
* @returns {*} If no argument is passed, returns the current value of from,
* otherwise returns itself for chaining.
*/
View.prototype.from = function (source, callback) {
var self = this;
if (source !== undefined) {
// Check if we have an existing from
if (this._from) {
// Remove the listener to the drop event
this._from.off('drop', this._collectionDroppedWrap);
// Remove the current reference to the _from since we
// are about to replace it with a new one
delete this._from;
}
// Check if we have an existing reactor io that links the
// previous _from source to the view's internal data
if (this._io) {
// Drop the io and remove it
this._io.drop();
delete this._io;
}
// Check if we were passed a source name rather than a
// reference to a source object
if (typeof(source) === 'string') {
// We were passed a name, assume it is a collection and
// get the reference to the collection of that name
source = this._db.collection(source);
}
// Check if we were passed a reference to a view rather than
// a collection. Views need to be handled slightly differently
// since their data is stored in an internal data collection
// rather than actually being a direct data source themselves.
if (source.className === 'View') {
// The source is a view so IO to the internal data collection
// instead of the view proper
source = source._data;
if (this.debug()) {
console.log(this.logIdentifier() + ' Using internal data "' + source.instanceIdentifier() + '" for IO graph linking');
}
}
// Assign the new data source as the view's _from
this._from = source;
// Hook the new data source's drop event so we can unhook
// it as a data source if it gets dropped. This is important
// so that we don't run into problems using a dropped source
// for active data.
this._from.on('drop', this._collectionDroppedWrap);
// Create a new reactor IO graph node that intercepts chain packets from the
// view's _from source and determines how they should be interpreted by
// this view. See the _handleChainIO() method which does all the chain packet
// processing for the view.
this._io = new ReactorIO(this._from, this, function (chainPacket) { return self._handleChainIO.call(this, chainPacket, self); });
// Set the view's internal data primary key to the same as the
// current active _from data source
this._data.primaryKey(source.primaryKey());
// Do the initial data lookup and populate the view's internal data
// since at this point we don't actually have any data in the view
// yet.
var collData = source.find(this._querySettings.query, this._querySettings.options);
this._data.setData(collData, {}, callback);
// If we have an active query and that query has an $orderBy clause,
// update our active bucket which allows us to keep track of where
// data should be placed in our internal data array. This is about
// ordering of data and making sure that we maintain an ordered array
// so that if we have data-binding we can place an item in the data-
// bound view at the correct location. Active buckets use quick-sort
// algorithms to quickly determine the position of an item inside an
// existing array based on a sort protocol.
if (this._querySettings.options && this._querySettings.options.$orderBy) {
this.rebuildActiveBucket(this._querySettings.options.$orderBy);
} else {
this.rebuildActiveBucket();
}
return this;
}
return this._from;
};
/**
* The chain reaction handler method for the view.
* @param {Object} chainPacket The chain reaction packet to handle.
* @private
*/
View.prototype._chainHandler = function (chainPacket) {
var //self = this,
arr,
count,
index,
insertIndex,
updates,
primaryKey,
item,
currentIndex;
if (this.debug()) {
console.log(this.logIdentifier() + ' Received chain reactor data: ' + chainPacket.type);
}
switch (chainPacket.type) {
case 'setData':
if (this.debug()) {
console.log(this.logIdentifier() + ' Setting data in underlying (internal) view collection "' + this._data.name() + '"');
}
// Get the new data from our underlying data source sorted as we want
var collData = this._from.find(this._querySettings.query, this._querySettings.options);
this._data.setData(collData);
// Rebuild active bucket as well
this.rebuildActiveBucket(this._querySettings.options);
break;
case 'insert':
if (this.debug()) {
console.log(this.logIdentifier() + ' Inserting some data into underlying (internal) view collection "' + this._data.name() + '"');
}
// Decouple the data to ensure we are working with our own copy
chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet);
// Make sure we are working with an array
if (!(chainPacket.data.dataSet instanceof Array)) {
chainPacket.data.dataSet = [chainPacket.data.dataSet];
}
if (this._querySettings.options && this._querySettings.options.$orderBy) {
// Loop the insert data and find each item's index
arr = chainPacket.data.dataSet;
count = arr.length;
for (index = 0; index < count; index++) {
insertIndex = this._activeBucket.insert(arr[index]);
this._data._insertHandle(arr[index], insertIndex);
}
} else {
// Set the insert index to the passed index, or if none, the end of the view data array
insertIndex = this._data._data.length;
this._data._insertHandle(chainPacket.data.dataSet, insertIndex);
}
break;
case 'update':
if (this.debug()) {
console.log(this.logIdentifier() + ' Updating some data in underlying (internal) view collection "' + this._data.name() + '"');
}
primaryKey = this._data.primaryKey();
// Do the update
updates = this._data._handleUpdate(
chainPacket.data.query,
chainPacket.data.update,
chainPacket.data.options
);
if (this._querySettings.options && this._querySettings.options.$orderBy) {
// TODO: This would be a good place to improve performance by somehow
// TODO: inspecting the change that occurred when update was performed
// TODO: above and determining if it affected the order clause keys
// TODO: and if not, skipping the active bucket updates here
// Loop the updated items and work out their new sort locations
count = updates.length;
for (index = 0; index < count; index++) {
item = updates[index];
// Remove the item from the active bucket (via it's id)
this._activeBucket.remove(item);
// Get the current location of the item
currentIndex = this._data._data.indexOf(item);
// Add the item back in to the active bucket
insertIndex = this._activeBucket.insert(item);
if (currentIndex !== insertIndex) {
// Move the updated item to the new index
this._data._updateSpliceMove(this._data._data, currentIndex, insertIndex);
}
}
}
break;
case 'remove':
if (this.debug()) {
console.log(this.logIdentifier() + ' Removing some data from underlying (internal) view collection "' + this._data.name() + '"');
}
this._data.remove(chainPacket.data.query, chainPacket.options);
if (this._querySettings.options && this._querySettings.options.$orderBy) {
// Loop the dataSet and remove the objects from the ActiveBucket
arr = chainPacket.data.dataSet;
count = arr.length;
for (index = 0; index < count; index++) {
this._activeBucket.remove(arr[index]);
}
}
break;
default:
break;
}
};
/**
* Handles when an underlying collection the view is using as a data
* source is dropped.
* @param {Collection} collection The collection that has been dropped.
* @private
*/
View.prototype._collectionDropped = function (collection) {
if (collection) {
// Collection was dropped, remove from view
delete this._from;
}
};
/**
* Creates an index on the view.
* @see Collection::ensureIndex()
* @returns {*}
*/
View.prototype.ensureIndex = function () {
return this._data.ensureIndex.apply(this._data, arguments);
};
/**
/**
* Listens for an event.
* @see Mixin.Events::on()
*/
View.prototype.on = function () {
return this._data.on.apply(this._data, arguments);
};
/**
* Cancels an event listener.
* @see Mixin.Events::off()
*/
View.prototype.off = function () {
return this._data.off.apply(this._data, arguments);
};
/**
* Emits an event.
* @see Mixin.Events::emit()
*/
View.prototype.emit = function () {
return this._data.emit.apply(this._data, arguments);
};
/**
* Emits an event.
* @see Mixin.Events::deferEmit()
*/
View.prototype.deferEmit = function () {
return this._data.deferEmit.apply(this._data, arguments);
};
/**
* Find the distinct values for a specified field across a single collection and
* returns the results in an array.
* @param {String} key The field path to return distinct values for e.g. "person.name".
* @param {Object=} query The query to use to filter the documents used to return values from.
* @param {Object=} options The query options to use when running the query.
* @returns {Array}
*/
View.prototype.distinct = function (key, query, options) {
return this._data.distinct(key, query, options);
};
/**
* Gets the primary key for this view from the assigned collection.
* @see Collection::primaryKey()
* @returns {String}
*/
View.prototype.primaryKey = function () {
return this._data.primaryKey();
};
/**
* Drops a view and all it's stored data from the database.
* @returns {boolean} True on success, false on failure.
*/
View.prototype.drop = function (callback) {
if (!this.isDropped()) {
if (this._from) {
this._from.off('drop', this._collectionDroppedWrap);
this._from._removeView(this);
}
if (this.debug() || (this._db && this._db.debug())) {
console.log(this.logIdentifier() + ' Dropping');
}
this._state = 'dropped';
// Clear io and chains
if (this._io) {
this._io.drop();
}
// Drop the view's internal collection
if (this._data) {
this._data.drop();
}
if (this._db && this._name) {
delete this._db._view[this._name];
}
this.emit('drop', this);
if (callback) { callback(false, true); }
delete this._chain;
delete this._from;
delete this._data;
delete this._io;
delete this._listeners;
delete this._querySettings;
delete this._db;
return true;
}
return false;
};
/**
* Gets / sets the query object and query options that the view uses
* to build it's data set. This call modifies both the query and
* query options at the same time.
* @param {Object=} query The query to set.
* @param {Boolean=} options The query options object.
* @param {Boolean=} refresh Whether to refresh the view data after
* this operation. Defaults to true.
* @returns {*}
* @deprecated Use query(<query>, <options>, <refresh>) instead. Query
* now supports being presented with multiple different variations of
* arguments.
*/
View.prototype.queryData = function (query, options, refresh) {
if (query !== undefined) {
this._querySettings.query = query;
if (query.$findSub && !query.$findSub.$from) {
query.$findSub.$from = this._data.name();
}
if (query.$findSubOne && !query.$findSubOne.$from) {
query.$findSubOne.$from = this._data.name();
}
}
if (options !== undefined) {
this._querySettings.options = options;
}
if (query !== undefined || options !== undefined) {
if (refresh === undefined || refresh === true) {
this.refresh();
}
}
if (query !== undefined) {
this.emit('queryChange', query);
}
if (options !== undefined) {
this.emit('queryOptionsChange', options);
}
if (query !== undefined || options !== undefined) {
return this;
}
return this._querySettings;
};
/**
* Add data to the existing query.
* @param {Object} obj The data whose keys will be added to the existing
* query object.
* @param {Boolean} overwrite Whether or not to overwrite data that already
* exists in the query object. Defaults to true.
* @param {Boolean=} refresh Whether or not to refresh the view data set
* once the operation is complete. Defaults to true.
*/
View.prototype.queryAdd = function (obj, overwrite, refresh) {
this._querySettings.query = this._querySettings.query || {};
var query = this._querySettings.query,
i;
if (obj !== undefined) {
// Loop object properties and add to existing query
for (i in obj) {
if (obj.hasOwnProperty(i)) {
if (query[i] === undefined || (query[i] !== undefined && overwrite !== false)) {
query[i] = obj[i];
}
}
}
}
if (refresh === undefined || refresh === true) {
this.refresh();
}
if (query !== undefined) {
this.emit('queryChange', query);
}
};
/**
* Remove data from the existing query.
* @param {Object} obj The data whose keys will be removed from the existing
* query object.
* @param {Boolean=} refresh Whether or not to refresh the view data set
* once the operation is complete. Defaults to true.
*/
View.prototype.queryRemove = function (obj, refresh) {
var query = this._querySettings.query,
i;
if (query) {
if (obj !== undefined) {
// Loop object properties and add to existing query
for (i in obj) {
if (obj.hasOwnProperty(i)) {
delete query[i];
}
}
}
if (refresh === undefined || refresh === true) {
this.refresh();
}
if (query !== undefined) {
this.emit('queryChange', query);
}
}
};
/**
* Gets / sets the query being used to generate the view data. It
* does not change or modify the view's query options.
* @param {Object=} query The query to set.
* @param {Boolean=} refresh Whether to refresh the view data after
* this operation. Defaults to true.
* @returns {*}
*/
View.prototype.query = new Overload({
'': function () {
return this._querySettings.query;
},
'object': function (query) {
return this.$main.call(this, query, undefined, true);
},
'*, boolean': function (query, refresh) {
return this.$main.call(this, query, undefined, refresh);
},
'object, object': function (query, options) {
return this.$main.call(this, query, options, true);
},
'*, *, boolean': function (query, options, refresh) {
return this.$main.call(this, query, options, refresh);
},
'$main': function (query, options, refresh) {
if (query !== undefined) {
this._querySettings.query = query;
if (query.$findSub && !query.$findSub.$from) {
query.$findSub.$from = this._data.name();
}
if (query.$findSubOne && !query.$findSubOne.$from) {
query.$findSubOne.$from = this._data.name();
}
}
if (options !== undefined) {
this._querySettings.options = options;
}
if (query !== undefined || options !== undefined) {
if (refresh === undefined || refresh === true) {
this.refresh();
}
}
if (query !== undefined) {
this.emit('queryChange', query);
}
if (options !== undefined) {
this.emit('queryOptionsChange', options);
}
if (query !== undefined || options !== undefined) {
return this;
}
return this._querySettings;
}
});
/**
* Gets / sets the orderBy clause in the query options for the view.
* @param {Object=} val The order object.
* @returns {*}
*/
View.prototype.orderBy = function (val) {
if (val !== undefined) {
var queryOptions = this.queryOptions() || {};
queryOptions.$orderBy = val;
this.queryOptions(queryOptions);
return this;
}
return (this.queryOptions() || {}).$orderBy;
};
/**
* Gets / sets the page clause in the query options for the view.
* @param {Number=} val The page number to change to (zero index).
* @returns {*}
*/
View.prototype.page = function (val) {
if (val !== undefined) {
var queryOptions = this.queryOptions() || {};
// Only execute a query options update if page has changed
if (val !== queryOptions.$page) {
queryOptions.$page = val;
this.queryOptions(queryOptions);
}
return this;
}
return (this.queryOptions() || {}).$page;
};
/**
* Jump to the first page in the data set.
* @returns {*}
*/
View.prototype.pageFirst = function () {
return this.page(0);
};
/**
* Jump to the last page in the data set.
* @returns {*}
*/
View.prototype.pageLast = function () {
var pages = this.cursor().pages,
lastPage = pages !== undefined ? pages : 0;
return this.page(lastPage - 1);
};
/**
* Move forward or backwards in the data set pages by passing a positive
* or negative integer of the number of pages to move.
* @param {Number} val The number of pages to move.
* @returns {*}
*/
View.prototype.pageScan = function (val) {
if (val !== undefined) {
var pages = this.cursor().pages,
queryOptions = this.queryOptions() || {},
currentPage = queryOptions.$page !== undefined ? queryOptions.$page : 0;
currentPage += val;
if (currentPage < 0) {
currentPage = 0;
}
if (currentPage >= pages) {
currentPage = pages - 1;
}
return this.page(currentPage);
}
};
/**
* Gets / sets the query options used when applying sorting etc to the
* view data set.
* @param {Object=} options An options object.
* @param {Boolean=} refresh Whether to refresh the view data after
* this operation. Defaults to true.
* @returns {*}
*/
View.prototype.queryOptions = function (options, refresh) {
if (options !== undefined) {
this._querySettings.options = options;
if (options.$decouple === undefined) { options.$decouple = true; }
if (refresh === undefined || refresh === true) {
this.refresh();
} else {
// TODO: This could be wasteful if the previous options $orderBy was identical, do a hash and check first!
this.rebuildActiveBucket(options.$orderBy);
}
if (options !== undefined) {
this.emit('queryOptionsChange', options);
}
return this;
}
return this._querySettings.options;
};
/**
* Clears the existing active bucket and builds a new one based
* on the passed orderBy object (if one is passed).
* @param {Object=} orderBy The orderBy object describing how to
* order any data.
*/
View.prototype.rebuildActiveBucket = function (orderBy) {
if (orderBy) {
var arr = this._data._data,
arrCount = arr.length;
// Build a new active bucket
this._activeBucket = new ActiveBucket(orderBy);
this._activeBucket.primaryKey(this._data.primaryKey());
// Loop the current view data and add each item
for (var i = 0; i < arrCount; i++) {
this._activeBucket.insert(arr[i]);
}
} else {
// Remove any existing active bucket
delete this._activeBucket;
}
};
/**
* Refreshes the view data such as ordering etc.
*/
View.prototype.refresh = function () {
var self = this,
refreshResults,
joinArr,
i, k;
if (this._from) {
// Clear the private data collection which will propagate to the public data
// collection automatically via the chain reactor node between them
this._data.remove();
// Grab all the data from the underlying data source
refreshResults = this._from.find(this._querySettings.query, this._querySettings.options);
this.cursor(refreshResults.$cursor);
// Insert the underlying data into the private data collection
this._data.insert(refreshResults);
// Store the current cursor data
this._data._data.$cursor = refreshResults.$cursor;
this._data._data.$cursor = refreshResults.$cursor;
}
if (this._querySettings && this._querySettings.options && this._querySettings.options.$join && this._querySettings.options.$join.length) {
// Define the change handler method
self.__joinChange = self.__joinChange || function () {
self._joinChange();
};
// Check for existing join collections
if (this._joinCollections && this._joinCollections.length) {
// Loop the join collections and remove change listeners
// Loop the collections and hook change events
for (i = 0; i < this._joinCollections.length; i++) {
this._db.collection(this._joinCollections[i]).off('immediateChange', self.__joinChange);
}
}
// Now start hooking any new / existing joins
joinArr = this._querySettings.options.$join;
this._joinCollections = [];
// Loop the joined collections and hook change events
for (i = 0; i < joinArr.length; i++) {
for (k in joinArr[i]) {
if (joinArr[i].hasOwnProperty(k)) {
this._joinCollections.push(k);
}
}
}
if (this._joinCollections.length) {
// Loop the collections and hook change events
for (i = 0; i < this._joinCollections.length; i++) {
this._db.collection(this._joinCollections[i]).on('immediateChange', self.__joinChange);
}
}
}
if (this._querySettings.options && this._querySettings.options.$orderBy) {
this.rebuildActiveBucket(this._querySettings.options.$orderBy);
} else {
this.rebuildActiveBucket();
}
return this;
};
/**
* Handles when a change has occurred on a collection that is joined
* by query to this view.
* @param objName
* @param objType
* @private
*/
View.prototype._joinChange = function (objName, objType) {
this.emit('joinChange');
// TODO: This is a really dirty solution because it will require a complete
// TODO: rebuild of the view data. We need to implement an IO handler to
// TODO: selectively update the data of the view based on the joined
// TODO: collection data operation.
// FIXME: This isnt working, major performance killer, invest in some IO from chain reactor to make this a targeted call
this.refresh();
};
/**
* Returns the number of documents currently in the view.
* @returns {Number}
*/
View.prototype.count = function () {
return this._data.count.apply(this._data, arguments);
};
// Call underlying
View.prototype.subset = function () {
return this._data.subset.apply(this._data, arguments);
};
/**
* Takes the passed data and uses it to set transform methods and globally
* enable or disable the transform system for the view.
* @param {Object} obj The new transform system settings "enabled", "dataIn"
* and "dataOut":
* {
* "enabled": true,
* "dataIn": function (data) { return data; },
* "dataOut": function (data) { return data; }
* }
* @returns {*}
*/
View.prototype.transform = function (obj) {
var currentSettings,
newSettings;
currentSettings = this._data.transform();
this._data.transform(obj);
newSettings = this._data.transform();
// Check if transforms are enabled, a dataIn method is set and these
// settings did not match the previous transform settings
if (newSettings.enabled && newSettings.dataIn && (currentSettings.enabled !== newSettings.enabled || currentSettings.dataIn !== newSettings.dataIn)) {
// The data in the view is now stale, refresh it
this.refresh();
}
return newSettings;
};
/**
* Executes a method against each document that matches query and returns an
* array of documents that may have been modified by the method.
* @param {Object} query The query object.
* @param {Function} func The method that each document is passed to. If this method
* returns false for a particular document it is excluded from the results.
* @param {Object=} options Optional options object.
* @returns {Array}
*/
View.prototype.filter = function (query, func, options) {
return this._data.filter(query, func, options);
};
/**
* Returns the non-transformed data the view holds as a collection
* reference.
* @return {Collection} The non-transformed collection reference.
*/
View.prototype.data = function () {
return this._data;
};
/**
* @see Collection.indexOf
* @returns {*}
*/
View.prototype.indexOf = function () {
return this._data.indexOf.apply(this._data, arguments);
};
/**
* Gets / sets the db instance this class instance belongs to.
* @param {Db=} db The db instance.
* @memberof View
* @returns {*}
*/
Shared.synthesize(View.prototype, 'db', function (db) {
if (db) {
this._data.db(db);
// Apply the same debug settings
this.debug(db.debug());
this._data.debug(db.debug());
}
return this.$super.apply(this, arguments);
});
/**
* Gets / sets the current state.
* @param {String=} val The name of the state to set.
* @returns {*}
*/
Shared.synthesize(View.prototype, 'state');
/**
* Gets / sets the current name.
* @param {String=} val The new name to set.
* @returns {*}
*/
Shared.synthesize(View.prototype, 'name');
/**
* Gets / sets the current cursor.
* @param {String=} val The new cursor to set.
* @returns {*}
*/
Shared.synthesize(View.prototype, 'cursor', function (val) {
if (val === undefined) {
return this._cursor || {};
}
this.$super.apply(this, arguments);
});
// Extend collection with view init
Collection.prototype.init = function () {
this._view = [];
CollectionInit.apply(this, arguments);
};
/**
* Creates a view and assigns the collection as its data source.
* @param {String} name The name of the new view.
* @param {Object} query The query to apply to the new view.
* @param {Object} options The options object to apply to the view.
* @returns {*}
*/
Collection.prototype.view = function (name, query, options) {
if (this._db && this._db._view ) {
if (!this._db._view[name]) {
var view = new View(name, query, options)
.db(this._db)
.from(this);
this._view = this._view || [];
this._view.push(view);
return view;
} else {
throw(this.logIdentifier() + ' Cannot create a view using this collection because a view with this name already exists: ' + name);
}
}
};
/**
* Adds a view to the internal view lookup.
* @param {View} view The view to add.
* @returns {Collection}
* @private
*/
Collection.prototype._addView = CollectionGroup.prototype._addView = function (view) {
if (view !== undefined) {
this._view.push(view);
}
return this;
};
/**
* Removes a view from the internal view lookup.
* @param {View} view The view to remove.
* @returns {Collection}
* @private
*/
Collection.prototype._removeView = CollectionGroup.prototype._removeView = function (view) {
if (view !== undefined) {
var index = this._view.indexOf(view);
if (index > -1) {
this._view.splice(index, 1);
}
}
return this;
};
// Extend DB with views init
Db.prototype.init = function () {
this._view = {};
DbInit.apply(this, arguments);
};
/**
* Gets a view by it's name.
* @param {String} name The name of the view to retrieve.
* @returns {*}
*/
Db.prototype.view = function (name) {
var self = this;
// Handle being passed an instance
if (name instanceof View) {
return name;
}
if (this._view[name]) {
return this._view[name];
}
if (this.debug() || (this._db && this._db.debug())) {
console.log(this.logIdentifier() + ' Creating view ' + name);
}
this._view[name] = new View(name).db(this);
self.emit('create', self._view[name], 'view', name);
return this._view[name];
};
/**
* Determine if a view with the passed name already exists.
* @param {String} name The name of the view to check for.
* @returns {boolean}
*/
Db.prototype.viewExists = function (name) {
return Boolean(this._view[name]);
};
/**
* Returns an array of views the DB currently has.
* @returns {Array} An array of objects containing details of each view
* the database is currently managing.
*/
Db.prototype.views = function () {
var arr = [],
view,
i;
for (i in this._view) {
if (this._view.hasOwnProperty(i)) {
view = this._view[i];
arr.push({
name: i,
count: view.count(),
linked: view.isLinked !== undefined ? view.isLinked() : false
});
}
}
return arr;
};
Shared.finishModule('View');
module.exports = View;
},{"./ActiveBucket":3,"./Collection":6,"./CollectionGroup":7,"./Overload":27,"./ReactorIO":29,"./Shared":31}]},{},[1]);
|
examples/counter/src/index.js | roth1002/redux | import React from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'
import Counter from './components/Counter'
import counter from './reducers'
const store = createStore(counter)
const rootEl = document.getElementById('root')
const render = () => ReactDOM.render(
<Counter
value={store.getState()}
onIncrement={() => store.dispatch({ type: 'INCREMENT' })}
onDecrement={() => store.dispatch({ type: 'DECREMENT' })}
/>,
rootEl
)
render()
store.subscribe(render)
|
src/shared/DetailsFormGroup.js | cityofasheville/simplicity2 | import React from 'react';
import PropTypes from 'prop-types';
const DetailsFormGroup = props => (
<div className={props.icon ?
'form-group form-group--has-content form-group--has-icon' :
(props.fullWidth ? 'form-group form-group--has-content full-width-card' : 'form-group form-group--has-content')}>
<div className="form-group__inner">
<div className='form-group__label'>
{props.icon !== null &&
<span>{props.icon}</span>
}
{props.hasLabel &&
<label htmlFor={props.name}>{props.label}</label>
}
</div>
<div className="form-group__value" name={props.name}>{props.value}</div>
</div>
</div>
);
DetailsFormGroup.propTypes = {
hasLabel: PropTypes.bool,
label: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
icon: PropTypes.node,
name: PropTypes.string,
// colWidth: PropTypes.string,
};
DetailsFormGroup.defaultProps = {
hasIcon: false,
hasLabel: false,
label: '',
value: '',
icon: null,
name: '',
// colWidth: '12',
};
export default DetailsFormGroup;
|
docs/app/Examples/modules/Popup/Variations/PopupExampleHideOnScroll.js | clemensw/stardust | import React from 'react'
import { Button, Popup } from 'semantic-ui-react'
const PopupExampleHideOnScroll = () => (
<div>
<Popup
trigger={<Button icon>Click me</Button>}
content='Hide the popup on any scroll event'
on='click'
hideOnScroll
/>
<Popup
trigger={<Button icon>Hover me</Button>}
content='Hide the popup on any scroll event'
hideOnScroll
/>
</div>
)
export default PopupExampleHideOnScroll
|
app/components/FileInput.js | azlyth/redub | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Button } from 'react-bootstrap';
import styles from './FileInput.css';
export default class FileInput extends Component {
static propTypes = {
onChange: PropTypes.func.isRequired,
placeholder: PropTypes.string,
className: PropTypes.string,
forOutput: PropTypes.bool,
accept: PropTypes.string,
};
static defaultProps = {
placeholder: 'Choose file...',
className: null,
forOutput: false,
accept: null,
};
constructor(props) {
super(props);
this.state = { file: undefined };
this.fileChanged = this.fileChanged.bind(this);
}
buttonClasses() {
const buttonClasses = [this.props.className, styles.button];
// Add the fileChosen class if a file was chosen
if (this.state.file !== undefined) {
buttonClasses.push(styles.fileChosen);
}
return classNames(buttonClasses);
}
fileChanged() {
const file = this.fileInput.files[0];
this.props.onChange(file);
// If this component is being used to choose a file for output, clear the
// file input. If we don't, choosing the same file again will result in
// no change (which is incorrect).
if (this.props.forOutput) {
this.fileInput.value = null;
} else {
this.setState({ file });
}
}
render() {
const buttonText = this.state.file === undefined ? this.props.placeholder : this.state.file.name;
return (
<span>
<Button
bsSize="large"
className={this.buttonClasses()}
onClick={() => { this.fileInput.click(); }}
>
{ buttonText }
</Button>
<input
type="file"
accept={this.props.accept}
className={styles.fileInput}
onChange={this.fileChanged}
ref={(e) => { this.fileInput = e; }}
/>
</span>
);
}
}
|
app/javascript/mastodon/components/autosuggest_emoji.js | mimumemo/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
const assetHost = process.env.CDN_HOST || '';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequired,
};
render () {
const { emoji } = this.props;
let url;
if (emoji.custom) {
url = emoji.imageUrl;
} else {
const mapping = unicodeMapping[emoji.native] || unicodeMapping[emoji.native.replace(/\uFE0F$/, '')];
if (!mapping) {
return null;
}
url = `${assetHost}/emoji/${mapping.filename}.svg`;
}
return (
<div className='autosuggest-emoji'>
<img
className='emojione'
src={url}
alt={emoji.native || emoji.colons}
/>
{emoji.colons}
</div>
);
}
}
|
src/js/main.js | mdibaiee/Hawk | import React from 'react';
import ReactDOM from 'react-dom';
import * as ftp from 'api/ftp';
import Root from 'components/root';
import store from 'store';
import { Provider } from 'react-redux';
import './activities';
ftp.connect({
host: '192.168.1.5',
port: 21,
username: 'mahdi',
password: 'heater0!'
}).then(socket => {
window.socket = socket;
window.ftp = ftp;
}, console.error.bind(console))
let wrapper = document.getElementById('wrapper');
ReactDOM.render(<Provider store={store}>
<Root />
</Provider>, wrapper);
|
node_modules/react-icons/md/airplanemode-active.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const MdAirplanemodeActive = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m35 26.6l-13.4-4.1v9.1l3.4 2.5v2.5l-5.9-1.6-5.7 1.6v-2.5l3.2-2.5v-9.1l-13.2 4.1v-3.2l13.2-8.4v-9.1q0-1.1 0.8-1.8t1.7-0.7 1.8 0.7 0.7 1.8v9.1l13.4 8.4v3.2z"/></g>
</Icon>
)
export default MdAirplanemodeActive
|
src/app/components/media/MediaAnalysis.js | meedan/check-web | import React from 'react';
import PropTypes from 'prop-types';
import { createFragmentContainer, graphql } from 'react-relay/compat';
import { FormattedMessage } from 'react-intl';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import Divider from '@material-ui/core/Divider';
import MediaAnalysisField from './MediaAnalysisField';
const MediaAnalysis = ({ projectMedia }) => {
const analysis = projectMedia.last_status_obj;
if (!analysis) {
return null;
}
const getValue = (fieldName) => {
let fieldValue = null;
const fieldObj = analysis.data.fields.find(field => (
field.field_name === fieldName
));
if (fieldObj && fieldObj.value && fieldObj.value !== '') {
fieldValue = fieldObj.value;
}
return fieldValue;
};
const title = getValue('title');
const content = getValue('content');
if ((!title && !content) || title === projectMedia.media.quote) {
return null;
}
return (
<Box id="media__analysis">
<Box my={2}>
<Divider />
</Box>
<Box mt={2} mb={3}>
<Typography variant="body" component="div" paragraph>
<strong>
<FormattedMessage id="mediaAnalysis.analysis" defaultMessage="Analysis" description="Title of the media analysis bar" />
</strong>
{' '}
<FormattedMessage
id="mediaAnalysis.discontinued"
defaultMessage="(Discontinued - {learnMoreLink})"
description="Caption that informs that the analysis feature is deprecated."
values={{
learnMoreLink: (
<a href="https://help.checkmedia.org/en/articles/4471254-analysis-panel" target="_blank" rel="noopener noreferrer">
<FormattedMessage id="mediaAnalysis.learnMore" defaultMessage="Learn more" description="Text that links to an external help article" />
</a>
),
}}
/>
</Typography>
</Box>
<MediaAnalysisField
name="title"
value={title}
label={
<FormattedMessage id="mediaAnalysis.title" defaultMessage="Title" description="Label for the analysis title field" />
}
/>
<MediaAnalysisField
name="content"
value={content}
label={
<FormattedMessage id="mediaAnalysis.content" defaultMessage="Content" description="Label for the analysis content field" />
}
/>
</Box>
);
};
MediaAnalysis.defaultProps = {
projectMedia: { last_status_obj: null },
};
MediaAnalysis.propTypes = {
projectMedia: PropTypes.shape({
last_status_obj: PropTypes.object,
media: PropTypes.shape({
quote: PropTypes.string,
}).isRequired,
}),
};
export default createFragmentContainer(MediaAnalysis, graphql`
fragment MediaAnalysis_projectMedia on ProjectMedia {
last_status_obj {
data
}
media {
quote
}
}
`);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.