text
stringlengths 2
1.05M
|
|---|
const cluePauseTime = 333; //how long to pause in between clues
const nextClueWaitTime = 1000; //how long to wait before starting playback of the clue sequence
// global constants
const clueHoldTime = 1000; //how long to hold each clue's light/sound
//Global Variables
var pattern = [2, 2, 4, 3, 5, 1, 2, 4];
var progress = 0;
var gamePlaying = false;
var tonePlaying = false;
var volume = 0.5; //must be between 0.0 and 1.0
var guessCounter = 0;
function startGame(){
//initialize game variables
progress = 0;
gamePlaying = true;
// swap the Start and Stop buttons
document.getElementById("startBtn").classList.add("hidden");
document.getElementById("stopBtn").classList.remove("hidden");
playClueSequence()
}
function stopGame(){
gamePlaying = false;
// swap the Start and Stop buttons
document.getElementById("startBtn").classList.remove("hidden");
document.getElementById("stopBtn").classList.add("hidden");
}
// Sound Synthesis Functions
const freqMap = {
1: 200,
2: 300,
3: 400,
4: 500,
5: 600
}
function playTone(btn,len){
o.frequency.value = freqMap[btn]
g.gain.setTargetAtTime(volume,context.currentTime + 0.05,0.025)
tonePlaying = true
setTimeout(function(){
stopTone()
},len)
}
function startTone(btn){
if(!tonePlaying){
o.frequency.value = freqMap[btn]
g.gain.setTargetAtTime(volume,context.currentTime + 0.05,0.025)
tonePlaying = true
}
}
function stopTone(){
g.gain.setTargetAtTime(0,context.currentTime + 0.05,0.025)
tonePlaying = false
}
//Page Initialization
// Init Sound Synthesizer
var context = new AudioContext()
var o = context.createOscillator()
var g = context.createGain()
g.connect(context.destination)
g.gain.setValueAtTime(0,context.currentTime)
o.connect(g)
o.start(0)
function lightButton(btn){
document.getElementById("button"+btn).classList.add("lit")
}
function clearButton(btn){
document.getElementById("button"+btn).classList.remove("lit")
}
function playSingleClue(btn){
if(gamePlaying){
lightButton(btn);
playTone(btn,clueHoldTime);
setTimeout(clearButton,clueHoldTime,btn);
}
}
function playClueSequence(){
guessCounter = 0;
let delay = nextClueWaitTime; //set delay to initial wait time
for(let i=0;i<=progress;i++){ // for each clue that is revealed so far
console.log("play single clue: " + pattern[i] + " in " + delay + "ms")
setTimeout(playSingleClue,delay,pattern[i]) // set a timeout to play that clue
delay += clueHoldTime
delay += cluePauseTime;
}
}
function loseGame(){
stopGame();
alert("Game Over. You lost.");
}
function winGame(){
stopGame();
alert("Game Over. You won!");
}
function guess(btn){
console.log("user guessed: " + btn);
if(!gamePlaying){
return;
}
if(pattern[guessCounter] == btn){
//Guess was correct!
if(guessCounter == progress){
if(progress == pattern.length - 1){
//GAME OVER: WIN!
winGame();
}else{
//Pattern correct. Add next segment
progress++;
playClueSequence();
}
}else{
//so far so good... check the next guess
guessCounter++;
}
}else{
//Guess was incorrect
//GAME OVER: LOSE!
loseGame();
}
}
|
'use strict';
module.exports = {
db: 'mongodb://localhost/copperpitch-test',
port: 3001,
app: {
title: 'copperPitch - Test Environment'
},
facebook: {
clientID: process.env.FACEBOOK_ID || 'APP_ID',
clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/facebook/callback'
},
twitter: {
clientID: process.env.TWITTER_KEY || 'CONSUMER_KEY',
clientSecret: process.env.TWITTER_SECRET || 'CONSUMER_SECRET',
callbackURL: 'http://localhost:3000/auth/twitter/callback'
},
google: {
clientID: process.env.GOOGLE_ID || 'APP_ID',
clientSecret: process.env.GOOGLE_SECRET || 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/google/callback'
},
linkedin: {
clientID: process.env.LINKEDIN_ID || 'APP_ID',
clientSecret: process.env.LINKEDIN_SECRET || 'APP_SECRET',
callbackURL: 'http://localhost:3000/auth/linkedin/callback'
}
};
|
/**
* @license Apache-2.0
*
* Copyright (c) 2019 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
// MODULES //
var bench = require( '@stdlib/bench' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var isIteratorLike = require( '@stdlib/assert/is-iterator-like' );
var randu = require( '@stdlib/random/iter/randu' );
var pkg = require( './../package.json' ).name;
var itercumin = require( './../lib' );
// MAIN //
bench( pkg, function benchmark( b ) {
var rand;
var iter;
var i;
rand = randu();
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
iter = itercumin( rand );
if ( typeof iter !== 'object' ) {
b.fail( 'should return an object' );
}
}
b.toc();
if ( !isIteratorLike( iter ) ) {
b.fail( 'should return an iterator protocol-compliant object' );
}
b.pass( 'benchmark finished' );
b.end();
});
bench( pkg+'::iteration', function benchmark( b ) {
var iter;
var rand;
var v;
var i;
rand = randu();
iter = itercumin( rand );
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
v = iter.next().value;
if ( isnan( v ) ) {
b.fail( 'should not return NaN' );
}
}
b.toc();
if ( isnan( v ) ) {
b.fail( 'should not return NaN' );
}
b.pass( 'benchmark finished' );
b.end();
});
|
export default function (fn) {
return typeof fn === 'function'
}
|
export * from './Footer';
export * from './AppBar';
|
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
require('dotenv').config({ path: './.env' });
module.exports = {
/* Your site config here */
siteMetadata: {
title: 'Full-Stack Bootcamp',
author: 'Paul Tobin'
},
plugins: [
{
resolve: 'gatsby-source-contentful',
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN
}
},
`gatsby-plugin-sass`,
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'src',
path: `${__dirname}/src/`
}
},
'gatsby-plugin-sharp',
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
'gatsby-remark-relative-images',
{
resolve: 'gatsby-remark-images',
options: {
maxWidth: 750,
linkImagesToOriginal: false
}
}
]
}
}
]
};
|
module.exports = new Date(2000, 4, 5)
|
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codemirror', 'mn', {
toolbar: 'Код',
searchCode: 'Search Source',
autoFormat: 'Format Selection',
commentSelectedRange: 'Comment Selection',
uncommentSelectedRange: 'Uncomment Selection',
autoCompleteToggle: 'Enable/Disable HTML Tag Autocomplete'
});
|
function gloomyAjaxUpdater()
{
var url = arguments[0];
var div = arguments[1];
var options = arguments[2] || {};
var spinner = options['spinner'] || null;
var onsuccess = options['onsuccess'] || function() {};
var type = options['type'] || 'get';
var data = options['data'] || null;
$(spinner).show();
$.ajax({
url: url,
cache: false,
type: type,
data: data,
success: function (html) {
$(div).html(html);
$(spinner).hide();
onsuccess();
},
error: function () {
$(spinner).hide();
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
});
return ( false );
};
// TODO : a fusionner avec la fonction gloomyAjaxUpdater() ??
function gloomyAjaxUpdaterDialog()
{
var url = arguments[0];
var dialog = arguments[1];
var options = arguments[2] || {};
var spinner = options['spinner'] || null;
var onsuccess = options['onsuccess'] || function() {};
$(spinner).show();
$.ajax({
url: url,
cache: false,
success: function (html) {
$(dialog).html(html);
$(spinner).hide();
onsuccess();
$(dialog).dialog('open');
},
error: function () {
$(spinner).hide();
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
});
return ( false );
}
// jQuery-ui Dialog
function gloomyAjaxDialogAction()
{
var dialog = arguments[0];
var options = arguments[1] || {};
var form = options['form'] || $(dialog).find('form:first');
var spinner = options['spinner'] || null;
var onsuccess = options['onsuccess'] || function() {};
var onformerror = options['onformerror'] || function() {};
$(spinner).show();
$.ajax({type: 'POST',
url: $(form).attr('action'),
data: $(form).serializeArray(),
success: function (data, textStatus, jqXHR) {
$(spinner).hide();
// La réponse est du JSON
if (typeof(data) == 'object' && jqXHR.getResponseHeader( "content-type" ).indexOf('json') != -1) {
try {
if (data['success']) {
$(dialog).dialog( "close" );
onsuccess();
$.jGrowl(data['message'], {theme: 'success'});
}
else {
$.jGrowl(data['message'], {theme: 'error'});
}
}
catch (e) {
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
}
else {
$.jGrowl('Le formulaire comporte des erreurs', {theme: 'warning'});
$(dialog).html(data);
onformerror();
}
},
error: function () {
$(spinner).hide();
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
});
return ( false );
}
// Twitter Bootstrap Modal
function gloomyAjaxModalAction()
{
var modal = arguments[0];
var options = arguments[1] || {};
var form = options['form'] || $(modal).find('form:first');
var spinner = options['spinner'] || null;
var onsuccess = options['onsuccess'] || function() {};
var onformerror = options['onformerror'] || function() {};
var body = options['body'] || $(modal).find('.modal-body:first');
$(spinner).show();
$.ajax({type: 'POST',
url: $(form).attr('action'),
data: $(form).serializeArray(),
success: function (data, textStatus, jqXHR) {
$(spinner).hide();
// La réponse est du JSON
if (typeof(data) == 'object' && jqXHR.getResponseHeader( "content-type" ).indexOf('json') != -1) {
try {
if (data['success']) {
$(modal).modal( "hide" );
onsuccess();
$.jGrowl(data['message'], {theme: 'success'});
}
else {
$.jGrowl(data['message'], {theme: 'error'});
}
}
catch (e) {
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
}
else {
$.jGrowl('Le formulaire comporte des erreurs', {theme: 'warning'});
$(body).html(data);
onformerror();
}
},
error: function () {
$(spinner).hide();
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
});
return ( false );
}
function gloomyAjaxAction()
{
var url = arguments[0];
var options = arguments[1] || {};
var spinner = options['spinner'] || null;
var onsuccess = options['onsuccess'] || function() {};
var type = options['type'] || 'get';
var data = options['data'] || null;
$(spinner).show();
$.ajax({ url: url,
type: type,
data: data,
success: function (data) { // La réponse est normalement toujours en JSON
$(spinner).hide();
if (data['success']) {
onsuccess();
$.jGrowl(data['message'], {theme: 'success'});
}
else {
$.jGrowl(data['message'], {theme: 'error'});
}
},
error: function () {
$(spinner).hide();
$.jGrowl('Une erreur est survenue', {theme: 'error'});
}
});
return ( false );
}
function gloomyFormURL(form)
{
return $(form).attr('action')+'&'+$(form).serialize();
}
|
define("dojox/av/FLVideo", ['dojo', 'dijit', 'dijit/_Widget', 'dojox/embed/Flash', 'dojox/av/_Media'],
function(dojo, dijit, _Widget, Flash, _Media){
dojo.experimental("dojox.av.FLVideo");
return dojo.declare("dojox.av.FLVideo", [_Widget, _Media], {
// summary:
// Inserts a Flash FLV video into the HTML page and provides methods
// and events for controlling the video. Also plays the H264/M4V codec
// with a little trickery: change the '.M4V' extension to '.flv'.
// example:
// markup:
// | <div id="vid" initialVolume=".7",
// | mediaUrl="../resources/Grog.flv"
// | dojoType="dojox.av.FLVideo"></div>
// example:
// programmatic:
// | new dojox.av.FLVideo({
// | initialVolume:.7,
// | mediaUrl:"../resources/Grog.flv"
// | }, "vid");
// mediaUrl: String
// REQUIRED: The Url of the video file that will be played.
// NOTE: Must be either an absolute URL or relative to the HTML file.
// Relative paths will be converted to absolute paths
// _swfPath: Uri
// The path to the video player SWF resource
_swfPath: dojo.moduleUrl("dojox.av", "resources/video.swf"),
constructor: function(/*Object*/options){
// Provide this function for the SWF to ensure that the it is playing
// in HTML.
dojo.global.swfIsInHTML = function(){ return true; }
},
postCreate: function(){
// summary:
// Initialize the media.
this._subs = [];
this._cons = [];
this.mediaUrl = this._normalizeUrl(this.mediaUrl);
this.initialVolume = this._normalizeVolume(this.initialVolume);
var args = {
path:this._swfPath,
width:"100%",
height:"100%",
minimumVersion:9,
expressInstall:true,
params:{
allowFullScreen: this.allowFullScreen,
wmode:this.wmode,
allowScriptAccess:this.allowScriptAccess,
allowNetworking:this.allowNetworking
},
// only pass in simple variables - no deep objects
vars:{
videoUrl:this.mediaUrl,
id:this.id,
autoPlay:this.autoPlay,
volume:this.initialVolume,
isDebug:this.isDebug
}
};
// Setting up dojo.subscribes that listens to events
// from the player
this._sub("stageClick", "onClick");
this._sub("stageSized", "onSwfSized");
this._sub("mediaStatus", "onPlayerStatus");
this._sub("mediaMeta", "onMetaData");
this._sub("mediaError", "onError");
this._sub("mediaStart", "onStart");
this._sub("mediaEnd", "onEnd");
this._flashObject = new dojox.embed.Flash(args, this.domNode);
this._flashObject.onError = function(err){
console.error("Flash Error:", err);
};
this._flashObject.onLoad = dojo.hitch(this, function(mov){
this.flashMedia = mov;
this.isPlaying = this.autoPlay;
this.isStopped = !this.autoPlay;
this.onLoad(this.flashMedia);
this._initStatus();
this._update();
});
this.inherited(arguments);
},
// ============================= //
// Methods to control the player //
// ============================= //
play: function(/* String? */newUrl){
// summary:
// Plays the video. If an url is passed in, plays the new link.
this.isPlaying = true;
this.isStopped = false;
this.flashMedia.doPlay(this._normalizeUrl(newUrl));
},
pause: function(){
// summary:
// Pauses the video
this.isPlaying = false;
this.isStopped = false;
if(this.onPaused){
this.onPaused();
}
this.flashMedia.pause();
},
seek: function(/* Float */ time ){
// summary:
// Goes to the time passed in the argument
this.flashMedia.seek(time);
},
// ===================== //
// Player Getter/Setters //
// ===================== //
volume: function(/* Float */ vol){
// summary:
// Sets the volume of the video to the time in the
// vol:
// between 0 - 1.
if(vol){
if(!this.flashMedia) {
this.initialVolume = vol;
}
this.flashMedia.setVolume(this._normalizeVolume(vol));
}
if(!this.flashMedia || !this.flashMedia.doGetVolume) {
return this.initialVolume;
}
return this.flashMedia.getVolume(); // Float
},
// ============= //
// Player Events //
// ============= //
/*=====
onLoad: function(mov){
// summary:
// Fired when the SWF player has loaded
// NOT when the video has loaded
},
onDownloaded: function(percent){
// summary:
// Fires the amount of that the media has been
// downloaded. Number, 0-100
},
onClick: function(evt){
// summary:
// Fires when the player is clicked
// Could be used to toggle play/pause, or
// do an external activity, like opening a new
// window.
},
onSwfSized: function(data){
// summary:
// Fired on SWF resize, or when its
// toggled between fullscreen.
},
onMetaData: function(data, evt){
// summary:
// The video properties. Width, height, duration, etc.
//
// NOTE: if data is empty, this is an older FLV with no meta data.
// Duration cannot be determined. In original FLVs, duration
// could only be obtained with Flash Media Server.
//
// NOTE: Older FLVs can still return width and height
// and will do so on a second event call
},
onPosition: function( time){
// summary:
// The position of the playhead in seconds
},
onStart: function( data){
// summary:
// Fires when video starts
// Good for setting the play button to pause
// during an autoPlay for example
},
onPlay: function(data){
// summary:
// Fires when video starts and resumes
},
onPause: function(data){
// summary:
// Fires when the pause button is clicked
},
onEnd: function(data){
// summary:
// Fires when video ends
// Could be used to change pause button to play
// or show a post video graphic, like YouTube
},
onStop: function(){
// summary:
// Fire when the Stop button is clicked
// TODO: This is not hooked up yet and shouldn't
// fire.
},
onBuffer: function(isBuffering){
// summary:
// Fires a boolean to tell if media
// is paused for buffering or if buffering
// has finished
this.isBuffering = isBuffering;
},
onError: function(data, url){
// summary:
// Fired when the player encounters an error
// example:
// | console.warn("ERROR-"+data.type.toUpperCase()+":",
// | data.info.code, " - URL:", url);
},
onStatus: function(data){
// summary:
// Simple status
},
onPlayerStatus: function(data){
// summary:
// The status of the video from the SWF
// playing, stopped, bufering, etc.
},
onResize: function(){
// summary:
// Fired on page resize
},
=====*/
// =============== //
// Private Methods //
// =============== //
_checkBuffer: function(/* Float */time, /* Float */bufferLength){
// summary:
// Checks that there is a proper buffer time between
// current playhead time and the amount of data loaded.
// Works only on FLVs with a duration (not older). Pauses
// the video while continuing download.
if(this.percentDownloaded == 100){
if(this.isBuffering){
this.onBuffer(false);
this.flashMedia.doPlay();
}
return;
}
if(!this.isBuffering && bufferLength<.1){
this.onBuffer(true);
this.flashMedia.pause();
return;
}
var timePercentLoad = this.percentDownloaded*.01*this.duration;
// check if start buffer needed
if(!this.isBuffering && time+this.minBufferTime*.001>timePercentLoad){
this.onBuffer(true);
this.flashMedia.pause();
// check if end buffer needed
}else if(this.isBuffering && time+this.bufferTime*.001<=timePercentLoad){
this.onBuffer(false);
this.flashMedia.doPlay();
}
},
_update: function(){
// summary:
// Helper function to fire onPosition, check download progress,
// and check buffer.
var time = Math.min(this.getTime() || 0, this.duration);
var dObj = this.flashMedia.getLoaded();
this.percentDownloaded = Math.ceil(dObj.bytesLoaded/dObj.bytesTotal*100);
this.onDownloaded(this.percentDownloaded);
this.onPosition(time);
if(this.duration){
this._checkBuffer(time, dObj.buffer);
}
// FIXME: need to remove this on destroy
this._updateHandle = setTimeout(dojo.hitch(this, "_update"), this.updateTime);
},
destroy: function(){
clearTimeout(this._updateHandle);
dojo.disconnect(this._positionHandle);
this.inherited(arguments);
}
});
});
|
const _tmpl$ = document.createElement("template");
var _el$ = _tmpl$.content.firstChild.cloneNode(true);
_r$.attr(
_el$,
"className",
false,
computed(function() {
return classNames(
{
editing: editing(),
completed: completed()
},
highlight()
);
})
);
_el$;
_tmpl$.innerHTML = "<div>test</div>";
|
// Generated by purs version 0.11.7
"use strict";
var CSS_ListStyle_Image = require("../CSS.ListStyle.Image");
var CSS_ListStyle_Position = require("../CSS.ListStyle.Position");
var CSS_ListStyle_Type = require("../CSS.ListStyle.Type");
var CSS_Property = require("../CSS.Property");
var CSS_String = require("../CSS.String");
var CSS_Stylesheet = require("../CSS.Stylesheet");
var Data_Tuple_Nested = require("../Data.Tuple.Nested");
var ListStyle = (function () {
function ListStyle(value0, value1, value2) {
this.value0 = value0;
this.value1 = value1;
this.value2 = value2;
};
ListStyle.create = function (value0) {
return function (value1) {
return function (value2) {
return new ListStyle(value0, value1, value2);
};
};
};
return ListStyle;
})();
var valueListStyle = new CSS_Property.Val(function (v) {
return CSS_Property.value(CSS_Property.valTuple(CSS_ListStyle_Type.valListStyleType)(CSS_Property.valTuple(CSS_ListStyle_Position.valListStylePosition)(CSS_Property.valTuple(CSS_ListStyle_Image.valListStyleImage)(CSS_Property.valUnit))))(Data_Tuple_Nested.tuple3(v.value0)(v.value1)(v.value2));
});
var listStyle = function (t) {
return function (p) {
return function (i) {
return CSS_Stylesheet.key(valueListStyle)(CSS_String.fromString(CSS_Property.isStringKey)("list-style"))(new ListStyle(t, p, i));
};
};
};
module.exports = {
ListStyle: ListStyle,
listStyle: listStyle,
valueListStyle: valueListStyle
};
|
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[40],{
/***/ "./node_modules/@ionic/core/dist/esm/es5/build/chunk-6d7d2f8c.js":
/*!***********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/es5/build/chunk-6d7d2f8c.js ***!
\***********************************************************************/
/*! exports provided: a, b, c, d, e, f, g, h, i, j, k */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rIC; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return now; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return hasShadowDom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findItemLabel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return renderHiddenInput; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return debounceEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isEndSide; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return assert; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return clamp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return debounce; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return pointerCoord; });
function rIC(e){"requestIdleCallback"in window?window.requestIdleCallback(e):setTimeout(e,32)}function hasShadowDom(e){return!!e.shadowRoot&&!!e.attachShadow}function findItemLabel(e){var n=e.closest("ion-item");return n?n.querySelector("ion-label"):null}function renderHiddenInput(e,n,t,a,r){if(e||hasShadowDom(n)){var o=n.querySelector("input.aux-input");o||((o=n.ownerDocument.createElement("input")).type="hidden",o.classList.add("aux-input"),n.appendChild(o)),o.disabled=r,o.name=t,o.value=a||""}}function clamp(e,n,t){return Math.max(e,Math.min(n,t))}function assert(e,n){if(!e){var t="ASSERT: "+n;throw console.error(t),new Error(t)}}function now(e){return e.timeStamp||Date.now()}function pointerCoord(e){if(e){var n=e.changedTouches;if(n&&n.length>0){var t=n[0];return{x:t.clientX,y:t.clientY}}if(void 0!==e.pageX)return{x:e.pageX,y:e.pageY}}return{x:0,y:0}}function isEndSide(e,n){var t="rtl"===e.document.dir;switch(n){case"start":return t;case"end":return!t;default:throw new Error('"'+n+'" is not a valid value for [side]. Use "start" or "end" instead.')}}function debounceEvent(e,n){var t=e._original||e;return{_original:e,emit:debounce(t.emit.bind(t),n)}}function debounce(e,n){var t;return void 0===n&&(n=0),function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];clearTimeout(t),t=setTimeout.apply(void 0,[e,n].concat(a))}}
/***/ }),
/***/ "./node_modules/@ionic/core/dist/esm/es5/build/chunk-7c632336.js":
/*!***********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/es5/build/chunk-7c632336.js ***!
\***********************************************************************/
/*! exports provided: a, b, c, d, e */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getClassMap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return openURL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createColorClasses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hostContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return createThemedClasses; });
/* harmony import */ var _polyfills_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../polyfills/tslib.js */ "./node_modules/@ionic/core/dist/esm/es5/polyfills/tslib.js");
function hostContext(t,e){return null!==e.closest(t)}function createColorClasses(t){var e;return"string"==typeof t&&t.length>0?((e={"ion-color":!0})["ion-color-"+t]=!0,e):void 0}function createThemedClasses(t,e){var r;return(r={})[e]=!0,r[e+"-"+t]=void 0!==t,r}function getClassList(t){return void 0!==t?(Array.isArray(t)?t:t.split(" ")).filter(function(t){return null!=t}).map(function(t){return t.trim()}).filter(function(t){return""!==t}):[]}function getClassMap(t){var e={};return getClassList(t).forEach(function(t){return e[t]=!0}),e}var SCHEME=/^[a-z][a-z0-9+\-.]*:/;function openURL(t,e,r,n){return _polyfills_tslib_js__WEBPACK_IMPORTED_MODULE_0__["__awaiter"](this,void 0,void 0,function(){var s;return _polyfills_tslib_js__WEBPACK_IMPORTED_MODULE_0__["__generator"](this,function(o){switch(o.label){case 0:return null==e||"#"===e[0]||SCHEME.test(e)?[3,2]:(s=t.document.querySelector("ion-router"))?(null!=r&&r.preventDefault(),[4,s.componentOnReady()]):[3,2];case 1:return o.sent(),[2,s.push(e,n)];case 2:return[2,!1]}})})}
/***/ }),
/***/ "./node_modules/@ionic/core/dist/esm/es5/build/odqmlmdd.entry.js":
/*!***********************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/es5/build/odqmlmdd.entry.js ***!
\***********************************************************************/
/*! exports provided: IonTextarea */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IonTextarea", function() { return Textarea; });
/* harmony import */ var _ionic_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ionic.core.js */ "./node_modules/@ionic/core/dist/esm/es5/ionic.core.js");
/* harmony import */ var _chunk_7c632336_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-7c632336.js */ "./node_modules/@ionic/core/dist/esm/es5/build/chunk-7c632336.js");
/* harmony import */ var _chunk_6d7d2f8c_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-6d7d2f8c.js */ "./node_modules/@ionic/core/dist/esm/es5/build/chunk-6d7d2f8c.js");
var Textarea=function(){function e(){var e=this;this.inputId="ion-input-"+textareaIds++,this.didBlurAfterEdit=!1,this.hasFocus=!1,this.autocapitalize="none",this.autofocus=!1,this.clearOnEdit=!1,this.debounce=0,this.disabled=!1,this.name=this.inputId,this.readonly=!1,this.required=!1,this.spellcheck=!1,this.value="",this.onInput=function(t){e.nativeInput&&(e.value=e.nativeInput.value),e.emitStyle(),e.ionInput.emit(t)},this.onFocus=function(){e.hasFocus=!0,e.focusChange(),e.ionFocus.emit()},this.onBlur=function(){e.hasFocus=!1,e.focusChange(),e.ionBlur.emit()},this.onKeyDown=function(){e.checkClearOnEdit()}}return e.prototype.debounceChanged=function(){this.ionChange=Object(_chunk_6d7d2f8c_js__WEBPACK_IMPORTED_MODULE_2__["f"])(this.ionChange,this.debounce)},e.prototype.disabledChanged=function(){this.emitStyle()},e.prototype.valueChanged=function(){var e=this.nativeInput,t=this.getValue();e&&e.value!==t&&(e.value=t),this.ionChange.emit({value:t})},e.prototype.componentWillLoad=function(){this.emitStyle()},e.prototype.componentDidLoad=function(){this.debounceChanged()},e.prototype.setFocus=function(){this.nativeInput&&this.nativeInput.focus()},e.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)},e.prototype.emitStyle=function(){this.ionStyle.emit({interactive:!0,textarea:!0,input:!0,"interactive-disabled":this.disabled,"has-placeholder":null!=this.placeholder,"has-value":this.hasValue(),"has-focus":this.hasFocus})},e.prototype.checkClearOnEdit=function(){this.clearOnEdit&&(this.didBlurAfterEdit&&this.hasValue()&&(this.value=""),this.didBlurAfterEdit=!1)},e.prototype.focusChange=function(){this.clearOnEdit&&!this.hasFocus&&this.hasValue()&&(this.didBlurAfterEdit=!0),this.emitStyle()},e.prototype.hasValue=function(){return""!==this.getValue()},e.prototype.getValue=function(){return this.value||""},e.prototype.hostData=function(){return{"aria-disabled":this.disabled?"true":null,class:Object(_chunk_7c632336_js__WEBPACK_IMPORTED_MODULE_1__["c"])(this.color)}},e.prototype.render=function(){var e=this,t=this.getValue(),n=this.inputId+"-lbl",a=Object(_chunk_6d7d2f8c_js__WEBPACK_IMPORTED_MODULE_2__["d"])(this.el);return a&&(a.id=n),Object(_ionic_core_js__WEBPACK_IMPORTED_MODULE_0__["h"])("textarea",{class:"native-textarea",ref:function(t){return e.nativeInput=t},autoCapitalize:this.autocapitalize,autoFocus:this.autofocus,disabled:this.disabled,maxLength:this.maxlength,minLength:this.minlength,name:this.name,placeholder:this.placeholder||"",readOnly:this.readonly,required:this.required,spellCheck:this.spellcheck,cols:this.cols,rows:this.rows,wrap:this.wrap,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown},t)},Object.defineProperty(e,"is",{get:function(){return"ion-textarea"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"scoped"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{autocapitalize:{type:String,attr:"autocapitalize"},autofocus:{type:Boolean,attr:"autofocus"},clearOnEdit:{type:Boolean,attr:"clear-on-edit",mutable:!0},color:{type:String,attr:"color"},cols:{type:Number,attr:"cols"},debounce:{type:Number,attr:"debounce",watchCallbacks:["debounceChanged"]},disabled:{type:Boolean,attr:"disabled",watchCallbacks:["disabledChanged"]},el:{elementRef:!0},getInputElement:{method:!0},hasFocus:{state:!0},maxlength:{type:Number,attr:"maxlength"},minlength:{type:Number,attr:"minlength"},mode:{type:String,attr:"mode"},name:{type:String,attr:"name"},placeholder:{type:String,attr:"placeholder"},readonly:{type:Boolean,attr:"readonly"},required:{type:Boolean,attr:"required"},rows:{type:Number,attr:"rows"},setFocus:{method:!0},spellcheck:{type:Boolean,attr:"spellcheck"},value:{type:String,attr:"value",mutable:!0,watchCallbacks:["valueChanged"]},wrap:{type:String,attr:"wrap"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"events",{get:function(){return[{name:"ionChange",method:"ionChange",bubbles:!0,cancelable:!0,composed:!0},{name:"ionInput",method:"ionInput",bubbles:!0,cancelable:!0,composed:!0},{name:"ionStyle",method:"ionStyle",bubbles:!0,cancelable:!0,composed:!0},{name:"ionBlur",method:"ionBlur",bubbles:!0,cancelable:!0,composed:!0},{name:"ionFocus",method:"ionFocus",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;-ms-flex:1;flex:1;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:var(--background);color:var(--color);font-family:var(--ion-font-family,inherit);z-index:2}.ion-color.sc-ion-textarea-md-h{background:initial;color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h, ion-item .sc-ion-textarea-md-h{position:static}ion-item.sc-ion-textarea-md-h:not(.item-label), ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.native-textarea.sc-ion-textarea-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:block;width:100%;height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;white-space:pre-wrap}\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.native-textarea.sc-ion-textarea-md{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea.sc-ion-textarea-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:.4}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;font-size:inherit}.item-label-floating.sc-ion-textarea-md-h, .item-label-floating .sc-ion-textarea-md-h, .item-label-stacked.sc-ion-textarea-md-h, .item-label-stacked .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"styleMode",{get:function(){return"md"},enumerable:!0,configurable:!0}),e}(),textareaIds=0;
/***/ }),
/***/ "./node_modules/@ionic/core/dist/esm/es5/polyfills/tslib.js":
/*!******************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/es5/polyfills/tslib.js ***!
\******************************************************************/
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __makeTemplateObject, __importStar, __importDefault */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
// REV: 9dd9aa322c893e5e0b3f1609b1126314ccf37bbb
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
}
return __assign.apply(this, arguments);
}
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
t[p[i]] = s[p[i]];
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
function __exportStar(m, exports) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
function __importStar(mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result.default = mod;
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
/***/ })
}]);
//# sourceMappingURL=40.js.map
|
import { Vue } from '../../vue'
import { NAME_POPOVER } from '../../constants/components'
import { EVENT_NAME_CLICK } from '../../constants/events'
import { PROP_TYPE_ARRAY_STRING, PROP_TYPE_STRING } from '../../constants/props'
import { SLOT_NAME_TITLE } from '../../constants/slots'
import { makeProp, makePropsConfigurable } from '../../utils/props'
import { BTooltip, props as BTooltipProps } from '../tooltip/tooltip'
import { BVPopover } from './helpers/bv-popover'
import { sortKeys } from '../../utils/object'
// --- Props ---
export const props = makePropsConfigurable(
sortKeys({
...BTooltipProps,
content: makeProp(PROP_TYPE_STRING),
placement: makeProp(PROP_TYPE_STRING, 'right'),
triggers: makeProp(PROP_TYPE_ARRAY_STRING, EVENT_NAME_CLICK)
}),
NAME_POPOVER
)
// --- Main component ---
// @vue/component
export const BPopover = /*#__PURE__*/ Vue.extend({
name: NAME_POPOVER,
extends: BTooltip,
inheritAttrs: false,
props,
methods: {
getComponent() {
// Overridden by BPopover
return BVPopover
},
updateContent() {
// Tooltip: Default slot is `title`
// Popover: Default slot is `content`, `title` slot is title
// We pass a scoped slot function references by default (Vue v2.6x)
// And pass the title prop as a fallback
this.setContent(this.normalizeSlot() || this.content)
this.setTitle(this.normalizeSlot(SLOT_NAME_TITLE) || this.title)
}
}
// Render function provided by BTooltip
})
|
module.exports = {
SECRET: "abhimanyu",
TokenExpiresIn: "365d",
userRegisterAmount: 200,
vendorRegisterAmount: 200,
minVendorDistance: 10000,
vendorReachPercent: 10,
driverReachPercent: 10,
driverAcceptBooking: 5,
driverPerKmPrice: 5,
userPerKmPrice: 10,
RP_API_Key: "5b7d3cc6c080e",
RP_SENDER_ID: "HZCART",
baseUrl: "http://45.120.149.33:3080/",
vendorAppointedTitle: "vendor appointed",
vendorAppointedBody: "vendor appointed",
driverAppointedTitle: "driver appointed",
driverAppointedBody: "driver appointed",
driverNewbookingTitle: "new booking",
driverNewbookingBody: "new booking",
vendorCreditsBuyTitle: "credit buy",
vendorCreditsBuyBody: "credit buy",
driverCreditsBuyTitle: "credit buy",
driverCreditsBuyBody: "credit buy",
driverAssigntoUserTitle: "driver assiged",
driverAssigntoUserBody: "driver assiged",
driverAssignTitle: "driver assiged",
driverAssignBody: "driver assiged",
driveStarttoUserTitle: "driver start",
driveStarttoUserBody: "Service worker is on the way OTP for worker is",
driveStartTitle: "driver start",
driveStartBody: "Service worker is on the way",
driverStarttoUserTitle: "driver start",
driverStarttoUserBody: "driver is on the way OTP for worker is",
driverStartTitle: "driver start",
driverStartBody: "driver is on the way",
driveReachedtoUserTitle: "Service worker is at your doorstap",
driveReachedtoUserBody: "Service worker is at your doorstap",
driveReachedTitle: "Service worker is at your doorstap",
driveReachedBody: "Service worker is at your doorstap",
driverReachedtoUserTitle: "driver is at your doorstap",
driverReachedtoUserBody: "driver is at your doorstap",
driverReachedTitle: "driver is at your doorstap",
driverReachedBody: "driver is at your doorstap",
serviceStarttoUserTitle: "Service Stared",
serviceStarttoUserBody:
"Leave rest on us, just give this OTP at the end of service ",
serviceStartTitle: "Service Stared",
serviceStartBody: "Service Stared",
serviceDonetoUserTitle: "Service Stared",
serviceDonetoUserBody:
"Leave rest on us, just give this OTP at the end of service ",
serviceDoneTitle: "serviceDoneTitle",
serviceDoneBody: "serviceDoneBody",
rideStarttoUserTitle: "ride Stared",
rideStarttoUserBody:
"Leave rest on us, just give this OTP at the end of ride ",
rideStartTitle: "ride Stared",
rideStartBody: "ride Stared",
rideDonetoUserTitle: "ride Stared",
rideDonetoUserBody:
"Leave rest on us, just give this OTP at the end of ride ",
rideDoneTitle: "rideDoneTitle",
rideDoneBody: "rideDoneBody",
userReviewTitle: "Service Stared"
};
|
const User = require('../models/user');
var jwt = require('jsonwebtoken');
var config = require('../configs/config');
const crypto = require('../logic/crypto');
async function login(req, res, next) {
User.find({ username: req.body.username}, async function (err, users) {
if (err) {
res.status(500).send('Oops, an error ocurred');
}
if (users.length == 1) {
var passwordMatches = await crypto.comparePassword(users[0].password, req.body.password);
if(passwordMatches) {
const payload = {
user: req.body.user
};
const token = jwt.sign(payload, config.key, {
expiresIn: 1440
});
res.status(200).json({token: token});
} else {
res.status(403).json({message: "invalid credentials"});
}
} else {
res.status(403).json({message: "invalid credentials"});
}
})
}
module.exports = {login}
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export function startsWith(haystack, needle) {
if (haystack.length < needle.length) {
return false;
}
for (var i = 0; i < needle.length; i++) {
if (haystack[i] !== needle[i]) {
return false;
}
}
return true;
}
/**
* Determines if haystack ends with needle.
*/
export function endsWith(haystack, needle) {
var diff = haystack.length - needle.length;
if (diff > 0) {
return haystack.lastIndexOf(needle) === diff;
}
else if (diff === 0) {
return haystack === needle;
}
else {
return false;
}
}
export function convertSimple2RegExpPattern(pattern) {
return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
}
export function repeat(value, count) {
var s = '';
while (count > 0) {
if ((count & 1) === 1) {
s += value;
}
value += value;
count = count >>> 1;
}
return s;
}
|
const logout = async () => {
const response = await fetch('/api/users/logout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
});
if (response.ok) {
document.location.replace('/');
} else {
alert(response.statusText);
}
};
document.querySelector('#logout').addEventListener('click', logout);
|
export { default as Base } from './Base'
export { default as Button } from './Button'
export { default as Card } from './Card'
export { default as Container } from './Container'
export { default as Heading } from './Heading'
export { default as Input } from './Input'
export { default as Link } from './Link'
export { default as Text } from './Text'
|
import { NotImplementedError } from "../extensions/index.js";
/**
* Implement chainMaker object according to task description
*
*/
export default {
chain: "",
values: [],
getLength() {
return this.values.length;
},
addLink(value = "") {
if (this.values.length === 0) this.chain = `( ${value} )`;
else this.chain += `~~( ${value} )`;
this.values.push(` ${value} `);
// console.log(this.chain);
return this;
},
removeLink(position) {
if (
!Number.isInteger(position) ||
position > this.values.length ||
position <= 0
) {
this.chain = "";
this.values = [];
throw Error("You can't remove incorrect link!");
}
if (position === 1) {
this.chain = this.chain.slice(4 + this.values[0].length);
this.values.splice(0, 1);
// console.log(this.chain);
return this;
} else {
let deleteLength = 0;
for (let i = 0; i < position - 1; i++) {
deleteLength += this.values[i].length;
}
this.chain = this.chain.split("");
this.chain.splice(
3 + 4 * (position - 2) + deleteLength,
4 + this.values[position - 1].length
);
this.chain = this.chain.join("");
this.values.splice(position - 1, 1);
// console.log(this.chain);
return this;
}
},
reverseChain() {
if (this.values.length <= 1) return this;
this.chain = this.chain.split("~~").reverse().join("~~");
// console.log(this.chain);
return this;
},
finishChain() {
this.values = [];
let result = this.chain;
this.chain = "";
return result;
},
};
|
'use strict';
const Hapi = require('hapi');
const Path = require('path');
const server = new Hapi.Server();
server.connection({ port: 3003, host: 'localhost' });
server.route({
method: 'GET',
path: '/{name}',
handler: function (request, reply) {
reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
}
});
server.register(require('inert'), (err) => {
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
reply.file('index.html');
}
});
server.route({
method: 'GET',
path: '/bundle.js',
handler: function (request, reply) {
reply.file('bundle.js');
}
});
});
server.start(err => {
if (err) {
throw err;
}
console.log(`Server running at ${server.info.uri}`);
});
|
// @ts-check
import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
import { AmountMath } from '@agoric/ertp';
import buildManualTimer from '@agoric/zoe/tools/manualTimer.js';
import { setup } from '@agoric/zoe/test/unitTests/setupBasicMints.js';
import { makePromiseKit } from '@agoric/promise-kit';
import { assertPayoutAmount } from '@agoric/zoe/test/zoeTestHelpers.js';
import { E } from '@agoric/eventual-send';
import { buildDistributor } from '../src/distributeFees.js';
// Some notifier updates aren't propogating sufficiently quickly for the tests.
// This invocation (thanks to Warner) waits for all promises that can fire to
// have all their callbacks run
async function waitForPromisesToSettle() {
const pk = makePromiseKit();
// eslint-disable-next-line no-undef
setImmediate(pk.resolve);
return pk.promise;
}
/**
* @param {Issuer} feeIssuer
*/
function makeFakeFeeDepositFacet(feeIssuer) {
const depositPayments = [];
const feeDepositFacet = {
async receive(pmt) {
depositPayments.push(pmt);
return E(feeIssuer).getAmountOf(pmt);
},
};
return { feeDepositFacet, getPayments: _ => depositPayments };
}
function makeFakeTreasury() {
const feePayments = [];
return {
collectFees: () => feePayments.pop(),
// tools for the fake:
pushFees: payment => feePayments.push(payment),
};
}
function assertPaymentArray(t, payments, count, value, issuer, brand) {
for (let i = 0; i < count; i += 1) {
assertPayoutAmount(t, issuer, payments[i], AmountMath.make(brand, value));
}
}
test('fee distribution', async t => {
const { brands, moolaIssuer: issuer, moolaMint: runMint } = setup();
const brand = brands.get('moola');
const { feeDepositFacet, getPayments } = makeFakeFeeDepositFacet(issuer);
const treasury = makeFakeTreasury();
const epochTimer = buildManualTimer(console.log);
const distributorParams = {
epochInterval: 1n,
};
buildDistributor(
treasury,
feeDepositFacet,
epochTimer,
distributorParams,
).catch(e => {
t.fail(e.stack);
});
treasury.pushFees(runMint.mintPayment(AmountMath.make(brand, 500n)));
t.deepEqual(getPayments(), []);
await epochTimer.tick();
await waitForPromisesToSettle();
assertPaymentArray(t, getPayments(), 1, 500, issuer, brand);
});
test('fee distribution, leftovers', async t => {
const { brands, moolaIssuer: issuer, moolaMint: runMint } = setup();
const brand = brands.get('moola');
const { feeDepositFacet, getPayments } = makeFakeFeeDepositFacet(issuer);
const treasury = makeFakeTreasury();
const epochTimer = buildManualTimer(console.log);
const distributorParams = {
epochInterval: 1n,
};
buildDistributor(treasury, feeDepositFacet, epochTimer, distributorParams);
treasury.pushFees(runMint.mintPayment(AmountMath.make(brand, 12n)));
t.deepEqual(getPayments(), []);
await epochTimer.tick();
await waitForPromisesToSettle();
assertPaymentArray(t, getPayments(), 1, 12, issuer, brand);
// Pay them again
treasury.pushFees(runMint.mintPayment(AmountMath.make(brand, 13n)));
await epochTimer.tick();
await waitForPromisesToSettle();
assertPaymentArray(t, getPayments().slice(1), 1, 13, issuer, brand);
});
|
'use strict';
const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/config.json')[env];
const db = {};
let sequelize;
if (config.use_env_variable) {
sequelize = new Sequelize(process.env[config.use_env_variable], config);
} else {
sequelize = new Sequelize(config.database, config.username, config.password, config);
}
fs
.readdirSync(__dirname)
.filter(file => {
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(file => {
const model = sequelize['import'](path.join(__dirname, file));
db[model.name] = model;
});
Object.keys(db).forEach(modelName => {
if (db[modelName].associate) {
db[modelName].associate(db);
}
});
// sequelize.sync()
db.sequelize = sequelize;
db.Sequelize = Sequelize;
module.exports = db;
|
const keys = require('../../config/keys');
module.exports = survey => {
return `
<html>
<body>
<div style="text-align: center;">
<h3>I'd like your input!</h3>
<p>Please answer the following question:</p>
<p>${survey.body}</p>
<div>
<a href="${keys.redirectDomain}/api/surveys/${survey.id}/yes">Yes</a>
</div>
<div>
<a href="${keys.redirectDomain}/api/surveys/${survey.id}/no">No</a>
</div>
</div>
</body>
</html>
`;
};
|
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OidcClient = void 0;
const http_client_1 = require("@actions/http-client");
const auth_1 = require("@actions/http-client/lib/auth");
const core_1 = require("./core");
class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
if (!token) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
}
return runtimeUrl;
}
static getCall(id_token_url) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient
.getJson(id_token_url)
.catch(error => {
throw new Error(`Failed to get ID Token. \n
Error Code : ${error.statusCode}\n
Error Message: ${error.result.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error('Response json body do not have ID Token field');
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
// New ID Token is requested from action service
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
core_1.debug(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
core_1.setSecret(id_token);
return id_token;
}
catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
}
exports.OidcClient = OidcClient;
//# sourceMappingURL=oidc-utils.js.map
|
function MipsError(message) {
this.name = 'MipsError';
this.message = message;
}
// from http://stackoverflow.com/questions/979975/how-to-get-the-value-from-url-parameter
// Could be improved on.
function getURLParameters()
{
var sURL = window.document.URL.toString();
var params = {};
if (sURL.indexOf("?") > 0)
{
var arrParams = sURL.split("?");
var arrURLParams = arrParams[1].split("&");
for (var i=0;i<arrURLParams.length;i++)
{
var sParam = arrURLParams[i].split("=");
if (sParam[1] != "")
params[sParam[0]] = unescape(sParam[1]);
else
params[sParam[0]] = null;
}
}
return params;
}
function assert(condition, message) {
if (!condition) {
throw new Error(message) || new Error("Assertion failed");
}
}
String.prototype.format = function() {
// 'Added {0} by {1} to your collection'.format(title, artist)
// http://stackoverflow.com/a/2648463
var s = this,
i = arguments.length;
while (i--) {
s = s.replace(new RegExp('\\{' + i + '\\}', 'gm'), arguments[i]);
}
return s;
};
// Public Helper functions
var MIPS = {};
MIPS.stringToNumber = function (string) {
assert(typeof string === "string");
var number = 0;
for (var i = 0; i < string.length; i++)
{
number = number << 8;
number += string.charCodeAt(i);
};
return number;
};
MIPS.numberToString = function (number, returnNullOnZero) {
assert(typeof number === "number");
returnNullOnZero = typeof returnNullOnZero === 'undefined' ? false : returnNullOnZero;
assert(typeof returnNullOnZero === 'boolean');
if (returnNullOnZero && number === 0) {
return '\0';
}
var string = '';
while (0 < number) {
string = String.fromCharCode(number & 255) + string;
number = number >> 8;
}
return string;
};
MIPS.numberToBinaryString = function (number, bits/*=32*/, blockSize) {
// returns a binary representation of a string.
assert(typeof number === "number");
bits = bits || 32;
assert(typeof bits === "number");
blockSizeDefined = typeof blockSize !== undefined;
if (number < 0) {
// convert to the corresponding unsigned number (e.g. when we are using single bytes, then -2 would correspond to 254, since the two are represented the same in binary)
number = Math.pow(2, bits) + number;
}
var result = number.toString(2);
var zeroPadding = (new Array(bits - result.length + 1)).join('0');
result = zeroPadding + result;
if (blockSizeDefined) {
var resultWithSpaces = '';
for (var i = 0; i < result.length; i++) {
resultWithSpaces += result[i];
if (((i+1) % blockSize === 0) && ((i+1) !== result.length)) {
resultWithSpaces += ' ';
}
}
result = resultWithSpaces;
}
//if(debug) {console.log("MIPS.numberToBinaryString result: ", result);}
return result;
};
MIPS.binaryStringToNumber = function (binaryString) {
assert(typeof binaryString == "string");
binaryString = binaryString.replace(/\s+/g, '');
var unsignedNumber = MIPS.binaryStringToUnsignedNumber(binaryString);
if (binaryString[0] === "0") {
// this is a positive number
return unsignedNumber;
}
assert(binaryString[0] === "1", "This should be a negative number.");
return MIPS.unsignedNumberToSignedNumber(unsignedNumber, binaryString.length); // unsignedNumber - Math.pow(2, binaryString.length);
};
MIPS.binaryStringToUnsignedNumber = function (binaryString) {
assert(typeof binaryString == "string");
binaryString = binaryString.replace(/\s+/g, '');
return parseInt(binaryString, 2);
};
MIPS.unsignedNumberToSignedNumber = function (number, bits/*=32*/) {
assert(typeof number === "number");
bits = bits || 32;
assert(typeof bits === "number");
var minValidValue = MIPS.minSignedValue(bits);
var maxValidValue = MIPS.maxUnsignedValue(bits);
if (number < minValidValue || maxValidValue < number) {
throw new MipsError("Out of range value ({0}) for conversion of unsigned to signed number. The value must be between {1} and {2}.".format(number, minValidValue, maxValidValue));
};
if (number < Math.pow(2, bits - 1)) {
// e.g. f(3, 8) -> 3, since 0000 0011 in signed and unsigned is always 3
return number;
};
// e.g. f(255, 8) -> -1, since -1 and 255 (1111 1111) represent the same value in binary
// e.g. f(254, 8) -> -2, since they represent the same number in binary (1111 1110)
return number - Math.pow(2, bits);
};
MIPS.signedNumberToUnsignedNumber = function (number, bits/*=32*/) {
// e.g. f(-128, 8) -> 128 (1000 0000)
// e.g. f(-1, 8) -> 255 (1111 1111)
// e.g. f(-2, 8) -> 254 (1111 1110)
// e.g. f(127, 8) -> 127 (0111 1111)
// e.g. f(255, 8) -> 255 (1111 1111)
// e.g. f(3, 8) -> 3 (0000 0011)
assert(typeof number === "number");
bits = bits || 32;
assert(typeof bits === "number");
var minValidValue = MIPS.minSignedValue(bits);
var maxValidValue = MIPS.maxUnsignedValue(bits);
if (number < minValidValue || maxValidValue < number) {
throw new MipsError("Out of range value ({0}) for conversion of signed to unsigned number. The value must be between {1} and {2}.".format(number, minValidValue, maxValidValue));
};
if (0 <= number) {
// already an unsigned number
return number;
}
// negative number
return number + Math.pow(2, bits);
};
MIPS.minSignedValue = function(bits) {
return -Math.pow(2, bits-1);
};
MIPS.minUnsignedValue = function(bits) {
return 0;
};
MIPS.maxSignedValue = function(bits) {
return Math.pow(2, bits-1) - 1;
};
MIPS.maxUnsignedValue = function(bits) {
return Math.pow(2, bits) - 1;
};
MIPS.signedAddition = function(value1, value2, bits) {
var result = value1 + value2;
var overflowFlag = false;
var carryFlag = false;
if (result < MIPS.minSignedValue(bits)) {
// e.g. -128 - 1 would cause underflow
overflowFlag = true;
// -128 (1000 0000)
// -129 (0111 1111) should become 127
// -130 (0111 1110) should become 126
// e.g. -128 + -300 = -428
result = MIPS.minSignedValue(bits) - result; // e.g. convert -428 to 300
result = result % (MIPS.maxSignedValue(bits) + 1); // e.g. convert 300 to 44
if (result === 0)
result = MIPS.minSignedValue(bits);
else
result = MIPS.maxSignedValue(bits) - (result - 1); // e.g. convert 44 to 128 - 44 = 84
} else if (MIPS.maxSignedValue(bits) < result) {
overflowFlag = true;
// e.g. 127 + 1 would cause overflow
// e.g. 127 + 300
result = result + (-MIPS.minSignedValue(bits)); // e.g. convert 427 to 555
result = result % (MIPS.maxUnsignedValue(bits) + 1); // e.g. convert 555 to 43
result = result + MIPS.minSignedValue(bits); // e.g. convert 43 to -85
}
return {
result: result,
overflowFlag: overflowFlag,
carryFlag: carryFlag
};
};
MIPS.unsignedAddition = function(value1, value2, bits) {
var result = value1 + value2;
var overflowFlag = false;
var carryFlag = false;
if (result < MIPS.minUnsignedValue(bits)) {
// e.g. 0 - 1, this would caues underflow
carryFlag = true;
result = MIPS.minUnsignedValue(bits) - result;
result = result % (MIPS.maxUnsignedValue(bits) + 1);
if (result === 0)
result = MIPS.minUnsignedValue(bits);
else
result = MIPS.maxUnsignedValue(bits) - (result - 1);
} else if (MIPS.maxUnsignedValue(bits) < result) {
carryFlag = true;
result = result % (MIPS.maxUnsignedValue(bits) + 1);
}
return {
result: result,
overflowFlag: overflowFlag,
carryFlag: carryFlag
};
};
|
const {assert} = require('chai')
const {Schema} = require('../src')
const {catchError} = require('./helpers')
// Fixtures
const SCHEMA_MIN = {
fields: [
{name: 'id'},
{name: 'height'},
]
}
const SCHEMA = {
fields: [
{name: 'id', type: 'string', constraints: {required: true}},
{name: 'height', type: 'number'},
{name: 'age', type: 'integer'},
{name: 'name', type: 'string', constraints: {required: true}},
{name: 'occupation', type: 'string'},
]
}
// Tests
describe('Schema', () => {
it('have a correct number of fields', async () => {
const schema = await Schema.load(SCHEMA)
assert.deepEqual(schema.fields.length, 5)
})
it('have correct field names', async () => {
const schema = await Schema.load(SCHEMA)
assert.deepEqual(schema.fieldNames, ['id', 'height', 'age', 'name', 'occupation'])
})
it('raise exception when invalid json passed as schema in strict mode', async () => {
const error = await catchError(Schema.load, 'bad descriptor', {strict: true})
if (process.env.USER_ENV === 'browser') {
assert.include(error.message, 'in browser')
} else {
assert.include(error.message, 'load descriptor')
}
})
it('raise exception when invalid format schema passed', async () => {
const error = await catchError(Schema.load, {}, {strict: true})
assert.include(error.message, 'validation errors')
assert.include(error.errors[0].message, 'fields')
})
it('set default types if not provided', async () => {
const schema = await Schema.load(SCHEMA_MIN)
assert.deepEqual(schema.fields[0].type, 'string')
assert.deepEqual(schema.fields[1].type, 'string')
})
it('fields are not required by default', async () => {
const schema = await Schema.load(SCHEMA_MIN)
assert.deepEqual(schema.fields[0].required, false)
assert.deepEqual(schema.fields[1].required, false)
})
it('initial descriptor should not be mutated', async () => {
const descriptor = {fields: [{ name: 'id' }]}
const schema = await Schema.load(descriptor)
assert.notDeepEqual(schema.descriptor, descriptor)
})
it('should return null if field name does not exists', async () => {
const schema = await Schema.load(SCHEMA)
assert.deepEqual(schema.getField('non-existent'), null)
})
it('should load local json file', async function() {
if (process.env.USER_ENV === 'browser') this.skip()
const descriptor = 'data/schema.json'
const schema = await Schema.load(descriptor)
assert.deepEqual(schema.fieldNames, ['id', 'capital', 'url'])
})
it('convert row', async () => {
const schema = await Schema.load(SCHEMA)
const row = ['string', '10.0', '1', 'string', 'string']
assert.deepEqual(schema.castRow(row), ['string', 10, 1, 'string', 'string'])
})
it('shouldn\'t convert row with less items than fields count', async () => {
const schema = await Schema.load(SCHEMA)
const row = ['string', '10.0', '1', 'string']
const error = await catchError(schema.castRow.bind(schema), row)
assert.include(error.message, '4 values does not match the 5 fields')
})
it('shouldn\'t convert row with too many items', async () => {
const schema = await Schema.load(SCHEMA)
const row = ['string', '10.0', '1', 'string', 'string', 'string']
const error = await catchError(schema.castRow.bind(schema), row)
assert.include(error.message, '6 values does not match the 5 fields')
})
it('shouldn\'t convert row with wrong type (fail fast)', async () => {
const schema = await Schema.load(SCHEMA)
const row = ['string', 'notdecimal', '10.6', 'string', 'string']
const error = await catchError(schema.castRow.bind(schema), row, {failFast: true})
assert.include(error.message, 'type')
})
it('shouldn\'t convert row with wrong type multiple errors', async () => {
const schema = await Schema.load(SCHEMA)
const row = ['string', 'notdecimal', '10.6', 'string', 'string']
const error = await catchError(schema.castRow.bind(schema), row)
assert.include(error.message, 'type and format mismatch errors')
assert.include(error.errors[0].message, 'type')
})
it('should allow pattern format for date', async () => {
const descriptor = {fields: [{name: 'year', format: '%Y', type: 'date'}]}
const schema = await Schema.load(descriptor)
assert.deepEqual(schema.castRow(['2005']), [new Date(2005, 0, 1)])
})
it('should work in strict mode', async () => {
const descriptor = {fields: [{name: 'name', type: 'string'}]}
const schema = await Schema.load(descriptor, {strict: true})
assert.deepEqual(schema.valid, true)
assert.deepEqual(schema.errors, [])
})
it('should work in non-strict mode', async () => {
const descriptor = {fields: [{name: 'name', type: 'bad'}]}
const schema = await Schema.load(descriptor)
assert.deepEqual(schema.valid, false)
assert.deepEqual(schema.errors.length, 1)
})
it('sould infer itself from given rows', async () => {
const schema = new Schema()
schema.infer([['Alex', 21], ['Joe', 38]], {headers: ['name', 'age']})
assert.deepEqual(schema.valid, true)
assert.deepEqual(schema.fieldNames, ['name', 'age'])
assert.deepEqual(schema.getField('name').type, 'string')
assert.deepEqual(schema.getField('age').type, 'integer')
})
it('sould work with primary/foreign keys as arrays', async () => {
const descriptor = {
fields: [{name: 'name'}],
primaryKey: ['name'],
foreignKeys: [{
fields: ['parent_id'],
reference: {resource: 'resource', fields: ['id']}
}]
}
const schema = await Schema.load(descriptor)
assert.deepEqual(schema.primaryKey, ['name'])
assert.deepEqual(schema.foreignKeys, [{
fields: ['parent_id'],
reference: {resource: 'resource', fields: ['id']}
}])
})
it('sould work with primary/foreign keys as string', async () => {
const descriptor = {
fields: [{name: 'name'}],
primaryKey: 'name',
foreignKeys: [{
fields: 'parent_id',
reference: {resource: 'resource', fields: 'id'}
}]
}
const schema = await Schema.load(descriptor)
assert.deepEqual(schema.primaryKey, ['name'])
assert.deepEqual(schema.foreignKeys, [{
fields: ['parent_id'],
reference: {resource: 'resource', fields: ['id']}
}])
})
it('infer should not modify data sample', async () => {
const sample = [[1], [2], [3]]
const schema = await Schema.load()
schema.infer(sample, {headers: 1})
assert.deepEqual(sample, [[1], [2], [3]])
})
})
|
import { SUCCESS_LOGOUT } from '@shopgate/pwa-common/constants/ActionTypes';
import {
USER_ADDRESSES_RECEIVED,
SET_DEFAULT_ADDRESS,
ADD_USER_ADDRESS_SUCCESS,
UPDATE_USER_ADDRESS_SUCCESS,
ADD_USER_ADDRESS,
UPDATE_USER_ADDRESS,
ADD_USER_ADDRESS_FAILED,
UPDATE_USER_ADDRESS_FAILED,
USER_ADDRESS_VALIDATION_FAILED,
USER_ADDRESS_FORM_LEAVE,
} from './../constants/ActionTypes';
/**
* Prepare default addresses map by given addresses
* @param {UserAddress[]} addresses user addresses
* @returns {Object}
*/
const getDefaultsByAddresses = (addresses) => {
const defaultAddresses = {};
addresses.forEach((address) => {
if (!address.tags) {
return;
}
address.tags.forEach((tag) => {
if (tag.startsWith('default')) {
// Remove default prefix to have simple shipping, billing as a map
const normTag = tag.replace('default_', '');
defaultAddresses[normTag] = address.id;
}
});
});
return defaultAddresses;
};
const initialState = {
addresses: [],
default: {},
busy: false,
};
/**
* Stores the user addresses
* @param {Object} state The current user state
* @param {Object} action The action object
* @return {Object} The new state
*/
export default (state = initialState, action) => {
switch (action.type) {
case USER_ADDRESSES_RECEIVED: {
const { addresses = [] } = action;
return {
...state,
addresses,
default: getDefaultsByAddresses(addresses),
};
}
case SET_DEFAULT_ADDRESS: {
return {
...state,
default: {
...state.default,
[action.tag]: action.addressId,
},
};
}
// Add address to redux immediately after we have success response
case ADD_USER_ADDRESS_SUCCESS: {
return {
...state,
busy: false,
};
}
// Update address in redux immediately after we have success response
case UPDATE_USER_ADDRESS_SUCCESS: {
return {
...state,
addresses: state.addresses.map(address => (
// Replace with updated address
address.id === action.address.id ? action.address : address
)),
busy: false,
};
}
case ADD_USER_ADDRESS:
case UPDATE_USER_ADDRESS:
return {
...state,
busy: true,
validationErrors: [],
};
case ADD_USER_ADDRESS_FAILED:
case UPDATE_USER_ADDRESS_FAILED:
case USER_ADDRESS_VALIDATION_FAILED:
return {
...state,
busy: false,
validationErrors: action.error ? action.error.validationErrors : [],
};
// Leave address form, reset form related data
case USER_ADDRESS_FORM_LEAVE: {
return {
...state,
busy: false,
validationErrors: [],
};
}
case SUCCESS_LOGOUT:
return initialState;
default:
return state;
}
};
|
import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import { Box, Button, Grommet, RadioButton } from 'grommet';
import { grommet } from 'grommet/themes';
import { deepMerge } from 'grommet/utils';
class SimpleRadioButton extends Component {
constructor(props) {
super(props);
this.state = { selected: props.selected };
}
onChange = event => this.setState({ selected: event.target.value });
render() {
const { selected } = this.state;
return (
<Grommet theme={grommet}>
<Box gap="small">
<RadioButton
label="Choice 1"
name="radio"
value="c1"
checked={selected === 'c1'}
onChange={this.onChange}
{...this.props}
/>
<RadioButton
label="Choice 2"
name="radio"
value="c2"
checked={selected === 'c2'}
onChange={this.onChange}
{...this.props}
/>
</Box>
</Grommet>
);
}
}
const customTheme = deepMerge(grommet, {
radioButton: {
gap: 'xsmall',
size: '18px',
hover: {
border: {
color: 'dark-4',
},
},
check: {
color: {
light: 'neutral-1',
},
},
icon: {
size: '10px',
},
},
});
class CustomRadioButton extends Component {
state = { selected: undefined };
onChange = event => this.setState({ selected: event.target.value });
render() {
const { selected } = this.state;
return (
<Grommet theme={customTheme}>
<Box gap="xsmall">
<RadioButton
label="Choice 1"
name="radio"
value="c1"
checked={selected === 'c1'}
onChange={this.onChange}
/>
<RadioButton
label="Choice 2"
name="radio"
value="c2"
checked={selected === 'c2'}
onChange={this.onChange}
/>
</Box>
</Grommet>
);
}
}
class CheckBoxInsideButton extends Component {
state = { selected: undefined };
render() {
const { selected } = this.state;
return (
<Grommet theme={grommet}>
<Button
hoverIndicator="background"
onClick={() => {
if (selected) {
this.setState({ selected: undefined });
} else {
this.setState({ selected: 'c1' });
}
}}
>
<RadioButton
label="Choice 1"
name="radio"
value="c1"
checked={selected === 'c1'}
{...this.props}
/>
</Button>
</Grommet>
);
}
}
storiesOf('RadioButton', module)
.add('Simple RadioButton', () => <SimpleRadioButton />)
.add('Disabled RadioButton', () => (
<SimpleRadioButton disabled selected="c2" />
))
.add('Custom Theme', () => <CustomRadioButton />)
.add('Inside a Button Theme', () => <CheckBoxInsideButton />);
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.bar = exports.defaultExports = void 0;
var foo, bar;
exports.bar = bar;
exports.defaultExports = foo;
|
// babel-plugin-parse-mp-info.js
const generate = require('babel-generator').default
const babelon = require('babelon')
function getImportsMap (metadata) {
let { importsMap } = metadata
const { imports } = metadata.modules
if (!importsMap) {
importsMap = {}
imports.forEach(m => {
m.specifiers.forEach(v => {
importsMap[v.local] = m.source
})
})
metadata.importsMap = importsMap
}
return metadata
}
// 解析 config
const traverseConfigVisitor = {
Property: function (path) {
const k = path.node.key.name || path.node.key.value
if (k !== 'config') {
return
}
path.stop()
const { metadata } = path.hub.file
const { code } = generate(path.node.value, {}, '')
metadata.config = { code, node: path.node.value, value: babelon.eval(code) }
// path.remove()
}
}
// config 的遍历器
const configVisitor = {
ExportDefaultDeclaration: function (path) {
path.traverse(traverseConfigVisitor)
path.remove()
},
CallExpression: function (path) {
const {
metadata
} = path.hub.file
const {
importsMap
} = getImportsMap(metadata)
const calleeName = path.node.callee.name
if (calleeName !== 'Page') return;
const pageArg = path.node.arguments[0];
if (!pageArg || pageArg.type !== 'CallExpression') {
return
}
const arg = pageArg.arguments[0];
if (!arg) return;
const v = arg.type === 'Identifier' ? importsMap[arg.name] : importsMap['App']
metadata.rootComponent = v;
},
NewExpression: function (path) {
const { metadata } = path.hub.file
const { importsMap } = getImportsMap(metadata)
const calleeName = path.node.callee.name
const isVue = /vue$/.test(importsMap[calleeName])
if (!isVue) {
return
}
const arg = path.node.arguments[0]
if (!arg) {
return
}
const v = arg.type === 'Identifier' ? importsMap[arg.name] : importsMap['App']
metadata.rootComponent = v || importsMap['index'] || importsMap['main']
}
}
function parseConfig (babel) {
return { visitor: configVisitor }
}
// 解析 components
const traverseComponentsVisitor = {
Property: function (path) {
if (path.node.key.name !== 'components') {
return
}
path.stop()
const { metadata } = path.hub.file
const { importsMap } = getImportsMap(metadata)
// 找到所有的 imports
const { properties } = path.node.value
const components = {}
properties.forEach(p => {
const k = p.key.name || p.key.value
const v = p.value.name || p.value.value
components[k] = importsMap[v]
})
metadata.components = components
}
}
// components 的遍历器
const componentsVisitor = {
ExportDefaultDeclaration: function (path) {
path.traverse(traverseComponentsVisitor)
}
}
function parseComponentsDeps (babel) {
return { visitor: componentsVisitor }
}
// 解析全局components
let globalComponents = {}
const globalComponentsVisitor = {
CallExpression (path) {
const { callee, arguments: args } = path.node
const { metadata } = path.hub.file
if (!callee.object || !callee.property) {
return
}
if (callee.object.name === 'Vue' && callee.property.name === 'component') {
if (!args[0] || args[0].type !== 'StringLiteral') {
throw new Error('Vue.component()的第一个参数必须为静态字符串')
}
if (!args[1]) {
throw new Error('Vue.component()需要两个参数')
}
const { importsMap } = getImportsMap(metadata)
globalComponents[args[0].value] = importsMap[args[1].name]
}
metadata.globalComponents = globalComponents
}
}
function parseGlobalComponents (babel) {
return { visitor: globalComponentsVisitor }
}
function clearGlobalComponents () {
globalComponents = {}
}
module.exports = { parseConfig, parseComponentsDeps, parseGlobalComponents, clearGlobalComponents }
|
'use strict';
const AWS = require('aws-sdk');
const isTest = process.env.JEST_WORKER_ID;
const isDevelopment = process.env.NODE_ENV !== 'production';
const setupLocal = isTest || isDevelopment;
const config = {
convertEmptyValues: true,
region: "sa-east-1",
...(setupLocal && {
sslEnabled: false,
region: 'local-env',
secretAccessKey: 'secr3tKey'
}),
...(isDevelopment && {
accessKeyId: 'mYlOc4lK3y-dev',
endpoint: 'localhost:8000'
}),
...(isTest && {
accessKeyId: 'mYlOc4lK3y-test',
endpoint: 'localhost:5000'
})
};
AWS.config.update(config);
const dynamoDbClient = new AWS.DynamoDB();
const documentClient = new AWS.DynamoDB.DocumentClient();
module.exports = {
dynamoDbClient,
documentClient
};
|
// eslint-disable-next-line no-unused-vars
import * as stardust from '@nebula.js/stardust';
import * as useViewState from '../use-view-state';
import * as useActions from '../use-actions';
import * as configurePicasso from '../../configure-picasso';
import useCore from '../use-core';
describe('use-core', () => {
let sandbox;
let create;
let flags;
let core;
let setCore;
let picasso;
let picassoInstance;
let chart;
beforeEach(() => {
sandbox = sinon.createSandbox();
sandbox.stub(stardust, 'useEffect');
sandbox.stub(stardust, 'useElement');
sandbox.stub(stardust, 'useOptions');
sandbox.stub(stardust, 'useState');
flags = 'flgs';
sandbox.stub(useActions, 'default');
useActions.default.withArgs({ flags: 'flgs' }).returns('actns');
sandbox.stub(useViewState, 'default');
sandbox.stub(configurePicasso, 'default');
setCore = sandbox.stub();
stardust.useState.returns([core, setCore]);
useViewState.default.returns('some-view-state');
stardust.useElement.returns({ style: { overflow: undefined } });
chart = { destroy: sandbox.stub() };
picassoInstance = { chart: sandbox.stub() };
picassoInstance.chart
.withArgs({ element: { style: { overflow: 'hidden' } }, data: [], settings: {} })
.returns(chart);
picasso = sandbox.stub().returns(picassoInstance);
configurePicasso.default.returns(picasso);
stardust.useOptions.returns({ renderer: 'svg' });
create = () => useCore({ flags });
});
afterEach(() => {
sandbox.restore();
});
describe('useEffect', () => {
let fn;
let conditionArray;
it('should have the second argument being an array with viewState as its only element', () => {
create();
conditionArray = stardust.useEffect.getCall(0).args[1];
expect(conditionArray).to.deep.equal(['some-view-state']);
});
describe('function in useEffect arguments list', () => {
it('should return undefined if viewState is undefined', () => {
useViewState.default.returns(undefined);
create();
fn = stardust.useEffect.getCall(0).args[0];
expect(fn()).to.equal(undefined);
});
it('should return a function if viewState is defined, case 1: renderer is defined', () => {
create();
fn = stardust.useEffect.getCall(0).args[0];
const destroyFn = fn();
const setCoreArgs = setCore.getCall(0).args[0];
expect(setCoreArgs.chart).to.be.a('object');
expect(setCoreArgs.actions).to.equal('actns');
expect(setCoreArgs.viewState).to.equal('some-view-state');
expect(setCoreArgs.picassoInstance).to.be.a('object');
expect(setCoreArgs.picasso).to.be.a('function');
destroyFn();
expect(chart.destroy).to.have.been.calledOnce;
});
it('should return a function if viewState is defined, case 2: renderer is undefined', () => {
stardust.useOptions.returns({ renderer: undefined });
create();
fn = stardust.useEffect.getCall(0).args[0];
fn();
const setCoreArgs = setCore.getCall(0).args[0];
expect(setCoreArgs.picassoInstance).to.be.a('object');
});
});
});
});
|
import axios from 'axios';
import { fetchMake } from './get_make';
import { clearSBL } from './hid_action';
import { fetchOBDConfig} from './get_obdconfig'
import { fetchSoftwareConfig } from './get_software'
import { WEB_SERVICES_URL } from '../utils/constants';
import { OBD_COMPLETED } from '../utils/device_utils';
import { DEVICE_OBD_SUCCESS, DEVICE_OBD_FAILED } from './hid_action';
import { DEVICE_SUPPORTED, DEVICE_NOT_SUPPORTED, DEVICE_START_SECTOR } from '../utils/device_utils';
//const ROOT_URL = "https://tranquil-mesa-29755.herokuapp.com/";
const ROOT_URL = WEB_SERVICES_URL + "/v1/navtooldevices/";
export const FETCH_DEVICE_DB_DATA = 'FETCH_DEVICE_DB_DATA';
export const FETCH_DEVICE_MCU = 'FETCH_DEVICE_MCU';
export function fetchDeviceDBData(serial_number, software){
//console.log('URL', url);
return (dispatch) => {
dispatch( { type: FETCH_DEVICE_MCU, payload: serial_number } )
const url = ROOT_URL + serial_number;
const request = axios.get(url);
request.then( ({data}) =>{
console.log("xxxxxxxxxxxxx")
console.log(data);
//console.log(data["mfg_id"])
console.log("xxxxxxxxxxxxx")
//console.log(serial_number);
dispatch( { type: FETCH_DEVICE_DB_DATA, payload: data } )
if (software !== undefined){
//console.log("%%%%%%%%Software parameter exists")
dispatch(fetchSoftwareConfig(data["mfg_id"],software.softwareId,software.softwareBuild,data.vehicle_make,data.vehicle_model))
//dispatch(fetchOBDConfig(data["mfg_id"], obd.softwareId));
//dispatch( fetchMake(data["mfg_id"]) )
}
});
};
}
export function updateDeviceDBData(serial_number, update_date){
console.log('@@@@@@@@@@@@updateDeviceDBData@@@@@@@@@@@@@');
console.log(update_date);
console.log('@@@@@@@@@@@@updateDeviceDBData@@@@@@@@@@@@@');
const url = ROOT_URL + serial_number;
const request = axios.put(url, {
sw_id: update_date.sw_id,
sw_build: update_date.sw_build,
vehicle_make: update_date.vehicle_make,
vehicle_model: update_date.vehicle_model
});
//console.log('URL', url);
return (dispatch) => {
request.then( ({data}) =>{
//console.log(data);
//console.log(data["mfg_id"])
dispatch( { type: FETCH_DEVICE_DB_DATA, payload: data } )
});
};
}
export function updateDeviceOBDData(serial_number, obd_status){
if(obd_status == DEVICE_OBD_SUCCESS){
const url = WEB_SERVICES_URL + '/v1/obdupdate/' + "?mcu_id=" + serial_number;
const request = axios.get(url);
//console.log('OBD MCU ', serial_number);
return (dispatch) => {
request.then( ({data}) =>{
//console.log(data);
//console.log(data["mfg_id"])
dispatch( { type: OBD_COMPLETED, payload: 'Programming Completed' } )
dispatch(fetchDeviceDBData(serial_number))
});
};
}else{
return {
type: OBD_COMPLETED,
payload: 'Programming Failed'
};
}
}
export function checkDeviceSupport(mfg_id){
const url = WEB_SERVICES_URL + '/v1/navtoolhws/' + "?mfg_id=" + mfg_id;
const request = axios.get(url);
return (dispatch) => {
request.then( ({data}) =>{
//console.log("checkDeviceSupport");
//console.log(data[0]["hw_hid"]);
if(data[0]["hw_hid"] == 1 || data[0]["hw_hid"] == 2){
//console.log("Supported");
dispatch( { type: DEVICE_SUPPORTED, payload: data[0] } )
}else{
//console.log("Not Supported");
dispatch( { type: DEVICE_NOT_SUPPORTED, payload: '' } )
}
});
};
}
export function checkDeviceStartSector(mfg_id){
const url = WEB_SERVICES_URL + '/v1/navtoolhws/' + "?mfg_id=" + mfg_id;
const request = axios.get(url);
return (dispatch) => {
request.then( ({data}) =>{
//console.log("checkDeviceStartSector");
//console.log("Supported");
dispatch( { type: DEVICE_START_SECTOR, payload: data[0] } )
});
};
}
|
import { modals } from "../constants";
const newFeederWizardReducer = (
state = { show: false, deviceHid: null },
action
) => {
switch (action.type) {
case modals.SHOW_FEEDER_WIZARD:
return {
show: true,
deviceHid: action.deviceHid,
};
case modals.DISMISS_FEEDER_WIZARD:
return {
show: false,
deviceHid: null,
};
default:
return state;
}
};
export default newFeederWizardReducer;
|
import React from 'react';
import { Text, StyleSheet, Platform } from 'react-native';
const Header = () => (
<Text style={styles.header}>Criptomonedas</Text>
);
const styles = StyleSheet.create({
header: {
paddingTop: Platform.OS === 'ios' ? 50 : 10,
fontFamily: 'Lato-Black',
backgroundColor: '#5E49E2',
paddingBottom: 10,
textAlign: 'center',
textTransform: 'uppercase',
fontSize: 20,
color: '#FFF',
marginBottom: 30
}
})
export default Header;
|
import typescript from '@rollup/plugin-typescript';
import { terser } from "rollup-plugin-terser";
const terserOptions = {
module: false,
compress: {
drop_console: true,
ecma: 6,
keep_classnames: /Raj/,
unsafe_math: true,
unsafe_methods: true,
},
mangle: {
keep_classnames: /Raj/,
},
format: {
comments: /\*!$/gm
}
}
export default {
input: 'src/raj.ts',
output: [
{
file: 'dist/raj.js',
format: 'es',
sourcemap: true,
},
{
file: 'dist/raj.min.js',
format: 'es',
sourcemap: true,
plugins: [terser(terserOptions)],
},
],
plugins: [typescript()],
}
|
/***
* Copyright (c) 2016 Alex Grant (@localnerve), LocalNerve LLC
* Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms.
*
* Precaching and route installs for non-project (cdn) assets.
* The 'sw/data' module is generated by the build @see src/build/service-worker.
*/
import toolbox from 'sw-toolbox';
import urlm from 'utils/urls';
import data from 'sw/data';
/**
* Install route GET handlers for CDN requests and precache assets.
*
* Route handlers for CDN requests are installed everytime as a side effect
* of setting up precaching. However, precaching is only carried out as a result
* of an 'install' event (not everytime).
*
* @see sw-toolbox
*/
export function setupAssetRequests () {
let hostname;
toolbox.precache(
data.assets
.sort()
.map(function (asset) {
const next = urlm.getHostname(asset);
if (hostname !== next) {
hostname = next;
// New hostname, so install GET handler for that host
toolbox.router.get('*', toolbox.networkFirst, {
origin: hostname,
// any/all CDNs get 3 seconds max
networkTimeoutSeconds: 3
});
}
// Precache the asset in 'install'
return asset;
})
);
}
|
import { AutoSuggestDropdown, DropDown, Label, MobileNumberField, SingleCheckbox, TextField, TextFieldIcon } from "components";
import { AutosuggestContainer } from "egov-ui-framework/ui-containers";
import React from "react";
import { RadioButton } from "../components";
const styles = {
radioButtonStyle: {
display: 'flex',
position: 'inherit',
top: '-5px'
},
labelStyle: {
font: "12px",
letterSpacing: 0.6,
marginBottom: 5,
marginTop: 14,
},
radioButtonItemStyle: {
marginBottom: "18px",
paddingLeft: "2px",
height: "16px",
},
selectedLabelStyle: {
color: 'rgba(0, 0, 0, 0.44)',
},
radioButtonLabelStyle: {
// lineHeight: 1,
// marginBottom: 8,
},
iconStyle: {
width: 16,
height: 27,
},
};
const Field = ({ fieldKey, handleFieldChange, field = {}, disabled, onTextFieldIconClick, ...rest }) => {
const renderField = () => {
const { type, tooltip, label, hideField, Icon, iconRedirectionURL, visible, ...fieldProps } = field;
if (fieldProps.dropDownData && fieldProps.dropDownData.length > 0) {
fieldProps.dropDownData.map((data, key) => {
fieldProps.dropDownData[key].code = data.value;
fieldProps.dropDownData[key].name = data.label;
});
}
if (hideField) return null;
switch (type) {
case "textfield":
case "textarea":
return <TextField {...rest} {...fieldProps} onChange={(e, value) => handleFieldChange(fieldKey, value)} multiLine={type === "textarea"} disabled={disabled || fieldProps.disabled} />;
case "mobilenumber":
return <MobileNumberField {...rest} {...fieldProps} onChange={(e, value) => handleFieldChange(fieldKey, value)} disabled={disabled || fieldProps.disabled} />;
case "number":
case "password":
return <TextField {...rest} {...fieldProps} type={type} onChange={(e, value) => handleFieldChange(fieldKey, value)} disabled={disabled || fieldProps.disabled} />;
case "checkbox":
return (
<SingleCheckbox {...rest} {...fieldProps} style={{ marginTop: "27px" }} onCheck={(e) => handleFieldChange(fieldKey, e.target.checked)} disabled={disabled || fieldProps.disabled} />
);
case "label":
return <Label {...rest} {...fieldProps} />;
case "singleValueList":
return (
<DropDown
{...rest}
{...fieldProps}
dropDownData={fieldProps.dropDownData || []}
onChange={(e, value, selectedValue) => handleFieldChange(fieldKey, selectedValue)}
/>
);
case "textFieldIcon":
return (
<TextFieldIcon
iconPosition="right"
Icon={Icon}
{...fieldProps}
{...rest}
onIconClick={
iconRedirectionURL
? () => {
window.open(iconRedirectionURL);
}
: () => onTextFieldIconClick()
}
onChange={(e, value) => handleFieldChange(fieldKey, value)}
/>
);
case "autoSuggestDropdown":
return (
<AutoSuggestDropdown
{...rest}
{...fieldProps}
dataSource={fieldProps && fieldProps.dropDownData || []}
onChange={(chosenRequest, index) => {
handleFieldChange(fieldKey, chosenRequest.value);
}}
/>
);
case "radioButton":
return (
<div>
{visible !== false ? <RadioButton
{...rest}
{...fieldProps}
style={styles.radioButtonStyle}
options={fieldProps && fieldProps.options || []}
radioButtonItemStyle={styles.radioButtonItemStyle}
radioButtonLabelStyle={styles.radioButtonLabelStyle}
selectedLabelStyle={styles.selectedLabelStyle}
className={`radio-button-${fieldProps.id}`}
iconStyle={styles.iconStyle}
labelStyle={styles.radioButtonLabelStyle}
valueSelected={fieldProps.value}
handleChange={(e, value) => {
handleFieldChange(fieldKey, value);
}}
></RadioButton> : ""}
</div>
);
case "AutocompleteDropdown":
return (
<AutosuggestContainer
id={fieldProps.id}
type={fieldProps.type}
required={fieldProps.required}
jsonPath={fieldProps.jsonPath}
localePrefix={fieldProps.localePrefix}
data={fieldProps && fieldProps.dropDownData}
className="autocomplete-dropdown"
label={{ labelKey: fieldProps.floatingLabelText }}
placeholder={{ labelKey: fieldProps.hintText }}
labelsFromLocalisation={fieldProps.labelsFromLocalisation}
gridDefination={fieldProps.gridDefination}
toolTip={fieldProps.toolTip}
toolTipMessage={fieldProps.toolTipMessage}
boundary={fieldProps.boundary}
errorMessage={fieldProps.errorMessage}
errorStyle={fieldProps.errorStyle}
pattern={fieldProps.pattern}
value={fieldProps.value}
defaultSort={fieldProps.defaultSort}
canFetchValueFromJsonpath={false}
formName={fieldProps.formName}
isClearable={true}
disabled={disabled || fieldProps.disabled}
onChange={(chosenRequest, index) => {
handleFieldChange(fieldKey, chosenRequest.target.value, fieldProps.jsonPath);
}}
/>
);
default:
return null;
}
};
return renderField();
};
export default Field;
|
var base = require('./_planner')
/** @param {Room} room **/
const constract = function(room, type, skip){
let sk = skip;
let planner = room.memory.planner;
for(let i of planner.indexes[type].ids){
if(skip > 0){
skip--;
}
sk++;
let tile = planner.buildings[i];
if(Game.getObjectById(tile.id))
continue;
let response = room.lookForAt(LOOK_STRUCTURES, tile.x, tile.y).filter((s) => s.structureType != STRUCTURE_ROAD
&& s.structureType != STRUCTURE_RAMPART);
console.log(JSON.stringify(tile), type);
if(response.length == 0){
response = room.lookForAt(LOOK_CONSTRUCTION_SITES, tile.x, tile.y);
if(response.length == 0){
planner.in_process[tile.index] = tile;
room.createConstructionSite(tile.x, tile.y, type);
console.log('creating', type, 'at', tile.x, tile.y);
return sk;
}else{
tile.id = response[0].id;
}
}else{
tile.id = response[0].id;
}
}
return ERR_INVALID_TARGET;
}
const update_ongoing = function(room){
let queue = room.memory.planner.in_process;
if(Object.keys(queue).length > 0){
for(let index in queue){
let tile = queue[index];
let find = Game.getObjectById(tile.id);
console.log(find);
if(!find){
delete queue[index];
room.memory.planner.nvalidate = false;
}
}
return false;
}
return true;
}
module.exports = {
/** @param {Room} room **/
init : function(room, reset){
if(!room.memory.planner){
console.log("initializing room planner!");
let spawns = room.find(FIND_MY_SPAWNS);
if(spawns.length > 0){
let spawn = spawns[0];
base.createBase(room, spawn.pos.x + 1, spawn.pos.y);
room.memory.clevel = 0;
room.memory.planner.in_process = {};
room.memory.planner.max_buildings = 8;
}
}
},
/** @param {Room} room **/
loop : function(room){
if(room.memory.clevel != room.controller.level){
room.memory.clevel = room.controller.level;
room.memory.planner.enabled = true;
room.memory.planner.nvalidate = false;
}
if(room.memory.planner.enabled){
let co = room.find(FIND_MY_CONSTRUCTION_SITES).length;
let planner = room.memory.planner;
if(co > planner.max_buildings){
return;
}
let response = update_ongoing(room);
if(!planner.nvalidate){
let done = true;
let structures = room.find(FIND_MY_STRUCTURES);
structures = structures.concat(room.find(FIND_MY_CONSTRUCTION_SITES));
for(let type in room.memory.planner.indexes){
if(type == 'factory' || type == 'holder')
continue;
let os = _.sum(structures, st => st.structureType == type)
let n = CONTROLLER_STRUCTURES[type][room.controller.level] - os;
let skip = 0;
for(let i = 0; i < n; i++){
skip = constract(room, type, skip);
if(skip != ERR_INVALID_TARGET)
done = false;
}
}
if(done){
planner.nvalidate = true;
}
}else if(response){
planner.nvalidate = false;
planner.enabled = false;
}
}else if(room.find(FIND_MY_CONSTRUCTION_SITES).length < 5){
for(let t in room.memory.planner.roads){
let tile = room.memory.planner.roads[t];
if(!Game.getObjectById(tile.id)){
let response = room.lookForAt(LOOK_STRUCTURES, tile.x, tile.y);
if(response.length > 0){
tile.id = response[0].id;
}else{
response = room.lookForAt(LOOK_CONSTRUCTION_SITES, tile.x, tile.y);
if(response.length > 0){
tile.id = response[0].id;
}else{
room.createConstructionSite(tile.x, tile.y, "road");
return;
}
}
}
}
}
}
}
|
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/*global tinymce:true */
tinymce.PluginManager.add('pts_link', function(editor) {
function renderLinkEditor() {
var html = ''
, tagIn = '<div class="mce-not-inline mce-menu-item mce-menu-item-normal mce-first mce-stack-layout-item mce-link-row">'
, tagOut = '</div>';
html += tagIn+ '<span class="mce-input-name-txt">link</span> <input id="' + editor.id + '_ptsPostLinkListField" type="text" name="href" value="">'+ tagOut;
html += '<div style="display: none;" id="' + editor.id + 'ptsPostLinkList" class="ptsPostLinkList" data-postlink-to="#' + editor.id + '_ptsPostLinkListField"></div>';
html += tagIn+ '<span class="mce-input-name-txt">title</span> <input type="text" name="title" value="">'+ tagOut;
html += tagIn+ '<span><input type="checkbox" name="target_blank" value="1"> <span class="mce-input-name-txt">open link in a new window</span></span><span style="margin-left: 25px;"><input type="checkbox" name="rel_nofollow" value="1"> <span class="mce-input-name-txt">add nofollow attribute</span></span>'+ tagOut;
return html;
}
function _getControlPanel(e) {
return e.control.panel ? e.control.panel : e.control;
}
function updateContent(e) {
var control = _getControlPanel(e);
var href
, data = {}
, dom = editor.dom
, linkWnd = jQuery('#'+ control._id)
, hrefCtrl = linkWnd.find('[name="href"]')
, titleCtrl = linkWnd.find('[name="title"]')
, targetBlankCtrl = linkWnd.find('[name="target_blank"]')
, relNofollow = linkWnd.find('[name="rel_nofollow"]');
data.href = hrefCtrl.val();
data.title = titleCtrl.val();
data.target = targetBlankCtrl.attr('checked') ? '_blank' : null;
href = data.href;
if (relNofollow.prop('checked'))
data.rel = 'nofollow';
// Delay confirm since onSubmit will move focus
function delayedConfirm(message, callback) {
var rng = editor.selection.getRng();
window.setTimeout(function() {
editor.windowManager.confirm(message, function(state) {
editor.selection.setRng(rng);
callback(state);
});
}, 0);
}
function insertLink() {
var linkAttrs = {
href: href
, target: data.target ? data.target : null
, rel: data.rel ? data.rel : null
, "class": data["class"] ? data["class"] : null
, title: data.title ? data.title : null
};
if (control._lastAnchorElm) {
editor.focus();
dom.setAttribs(control._lastAnchorElm, linkAttrs);
control._lastSelection.select(control._lastAnchorElm);
editor.undoManager.add();
} else {
if (control._lastOnlyText) {
var newA = dom.createHTML('a', linkAttrs, dom.encode(control._lastSelContent));
editor.insertContent( newA );
if(!editor._lastCreatedNode) { // This is really bad, but we hope that this will not happens
console.error('Can not find last inserted node for '+ newA);
}
control._lastSelection.select( editor._lastCreatedNode );
updateSelections(e);
} else {
editor.execCommand('mceInsertLink', false, linkAttrs);
}
}
control._lastLinkSet = (new Date()).getMilliseconds();
}
if (!href) {
editor.execCommand('unlink');
return;
}
// Is email and not //user@domain.com
if (href.indexOf('@') > 0 && href.indexOf('//') == -1 && href.indexOf('mailto:') == -1) {
delayedConfirm(
'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
function(state) {
if (state) {
href = 'mailto:' + href;
}
insertLink();
}
);
return;
}
insertLink();
}
function updateSelections(e) {
var control = _getControlPanel(e);
var dom = editor.dom;
var selectedElm = editor.selection.getNode();
control._lastAnchorElm = dom.getParent(selectedElm, 'a[href]');
control._lastOnlyText = isOnlyTextSelected(control._lastAnchorElm);
control._lastSelContent = editor.selection.getContent();
control._lastSelNode = editor.selection.getNode();
control._lastSelection = editor.selection;
}
function isOnlyTextSelected(anchorElm) {
var html = editor.selection.getContent();
// Partial html and not a fully selected anchor element
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') == -1)) {
return false;
}
if (anchorElm) {
var nodes = anchorElm.childNodes, i;
if (nodes.length === 0) {
return false;
}
for (i = nodes.length - 1; i >= 0; i--) {
if (nodes[i].nodeType != 3) {
return false;
}
}
}
return true;
}
function updateLinkWnd(e) {
// TODO: Fix this to make it work in correct way
if(!e.control.panel) return;
var data = {}
, dom = editor.dom
, value;
var linkWnd = jQuery('#'+ e.control.panel._id)
, linkWndVisible = linkWnd.is(':visible')
, hrefCtrl = linkWnd.find('[name="href"]')
, titleCtrl = linkWnd.find('[name="title"]')
, targetBlankCtrl = linkWnd.find('[name="target_blank"]')
, relNofollow = linkWnd.find('[name="rel_nofollow"]');
if(!linkWndVisible) return;
// Move focus inside edit wnd
//hrefCtrl.focus();
var control = _getControlPanel(e);
if(!control._ptsInited) {
relNofollow.change(function () {
updateContent(e);
});
hrefCtrl.change(function(){
updateContent(e);
}).click(function(){
var clickTime = (new Date()).getMilliseconds();
if(control._lastLinkSet && clickTime - control._lastLinkSet <= 100) { // Input just clicked, but not focused - as wee need to move focus inside editor after link changed
jQuery(this).focus();
}
});
titleCtrl.change(function(){
updateContent(e);
}).click(function(){
var clickTime = (new Date()).getMilliseconds();
if(control._lastLinkSet && clickTime - control._lastLinkSet <= 100) { // Input just clicked, but not focused - as wee need to move focus inside editor after link changed
jQuery(this).focus();
}
});
targetBlankCtrl.change(function(){
updateContent(e);
});
ptsInitCustomCheckRadio( linkWnd );
control._ptsInited = true;
}
updateSelections(e);
data.href = control._lastAnchorElm ? dom.getAttrib(control._lastAnchorElm, 'href') : '';
if (control._lastAnchorElm) {
data.target = dom.getAttrib(control._lastAnchorElm, 'target');
} else if (editor.settings.default_link_target) {
data.target = editor.settings.default_link_target;
}
if ((value = dom.getAttrib(control._lastAnchorElm, 'rel'))) {
data.rel = value;
}
if ((value = dom.getAttrib(control._lastAnchorElm, 'class'))) {
data['class'] = value;
}
if ((value = dom.getAttrib(control._lastAnchorElm, 'title'))) {
data.title = value;
}
hrefCtrl.val( data.href );
titleCtrl.val( data.title ? data.title : '' );
data.target == '_blank'
? targetBlankCtrl.attr('checked', 'checked')
: targetBlankCtrl.removeAttr('checked');
ptsCheckUpdate( targetBlankCtrl );
}
var tabPostsHeight = null,
containerHeight = null;
editor.addButton('pts_link', {
type: 'panelbutton'
, icon: 'link'
, tooltip: 'Insert/edit link'
, shortcut: 'Meta+K'
, onclick: updateLinkWnd
, stateSelector: 'a[href]'
, panel: {
role: 'application'
, html: renderLinkEditor
, border: 1 // All other menus have border: 1 by default, this should look like same
, onshow: function () {
var fieldID = '#' + editor.id + '_ptsPostLinkListField',
listID = '#' + editor.id + 'ptsPostLinkList',
$field = jQuery(fieldID),
$list = jQuery(listID),
$container = $field.parents('.mce-container');
$field.focus(function () {
if (tabPostsHeight === null)
tabPostsHeight = $list.height();
if (containerHeight === null)
containerHeight = $container.height();
var ch = containerHeight + tabPostsHeight;
$container.css('height', ch);
$container.css('max-height', ch);
});
$field.on('postlink.hide', function () {
var ch = containerHeight;
$container.css('height', ch);
$container.css('max-height', ch);
});
}
, onhide: function(e) {
var fieldID = '#' + editor.id + '_ptsPostLinkListField',
$field = jQuery(fieldID),
$container = $field.parents('.mce-container');
var ch = containerHeight;
$container.css('height', ch);
$container.css('max-height', ch);
updateContent(e);
}
}
});
});
|
import styled, { css } from "styled-components";
import { Spinner } from "../../components/Loading/styles";
export const Container = styled.div`
margin-top: 30px;
${Spinner} {
height: 48px;
}
${props =>
props.loading &&
css`
height: 100%;
display: flex;
justify-content: center;
align-items: center;
`}
`;
export const Header = styled.header`
display: flex;
align-items: center;
img {
width: 250px;
height: 250px;
}
div {
margin-left: 20px;
span {
font-size: 11px;
color: #fff;
letter-spacing: 1.11px;
font-weight: 300;
}
h1 {
margin-top: 10px;
font-size: 48px;
}
p {
margin-top: 0;
color: #b3b3b3;
font-size: 11px;
letter-spacing: 1.11px;
text-transform: uppercase;
}
button {
background: #1dd854;
height: 32px;
border-radius: 16px;
color: #fff;
line-height: 32px;
padding: 0 35px;
border: 0;
margin-top: 10px;
font-size: 12px;
letter-spacing: 1.11px;
transition: 180ms;
&:hover {
opacity: 0.5;
}
}
}
`;
export const SongList = styled.table`
width: 100%;
text-align: left;
margin-top: 20px;
thead th {
font-size: 11px;
color: #b3b3b3;
letter-spacing: 1.11px;
font-weight: normal;
text-transform: uppercase;
padding: 5px 10px;
&:last-child {
text-align: right;
}
}
`;
export const SongItem = styled.tr`
td {
border-top: 1px solid #282828;
font-size: 13px;
padding: 0 10px;
line-height: 40px;
transition: 150ms;
background: ${props => (props.selected ? "#282828" : "transparent")};
color: ${props => (props.playing ? "#1ED760" : "#FFF")}
&:first-child {
width: 80px;
text-align: right;
}
&:last-child {
text-align: right;
}
}
&:hover td {
background: #282828;
}
`;
|
import { makeStyles, Theme, createStyles } from "@material-ui/core/styles";
export default makeStyles((theme: Theme) =>
createStyles({
editPanelInput: {
marginBottom : 30
},
}),
);
|
import { __assign } from "tslib";
import * as React from 'react';
import { StyledIconBase } from '../../StyledIconBase';
export var SignalCellularNull = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
};
return (React.createElement(StyledIconBase, __assign({ iconAttrs: attrs, iconVerticalAlign: "middle", iconViewBox: "0 0 24 24" }, props, { ref: ref }),
React.createElement("path", { d: "M20 6.83V20H6.83L20 6.83M22 2L2 22h20V2z", key: "k0" }),
React.createElement("path", { fill: "none", d: "M0 0h24v24H0z", key: "k1" })));
});
SignalCellularNull.displayName = 'SignalCellularNull';
export var SignalCellularNullDimensions = { height: 24, width: 24 };
|
//// [mappedTypeNestedGenericInstantiation.ts]
// Repro from #13346
interface Chainable<T> {
value(): T;
mapValues<U>(func: (v: T[keyof T]) => U): Chainable<{[k in keyof T]: U}>;
}
declare function chain<T>(t: T): Chainable<T>;
const square = (x: number) => x * x;
const v = chain({a: 1, b: 2}).mapValues(square).value();
//// [mappedTypeNestedGenericInstantiation.js]
// Repro from #13346
var square = function (x) { return x * x; };
var v = chain({ a: 1, b: 2 }).mapValues(square).value();
|
const Block = require('./block');
describe('Block', () => {
let data, lastBlock, block;
beforeEach(() => {
data = 'bar';
lastBlock = Block.genesis();
block = Block.mineBlock(lastBlock, data);
});
it('sets the `data` to match the input', () => {
expect(block.data).toEqual(data);
});
it('sets the `lastHash` to match the hash of the last block', () => {
expect(block.lastHash).toEqual(lastBlock.hash);
})
it('generates a hash that matches the difficulty', () => {
expect(block.hash.substring(0, block.difficulty))
.toEqual('0'.repeat(block.difficulty));
});
it('lowers the difficulty for slowly mined blocks', () => {
expect(Block.adjustDifficulty(block, block.timestamp+360000))
.toEqual(block.difficulty-1);
});
it("raises the difficulty for quickly mined blocks", () => {
expect(Block.adjustDifficulty(block, block.timestamp+1))
.toEqual(block.difficulty+1);
});
});
|
(function(e){function t(t){for(var n,l,u=t[0],s=t[1],c=t[2],p=0,v=[];p<u.length;p++)l=u[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&v.push(o[l][0]),o[l]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);i&&i(t);while(v.length)v.shift()();return a.push.apply(a,c||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],n=!0,u=1;u<r.length;u++){var s=r[u];0!==o[s]&&(n=!1)}n&&(a.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={app:0},a=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var u=window["webpackJsonp"]=window["webpackJsonp"]||[],s=u.push.bind(u);u.push=t,u=u.slice();for(var c=0;c<u.length;c++)t(u[c]);var i=s;a.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"034f":function(e,t,r){"use strict";var n=r("85ec"),o=r.n(n);o.a},"4c90":function(e,t,r){},"56d7":function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var n=r("2b0e"),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("img",{attrs:{alt:"Vue logo",src:r("cf05")}}),n("HelloWorld",{attrs:{msg:"欢迎来到 beck.js App"}})],1)},a=[],l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"hello"},[r("h1",[e._v(e._s(e.msg))]),e._m(0),r("h3",[e._v("Installed CLI Plugins")]),e._m(1),r("h3",[e._v("Essential Links")]),e._m(2),r("h3",[e._v("Ecosystem")]),e._m(3)])},u=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("p",[e._v(" For a guide and recipes on how to configure / customize this project,"),r("br"),e._v(" check out the "),r("a",{attrs:{href:"https://cli.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-cli documentation")]),e._v(". ")])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ul",[r("li",[r("a",{attrs:{href:"https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel",target:"_blank",rel:"noopener"}},[e._v("babel")])])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ul",[r("li",[r("a",{attrs:{href:"https://vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Core Docs")])]),r("li",[r("a",{attrs:{href:"https://forum.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Forum")])]),r("li",[r("a",{attrs:{href:"https://chat.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("Community Chat")])]),r("li",[r("a",{attrs:{href:"https://twitter.com/vuejs",target:"_blank",rel:"noopener"}},[e._v("Twitter")])]),r("li",[r("a",{attrs:{href:"https://news.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("News")])])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ul",[r("li",[r("a",{attrs:{href:"https://router.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-router")])]),r("li",[r("a",{attrs:{href:"https://vuex.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vuex")])]),r("li",[r("a",{attrs:{href:"https://github.com/vuejs/vue-devtools#vue-devtools",target:"_blank",rel:"noopener"}},[e._v("vue-devtools")])]),r("li",[r("a",{attrs:{href:"https://vue-loader.vuejs.org",target:"_blank",rel:"noopener"}},[e._v("vue-loader")])]),r("li",[r("a",{attrs:{href:"https://github.com/vuejs/awesome-vue",target:"_blank",rel:"noopener"}},[e._v("awesome-vue")])])])}],s={name:"HelloWorld",props:{msg:String}},c=s,i=(r("ccd1"),r("2877")),p=Object(i["a"])(c,l,u,!1,null,"379548a4",null),v=p.exports,f={name:"App",components:{HelloWorld:v}},h=f,_=(r("034f"),Object(i["a"])(h,o,a,!1,null,null,null)),g=_.exports;n["a"].config.productionTip=!1,new n["a"]({render:function(e){return e(g)}}).$mount("#app")},"85ec":function(e,t,r){},ccd1:function(e,t,r){"use strict";var n=r("4c90"),o=r.n(n);o.a},cf05:function(e,t,r){e.exports=r.p+"img/logo.82b9c7a5.png"}});
//# sourceMappingURL=app.38010cff.js.map
|
var express = require('express');
var fs = require('fs');
var path = require('path');
var httpProxy = require('http-proxy');
var util = require('./util');
var proxy = httpProxy.createProxyServer();
global.router = express.Router();
// 根据参数个数获取配置
function getOption(arg) {
var len = arg.length;
// 默认配置
var option = {
headers: {
'Cache-Control': 'no-cache'
},
statusCode: 200,
cookies: [],
timeout: 0
};
if (len === 0) {
return cgiMock;
} else if (len === 1) {
var newOption = arg[0];
if (util.isObject(newOption)) {
util.each(newOption, function (value, key) {
if (key === 'headers') {
util.each(newOption.headers, function (headervalue, headerkey) {
option.headers[headerkey] = newOption.headers[headerkey];
})
} else {
option[key] = newOption[key];
}
});
}
} else {
option.url = arg[0];
option.result = arg[1];
}
return option;
}
// 把基于 cgiMockfile 的相对绝对转成绝对路径
function parsePath(value) {
return path.join(global.cgiMockFilePath, value);
}
// log proxy data
proxy.on('open', function (proxySocket) {
proxySocket.on('data', function (chunk) {
console.log(chunk.toString());
});
});
proxy.on('proxyRes', function (proxyRes, req, res) {
console.log('RAW Response from the target', JSON.stringify(proxyRes.headers, true, 2));
});
proxy.on('error', function (e) {
console.log(e);
});
/**
* 数据模拟函数
*/
function cgiMock() {
var option = getOption(arguments);
if (!option.url || !option.result) {
return;
}
// option.method is one of ['get','post','delete','put'...]
var method = option.method || 'use';
global.router[method.toLowerCase()](option.url, function (req, res) {
setTimeout(function () {
// set header
res.set(option.headers);
// set Content-Type
option.type && res.type(option.type);
// set status code
res.status(option.statusCode);
// set cookie
util.each(option.cookies, function (item, index) {
var name = item.name;
var value = item.value;
delete item.name;
delete item.value;
res.cookie(name, value, item);
});
// do result
if (util.isFunction(option.result)) {
option.result(req, res);
} else if (util.isArray(option.result) || util.isObject(option.result)) {
!option.type && res.type('json');
res.json(option.result);
} else {
!option.type && res.type('text');
res.send(option.result.toString());
}
}, option.timeout);
});
}
// 规则之外的请求转发
cgiMock.proxy = function (host) {
process.nextTick(function () {
global.router.use(function (req, res) {
proxy.web(req, res, {
target: host,
secure: false
});
});
});
}
// 读取文件内容
cgiMock.file = function (file) {
return fs.readFileSync(parsePath(file));
}
cgiMock.prefix = '/';
module.exports = cgiMock;
|
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers',
'firebase'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {
templateUrl: '/partials/landing_page.html',
controller: 'LandingPageCtrl'
});
$routeProvider.when('/waitlist', {
templateUrl: '/partials/waitlist.html',
controller: 'WaitlistCtrl'
});
$routeProvider.when('/register', {
templateUrl: '/partials/register.html',
controller: 'AuthenticationCtrl'
});
$routeProvider.when('/login', {
templateUrl: '/partials/login.html',
controller: 'AuthenticationCtrl'
});
$routeProvider.otherwise({redirectTo: '/'});
}]);
|
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Image from "gatsby-image"
const Qualifications = () => {
const data = useStaticQuery(graphql`
query {
allFile(
filter: { relativeDirectory: { eq: "qualifications" } }
sort: { fields: name, order: ASC }
) {
edges {
node {
name
childImageSharp {
fixed(width: 260, quality: 100) {
...GatsbyImageSharpFixed
}
}
}
}
}
}
`)
return (
<>
<div className="qualifications">
<h3>Moje uprawnienia</h3>
<div className="qualifications-gallery">
{data.allFile.edges.map(edge => (
<div>
<Image
fixed={edge.node.childImageSharp.fixed}
key={edge.node.name}
alt="Diploma, certification"
/>
</div>
))}
</div>
</div>
</>
)
}
export default Qualifications
|
export default () => ({
request: {
method: "GET",
url: "https://httpbin.org",
path: "/get",
label: "",
auth: "None",
httpUser: "",
httpPassword: "",
passwordFieldType: "password",
bearerToken: "",
headers: [],
params: [],
bodyParams: [],
rawParams: "",
rawInput: false,
requestType: "",
contentType: ""
},
gql: {
url: "https://rickandmortyapi.com/graphql",
headers: [],
variablesJSONString: "",
query: ""
},
oauth2: {
tokens: [],
tokenReqs: [],
tokenReqSelect: "",
tokenReqName: "",
accessTokenName: "",
oidcDiscoveryUrl: "",
authUrl: "",
accessTokenUrl: "",
clientId: "",
scope: ""
}
});
|
// https://github.com/lencx/vite-plugin-rsw/issues/23#issuecomment-934974157
import { readFileSync, writeFileSync } from 'fs';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const SLASH = path.sep;
const p = './src/lib/wasm/wallet/wasm_code.js';
const fileName = path.resolve(`${__dirname}${SLASH}${p}`);
const re = /[^\n]*new URL[^\n]*/g;
try {
writeFileSync(fileName, readFileSync(fileName, 'utf8').replace(re, ''));
} catch {}
|
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var MouseHelper_1 = require("./utils/MouseHelper");
var Browser = require("./utils/Browser");
var EventEmitter_1 = require("./EventEmitter");
var SelectionModel_1 = require("./SelectionModel");
var Buffer_1 = require("./Buffer");
var DRAG_SCROLL_MAX_THRESHOLD = 50;
var DRAG_SCROLL_MAX_SPEED = 15;
var DRAG_SCROLL_INTERVAL = 50;
var WORD_SEPARATORS = ' ()[]{}\'"';
var NON_BREAKING_SPACE_CHAR = String.fromCharCode(160);
var ALL_NON_BREAKING_SPACE_REGEX = new RegExp(NON_BREAKING_SPACE_CHAR, 'g');
var SelectionMode;
(function (SelectionMode) {
SelectionMode[SelectionMode["NORMAL"] = 0] = "NORMAL";
SelectionMode[SelectionMode["WORD"] = 1] = "WORD";
SelectionMode[SelectionMode["LINE"] = 2] = "LINE";
})(SelectionMode || (SelectionMode = {}));
var SelectionManager = (function (_super) {
__extends(SelectionManager, _super);
function SelectionManager(_terminal, _buffer, _charMeasure) {
var _this = _super.call(this) || this;
_this._terminal = _terminal;
_this._buffer = _buffer;
_this._charMeasure = _charMeasure;
_this._enabled = true;
_this._initListeners();
_this.enable();
_this._model = new SelectionModel_1.SelectionModel(_terminal);
_this._activeSelectionMode = SelectionMode.NORMAL;
return _this;
}
SelectionManager.prototype._initListeners = function () {
var _this = this;
this._mouseMoveListener = function (event) { return _this._onMouseMove(event); };
this._mouseUpListener = function (event) { return _this._onMouseUp(event); };
this._buffer.lines.on('trim', function (amount) { return _this._onTrim(amount); });
};
SelectionManager.prototype.disable = function () {
this.clearSelection();
this._enabled = false;
};
SelectionManager.prototype.enable = function () {
this._enabled = true;
};
SelectionManager.prototype.setBuffer = function (buffer) {
this._buffer = buffer;
this.clearSelection();
};
Object.defineProperty(SelectionManager.prototype, "selectionStart", {
get: function () { return this._model.finalSelectionStart; },
enumerable: true,
configurable: true
});
Object.defineProperty(SelectionManager.prototype, "selectionEnd", {
get: function () { return this._model.finalSelectionEnd; },
enumerable: true,
configurable: true
});
Object.defineProperty(SelectionManager.prototype, "hasSelection", {
get: function () {
var start = this._model.finalSelectionStart;
var end = this._model.finalSelectionEnd;
if (!start || !end) {
return false;
}
return start[0] !== end[0] || start[1] !== end[1];
},
enumerable: true,
configurable: true
});
Object.defineProperty(SelectionManager.prototype, "selectionText", {
get: function () {
var start = this._model.finalSelectionStart;
var end = this._model.finalSelectionEnd;
if (!start || !end) {
return '';
}
var startRowEndCol = start[1] === end[1] ? end[0] : null;
var result = [];
result.push(this._buffer.translateBufferLineToString(start[1], true, start[0], startRowEndCol));
for (var i = start[1] + 1; i <= end[1] - 1; i++) {
var bufferLine = this._buffer.lines.get(i);
var lineText = this._buffer.translateBufferLineToString(i, true);
if (bufferLine.isWrapped) {
result[result.length - 1] += lineText;
}
else {
result.push(lineText);
}
}
if (start[1] !== end[1]) {
var bufferLine = this._buffer.lines.get(end[1]);
var lineText = this._buffer.translateBufferLineToString(end[1], true, 0, end[0]);
if (bufferLine.isWrapped) {
result[result.length - 1] += lineText;
}
else {
result.push(lineText);
}
}
var formattedResult = result.map(function (line) {
return line.replace(ALL_NON_BREAKING_SPACE_REGEX, ' ');
}).join(Browser.isMSWindows ? '\r\n' : '\n');
return formattedResult;
},
enumerable: true,
configurable: true
});
SelectionManager.prototype.clearSelection = function () {
this._model.clearSelection();
this._removeMouseDownListeners();
this.refresh();
};
SelectionManager.prototype.refresh = function (isNewSelection) {
var _this = this;
if (!this._refreshAnimationFrame) {
this._refreshAnimationFrame = window.requestAnimationFrame(function () { return _this._refresh(); });
}
if (Browser.isLinux && isNewSelection) {
var selectionText = this.selectionText;
if (selectionText.length) {
this.emit('newselection', this.selectionText);
}
}
};
SelectionManager.prototype._refresh = function () {
this._refreshAnimationFrame = null;
this.emit('refresh', { start: this._model.finalSelectionStart, end: this._model.finalSelectionEnd });
};
SelectionManager.prototype.selectAll = function () {
this._model.isSelectAllActive = true;
this.refresh();
};
SelectionManager.prototype._onTrim = function (amount) {
var needsRefresh = this._model.onTrim(amount);
if (needsRefresh) {
this.refresh();
}
};
SelectionManager.prototype._getMouseBufferCoords = function (event) {
var coords = this._terminal.mouseHelper.getCoords(event, this._terminal.element, this._charMeasure, this._terminal.options.lineHeight, this._terminal.cols, this._terminal.rows, true);
if (!coords) {
return null;
}
coords[0]--;
coords[1]--;
coords[1] += this._terminal.buffer.ydisp;
return coords;
};
SelectionManager.prototype._getMouseEventScrollAmount = function (event) {
var offset = MouseHelper_1.MouseHelper.getCoordsRelativeToElement(event, this._terminal.element)[1];
var terminalHeight = this._terminal.rows * Math.ceil(this._charMeasure.height * this._terminal.options.lineHeight);
if (offset >= 0 && offset <= terminalHeight) {
return 0;
}
if (offset > terminalHeight) {
offset -= terminalHeight;
}
offset = Math.min(Math.max(offset, -DRAG_SCROLL_MAX_THRESHOLD), DRAG_SCROLL_MAX_THRESHOLD);
offset /= DRAG_SCROLL_MAX_THRESHOLD;
return (offset / Math.abs(offset)) + Math.round(offset * (DRAG_SCROLL_MAX_SPEED - 1));
};
SelectionManager.prototype.onMouseDown = function (event) {
if (event.button === 2 && this.hasSelection) {
return;
}
if (event.button !== 0) {
return;
}
if (!this._enabled) {
var shouldForceSelection = Browser.isMac ? event.altKey : event.shiftKey;
if (!shouldForceSelection) {
return;
}
event.stopPropagation();
}
event.preventDefault();
this._dragScrollAmount = 0;
if (this._enabled && event.shiftKey) {
this._onIncrementalClick(event);
}
else {
if (event.detail === 1) {
this._onSingleClick(event);
}
else if (event.detail === 2) {
this._onDoubleClick(event);
}
else if (event.detail === 3) {
this._onTripleClick(event);
}
}
this._addMouseDownListeners();
this.refresh(true);
};
SelectionManager.prototype._addMouseDownListeners = function () {
var _this = this;
this._terminal.element.ownerDocument.addEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.ownerDocument.addEventListener('mouseup', this._mouseUpListener);
this._dragScrollIntervalTimer = setInterval(function () { return _this._dragScroll(); }, DRAG_SCROLL_INTERVAL);
};
SelectionManager.prototype._removeMouseDownListeners = function () {
this._terminal.element.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);
clearInterval(this._dragScrollIntervalTimer);
this._dragScrollIntervalTimer = null;
};
SelectionManager.prototype._onIncrementalClick = function (event) {
if (this._model.selectionStart) {
this._model.selectionEnd = this._getMouseBufferCoords(event);
}
};
SelectionManager.prototype._onSingleClick = function (event) {
this._model.selectionStartLength = 0;
this._model.isSelectAllActive = false;
this._activeSelectionMode = SelectionMode.NORMAL;
this._model.selectionStart = this._getMouseBufferCoords(event);
if (!this._model.selectionStart) {
return;
}
this._model.selectionEnd = null;
var line = this._buffer.lines.get(this._model.selectionStart[1]);
if (!line) {
return;
}
if (line.length >= this._model.selectionStart[0]) {
return;
}
var char = line[this._model.selectionStart[0]];
if (char[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
this._model.selectionStart[0]++;
}
};
SelectionManager.prototype._onDoubleClick = function (event) {
var coords = this._getMouseBufferCoords(event);
if (coords) {
this._activeSelectionMode = SelectionMode.WORD;
this._selectWordAt(coords);
}
};
SelectionManager.prototype._onTripleClick = function (event) {
var coords = this._getMouseBufferCoords(event);
if (coords) {
this._activeSelectionMode = SelectionMode.LINE;
this._selectLineAt(coords[1]);
}
};
SelectionManager.prototype._onMouseMove = function (event) {
event.stopImmediatePropagation();
var previousSelectionEnd = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
this._model.selectionEnd = this._getMouseBufferCoords(event);
if (!this._model.selectionEnd) {
this.refresh(true);
return;
}
if (this._activeSelectionMode === SelectionMode.LINE) {
if (this._model.selectionEnd[1] < this._model.selectionStart[1]) {
this._model.selectionEnd[0] = 0;
}
else {
this._model.selectionEnd[0] = this._terminal.cols;
}
}
else if (this._activeSelectionMode === SelectionMode.WORD) {
this._selectToWordAt(this._model.selectionEnd);
}
this._dragScrollAmount = this._getMouseEventScrollAmount(event);
if (this._dragScrollAmount > 0) {
this._model.selectionEnd[0] = this._terminal.cols - 1;
}
else if (this._dragScrollAmount < 0) {
this._model.selectionEnd[0] = 0;
}
if (this._model.selectionEnd[1] < this._buffer.lines.length) {
var char = this._buffer.lines.get(this._model.selectionEnd[1])[this._model.selectionEnd[0]];
if (char && char[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
this._model.selectionEnd[0]++;
}
}
if (!previousSelectionEnd ||
previousSelectionEnd[0] !== this._model.selectionEnd[0] ||
previousSelectionEnd[1] !== this._model.selectionEnd[1]) {
this.refresh(true);
}
};
SelectionManager.prototype._dragScroll = function () {
if (this._dragScrollAmount) {
this._terminal.scrollDisp(this._dragScrollAmount, false);
if (this._dragScrollAmount > 0) {
this._model.selectionEnd = [this._terminal.cols - 1, this._terminal.buffer.ydisp + this._terminal.rows];
}
else {
this._model.selectionEnd = [0, this._terminal.buffer.ydisp];
}
this.refresh();
}
};
SelectionManager.prototype._onMouseUp = function (event) {
this._removeMouseDownListeners();
};
SelectionManager.prototype._convertViewportColToCharacterIndex = function (bufferLine, coords) {
var charIndex = coords[0];
for (var i = 0; coords[0] >= i; i++) {
var char = bufferLine[i];
if (char[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
charIndex--;
}
else if (char[Buffer_1.CHAR_DATA_CHAR_INDEX].length > 1 && coords[0] !== i) {
charIndex += char[Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
}
}
return charIndex;
};
SelectionManager.prototype.setSelection = function (col, row, length) {
this._model.clearSelection();
this._removeMouseDownListeners();
this._model.selectionStart = [col, row];
this._model.selectionStartLength = length;
this.refresh();
};
SelectionManager.prototype._getWordAt = function (coords) {
var bufferLine = this._buffer.lines.get(coords[1]);
if (!bufferLine) {
return null;
}
var line = this._buffer.translateBufferLineToString(coords[1], false);
var startIndex = this._convertViewportColToCharacterIndex(bufferLine, coords);
var endIndex = startIndex;
var charOffset = coords[0] - startIndex;
var leftWideCharCount = 0;
var rightWideCharCount = 0;
var leftLongCharOffset = 0;
var rightLongCharOffset = 0;
if (line.charAt(startIndex) === ' ') {
while (startIndex > 0 && line.charAt(startIndex - 1) === ' ') {
startIndex--;
}
while (endIndex < line.length && line.charAt(endIndex + 1) === ' ') {
endIndex++;
}
}
else {
var startCol = coords[0];
var endCol = coords[0];
if (bufferLine[startCol][Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
leftWideCharCount++;
startCol--;
}
if (bufferLine[endCol][Buffer_1.CHAR_DATA_WIDTH_INDEX] === 2) {
rightWideCharCount++;
endCol++;
}
if (bufferLine[endCol][Buffer_1.CHAR_DATA_CHAR_INDEX].length > 1) {
rightLongCharOffset += bufferLine[endCol][Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
endIndex += bufferLine[endCol][Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
}
while (startCol > 0 && startIndex > 0 && !this._isCharWordSeparator(bufferLine[startCol - 1])) {
var char = bufferLine[startCol - 1];
if (char[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
leftWideCharCount++;
startCol--;
}
else if (char[Buffer_1.CHAR_DATA_CHAR_INDEX].length > 1) {
leftLongCharOffset += char[Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
startIndex -= char[Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
}
startIndex--;
startCol--;
}
while (endCol < bufferLine.length && endIndex + 1 < line.length && !this._isCharWordSeparator(bufferLine[endCol + 1])) {
var char = bufferLine[endCol + 1];
if (char[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 2) {
rightWideCharCount++;
endCol++;
}
else if (char[Buffer_1.CHAR_DATA_CHAR_INDEX].length > 1) {
rightLongCharOffset += char[Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
endIndex += char[Buffer_1.CHAR_DATA_CHAR_INDEX].length - 1;
}
endIndex++;
endCol++;
}
}
endIndex++;
var start = startIndex
+ charOffset
- leftWideCharCount
+ leftLongCharOffset;
var length = Math.min(this._terminal.cols, endIndex
- startIndex
+ leftWideCharCount
+ rightWideCharCount
- leftLongCharOffset
- rightLongCharOffset);
return { start: start, length: length };
};
SelectionManager.prototype._selectWordAt = function (coords) {
var wordPosition = this._getWordAt(coords);
if (wordPosition) {
this._model.selectionStart = [wordPosition.start, coords[1]];
this._model.selectionStartLength = wordPosition.length;
}
};
SelectionManager.prototype._selectToWordAt = function (coords) {
var wordPosition = this._getWordAt(coords);
if (wordPosition) {
this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? wordPosition.start : (wordPosition.start + wordPosition.length), coords[1]];
}
};
SelectionManager.prototype._isCharWordSeparator = function (charData) {
if (charData[Buffer_1.CHAR_DATA_WIDTH_INDEX] === 0) {
return false;
}
return WORD_SEPARATORS.indexOf(charData[Buffer_1.CHAR_DATA_CHAR_INDEX]) >= 0;
};
SelectionManager.prototype._selectLineAt = function (line) {
this._model.selectionStart = [0, line];
this._model.selectionStartLength = this._terminal.cols;
};
return SelectionManager;
}(EventEmitter_1.EventEmitter));
exports.SelectionManager = SelectionManager;
//# sourceMappingURL=SelectionManager.js.map
|
/*
* Body
*/
function clearBody() {
$('#content-right #content-right-body #list').html('');
}
function setBody(bodyHtml) {
$('#content-right #content-right-body #list').html(bodyHtml);
}
function getBody() {
return $('#content-right #content-right-body #list').html();
}
function setNothingToShowBody(icon, id, warning) {
if(!id || !$('#' + id).get(0)) {
id = !id ? '' : id;
setGridLayout(false);
let $body =
`<span id="${id}" class="nothing-to-show">
<br>
${icon}
<br><br>
${i18n.__('Nothing to show')}
${(warning ?
`<br><br>
<span class="warning">
${i18n.__(warning)}
</span>` : '')}
</span>`;
if(id === 'feed-nothing-to-show')
allFeeds.ui.getHeader().after($body);
else
setBody($body);
}
}
/*
* Header
*/
function clearHeader() {
$('#content-right #content-right-header h1').html('');
}
function setHeader(headerHtml, buttonHtml) {
if(headerHtml != undefined)
$('#content-right #content-right-header h1').html(headerHtml);
if(buttonHtml != undefined)
$('#content-right #content-right-header div').html(buttonHtml);
}
function getHeader() {
return $('#content-right #content-right-header h1').html();
}
function generateHtmlTitle(title) {
return '<span>' + i18n.__(title) + '</span>'
}
/*
* Page
*/
/*
function showPage(headerHtml, bodyHtml) {
setHeader(headerHtml)
setBody(bodyHtml)
} */
function setScrollPositionOnTop() {
$('#content-right').scrollTop(0);
}
function removeContentRightHeader() {
$('#content-right').addClass('header-null');
}
function setContentRightHeader() {
$('#content-right').removeClass('header-null');
}
|
(function (angular) {
'use strict';
angular.module('myApp.services', ['myApp.model']);
})(window.angular);
|
var test = require('tape');
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');
var spawn = require('win-spawn');
var split = require('split');
var cmd = path.resolve(__dirname, '../bin/cmd.js');
var os = require('os');
var tmpdir = path.join((os.tmpdir || os.tmpDir)(), 'watchify-' + Math.random());
var files = {
main: path.join(tmpdir, 'main.js'),
beep: path.join(tmpdir, 'beep.js'),
boop: path.join(tmpdir, 'boop.js'),
robot: path.join(tmpdir, 'node_modules', 'robot', 'index.js'),
bundle: path.join(tmpdir, 'bundle.js')
};
mkdirp.sync(tmpdir);
mkdirp.sync(path.dirname(files.robot));
fs.writeFileSync(files.main, [
'var beep = require("./beep");',
'var boop = require("./boop");',
'var robot = require("robot");',
'console.log(beep + " " + boop + " " + robot);'
].join('\n'));
fs.writeFileSync(files.beep, 'module.exports = "beep";');
fs.writeFileSync(files.boop, 'module.exports = "boop";');
fs.writeFileSync(files.robot, 'module.exports = "robot";');
test('api ignore watch', function (t) {
t.plan(4);
var ps = spawn(cmd, [
files.main,
'--ignore-watch',
'-o', files.bundle,
'-v'
]);
var lineNum = 0;
ps.stderr.pipe(split()).on('data', function (line) {
lineNum ++;
if (lineNum === 1) {
run(files.bundle, function (err, output) {
t.ifError(err);
t.equal(output, 'beep boop robot\n');
fs.writeFileSync(files.beep, 'module.exports = "BEEP";');
fs.writeFileSync(files.boop, 'module.exports = "BOOP";');
fs.writeFileSync(files.robot, 'module.exports = "ROBOT";');
});
}
else if (lineNum === 2) {
run(files.bundle, function (err, output) {
t.ifError(err);
t.equal(output, 'BEEP BOOP robot\n');
ps.kill();
});
}
});
});
function run (file, cb) {
var ps = spawn(process.execPath, [ file ]);
var data = [];
ps.stdout.on('data', function (buf) { data.push(buf) });
ps.stdout.on('end', function () {
cb(null, Buffer.concat(data).toString('utf8'));
});
ps.on('error', cb);
return ps;
}
|
import React from "react";
import { withStyles } from "@material-ui/core/styles"
import { t } from "../utils/t";
import Button from "@material-ui/core/Button";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogContentText from "@material-ui/core/DialogContentText";
import DialogTitle from "@material-ui/core/DialogTitle";
import TableBody from "@material-ui/core/TableBody";
import TableRow from "@material-ui/core/TableRow";
import TableCell from "@material-ui/core/TableCell";
import Table from "@material-ui/core/Table";
import { HISTORY } from "../utils/constants";
import api from "../utils/api";
const styles = theme => ({
dialog: {
[theme.breakpoints.down("xs")]: {
"& .MuiDialog-container .MuiDialog-paper": {
margin: "0px 0px",
maxHeight: "100%",
borderRadius: 0
},
}
},
dialogBody: {
overflowY: "auto",
display: "flex",
flexDirection: "column"
},
tableCellBold: {
fontWeight: "bold"
},
underline: {
textDecoration: "underline"
}
});
class AddressDialog extends React.Component {
constructor(props) {
super(props);
this.state = {
classes: props.classes,
coin_id: props.coin_id,
logged_account: props.logged_account,
open: props.open,
_address: null,
_public_key: null,
_private_key: null,
_history: HISTORY
};
};
componentWillReceiveProps(new_props) {
const { coin_id, logged_account } = this.state;
this.setState({...new_props}, () => {
if(logged_account) {
if( coin_id !== new_props.coin_id || logged_account.name !== new_props.logged_account.name ) {
this._get_address_and_keys_data();
}
}
});
};
componentDidMount() {
this._get_address_and_keys_data();
}
_reset_state = () => {
setTimeout(() => {
this.setState({
_address: null,
_public_key: null,
_private_key: null,
});
}, 500);
};
_on_close = (event, account) => {
this._reset_state();
this.props.onClose(event, account);
};
_on_cancel = (event, account) => {
this._reset_state();
this.props.cancel(event, account);
};
_get_address_and_keys_data() {
const { coin_id, logged_account } = this.state;
if(coin_id && logged_account) {
const _address = api.get_address_by_seed(coin_id, logged_account.seed, logged_account.hive_username);
const _public_key = api.get_public_key_by_seed(coin_id, logged_account.seed, logged_account.hive_username, logged_account.hive_password);
const _private_key = api.get_private_key_by_seed(coin_id, logged_account.seed, logged_account.hive_username, logged_account.hive_password);
this.setState({_address, _public_key, _private_key});
}
}
_open_link = (event, link) => {
const { _history } = this.state;
_history.push(link);
};
render() {
const { classes, _address, _public_key, _private_key, coin_id, open } = this.state;
return (
<Dialog
open={open}
onClose={(event) => {this._on_close(event, coin_id)}}
className={classes.dialog}
aria-labelledby="show-address-and-keys-dialog-title"
aria-describedby="show-address-and-keys-dialog-description"
>
{
(_address && _public_key && _private_key) ?
<div className={classes.dialogBody}>
<DialogTitle id="show-address-and-keys-dialog-title" className={classes.breakWord}>{t( "components.address_dialog.title", {coin_id})}</DialogTitle>
<DialogContent className={classes.dialogBody} >
<DialogContentText id="show-address-and-keys-dialog-description">
<Table>
<Table aria-label="main-info-table">
<TableBody>
<TableRow>
<TableCell align="left" className={classes.tableCellBold}>{t( "words.address", {FLC: true})}</TableCell>
<TableCell align="right">{_address}</TableCell>
</TableRow>
<TableRow>
<TableCell align="left" className={classes.tableCellBold}>{t( "words.public key", {FLC: true})}</TableCell>
<TableCell align="right">{_public_key}</TableCell>
</TableRow>
<TableRow>
<TableCell align="left" className={classes.tableCellBold}>{t( "words.private key", {FLC: true})}</TableCell>
<TableCell align="right">{_private_key}</TableCell>
</TableRow>
<TableRow>
<TableCell align="left" className={classes.tableCellBold}>{t( "words.crypto id", {FLC: true})}</TableCell>
<TableCell align="right" className={classes.underline} onClick={(event) => {this._open_link(event, "/coins/" + coin_id + "/transactions")}}>{coin_id}</TableCell>
</TableRow>
</TableBody>
</Table>
</Table>
</DialogContentText>
</DialogContent>
</div>: null
}
<DialogActions>
<Button onClick={(event) => {this._on_cancel(event, coin_id)}} color="primary" autoFocus>
{t( "words.close")}
</Button>
</DialogActions>
</Dialog>
);
}
}
export default withStyles(styles)(AddressDialog);
|
import React from 'react';
function Q(props) {
return <div><b>Q: {props.children}</b></div>;
}
function A(props) {
return <div>A: {props.children}<br /><br /></div>;
}
export default function FAQ(props) {
return <div className='faq'>
<h1>Kulinda's Mount Adoption Helper</h1>
<h2>FAQ</h2>
<Q>What does this tool do?</Q>
<A>It attempts to calculate the best strategy to purchase your favourite mount skins from a mount adoption pack. Select a mount adaption pack (at the top of the screen) and get started!</A>
<Q>How do the formulas work?</Q>
<A>For the original mount adoption pack, I've explained the math in a <a href="https://www.reddit.com/r/Guildwars2/comments/7cfbcr/mounts_and_math_how_much_for_the_skins_you_want/" target="_blank" rel="noopener noreferrer">reddit post</a>. The math changed somewhat with the introduction of the Mount Select Licenses in the second pack.<br />
This tool uses <a href="https://en.wikipedia.org/wiki/Dynamic_programming" target="_blank" rel="noopener noreferrer">dynamic programming</a> to brute-force the best strategy at any point in time. See the source code on github, <a href="https://github.com/kulinda/mounts/blob/master/src/calculate.js" target="_blank" rel="noopener noreferrer">calculate.js</a>.</A>
<Q>My desires are more complicated than purchasing a set of skins. For example, I just need one skimmer skin, no matter which.</Q>
<A>That gets complicated real quick, and this tool is not intended to answer all those questions. You can find some math and values in the reddit thread linked in the previous question, and it's useful to know about the <a href="https://en.wikipedia.org/wiki/Hypergeometric_distribution" target="_blank" rel="noopener noreferrer">Hypergeometric distribution</a>.</A>
<Q>What are the individual drop chances for each skin?</Q>
<A>This tool assumes that all skins in each pack have the same drop chance. There is no significant evidence for any bias.</A>
<Q>What dyes should I use on my mount?</Q>
<A>Funny you should ask, because I made a <a href="https://kulinda.github.io/dyes/" target="_blank" rel="noopener noreferrer">GW2 Dye Browser</a>. Check it out.</A>
<Q>I had bad luck and spent way more gems than the tool predicted!</Q>
<A>Tough. No refunds.</A>
<Q>I had good luck and now I have all these gems left over!</Q>
<A>Tough. No refunds.</A>
<Q>Some icons are missing, or gem prices are outdated!</Q>
<A>Tough. No refunds. Icons are pulled directly from the wiki. Edit the wiki to fix them. You can adjust gem prices yourself; I will not patch this tool for every gem store update.</A>
<Q>There's a a different bug in this tool!</Q>
<A>Tough. No refunds. Send me a <a href="https://github.com/kulinda/mounts" target="_blank" rel="noopener noreferrer">pull request</a> with fixes if you like.</A>
<Q>This tool has helped me a lot. How can I thank you?</Q>
<A>Be excellent to each other. Avoid toxicity and negativity. Help new players. Organize events. Tag up at metas and provide explanations. Listen to your commanders.<br />
It's in every player's power to make the game a better place for everyone. I'm doing my part with research and programming. You go do yours.</A>
<h2>Copyright, legal notices and contact</h2>
See <a href="https://kulinda.github.io/" target="_blank" rel="noopener noreferrer">kulinda.github.io</a>.
<br />
<br />
</div>;
}
|
/* eslint-disable no-unused-expressions */
import { html, fixture, expect, elementUpdated } from '@open-wc/testing';
import '../index.js';
describe('fx-control tests', () => {
it('is creates a native input when no control is provided', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model id="model1">
<fx-instance>
<data>
<item>foobar</item>
<checked>true</checked>
</data>
<fx-bind ref="item"></fx-bind>
<fx-bind ref="checked"></fx-bind>
</fx-instance>
</fx-model>
<fx-group>
<fx-control id="input1" ref="item">
<label slot="label">with onblur handler</label>
</fx-control>
</fx-group>
</fx-fore>
`);
// await elementUpdated(el);
const bound = el.querySelector('#input1');
expect(bound).to.exist;
const input = bound.widget;
expect(input).to.exist;
expect(bound.modelItem.value).to.equal('foobar');
expect(input.value).to.equal('foobar');
bound.modelItem.value = 'new';
// input.blur();
// await oneEvent(bound, 'value-changed');
// expect(bound.modelItem.value).to.equal('new');
});
it('is initialized', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model id="model1">
<fx-instance>
<data>
<item>foobar</item>
<checked>true</checked>
</data>
<fx-bind ref="item"></fx-bind>
<fx-bind ref="checked"></fx-bind>
</fx-instance>
</fx-model>
<fx-group>
<fx-control id="input1" ref="item" update-event="blur" value-prop="value">
<label>with onblur handler</label>
<input class="widget" name="value" value="" />
</fx-control>
</fx-group>
</fx-fore>
`);
// await elementUpdated(el);
// await oneEvent(el, 'refresh-done');
const bound = el.querySelector('#input1');
expect(bound).to.exist;
const control = document.querySelector('.widget');
expect(bound.widget).to.equal(control);
});
it('creates fx-control', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model id="model1">
<fx-instance>
<data>
<item>foobar</item>
<checked>true</checked>
</data>
<fx-bind ref="item"></fx-bind>
<fx-bind ref="checked"></fx-bind>
</fx-instance>
</fx-model>
<fx-group>
<fx-control id="input1" ref="item" update-event="blur" value-prop="value">
<label slot="label">with onblur handler</label>
<input name="value" value="" />
</fx-control>
</fx-group>
</fx-fore>
`);
await elementUpdated(el);
const bound = el.querySelector('#input1');
expect(bound).to.exist;
});
it('it updates when update event fires', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model id="model1">
<fx-instance>
<data>
<item>foobar</item>
<checked>true</checked>
</data>
<fx-bind ref="item"></fx-bind>
<fx-bind ref="checked"></fx-bind>
</fx-instance>
</fx-model>
<fx-group>
<fx-control id="input1" ref="item" update-event="blur" value-prop="value">
<label slot="label">with onblur handler</label>
<input id="input1" name="value" value="">
</fx-control>
</fx-group>
<fx-setvalue event="refresh-done" ref="item"">foo</fx-setvalue>
</fx-fore>
`);
// await elementUpdated(el);
const bound = el.querySelector('#input1');
expect(bound).to.exist;
const i1 = document.getElementById('input1');
i1.value = 'foo';
i1.blur();
expect(i1.value).to.equal('foo');
});
it('initialzes native select', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model>
<fx-instance>
<data>
<listitem>foo</listitem>
</data>
</fx-instance>
</fx-model>
<fx-group>
<fx-control ref="listitem" update-event="change">
<label slot="label">native select</label>
<select class="fxWidget">
<option value=""></option>
<option value="foo">foo</option>
<option value="bar">bar</option>
<select>
</fx-control>
</fx-group>
</fx-fore>
`);
// await elementUpdated(el);
const bound = el.querySelector('fx-control');
expect(bound).to.exist;
expect(bound.valueProp).to.equal('value');
expect(bound[bound.valueProp]).to.equal('foo');
const select = el.querySelector('select');
expect(select).to.exist;
console.log('select value ', select.value);
// expect(select.value).to.equal('foo');
});
it('does not show trigger bound to non-existing node', async () => {
const el = await fixture(html`
<fx-fore>
<fx-model>
<fx-instance>
<data>
<listitem>foo</listitem>
</data>
</fx-instance>
</fx-model>
<fx-trigger ref="foo">
<button>foo</button>
</fx-trigger>
</fx-fore>
`);
// await elementUpdated(el);
const bound = el.querySelector('fx-trigger');
expect(bound).to.exist;
expect(bound.style.display).to.equal('none');
});
/*
it('is initialized', async () => {
const el = (
await fixture(html`
<fx-fore>
<fx-model id="model1">
<fx-instance>
<data>
<item>foobar</item>
<checked>true</checked>
</data>
<fx-bind ref="item"></fx-bind>
<fx-bind ref="checked"></fx-bind>
</fx-instance>
</fx-model>
<fx-group>
<fx-control id="input1" ref="item" update-event="blur" value-prop="value">
<label slot="label">with onblur handler</label>
<input name="value" value="">
</fx-control>
<fx-control id="input2" ref="item" update-event="input">
<label slot="label">with incremental handler</label>
<input name="value" value="">
</fx-control>
<fx-control id="input3" ref="checked" update-event="input" value-prop="checked">
<label slot="label">with incremental handler</label>
<input name="value" type="checkbox">
</fx-control>
</fx-group>
</fx-fore>
`)
);
await elementUpdated(el);
expect(bind).to.exist;
});
*/
});
|
import React, { Component } from 'react';
import SignInForm from './signinForm';
import PageTitle from '../pageTitle';
import {connect} from "react-redux";
import * as actions from "../../actions";
class SignIn extends Component {
componentDidMount() {
this.props.setHeaderLinks([]);
this.props.setNavbarLinks([]);
}
onSubmit = (fields) => {
console.log(fields);
}
render() {
return (
<div className='sign-in'>
<PageTitle className="sign-in__page-title" title="Login"/>
<SignInForm onSubmit={this.onSubmit} className='sign-in__form' />
</div>
)
}
}
SignIn = connect(null, actions)(SignIn);
export default SignIn;
|
/*
* Copyright 2020 Jonathan Magaru <jonathan.magaru.code@gmail.com>
* Licensed under the MIT license. See LICENSE.
*
* Cuebot-web | Script Initialization with sample scripts
*/
const fs = require("fs");
module.exports.default = () => {
// Initiate folder creation
const featureLocation = "./features";
const reportLocation = "./reports";
process.stdout.write("Creating features folder...");
if (!fs.existsSync(featureLocation)) {
fs.mkdirSync(featureLocation);
process.stdout.write("done.\n");
} else {
process.stdout.write("already exists.\n");
}
// Creating sample feature file
process.stdout.write("Creating initial feature...");
let feature_template =
"@cuebot \nFeature: My Sample Feature\n" +
"\tAs Automation engineer\n" +
"\tI want to verify that all functionality are working as they should\n\n" +
"\t@sample\n" +
"\tScenario: My Sample Scenario\n" +
"\t\tGiven my search keyword is 'YouTube'\n" +
"\t\tWhen I search the keyword on Google\n" +
"\t\tThen I can see keyword 'YouTube' on search result page\n\n" +
"";
fs.writeFileSync(featureLocation + "/sample.feature", feature_template);
process.stdout.write("done.\n");
};
|
// @flow
const Supply = require("supply");
const Promise = require("bluebird");
const _ = require("lodash");
const debug = require("debug")("hull-connector:worker");
/**
* Background worker using QueueAdapter.
*/
class Worker {
queueAdapter: Object;
instrumentation: Object;
res: Object;
supply: Supply;
jobs: Object;
constructor({ queue, instrumentation, jobs }: Object) {
if (!queue) {
throw new Error(
"Worker initialized without all required dependencies: queue"
);
}
this.queueAdapter = queue.adapter;
this.instrumentation = instrumentation;
this.supply = new Supply();
this.setJobs(jobs);
// this.use(queue.contextMiddleware());
// this.use(cache.contextMiddleware());
// this.use(instrumentation.contextMiddleware());
// instrument jobs between 1 and 5 minutes
setInterval(this.metricJobs.bind(this), _.random(60000, 300000));
setInterval(
this.queueAdapter.clean.bind(this.queueAdapter),
_.random(60000, 300000)
);
}
metricJobs = () =>
Promise.all([
this.queueAdapter.inactiveCount(),
this.queueAdapter.failedCount()
]).spread((inactiveCount, failedCount) => {
this.instrumentation.metricVal("ship.queue.waiting", inactiveCount);
this.instrumentation.metricVal("ship.queue.failed", failedCount);
});
use = (middleware: Function) => {
this.supply.use(middleware);
return this;
};
setJobs(jobs: Object) {
this.jobs = jobs;
}
process(queueName?: string = "queueApp") {
this.queueAdapter.process(queueName, this.dispatch);
return this;
}
dispatch = async (job: Object) => {
if (_.isEmpty(job.data)) {
return undefined;
}
const { data, id } = job;
const { name } = data;
const req = {
headers: {},
// @TODO: This keeps compatibility with bodyParser which looks for a Headers hash
..._.cloneDeep(data.context)
};
const payload = _.cloneDeep(data.payload);
const res = {};
const startTime = process.hrtime();
return Promise.fromCallback(callback => {
this.instrumentation.startTransaction(name, async () => {
try {
await this.runMiddleware(req, res);
const { client, metric } = req.hull;
if (!this.jobs[name]) {
const err = new Error(`Job not found: ${name}`);
client.logger.error(err.message);
throw err;
}
client.logger.debug("dispatch", { id, name });
metric.increment(`ship.job.${name}.start`);
const jobResponse = await this.jobs[name].call(
job,
req.hull,
payload,
job
);
callback(null, jobResponse);
} catch (err) {
debug("Worker Error", err, err.stack);
req.hull.metric.increment(`ship.job.${name}.error`);
this.instrumentation.captureException(
err,
{
job_id: id,
job_payload: payload
},
{
job_name: name,
organization: _.get(data.context, "query.organization"),
ship: _.get(data.context, "query.ship")
}
);
callback(err);
}
this.instrumentation.endTransaction();
const duration = process.hrtime(startTime);
const ms = duration[0] * 1000 + duration[1] / 1000000;
req.hull.metric.value(`ship.job.${name}.duration`, ms);
});
});
};
runMiddleware = (req: Object, res: Object) =>
Promise.fromCallback(callback => {
this.supply.each(req, res, callback);
});
}
module.exports = Worker;
|
import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';
export default class MyDocument extends Document {
static getInitialProps({ renderPage }) {
const sheet = new ServerStyleSheet();
const page = renderPage(App => props => sheet.collectStyles(<App { ...props } />));
const styleTags = sheet.getStyleElement();
return { ...page, styleTags };
}
render() {
return (
<html lang="es">
<Head>
<meta charSet="utf-8" />
{/**
<link rel="dns-prefetch" href={app.url} />
<link rel="preconnect" href={app.url} />
*/}
<title>Next CD app</title>
<meta name="viewport" content="initial-scale=1, viewport-fit=cover" />
{this.props.styleTags}
{/**
<link rel="manifest" href="" />
<meta name="msapplication-TileColor" content="#161616" />
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
<meta name="format-detection" content="telephone=no" />
<meta httpEquiv="x-rim-auto-match" content="none" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#050509" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content={app.title} />
<meta name="msapplication-TileImage" content={app.title} />
<meta name="description" content={app.description} />
<meta name="keywords" content="" />
<meta name="author" content="marianomolina.xyz" />
<meta property="fb:app_id" content="" />
<meta property="og:title" content={app.title} />
<meta property="og:site_name" content={app.title} />
<meta property="og:url" content={app.url} />
<meta property="og:type" content="website" />
<meta property="og:description" content={app.description} />
<meta property="og:locale " content="es_LA" />
<meta property="og:image" content="" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content={app.url} />
<meta name="twitter:creator" content={app.url} />
<meta name="msapplication-config" content="/static/images/icons/browserconfig.xml" />
<meta name="theme-color" content="#050509" />
<link rel="shortcut icon" href="" />
<link rel="apple-touch-icon" href="" />
<link rel="apple-touch-icon" sizes="76x76" href="" />
<link rel="apple-touch-icon" sizes="120x120" href="" />
<link rel="apple-touch-icon" sizes="152x152" href="" />
*/}
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
);
}
}
|
describe('#set', function() {
beforeEach(function() {
$.fn.raty.defaults.path = '../lib/images';
this.el = Helper.create('#el');
});
afterEach(function() {
Helper.clear();
});
it ('is chainable', function() {
// given
this.el.raty();
// when
var ref = this.el.raty('set', {});
// then
expect(ref).toBe(this.el);
});
it ('changes the declared options', function() {
// given
this.el.raty();
// when
var ref = this.el.raty('set', { scoreName: 'other' });
// then
expect(ref.children('input')).toHaveAttr('name', 'other');
});
it ('keeps the other options', function() {
// given
this.el.raty({ number: 6 });
// when
var ref = this.el.raty('set', { scoreName: 'other' });
// then
expect(ref.children('img').length).toEqual(6);
});
context('with external bind on wrapper', function() {
it ('is kept', function() {
// given
this.el.on('click', function() {
$(this).data('trigged', true);
}).raty();
this.el.raty('set', {});
// when
this.el.trigger('click');
// then
expect(this.el.data('trigged')).toBeTruthy();
});
});
context('when :readOnly by function', function() {
it ('is removes the readonly data info', function() {
// given
this.el.raty().raty('readOnly', true);
// when
var ref = this.el.raty('set', { readOnly: false });
// then
expect(this.el).not.toHaveData('readonly');
});
});
});
|
define('echarts-x/chart/map3d', [
'require',
'zrender/tool/util',
'zrender/config',
'echarts/util/ecData',
'echarts/util/mapData/params',
'echarts/util/mapData/geoCoord',
'echarts/util/mapData/textFixed',
'zrender/shape/Polygon',
'zrender/shape/ShapeBundle',
'zrender/shape/Text',
'qtek/Node',
'qtek/Mesh',
'qtek/geometry/Sphere',
'qtek/Material',
'qtek/Shader',
'qtek/Texture2D',
'qtek/math/Vector3',
'qtek/math/Matrix4',
'qtek/core/glenum',
'../config',
'./base3d',
'../util/OrbitControl',
'../surface/ZRenderSurface',
'../surface/VectorFieldParticleSurface',
'qtek/core/LRU',
'echarts/chart'
], function (require) {
var zrUtil = require('zrender/tool/util');
var zrConfig = require('zrender/config');
var ecData = require('echarts/util/ecData');
var mapParams = require('echarts/util/mapData/params').params;
var geoCoordMap = require('echarts/util/mapData/geoCoord');
var textFixedMap = require('echarts/util/mapData/textFixed');
var PolygonShape = require('zrender/shape/Polygon');
var ShapeBundle = require('zrender/shape/ShapeBundle');
var TextShape = require('zrender/shape/Text');
var Node = require('qtek/Node');
var Mesh = require('qtek/Mesh');
var SphereGeometry = require('qtek/geometry/Sphere');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var Texture2D = require('qtek/Texture2D');
var Vector3 = require('qtek/math/Vector3');
var Matrix4 = require('qtek/math/Matrix4');
var glenum = require('qtek/core/glenum');
var ecConfig = require('../config');
var ChartBase3D = require('./base3d');
var OrbitControl = require('../util/OrbitControl');
var ZRenderSurface = require('../surface/ZRenderSurface');
var VectorFieldParticleSurface = require('../surface/VectorFieldParticleSurface');
var LRU = require('qtek/core/LRU');
var formatGeoPoint = function (p) {
return [
p[0] < -168.5 && p[1] > 63.8 ? p[0] + 360 : p[0],
p[1]
];
};
function Map3D(ecTheme, messageCenter, zr, option, myChart) {
ChartBase3D.call(this, ecTheme, messageCenter, zr, option, myChart);
if (!this.baseLayer.renderer) {
return;
}
this._earthRadius = 100;
this._baseTextureSize = 2048;
this._globeNode = null;
this._orbitControl = null;
this._mapDataMap = {};
this._nameMap = {};
this._globeSurface = null;
this._surfaceLayerRoot = null;
this._albedoShader = new Shader({
vertex: Shader.source('ecx.albedo.vertex'),
fragment: Shader.source('ecx.albedo.fragment')
});
this._albedoShader.enableTexture('diffuseMap');
this._albedoShaderPA = this._albedoShader.clone();
this._albedoShaderPA.define('fragment', 'PREMULTIPLIED_ALPHA');
this._sphereGeometry = new SphereGeometry({
widthSegments: 40,
heightSegments: 40
});
this._imageCache = new LRU(5);
this._vfParticleSurfaceList = [];
this.refresh(option);
}
Map3D.prototype = {
type: ecConfig.CHART_TYPE_MAP3D,
constructor: Map3D,
_init: function () {
var legend = this.component.legend;
var series = this.series;
this.selectedMap = {};
this.beforeBuildMark();
for (var i = 0; i < series.length; i++) {
if (series[i].type === ecConfig.CHART_TYPE_MAP3D) {
series[i] = this.reformOption(series[i]);
var seriesName = series[i].name;
var mapType = series[i].mapType;
this.selectedMap[seriesName] = legend ? legend.isSelected(seriesName) : true;
if (series[i].geoCoord) {
zrUtil.merge(geoCoordMap, series[i].geoCoord, true);
}
if (series[i].textFixed) {
zrUtil.merge(textFixedMap, series[i].textFixed, true);
}
if (series[i].nameMap) {
this._nameMap[mapType] = this._nameMap[mapType] || {};
zrUtil.merge(this._nameMap[mapType], series[i].nameMap, true);
}
}
}
var seriesGroupByMapType = this._groupSeriesByMapType(series);
var dataMap = this._mergeSeriesData(series);
for (var mapType in dataMap) {
var seriesGroup = seriesGroupByMapType[mapType];
var mapQuality = this.deepQuery(seriesGroup, 'baseLayer.quality');
if (isNaN(mapQuality)) {
switch (mapQuality) {
case 'low':
this._baseTextureSize = 1024;
break;
case 'high':
this._baseTextureSize = 4096;
break;
case 'medium':
default:
this._baseTextureSize = 2048;
break;
}
} else {
this._baseTextureSize = mapQuality;
}
if (!this._globeNode) {
this._createGlob(seriesGroup);
this._initGlobeHandlers();
}
this._updateGlobe(mapType, dataMap[mapType], seriesGroup);
this._setViewport(seriesGroup);
break;
}
var camera = this.baseLayer.camera;
camera.position.y = 0;
camera.position.z = this._earthRadius * 2.5;
camera.lookAt(Vector3.ZERO);
this.afterBuildMark();
},
_setViewport: function (seriesGroup) {
var mapLocation = this.deepQuery(seriesGroup, 'mapLocation') || {};
var x = mapLocation.x;
var y = mapLocation.y;
var width = mapLocation.width;
var height = mapLocation.height;
var zrWidth = this.zr.getWidth();
var zrHeight = this.zr.getHeight();
x = this.parsePercent(x, zrWidth);
y = this.parsePercent(y, zrHeight);
width = this.parsePercent(width, zrWidth);
height = this.parsePercent(height, zrHeight);
x = isNaN(x) ? 0 : x;
y = isNaN(y) ? 0 : x;
width = isNaN(width) ? zrWidth : width;
height = isNaN(height) ? zrHeight : height;
this.baseLayer.setViewport(x, y, width, height);
},
_groupSeriesByMapType: function (series) {
var seriesGroupByMapType = {};
for (var i = 0; i < series.length; i++) {
if (series[i].type === ecConfig.CHART_TYPE_MAP3D && this.selectedMap[series[i].name]) {
var mapType = series[i].mapType;
seriesGroupByMapType[mapType] = seriesGroupByMapType[mapType] || [];
seriesGroupByMapType[mapType].push(series[i]);
}
}
return seriesGroupByMapType;
},
_mergeSeriesData: function (series) {
var dataMap = {};
for (var i = 0; i < series.length; i++) {
if (series[i].type === ecConfig.CHART_TYPE_MAP3D && this.selectedMap[series[i].name]) {
var mapType = series[i].mapType;
dataMap[mapType] = dataMap[mapType] || {};
var data = series[i].data || [];
for (var j = 0; j < data.length; j++) {
var name = data[j].name || '';
dataMap[mapType][name] = dataMap[mapType][name] || {
seriesIdx: [],
value: 0
};
dataMap[mapType][name].seriesIdx.push(i);
for (var key in data[j]) {
var val = data[j][key];
if (key === 'value') {
if (!isNaN(val)) {
dataMap[mapType][name].value += +val;
}
} else {
dataMap[mapType][name][key] = val;
}
}
}
}
}
return dataMap;
},
_updateGlobe: function (mapType, data, seriesGroup) {
var globeSurface = this._globeSurface;
var self = this;
globeSurface.resize(this._baseTextureSize, this._baseTextureSize);
var bgColor = this.deepQuery(seriesGroup, 'baseLayer.backgroundColor');
var bgImage = this.deepQuery(seriesGroup, 'baseLayer.backgroundImage');
globeSurface.backgroundColor = this._isValueNone(bgColor) ? '' : bgColor;
if (!this._isValueNone(bgImage)) {
if (typeof bgImage == 'string') {
var img = new Image();
img.onload = function () {
globeSurface.backgroundImage = img;
globeSurface.refresh();
};
img.src = bgImage;
} else {
globeSurface.backgroundImage = bgImage;
}
} else {
globeSurface.backgroundImage = null;
}
if (this._mapDataMap[mapType]) {
this._updateMapPolygonShapes(data, this._mapDataMap[mapType], seriesGroup);
globeSurface.refresh();
} else if (mapParams[mapType].getGeoJson) {
mapParams[mapType].getGeoJson(function (mapData) {
if (self._disposed) {
return;
}
self._mapDataMap[mapType] = mapData;
self._updateMapPolygonShapes(data, mapData, seriesGroup);
globeSurface.refresh();
});
} else {
globeSurface.refresh();
}
if (this._surfaceLayerRoot) {
this.baseLayer.renderer.disposeNode(this._surfaceLayerRoot, false, true);
}
this._surfaceLayerRoot = new Node({ name: 'surfaceLayers' });
this._globeNode.add(this._surfaceLayerRoot);
for (var i = 0; i < this._vfParticleSurfaceList.length; i++) {
this._vfParticleSurfaceList[i].dispose();
}
this._vfParticleSurfaceList = [];
seriesGroup.forEach(function (serie) {
var sIdx = this.series.indexOf(serie);
this.buildMark(sIdx, this._globeNode);
this._createSurfaceLayers(sIdx);
}, this);
},
_createSurfaceLayers: function (seriesIdx) {
var serie = this.series[seriesIdx];
for (var i = 0; i < serie.surfaceLayers.length; i++) {
var surfaceLayer = serie.surfaceLayers[i];
var surfaceMesh = new Mesh({
name: 'surfaceLayer' + i,
geometry: this._sphereGeometry,
ignorePicking: true
});
var distance = surfaceLayer.distance;
if (distance == null) {
distance = i + 1;
}
var r = this._earthRadius + distance;
surfaceMesh.scale.set(r, r, r);
switch (surfaceLayer.type) {
case 'particle':
this._createParticleSurfaceLayer(seriesIdx, surfaceLayer, surfaceMesh);
break;
case 'texture':
default:
this._createTextureSurfaceLayer(seriesIdx, surfaceLayer, surfaceMesh);
break;
}
this._surfaceLayerRoot.add(surfaceMesh);
}
},
_createTextureSurfaceLayer: function (seriesIdx, surfaceLayerCfg, surfaceMesh) {
var self = this;
surfaceMesh.material = new Material({
shader: this._albedoShader,
transparent: true,
depthMask: false
});
var serie = this.series[seriesIdx];
var image = surfaceLayerCfg.image;
var canvas = document.createElement('canvas');
canvas.width = 1;
canvas.height = 1;
var texture = new Texture2D({
anisotropic: 32,
image: canvas
});
surfaceMesh.material.set('diffuseMap', texture);
if (typeof image === 'string') {
var src = image;
image = this._imageCache.get(src);
if (!image) {
image = new Image();
image.onload = function () {
texture.image = image;
texture.dirty();
self.zr.refreshNextFrame();
self._imageCache.put(src, image);
};
image.src = src;
} else {
texture.image = image;
}
} else if (this._isValueImage(image)) {
texture.image = image;
}
},
_createParticleSurfaceLayer: function (seriesIdx, surfaceLayerCfg, surfaceMesh) {
var self = this;
var serie = this.series[seriesIdx];
var data = this.query(surfaceLayerCfg, 'particle.vectorField');
surfaceMesh.material = new Material({
shader: this._albedoShaderPA,
transparent: true,
depthMask: false
});
var vfParticleSurface = new VectorFieldParticleSurface(this.baseLayer.renderer, data);
var width = 0;
var height = 0;
var vfImage;
if (data instanceof Array) {
vfImage = this._createCanvasFromDataMatrix(data);
width = vfImage.width;
height = vfImage.height;
if (!vfImage) {
return false;
}
} else if (this._isValueImage(data)) {
width = data.width;
height = data.height;
vfImage = data;
} else {
return false;
}
if (!width || !height) {
return;
}
var textureSize = this.query(surfaceLayerCfg, 'size');
if (typeof textureSize === 'number') {
textureSize = [
textureSize,
textureSize
];
} else if (!textureSize) {
textureSize = [
2048,
1024
];
}
var particleSizeScaling = this.query(surfaceLayerCfg, 'particle.sizeScaling') || 1;
var particleSpeedScaling = this.query(surfaceLayerCfg, 'particle.speedScaling');
if (particleSpeedScaling == null) {
particleSpeedScaling = 1;
}
var particleColor = this.query(surfaceLayerCfg, 'particle.color') || 'white';
var particleNumber = this.query(surfaceLayerCfg, 'particle.number');
if (particleNumber == null) {
particleNumber = 256 * 256;
}
;
var motionBlurFactor = this.query(surfaceLayerCfg, 'particle.motionBlurFactor');
if (motionBlurFactor == null) {
motionBlurFactor = 0.99;
}
vfParticleSurface.vectorFieldTexture = new Texture2D({
image: vfImage,
flipY: true
});
vfParticleSurface.surfaceTexture = new Texture2D({
width: textureSize[0],
height: textureSize[1],
anisotropic: 32
});
vfParticleSurface.particleSizeScaling = particleSizeScaling;
vfParticleSurface.particleSpeedScaling = particleSpeedScaling;
vfParticleSurface.particleColor = this.parseColor(particleColor);
vfParticleSurface.motionBlurFactor = motionBlurFactor;
var size = Math.round(Math.sqrt(particleNumber));
vfParticleSurface.init(size, size);
vfParticleSurface.surfaceMesh = surfaceMesh;
this._vfParticleSurfaceList.push(vfParticleSurface);
},
_createCanvasFromDataMatrix: function (data) {
var height = data.length;
if (!(data[0] instanceof Array)) {
return null;
}
var width = data[0].length;
if (!(data[0][0] instanceof Array)) {
return null;
}
var vfImage = document.createElement('canvas');
vfImage.width = width;
vfImage.height = height;
var ctx = vfImage.getContext('2d');
var imageData = ctx.getImageData(0, 0, width, height);
var p = 0;
for (var j = 0; j < height; j++) {
for (var i = 0; i < width; i++) {
var item = data[j][i];
var u = item.x == null ? item[0] : item.x;
var v = item.y == null ? item[1] : item.y;
imageData.data[p++] = u * 128 + 128;
imageData.data[p++] = v * 128 + 128;
imageData.data[p++] = 0;
imageData.data[p++] = 255;
}
}
ctx.putImageData(imageData, 0, 0);
return vfImage;
},
_createGlob: function (seriesGroup) {
var zr = this.zr;
var self = this;
this._globeNode = new Node({ name: 'globe' });
var earthMesh = new Mesh({
name: 'earth',
geometry: this._sphereGeometry,
material: new Material({
shader: this._albedoShader,
transparent: true
})
});
var radius = this._earthRadius;
earthMesh.scale.set(radius, radius, radius);
this._globeNode.add(earthMesh);
var scene = this.baseLayer.scene;
scene.add(this._globeNode);
this._orbitControl = new OrbitControl(this._globeNode, this.zr, this.baseLayer);
this._orbitControl.init();
this._orbitControl.autoRotate = this.deepQuery(seriesGroup, 'autoRotate');
var globeSurface = new ZRenderSurface(this._baseTextureSize, this._baseTextureSize);
this._globeSurface = globeSurface;
earthMesh.material.set('diffuseMap', globeSurface.getTexture());
globeSurface.onrefresh = function () {
zr.refreshNextFrame();
};
},
_updateMapPolygonShapes: function (data, mapData, seriesGroup) {
this._globeSurface.clearElements();
var self = this;
var dataRange = this.component.dataRange;
var scaleX = this._baseTextureSize / 360;
var scaleY = this._baseTextureSize / 180;
var mapType = this.deepQuery(seriesGroup, 'mapType');
var nameMap = this._nameMap[mapType] || {};
for (var i = 0; i < mapData.features.length; i++) {
var feature = mapData.features[i];
var name = feature.properties.name;
name = nameMap[name] || name;
var dataItem = data[name];
var value;
var queryTarget = [];
var seriesName = [];
if (dataItem) {
queryTarget.push(dataItem);
for (var j = 0; j < dataItem.seriesIdx.length; j++) {
var sIdx = dataItem.seriesIdx[j];
seriesName.push(this.series[sIdx].name);
queryTarget.push(this.series[sIdx]);
}
value = dataItem.value;
} else {
dataItem = '-';
value = '-';
queryTarget = seriesGroup;
}
seriesName = seriesName.join(' ');
var color = this.deepQuery(queryTarget, 'itemStyle.normal.areaStyle.color');
color = dataRange && !isNaN(value) ? dataRange.getColor(value) : color;
var shape = new ShapeBundle({
name: name,
zlevel: 0,
cp: feature.properties.cp,
style: {
shapeList: [],
brushType: 'both',
color: color,
strokeColor: this.deepQuery(queryTarget, 'itemStyle.normal.borderColor'),
lineWidth: this.deepQuery(queryTarget, 'itemStyle.normal.borderWidth'),
opacity: this.deepQuery(queryTarget, 'itemStyle.normal.opacity')
},
highlightStyle: {
color: this.deepQuery(queryTarget, 'itemStyle.emphasis.areaStyle.color'),
strokeColor: this.deepQuery(queryTarget, 'itemStyle.emphasis.borderColor'),
lineWidth: this.deepQuery(queryTarget, 'itemStyle.emphasis.borderWidth'),
opacity: this.deepQuery(queryTarget, 'itemStyle.emphasis.opacity')
}
});
ecData.pack(shape, {
name: seriesName,
tooltip: this.deepQuery(queryTarget, 'tooltip')
}, 0, dataItem, 0, name);
if (feature.type == 'Feature') {
createGeometry(feature.geometry, shape);
} else if (feature.type == 'GeometryCollection') {
for (var j = 0; j < feature.geometries; j++) {
createGeometry(feature.geometries[j], shape);
}
}
this._globeSurface.addElement(shape);
var cp = this._getTextPosition(shape);
var lat = (0.5 - cp[1] / this._baseTextureSize) * Math.PI;
var textScaleX = 1 / Math.cos(lat);
var baseScale = this._baseTextureSize / 2048;
var textShape = new TextShape({
zlevel: 1,
position: cp,
scale: [
0.5 * textScaleX * baseScale,
baseScale
],
style: {
x: 0,
y: 0,
brushType: 'fill',
text: this._getMapLabelText(name, value, queryTarget, 'normal'),
textAlign: 'center',
color: this.deepQuery(queryTarget, 'itemStyle.normal.label.textStyle.color'),
opacity: this.deepQuery(queryTarget, 'itemStyle.normal.label.show') ? 1 : 0,
textFont: this.getFont(this.deepQuery(queryTarget, 'itemStyle.normal.label.textStyle'))
},
highlightStyle: {
color: this.deepQuery(queryTarget, 'itemStyle.emphasis.label.textStyle.color'),
opacity: this.deepQuery(queryTarget, 'itemStyle.emphasis.label.show') ? 1 : 0,
textFont: this.getFont(this.deepQuery(queryTarget, 'itemStyle.emphasis.label.textStyle'))
}
});
this._globeSurface.addElement(textShape);
}
function createGeometry(geometry, bundleShape) {
if (geometry.type == 'Polygon') {
createPolygon(geometry.coordinates, bundleShape);
} else if (geometry.type == 'MultiPolygon') {
for (var i = 0; i < geometry.coordinates.length; i++) {
createPolygon(geometry.coordinates[i], bundleShape);
}
}
}
function createPolygon(coordinates, bundleShape) {
for (var k = 0; k < coordinates.length; k++) {
var polygon = new PolygonShape({ style: { pointList: [] } });
for (var i = 0; i < coordinates[k].length; i++) {
var point = formatGeoPoint(coordinates[k][i]);
var x = (point[0] + 180) * scaleX;
var y = (90 - point[1]) * scaleY;
polygon.style.pointList.push([
x,
y
]);
}
bundleShape.style.shapeList.push(polygon);
}
}
},
_getTextPosition: function (polygonShape) {
var textPosition;
var name = polygonShape.name;
var textFixed = textFixedMap[name] || [
0,
0
];
var size = this._baseTextureSize;
if (geoCoordMap[name]) {
textPosition = [
(geoCoordMap[name][0] + 180) / 360 * size,
(90 - geoCoordMap[name][1]) / 180 * size
];
} else if (polygonShape.cp) {
textPosition = [
(polygonShape.cp[0] + textFixed[0] + 180) / 360 * size,
(90 - (polygonShape.cp[1] + textFixed[1])) / 180 * size
];
} else {
var bbox = polygonShape.getRect(polygonShape.style);
textPosition = [
bbox.x + bbox.width / 2 + textFixed[0],
bbox.y + bbox.height / 2 + textFixed[1]
];
}
return textPosition;
},
_initGlobeHandlers: function () {
var globeMesh = this._globeNode.queryNode('earth');
var mouseEventHandler = function (e) {
var shape = this._globeSurface.hover(e);
if (shape) {
this.zr.handler.dispatch(e.type, {
target: shape,
event: e.event,
type: e.type
});
}
};
var eventList = [
'CLICK',
'DBLCLICK',
'MOUSEOVER',
'MOUSEOUT',
'MOUSEMOVE',
'DRAGSTART',
'DRAGEND',
'DRAGENTER',
'DRAGOVER',
'DRAGLEAVE',
'DROP'
];
eventList.forEach(function (eveName) {
globeMesh.on(zrConfig.EVENT[eveName], mouseEventHandler, this);
}, this);
},
_eulerToSphere: function (x, y, z) {
var theta = Math.asin(y);
var phi = Math.atan2(z, -x);
if (phi < 0) {
phi = Math.PI * 2 + phi;
}
var log = theta * 180 / Math.PI + 90;
var lat = phi * 180 / Math.PI;
},
_isValueNone: function (value) {
return value == null || value === '' || typeof value == 'string' && value.toLowerCase() == 'none';
},
_isValueImage: function (value) {
return value instanceof HTMLCanvasElement || value instanceof HTMLImageElement || value instanceof Image;
},
_getMapLabelText: function (name, value, queryTarget, status) {
var formatter = this.deepQuery(queryTarget, 'itemStyle.' + status + '.label.formatter');
if (formatter) {
if (typeof formatter == 'function') {
return formatter.call(this.myChart, name, value);
} else if (typeof formatter == 'string') {
formatter = formatter.replace('{a}', '{a0}').replace('{b}', '{b0}');
formatter = formatter.replace('{a0}', name).replace('{b0}', value);
return formatter;
}
} else {
return name;
}
},
getMarkCoord: function (seriesIdx, data, point) {
var geoCoord = data.geoCoord || geoCoordMap[data.name];
var coords = [];
var serie = this.series[seriesIdx];
var distance = this.deepQuery([
data,
serie.markPoint || serie.markLine || serie.markBar
], 'distance');
coords[0] = geoCoord.x == null ? geoCoord[0] : geoCoord.x;
coords[1] = geoCoord.y == null ? geoCoord[1] : geoCoord.y;
coords = formatGeoPoint(coords);
var lon = coords[0];
var lat = coords[1];
lon = Math.PI * lon / 180;
lat = Math.PI * lat / 180;
var r = this._earthRadius + distance;
var r0 = Math.cos(lat) * r;
point._array[1] = Math.sin(lat) * r;
point._array[0] = -r0 * Math.cos(lon + Math.PI);
point._array[2] = r0 * Math.sin(lon + Math.PI);
},
getMarkPointTransform: function () {
var xAxis = new Vector3();
var yAxis = new Vector3();
var zAxis = new Vector3();
var position = new Vector3();
return function (seriesIdx, data, matrix) {
var series = this.series[seriesIdx];
var queryTarget = [
data,
series.markPoint
];
var symbolSize = this.deepQuery(queryTarget, 'symbolSize');
var orientation = this.deepQuery(queryTarget, 'orientation');
var orientationAngle = this.deepQuery(queryTarget, 'orientationAngle');
this.getMarkCoord(seriesIdx, data, position);
Vector3.normalize(zAxis, position);
Vector3.cross(xAxis, Vector3.UP, zAxis);
Vector3.normalize(xAxis, xAxis);
Vector3.cross(yAxis, zAxis, xAxis);
if (!isNaN(symbolSize)) {
symbolSize = [
symbolSize,
symbolSize
];
}
if (orientation === 'tangent') {
var tmp = zAxis;
zAxis = yAxis;
yAxis = tmp;
Vector3.negate(zAxis, zAxis);
Vector3.scaleAndAdd(position, position, yAxis, symbolSize[1]);
}
matrix.x = xAxis;
matrix.y = yAxis;
matrix.z = zAxis;
Matrix4.rotateX(matrix, matrix, -orientationAngle / 180 * Math.PI);
Matrix4.scale(matrix, matrix, new Vector3(symbolSize[0], symbolSize[1], 1));
var arr = matrix._array;
arr[12] = position.x;
arr[13] = position.y;
arr[14] = position.z;
};
}(),
getMarkBarPoints: function () {
var normal = new Vector3();
return function (seriesIdx, data, start, end) {
var barHeight = data.barHeight != null ? data.barHeight : 1;
if (typeof barHeight == 'function') {
barHeight = barHeight(data);
}
this.getMarkCoord(seriesIdx, data, start);
Vector3.copy(normal, start);
Vector3.normalize(normal, normal);
Vector3.scaleAndAdd(end, start, normal, barHeight);
};
}(),
getMarkLinePoints: function () {
var normal = new Vector3();
var tangent = new Vector3();
var bitangent = new Vector3();
var halfVector = new Vector3();
return function (seriesIdx, data, p0, p1, p2, p3) {
var isCurve = !!p2;
if (!isCurve) {
p3 = p1;
}
this.getMarkCoord(seriesIdx, data[0], p0);
this.getMarkCoord(seriesIdx, data[1], p3);
var normalize = Vector3.normalize;
var cross = Vector3.cross;
var sub = Vector3.sub;
var add = Vector3.add;
if (isCurve) {
normalize(normal, p0);
sub(tangent, p3, p0);
normalize(tangent, tangent);
cross(bitangent, tangent, normal);
normalize(bitangent, bitangent);
cross(tangent, normal, bitangent);
add(p1, normal, tangent);
normalize(p1, p1);
normalize(normal, p3);
sub(tangent, p0, p3);
normalize(tangent, tangent);
cross(bitangent, tangent, normal);
normalize(bitangent, bitangent);
cross(tangent, normal, bitangent);
add(p2, normal, tangent);
normalize(p2, p2);
add(halfVector, p0, p3);
normalize(halfVector, halfVector);
var projDist = Vector3.dot(p0, halfVector);
var cosTheta = Vector3.dot(halfVector, p1);
var len = (this._earthRadius - projDist) / cosTheta * 2;
Vector3.scaleAndAdd(p1, p0, p1, len);
Vector3.scaleAndAdd(p2, p3, p2, len);
}
};
}(),
onframe: function (deltaTime) {
ChartBase3D.prototype.onframe.call(this, deltaTime);
this._orbitControl.update(deltaTime);
for (var i = 0; i < this._vfParticleSurfaceList.length; i++) {
this._vfParticleSurfaceList[i].update(Math.min(deltaTime / 1000, 0.5));
this.zr.refreshNextFrame();
}
},
refresh: function (newOption) {
if (!this.baseLayer.renderer) {
return;
}
if (newOption) {
this.option = newOption;
this.series = newOption.series;
}
this._init();
},
ondataRange: function (param, status) {
if (this.component.dataRange) {
this.refresh();
this.zr.refreshNextFrame();
}
},
dispose: function () {
ChartBase3D.prototype.dispose.call(this);
this.baseLayer.dispose();
if (this._orbitControl) {
this._orbitControl.dispose();
}
this._globeNode = null;
this._orbitControl = null;
this._disposed = true;
for (var i = 0; i < this._vfParticleSurfaceList.length; i++) {
this._vfParticleSurfaceList[i].dispose();
}
}
};
zrUtil.inherits(Map3D, ChartBase3D);
require('echarts/chart').define(ecConfig.CHART_TYPE_MAP3D, Map3D);
return Map3D;
});define('qtek/Node', [
'require',
'./core/Base',
'./math/Vector3',
'./math/Quaternion',
'./math/Matrix4',
'./dep/glmatrix'
], function (require) {
'use strict';
var Base = require('./core/Base');
var Vector3 = require('./math/Vector3');
var Quaternion = require('./math/Quaternion');
var Matrix4 = require('./math/Matrix4');
var glMatrix = require('./dep/glmatrix');
var mat4 = glMatrix.mat4;
var nameId = 0;
var Node = Base.derive({
name: '',
position: null,
rotation: null,
scale: null,
worldTransform: null,
localTransform: null,
autoUpdateLocalTransform: true,
_parent: null,
_scene: null,
_needsUpdateWorldTransform: true,
_inIterating: false,
__depth: 0
}, function () {
if (!this.name) {
this.name = 'NODE_' + nameId++;
}
if (!this.position) {
this.position = new Vector3();
}
if (!this.rotation) {
this.rotation = new Quaternion();
}
if (!this.scale) {
this.scale = new Vector3(1, 1, 1);
}
this.worldTransform = new Matrix4();
this.localTransform = new Matrix4();
this._children = [];
}, {
visible: true,
isRenderable: function () {
return false;
},
setName: function (name) {
if (this._scene) {
delete this._scene._nodeRepository[this.name];
this._scene._nodeRepository[name] = this;
}
this.name = name;
},
add: function (node) {
if (this._inIterating) {
console.warn('Add operation can cause unpredictable error when in iterating');
}
if (node._parent === this) {
return;
}
if (node._parent) {
node._parent.remove(node);
}
node._parent = this;
this._children.push(node);
if (this._scene && this._scene !== node.scene) {
node.traverse(this._addSelfToScene, this);
}
},
remove: function (node) {
if (this._inIterating) {
console.warn('Remove operation can cause unpredictable error when in iterating');
}
var idx = this._children.indexOf(node);
if (idx < 0) {
return;
}
this._children.splice(idx, 1);
node._parent = null;
if (this._scene) {
node.traverse(this._removeSelfFromScene, this);
}
},
getScene: function () {
return this._scene;
},
getParent: function () {
return this._parent;
},
_removeSelfFromScene: function (descendant) {
descendant._scene.removeFromScene(descendant);
descendant._scene = null;
},
_addSelfToScene: function (descendant) {
this._scene.addToScene(descendant);
descendant._scene = this._scene;
},
isAncestor: function (node) {
var parent = node._parent;
while (parent) {
if (parent === this) {
return true;
}
parent = parent._parent;
}
return false;
},
children: function () {
return this._children.slice();
},
childAt: function (idx) {
return this._children[idx];
},
getChildByName: function (name) {
for (var i = 0; i < this._children.length; i++) {
if (this._children[i].name === name) {
return this._children[i];
}
}
},
getDescendantByName: function (name) {
for (var i = 0; i < this._children.length; i++) {
var child = this._children[i];
if (child.name === name) {
return child;
} else {
var res = child.getDescendantByName(name);
if (res) {
return res;
}
}
}
},
queryNode: function (path) {
if (!path) {
return;
}
var pathArr = path.split('/');
var current = this;
for (var i = 0; i < pathArr.length; i++) {
var name = pathArr[i];
if (!name) {
continue;
}
var found = false;
for (var j = 0; j < current._children.length; j++) {
var child = current._children[j];
if (child.name === name) {
current = child;
found = true;
break;
}
}
if (!found) {
return;
}
}
return current;
},
getPath: function (rootNode) {
if (!this._parent) {
return '/';
}
var current = this._parent;
var path = this.name;
while (current._parent) {
path = current.name + '/' + path;
if (current._parent == rootNode) {
break;
}
current = current._parent;
}
if (!current._parent && rootNode) {
return null;
}
return path;
},
traverse: function (callback, context, ctor) {
this._inIterating = true;
if (ctor === undefined || this.constructor === ctor) {
callback.call(context, this);
}
var _children = this._children;
for (var i = 0, len = _children.length; i < len; i++) {
_children[i].traverse(callback, context, ctor);
}
this._inIterating = false;
},
setLocalTransform: function (matrix) {
mat4.copy(this.localTransform._array, matrix._array);
this.decomposeLocalTransform();
},
decomposeLocalTransform: function (keepScale) {
var scale = !keepScale ? this.scale : null;
this.localTransform.decomposeMatrix(scale, this.rotation, this.position);
},
setWorldTransform: function (matrix) {
mat4.copy(this.worldTransform._array, matrix._array);
this.decomposeWorldTransform();
},
decomposeWorldTransform: function () {
var tmp = mat4.create();
return function (keepScale) {
if (this._parent) {
mat4.invert(tmp, this._parent.worldTransform._array);
mat4.multiply(this.localTransform._array, tmp, this.worldTransform._array);
} else {
mat4.copy(this.localTransform._array, this.worldTransform._array);
}
var scale = !keepScale ? this.scale : null;
this.localTransform.decomposeMatrix(scale, this.rotation, this.position);
};
}(),
updateLocalTransform: function () {
var position = this.position;
var rotation = this.rotation;
var scale = this.scale;
if (position._dirty || scale._dirty || rotation._dirty) {
var m = this.localTransform._array;
mat4.fromRotationTranslation(m, rotation._array, position._array);
mat4.scale(m, m, scale._array);
rotation._dirty = false;
scale._dirty = false;
position._dirty = false;
this._needsUpdateWorldTransform = true;
}
},
updateWorldTransform: function () {
if (this._parent) {
mat4.multiply(this.worldTransform._array, this._parent.worldTransform._array, this.localTransform._array);
} else {
mat4.copy(this.worldTransform._array, this.localTransform._array);
}
},
update: function (forceUpdateWorld) {
if (this.autoUpdateLocalTransform) {
this.updateLocalTransform();
} else {
forceUpdateWorld = true;
}
if (forceUpdateWorld || this._needsUpdateWorldTransform) {
this.updateWorldTransform();
forceUpdateWorld = true;
this._needsUpdateWorldTransform = false;
}
for (var i = 0, len = this._children.length; i < len; i++) {
this._children[i].update(forceUpdateWorld);
}
},
getWorldPosition: function (out) {
var m = this.worldTransform._array;
if (out) {
out._array[0] = m[12];
out._array[1] = m[13];
out._array[2] = m[14];
return out;
} else {
return new Vector3(m[12], m[13], m[14]);
}
},
clone: function () {
var node = new this.constructor();
node.setName(this.name);
node.position.copy(this.position);
node.rotation.copy(this.rotation);
node.scale.copy(this.scale);
for (var i = 0; i < this._children.length; i++) {
node.add(this._children[i].clone());
}
return node;
},
rotateAround: function () {
var v = new Vector3();
var RTMatrix = new Matrix4();
return function (point, axis, angle) {
v.copy(this.position).subtract(point);
this.localTransform.identity();
this.localTransform.translate(point);
this.localTransform.rotate(angle, axis);
RTMatrix.fromRotationTranslation(this.rotation, v);
this.localTransform.multiply(RTMatrix);
this.localTransform.scale(this.scale);
this.decomposeLocalTransform();
this._needsUpdateWorldTransform = true;
};
}(),
lookAt: function () {
var m = new Matrix4();
return function (target, up) {
m.lookAt(this.position, target, up || this.localTransform.y).invert();
m.decomposeMatrix(null, this.rotation, this.position);
};
}()
});
return Node;
});define('qtek/Mesh', [
'require',
'./Renderable',
'./core/glenum'
], function (require) {
'use strict';
var Renderable = require('./Renderable');
var glenum = require('./core/glenum');
var Mesh = Renderable.derive({
skeleton: null,
joints: null
}, function () {
if (!this.joints) {
this.joints = [];
}
}, {
render: function (_gl, globalMaterial) {
var material = globalMaterial || this.material;
if (this.skeleton) {
var skinMatricesArray = this.skeleton.getSubSkinMatrices(this.__GUID__, this.joints);
material.shader.setUniformBySemantic(_gl, 'SKIN_MATRIX', skinMatricesArray);
}
return Renderable.prototype.render.call(this, _gl, globalMaterial);
}
});
Mesh.POINTS = glenum.POINTS;
Mesh.LINES = glenum.LINES;
Mesh.LINE_LOOP = glenum.LINE_LOOP;
Mesh.LINE_STRIP = glenum.LINE_STRIP;
Mesh.TRIANGLES = glenum.TRIANGLES;
Mesh.TRIANGLE_STRIP = glenum.TRIANGLE_STRIP;
Mesh.TRIANGLE_FAN = glenum.TRIANGLE_FAN;
Mesh.BACK = glenum.BACK;
Mesh.FRONT = glenum.FRONT;
Mesh.FRONT_AND_BACK = glenum.FRONT_AND_BACK;
Mesh.CW = glenum.CW;
Mesh.CCW = glenum.CCW;
return Mesh;
});define('qtek/geometry/Sphere', [
'require',
'../DynamicGeometry',
'../dep/glmatrix',
'../math/BoundingBox'
], function (require) {
'use strict';
var DynamicGeometry = require('../DynamicGeometry');
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var vec2 = glMatrix.vec2;
var BoundingBox = require('../math/BoundingBox');
var Sphere = DynamicGeometry.derive({
widthSegments: 20,
heightSegments: 20,
phiStart: 0,
phiLength: Math.PI * 2,
thetaStart: 0,
thetaLength: Math.PI,
radius: 1
}, function () {
this.build();
}, {
build: function () {
var positions = this.attributes.position.value;
var texcoords = this.attributes.texcoord0.value;
var normals = this.attributes.normal.value;
positions.length = 0;
texcoords.length = 0;
normals.length = 0;
this.faces.length = 0;
var x, y, z, u, v, i, j;
var normal;
var heightSegments = this.heightSegments;
var widthSegments = this.widthSegments;
var radius = this.radius;
var phiStart = this.phiStart;
var phiLength = this.phiLength;
var thetaStart = this.thetaStart;
var thetaLength = this.thetaLength;
var radius = this.radius;
for (j = 0; j <= heightSegments; j++) {
for (i = 0; i <= widthSegments; i++) {
u = i / widthSegments;
v = j / heightSegments;
x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);
y = radius * Math.cos(thetaStart + v * thetaLength);
z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);
positions.push(vec3.fromValues(x, y, z));
texcoords.push(vec2.fromValues(u, v));
normal = vec3.fromValues(x, y, z);
vec3.normalize(normal, normal);
normals.push(normal);
}
}
var i1, i2, i3, i4;
var faces = this.faces;
var len = widthSegments + 1;
for (j = 0; j < heightSegments; j++) {
for (i = 0; i < widthSegments; i++) {
i2 = j * len + i;
i1 = j * len + i + 1;
i4 = (j + 1) * len + i + 1;
i3 = (j + 1) * len + i;
faces.push(vec3.fromValues(i1, i2, i4));
faces.push(vec3.fromValues(i2, i3, i4));
}
}
this.boundingBox = new BoundingBox();
this.boundingBox.max.set(radius, radius, radius);
this.boundingBox.min.set(-radius, -radius, -radius);
}
});
return Sphere;
});define('qtek/Material', [
'require',
'./core/Base',
'./Texture'
], function (require) {
'use strict';
var Base = require('./core/Base');
var Texture = require('./Texture');
var Material = Base.derive({
name: '',
uniforms: null,
shader: null,
depthTest: true,
depthMask: true,
transparent: false,
blend: null,
_enabledUniforms: null
}, function () {
if (!this.name) {
this.name = 'MATERIAL_' + this.__GUID__;
}
if (this.shader) {
this.attachShader(this.shader);
}
}, {
bind: function (_gl, prevMaterial) {
var slot = 0;
var sameShader = prevMaterial && prevMaterial.shader === this.shader;
for (var u = 0; u < this._enabledUniforms.length; u++) {
var symbol = this._enabledUniforms[u];
var uniform = this.uniforms[symbol];
if (sameShader) {
if (prevMaterial.uniforms[symbol].value === uniform.value) {
continue;
}
}
if (uniform.value === undefined) {
console.warn('Uniform value "' + symbol + '" is undefined');
continue;
} else if (uniform.value === null) {
continue;
} else if (uniform.value instanceof Array && !uniform.value.length) {
continue;
} else if (uniform.value instanceof Texture) {
var res = this.shader.setUniform(_gl, '1i', symbol, slot);
if (!res) {
continue;
}
var texture = uniform.value;
_gl.activeTexture(_gl.TEXTURE0 + slot);
if (texture.isRenderable()) {
texture.bind(_gl);
} else {
texture.unbind(_gl);
}
slot++;
} else if (uniform.value instanceof Array) {
if (uniform.value.length === 0) {
continue;
}
var exampleValue = uniform.value[0];
if (exampleValue instanceof Texture) {
if (!this.shader.hasUniform(symbol)) {
continue;
}
var arr = [];
for (var i = 0; i < uniform.value.length; i++) {
var texture = uniform.value[i];
_gl.activeTexture(_gl.TEXTURE0 + slot);
if (texture.isRenderable()) {
texture.bind(_gl);
} else {
texture.unbind(_gl);
}
arr.push(slot++);
}
this.shader.setUniform(_gl, '1iv', symbol, arr);
} else {
this.shader.setUniform(_gl, uniform.type, symbol, uniform.value);
}
} else {
this.shader.setUniform(_gl, uniform.type, symbol, uniform.value);
}
}
},
setUniform: function (symbol, value) {
var uniform = this.uniforms[symbol];
if (uniform) {
uniform.value = value;
}
},
setUniforms: function (obj) {
for (var key in obj) {
var val = obj[key];
this.setUniform(key, val);
}
},
enableUniform: function (symbol) {
if (this.uniforms[symbol] && !this.isUniformEnabled(symbol)) {
this._enabledUniforms.push(symbol);
}
},
disableUniform: function (symbol) {
var idx = this._enabledUniforms.indexOf(symbol);
if (idx >= 0) {
this._enabledUniforms.splice(idx, 1);
}
},
isUniformEnabled: function (symbol) {
return this._enabledUniforms.indexOf(symbol) >= 0;
},
set: function (symbol, value) {
if (typeof symbol === 'object') {
for (var key in symbol) {
var val = symbol[key];
this.set(key, val);
}
} else {
var uniform = this.uniforms[symbol];
if (uniform) {
uniform.value = value;
}
}
},
get: function (symbol) {
var uniform = this.uniforms[symbol];
if (uniform) {
return uniform.value;
}
},
attachShader: function (shader, keepUniform) {
if (this.shader) {
this.shader.detached();
}
var originalUniforms = this.uniforms;
this.uniforms = shader.createUniforms();
this.shader = shader;
this._enabledUniforms = Object.keys(this.uniforms);
if (keepUniform) {
for (var symbol in originalUniforms) {
if (this.uniforms[symbol]) {
this.uniforms[symbol].value = originalUniforms[symbol].value;
}
}
}
shader.attached();
},
detachShader: function () {
this.shader.detached();
this.shader = null;
this.uniforms = {};
},
clone: function () {
var material = new Material({
name: this.name,
shader: this.shader
});
for (var symbol in this.uniforms) {
material.uniforms[symbol].value = this.uniforms[symbol].value;
}
material.depthTest = this.depthTest;
material.depthMask = this.depthMask;
material.transparent = this.transparent;
material.blend = this.blend;
return material;
},
dispose: function (_gl, disposeTexture) {
if (disposeTexture) {
for (var name in this.uniforms) {
var val = this.uniforms[name].value;
if (!val) {
continue;
}
if (val instanceof Texture) {
val.dispose(_gl);
} else if (val instanceof Array) {
for (var i = 0; i < val.length; i++) {
if (val[i] instanceof Texture) {
val[i].dispose(_gl);
}
}
}
}
}
var shader = this.shader;
if (shader) {
this.detachShader();
if (!shader.isAttachedToAny()) {
shader.dispose(_gl);
}
}
}
});
return Material;
});define('qtek/Texture2D', [
'require',
'./Texture',
'./core/glinfo',
'./core/glenum'
], function (require) {
var Texture = require('./Texture');
var glinfo = require('./core/glinfo');
var glenum = require('./core/glenum');
var Texture2D = Texture.derive(function () {
return {
image: null,
pixels: null,
mipmaps: []
};
}, {
update: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_2D, this._cache.get('webgl_texture'));
this.beforeUpdate(_gl);
var glFormat = this.format;
var glType = this.type;
_gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, this.wrapS);
_gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, this.wrapT);
_gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, this.magFilter);
_gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, this.minFilter);
var anisotropicExt = glinfo.getExtension(_gl, 'EXT_texture_filter_anisotropic');
if (anisotropicExt && this.anisotropic > 1) {
_gl.texParameterf(_gl.TEXTURE_2D, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, this.anisotropic);
}
if (glType === 36193) {
var halfFloatExt = glinfo.getExtension(_gl, 'OES_texture_half_float');
if (!halfFloatExt) {
glType = glenum.FLOAT;
}
}
if (this.image) {
_gl.texImage2D(_gl.TEXTURE_2D, 0, glFormat, glFormat, glType, this.image);
} else {
if (glFormat <= Texture.COMPRESSED_RGBA_S3TC_DXT5_EXT && glFormat >= Texture.COMPRESSED_RGB_S3TC_DXT1_EXT) {
_gl.compressedTexImage2D(_gl.TEXTURE_2D, 0, glFormat, this.width, this.height, 0, this.pixels);
} else {
_gl.texImage2D(_gl.TEXTURE_2D, 0, glFormat, this.width, this.height, 0, glFormat, glType, this.pixels);
}
}
if (this.useMipmap) {
if (this.mipmaps.length) {
if (this.image) {
for (var i = 0; i < this.mipmaps.length; i++) {
if (this.mipmaps[i]) {
_gl.texImage2D(_gl.TEXTURE_2D, i, glFormat, glFormat, glType, this.mipmaps[i]);
}
}
} else if (this.pixels) {
var width = this.width;
var height = this.height;
for (var i = 0; i < this.mipmaps.length; i++) {
if (this.mipmaps[i]) {
if (glFormat <= Texture.COMPRESSED_RGBA_S3TC_DXT5_EXT && glFormat >= Texture.COMPRESSED_RGB_S3TC_DXT1_EXT) {
_gl.compressedTexImage2D(_gl.TEXTURE_2D, 0, glFormat, width, height, 0, this.mipmaps[i]);
} else {
_gl.texImage2D(_gl.TEXTURE_2D, i, glFormat, width, height, 0, glFormat, glType, this.mipmaps[i]);
}
}
width /= 2;
height /= 2;
}
}
} else if (!this.NPOT && !this.mipmaps.length) {
_gl.generateMipmap(_gl.TEXTURE_2D);
}
}
_gl.bindTexture(_gl.TEXTURE_2D, null);
},
generateMipmap: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_2D, this._cache.get('webgl_texture'));
_gl.generateMipmap(_gl.TEXTURE_2D);
},
isPowerOfTwo: function () {
var width;
var height;
if (this.image) {
width = this.image.width;
height = this.image.height;
} else {
width = this.width;
height = this.height;
}
return (width & width - 1) === 0 && (height & height - 1) === 0;
},
isRenderable: function () {
if (this.image) {
return this.image.nodeName === 'CANVAS' || this.image.complete;
} else {
return this.width && this.height;
}
},
bind: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_2D, this.getWebGLTexture(_gl));
},
unbind: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_2D, null);
},
load: function (src) {
var image = new Image();
var self = this;
image.onload = function () {
self.dirty();
self.trigger('success', self);
image.onload = null;
};
image.onerror = function () {
self.trigger('error', self);
image.onerror = null;
};
image.src = src;
this.image = image;
return this;
}
});
return Texture2D;
});define('qtek/math/Vector3', [
'require',
'../dep/glmatrix'
], function (require) {
'use strict';
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var Vector3 = function (x, y, z) {
x = x || 0;
y = y || 0;
z = z || 0;
this._array = vec3.fromValues(x, y, z);
this._dirty = true;
};
Vector3.prototype = {
constructor: Vector3,
add: function (b) {
vec3.add(this._array, this._array, b._array);
this._dirty = true;
return this;
},
set: function (x, y, z) {
this._array[0] = x;
this._array[1] = y;
this._array[2] = z;
this._dirty = true;
return this;
},
setArray: function (arr) {
this._array[0] = arr[0];
this._array[1] = arr[1];
this._array[2] = arr[2];
this._dirty = true;
return this;
},
clone: function () {
return new Vector3(this.x, this.y, this.z);
},
copy: function (b) {
vec3.copy(this._array, b._array);
this._dirty = true;
return this;
},
cross: function (out, b) {
vec3.cross(out._array, this._array, b._array);
out._dirty = true;
return this;
},
dist: function (b) {
return vec3.dist(this._array, b._array);
},
distance: function (b) {
return vec3.distance(this._array, b._array);
},
div: function (b) {
vec3.div(this._array, this._array, b._array);
this._dirty = true;
return this;
},
divide: function (b) {
vec3.divide(this._array, this._array, b._array);
this._dirty = true;
return this;
},
dot: function (b) {
return vec3.dot(this._array, b._array);
},
len: function () {
return vec3.len(this._array);
},
length: function () {
return vec3.length(this._array);
},
lerp: function (a, b, t) {
vec3.lerp(this._array, a._array, b._array, t);
this._dirty = true;
return this;
},
min: function (b) {
vec3.min(this._array, this._array, b._array);
this._dirty = true;
return this;
},
max: function (b) {
vec3.max(this._array, this._array, b._array);
this._dirty = true;
return this;
},
mul: function (b) {
vec3.mul(this._array, this._array, b._array);
this._dirty = true;
return this;
},
multiply: function (b) {
vec3.multiply(this._array, this._array, b._array);
this._dirty = true;
return this;
},
negate: function () {
vec3.negate(this._array, this._array);
this._dirty = true;
return this;
},
normalize: function () {
vec3.normalize(this._array, this._array);
this._dirty = true;
return this;
},
random: function (scale) {
vec3.random(this._array, scale);
this._dirty = true;
return this;
},
scale: function (s) {
vec3.scale(this._array, this._array, s);
this._dirty = true;
return this;
},
scaleAndAdd: function (b, s) {
vec3.scaleAndAdd(this._array, this._array, b._array, s);
this._dirty = true;
return this;
},
sqrDist: function (b) {
return vec3.sqrDist(this._array, b._array);
},
squaredDistance: function (b) {
return vec3.squaredDistance(this._array, b._array);
},
sqrLen: function () {
return vec3.sqrLen(this._array);
},
squaredLength: function () {
return vec3.squaredLength(this._array);
},
sub: function (b) {
vec3.sub(this._array, this._array, b._array);
this._dirty = true;
return this;
},
subtract: function (b) {
vec3.subtract(this._array, this._array, b._array);
this._dirty = true;
return this;
},
transformMat3: function (m) {
vec3.transformMat3(this._array, this._array, m._array);
this._dirty = true;
return this;
},
transformMat4: function (m) {
vec3.transformMat4(this._array, this._array, m._array);
this._dirty = true;
return this;
},
transformQuat: function (q) {
vec3.transformQuat(this._array, this._array, q._array);
this._dirty = true;
return this;
},
applyProjection: function (m) {
var v = this._array;
m = m._array;
if (m[15] === 0) {
var w = -1 / v[2];
v[0] = m[0] * v[0] * w;
v[1] = m[5] * v[1] * w;
v[2] = (m[10] * v[2] + m[14]) * w;
} else {
v[0] = m[0] * v[0] + m[12];
v[1] = m[5] * v[1] + m[13];
v[2] = m[10] * v[2] + m[14];
}
this._dirty = true;
return this;
},
setEulerFromQuaternion: function (q) {
},
toString: function () {
return '[' + Array.prototype.join.call(this._array, ',') + ']';
}
};
if (Object.defineProperty) {
var proto = Vector3.prototype;
Object.defineProperty(proto, 'x', {
get: function () {
return this._array[0];
},
set: function (value) {
this._array[0] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'y', {
get: function () {
return this._array[1];
},
set: function (value) {
this._array[1] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'z', {
get: function () {
return this._array[2];
},
set: function (value) {
this._array[2] = value;
this._dirty = true;
}
});
}
Vector3.add = function (out, a, b) {
vec3.add(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.set = function (out, x, y, z) {
vec3.set(out._array, x, y, z);
out._dirty = true;
};
Vector3.copy = function (out, b) {
vec3.copy(out._array, b._array);
out._dirty = true;
return out;
};
Vector3.cross = function (out, a, b) {
vec3.cross(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.dist = function (a, b) {
return vec3.distance(a._array, b._array);
};
Vector3.distance = Vector3.dist;
Vector3.div = function (out, a, b) {
vec3.divide(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.divide = Vector3.div;
Vector3.dot = function (a, b) {
return vec3.dot(a._array, b._array);
};
Vector3.len = function (b) {
return vec3.length(b._array);
};
Vector3.lerp = function (out, a, b, t) {
vec3.lerp(out._array, a._array, b._array, t);
out._dirty = true;
return out;
};
Vector3.min = function (out, a, b) {
vec3.min(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.max = function (out, a, b) {
vec3.max(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.mul = function (out, a, b) {
vec3.multiply(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.multiply = Vector3.mul;
Vector3.negate = function (out, a) {
vec3.negate(out._array, a._array);
out._dirty = true;
return out;
};
Vector3.normalize = function (out, a) {
vec3.normalize(out._array, a._array);
out._dirty = true;
return out;
};
Vector3.random = function (out, scale) {
vec3.random(out._array, scale);
out._dirty = true;
return out;
};
Vector3.scale = function (out, a, scale) {
vec3.scale(out._array, a._array, scale);
out._dirty = true;
return out;
};
Vector3.scaleAndAdd = function (out, a, b, scale) {
vec3.scaleAndAdd(out._array, a._array, b._array, scale);
out._dirty = true;
return out;
};
Vector3.sqrDist = function (a, b) {
return vec3.sqrDist(a._array, b._array);
};
Vector3.squaredDistance = Vector3.sqrDist;
Vector3.sqrLen = function (a) {
return vec3.sqrLen(a._array);
};
Vector3.squaredLength = Vector3.sqrLen;
Vector3.sub = function (out, a, b) {
vec3.subtract(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector3.subtract = Vector3.sub;
Vector3.transformMat3 = function (out, a, m) {
vec3.transformMat3(out._array, a._array, m._array);
out._dirty = true;
return out;
};
Vector3.transformMat4 = function (out, a, m) {
vec3.transformMat4(out._array, a._array, m._array);
out._dirty = true;
return out;
};
Vector3.transformQuat = function (out, a, q) {
vec3.transformQuat(out._array, a._array, q._array);
out._dirty = true;
return out;
};
Vector3.POSITIVE_X = new Vector3(1, 0, 0);
Vector3.NEGATIVE_X = new Vector3(-1, 0, 0);
Vector3.POSITIVE_Y = new Vector3(0, 1, 0);
Vector3.NEGATIVE_Y = new Vector3(0, -1, 0);
Vector3.POSITIVE_Z = new Vector3(0, 0, 1);
Vector3.NEGATIVE_Z = new Vector3(0, 0, -1);
Vector3.UP = new Vector3(0, 1, 0);
Vector3.ZERO = new Vector3(0, 0, 0);
return Vector3;
});define('qtek/math/Matrix4', [
'require',
'../dep/glmatrix',
'./Vector3'
], function (require) {
'use strict';
var glMatrix = require('../dep/glmatrix');
var Vector3 = require('./Vector3');
var mat4 = glMatrix.mat4;
var vec3 = glMatrix.vec3;
var mat3 = glMatrix.mat3;
var quat = glMatrix.quat;
function makeProperty(n) {
return {
set: function (value) {
this._array[n] = value;
this._dirty = true;
},
get: function () {
return this._array[n];
}
};
}
var Matrix4 = function () {
this._axisX = new Vector3();
this._axisY = new Vector3();
this._axisZ = new Vector3();
this._array = mat4.create();
this._dirty = true;
};
Matrix4.prototype = {
constructor: Matrix4,
adjoint: function () {
mat4.adjoint(this._array, this._array);
this._dirty = true;
return this;
},
clone: function () {
return new Matrix4().copy(this);
},
copy: function (a) {
mat4.copy(this._array, a._array);
this._dirty = true;
return this;
},
determinant: function () {
return mat4.determinant(this._array);
},
fromQuat: function (q) {
mat4.fromQuat(this._array, q._array);
this._dirty = true;
return this;
},
fromRotationTranslation: function (q, v) {
mat4.fromRotationTranslation(this._array, q._array, v._array);
this._dirty = true;
return this;
},
fromMat2d: function (m2d) {
Matrix4.fromMat2d(this, m2d);
return this;
},
frustum: function (left, right, bottom, top, near, far) {
mat4.frustum(this._array, left, right, bottom, top, near, far);
this._dirty = true;
return this;
},
identity: function () {
mat4.identity(this._array);
this._dirty = true;
return this;
},
invert: function () {
mat4.invert(this._array, this._array);
this._dirty = true;
return this;
},
lookAt: function (eye, center, up) {
mat4.lookAt(this._array, eye._array, center._array, up._array);
this._dirty = true;
return this;
},
mul: function (b) {
mat4.mul(this._array, this._array, b._array);
this._dirty = true;
return this;
},
mulLeft: function (a) {
mat4.mul(this._array, a._array, this._array);
this._dirty = true;
return this;
},
multiply: function (b) {
mat4.multiply(this._array, this._array, b._array);
this._dirty = true;
return this;
},
multiplyLeft: function (a) {
mat4.multiply(this._array, a._array, this._array);
this._dirty = true;
return this;
},
ortho: function (left, right, bottom, top, near, far) {
mat4.ortho(this._array, left, right, bottom, top, near, far);
this._dirty = true;
return this;
},
perspective: function (fovy, aspect, near, far) {
mat4.perspective(this._array, fovy, aspect, near, far);
this._dirty = true;
return this;
},
rotate: function (rad, axis) {
mat4.rotate(this._array, this._array, rad, axis._array);
this._dirty = true;
return this;
},
rotateX: function (rad) {
mat4.rotateX(this._array, this._array, rad);
this._dirty = true;
return this;
},
rotateY: function (rad) {
mat4.rotateY(this._array, this._array, rad);
this._dirty = true;
return this;
},
rotateZ: function (rad) {
mat4.rotateZ(this._array, this._array, rad);
this._dirty = true;
return this;
},
scale: function (v) {
mat4.scale(this._array, this._array, v._array);
this._dirty = true;
return this;
},
translate: function (v) {
mat4.translate(this._array, this._array, v._array);
this._dirty = true;
return this;
},
transpose: function () {
mat4.transpose(this._array, this._array);
this._dirty = true;
return this;
},
decomposeMatrix: function () {
var x = vec3.create();
var y = vec3.create();
var z = vec3.create();
var m3 = mat3.create();
return function (scale, rotation, position) {
var el = this._array;
vec3.set(x, el[0], el[1], el[2]);
vec3.set(y, el[4], el[5], el[6]);
vec3.set(z, el[8], el[9], el[10]);
var sx = vec3.length(x);
var sy = vec3.length(y);
var sz = vec3.length(z);
if (scale) {
scale.x = sx;
scale.y = sy;
scale.z = sz;
scale._dirty = true;
}
position.set(el[12], el[13], el[14]);
mat3.fromMat4(m3, el);
mat3.transpose(m3, m3);
m3[0] /= sx;
m3[1] /= sx;
m3[2] /= sx;
m3[3] /= sy;
m3[4] /= sy;
m3[5] /= sy;
m3[6] /= sz;
m3[7] /= sz;
m3[8] /= sz;
quat.fromMat3(rotation._array, m3);
quat.normalize(rotation._array, rotation._array);
rotation._dirty = true;
position._dirty = true;
};
}(),
toString: function () {
return '[' + Array.prototype.join.call(this._array, ',') + ']';
}
};
if (Object.defineProperty) {
var proto = Matrix4.prototype;
Object.defineProperty(proto, 'z', {
get: function () {
var el = this._array;
this._axisZ.set(el[8], el[9], el[10]);
return this._axisZ;
},
set: function (v) {
var el = this._array;
v = v._array;
el[8] = v[0];
el[9] = v[1];
el[10] = v[2];
this._dirty = true;
}
});
Object.defineProperty(proto, 'y', {
get: function () {
var el = this._array;
this._axisY.set(el[4], el[5], el[6]);
return this._axisY;
},
set: function (v) {
var el = this._array;
v = v._array;
el[4] = v[0];
el[5] = v[1];
el[6] = v[2];
this._dirty = true;
}
});
Object.defineProperty(proto, 'x', {
get: function () {
var el = this._array;
this._axisX.set(el[0], el[1], el[2]);
return this._axisX;
},
set: function (v) {
var el = this._array;
v = v._array;
el[0] = v[0];
el[1] = v[1];
el[2] = v[2];
this._dirty = true;
}
});
}
Matrix4.adjoint = function (out, a) {
mat4.adjoint(out._array, a._array);
out._dirty = true;
return out;
};
Matrix4.copy = function (out, a) {
mat4.copy(out._array, a._array);
out._dirty = true;
return out;
};
Matrix4.determinant = function (a) {
return mat4.determinant(a._array);
};
Matrix4.identity = function (out) {
mat4.identity(out._array);
out._dirty = true;
return out;
};
Matrix4.ortho = function (out, left, right, bottom, top, near, far) {
mat4.ortho(out._array, left, right, bottom, top, near, far);
out._dirty = true;
return out;
};
Matrix4.perspective = function (out, fovy, aspect, near, far) {
mat4.perspective(out._array, fovy, aspect, near, far);
out._dirty = true;
return out;
};
Matrix4.lookAt = function (out, eye, center, up) {
mat4.lookAt(out._array, eye._array, center._array, up._array);
out._dirty = true;
return out;
};
Matrix4.invert = function (out, a) {
mat4.invert(out._array, a._array);
out._dirty = true;
return out;
};
Matrix4.mul = function (out, a, b) {
mat4.mul(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Matrix4.multiply = Matrix4.mul;
Matrix4.fromQuat = function (out, q) {
mat4.fromQuat(out._array, q._array);
out._dirty = true;
return out;
};
Matrix4.fromRotationTranslation = function (out, q, v) {
mat4.fromRotationTranslation(out._array, q._array, v._array);
out._dirty = true;
return out;
};
Matrix4.fromMat2d = function (m4, m2d) {
m4._dirty = true;
var m2d = m2d._array;
var m4 = m4._array;
m4[0] = m2d[0];
m4[4] = m2d[2];
m4[12] = m2d[4];
m4[1] = m2d[1];
m4[5] = m2d[3];
m4[13] = m2d[5];
return m4;
};
Matrix4.rotate = function (out, a, rad, axis) {
mat4.rotate(out._array, a._array, rad, axis._array);
out._dirty = true;
return out;
};
Matrix4.rotateX = function (out, a, rad) {
mat4.rotateX(out._array, a._array, rad);
out._dirty = true;
return out;
};
Matrix4.rotateY = function (out, a, rad) {
mat4.rotateY(out._array, a._array, rad);
out._dirty = true;
return out;
};
Matrix4.rotateZ = function (out, a, rad) {
mat4.rotateZ(out._array, a._array, rad);
out._dirty = true;
return out;
};
Matrix4.scale = function (out, a, v) {
mat4.scale(out._array, a._array, v._array);
out._dirty = true;
return out;
};
Matrix4.transpose = function (out, a) {
mat4.transpose(out._array, a._array);
out._dirty = true;
return out;
};
Matrix4.translate = function (out, a, v) {
mat4.translate(out._array, a._array, v._array);
out._dirty = true;
return out;
};
return Matrix4;
});define('qtek/core/glenum', [], function () {
return {
DEPTH_BUFFER_BIT: 256,
STENCIL_BUFFER_BIT: 1024,
COLOR_BUFFER_BIT: 16384,
POINTS: 0,
LINES: 1,
LINE_LOOP: 2,
LINE_STRIP: 3,
TRIANGLES: 4,
TRIANGLE_STRIP: 5,
TRIANGLE_FAN: 6,
ZERO: 0,
ONE: 1,
SRC_COLOR: 768,
ONE_MINUS_SRC_COLOR: 769,
SRC_ALPHA: 770,
ONE_MINUS_SRC_ALPHA: 771,
DST_ALPHA: 772,
ONE_MINUS_DST_ALPHA: 773,
DST_COLOR: 774,
ONE_MINUS_DST_COLOR: 775,
SRC_ALPHA_SATURATE: 776,
FUNC_ADD: 32774,
BLEND_EQUATION: 32777,
BLEND_EQUATION_RGB: 32777,
BLEND_EQUATION_ALPHA: 34877,
FUNC_SUBTRACT: 32778,
FUNC_REVERSE_SUBTRACT: 32779,
BLEND_DST_RGB: 32968,
BLEND_SRC_RGB: 32969,
BLEND_DST_ALPHA: 32970,
BLEND_SRC_ALPHA: 32971,
CONSTANT_COLOR: 32769,
ONE_MINUS_CONSTANT_COLOR: 32770,
CONSTANT_ALPHA: 32771,
ONE_MINUS_CONSTANT_ALPHA: 32772,
BLEND_COLOR: 32773,
ARRAY_BUFFER: 34962,
ELEMENT_ARRAY_BUFFER: 34963,
ARRAY_BUFFER_BINDING: 34964,
ELEMENT_ARRAY_BUFFER_BINDING: 34965,
STREAM_DRAW: 35040,
STATIC_DRAW: 35044,
DYNAMIC_DRAW: 35048,
BUFFER_SIZE: 34660,
BUFFER_USAGE: 34661,
CURRENT_VERTEX_ATTRIB: 34342,
FRONT: 1028,
BACK: 1029,
FRONT_AND_BACK: 1032,
CULL_FACE: 2884,
BLEND: 3042,
DITHER: 3024,
STENCIL_TEST: 2960,
DEPTH_TEST: 2929,
SCISSOR_TEST: 3089,
POLYGON_OFFSET_FILL: 32823,
SAMPLE_ALPHA_TO_COVERAGE: 32926,
SAMPLE_COVERAGE: 32928,
NO_ERROR: 0,
INVALID_ENUM: 1280,
INVALID_VALUE: 1281,
INVALID_OPERATION: 1282,
OUT_OF_MEMORY: 1285,
CW: 2304,
CCW: 2305,
LINE_WIDTH: 2849,
ALIASED_POINT_SIZE_RANGE: 33901,
ALIASED_LINE_WIDTH_RANGE: 33902,
CULL_FACE_MODE: 2885,
FRONT_FACE: 2886,
DEPTH_RANGE: 2928,
DEPTH_WRITEMASK: 2930,
DEPTH_CLEAR_VALUE: 2931,
DEPTH_FUNC: 2932,
STENCIL_CLEAR_VALUE: 2961,
STENCIL_FUNC: 2962,
STENCIL_FAIL: 2964,
STENCIL_PASS_DEPTH_FAIL: 2965,
STENCIL_PASS_DEPTH_PASS: 2966,
STENCIL_REF: 2967,
STENCIL_VALUE_MASK: 2963,
STENCIL_WRITEMASK: 2968,
STENCIL_BACK_FUNC: 34816,
STENCIL_BACK_FAIL: 34817,
STENCIL_BACK_PASS_DEPTH_FAIL: 34818,
STENCIL_BACK_PASS_DEPTH_PASS: 34819,
STENCIL_BACK_REF: 36003,
STENCIL_BACK_VALUE_MASK: 36004,
STENCIL_BACK_WRITEMASK: 36005,
VIEWPORT: 2978,
SCISSOR_BOX: 3088,
COLOR_CLEAR_VALUE: 3106,
COLOR_WRITEMASK: 3107,
UNPACK_ALIGNMENT: 3317,
PACK_ALIGNMENT: 3333,
MAX_TEXTURE_SIZE: 3379,
MAX_VIEWPORT_DIMS: 3386,
SUBPIXEL_BITS: 3408,
RED_BITS: 3410,
GREEN_BITS: 3411,
BLUE_BITS: 3412,
ALPHA_BITS: 3413,
DEPTH_BITS: 3414,
STENCIL_BITS: 3415,
POLYGON_OFFSET_UNITS: 10752,
POLYGON_OFFSET_FACTOR: 32824,
TEXTURE_BINDING_2D: 32873,
SAMPLE_BUFFERS: 32936,
SAMPLES: 32937,
SAMPLE_COVERAGE_VALUE: 32938,
SAMPLE_COVERAGE_INVERT: 32939,
COMPRESSED_TEXTURE_FORMATS: 34467,
DONT_CARE: 4352,
FASTEST: 4353,
NICEST: 4354,
GENERATE_MIPMAP_HINT: 33170,
BYTE: 5120,
UNSIGNED_BYTE: 5121,
SHORT: 5122,
UNSIGNED_SHORT: 5123,
INT: 5124,
UNSIGNED_INT: 5125,
FLOAT: 5126,
DEPTH_COMPONENT: 6402,
ALPHA: 6406,
RGB: 6407,
RGBA: 6408,
LUMINANCE: 6409,
LUMINANCE_ALPHA: 6410,
UNSIGNED_SHORT_4_4_4_4: 32819,
UNSIGNED_SHORT_5_5_5_1: 32820,
UNSIGNED_SHORT_5_6_5: 33635,
FRAGMENT_SHADER: 35632,
VERTEX_SHADER: 35633,
MAX_VERTEX_ATTRIBS: 34921,
MAX_VERTEX_UNIFORM_VECTORS: 36347,
MAX_VARYING_VECTORS: 36348,
MAX_COMBINED_TEXTURE_IMAGE_UNITS: 35661,
MAX_VERTEX_TEXTURE_IMAGE_UNITS: 35660,
MAX_TEXTURE_IMAGE_UNITS: 34930,
MAX_FRAGMENT_UNIFORM_VECTORS: 36349,
SHADER_TYPE: 35663,
DELETE_STATUS: 35712,
LINK_STATUS: 35714,
VALIDATE_STATUS: 35715,
ATTACHED_SHADERS: 35717,
ACTIVE_UNIFORMS: 35718,
ACTIVE_ATTRIBUTES: 35721,
SHADING_LANGUAGE_VERSION: 35724,
CURRENT_PROGRAM: 35725,
NEVER: 512,
LESS: 513,
EQUAL: 514,
LEQUAL: 515,
GREATER: 516,
NOTEQUAL: 517,
GEQUAL: 518,
ALWAYS: 519,
KEEP: 7680,
REPLACE: 7681,
INCR: 7682,
DECR: 7683,
INVERT: 5386,
INCR_WRAP: 34055,
DECR_WRAP: 34056,
VENDOR: 7936,
RENDERER: 7937,
VERSION: 7938,
NEAREST: 9728,
LINEAR: 9729,
NEAREST_MIPMAP_NEAREST: 9984,
LINEAR_MIPMAP_NEAREST: 9985,
NEAREST_MIPMAP_LINEAR: 9986,
LINEAR_MIPMAP_LINEAR: 9987,
TEXTURE_MAG_FILTER: 10240,
TEXTURE_MIN_FILTER: 10241,
TEXTURE_WRAP_S: 10242,
TEXTURE_WRAP_T: 10243,
TEXTURE_2D: 3553,
TEXTURE: 5890,
TEXTURE_CUBE_MAP: 34067,
TEXTURE_BINDING_CUBE_MAP: 34068,
TEXTURE_CUBE_MAP_POSITIVE_X: 34069,
TEXTURE_CUBE_MAP_NEGATIVE_X: 34070,
TEXTURE_CUBE_MAP_POSITIVE_Y: 34071,
TEXTURE_CUBE_MAP_NEGATIVE_Y: 34072,
TEXTURE_CUBE_MAP_POSITIVE_Z: 34073,
TEXTURE_CUBE_MAP_NEGATIVE_Z: 34074,
MAX_CUBE_MAP_TEXTURE_SIZE: 34076,
TEXTURE0: 33984,
TEXTURE1: 33985,
TEXTURE2: 33986,
TEXTURE3: 33987,
TEXTURE4: 33988,
TEXTURE5: 33989,
TEXTURE6: 33990,
TEXTURE7: 33991,
TEXTURE8: 33992,
TEXTURE9: 33993,
TEXTURE10: 33994,
TEXTURE11: 33995,
TEXTURE12: 33996,
TEXTURE13: 33997,
TEXTURE14: 33998,
TEXTURE15: 33999,
TEXTURE16: 34000,
TEXTURE17: 34001,
TEXTURE18: 34002,
TEXTURE19: 34003,
TEXTURE20: 34004,
TEXTURE21: 34005,
TEXTURE22: 34006,
TEXTURE23: 34007,
TEXTURE24: 34008,
TEXTURE25: 34009,
TEXTURE26: 34010,
TEXTURE27: 34011,
TEXTURE28: 34012,
TEXTURE29: 34013,
TEXTURE30: 34014,
TEXTURE31: 34015,
ACTIVE_TEXTURE: 34016,
REPEAT: 10497,
CLAMP_TO_EDGE: 33071,
MIRRORED_REPEAT: 33648,
FLOAT_VEC2: 35664,
FLOAT_VEC3: 35665,
FLOAT_VEC4: 35666,
INT_VEC2: 35667,
INT_VEC3: 35668,
INT_VEC4: 35669,
BOOL: 35670,
BOOL_VEC2: 35671,
BOOL_VEC3: 35672,
BOOL_VEC4: 35673,
FLOAT_MAT2: 35674,
FLOAT_MAT3: 35675,
FLOAT_MAT4: 35676,
SAMPLER_2D: 35678,
SAMPLER_CUBE: 35680,
VERTEX_ATTRIB_ARRAY_ENABLED: 34338,
VERTEX_ATTRIB_ARRAY_SIZE: 34339,
VERTEX_ATTRIB_ARRAY_STRIDE: 34340,
VERTEX_ATTRIB_ARRAY_TYPE: 34341,
VERTEX_ATTRIB_ARRAY_NORMALIZED: 34922,
VERTEX_ATTRIB_ARRAY_POINTER: 34373,
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 34975,
COMPILE_STATUS: 35713,
LOW_FLOAT: 36336,
MEDIUM_FLOAT: 36337,
HIGH_FLOAT: 36338,
LOW_INT: 36339,
MEDIUM_INT: 36340,
HIGH_INT: 36341,
FRAMEBUFFER: 36160,
RENDERBUFFER: 36161,
RGBA4: 32854,
RGB5_A1: 32855,
RGB565: 36194,
DEPTH_COMPONENT16: 33189,
STENCIL_INDEX: 6401,
STENCIL_INDEX8: 36168,
DEPTH_STENCIL: 34041,
RENDERBUFFER_WIDTH: 36162,
RENDERBUFFER_HEIGHT: 36163,
RENDERBUFFER_INTERNAL_FORMAT: 36164,
RENDERBUFFER_RED_SIZE: 36176,
RENDERBUFFER_GREEN_SIZE: 36177,
RENDERBUFFER_BLUE_SIZE: 36178,
RENDERBUFFER_ALPHA_SIZE: 36179,
RENDERBUFFER_DEPTH_SIZE: 36180,
RENDERBUFFER_STENCIL_SIZE: 36181,
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 36048,
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 36049,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 36050,
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 36051,
COLOR_ATTACHMENT0: 36064,
DEPTH_ATTACHMENT: 36096,
STENCIL_ATTACHMENT: 36128,
DEPTH_STENCIL_ATTACHMENT: 33306,
NONE: 0,
FRAMEBUFFER_COMPLETE: 36053,
FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 36054,
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 36055,
FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 36057,
FRAMEBUFFER_UNSUPPORTED: 36061,
FRAMEBUFFER_BINDING: 36006,
RENDERBUFFER_BINDING: 36007,
MAX_RENDERBUFFER_SIZE: 34024,
INVALID_FRAMEBUFFER_OPERATION: 1286,
UNPACK_FLIP_Y_WEBGL: 37440,
UNPACK_PREMULTIPLY_ALPHA_WEBGL: 37441,
CONTEXT_LOST_WEBGL: 37442,
UNPACK_COLORSPACE_CONVERSION_WEBGL: 37443,
BROWSER_DEFAULT_WEBGL: 37444
};
});define('echarts-x/chart/base3d', [
'require',
'echarts/config',
'zrender/tool/util',
'../component/base3d',
'../util/color',
'qtek/core/LRU',
'qtek/math/Vector3',
'qtek/math/Matrix4',
'../entity/marker/MarkLine',
'../entity/marker/MarkBar',
'../entity/marker/MarkPoint',
'../entity/marker/LargeMarkPoint'
], function (require) {
'use strict';
var ecConfig = require('echarts/config');
var zrUtil = require('zrender/tool/util');
var ComponentBase3D = require('../component/base3d');
var colorUtil = require('../util/color');
var LRUCache = require('qtek/core/LRU');
var Vector3 = require('qtek/math/Vector3');
var Matrix4 = require('qtek/math/Matrix4');
var MarkerCtorMap = {
markLine: require('../entity/marker/MarkLine'),
markBar: require('../entity/marker/MarkBar'),
markPoint: require('../entity/marker/MarkPoint'),
largeMarkPoint: require('../entity/marker/LargeMarkPoint')
};
function Base3D(ecTheme, messageCenter, zr, option, myChart) {
ComponentBase3D.call(this, ecTheme, messageCenter, zr, option, myChart);
this._markLineList = [];
this._markLineCount = 0;
this._markPointList = [];
this._markPointCount = 0;
this._markBarList = [];
this._markBarCount = 0;
this._largeMarkPointList = [];
this._largeMarkPointCount = 0;
this._markList = [];
}
;
Base3D.prototype = {
constructor: Base3D,
beforeBuildMark: function () {
for (var i = 0; i < this._markList.length; i++) {
this._markList[i].clear();
}
this._markList.length = 0;
this._markBarCount = 0;
this._markPointCount = 0;
this._markLineCount = 0;
this._largeMarkPointCount = 0;
},
buildMark: function (seriesIndex, parentNode) {
var serie = this.series[seriesIndex];
if (serie.markPoint) {
zrUtil.merge(zrUtil.merge(serie.markPoint, this.ecTheme.markPoint || {}), ecConfig.markPoint);
if (serie.markPoint.large) {
this._buildSingleTypeMarker('largeMarkPoint', seriesIndex, parentNode);
} else {
this._buildSingleTypeMarker('markPoint', seriesIndex, parentNode);
}
}
if (serie.markLine) {
zrUtil.merge(zrUtil.merge(serie.markLine, this.ecTheme.markLine || {}), ecConfig.markLine);
this._buildSingleTypeMarker('markLine', seriesIndex, parentNode);
}
if (serie.markBar) {
zrUtil.merge(zrUtil.merge(serie.markBar, this.ecTheme.markBar || {}), ecConfig.markBar);
this._buildSingleTypeMarker('markBar', seriesIndex, parentNode);
}
},
afterBuildMark: function () {
for (var i = this._markPointCount; i < this._markPointList.length; i++) {
this._disposeSingleSerieMark(this._markPointList[i]);
}
this._markPointList.length = this._markPointCount;
for (var i = this._largeMarkPointCount; i < this._largeMarkPointList.length; i++) {
this._disposeSingleSerieMark(this._largeMarkPointList[i]);
}
this._largeMarkPointList.length = this._largeMarkPointCount;
for (var i = this._markLineCount; i < this._markLineList.length; i++) {
this._disposeSingleSerieMark(this._markLineList[i]);
}
this._markLineList.length = this._markLineCount;
for (var i = this._markBarCount; i < this._markBarList.length; i++) {
this._disposeSingleSerieMark(this._markBarList[i]);
}
this._markBarList.length = this._markBarCount;
},
_disposeSingleSerieMark: function (marker) {
var sceneNode = marker.getSceneNode();
if (sceneNode.getParent()) {
sceneNode.getParent().remove(sceneNode);
}
marker.dispose();
},
_buildSingleTypeMarker: function (markerType, seriesIndex, parentNode) {
var serie = this.series[seriesIndex];
var list = this['_' + markerType + 'List'];
var count = this['_' + markerType + 'Count'];
var MarkerCtor = MarkerCtorMap[markerType];
if (!list || !MarkerCtor) {
return;
}
if (!list[count]) {
list[count] = new MarkerCtor(this);
}
var marker = list[count];
marker.setSeries(serie, seriesIndex);
var sceneNode = marker.getSceneNode();
if (sceneNode.getParent() !== parentNode) {
parentNode.add(sceneNode);
}
this['_' + markerType + 'Count']++;
this._markList.push(marker);
},
parseColor: function (colorStr) {
if (!colorStr) {
return null;
}
if (colorStr instanceof Array) {
return colorStr;
}
if (!this._colorCache) {
this._colorCache = new LRUCache(10);
}
var colorArr = this._colorCache.get(colorStr);
if (!colorArr) {
colorArr = colorUtil.parse(colorStr);
this._colorCache.put(colorStr, colorArr);
colorArr[0] /= 255;
colorArr[1] /= 255;
colorArr[2] /= 255;
}
return colorArr;
},
getMarkCoord: function (seriesIndex, data, point) {
point._array[0] = data.x;
point._array[1] = data.y;
point._array[2] = data.z;
},
getMarkPointTransform: function (seriesIndex, data, matrix) {
Matrix4.identity(matrix);
var position = new Vector3();
this.getMarkCoord(seriesIndex, data, position);
var arr = matrix._array;
arr[12] = position.x;
arr[13] = position.y;
arr[14] = position.z;
},
getMarkBarPoints: function (seriesIndex, data, start, end) {
var barHeight = data.barHeight != null ? data.barHeight : 1;
if (typeof barHeight == 'function') {
barHeight = barHeight(data);
}
this.getMarkCoord(seriesIndex, data, start);
Vector3.scaleAndAdd(end, end, start, 1);
},
getMarkLinePoints: function (seriesIndex, data, p0, p1, p2, p3) {
var isCurve = !!p2;
if (!isCurve) {
p3 = p1;
}
this.getMarkCoord(seriesIndex, data[0], p0);
this.getMarkCoord(seriesIndex, data[1], p3);
if (isCurve) {
Vector3.copy(p1, p0);
Vector3.copy(p2, p3);
}
},
getSerieLabelText: function (serie, data, name, status) {
var formatter = this.deepQuery([
data,
serie
], 'itemStyle.' + status + '.label.formatter');
if (!formatter && status === 'emphasis') {
formatter = this.deepQuery([
data,
serie
], 'itemStyle.normal.label.formatter');
}
var value = this.getDataFromOption(data, '-');
if (formatter) {
if (typeof formatter === 'function') {
return formatter.call(this.myChart, {
seriesName: serie.name,
series: serie,
name: name,
value: value,
data: data,
status: status
});
} else if (typeof formatter === 'string') {
formatter = formatter.replace('{a}', '{a0}').replace('{b}', '{b0}').replace('{c}', '{c0}').replace('{a0}', serie.name).replace('{b0}', name).replace('{c0}', this.numAddCommas(value));
return formatter;
}
} else {
if (value instanceof Array) {
return value[2] != null ? this.numAddCommas(value[2]) : value[0] + ' , ' + value[1];
} else {
return this.numAddCommas(value);
}
}
},
onlegendSelected: function (param, status) {
var legendSelected = param.selected;
for (var itemName in this.selectedMap) {
if (this.selectedMap[itemName] != legendSelected[itemName]) {
status.needRefresh = true;
}
this.selectedMap[itemName] = legendSelected[itemName];
}
return;
},
dispose: function () {
ComponentBase3D.prototype.dispose.call(this);
for (var i = 0; i < this._markList.length; i++) {
this._disposeSingleSerieMark(this._markList[i]);
}
},
onframe: function (deltaTime) {
for (var i = 0; i < this._markList.length; i++) {
this._markList[i].onframe(deltaTime);
}
}
};
zrUtil.inherits(Base3D, ComponentBase3D);
return Base3D;
});define('echarts-x/util/OrbitControl', [
'require',
'zrender/config',
'qtek/math/Vector2'
], function (require) {
'use strict';
var zrConfig = require('zrender/config');
var Vector2 = require('qtek/math/Vector2');
var EVENT = zrConfig.EVENT;
var OrbitControl = function (target, zr, layer) {
this.zr = zr;
this.layer = layer;
this.target = target;
this.autoRotate = false;
this.minZoom = 0.5;
this.maxZoom = 1.5;
this._zoom = 1;
this._rotateY = 0;
this._rotateX = 0;
this._mouseX = 0;
this._mouseY = 0;
this._rotateVelocity = new Vector2();
this._zoomSpeed = 0;
};
OrbitControl.prototype = {
constructor: OrbitControl,
init: function () {
this.layer.bind(EVENT.MOUSEDOWN, this._mouseDownHandler, this);
this.layer.bind(EVENT.MOUSEWHEEL, this._mouseWheelHandler, this);
},
dispose: function () {
this.layer.unbind(EVENT.MOUSEDOWN, this._mouseDownHandler);
this.layer.unbind(EVENT.MOUSEMOVE, this._mouseMoveHandler);
this.layer.unbind(EVENT.MOUSEUP, this._mouseUpHandler);
this.layer.unbind(EVENT.MOUSEWHEEL, this._mouseWheelHandler);
},
update: function (deltaTime) {
this._rotateY = (this._rotateVelocity.y + this._rotateY) % (Math.PI * 2);
this._rotateX = (this._rotateVelocity.x + this._rotateX) % (Math.PI * 2);
this._rotateX = Math.max(Math.min(this._rotateX, Math.PI / 2), -Math.PI / 2);
this._zoom += this._zoomSpeed;
this._zoom = Math.max(Math.min(this._zoom, this.maxZoom), this.minZoom);
this.target.rotation.identity().rotateX(this._rotateX).rotateY(this._rotateY);
var zoom = this._zoom;
this.target.scale.set(zoom, zoom, zoom);
if (this.autoRotate) {
this._rotateY -= deltaTime * 0.0001;
this.zr.refreshNextFrame();
} else if (this._rotateVelocity.len() > 0 || this._zoomSpeed !== 0) {
this.zr.refreshNextFrame();
}
var speed = this._rotateVelocity.len();
speed = speed * 0.8;
if (speed < 0.0001) {
speed = 0;
}
this._rotateVelocity.normalize().scale(speed);
this._zoomSpeed *= 0.8;
if (Math.abs(this._zoomSpeed) < 0.001) {
this._zoomSpeed = 0;
}
},
_mouseDownHandler: function (e) {
this.layer.bind(EVENT.MOUSEMOVE, this._mouseMoveHandler, this);
this.layer.bind(EVENT.MOUSEUP, this._mouseUpHandler, this);
e = e.event;
this._rotateVelocity.set(0, 0);
this._mouseX = e.pageX;
this._mouseY = e.pageY;
if (this.autoRotate) {
this.autoRotate = false;
}
},
_mouseMoveHandler: function (e) {
e = e.event;
this._rotateVelocity.y = (e.pageX - this._mouseX) / 500;
this._rotateVelocity.x = (e.pageY - this._mouseY) / 500;
this._mouseX = e.pageX;
this._mouseY = e.pageY;
},
_mouseWheelHandler: function (e) {
e = e.event;
var delta = e.wheelDelta || -e.detail;
this._zoomSpeed = delta > 0 ? 0.05 : -0.05;
},
_mouseUpHandler: function () {
this.layer.unbind(EVENT.MOUSEMOVE, this._mouseMoveHandler, this);
this.layer.unbind(EVENT.MOUSEUP, this._mouseUpHandler, this);
}
};
return OrbitControl;
});define('echarts-x/surface/ZRenderSurface', [
'require',
'zrender/Storage',
'qtek/Texture2D',
'qtek/math/Vector3',
'qtek/math/Vector2'
], function (require) {
var Storage = require('zrender/Storage');
var Texture = require('qtek/Texture2D');
var Vector3 = require('qtek/math/Vector3');
var Vector2 = require('qtek/math/Vector2');
var ZRenderSurface = function (width, height) {
this.onrefresh = function () {
};
this._storage = new Storage();
this._canvas = document.createElement('canvas');
this._width = width || 512;
this._height = height || 512;
this._canvas.width = this._width;
this._canvas.height = this._height;
this._ctx = this._canvas.getContext('2d');
this._texture = new Texture({
image: this._canvas,
anisotropic: 32,
flipY: false
});
this.refreshNextTick = this.refreshNextTick.bind(this);
};
ZRenderSurface.prototype = {
constructor: ZRenderSurface,
backgroundColor: '',
backgroundImage: null,
addElement: function (el) {
this._storage.addRoot(el);
},
delElement: function (el) {
this._storage.delRoot(el);
},
clearElements: function () {
this._storage.delRoot();
},
getTexture: function () {
return this._texture;
},
resize: function (width, height) {
if (this._width === width && this._height === height) {
return;
}
this._width = width;
this._height = height;
this._canvas.width = width;
this._canvas.height = height;
this.refresh();
},
getWidth: function () {
return this._width;
},
getHeight: function () {
return this._height;
},
refresh: function () {
var ctx = this._ctx;
ctx.clearRect(0, 0, this._width, this._height);
if (this.backgroundColor) {
ctx.fillStyle = this.backgroundColor;
ctx.fillRect(0, 0, this._width, this._height);
}
var bg = this.backgroundImage;
if (bg && bg.width && bg.height) {
ctx.drawImage(this.backgroundImage, 0, 0, this._width, this._height);
}
var list = this._storage.getShapeList(true);
for (var i = 0; i < list.length; i++) {
var shape = list[i];
if (!shape.invisible) {
shape.brush(ctx, shape.isHighlight, this.refreshNextTick);
}
}
this._texture.dirty();
this.onrefresh && this.onrefresh();
},
refreshNextTick: function () {
var timeout;
return function () {
var self = this;
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(function () {
self.refresh();
}, 16);
};
}(),
hover: function (e) {
var list = this._storage.getShapeList();
var shape = this.pick(e.target, e.face, e.point, list);
var needsRefresh = false;
for (var i = 0; i < list.length; i++) {
list[i].isHighlight = false;
list[i].zlevel = 0;
if (list[i] == shape && !list[i].isHighlight || list[i] != shape && list[i].isHighlight) {
needsRefresh = true;
}
}
if (shape) {
shape.isHighlight = true;
shape.zlevel = 10;
}
if (needsRefresh) {
this.refresh();
}
return shape;
},
pick: function () {
var p0 = new Vector3();
var p1 = new Vector3();
var p2 = new Vector3();
var uv0 = new Vector2();
var uv1 = new Vector2();
var uv2 = new Vector2();
var uv = new Vector2();
var vCross = new Vector3();
return function (attachedMesh, triangle, points, list) {
var geo = attachedMesh.geometry;
var position = geo.attributes.position;
var texcoord = geo.attributes.texcoord0;
position.get(triangle[0], p0);
position.get(triangle[1], p1);
position.get(triangle[2], p2);
texcoord.get(triangle[0], uv0);
texcoord.get(triangle[1], uv1);
texcoord.get(triangle[2], uv2);
Vector3.cross(vCross, p1, p2);
var det = Vector3.dot(p0, vCross);
var t = Vector3.dot(points, vCross) / det;
Vector3.cross(vCross, p2, p0);
var u = Vector3.dot(points, vCross) / det;
Vector3.cross(vCross, p0, p1);
var v = Vector3.dot(points, vCross) / det;
Vector2.scale(uv, uv0, t);
Vector2.scaleAndAdd(uv, uv, uv1, u);
Vector2.scaleAndAdd(uv, uv, uv2, v);
var x = uv.x * this._width;
var y = uv.y * this._height;
var list = list || this._storage.getShapeList();
for (var i = list.length - 1; i >= 0; i--) {
var shape = list[i];
if (!shape.isSilent() && shape.isCover(x, y)) {
return shape;
}
}
};
}()
};
return ZRenderSurface;
});define('echarts-x/surface/VectorFieldParticleSurface', [
'require',
'qtek/compositor/Pass',
'qtek/StaticGeometry',
'qtek/Mesh',
'qtek/Material',
'qtek/Shader',
'qtek/Texture2D',
'qtek/core/glenum',
'qtek/camera/Orthographic',
'qtek/Scene',
'qtek/FrameBuffer',
'../util/sprite'
], function (require) {
var Pass = require('qtek/compositor/Pass');
var StaticGeometry = require('qtek/StaticGeometry');
var Mesh = require('qtek/Mesh');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var Texture2D = require('qtek/Texture2D');
var glenum = require('qtek/core/glenum');
var OrthoCamera = require('qtek/camera/Orthographic');
var Scene = require('qtek/Scene');
var FrameBuffer = require('qtek/FrameBuffer');
var spriteUtil = require('../util/sprite');
var VectorFieldParticleSurface = function (renderer) {
this.renderer = renderer;
this.motionBlurFactor = 0.99;
this.vectorFieldTexture = null;
this.particleLife = [
10,
20
];
this.particleSizeScaling = 1;
this.particleColor = [
1,
1,
1,
1
];
this.particleSpeedScaling = 1;
this.surfaceTexture = null;
this.surfaceMesh = null;
this._particlePass = null;
this._spawnTexture = null;
this._particleTexture0 = null;
this._particleTexture1 = null;
this._particleMesh = null;
this._frameBuffer = null;
this._elapsedTime = 0;
this._scene = null;
this._camera = null;
this._motionBlurPass = null;
this._thisFrameTexture = null;
this._lastFrameTexture = null;
};
VectorFieldParticleSurface.prototype = {
constructor: VectorFieldParticleSurface,
init: function (width, height) {
var geometry = new StaticGeometry({ mainAttribute: 'texcoord0' });
var nVertex = width * height;
var attributes = geometry.attributes;
attributes.texcoord0.init(nVertex);
var spawnTextureData = new Float32Array(nVertex * 4);
var off = 0;
var lifeRange = this.particleLife;
for (var i = 0; i < width; i++) {
for (var j = 0; j < height; j++, off++) {
attributes.texcoord0.value[off * 2] = i / width;
attributes.texcoord0.value[off * 2 + 1] = j / height;
spawnTextureData[off * 4] = Math.random();
spawnTextureData[off * 4 + 1] = Math.random();
spawnTextureData[off * 4 + 2] = Math.random();
var life = (lifeRange[1] - lifeRange[0]) * Math.random() + lifeRange[0];
spawnTextureData[off * 4 + 3] = life;
}
}
var parameters = {
width: width,
height: height,
type: glenum.FLOAT,
minFilter: glenum.NEAREST,
magFilter: glenum.NEAREST,
wrapS: glenum.REPEAT,
wrapT: glenum.REPEAT,
useMipmap: false
};
this._spawnTexture = new Texture2D(parameters);
this._spawnTexture.pixels = spawnTextureData;
this._particleTexture0 = new Texture2D(parameters);
this._particleTexture1 = new Texture2D(parameters);
this._frameBuffer = new FrameBuffer();
this._particlePass = new Pass({ fragment: Shader.source('ecx.vfParticle.particle.fragment') });
this._particlePass.setUniform('velocityTexture', this.vectorFieldTexture);
this._particlePass.setUniform('spawnTexture', this._spawnTexture);
this._particlePass.setUniform('speedScaling', this.particleSpeedScaling);
this._motionBlurPass = new Pass({ fragment: Shader.source('ecx.motionBlur.fragment') });
this._motionBlurPass.setUniform('percent', this.motionBlurFactor);
var particleMesh = new Mesh({
material: new Material({
shader: new Shader({
vertex: Shader.source('ecx.vfParticle.renderPoints.vertex'),
fragment: Shader.source('ecx.vfParticle.renderPoints.fragment')
})
}),
mode: glenum.POINTS,
geometry: geometry
});
particleMesh.material.set('spriteTexture', new Texture2D({ image: spriteUtil.makeSimpleSprite(128) }));
particleMesh.material.set('sizeScaling', this.particleSizeScaling * this.renderer.getDevicePixelRatio());
particleMesh.material.set('color', this.particleColor);
this._particleMesh = particleMesh;
this._scene = new Scene();
this._scene.add(this._particleMesh);
this._camera = new OrthoCamera();
if (!this.surfaceTexture) {
this.surfaceTexture = new Texture2D({
width: 1024,
height: 1024
});
}
var surfaceWidth = this.surfaceTexture.width;
var surfaceHeight = this.surfaceTexture.height;
this._lastFrameTexture = new Texture2D({
width: surfaceWidth,
height: surfaceHeight
});
this._thisFrameTexture = new Texture2D({
width: surfaceWidth,
height: surfaceHeight
});
},
update: function (deltaTime) {
var frameBuffer = this._frameBuffer;
var particlePass = this._particlePass;
var motionBlurPass = this._motionBlurPass;
particlePass.attachOutput(this._particleTexture1);
particlePass.setUniform('particleTexture', this._particleTexture0);
particlePass.setUniform('deltaTime', deltaTime);
particlePass.setUniform('elapsedTime', this._elapsedTime);
particlePass.render(this.renderer, frameBuffer);
this._particleMesh.material.set('particleTexture', this._particleTexture1);
frameBuffer.attach(this.renderer.gl, this._thisFrameTexture);
frameBuffer.bind(this.renderer);
this.renderer.render(this._scene, this._camera);
frameBuffer.unbind(this.renderer);
motionBlurPass.attachOutput(this.surfaceTexture);
motionBlurPass.setUniform('lastFrame', this._lastFrameTexture);
motionBlurPass.setUniform('thisFrame', this._thisFrameTexture);
motionBlurPass.render(this.renderer, frameBuffer);
this._swapTexture();
if (this.surfaceMesh) {
this.surfaceMesh.material.set('diffuseMap', this.surfaceTexture);
}
this._elapsedTime += deltaTime;
},
_swapTexture: function () {
var tmp = this._particleTexture0;
this._particleTexture0 = this._particleTexture1;
this._particleTexture1 = tmp;
var tmp = this.surfaceTexture;
this.surfaceTexture = this._lastFrameTexture;
this._lastFrameTexture = tmp;
},
dispose: function () {
var renderer = this.renderer;
renderer.disposeFrameBuffer(this._frameBuffer);
renderer.disposeTexture(this.vectorFieldTexture);
renderer.disposeTexture(this._spawnTexture);
renderer.disposeTexture(this._particleTexture0);
renderer.disposeTexture(this._particleTexture1);
renderer.disposeTexture(this._thisFrameTexture);
renderer.disposeTexture(this._lastFrameTexture);
renderer.disposeScene(this._scene);
}
};
return VectorFieldParticleSurface;
});define('qtek/core/LRU', [
'require',
'./LinkedList'
], function (require) {
'use strict';
var LinkedList = require('./LinkedList');
var LRU = function (maxSize) {
this._list = new LinkedList();
this._map = {};
this._maxSize = maxSize || 10;
};
LRU.prototype.setMaxSize = function (size) {
this._maxSize = size;
};
LRU.prototype.put = function (key, value) {
if (typeof this._map[key] == 'undefined') {
var len = this._list.length();
if (len >= this._maxSize && len > 0) {
var leastUsedEntry = this._list.head;
this._list.remove(leastUsedEntry);
delete this._map[leastUsedEntry.key];
}
var entry = this._list.insert(value);
entry.key = key;
this._map[key] = entry;
}
};
LRU.prototype.get = function (key) {
var entry = this._map[key];
if (typeof entry != 'undefined') {
if (entry !== this._list.tail) {
this._list.remove(entry);
this._list.insertEntry(entry);
}
return entry.value;
}
};
LRU.prototype.remove = function (key) {
var entry = this._map[key];
if (typeof entry != 'undefined') {
delete this._map[key];
this._list.remove(entry);
}
};
LRU.prototype.clear = function () {
this._list.clear();
this._map = {};
};
return LRU;
});define('qtek/math/Quaternion', [
'require',
'../dep/glmatrix'
], function (require) {
'use strict';
var glMatrix = require('../dep/glmatrix');
var quat = glMatrix.quat;
var Quaternion = function (x, y, z, w) {
x = x || 0;
y = y || 0;
z = z || 0;
w = w === undefined ? 1 : w;
this._array = quat.fromValues(x, y, z, w);
this._dirty = true;
};
Quaternion.prototype = {
constructor: Quaternion,
add: function (b) {
quat.add(this._array, this._array, b._array);
this._dirty = true;
return this;
},
calculateW: function () {
quat.calculateW(this._array, this._array);
this._dirty = true;
return this;
},
set: function (x, y, z, w) {
this._array[0] = x;
this._array[1] = y;
this._array[2] = z;
this._array[3] = w;
this._dirty = true;
return this;
},
setArray: function (arr) {
this._array[0] = arr[0];
this._array[1] = arr[1];
this._array[2] = arr[2];
this._array[3] = arr[3];
this._dirty = true;
return this;
},
clone: function () {
return new Quaternion(this.x, this.y, this.z, this.w);
},
conjugate: function () {
quat.conjugate(this._array, this._array);
this._dirty = true;
return this;
},
copy: function (b) {
quat.copy(this._array, b._array);
this._dirty = true;
return this;
},
dot: function (b) {
return quat.dot(this._array, b._array);
},
fromMat3: function (m) {
quat.fromMat3(this._array, m._array);
this._dirty = true;
return this;
},
fromMat4: function () {
var mat3 = glMatrix.mat3;
var m3 = mat3.create();
return function (m) {
mat3.fromMat4(m3, m._array);
mat3.transpose(m3, m3);
quat.fromMat3(this._array, m3);
this._dirty = true;
return this;
};
}(),
identity: function () {
quat.identity(this._array);
this._dirty = true;
return this;
},
invert: function () {
quat.invert(this._array, this._array);
this._dirty = true;
return this;
},
len: function () {
return quat.len(this._array);
},
length: function () {
return quat.length(this._array);
},
lerp: function (a, b, t) {
quat.lerp(this._array, a._array, b._array, t);
this._dirty = true;
return this;
},
mul: function (b) {
quat.mul(this._array, this._array, b._array);
this._dirty = true;
return this;
},
mulLeft: function (a) {
quat.multiply(this._array, a._array, this._array);
this._dirty = true;
return this;
},
multiply: function (b) {
quat.multiply(this._array, this._array, b._array);
this._dirty = true;
return this;
},
multiplyLeft: function (a) {
quat.multiply(this._array, a._array, this._array);
this._dirty = true;
return this;
},
normalize: function () {
quat.normalize(this._array, this._array);
this._dirty = true;
return this;
},
rotateX: function (rad) {
quat.rotateX(this._array, this._array, rad);
this._dirty = true;
return this;
},
rotateY: function (rad) {
quat.rotateY(this._array, this._array, rad);
this._dirty = true;
return this;
},
rotateZ: function (rad) {
quat.rotateZ(this._array, this._array, rad);
this._dirty = true;
return this;
},
rotationTo: function (a, b) {
quat.rotationTo(this._array, a._array, b._array);
this._dirty = true;
return this;
},
setAxes: function (view, right, up) {
quat.setAxes(this._array, view._array, right._array, up._array);
this._dirty = true;
return this;
},
setAxisAngle: function (axis, rad) {
quat.setAxisAngle(this._array, axis._array, rad);
this._dirty = true;
return this;
},
slerp: function (a, b, t) {
quat.slerp(this._array, a._array, b._array, t);
this._dirty = true;
return this;
},
sqrLen: function () {
return quat.sqrLen(this._array);
},
squaredLength: function () {
return quat.squaredLength(this._array);
},
setFromEuler: function (v) {
},
toString: function () {
return '[' + Array.prototype.join.call(this._array, ',') + ']';
}
};
if (Object.defineProperty) {
var proto = Quaternion.prototype;
Object.defineProperty(proto, 'x', {
get: function () {
return this._array[0];
},
set: function (value) {
this._array[0] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'y', {
get: function () {
return this._array[1];
},
set: function (value) {
this._array[1] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'z', {
get: function () {
return this._array[2];
},
set: function (value) {
this._array[2] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'w', {
get: function () {
return this._array[3];
},
set: function (value) {
this._array[3] = value;
this._dirty = true;
}
});
}
Quaternion.add = function (out, a, b) {
quat.add(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Quaternion.set = function (out, x, y, z, w) {
quat.set(out._array, x, y, z, w);
out._dirty = true;
};
Quaternion.copy = function (out, b) {
quat.copy(out._array, b._array);
out._dirty = true;
return out;
};
Quaternion.calculateW = function (out, a) {
quat.calculateW(out._array, a._array);
out._dirty = true;
return out;
};
Quaternion.conjugate = function (out, a) {
quat.conjugate(out._array, a._array);
out._dirty = true;
return out;
};
Quaternion.identity = function (out) {
quat.identity(out._array);
out._dirty = true;
return out;
};
Quaternion.invert = function (out, a) {
quat.invert(out._array, a._array);
out._dirty = true;
return out;
};
Quaternion.dot = function (a, b) {
return quat.dot(a._array, b._array);
};
Quaternion.len = function (a) {
return quat.length(a._array);
};
Quaternion.lerp = function (out, a, b, t) {
quat.lerp(out._array, a._array, b._array, t);
out._dirty = true;
return out;
};
Quaternion.slerp = function (out, a, b, t) {
quat.slerp(out._array, a._array, b._array, t);
out._dirty = true;
return out;
};
Quaternion.mul = function (out, a, b) {
quat.multiply(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Quaternion.multiply = Quaternion.mul;
Quaternion.rotateX = function (out, a, rad) {
quat.rotateX(out._array, a._array, rad);
out._dirty = true;
return out;
};
Quaternion.rotateY = function (out, a, rad) {
quat.rotateY(out._array, a._array, rad);
out._dirty = true;
return out;
};
Quaternion.rotateZ = function (out, a, rad) {
quat.rotateZ(out._array, a._array, rad);
out._dirty = true;
return out;
};
Quaternion.setAxisAngle = function (out, axis, rad) {
quat.setAxisAngle(out._array, axis._array, rad);
out._dirty = true;
return out;
};
Quaternion.normalize = function (out, a) {
quat.normalize(out._array, a._array);
out._dirty = true;
return out;
};
Quaternion.sqrLen = function (a) {
return quat.sqrLen(a._array);
};
Quaternion.squaredLength = Quaternion.sqrLen;
Quaternion.fromMat3 = function (out, m) {
quat.fromMat3(out._array, m._array);
out._dirty = true;
return out;
};
Quaternion.setAxes = function (out, view, right, up) {
quat.setAxes(out._array, view._array, right._array, up._array);
out._dirty = true;
return out;
};
Quaternion.rotationTo = function (out, a, b) {
quat.rotationTo(out._array, a._array, b._array);
out._dirty = true;
return out;
};
return Quaternion;
});define('qtek/Renderable', [
'require',
'./Node',
'./core/glenum',
'./core/glinfo',
'./DynamicGeometry'
], function (require) {
'use strict';
var Node = require('./Node');
var glenum = require('./core/glenum');
var glinfo = require('./core/glinfo');
var DynamicGeometry = require('./DynamicGeometry');
var prevDrawID = 0;
var prevDrawIndicesBuffer = null;
var prevDrawIsUseFace = true;
var currentDrawID;
var RenderInfo = function () {
this.faceNumber = 0;
this.vertexNumber = 0;
this.drawCallNumber = 0;
};
function VertexArrayObject(availableAttributes, availableAttributeSymbols, indicesBuffer) {
this.availableAttributes = availableAttributes;
this.availableAttributeSymbols = availableAttributeSymbols;
this.indicesBuffer = indicesBuffer;
this.vao = null;
}
var Renderable = Node.derive({
material: null,
geometry: null,
mode: glenum.TRIANGLES,
_drawCache: null,
_renderInfo: null
}, function () {
this._drawCache = {};
this._renderInfo = new RenderInfo();
}, {
lineWidth: 1,
culling: true,
cullFace: glenum.BACK,
frontFace: glenum.CCW,
frustumCulling: true,
receiveShadow: true,
castShadow: true,
ignorePicking: false,
isRenderable: function () {
return this.geometry && this.material && this.material.shader && this.visible;
},
render: function (_gl, globalMaterial) {
var material = globalMaterial || this.material;
var shader = material.shader;
var geometry = this.geometry;
var glDrawMode = this.mode;
var nVertex = geometry.getVertexNumber();
var isUseFace = geometry.isUseFace();
var uintExt = glinfo.getExtension(_gl, 'OES_element_index_uint');
var useUintExt = uintExt && nVertex > 65535;
var indicesType = useUintExt ? _gl.UNSIGNED_INT : _gl.UNSIGNED_SHORT;
var vaoExt = glinfo.getExtension(_gl, 'OES_vertex_array_object');
var isStatic = !geometry.dynamic;
var renderInfo = this._renderInfo;
renderInfo.vertexNumber = nVertex;
renderInfo.faceNumber = 0;
renderInfo.drawCallNumber = 0;
var drawHashChanged = false;
currentDrawID = _gl.__GLID__ + '-' + geometry.__GUID__ + '-' + shader.__GUID__;
if (currentDrawID !== prevDrawID) {
drawHashChanged = true;
} else {
if (geometry instanceof DynamicGeometry && (nVertex > 65535 && !uintExt) && isUseFace || vaoExt && isStatic || geometry._cache.isDirty()) {
drawHashChanged = true;
}
}
prevDrawID = currentDrawID;
if (!drawHashChanged) {
if (prevDrawIsUseFace) {
_gl.drawElements(glDrawMode, prevDrawIndicesBuffer.count, indicesType, 0);
renderInfo.faceNumber = prevDrawIndicesBuffer.count / 3;
} else {
_gl.drawArrays(glDrawMode, 0, nVertex);
}
renderInfo.drawCallNumber = 1;
} else {
var vaoList = this._drawCache[currentDrawID];
if (!vaoList) {
var chunks = geometry.getBufferChunks(_gl);
if (!chunks) {
return;
}
vaoList = [];
for (var c = 0; c < chunks.length; c++) {
var chunk = chunks[c];
var attributeBuffers = chunk.attributeBuffers;
var indicesBuffer = chunk.indicesBuffer;
var availableAttributes = [];
var availableAttributeSymbols = [];
for (var a = 0; a < attributeBuffers.length; a++) {
var attributeBufferInfo = attributeBuffers[a];
var name = attributeBufferInfo.name;
var semantic = attributeBufferInfo.semantic;
var symbol;
if (semantic) {
var semanticInfo = shader.attribSemantics[semantic];
symbol = semanticInfo && semanticInfo.symbol;
} else {
symbol = name;
}
if (symbol && shader.attributeTemplates[symbol]) {
availableAttributes.push(attributeBufferInfo);
availableAttributeSymbols.push(symbol);
}
}
var vao = new VertexArrayObject(availableAttributes, availableAttributeSymbols, indicesBuffer);
vaoList.push(vao);
}
if (isStatic) {
this._drawCache[currentDrawID] = vaoList;
}
}
for (var i = 0; i < vaoList.length; i++) {
var vao = vaoList[i];
var needsBindAttributes = true;
if (vaoExt && isStatic) {
if (vao.vao == null) {
vao.vao = vaoExt.createVertexArrayOES();
} else {
needsBindAttributes = false;
}
vaoExt.bindVertexArrayOES(vao.vao);
}
var availableAttributes = vao.availableAttributes;
var indicesBuffer = vao.indicesBuffer;
if (needsBindAttributes) {
var locationList = shader.enableAttributes(_gl, vao.availableAttributeSymbols, vaoExt && isStatic && vao.vao);
for (var a = 0; a < availableAttributes.length; a++) {
var location = locationList[a];
if (location === -1) {
continue;
}
var attributeBufferInfo = availableAttributes[a];
var buffer = attributeBufferInfo.buffer;
var size = attributeBufferInfo.size;
var glType;
switch (attributeBufferInfo.type) {
case 'float':
glType = _gl.FLOAT;
break;
case 'byte':
glType = _gl.BYTE;
break;
case 'ubyte':
glType = _gl.UNSIGNED_BYTE;
break;
case 'short':
glType = _gl.SHORT;
break;
case 'ushort':
glType = _gl.UNSIGNED_SHORT;
break;
default:
glType = _gl.FLOAT;
break;
}
_gl.bindBuffer(_gl.ARRAY_BUFFER, buffer);
_gl.vertexAttribPointer(location, size, glType, false, 0, 0);
}
}
if (glDrawMode == glenum.LINES || glDrawMode == glenum.LINE_STRIP || glDrawMode == glenum.LINE_LOOP) {
_gl.lineWidth(this.lineWidth);
}
prevDrawIndicesBuffer = indicesBuffer;
prevDrawIsUseFace = geometry.isUseFace();
if (prevDrawIsUseFace) {
if (needsBindAttributes) {
_gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, indicesBuffer.buffer);
}
_gl.drawElements(glDrawMode, indicesBuffer.count, indicesType, 0);
renderInfo.faceNumber += indicesBuffer.count / 3;
} else {
_gl.drawArrays(glDrawMode, 0, nVertex);
}
if (vaoExt && isStatic) {
vaoExt.bindVertexArrayOES(null);
}
renderInfo.drawCallNumber++;
}
}
return renderInfo;
},
clone: function () {
var properties = [
'castShadow',
'receiveShadow',
'mode',
'culling',
'cullFace',
'frontFace',
'frustumCulling'
];
return function () {
var renderable = Node.prototype.clone.call(this);
renderable.geometry = this.geometry;
renderable.material = this.material;
for (var i = 0; i < properties.length; i++) {
var name = properties[i];
if (renderable[name] !== this[name]) {
renderable[name] = this[name];
}
}
return renderable;
};
}()
});
Renderable.beforeFrame = function () {
prevDrawID = 0;
};
Renderable.POINTS = glenum.POINTS;
Renderable.LINES = glenum.LINES;
Renderable.LINE_LOOP = glenum.LINE_LOOP;
Renderable.LINE_STRIP = glenum.LINE_STRIP;
Renderable.TRIANGLES = glenum.TRIANGLES;
Renderable.TRIANGLE_STRIP = glenum.TRIANGLE_STRIP;
Renderable.TRIANGLE_FAN = glenum.TRIANGLE_FAN;
Renderable.BACK = glenum.BACK;
Renderable.FRONT = glenum.FRONT;
Renderable.FRONT_AND_BACK = glenum.FRONT_AND_BACK;
Renderable.CW = glenum.CW;
Renderable.CCW = glenum.CCW;
Renderable.RenderInfo = RenderInfo;
return Renderable;
});define('qtek/core/glinfo', [], function () {
'use strict';
var EXTENSION_LIST = [
'OES_texture_float',
'OES_texture_half_float',
'OES_texture_float_linear',
'OES_texture_half_float_linear',
'OES_standard_derivatives',
'OES_vertex_array_object',
'OES_element_index_uint',
'WEBGL_compressed_texture_s3tc',
'WEBGL_depth_texture',
'EXT_texture_filter_anisotropic',
'WEBGL_draw_buffers'
];
var PARAMETER_NAMES = [
'MAX_TEXTURE_SIZE',
'MAX_CUBE_MAP_TEXTURE_SIZE'
];
var extensions = {};
var parameters = {};
var glinfo = {
initialize: function (_gl) {
var glid = _gl.__GLID__;
if (extensions[glid]) {
return;
}
extensions[glid] = {};
parameters[glid] = {};
for (var i = 0; i < EXTENSION_LIST.length; i++) {
var extName = EXTENSION_LIST[i];
this._createExtension(_gl, extName);
}
for (var i = 0; i < PARAMETER_NAMES.length; i++) {
var name = PARAMETER_NAMES[i];
parameters[glid][name] = _gl.getParameter(_gl[name]);
}
},
getExtension: function (_gl, name) {
var glid = _gl.__GLID__;
if (extensions[glid]) {
if (typeof extensions[glid][name] == 'undefined') {
this._createExtension(_gl, name);
}
return extensions[glid][name];
}
},
getParameter: function (_gl, name) {
var glid = _gl.__GLID__;
if (parameters[glid]) {
return parameters[glid][name];
}
},
dispose: function (_gl) {
delete extensions[_gl.__GLID__];
delete parameters[_gl.__GLID__];
},
_createExtension: function (_gl, name) {
var ext = _gl.getExtension(name);
if (!ext) {
ext = _gl.getExtension('MOZ_' + name);
}
if (!ext) {
ext = _gl.getExtension('WEBKIT_' + name);
}
extensions[_gl.__GLID__][name] = ext;
}
};
return glinfo;
});define('qtek/DynamicGeometry', [
'require',
'./Geometry',
'./math/BoundingBox',
'./core/glenum',
'./core/glinfo',
'./dep/glmatrix'
], function (require) {
'use strict';
var Geometry = require('./Geometry');
var BoundingBox = require('./math/BoundingBox');
var glenum = require('./core/glenum');
var glinfo = require('./core/glinfo');
var glMatrix = require('./dep/glmatrix');
var vec3 = glMatrix.vec3;
var mat4 = glMatrix.mat4;
var arrSlice = Array.prototype.slice;
var DynamicGeometry = Geometry.derive(function () {
return {
attributes: {
position: new Geometry.Attribute('position', 'float', 3, 'POSITION', true),
texcoord0: new Geometry.Attribute('texcoord0', 'float', 2, 'TEXCOORD_0', true),
texcoord1: new Geometry.Attribute('texcoord1', 'float', 2, 'TEXCOORD_1', true),
normal: new Geometry.Attribute('normal', 'float', 3, 'NORMAL', true),
tangent: new Geometry.Attribute('tangent', 'float', 4, 'TANGENT', true),
color: new Geometry.Attribute('color', 'float', 4, 'COLOR', true),
weight: new Geometry.Attribute('weight', 'float', 3, 'WEIGHT', true),
joint: new Geometry.Attribute('joint', 'float', 4, 'JOINT', true),
barycentric: new Geometry.Attribute('barycentric', 'float', 3, null, true)
},
dynamic: true,
hint: glenum.DYNAMIC_DRAW,
faces: [],
_enabledAttributes: null,
_arrayChunks: []
};
}, {
updateBoundingBox: function () {
if (!this.boundingBox) {
this.boundingBox = new BoundingBox();
}
this.boundingBox.updateFromVertices(this.attributes.position.value);
},
dirty: function (field) {
if (!field) {
this.dirty('indices');
for (var name in this.attributes) {
this.dirty(name);
}
return;
}
this._cache.dirtyAll(field);
this._cache.dirtyAll();
this._enabledAttributes = null;
},
getVertexNumber: function () {
var mainAttribute = this.attributes[this.mainAttribute];
if (!mainAttribute || !mainAttribute.value) {
return 0;
}
return mainAttribute.value.length;
},
getFaceNumber: function () {
return this.faces.length;
},
getFace: function (idx, out) {
if (idx < this.getFaceNumber() && idx >= 0) {
if (!out) {
out = vec3.create();
}
vec3.copy(out, this.faces[idx]);
return out;
}
},
isUseFace: function () {
return this.useFace && this.faces.length > 0;
},
isSplitted: function () {
return this.getVertexNumber() > 65535;
},
createAttribute: function (name, type, size, semantic) {
var attrib = new Geometry.Attribute(name, type, size, semantic, true);
this.attributes[name] = attrib;
this._attributeList.push(name);
return attrib;
},
removeAttribute: function (name) {
var idx = this._attributeList.indexOf(name);
if (idx >= 0) {
this._attributeList.splice(idx, 1);
delete this.attributes[name];
return true;
}
return false;
},
getEnabledAttributes: function () {
if (this._enabledAttributes) {
return this._enabledAttributes;
}
var result = {};
var nVertex = this.getVertexNumber();
for (var i = 0; i < this._attributeList.length; i++) {
var name = this._attributeList[i];
var attrib = this.attributes[name];
if (attrib.value.length) {
if (attrib.value.length === nVertex) {
result[name] = attrib;
}
}
}
this._enabledAttributes = result;
return result;
},
_getDirtyAttributes: function () {
var attributes = this.getEnabledAttributes();
if (this._cache.miss('chunks')) {
return attributes;
} else {
var result = {};
var noDirtyAttributes = true;
for (var name in attributes) {
if (this._cache.isDirty(name)) {
result[name] = attributes[name];
noDirtyAttributes = false;
}
}
if (!noDirtyAttributes) {
return result;
}
}
},
getChunkNumber: function () {
return this._arrayChunks.length;
},
getBufferChunks: function (_gl) {
this._cache.use(_gl.__GLID__);
if (this._cache.isDirty()) {
var dirtyAttributes = this._getDirtyAttributes();
var isFacesDirty = this._cache.isDirty('indices');
isFacesDirty = isFacesDirty && this.isUseFace();
if (dirtyAttributes) {
this._updateAttributesAndIndicesArrays(dirtyAttributes, isFacesDirty, glinfo.getExtension(_gl, 'OES_element_index_uint') != null);
this._updateBuffer(_gl, dirtyAttributes, isFacesDirty);
for (var name in dirtyAttributes) {
this._cache.fresh(name);
}
this._cache.fresh('indices');
this._cache.fresh();
}
}
return this._cache.get('chunks');
},
_updateAttributesAndIndicesArrays: function (attributes, isFacesDirty, useUintExtension) {
var self = this;
var nVertex = this.getVertexNumber();
var verticesReorganizedMap = [];
var reorganizedFaces = [];
var ArrayConstructors = {};
for (var name in attributes) {
switch (type) {
case 'byte':
ArrayConstructors[name] = Int8Array;
break;
case 'ubyte':
ArrayConstructors[name] = Uint8Array;
break;
case 'short':
ArrayConstructors[name] = Int16Array;
break;
case 'ushort':
ArrayConstructors[name] = Uint16Array;
break;
default:
ArrayConstructors[name] = Float32Array;
break;
}
}
var newChunk = function (chunkIdx) {
if (self._arrayChunks[chunkIdx]) {
return self._arrayChunks[chunkIdx];
}
var chunk = {
attributeArrays: {},
indicesArray: null
};
for (var name in attributes) {
chunk.attributeArrays[name] = null;
}
for (var i = 0; i < nVertex; i++) {
verticesReorganizedMap[i] = -1;
}
self._arrayChunks.push(chunk);
return chunk;
};
var attribNameList = Object.keys(attributes);
if (nVertex > 65535 && this.isUseFace() && !useUintExtension) {
var chunkIdx = 0;
var currentChunk;
var chunkFaceStart = [0];
var vertexUseCount = [];
for (i = 0; i < nVertex; i++) {
vertexUseCount[i] = -1;
verticesReorganizedMap[i] = -1;
}
if (isFacesDirty) {
for (i = 0; i < this.faces.length; i++) {
reorganizedFaces[i] = [
0,
0,
0
];
}
}
currentChunk = newChunk(chunkIdx);
var vertexCount = 0;
for (var i = 0; i < this.faces.length; i++) {
var face = this.faces[i];
var reorganizedFace = reorganizedFaces[i];
if (vertexCount + 3 > 65535) {
chunkIdx++;
chunkFaceStart[chunkIdx] = i;
vertexCount = 0;
currentChunk = newChunk(chunkIdx);
}
for (var f = 0; f < 3; f++) {
var ii = face[f];
var isNew = verticesReorganizedMap[ii] === -1;
for (var k = 0; k < attribNameList.length; k++) {
var name = attribNameList[k];
var attribArray = currentChunk.attributeArrays[name];
var values = attributes[name].value;
var size = attributes[name].size;
if (!attribArray) {
attribArray = currentChunk.attributeArrays[name] = [];
}
if (isNew) {
if (size === 1) {
attribArray[vertexCount] = values[ii];
}
for (var j = 0; j < size; j++) {
attribArray[vertexCount * size + j] = values[ii][j];
}
}
}
if (isNew) {
verticesReorganizedMap[ii] = vertexCount;
reorganizedFace[f] = vertexCount;
vertexCount++;
} else {
reorganizedFace[f] = verticesReorganizedMap[ii];
}
}
}
for (var c = 0; c < this._arrayChunks.length; c++) {
var chunk = this._arrayChunks[c];
for (var name in chunk.attributeArrays) {
var array = chunk.attributeArrays[name];
if (array instanceof Array) {
chunk.attributeArrays[name] = new ArrayConstructors[name](array);
}
}
}
if (isFacesDirty) {
var chunkStart, chunkEnd, cursor, chunk;
for (var c = 0; c < this._arrayChunks.length; c++) {
chunkStart = chunkFaceStart[c];
chunkEnd = chunkFaceStart[c + 1] || this.faces.length;
cursor = 0;
chunk = this._arrayChunks[c];
var indicesArray = chunk.indicesArray;
if (!indicesArray) {
indicesArray = chunk.indicesArray = new Uint16Array((chunkEnd - chunkStart) * 3);
}
for (var i = chunkStart; i < chunkEnd; i++) {
indicesArray[cursor++] = reorganizedFaces[i][0];
indicesArray[cursor++] = reorganizedFaces[i][1];
indicesArray[cursor++] = reorganizedFaces[i][2];
}
}
}
} else {
var chunk = newChunk(0);
if (isFacesDirty) {
var indicesArray = chunk.indicesArray;
var nFace = this.faces.length;
if (!indicesArray || nFace * 3 !== indicesArray.length) {
var ArrayCtor = nVertex > 65535 ? Uint32Array : Uint16Array;
indicesArray = chunk.indicesArray = new ArrayCtor(this.faces.length * 3);
}
var cursor = 0;
for (var i = 0; i < nFace; i++) {
indicesArray[cursor++] = this.faces[i][0];
indicesArray[cursor++] = this.faces[i][1];
indicesArray[cursor++] = this.faces[i][2];
}
}
for (var name in attributes) {
var values = attributes[name].value;
var type = attributes[name].type;
var size = attributes[name].size;
var attribArray = chunk.attributeArrays[name];
var arrSize = nVertex * size;
if (!attribArray || attribArray.length !== arrSize) {
attribArray = new ArrayConstructors[name](arrSize);
chunk.attributeArrays[name] = attribArray;
}
if (size === 1) {
for (var i = 0; i < values.length; i++) {
attribArray[i] = values[i];
}
} else {
var cursor = 0;
for (var i = 0; i < values.length; i++) {
for (var j = 0; j < size; j++) {
attribArray[cursor++] = values[i][j];
}
}
}
}
}
},
_updateBuffer: function (_gl, dirtyAttributes, isFacesDirty) {
var chunks = this._cache.get('chunks');
var firstUpdate = false;
if (!chunks) {
chunks = [];
for (var i = 0; i < this._arrayChunks.length; i++) {
chunks[i] = {
attributeBuffers: [],
indicesBuffer: null
};
}
this._cache.put('chunks', chunks);
firstUpdate = true;
}
for (var cc = 0; cc < this._arrayChunks.length; cc++) {
var chunk = chunks[cc];
if (!chunk) {
chunk = chunks[cc] = {
attributeBuffers: [],
indicesBuffer: null
};
}
var attributeBuffers = chunk.attributeBuffers;
var indicesBuffer = chunk.indicesBuffer;
var arrayChunk = this._arrayChunks[cc];
var attributeArrays = arrayChunk.attributeArrays;
var indicesArray = arrayChunk.indicesArray;
var count = 0;
var prevSearchIdx = 0;
for (var name in dirtyAttributes) {
var attribute = dirtyAttributes[name];
var type = attribute.type;
var semantic = attribute.semantic;
var size = attribute.size;
var bufferInfo;
if (!firstUpdate) {
for (var i = prevSearchIdx; i < attributeBuffers.length; i++) {
if (attributeBuffers[i].name === name) {
bufferInfo = attributeBuffers[i];
prevSearchIdx = i + 1;
break;
}
}
if (!bufferInfo) {
for (var i = prevSearchIdx - 1; i >= 0; i--) {
if (attributeBuffers[i].name === name) {
bufferInfo = attributeBuffers[i];
prevSearchIdx = i;
break;
}
}
}
}
var buffer;
if (bufferInfo) {
buffer = bufferInfo.buffer;
} else {
buffer = _gl.createBuffer();
}
_gl.bindBuffer(_gl.ARRAY_BUFFER, buffer);
_gl.bufferData(_gl.ARRAY_BUFFER, attributeArrays[name], this.hint);
attributeBuffers[count++] = new Geometry.AttributeBuffer(name, type, buffer, size, semantic);
}
attributeBuffers.length = count;
if (isFacesDirty) {
if (!indicesBuffer) {
indicesBuffer = new Geometry.IndicesBuffer(_gl.createBuffer());
chunk.indicesBuffer = indicesBuffer;
}
indicesBuffer.count = indicesArray.length;
_gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, indicesBuffer.buffer);
_gl.bufferData(_gl.ELEMENT_ARRAY_BUFFER, indicesArray, this.hint);
}
}
},
generateVertexNormals: function () {
var faces = this.faces;
var len = faces.length;
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
var normal = vec3.create();
var v21 = vec3.create(), v32 = vec3.create();
for (var i = 0; i < normals.length; i++) {
vec3.set(normals[i], 0, 0, 0);
}
for (var i = normals.length; i < positions.length; i++) {
normals[i] = [
0,
0,
0
];
}
for (var f = 0; f < len; f++) {
var face = faces[f];
var i1 = face[0];
var i2 = face[1];
var i3 = face[2];
var p1 = positions[i1];
var p2 = positions[i2];
var p3 = positions[i3];
vec3.sub(v21, p1, p2);
vec3.sub(v32, p2, p3);
vec3.cross(normal, v21, v32);
vec3.add(normals[i1], normals[i1], normal);
vec3.add(normals[i2], normals[i2], normal);
vec3.add(normals[i3], normals[i3], normal);
}
for (var i = 0; i < normals.length; i++) {
vec3.normalize(normals[i], normals[i]);
}
},
generateFaceNormals: function () {
if (!this.isUniqueVertex()) {
this.generateUniqueVertex();
}
var faces = this.faces;
var len = faces.length;
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
var normal = vec3.create();
var v21 = vec3.create(), v32 = vec3.create();
var isCopy = normals.length === positions.length;
for (var i = 0; i < len; i++) {
var face = faces[i];
var i1 = face[0];
var i2 = face[1];
var i3 = face[2];
var p1 = positions[i1];
var p2 = positions[i2];
var p3 = positions[i3];
vec3.sub(v21, p1, p2);
vec3.sub(v32, p2, p3);
vec3.cross(normal, v21, v32);
if (isCopy) {
vec3.copy(normals[i1], normal);
vec3.copy(normals[i2], normal);
vec3.copy(normals[i3], normal);
} else {
normals[i1] = normals[i2] = normals[i3] = arrSlice.call(normal);
}
}
},
generateTangents: function () {
var texcoords = this.attributes.texcoord0.value;
var positions = this.attributes.position.value;
var tangents = this.attributes.tangent.value;
var normals = this.attributes.normal.value;
var tan1 = [];
var tan2 = [];
var nVertex = this.getVertexNumber();
for (var i = 0; i < nVertex; i++) {
tan1[i] = [
0,
0,
0
];
tan2[i] = [
0,
0,
0
];
}
var sdir = [
0,
0,
0
];
var tdir = [
0,
0,
0
];
for (var i = 0; i < this.faces.length; i++) {
var face = this.faces[i], i1 = face[0], i2 = face[1], i3 = face[2], st1 = texcoords[i1], st2 = texcoords[i2], st3 = texcoords[i3], p1 = positions[i1], p2 = positions[i2], p3 = positions[i3];
var x1 = p2[0] - p1[0], x2 = p3[0] - p1[0], y1 = p2[1] - p1[1], y2 = p3[1] - p1[1], z1 = p2[2] - p1[2], z2 = p3[2] - p1[2];
var s1 = st2[0] - st1[0], s2 = st3[0] - st1[0], t1 = st2[1] - st1[1], t2 = st3[1] - st1[1];
var r = 1 / (s1 * t2 - t1 * s2);
sdir[0] = (t2 * x1 - t1 * x2) * r;
sdir[1] = (t2 * y1 - t1 * y2) * r;
sdir[2] = (t2 * z1 - t1 * z2) * r;
tdir[0] = (s1 * x2 - s2 * x1) * r;
tdir[1] = (s1 * y2 - s2 * y1) * r;
tdir[2] = (s1 * z2 - s2 * z1) * r;
vec3.add(tan1[i1], tan1[i1], sdir);
vec3.add(tan1[i2], tan1[i2], sdir);
vec3.add(tan1[i3], tan1[i3], sdir);
vec3.add(tan2[i1], tan2[i1], tdir);
vec3.add(tan2[i2], tan2[i2], tdir);
vec3.add(tan2[i3], tan2[i3], tdir);
}
var tmp = [
0,
0,
0,
0
];
var nCrossT = [
0,
0,
0
];
for (var i = 0; i < nVertex; i++) {
var n = normals[i];
var t = tan1[i];
vec3.scale(tmp, n, vec3.dot(n, t));
vec3.sub(tmp, t, tmp);
vec3.normalize(tmp, tmp);
vec3.cross(nCrossT, n, t);
tmp[3] = vec3.dot(nCrossT, tan2[i]) < 0 ? -1 : 1;
tangents[i] = tmp.slice();
}
},
isUniqueVertex: function () {
if (this.isUseFace()) {
return this.getVertexNumber() === this.faces.length * 3;
} else {
return true;
}
},
generateUniqueVertex: function () {
var vertexUseCount = [];
for (var i = 0; i < this.getVertexNumber(); i++) {
vertexUseCount[i] = 0;
}
var cursor = this.getVertexNumber();
var attributes = this.getEnabledAttributes();
var faces = this.faces;
var attributeNameList = Object.keys(attributes);
for (var i = 0; i < faces.length; i++) {
var face = faces[i];
for (var j = 0; j < 3; j++) {
var ii = face[j];
if (vertexUseCount[ii] > 0) {
for (var a = 0; a < attributeNameList.length; a++) {
var name = attributeNameList[a];
var array = attributes[name].value;
var size = attributes[name].size;
if (size === 1) {
array.push(array[ii]);
} else {
array.push(arrSlice.call(array[ii]));
}
}
face[j] = cursor;
cursor++;
}
vertexUseCount[ii]++;
}
}
this.dirty();
},
generateBarycentric: function () {
var a = [
1,
0,
0
];
var b = [
0,
0,
1
];
var c = [
0,
1,
0
];
return function () {
if (!this.isUniqueVertex()) {
this.generateUniqueVertex();
}
var array = this.attributes.barycentric.value;
if (array.length == this.faces.length * 3) {
return;
}
var i1, i2, i3, face;
for (var i = 0; i < this.faces.length; i++) {
face = this.faces[i];
i1 = face[0];
i2 = face[1];
i3 = face[2];
array[i1] = a;
array[i2] = b;
array[i3] = c;
}
};
}(),
convertToStatic: function (geometry, useUintExtension) {
this._updateAttributesAndIndicesArrays(this.getEnabledAttributes(), true, useUintExtension);
if (this._arrayChunks.length > 1) {
console.warn('Large geometry will discard chunks when convert to StaticGeometry');
} else if (this._arrayChunks.length === 0) {
return geometry;
}
var chunk = this._arrayChunks[0];
var attributes = this.getEnabledAttributes();
for (var name in attributes) {
var attrib = attributes[name];
var geoAttrib = geometry.attributes[name];
if (!geoAttrib) {
geoAttrib = geometry.attributes[name] = {
type: attrib.type,
size: attrib.size,
value: null
};
if (attrib.semantic) {
geoAttrib.semantic = attrib.semantic;
}
}
geoAttrib.value = chunk.attributeArrays[name];
}
geometry.faces = chunk.indicesArray;
if (this.boundingBox) {
geometry.boundingBox = new BoundingBox();
geometry.boundingBox.min.copy(this.boundingBox.min);
geometry.boundingBox.max.copy(this.boundingBox.max);
}
return geometry;
},
applyTransform: function (matrix) {
if (this.boundingBox) {
this.boundingBox.applyTransform(matrix);
}
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
var tangents = this.attributes.tangent.value;
matrix = matrix._array;
for (var i = 0; i < positions.length; i++) {
vec3.transformMat4(positions[i], positions[i], matrix);
}
var inverseTransposeMatrix = mat4.create();
mat4.invert(inverseTransposeMatrix, matrix);
mat4.transpose(inverseTransposeMatrix, inverseTransposeMatrix);
for (var i = 0; i < normals.length; i++) {
vec3.transformMat4(normals[i], normals[i], inverseTransposeMatrix);
}
for (var i = 0; i < tangents.length; i++) {
vec3.transformMat4(tangents[i], tangents[i], inverseTransposeMatrix);
}
},
dispose: function (_gl) {
this._cache.use(_gl.__GLID__);
var chunks = this._cache.get('chunks');
if (chunks) {
for (var c = 0; c < chunks.length; c++) {
var chunk = chunks[c];
for (var k = 0; k < chunk.attributeBuffers.length; k++) {
var attribs = chunk.attributeBuffers[k];
_gl.deleteBuffer(attribs.buffer);
}
}
}
this._cache.deleteContext(_gl.__GLID__);
}
});
return DynamicGeometry;
});define('qtek/Geometry', [
'require',
'./core/Base',
'./core/glenum',
'./core/Cache',
'./dep/glmatrix'
], function (require) {
'use strict';
var Base = require('./core/Base');
var glenum = require('./core/glenum');
var Cache = require('./core/Cache');
var glmatrix = require('./dep/glmatrix');
var vec2 = glmatrix.vec2;
var vec3 = glmatrix.vec3;
var vec4 = glmatrix.vec4;
function Attribute(name, type, size, semantic, isDynamic) {
this.name = name;
this.type = type;
this.size = size;
if (semantic) {
this.semantic = semantic;
}
if (isDynamic) {
this._isDynamic = true;
this.value = [];
} else {
this._isDynamic = false;
this.value = null;
}
switch (size) {
case 1:
this.get = function (idx) {
return this.value[idx];
};
this.set = function (idx, value) {
this.value[idx] = value;
};
break;
case 2:
if (isDynamic) {
this.get = function (idx, out) {
out = out._array || out;
var item = this.value[idx];
if (item) {
vec2.copy(out, item);
}
return out;
};
this.set = function (idx, val) {
val = val._array || val;
var item = this.value[idx];
if (!item) {
item = this.value[idx] = vec2.create();
}
vec2.copy(item, val);
};
} else {
this.get = function (idx, out) {
out = out._array || out;
out[0] = this.value[idx * 2];
out[1] = this.value[idx * 2 + 1];
return out;
};
this.set = function (idx, val) {
val = val._array || val;
this.value[idx * 2] = val[0];
this.value[idx * 2 + 1] = val[1];
};
}
break;
case 3:
if (isDynamic) {
this.get = function (idx, out) {
out = out._array || out;
var item = this.value[idx];
if (item) {
vec3.copy(out, item);
}
return out;
};
this.set = function (idx, val) {
val = val._array || val;
var item = this.value[idx];
if (!item) {
item = this.value[idx] = vec3.create();
}
vec3.copy(item, val);
};
} else {
this.get = function (idx, out) {
out = out._array || out;
out[0] = this.value[idx * 3];
out[1] = this.value[idx * 3 + 1];
out[2] = this.value[idx * 3 + 2];
return out;
};
this.set = function (idx, val) {
val = val._array || val;
this.value[idx * 3] = val[0];
this.value[idx * 3 + 1] = val[1];
this.value[idx * 3 + 2] = val[2];
};
}
break;
case 4:
if (isDynamic) {
this.get = function (idx, out) {
out = out._array || out;
var item = this.value[idx];
if (item) {
vec4.copy(out, item);
}
return out;
};
this.set = function (idx, val) {
val = val._array || val;
var item = this.value[idx];
if (!item) {
item = this.value[idx] = vec4.create();
}
vec4.copy(item, val);
};
} else {
this.get = function (idx, out) {
out = out._array || out;
out[0] = this.value[idx * 4];
out[1] = this.value[idx * 4 + 1];
out[2] = this.value[idx * 4 + 2];
out[3] = this.value[idx * 4 + 3];
return out;
};
this.set = function (idx, val) {
val = val._array || val;
this.value[idx * 4] = val[0];
this.value[idx * 4 + 1] = val[1];
this.value[idx * 4 + 2] = val[2];
this.value[idx * 4 + 3] = val[3];
};
}
break;
}
}
Attribute.prototype.init = function (nVertex) {
if (!this._isDynamic) {
if (!this.value || this.value.length != nVertex * this.size) {
var ArrayConstructor;
switch (this.type) {
case 'byte':
ArrayConstructor = Int8Array;
break;
case 'ubyte':
ArrayConstructor = Uint8Array;
break;
case 'short':
ArrayConstructor = Int16Array;
break;
case 'ushort':
ArrayConstructor = Uint16Array;
break;
default:
ArrayConstructor = Float32Array;
break;
}
this.value = new ArrayConstructor(nVertex * this.size);
}
} else {
console.warn('Dynamic geometry not support init method');
}
};
Attribute.prototype.clone = function (copyValue) {
var ret = new Attribute(this.name, this.type, this.size, this.semantic, this._isDynamic);
if (copyValue) {
console.warn('todo');
}
return ret;
};
function AttributeBuffer(name, type, buffer, size, semantic) {
this.name = name;
this.type = type;
this.buffer = buffer;
this.size = size;
this.semantic = semantic;
this.symbol = '';
}
function IndicesBuffer(buffer) {
this.buffer = buffer;
this.count = 0;
}
function notImplementedWarn() {
console.warn('Geometry doesn\'t implement this method, use DynamicGeometry or StaticGeometry instead');
}
var Geometry = Base.derive({
boundingBox: null,
attributes: {},
faces: null,
dynamic: false,
useFace: true
}, function () {
this._cache = new Cache();
this._attributeList = Object.keys(this.attributes);
}, {
mainAttribute: 'position',
dirty: notImplementedWarn,
createAttribute: notImplementedWarn,
removeAttribute: notImplementedWarn,
getVertexNumber: notImplementedWarn,
getFaceNumber: notImplementedWarn,
getFace: notImplementedWarn,
isUseFace: notImplementedWarn,
getEnabledAttributes: notImplementedWarn,
getBufferChunks: notImplementedWarn,
generateVertexNormals: notImplementedWarn,
generateFaceNormals: notImplementedWarn,
isUniqueVertex: notImplementedWarn,
generateUniqueVertex: notImplementedWarn,
generateTangents: notImplementedWarn,
generateBarycentric: notImplementedWarn,
applyTransform: notImplementedWarn,
dispose: notImplementedWarn
});
Geometry.STATIC_DRAW = glenum.STATIC_DRAW;
Geometry.DYNAMIC_DRAW = glenum.DYNAMIC_DRAW;
Geometry.STREAM_DRAW = glenum.STREAM_DRAW;
Geometry.AttributeBuffer = AttributeBuffer;
Geometry.IndicesBuffer = IndicesBuffer;
Geometry.Attribute = Attribute;
return Geometry;
});define('qtek/math/BoundingBox', [
'require',
'./Vector3',
'../dep/glmatrix'
], function (require) {
'use strict';
var Vector3 = require('./Vector3');
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var vec3TransformMat4 = vec3.transformMat4;
var vec3Copy = vec3.copy;
var vec3Set = vec3.set;
var BoundingBox = function (min, max) {
this.min = min || new Vector3(Infinity, Infinity, Infinity);
this.max = max || new Vector3(-Infinity, -Infinity, -Infinity);
var vertices = [];
for (var i = 0; i < 8; i++) {
vertices[i] = vec3.fromValues(0, 0, 0);
}
this.vertices = vertices;
};
BoundingBox.prototype = {
constructor: BoundingBox,
updateFromVertices: function (vertices) {
if (vertices.length > 0) {
var _min = this.min._array;
var _max = this.max._array;
vec3Copy(_min, vertices[0]);
vec3Copy(_max, vertices[0]);
for (var i = 1; i < vertices.length; i++) {
var vertex = vertices[i];
if (vertex[0] < _min[0]) {
_min[0] = vertex[0];
}
if (vertex[1] < _min[1]) {
_min[1] = vertex[1];
}
if (vertex[2] < _min[2]) {
_min[2] = vertex[2];
}
if (vertex[0] > _max[0]) {
_max[0] = vertex[0];
}
if (vertex[1] > _max[1]) {
_max[1] = vertex[1];
}
if (vertex[2] > _max[2]) {
_max[2] = vertex[2];
}
}
this.min._dirty = true;
this.max._dirty = true;
}
},
union: function (bbox) {
vec3.min(this.min._array, this.min._array, bbox.min._array);
vec3.max(this.max._array, this.max._array, bbox.max._array);
this.min._dirty = true;
this.max._dirty = true;
},
intersectBoundingBox: function (bbox) {
var _min = this.min._array;
var _max = this.max._array;
var _min2 = bbox.min._array;
var _max2 = bbox.max._array;
return !(_min[0] > _max2[0] || _min[1] > _max2[1] || _min[2] > _max2[1] || _max[0] < _min2[0] || _max[1] < _min2[1] || _max[2] < _min2[2]);
},
applyTransform: function (matrix) {
if (this.min._dirty || this.max._dirty) {
this.updateVertices();
this.min._dirty = false;
this.max._dirty = false;
}
var m4 = matrix._array;
var _min = this.min._array;
var _max = this.max._array;
var vertices = this.vertices;
var v = vertices[0];
vec3TransformMat4(v, v, m4);
vec3Copy(_min, v);
vec3Copy(_max, v);
for (var i = 1; i < 8; i++) {
v = vertices[i];
vec3TransformMat4(v, v, m4);
if (v[0] < _min[0]) {
_min[0] = v[0];
}
if (v[1] < _min[1]) {
_min[1] = v[1];
}
if (v[2] < _min[2]) {
_min[2] = v[2];
}
if (v[0] > _max[0]) {
_max[0] = v[0];
}
if (v[1] > _max[1]) {
_max[1] = v[1];
}
if (v[2] > _max[2]) {
_max[2] = v[2];
}
}
this.min._dirty = true;
this.max._dirty = true;
},
applyProjection: function (matrix) {
if (this.min._dirty || this.max._dirty) {
this.updateVertices();
this.min._dirty = false;
this.max._dirty = false;
}
var m = matrix._array;
var v1 = this.vertices[0];
var v2 = this.vertices[3];
var v3 = this.vertices[7];
var _min = this.min._array;
var _max = this.max._array;
if (m[15] === 1) {
_min[0] = m[0] * v1[0] + m[12];
_min[1] = m[5] * v1[1] + m[13];
_max[2] = m[10] * v1[2] + m[14];
_max[0] = m[0] * v3[0] + m[12];
_max[1] = m[5] * v3[1] + m[13];
_min[2] = m[10] * v3[2] + m[14];
} else {
var w = -1 / v1[2];
_min[0] = m[0] * v1[0] * w;
_min[1] = m[5] * v1[1] * w;
_max[2] = (m[10] * v1[2] + m[14]) * w;
w = -1 / v2[2];
_max[0] = m[0] * v2[0] * w;
_max[1] = m[5] * v2[1] * w;
w = -1 / v3[2];
_min[2] = (m[10] * v3[2] + m[14]) * w;
}
this.min._dirty = true;
this.max._dirty = true;
},
updateVertices: function () {
var min = this.min._array;
var max = this.max._array;
var vertices = this.vertices;
vec3Set(vertices[0], min[0], min[1], min[2]);
vec3Set(vertices[1], min[0], max[1], min[2]);
vec3Set(vertices[2], max[0], min[1], min[2]);
vec3Set(vertices[3], max[0], max[1], min[2]);
vec3Set(vertices[4], min[0], min[1], max[2]);
vec3Set(vertices[5], min[0], max[1], max[2]);
vec3Set(vertices[6], max[0], min[1], max[2]);
vec3Set(vertices[7], max[0], max[1], max[2]);
},
copy: function (bbox) {
vec3Copy(this.min._array, bbox.min._array);
vec3Copy(this.max._array, bbox.max._array);
this.min._dirty = true;
this.max._dirty = true;
},
clone: function () {
var boundingBox = new BoundingBox();
boundingBox.copy(this);
return boundingBox;
}
};
return BoundingBox;
});define('qtek/Texture', [
'require',
'./core/Base',
'./core/glenum',
'./core/Cache'
], function (require) {
'use strict';
var Base = require('./core/Base');
var glenum = require('./core/glenum');
var Cache = require('./core/Cache');
var Texture = Base.derive({
width: 512,
height: 512,
type: glenum.UNSIGNED_BYTE,
format: glenum.RGBA,
wrapS: glenum.CLAMP_TO_EDGE,
wrapT: glenum.CLAMP_TO_EDGE,
minFilter: glenum.LINEAR_MIPMAP_LINEAR,
magFilter: glenum.LINEAR,
useMipmap: true,
anisotropic: 1,
flipY: true,
unpackAlignment: 4,
premultiplyAlpha: false,
dynamic: false,
NPOT: false
}, function () {
this._cache = new Cache();
}, {
getWebGLTexture: function (_gl) {
var cache = this._cache;
cache.use(_gl.__GLID__);
if (cache.miss('webgl_texture')) {
cache.put('webgl_texture', _gl.createTexture());
}
if (this.dynamic) {
this.update(_gl);
} else if (cache.isDirty()) {
this.update(_gl);
cache.fresh();
}
return cache.get('webgl_texture');
},
bind: function () {
},
unbind: function () {
},
dirty: function () {
this._cache.dirtyAll();
},
update: function (_gl) {
},
beforeUpdate: function (_gl) {
_gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, this.flipY);
_gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha);
_gl.pixelStorei(_gl.UNPACK_ALIGNMENT, this.unpackAlignment);
this.fallBack();
},
fallBack: function () {
var isPowerOfTwo = this.isPowerOfTwo();
if (this.format === glenum.DEPTH_COMPONENT) {
this.useMipmap = false;
}
if (!isPowerOfTwo || !this.useMipmap) {
this.NPOT = true;
this._minFilterOriginal = this.minFilter;
this._magFilterOriginal = this.magFilter;
this._wrapSOriginal = this.wrapS;
this._wrapTOriginal = this.wrapT;
if (this.minFilter == glenum.NEAREST_MIPMAP_NEAREST || this.minFilter == glenum.NEAREST_MIPMAP_LINEAR) {
this.minFilter = glenum.NEAREST;
} else if (this.minFilter == glenum.LINEAR_MIPMAP_LINEAR || this.minFilter == glenum.LINEAR_MIPMAP_NEAREST) {
this.minFilter = glenum.LINEAR;
}
this.wrapS = glenum.CLAMP_TO_EDGE;
this.wrapT = glenum.CLAMP_TO_EDGE;
} else {
this.NPOT = false;
if (this._minFilterOriginal) {
this.minFilter = this._minFilterOriginal;
}
if (this._magFilterOriginal) {
this.magFilter = this._magFilterOriginal;
}
if (this._wrapSOriginal) {
this.wrapS = this._wrapSOriginal;
}
if (this._wrapTOriginal) {
this.wrapT = this._wrapTOriginal;
}
}
},
nextHighestPowerOfTwo: function (x) {
--x;
for (var i = 1; i < 32; i <<= 1) {
x = x | x >> i;
}
return x + 1;
},
dispose: function (_gl) {
var cache = this._cache;
cache.use(_gl.__GLID__);
var webglTexture = cache.get('webgl_texture');
if (webglTexture) {
_gl.deleteTexture(webglTexture);
}
cache.deleteContext(_gl.__GLID__);
},
isRenderable: function () {
},
isPowerOfTwo: function () {
}
});
Texture.BYTE = glenum.BYTE;
Texture.UNSIGNED_BYTE = glenum.UNSIGNED_BYTE;
Texture.SHORT = glenum.SHORT;
Texture.UNSIGNED_SHORT = glenum.UNSIGNED_SHORT;
Texture.INT = glenum.INT;
Texture.UNSIGNED_INT = glenum.UNSIGNED_INT;
Texture.FLOAT = glenum.FLOAT;
Texture.HALF_FLOAT = 36193;
Texture.DEPTH_COMPONENT = glenum.DEPTH_COMPONENT;
Texture.ALPHA = glenum.ALPHA;
Texture.RGB = glenum.RGB;
Texture.RGBA = glenum.RGBA;
Texture.LUMINANCE = glenum.LUMINANCE;
Texture.LUMINANCE_ALPHA = glenum.LUMINANCE_ALPHA;
Texture.COMPRESSED_RGB_S3TC_DXT1_EXT = 33776;
Texture.COMPRESSED_RGBA_S3TC_DXT1_EXT = 33777;
Texture.COMPRESSED_RGBA_S3TC_DXT3_EXT = 33778;
Texture.COMPRESSED_RGBA_S3TC_DXT5_EXT = 33779;
Texture.NEAREST = glenum.NEAREST;
Texture.LINEAR = glenum.LINEAR;
Texture.NEAREST_MIPMAP_NEAREST = glenum.NEAREST_MIPMAP_NEAREST;
Texture.LINEAR_MIPMAP_NEAREST = glenum.LINEAR_MIPMAP_NEAREST;
Texture.NEAREST_MIPMAP_LINEAR = glenum.NEAREST_MIPMAP_LINEAR;
Texture.LINEAR_MIPMAP_LINEAR = glenum.LINEAR_MIPMAP_LINEAR;
Texture.TEXTURE_MAG_FILTER = glenum.TEXTURE_MAG_FILTER;
Texture.TEXTURE_MIN_FILTER = glenum.TEXTURE_MIN_FILTER;
Texture.REPEAT = glenum.REPEAT;
Texture.CLAMP_TO_EDGE = glenum.CLAMP_TO_EDGE;
Texture.MIRRORED_REPEAT = glenum.MIRRORED_REPEAT;
return Texture;
});define('echarts-x/component/base3d', [
'require',
'echarts/component/base',
'../core/Layer3D',
'zrender/tool/util'
], function (require) {
'use strict';
var ComponentBase = require('echarts/component/base');
var Layer3D = require('../core/Layer3D');
var zrUtil = require('zrender/tool/util');
var Base3D = function (ecTheme, messageCenter, zr, option, myChart) {
ComponentBase.call(this, ecTheme, messageCenter, zr, option, myChart);
var zlevel = this.getZlevelBase();
this.baseLayer = new Layer3D(zlevel, this.zr.painter);
this.zr.painter.insertLayer(zlevel, this.baseLayer);
this.zr.animation.bind('frame', this.onframe, this);
};
Base3D.prototype = {
constructor: Base3D,
onframe: function () {
},
dispose: function () {
this.zr.animation.unbind('frame', this.onframe);
}
};
zrUtil.inherits(Base3D, ComponentBase);
return Base3D;
});define('echarts-x/util/color', [], function () {
var kCSSColorTable = {
'transparent': [
0,
0,
0,
0
],
'aliceblue': [
240,
248,
255,
1
],
'antiquewhite': [
250,
235,
215,
1
],
'aqua': [
0,
255,
255,
1
],
'aquamarine': [
127,
255,
212,
1
],
'azure': [
240,
255,
255,
1
],
'beige': [
245,
245,
220,
1
],
'bisque': [
255,
228,
196,
1
],
'black': [
0,
0,
0,
1
],
'blanchedalmond': [
255,
235,
205,
1
],
'blue': [
0,
0,
255,
1
],
'blueviolet': [
138,
43,
226,
1
],
'brown': [
165,
42,
42,
1
],
'burlywood': [
222,
184,
135,
1
],
'cadetblue': [
95,
158,
160,
1
],
'chartreuse': [
127,
255,
0,
1
],
'chocolate': [
210,
105,
30,
1
],
'coral': [
255,
127,
80,
1
],
'cornflowerblue': [
100,
149,
237,
1
],
'cornsilk': [
255,
248,
220,
1
],
'crimson': [
220,
20,
60,
1
],
'cyan': [
0,
255,
255,
1
],
'darkblue': [
0,
0,
139,
1
],
'darkcyan': [
0,
139,
139,
1
],
'darkgoldenrod': [
184,
134,
11,
1
],
'darkgray': [
169,
169,
169,
1
],
'darkgreen': [
0,
100,
0,
1
],
'darkgrey': [
169,
169,
169,
1
],
'darkkhaki': [
189,
183,
107,
1
],
'darkmagenta': [
139,
0,
139,
1
],
'darkolivegreen': [
85,
107,
47,
1
],
'darkorange': [
255,
140,
0,
1
],
'darkorchid': [
153,
50,
204,
1
],
'darkred': [
139,
0,
0,
1
],
'darksalmon': [
233,
150,
122,
1
],
'darkseagreen': [
143,
188,
143,
1
],
'darkslateblue': [
72,
61,
139,
1
],
'darkslategray': [
47,
79,
79,
1
],
'darkslategrey': [
47,
79,
79,
1
],
'darkturquoise': [
0,
206,
209,
1
],
'darkviolet': [
148,
0,
211,
1
],
'deeppink': [
255,
20,
147,
1
],
'deepskyblue': [
0,
191,
255,
1
],
'dimgray': [
105,
105,
105,
1
],
'dimgrey': [
105,
105,
105,
1
],
'dodgerblue': [
30,
144,
255,
1
],
'firebrick': [
178,
34,
34,
1
],
'floralwhite': [
255,
250,
240,
1
],
'forestgreen': [
34,
139,
34,
1
],
'fuchsia': [
255,
0,
255,
1
],
'gainsboro': [
220,
220,
220,
1
],
'ghostwhite': [
248,
248,
255,
1
],
'gold': [
255,
215,
0,
1
],
'goldenrod': [
218,
165,
32,
1
],
'gray': [
128,
128,
128,
1
],
'green': [
0,
128,
0,
1
],
'greenyellow': [
173,
255,
47,
1
],
'grey': [
128,
128,
128,
1
],
'honeydew': [
240,
255,
240,
1
],
'hotpink': [
255,
105,
180,
1
],
'indianred': [
205,
92,
92,
1
],
'indigo': [
75,
0,
130,
1
],
'ivory': [
255,
255,
240,
1
],
'khaki': [
240,
230,
140,
1
],
'lavender': [
230,
230,
250,
1
],
'lavenderblush': [
255,
240,
245,
1
],
'lawngreen': [
124,
252,
0,
1
],
'lemonchiffon': [
255,
250,
205,
1
],
'lightblue': [
173,
216,
230,
1
],
'lightcoral': [
240,
128,
128,
1
],
'lightcyan': [
224,
255,
255,
1
],
'lightgoldenrodyellow': [
250,
250,
210,
1
],
'lightgray': [
211,
211,
211,
1
],
'lightgreen': [
144,
238,
144,
1
],
'lightgrey': [
211,
211,
211,
1
],
'lightpink': [
255,
182,
193,
1
],
'lightsalmon': [
255,
160,
122,
1
],
'lightseagreen': [
32,
178,
170,
1
],
'lightskyblue': [
135,
206,
250,
1
],
'lightslategray': [
119,
136,
153,
1
],
'lightslategrey': [
119,
136,
153,
1
],
'lightsteelblue': [
176,
196,
222,
1
],
'lightyellow': [
255,
255,
224,
1
],
'lime': [
0,
255,
0,
1
],
'limegreen': [
50,
205,
50,
1
],
'linen': [
250,
240,
230,
1
],
'magenta': [
255,
0,
255,
1
],
'maroon': [
128,
0,
0,
1
],
'mediumaquamarine': [
102,
205,
170,
1
],
'mediumblue': [
0,
0,
205,
1
],
'mediumorchid': [
186,
85,
211,
1
],
'mediumpurple': [
147,
112,
219,
1
],
'mediumseagreen': [
60,
179,
113,
1
],
'mediumslateblue': [
123,
104,
238,
1
],
'mediumspringgreen': [
0,
250,
154,
1
],
'mediumturquoise': [
72,
209,
204,
1
],
'mediumvioletred': [
199,
21,
133,
1
],
'midnightblue': [
25,
25,
112,
1
],
'mintcream': [
245,
255,
250,
1
],
'mistyrose': [
255,
228,
225,
1
],
'moccasin': [
255,
228,
181,
1
],
'navajowhite': [
255,
222,
173,
1
],
'navy': [
0,
0,
128,
1
],
'oldlace': [
253,
245,
230,
1
],
'olive': [
128,
128,
0,
1
],
'olivedrab': [
107,
142,
35,
1
],
'orange': [
255,
165,
0,
1
],
'orangered': [
255,
69,
0,
1
],
'orchid': [
218,
112,
214,
1
],
'palegoldenrod': [
238,
232,
170,
1
],
'palegreen': [
152,
251,
152,
1
],
'paleturquoise': [
175,
238,
238,
1
],
'palevioletred': [
219,
112,
147,
1
],
'papayawhip': [
255,
239,
213,
1
],
'peachpuff': [
255,
218,
185,
1
],
'peru': [
205,
133,
63,
1
],
'pink': [
255,
192,
203,
1
],
'plum': [
221,
160,
221,
1
],
'powderblue': [
176,
224,
230,
1
],
'purple': [
128,
0,
128,
1
],
'red': [
255,
0,
0,
1
],
'rosybrown': [
188,
143,
143,
1
],
'royalblue': [
65,
105,
225,
1
],
'saddlebrown': [
139,
69,
19,
1
],
'salmon': [
250,
128,
114,
1
],
'sandybrown': [
244,
164,
96,
1
],
'seagreen': [
46,
139,
87,
1
],
'seashell': [
255,
245,
238,
1
],
'sienna': [
160,
82,
45,
1
],
'silver': [
192,
192,
192,
1
],
'skyblue': [
135,
206,
235,
1
],
'slateblue': [
106,
90,
205,
1
],
'slategray': [
112,
128,
144,
1
],
'slategrey': [
112,
128,
144,
1
],
'snow': [
255,
250,
250,
1
],
'springgreen': [
0,
255,
127,
1
],
'steelblue': [
70,
130,
180,
1
],
'tan': [
210,
180,
140,
1
],
'teal': [
0,
128,
128,
1
],
'thistle': [
216,
191,
216,
1
],
'tomato': [
255,
99,
71,
1
],
'turquoise': [
64,
224,
208,
1
],
'violet': [
238,
130,
238,
1
],
'wheat': [
245,
222,
179,
1
],
'white': [
255,
255,
255,
1
],
'whitesmoke': [
245,
245,
245,
1
],
'yellow': [
255,
255,
0,
1
],
'yellowgreen': [
154,
205,
50,
1
]
};
function clamp_css_byte(i) {
i = Math.round(i);
return i < 0 ? 0 : i > 255 ? 255 : i;
}
function clamp_css_float(f) {
return f < 0 ? 0 : f > 1 ? 1 : f;
}
function parse_css_int(str) {
if (str[str.length - 1] === '%')
return clamp_css_byte(parseFloat(str) / 100 * 255);
return clamp_css_byte(parseInt(str));
}
function parse_css_float(str) {
if (str[str.length - 1] === '%')
return clamp_css_float(parseFloat(str) / 100);
return clamp_css_float(parseFloat(str));
}
function css_hue_to_rgb(m1, m2, h) {
if (h < 0)
h += 1;
else if (h > 1)
h -= 1;
if (h * 6 < 1)
return m1 + (m2 - m1) * h * 6;
if (h * 2 < 1)
return m2;
if (h * 3 < 2)
return m1 + (m2 - m1) * (2 / 3 - h) * 6;
return m1;
}
function parse(css_str) {
var str = css_str.replace(/ /g, '').toLowerCase();
if (str in kCSSColorTable)
return kCSSColorTable[str].slice();
if (str[0] === '#') {
if (str.length === 4) {
var iv = parseInt(str.substr(1), 16);
if (!(iv >= 0 && iv <= 4095))
return null;
return [
(iv & 3840) >> 4 | (iv & 3840) >> 8,
iv & 240 | (iv & 240) >> 4,
iv & 15 | (iv & 15) << 4,
1
];
} else if (str.length === 7) {
var iv = parseInt(str.substr(1), 16);
if (!(iv >= 0 && iv <= 16777215))
return null;
return [
(iv & 16711680) >> 16,
(iv & 65280) >> 8,
iv & 255,
1
];
}
return null;
}
var op = str.indexOf('('), ep = str.indexOf(')');
if (op !== -1 && ep + 1 === str.length) {
var fname = str.substr(0, op);
var params = str.substr(op + 1, ep - (op + 1)).split(',');
var alpha = 1;
switch (fname) {
case 'rgba':
if (params.length !== 4)
return null;
alpha = parse_css_float(params.pop());
case 'rgb':
if (params.length !== 3)
return null;
return [
parse_css_int(params[0]),
parse_css_int(params[1]),
parse_css_int(params[2]),
alpha
];
case 'hsla':
if (params.length !== 4)
return null;
alpha = parse_css_float(params.pop());
case 'hsl':
if (params.length !== 3)
return null;
var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360;
var s = parse_css_float(params[1]);
var l = parse_css_float(params[2]);
var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
var m1 = l * 2 - m2;
return [
clamp_css_byte(css_hue_to_rgb(m1, m2, h + 1 / 3) * 255),
clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),
clamp_css_byte(css_hue_to_rgb(m1, m2, h - 1 / 3) * 255),
alpha
];
default:
return null;
}
}
return null;
}
return { parse: parse };
});define('echarts-x/entity/marker/MarkLine', [
'require',
'zrender/tool/util',
'./Base',
'qtek/Renderable',
'qtek/Material',
'qtek/Shader',
'qtek/Node',
'../../util/geometry/Lines',
'../../util/geometry/CurveAnimatingPoints',
'qtek/Texture2D',
'qtek/math/Vector3'
], function (require) {
var zrUtil = require('zrender/tool/util');
var MarkBase = require('./Base');
var Renderable = require('qtek/Renderable');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var Node = require('qtek/Node');
var LinesGeometry = require('../../util/geometry/Lines');
var CurveAnimatingPointsGeometry = require('../../util/geometry/CurveAnimatingPoints');
var Texture2D = require('qtek/Texture2D');
var Vector3 = require('qtek/math/Vector3');
var MarkLine = function (chart) {
MarkBase.call(this, chart);
this._sceneNode = new Node();
this._markLineRenderable = null;
this._curveAnimatingPointsRenderable = null;
this._elapsedTime = 0;
};
MarkLine.prototype = {
constructor: MarkLine,
_createMarkLineRenderable: function () {
var material = new Material({
shader: new Shader({
vertex: Shader.source('ecx.albedo.vertex'),
fragment: Shader.source('ecx.albedo.fragment')
}),
transparent: true,
depthMask: false
});
material.shader.define('both', 'VERTEX_COLOR');
this._markLineRenderable = new Renderable({
geometry: new LinesGeometry(),
material: material,
mode: Renderable.LINES
});
this._sceneNode.add(this._markLineRenderable);
},
_createCurveAnimatingPointsRenderable: function () {
var material = new Material({
shader: new Shader({
vertex: Shader.source('ecx.curveAnimatingPoints.vertex'),
fragment: Shader.source('ecx.curveAnimatingPoints.fragment')
})
});
this._curveAnimatingPointsRenderable = new Renderable({
material: material,
mode: Renderable.POINTS,
geometry: new CurveAnimatingPointsGeometry()
});
this._sceneNode.add(this._curveAnimatingPointsRenderable);
},
setSeries: function (serie, seriesIndex) {
if (!serie.markLine || !serie.markLine.data) {
return;
}
this.seriesIndex = seriesIndex;
var chart = this.chart;
var legend = chart.component.legend;
var zr = chart.zr;
var markLine = serie.markLine;
var devicePixelRatio = window.devicePixelRatio || 1;
if (!this._markLineRenderable) {
this._createMarkLineRenderable();
}
var width = chart.query(markLine, 'itemStyle.normal.lineStyle.width');
var opacity = chart.query(markLine, 'itemStyle.normal.lineStyle.opacity');
var lineRenderable = this._markLineRenderable;
lineRenderable.lineWidth = width * devicePixelRatio;
lineRenderable.material.set('alpha', opacity);
var showMarkLineEffect = chart.query(serie.markLine, 'effect.show');
var pointsRenderable;
if (showMarkLineEffect) {
var scaleSize = chart.query(markLine, 'effect.scaleSize');
if (!this._curveAnimatingPointsRenderable) {
this._createCurveAnimatingPointsRenderable();
}
pointsRenderable = this._curveAnimatingPointsRenderable;
pointsRenderable.material.set('pointSize', scaleSize * devicePixelRatio);
pointsRenderable.geometry.dirty();
}
var serieColor;
if (legend) {
serieColor = legend.getColor(serie.name);
}
serieColor = chart.query(markLine, 'itemStyle.normal.color');
var serieDefaultColor = chart.zr.getColor(seriesIndex);
var dataList = markLine.data;
for (var i = 0; i < dataList.length; i++) {
var p0 = new Vector3();
var p1 = new Vector3();
var p2 = new Vector3();
var p3 = new Vector3();
var dataItem = dataList[i];
var itemColor = chart.query(dataItem, 'itemStyle.normal.color');
var color = itemColor || serieColor || serieDefaultColor;
if (typeof color == 'function') {
color = color(dataItem);
}
var colorArr = chart.parseColor(color) || new Float32Array();
chart.getMarkLinePoints(seriesIndex, dataItem, p0, p1, p2, p3);
lineRenderable.geometry.addCubicCurve(p0, p1, p2, p3, colorArr);
if (showMarkLineEffect) {
pointsRenderable.geometry.addPoint(p0, p1, p2, p3, colorArr);
}
}
lineRenderable.geometry.dirty();
},
clear: function () {
this._elapsedTime = 0;
if (this._markLineRenderable) {
this._markLineRenderable.geometry.clearLines();
}
if (this._curveAnimatingPointsRenderable) {
this._curveAnimatingPointsRenderable.geometry.clearPoints();
}
},
getSceneNode: function () {
return this._sceneNode;
},
onframe: function (deltaTime) {
var renderable = this._curveAnimatingPointsRenderable;
if (renderable && renderable.geometry.getVertexNumber() > 0) {
this._elapsedTime += deltaTime / 1000;
var t = this._elapsedTime / 3;
t %= 1;
renderable.material.set('percent', t);
this.chart.zr.refreshNextFrame();
}
}
};
zrUtil.inherits(MarkLine, MarkBase);
return MarkLine;
});define('echarts-x/entity/marker/MarkBar', [
'require',
'zrender/tool/util',
'./Base',
'qtek/Renderable',
'qtek/Material',
'qtek/Shader',
'../../util/geometry/Bars',
'qtek/math/Vector3'
], function (require) {
var zrUtil = require('zrender/tool/util');
var MarkBase = require('./Base');
var Renderable = require('qtek/Renderable');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var BarsGeometry = require('../../util/geometry/Bars');
var Vector3 = require('qtek/math/Vector3');
var MarkBar = function (chart) {
MarkBase.call(this, chart);
this._markBarRenderable = null;
};
MarkBar.prototype = {
constructor: MarkBar,
_createMarkBarRenderable: function () {
var material = new Material({
shader: new Shader({
vertex: Shader.source('ecx.albedo.vertex'),
fragment: Shader.source('ecx.albedo.fragment')
})
});
material.shader.define('both', 'VERTEX_COLOR');
this._markBarRenderable = new Renderable({
geometry: new BarsGeometry(),
material: material,
ignorePicking: true
});
},
setSeries: function (serie, seriesIndex) {
if (!serie.markBar || !serie.markBar.data) {
return;
}
var chart = this.chart;
var component = chart.component;
var legend = component.legend;
var dataRange = component.dataRange;
if (!this._markBarRenderable) {
this._createMarkBarRenderable();
}
var dataList = serie.markBar.data;
var geometry = this._markBarRenderable.geometry;
var serieColor;
if (legend) {
serieColor = legend.getColor(serie.name);
}
serieColor = chart.query(serie.markBar, 'itemStyle.normal.color') || serieColor;
var serieDefaultColor = chart.zr.getColor(seriesIndex);
var start = new Vector3();
var end = new Vector3();
var normal = new Vector3();
var globalBarSize = serie.markBar.barSize;
for (var i = 0; i < dataList.length; i++) {
var dataItem = dataList[i];
var value = chart.getDataFromOption(dataItem, null);
var dataRangeColor = null;
if (dataRange) {
dataRangeColor = isNaN(value) ? color : dataRange.getColor(value);
if (dataRangeColor == null) {
continue;
}
}
var itemColor = chart.query(dataItem, 'itemStyle.normal.color');
var color = itemColor || dataRangeColor || serieColor || serieDefaultColor;
if (typeof color == 'function') {
color = color(dataItem);
}
var colorArr = chart.parseColor(color) || new Float32Array();
var barSize = dataItem.barSize != null ? dataItem.barSize : globalBarSize;
if (typeof barSize == 'function') {
barSize = barSize(dataItem);
}
chart.getMarkBarPoints(seriesIndex, dataItem, start, end);
this._markBarRenderable.geometry.addBar(start, end, barSize, colorArr);
}
this._markBarRenderable.geometry.dirty();
},
getSceneNode: function () {
return this._markBarRenderable;
},
clear: function () {
if (this._markBarRenderable) {
this._markBarRenderable.geometry.clearBars();
}
}
};
zrUtil.inherits(MarkBar, MarkBase);
return MarkBar;
});define('echarts-x/entity/marker/MarkPoint', [
'require',
'zrender/tool/util',
'./Base',
'qtek/Renderable',
'qtek/Material',
'qtek/Shader',
'qtek/Node',
'qtek/Texture2D',
'qtek/Texture',
'../../surface/TextureAtlasSurface',
'../../util/geometry/Sprites',
'../../util/sprite',
'echarts/util/shape/Icon',
'zrender/shape/Image',
'qtek/math/Matrix4'
], function (require) {
var zrUtil = require('zrender/tool/util');
var MarkBase = require('./Base');
var Renderable = require('qtek/Renderable');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var Node = require('qtek/Node');
var Texture2D = require('qtek/Texture2D');
var Texture = require('qtek/Texture');
var TextureAtlasSurface = require('../../surface/TextureAtlasSurface');
var SpritesGeometry = require('../../util/geometry/Sprites');
var spriteUtil = require('../../util/sprite');
var IconShape = require('echarts/util/shape/Icon');
var ImageShape = require('zrender/shape/Image');
var Matrix4 = require('qtek/math/Matrix4');
var MarkPoint = function (chart) {
MarkBase.call(this, chart);
this._sceneNode = new Node();
this._spritesRenderables = [];
this._spritesShader = null;
this._textureAtlasList = [];
this._spriteSize = 128;
};
MarkPoint.prototype = {
constructor: MarkPoint,
setSeries: function (serie, seriesIndex) {
if (!serie.markPoint || !serie.markPoint.data || serie.markPoint.data.length === 0) {
return;
}
this.seriesIndex = seriesIndex;
var chart = this.chart;
var component = chart.component;
var legend = component.legend;
var dataRange = component.dataRange;
var markPoint = serie.markPoint;
var zr = chart.zr;
var spriteSize = this._spriteSize;
var dataList = markPoint.data;
var serieColor;
if (legend) {
serieColor = legend.getColor(serie.name);
}
serieColor = chart.query(serie.markBar, 'itemStyle.normal.color') || serieColor;
var serieDefaultColor = chart.zr.getColor(seriesIndex);
var matrix = new Matrix4();
var atlasSize = Texture.prototype.nextHighestPowerOfTwo(Math.sqrt(dataList.length) * this._spriteSize);
atlasSize = Math.min(2048, atlasSize);
var textureAtlas = new TextureAtlasSurface(chart.zr, atlasSize, atlasSize);
this._textureAtlasList.push(textureAtlas);
var spriteRenderable = this._createSpritesRenderable(textureAtlas);
for (var i = 0; i < dataList.length; i++) {
var dataItem = dataList[i];
var value = chart.getDataFromOption(dataItem, null);
var queryTarget = [
dataItem,
markPoint
];
var dataRangeColor = null;
if (dataRange) {
dataRangeColor = isNaN(value) ? color : dataRange.getColor(value);
if (dataRangeColor == null) {
continue;
}
}
var itemColor = chart.query(dataItem, 'itemStyle.normal.color');
var color = itemColor || dataRangeColor || serieColor || serieDefaultColor;
if (typeof color == 'function') {
color = color(dataItem);
}
var symbol = chart.deepQuery(queryTarget, 'symbol');
var symbolSize = chart.deepQuery(queryTarget, 'symbolSize');
var strokeColor = chart.deepQuery(queryTarget, 'itemStyle.normal.borderColor');
var lineWidth = chart.deepQuery(queryTarget, 'itemStyle.normal.borderWidth');
var shape;
if (symbol.match(/^image:\/\//)) {
shape = new ImageShape({ style: { image: symbol.replace(/^image:\/\//, '') } });
} else {
shape = new IconShape({
style: {
iconType: symbol,
color: color,
brushType: 'both',
strokeColor: strokeColor,
lineWidth: lineWidth / symbolSize * spriteSize
}
});
}
var shapeStyle = shape.style;
shapeStyle.x = shapeStyle.y = 0;
shapeStyle.width = shapeStyle.height = spriteSize;
if (chart.deepQuery(queryTarget, 'itemStyle.normal.label.show')) {
shape.style.text = chart.getSerieLabelText(markPoint, dataItem, dataItem.name, 'normal');
shape.style.textPosition = 'inside';
shape.style.textColor = chart.deepQuery(queryTarget, 'itemStyle.normal.label.textStyle.color');
shape.style.textFont = chart.getFont(chart.deepQuery(queryTarget, 'itemStyle.normal.label.textStyle'));
}
var coords = textureAtlas.addShape(shape, spriteSize, spriteSize);
if (!coords) {
textureAtlas = new TextureAtlasSurface(chart.zr, atlasSize, atlasSize);
this._textureAtlasList.push(textureAtlas);
spriteRenderable = this._createSpritesRenderable(textureAtlas);
coords = textureAtlas.addShape(shape, spriteSize, spriteSize);
}
chart.getMarkPointTransform(seriesIndex, dataItem, matrix);
spriteRenderable.geometry.addSprite(matrix, coords);
}
for (var i = 0; i < this._textureAtlasList.length; i++) {
this._textureAtlasList[i].refresh();
}
},
_createSpritesRenderable: function (textureAtlas) {
if (!this._spritesShader) {
this._spritesShader = new Shader({
vertex: Shader.source('ecx.albedo.vertex'),
fragment: Shader.source('ecx.albedo.fragment')
});
this._spritesShader.enableTexture('diffuseMap');
}
var renderable = new Renderable({
material: new Material({
shader: this._spritesShader,
transparent: true,
depthMask: false
}),
culling: false,
geometry: new SpritesGeometry(),
ignorePicking: true
});
renderable.material.set('diffuseMap', textureAtlas.getTexture());
this._spritesRenderables.push(renderable);
this._sceneNode.add(renderable);
return renderable;
},
clear: function () {
var renderer = this.chart.baseLayer.renderer;
renderer.disposeNode(this._sceneNode, true, true);
this._sceneNode = new Node();
this._spritesRenderables = [];
this._textureAtlasList = [];
},
getSceneNode: function () {
return this._sceneNode;
}
};
zrUtil.inherits(MarkPoint, MarkBase);
return MarkPoint;
});define('echarts-x/entity/marker/LargeMarkPoint', [
'require',
'zrender/tool/util',
'./Base',
'qtek/Renderable',
'qtek/Material',
'qtek/Shader',
'qtek/Node',
'../../util/geometry/Points',
'../../util/geometry/AnimatingPoints',
'qtek/Texture2D',
'../../util/sprite',
'qtek/math/Vector3',
'echarts/util/shape/Icon'
], function (require) {
var zrUtil = require('zrender/tool/util');
var MarkBase = require('./Base');
var Renderable = require('qtek/Renderable');
var Material = require('qtek/Material');
var Shader = require('qtek/Shader');
var Node = require('qtek/Node');
var PointsGeometry = require('../../util/geometry/Points');
var AnimatingPointsGeometry = require('../../util/geometry/AnimatingPoints');
var Texture2D = require('qtek/Texture2D');
var spriteUtil = require('../../util/sprite');
var Vector3 = require('qtek/math/Vector3');
var IconShape = require('echarts/util/shape/Icon');
var LargeMarkPoint = function (chart) {
MarkBase.call(this, chart);
this._sceneNode = new Node();
this._markPointRenderable = null;
this._animatingMarkPointRenderable = null;
this._spriteTexture = null;
this._elapsedTime = 0;
};
LargeMarkPoint.prototype = {
constructor: LargeMarkPoint,
_createMarkPointRenderable: function () {
var mat = new Material({
shader: new Shader({
vertex: Shader.source('ecx.points.vertex'),
fragment: Shader.source('ecx.points.fragment')
}),
depthMask: false,
transparent: true
});
mat.shader.enableTexture('sprite');
this._markPointRenderable = new Renderable({
geometry: new PointsGeometry(),
material: mat,
mode: Renderable.POINTS
});
if (this._spriteTexture) {
mat.set('sprite', this._spriteTexture);
}
this._sceneNode.add(this._markPointRenderable);
},
_createAnimatingMarkPointRenderable: function () {
var mat = new Material({
shader: new Shader({
vertex: Shader.source('ecx.points.vertex'),
fragment: Shader.source('ecx.points.fragment')
}),
depthMask: false,
transparent: true
});
mat.shader.enableTexture('sprite');
mat.shader.define('vertex', 'ANIMATING');
this._animatingMarkPointRenderable = new Renderable({
geometry: new AnimatingPointsGeometry(),
material: mat,
mode: Renderable.POINTS
});
if (this._spriteTexture) {
mat.set('sprite', this._spriteTexture);
}
this._sceneNode.add(this._animatingMarkPointRenderable);
},
_updateSpriteTexture: function (size, shape) {
if (!this._spriteTexture) {
this._spriteTexture = new Texture2D({ flipY: false });
}
var spriteTexture = this._spriteTexture;
spriteTexture.image = spriteUtil.makeSpriteFromShape(size, shape, spriteTexture.image);
spriteTexture.dirty();
},
clear: function () {
if (this._markPointRenderable) {
this._markPointRenderable.geometry.clearPoints();
}
if (this._animatingMarkPointRenderable) {
this._animatingMarkPointRenderable.geometry.clearPoints();
}
this._elapsedTime = 0;
},
setSeries: function (serie, seriesIndex) {
if (!serie.markPoint || !serie.markPoint.data) {
return;
}
this.seriesIndex = seriesIndex;
var chart = this.chart;
var component = chart.component;
var legend = component.legend;
var dataRange = component.dataRange;
var markPoint = serie.markPoint;
var zr = chart.zr;
var symbol = chart.query(markPoint, 'symbol');
var showMarkPointEffect = chart.query(markPoint, 'effect.show');
var shadowBlur = chart.query(markPoint, 'effect.shadowBlur') || 0;
var shape = new IconShape({
style: {
x: 0,
y: 0,
width: 128,
height: 128,
iconType: symbol,
color: 'white',
shadowBlur: shadowBlur * 128,
shadowColor: 'white'
}
});
this._updateSpriteTexture(128, shape);
if (showMarkPointEffect) {
if (!this._animatingMarkPointRenderable) {
this._createAnimatingMarkPointRenderable();
}
this._animatingMarkPointRenderable.geometry.dirty();
} else {
if (!this._markPointRenderable) {
this._createMarkPointRenderable();
}
this._markPointRenderable.geometry.dirty();
}
var dataList = markPoint.data;
var serieColor;
if (legend) {
serieColor = legend.getColor(serie.name);
}
serieColor = chart.query(markPoint, 'itemStyle.normal.color') || serieColor;
var serieDefaultColor = chart.zr.getColor(seriesIndex);
var globalSize = chart.query(markPoint, 'symbolSize') || 2;
for (var i = 0; i < dataList.length; i++) {
var dataItem = dataList[i];
var value = chart.getDataFromOption(dataItem, null);
var dataRangeColor = null;
if (dataRange) {
dataRangeColor = isNaN(value) ? color : dataRange.getColor(value);
if (dataRangeColor == null) {
continue;
}
}
var itemColor = chart.query(dataItem, 'itemStyle.normal.color');
var color = itemColor || dataRangeColor || serieColor || serieDefaultColor;
if (typeof color == 'function') {
color = color(dataItem);
}
var colorArr = chart.parseColor(color) || new Float32Array(4);
var size = dataItem.symbolSize == null ? globalSize : dataItem.symbolSize;
if (typeof size == 'function') {
size = size(dataItem);
}
size *= window.devicePixelRatio || 1;
var coord = new Vector3();
chart.getMarkCoord(seriesIndex, dataItem, coord);
if (showMarkPointEffect) {
this._animatingMarkPointRenderable.geometry.addPoint(coord, colorArr, size, Math.random() * 2);
} else {
this._markPointRenderable.geometry.addPoint(coord, colorArr, size);
}
}
},
getSceneNode: function () {
return this._sceneNode;
},
onframe: function (deltaTime) {
if (this._animatingMarkPointRenderable) {
var renderable = this._animatingMarkPointRenderable;
if (renderable.geometry.getVertexNumber() > 0) {
this._elapsedTime += deltaTime / 1000;
renderable.material.set('elapsedTime', this._elapsedTime);
this.chart.zr.refreshNextFrame();
}
}
}
};
zrUtil.inherits(LargeMarkPoint, MarkBase);
return LargeMarkPoint;
});define('echarts-x/core/Layer3D', [
'require',
'qtek/Renderer',
'qtek/Scene',
'qtek/camera/Perspective',
'qtek/camera/Orthographic',
'qtek/picking/RayPicking',
'zrender/mixin/Eventful',
'zrender/tool/util'
], function (require) {
var Renderer = require('qtek/Renderer');
var Scene = require('qtek/Scene');
var PerspectiveCamera = require('qtek/camera/Perspective');
var OrthoCamera = require('qtek/camera/Orthographic');
var RayPicking = require('qtek/picking/RayPicking');
var Eventful = require('zrender/mixin/Eventful');
var zrUtil = require('zrender/tool/util');
var Layer3D = function (id, painter) {
Eventful.call(this);
this.id = id;
try {
this.renderer = new Renderer();
this.renderer.resize(painter.getWidth(), painter.getHeight());
} catch (e) {
this.renderer = null;
this.dom = document.createElement('div');
this.dom.style.cssText = 'position:absolute; left: 0; top: 0; right: 0; bottom: 0;';
this.dom.className = 'ecx-nowebgl';
this.dom.innerHTML = 'Sorry, your browser does support WebGL';
return;
}
this.dom = this.renderer.canvas;
var style = this.dom.style;
style.position = 'absolute';
style.left = '0';
style.top = '0';
this.camera = new PerspectiveCamera();
this.camera.aspect = painter.getWidth() / painter.getHeight();
this.scene = new Scene();
this._viewport = {
x: 0,
y: 0,
width: 1,
height: 1
};
this._initHandlers();
};
Layer3D.prototype._initHandlers = function () {
this.bind('click', this._clickHandler, this);
this.bind('mousedown', this._mouseDownHandler, this);
this.bind('mouseup', this._mouseUpHandler, this);
this.bind('mousemove', this._mouseMoveHandler, this);
this._picking = new RayPicking({
scene: this.scene,
camera: this.camera,
renderer: this.renderer
});
};
Layer3D.prototype.resize = function (width, height) {
var renderer = this.renderer;
renderer.resize(width, height);
var viewport = this._viewport;
this.setViewport(viewport.x * width, viewport.y * height, viewport.width * width, viewport.height * height);
};
Layer3D.prototype.setViewport = function (x, y, width, height) {
var renderer = this.renderer;
var rendererWidth = renderer.getWidth();
var rendererHeight = renderer.getHeight();
var viewport = this._viewport;
viewport.x = x / rendererWidth;
viewport.y = y / rendererHeight;
viewport.width = width / rendererWidth;
viewport.height = 1 - height / rendererHeight;
renderer.setViewport(x, y, width, height);
var camera = this.camera;
if (camera instanceof PerspectiveCamera) {
camera.aspect = width / height;
}
};
Layer3D.prototype.refresh = function () {
this.renderer.render(this.scene, this.camera);
};
Layer3D.prototype.dispose = function () {
this.renderer.disposeScene(this.scene);
};
Layer3D.prototype.onmousedown = function (e) {
e = e.event;
var obj = this.pickObject(e.offsetX, e.offsetY);
if (obj) {
this._dispatchEvent('mousedown', e, obj);
}
};
Layer3D.prototype.onmousemove = function (e) {
e = e.event;
var obj = this.pickObject(e.offsetX, e.offsetY);
if (obj) {
this._dispatchEvent('mousemove', e, obj);
}
};
Layer3D.prototype.onmouseup = function (e) {
e = e.event;
var obj = this.pickObject(e.offsetX, e.offsetY);
if (obj) {
this._dispatchEvent('mouseup', e, obj);
}
};
Layer3D.prototype.onclick = function (e) {
e = e.event;
var obj = this.pickObject(e.offsetX, e.offsetY);
if (obj) {
this._dispatchEvent('click', e, obj);
}
};
Layer3D.prototype.pickObject = function (x, y) {
return this._picking.pick(x, y);
};
Layer3D.prototype._dispatchEvent = function (eveName, e, obj) {
var current = obj.target;
obj.cancelBubble = false;
obj.event = e;
obj.type = eveName;
while (current) {
current.trigger(eveName, obj);
current = current.getParent();
if (obj.cancelBubble) {
break;
}
}
};
zrUtil.inherits(Layer3D, Eventful);
return Layer3D;
});define('qtek/Renderer', [
'require',
'./core/Base',
'./Texture',
'./core/glinfo',
'./core/glenum',
'./math/BoundingBox',
'./math/Matrix4',
'./shader/library',
'./Material',
'./math/Vector2',
'./dep/glmatrix'
], function (require) {
'use strict';
var Base = require('./core/Base');
var Texture = require('./Texture');
var glinfo = require('./core/glinfo');
var glenum = require('./core/glenum');
var BoundingBox = require('./math/BoundingBox');
var Matrix4 = require('./math/Matrix4');
var shaderLibrary = require('./shader/library');
var Material = require('./Material');
var Vector2 = require('./math/Vector2');
var glMatrix = require('./dep/glmatrix');
var mat4 = glMatrix.mat4;
var vec3 = glMatrix.vec3;
var glid = 0;
var errorShader = {};
var Renderer = Base.derive(function () {
return {
canvas: null,
width: 100,
height: 100,
devicePixelRatio: window.devicePixelRatio || 1,
color: [
0,
0,
0,
0
],
clear: 17664,
alhpa: true,
depth: true,
stencil: false,
antialias: true,
premultipliedAlpha: true,
preserveDrawingBuffer: false,
throwError: true,
gl: null,
viewport: {},
_viewportSettings: [],
_clearSettings: [],
_sceneRendering: null
};
}, function () {
if (!this.canvas) {
this.canvas = document.createElement('canvas');
this.canvas.width = this.width;
this.canvas.height = this.height;
}
try {
var opts = {
alhpa: this.alhpa,
depth: this.depth,
stencil: this.stencil,
antialias: this.antialias,
premultipliedAlpha: this.premultipliedAlpha,
preserveDrawingBuffer: this.preserveDrawingBuffer
};
this.gl = this.canvas.getContext('webgl', opts) || this.canvas.getContext('experimental-webgl', opts);
if (!this.gl) {
throw new Error();
}
this.gl.__GLID__ = glid++;
this.width = this.canvas.width;
this.height = this.canvas.height;
this.resize(this.width, this.height);
glinfo.initialize(this.gl);
} catch (e) {
throw 'Error creating WebGL Context ' + e;
}
}, {
resize: function (width, height) {
var canvas = this.canvas;
if (typeof width !== 'undefined') {
canvas.style.width = width + 'px';
canvas.style.height = height + 'px';
canvas.width = width * this.devicePixelRatio;
canvas.height = height * this.devicePixelRatio;
this.width = width;
this.height = height;
} else {
this.width = canvas.width / this.devicePixelRatio;
this.height = canvas.height / this.devicePixelRatio;
}
this.setViewport(0, 0, width, height);
},
getWidth: function () {
return this.width;
},
getHeight: function () {
return this.height;
},
setDevicePixelRatio: function (devicePixelRatio) {
this.devicePixelRatio = devicePixelRatio;
this.resize(this.width, this.height);
},
getDevicePixelRatio: function () {
return this.devicePixelRatio;
},
setViewport: function (x, y, width, height, dpr) {
if (typeof x === 'object') {
var obj = x;
x = obj.x;
y = obj.y;
width = obj.width;
height = obj.height;
}
dpr = dpr || this.devicePixelRatio;
this.gl.viewport(x * dpr, y * dpr, width * dpr, height * dpr);
this.viewport = {
x: x,
y: y,
width: width,
height: height
};
},
saveViewport: function () {
this._viewportSettings.push(this.viewport);
},
restoreViewport: function () {
if (this._viewportSettings.length > 0) {
this.setViewport(this._viewportSettings.pop());
}
},
saveClear: function () {
this._clearSettings.push(this.clear);
},
restoreClear: function () {
if (this._clearSettings.length > 0) {
this.clear = this._clearSettings.pop();
}
},
render: function (scene, camera, notUpdateScene, preZ) {
var _gl = this.gl;
this._sceneRendering = scene;
var color = this.color;
if (this.clear) {
_gl.clearColor(color[0], color[1], color[2], color[3]);
_gl.clear(this.clear);
}
if (!notUpdateScene) {
scene.update(false);
}
if (!camera.getScene()) {
camera.update(true);
}
var opaqueQueue = scene.opaqueQueue;
var transparentQueue = scene.transparentQueue;
var sceneMaterial = scene.material;
scene.trigger('beforerender', this, scene, camera);
if (transparentQueue.length > 0) {
var worldViewMat = mat4.create();
var posViewSpace = vec3.create();
for (var i = 0; i < transparentQueue.length; i++) {
var node = transparentQueue[i];
mat4.multiply(worldViewMat, camera.viewMatrix._array, node.worldTransform._array);
vec3.transformMat4(posViewSpace, node.position._array, worldViewMat);
node.__depth = posViewSpace[2];
}
}
opaqueQueue.sort(Renderer.opaqueSortFunc);
transparentQueue.sort(Renderer.transparentSortFunc);
scene.trigger('beforerender:opaque', this, opaqueQueue);
camera.sceneBoundingBoxLastFrame.min.set(Infinity, Infinity, Infinity);
camera.sceneBoundingBoxLastFrame.max.set(-Infinity, -Infinity, -Infinity);
_gl.disable(_gl.BLEND);
_gl.enable(_gl.DEPTH_TEST);
var opaqueRenderInfo = this.renderQueue(opaqueQueue, camera, sceneMaterial, preZ);
scene.trigger('afterrender:opaque', this, opaqueQueue, opaqueRenderInfo);
scene.trigger('beforerender:transparent', this, transparentQueue);
_gl.enable(_gl.BLEND);
var transparentRenderInfo = this.renderQueue(transparentQueue, camera, sceneMaterial);
scene.trigger('afterrender:transparent', this, transparentQueue, transparentRenderInfo);
var renderInfo = {};
for (var name in opaqueRenderInfo) {
renderInfo[name] = opaqueRenderInfo[name] + transparentRenderInfo[name];
}
scene.trigger('afterrender', this, scene, camera, renderInfo);
return renderInfo;
},
renderQueue: function (queue, camera, globalMaterial, preZ) {
var renderInfo = {
faceNumber: 0,
vertexNumber: 0,
drawCallNumber: 0,
meshNumber: queue.length,
renderedMeshNumber: 0
};
mat4.copy(matrices.VIEW, camera.viewMatrix._array);
mat4.copy(matrices.PROJECTION, camera.projectionMatrix._array);
mat4.multiply(matrices.VIEWPROJECTION, camera.projectionMatrix._array, matrices.VIEW);
mat4.copy(matrices.VIEWINVERSE, camera.worldTransform._array);
mat4.invert(matrices.PROJECTIONINVERSE, matrices.PROJECTION);
mat4.invert(matrices.VIEWPROJECTIONINVERSE, matrices.VIEWPROJECTION);
var _gl = this.gl;
var scene = this._sceneRendering;
var prevMaterial;
var prevShader;
var depthTest, depthMask;
var culling, cullFace, frontFace;
var culledRenderQueue;
if (preZ) {
var preZPassMaterial = new Material({ shader: shaderLibrary.get('buildin.prez') });
var preZPassShader = preZPassMaterial.shader;
culledRenderQueue = [];
preZPassShader.bind(_gl);
_gl.colorMask(false, false, false, false);
_gl.depthMask(true);
for (var i = 0; i < queue.length; i++) {
var renderable = queue[i];
var worldM = renderable.worldTransform._array;
var geometry = renderable.geometry;
mat4.multiply(matrices.WORLDVIEW, matrices.VIEW, worldM);
mat4.multiply(matrices.WORLDVIEWPROJECTION, matrices.VIEWPROJECTION, worldM);
if (geometry.boundingBox) {
if (!this._frustumCulling(renderable, camera)) {
continue;
}
}
if (renderable.skeleton) {
continue;
}
if (renderable.cullFace !== cullFace) {
cullFace = renderable.cullFace;
_gl.cullFace(cullFace);
}
if (renderable.frontFace !== frontFace) {
frontFace = renderable.frontFace;
_gl.frontFace(frontFace);
}
if (renderable.culling !== culling) {
culling = renderable.culling;
culling ? _gl.enable(_gl.CULL_FACE) : _gl.disable(_gl.CULL_FACE);
}
var semanticInfo = preZPassShader.matrixSemantics.WORLDVIEWPROJECTION;
preZPassShader.setUniform(_gl, semanticInfo.type, semanticInfo.symbol, matrices.WORLDVIEWPROJECTION);
renderable.render(_gl, preZPassMaterial);
culledRenderQueue.push(renderable);
}
_gl.depthFunc(_gl.LEQUAL);
_gl.colorMask(true, true, true, true);
_gl.depthMask(false);
} else {
culledRenderQueue = queue;
}
for (var i = 0; i < culledRenderQueue.length; i++) {
var renderable = culledRenderQueue[i];
var material = globalMaterial || renderable.material;
var shader = material.shader;
var geometry = renderable.geometry;
var worldM = renderable.worldTransform._array;
mat4.copy(matrices.WORLD, worldM);
mat4.multiply(matrices.WORLDVIEW, matrices.VIEW, worldM);
mat4.multiply(matrices.WORLDVIEWPROJECTION, matrices.VIEWPROJECTION, worldM);
if (shader.matrixSemantics.WORLDINVERSE || shader.matrixSemantics.WORLDINVERSETRANSPOSE) {
mat4.invert(matrices.WORLDINVERSE, worldM);
}
if (shader.matrixSemantics.WORLDVIEWINVERSE || shader.matrixSemantics.WORLDVIEWINVERSETRANSPOSE) {
mat4.invert(matrices.WORLDVIEWINVERSE, matrices.WORLDVIEW);
}
if (shader.matrixSemantics.WORLDVIEWPROJECTIONINVERSE || shader.matrixSemantics.WORLDVIEWPROJECTIONINVERSETRANSPOSE) {
mat4.invert(matrices.WORLDVIEWPROJECTIONINVERSE, matrices.WORLDVIEWPROJECTION);
}
if (geometry.boundingBox && !preZ) {
if (!this._frustumCulling(renderable, camera)) {
continue;
}
}
if (prevShader !== shader) {
if (scene && scene.isShaderLightNumberChanged(shader)) {
scene.setShaderLightNumber(shader);
}
var errMsg = shader.bind(_gl);
if (errMsg) {
if (errorShader[shader.__GUID__]) {
continue;
}
errorShader[shader.__GUID__] = true;
if (this.throwError) {
throw new Error(errMsg);
} else {
this.trigger('error', errMsg);
}
}
if (scene) {
scene.setLightUniforms(shader, _gl);
}
prevShader = shader;
}
if (prevMaterial !== material) {
if (!preZ) {
if (material.depthTest !== depthTest) {
material.depthTest ? _gl.enable(_gl.DEPTH_TEST) : _gl.disable(_gl.DEPTH_TEST);
depthTest = material.depthTest;
}
if (material.depthMask !== depthMask) {
_gl.depthMask(material.depthMask);
depthMask = material.depthMask;
}
}
material.bind(_gl, prevMaterial);
prevMaterial = material;
if (material.transparent) {
if (material.blend) {
material.blend(_gl);
} else {
_gl.blendEquationSeparate(_gl.FUNC_ADD, _gl.FUNC_ADD);
_gl.blendFuncSeparate(_gl.SRC_ALPHA, _gl.ONE_MINUS_SRC_ALPHA, _gl.ONE, _gl.ONE_MINUS_SRC_ALPHA);
}
}
}
var matrixSemanticKeys = shader.matrixSemanticKeys;
for (var k = 0; k < matrixSemanticKeys.length; k++) {
var semantic = matrixSemanticKeys[k];
var semanticInfo = shader.matrixSemantics[semantic];
var matrix = matrices[semantic];
if (semanticInfo.isTranspose) {
var matrixNoTranspose = matrices[semanticInfo.semanticNoTranspose];
mat4.transpose(matrix, matrixNoTranspose);
}
shader.setUniform(_gl, semanticInfo.type, semanticInfo.symbol, matrix);
}
if (renderable.cullFace !== cullFace) {
cullFace = renderable.cullFace;
_gl.cullFace(cullFace);
}
if (renderable.frontFace !== frontFace) {
frontFace = renderable.frontFace;
_gl.frontFace(frontFace);
}
if (renderable.culling !== culling) {
culling = renderable.culling;
culling ? _gl.enable(_gl.CULL_FACE) : _gl.disable(_gl.CULL_FACE);
}
var objectRenderInfo = renderable.render(_gl, globalMaterial);
if (objectRenderInfo) {
renderInfo.faceNumber += objectRenderInfo.faceNumber;
renderInfo.vertexNumber += objectRenderInfo.vertexNumber;
renderInfo.drawCallNumber += objectRenderInfo.drawCallNumber;
renderInfo.renderedMeshNumber++;
}
}
return renderInfo;
},
_frustumCulling: function () {
var cullingBoundingBox = new BoundingBox();
var cullingMatrix = new Matrix4();
return function (renderable, camera) {
var geoBBox = renderable.geometry.boundingBox;
cullingMatrix._array = matrices.WORLDVIEW;
cullingBoundingBox.copy(geoBBox);
cullingBoundingBox.applyTransform(cullingMatrix);
if (renderable.castShadow) {
camera.sceneBoundingBoxLastFrame.union(cullingBoundingBox);
}
if (renderable.frustumCulling) {
if (!cullingBoundingBox.intersectBoundingBox(camera.frustum.boundingBox)) {
return false;
}
cullingMatrix._array = matrices.PROJECTION;
if (cullingBoundingBox.max._array[2] > 0 && cullingBoundingBox.min._array[2] < 0) {
cullingBoundingBox.max._array[2] = -1e-20;
}
cullingBoundingBox.applyProjection(cullingMatrix);
var min = cullingBoundingBox.min._array;
var max = cullingBoundingBox.max._array;
if (max[0] < -1 || min[0] > 1 || max[1] < -1 || min[1] > 1 || max[2] < -1 || min[2] > 1) {
return false;
}
}
return true;
};
}(),
disposeScene: function (scene) {
this.disposeNode(scene, true, true);
scene.dispose();
},
disposeNode: function (root, disposeGeometry, disposeTexture) {
var materials = {};
var _gl = this.gl;
if (root.getParent()) {
root.getParent().remove(root);
}
root.traverse(function (node) {
if (node.geometry && disposeGeometry) {
node.geometry.dispose(_gl);
}
if (node.material) {
materials[node.material.__GUID__] = node.material;
}
if (node.dispose) {
node.dispose(_gl);
}
});
for (var guid in materials) {
var mat = materials[guid];
mat.dispose(_gl, disposeTexture);
}
},
disposeShader: function (shader) {
shader.dispose(this.gl);
},
disposeGeometry: function (geometry) {
geometry.dispose(this.gl);
},
disposeTexture: function (texture) {
texture.dispose(this.gl);
},
disposeFrameBuffer: function (frameBuffer) {
frameBuffer.dispose(this.gl);
},
dispose: function () {
glinfo.dispose(this.gl);
},
screenToNdc: function (x, y, out) {
if (!out) {
out = new Vector2();
}
y = this.height - y;
var viewport = this.viewport;
var dpr = this.devicePixelRatio;
var arr = out._array;
arr[0] = (x - viewport.x) / viewport.width;
arr[0] = arr[0] * 2 - 1;
arr[1] = (y - viewport.y) / viewport.height;
arr[1] = arr[1] * 2 - 1;
return out;
}
});
Renderer.opaqueSortFunc = function (x, y) {
if (x.material.shader === y.material.shader) {
if (x.material === y.material) {
return x.geometry.__GUID__ - y.geometry.__GUID__;
}
return x.material.__GUID__ - y.material.__GUID__;
}
return x.material.shader.__GUID__ - y.material.shader.__GUID__;
};
Renderer.transparentSortFunc = function (x, y) {
if (x.__depth === y.__depth) {
if (x.material.shader === y.material.shader) {
if (x.material === y.material) {
return x.geometry.__GUID__ - y.geometry.__GUID__;
}
return x.material.__GUID__ - y.material.__GUID__;
}
return x.material.shader.__GUID__ - y.material.shader.__GUID__;
}
return x.__depth - y.__depth;
};
var matrices = {
WORLD: mat4.create(),
VIEW: mat4.create(),
PROJECTION: mat4.create(),
WORLDVIEW: mat4.create(),
VIEWPROJECTION: mat4.create(),
WORLDVIEWPROJECTION: mat4.create(),
WORLDINVERSE: mat4.create(),
VIEWINVERSE: mat4.create(),
PROJECTIONINVERSE: mat4.create(),
WORLDVIEWINVERSE: mat4.create(),
VIEWPROJECTIONINVERSE: mat4.create(),
WORLDVIEWPROJECTIONINVERSE: mat4.create(),
WORLDTRANSPOSE: mat4.create(),
VIEWTRANSPOSE: mat4.create(),
PROJECTIONTRANSPOSE: mat4.create(),
WORLDVIEWTRANSPOSE: mat4.create(),
VIEWPROJECTIONTRANSPOSE: mat4.create(),
WORLDVIEWPROJECTIONTRANSPOSE: mat4.create(),
WORLDINVERSETRANSPOSE: mat4.create(),
VIEWINVERSETRANSPOSE: mat4.create(),
PROJECTIONINVERSETRANSPOSE: mat4.create(),
WORLDVIEWINVERSETRANSPOSE: mat4.create(),
VIEWPROJECTIONINVERSETRANSPOSE: mat4.create(),
WORLDVIEWPROJECTIONINVERSETRANSPOSE: mat4.create()
};
Renderer.COLOR_BUFFER_BIT = glenum.COLOR_BUFFER_BIT;
Renderer.DEPTH_BUFFER_BIT = glenum.DEPTH_BUFFER_BIT;
Renderer.STENCIL_BUFFER_BIT = glenum.STENCIL_BUFFER_BIT;
return Renderer;
});define('qtek/Scene', [
'require',
'./Node',
'./Light'
], function (require) {
'use strict';
var Node = require('./Node');
var Light = require('./Light');
var Scene = Node.derive(function () {
return {
material: null,
autoUpdate: true,
opaqueQueue: [],
transparentQueue: [],
lights: [],
_lightUniforms: {},
_lightNumber: {
'POINT_LIGHT': 0,
'DIRECTIONAL_LIGHT': 0,
'SPOT_LIGHT': 0,
'AMBIENT_LIGHT': 0
},
_opaqueObjectCount: 0,
_transparentObjectCount: 0,
_nodeRepository: {}
};
}, function () {
this._scene = this;
}, {
addToScene: function (node) {
if (node.name) {
this._nodeRepository[node.name] = node;
}
},
removeFromScene: function (node) {
if (node.name) {
delete this._nodeRepository[node.name];
}
},
getNode: function (name) {
return this._nodeRepository[name];
},
cloneNode: function (node) {
var newNode = node.clone();
var materialsMap = {};
var cloneSkeleton = function (current, currentNew) {
if (current.skeleton) {
currentNew.skeleton = current.skeleton.clone(node, newNode);
currentNew.joints = current.joints.slice();
}
if (current.material) {
materialsMap[current.material.__GUID__] = { oldMat: current.material };
}
for (var i = 0; i < current._children.length; i++) {
cloneSkeleton(current._children[i], currentNew._children[i]);
}
};
cloneSkeleton(node, newNode);
for (var guid in materialsMap) {
materialsMap[guid].newMat = materialsMap[guid].oldMat.clone();
}
newNode.traverse(function (current) {
if (current.material) {
current.material = materialsMap[current.material.__GUID__].newMat;
}
});
return newNode;
},
update: function (force) {
if (!(this.autoUpdate || force)) {
return;
}
Node.prototype.update.call(this, force);
var lights = this.lights;
var sceneMaterialTransparent = this.material && this.material.transparent;
this._opaqueObjectCount = 0;
this._transparentObjectCount = 0;
lights.length = 0;
this._updateRenderQueue(this, sceneMaterialTransparent);
this.opaqueQueue.length = this._opaqueObjectCount;
this.transparentQueue.length = this._transparentObjectCount;
for (var type in this._lightNumber) {
this._lightNumber[type] = 0;
}
for (var i = 0; i < lights.length; i++) {
var light = lights[i];
this._lightNumber[light.type]++;
}
this._updateLightUniforms();
},
_updateRenderQueue: function (parent, sceneMaterialTransparent) {
if (!parent.visible) {
return;
}
for (var i = 0; i < parent._children.length; i++) {
var child = parent._children[i];
if (child instanceof Light) {
this.lights.push(child);
}
if (child.isRenderable()) {
if (child.material.transparent || sceneMaterialTransparent) {
this.transparentQueue[this._transparentObjectCount++] = child;
} else {
this.opaqueQueue[this._opaqueObjectCount++] = child;
}
}
if (child._children.length > 0) {
this._updateRenderQueue(child);
}
}
},
_updateLightUniforms: function () {
var lights = this.lights;
lights.sort(lightSortFunc);
var lightUniforms = this._lightUniforms;
for (var symbol in lightUniforms) {
lightUniforms[symbol].value.length = 0;
}
for (var i = 0; i < lights.length; i++) {
var light = lights[i];
for (symbol in light.uniformTemplates) {
var uniformTpl = light.uniformTemplates[symbol];
if (!lightUniforms[symbol]) {
lightUniforms[symbol] = {
type: '',
value: []
};
}
var value = uniformTpl.value(light);
var lu = lightUniforms[symbol];
lu.type = uniformTpl.type + 'v';
switch (uniformTpl.type) {
case '1i':
case '1f':
lu.value.push(value);
break;
case '2f':
case '3f':
case '4f':
for (var j = 0; j < value.length; j++) {
lu.value.push(value[j]);
}
break;
default:
console.error('Unkown light uniform type ' + uniformTpl.type);
}
}
}
},
isShaderLightNumberChanged: function (shader) {
return shader.lightNumber.POINT_LIGHT !== this._lightNumber.POINT_LIGHT || shader.lightNumber.DIRECTIONAL_LIGHT !== this._lightNumber.DIRECTIONAL_LIGHT || shader.lightNumber.SPOT_LIGHT !== this._lightNumber.SPOT_LIGHT || shader.lightNumber.AMBIENT_LIGHT !== this._lightNumber.AMBIENT_LIGHT;
},
setShaderLightNumber: function (shader) {
for (var type in this._lightNumber) {
shader.lightNumber[type] = this._lightNumber[type];
}
shader.dirty();
},
setLightUniforms: function (shader, _gl) {
for (var symbol in this._lightUniforms) {
var lu = this._lightUniforms[symbol];
shader.setUniform(_gl, lu.type, symbol, lu.value);
}
},
dispose: function () {
this.material = null;
this.opaqueQueue = [];
this.transparentQueue = [];
this.lights = [];
this._lightUniforms = {};
this._lightNumber = {};
this._nodeRepository = {};
}
});
function lightSortFunc(a, b) {
if (b.castShadow && !a.castShadow) {
return true;
}
}
return Scene;
});define('qtek/camera/Perspective', [
'require',
'../Camera'
], function (require) {
'use strict';
var Camera = require('../Camera');
var Perspective = Camera.derive({
fov: 50,
aspect: 1,
near: 0.1,
far: 2000
}, {
updateProjectionMatrix: function () {
var rad = this.fov / 180 * Math.PI;
this.projectionMatrix.perspective(rad, this.aspect, this.near, this.far);
},
clone: function () {
var camera = Camera.prototype.clone.call(this);
camera.fov = this.fov;
camera.aspect = this.aspect;
camera.near = this.near;
camera.far = this.far;
return camera;
}
});
return Perspective;
});define('qtek/camera/Orthographic', [
'require',
'../Camera'
], function (require) {
'use strict';
var Camera = require('../Camera');
var Orthographic = Camera.derive({
left: -1,
right: 1,
near: -1,
far: 1,
top: 1,
bottom: -1
}, {
updateProjectionMatrix: function () {
this.projectionMatrix.ortho(this.left, this.right, this.bottom, this.top, this.near, this.far);
},
clone: function () {
var camera = Camera.prototype.clone.call(this);
camera.left = this.left;
camera.right = this.right;
camera.near = this.near;
camera.far = this.far;
camera.top = this.top;
camera.bottom = this.bottom;
return camera;
}
});
return Orthographic;
});define('qtek/picking/RayPicking', [
'require',
'../core/Base',
'../math/Ray',
'../math/Vector2',
'../math/Vector3',
'../math/Matrix4',
'../Renderable',
'../StaticGeometry',
'../core/glenum'
], function (require) {
var Base = require('../core/Base');
var Ray = require('../math/Ray');
var Vector2 = require('../math/Vector2');
var Vector3 = require('../math/Vector3');
var Matrix4 = require('../math/Matrix4');
var Renderable = require('../Renderable');
var StaticGeometry = require('../StaticGeometry');
var glenum = require('../core/glenum');
var RayPicking = Base.derive({
scene: null,
camera: null,
renderer: null
}, function () {
this._ray = new Ray();
this._ndc = new Vector2();
}, {
pick: function (x, y) {
var out = this.pickAll(x, y);
return out[0] || null;
},
pickAll: function (x, y) {
this.renderer.screenToNdc(x, y, this._ndc);
this.camera.castRay(this._ndc, this._ray);
var output = [];
this._intersectNode(this.scene, output);
output.sort(this._intersectionCompareFunc);
return output;
},
_intersectNode: function (node, out) {
if (node instanceof Renderable && node.isRenderable()) {
if (!node.ignorePicking && node.geometry.isUseFace()) {
this._intersectRenderable(node, out);
}
}
for (var i = 0; i < node._children.length; i++) {
this._intersectNode(node._children[i], out);
}
},
_intersectRenderable: function () {
var v1 = new Vector3();
var v2 = new Vector3();
var v3 = new Vector3();
var ray = new Ray();
var worldInverse = new Matrix4();
return function (renderable, out) {
ray.copy(this._ray);
Matrix4.invert(worldInverse, renderable.worldTransform);
ray.applyTransform(worldInverse);
var geometry = renderable.geometry;
if (geometry.boundingBox) {
if (!ray.intersectBoundingBox(geometry.boundingBox)) {
return false;
}
}
var isStatic = geometry instanceof StaticGeometry;
var cullBack = renderable.cullFace === glenum.BACK && renderable.frontFace === glenum.CCW || renderable.cullFace === glenum.FRONT && renderable.frontFace === glenum.CW;
var point;
if (isStatic) {
var faces = geometry.faces;
var positions = geometry.attributes.position.value;
for (var i = 0; i < faces.length;) {
var i1 = faces[i++] * 3;
var i2 = faces[i++] * 3;
var i3 = faces[i++] * 3;
v1._array[0] = positions[i1];
v1._array[1] = positions[i1 + 1];
v1._array[2] = positions[i1 + 2];
v2._array[0] = positions[i2];
v2._array[1] = positions[i2 + 1];
v2._array[2] = positions[i2 + 2];
v3._array[0] = positions[i3];
v3._array[1] = positions[i3 + 1];
v3._array[2] = positions[i3 + 2];
if (cullBack) {
point = ray.intersectTriangle(v1, v2, v3, renderable.culling);
} else {
point = ray.intersectTriangle(v1, v3, v2, renderable.culling);
}
if (point) {
var pointW = new Vector3();
Vector3.transformMat4(pointW, point, renderable.worldTransform);
out.push(new RayPicking.Intersection(point, pointW, renderable, [
i1,
i2,
i3
], Vector3.dist(pointW, this._ray.origin)));
}
}
} else {
var faces = geometry.faces;
var positions = geometry.attributes.position.value;
for (var i = 0; i < faces.length; i++) {
var face = faces[i];
var i1 = face[0];
var i2 = face[1];
var i3 = face[2];
v1.setArray(positions[i1]);
v2.setArray(positions[i2]);
v3.setArray(positions[i3]);
if (cullBack) {
point = ray.intersectTriangle(v1, v2, v3, renderable.culling);
} else {
point = ray.intersectTriangle(v1, v3, v2, renderable.culling);
}
if (point) {
var pointW = new Vector3();
Vector3.transformMat4(pointW, point, renderable.worldTransform);
out.push(new RayPicking.Intersection(point, pointW, renderable, [
i1,
i2,
i3
], Vector3.dist(pointW, this._ray.origin)));
}
}
}
};
}(),
_intersectionCompareFunc: function (a, b) {
return a.distance - b.distance;
}
});
RayPicking.Intersection = function (point, pointWorld, target, face, distance) {
this.point = point;
this.pointWorld = pointWorld;
this.target = target;
this.face = face;
this.distance = distance;
};
return RayPicking;
});define('qtek/shader/library', [
'require',
'../Shader',
'../core/util'
], function (require) {
var Shader = require('../Shader');
var util = require('../core/util');
var _library = {};
function ShaderLibrary() {
this._pool = {};
}
ShaderLibrary.prototype.get = function (name, option) {
var enabledTextures = [];
var vertexDefines = {};
var fragmentDefines = {};
if (typeof option === 'string') {
enabledTextures = Array.prototype.slice.call(arguments, 1);
} else if (Object.prototype.toString.call(option) == '[object Object]') {
enabledTextures = option.textures || [];
vertexDefines = option.vertexDefines || {};
fragmentDefines = option.fragmentDefines || {};
} else if (option instanceof Array) {
enabledTextures = option;
}
var vertexDefineKeys = Object.keys(vertexDefines);
var fragmentDefineKeys = Object.keys(fragmentDefines);
enabledTextures.sort();
vertexDefineKeys.sort();
fragmentDefineKeys.sort();
var keyArr = [name];
keyArr = keyArr.concat(enabledTextures);
for (var i = 0; i < vertexDefineKeys.length; i++) {
keyArr.push(vertexDefines[vertexDefineKeys[i]]);
}
for (var i = 0; i < fragmentDefineKeys.length; i++) {
keyArr.push(fragmentDefines[fragmentDefineKeys[i]]);
}
var key = keyArr.join('_');
if (this._pool[key]) {
return this._pool[key];
} else {
var source = _library[name];
if (!source) {
console.error('Shader "' + name + '"' + ' is not in the library');
return;
}
var shader = new Shader({
'vertex': source.vertex,
'fragment': source.fragment
});
for (var i = 0; i < enabledTextures.length; i++) {
shader.enableTexture(enabledTextures[i]);
}
for (var name in vertexDefines) {
shader.define('vertex', name, vertexDefines[name]);
}
for (var name in fragmentDefines) {
shader.define('fragment', name, fragmentDefines[name]);
}
this._pool[key] = shader;
return shader;
}
};
ShaderLibrary.prototype.clear = function () {
this._pool = {};
};
function template(name, vertex, fragment) {
_library[name] = {
vertex: vertex,
fragment: fragment
};
}
var defaultLibrary = new ShaderLibrary();
return {
createLibrary: function () {
return new ShaderLibrary();
},
get: function () {
return defaultLibrary.get.apply(defaultLibrary, arguments);
},
template: template,
clear: function () {
return defaultLibrary.clear();
}
};
});define('qtek/math/Vector2', [
'require',
'../dep/glmatrix'
], function (require) {
'use strict';
var glMatrix = require('../dep/glmatrix');
var vec2 = glMatrix.vec2;
var Vector2 = function (x, y) {
x = x || 0;
y = y || 0;
this._array = vec2.fromValues(x, y);
this._dirty = true;
};
Vector2.prototype = {
constructor: Vector2,
add: function (b) {
vec2.add(this._array, this._array, b._array);
this._dirty = true;
return this;
},
set: function (x, y) {
this._array[0] = x;
this._array[1] = y;
this._dirty = true;
return this;
},
setArray: function (arr) {
this._array[0] = arr[0];
this._array[1] = arr[1];
this._dirty = true;
return this;
},
clone: function () {
return new Vector2(this.x, this.y);
},
copy: function (b) {
vec2.copy(this._array, b._array);
this._dirty = true;
return this;
},
cross: function (out, b) {
vec2.cross(out._array, this._array, b._array);
out._dirty = true;
return this;
},
dist: function (b) {
return vec2.dist(this._array, b._array);
},
distance: function (b) {
return vec2.distance(this._array, b._array);
},
div: function (b) {
vec2.div(this._array, this._array, b._array);
this._dirty = true;
return this;
},
divide: function (b) {
vec2.divide(this._array, this._array, b._array);
this._dirty = true;
return this;
},
dot: function (b) {
return vec2.dot(this._array, b._array);
},
len: function () {
return vec2.len(this._array);
},
length: function () {
return vec2.length(this._array);
},
lerp: function (a, b, t) {
vec2.lerp(this._array, a._array, b._array, t);
this._dirty = true;
return this;
},
min: function (b) {
vec2.min(this._array, this._array, b._array);
this._dirty = true;
return this;
},
max: function (b) {
vec2.max(this._array, this._array, b._array);
this._dirty = true;
return this;
},
mul: function (b) {
vec2.mul(this._array, this._array, b._array);
this._dirty = true;
return this;
},
multiply: function (b) {
vec2.multiply(this._array, this._array, b._array);
this._dirty = true;
return this;
},
negate: function () {
vec2.negate(this._array, this._array);
this._dirty = true;
return this;
},
normalize: function () {
vec2.normalize(this._array, this._array);
this._dirty = true;
return this;
},
random: function (scale) {
vec2.random(this._array, scale);
this._dirty = true;
return this;
},
scale: function (s) {
vec2.scale(this._array, this._array, s);
this._dirty = true;
return this;
},
scaleAndAdd: function (b, s) {
vec2.scaleAndAdd(this._array, this._array, b._array, s);
this._dirty = true;
return this;
},
sqrDist: function (b) {
return vec2.sqrDist(this._array, b._array);
},
squaredDistance: function (b) {
return vec2.squaredDistance(this._array, b._array);
},
sqrLen: function () {
return vec2.sqrLen(this._array);
},
squaredLength: function () {
return vec2.squaredLength(this._array);
},
sub: function (b) {
vec2.sub(this._array, this._array, b._array);
this._dirty = true;
return this;
},
subtract: function (b) {
vec2.subtract(this._array, this._array, b._array);
this._dirty = true;
return this;
},
transformMat2: function (m) {
vec2.transformMat2(this._array, this._array, m._array);
this._dirty = true;
return this;
},
transformMat2d: function (m) {
vec2.transformMat2d(this._array, this._array, m._array);
this._dirty = true;
return this;
},
transformMat3: function (m) {
vec2.transformMat3(this._array, this._array, m._array);
this._dirty = true;
return this;
},
transformMat4: function (m) {
vec2.transformMat4(this._array, this._array, m._array);
this._dirty = true;
return this;
},
toString: function () {
return '[' + Array.prototype.join.call(this._array, ',') + ']';
}
};
if (Object.defineProperty) {
var proto = Vector2.prototype;
Object.defineProperty(proto, 'x', {
get: function () {
return this._array[0];
},
set: function (value) {
this._array[0] = value;
this._dirty = true;
}
});
Object.defineProperty(proto, 'y', {
get: function () {
return this._array[1];
},
set: function (value) {
this._array[1] = value;
this._dirty = true;
}
});
}
Vector2.add = function (out, a, b) {
vec2.add(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.set = function (out, x, y) {
vec2.set(out._array, x, y);
out._dirty = true;
return out;
};
Vector2.copy = function (out, b) {
vec2.copy(out._array, b._array);
out._dirty = true;
return out;
};
Vector2.cross = function (out, a, b) {
vec2.cross(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.dist = function (a, b) {
return vec2.distance(a._array, b._array);
};
Vector2.distance = Vector2.dist;
Vector2.div = function (out, a, b) {
vec2.divide(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.divide = Vector2.div;
Vector2.dot = function (a, b) {
return vec2.dot(a._array, b._array);
};
Vector2.len = function (b) {
return vec2.length(b._array);
};
Vector2.lerp = function (out, a, b, t) {
vec2.lerp(out._array, a._array, b._array, t);
out._dirty = true;
return out;
};
Vector2.min = function (out, a, b) {
vec2.min(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.max = function (out, a, b) {
vec2.max(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.mul = function (out, a, b) {
vec2.multiply(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.multiply = Vector2.mul;
Vector2.negate = function (out, a) {
vec2.negate(out._array, a._array);
out._dirty = true;
return out;
};
Vector2.normalize = function (out, a) {
vec2.normalize(out._array, a._array);
out._dirty = true;
return out;
};
Vector2.random = function (out, scale) {
vec2.random(out._array, scale);
out._dirty = true;
return out;
};
Vector2.scale = function (out, a, scale) {
vec2.scale(out._array, a._array, scale);
out._dirty = true;
return out;
};
Vector2.scaleAndAdd = function (out, a, b, scale) {
vec2.scaleAndAdd(out._array, a._array, b._array, scale);
out._dirty = true;
return out;
};
Vector2.sqrDist = function (a, b) {
return vec2.sqrDist(a._array, b._array);
};
Vector2.squaredDistance = Vector2.sqrDist;
Vector2.sqrLen = function (a) {
return vec2.sqrLen(a._array);
};
Vector2.squaredLength = Vector2.sqrLen;
Vector2.sub = function (out, a, b) {
vec2.subtract(out._array, a._array, b._array);
out._dirty = true;
return out;
};
Vector2.subtract = Vector2.sub;
Vector2.transformMat2 = function (out, a, m) {
vec2.transformMat2(out._array, a._array, m._array);
out._dirty = true;
return out;
};
Vector2.transformMat2d = function (out, a, m) {
vec2.transformMat2d(out._array, a._array, m._array);
out._dirty = true;
return out;
};
Vector2.transformMat3 = function (out, a, m) {
vec2.transformMat3(out._array, a._array, m._array);
out._dirty = true;
return out;
};
Vector2.transformMat4 = function (out, a, m) {
vec2.transformMat4(out._array, a._array, m._array);
out._dirty = true;
return out;
};
return Vector2;
});define('qtek/Light', [
'require',
'./Node',
'./Shader',
'./light/light.essl'
], function (require) {
'use strict';
var Node = require('./Node');
var Shader = require('./Shader');
var Light = Node.derive(function () {
return {
color: [
1,
1,
1
],
intensity: 1,
castShadow: true,
shadowResolution: 512
};
}, {
type: '',
clone: function () {
var light = Node.prototype.clone.call(this);
light.color = Array.prototype.slice.call(this.color);
light.intensity = this.intensity;
light.castShadow = this.castShadow;
light.shadowResolution = this.shadowResolution;
return light;
}
});
Shader['import'](require('./light/light.essl'));
return Light;
});;
define('qtek/light/light.essl', function() { return '@export buildin.header.directional_light\nuniform vec3 directionalLightDirection[ DIRECTIONAL_LIGHT_NUMBER ] : unconfigurable;\nuniform vec3 directionalLightColor[ DIRECTIONAL_LIGHT_NUMBER ] : unconfigurable;\n@end\n\n@export buildin.header.ambient_light\nuniform vec3 ambientLightColor[ AMBIENT_LIGHT_NUMBER ] : unconfigurable;\n@end\n\n@export buildin.header.point_light\nuniform vec3 pointLightPosition[ POINT_LIGHT_NUMBER ] : unconfigurable;\nuniform float pointLightRange[ POINT_LIGHT_NUMBER ] : unconfigurable;\nuniform vec3 pointLightColor[ POINT_LIGHT_NUMBER ] : unconfigurable;\n@end\n\n@export buildin.header.spot_light\nuniform vec3 spotLightPosition[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform vec3 spotLightDirection[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform float spotLightRange[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform float spotLightUmbraAngleCosine[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform float spotLightPenumbraAngleCosine[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform float spotLightFalloffFactor[SPOT_LIGHT_NUMBER] : unconfigurable;\nuniform vec3 spotLightColor[SPOT_LIGHT_NUMBER] : unconfigurable;\n@end'});
define('qtek/Camera', [
'require',
'./Node',
'./math/Matrix4',
'./math/Frustum',
'./math/BoundingBox',
'./math/Ray',
'./dep/glmatrix'
], function (require) {
'use strict';
var Node = require('./Node');
var Matrix4 = require('./math/Matrix4');
var Frustum = require('./math/Frustum');
var BoundingBox = require('./math/BoundingBox');
var Ray = require('./math/Ray');
var glMatrix = require('./dep/glmatrix');
var mat4 = glMatrix.mat4;
var vec3 = glMatrix.vec3;
var vec4 = glMatrix.vec4;
var Camera = Node.derive(function () {
return {
projectionMatrix: new Matrix4(),
invProjectionMatrix: new Matrix4(),
viewMatrix: new Matrix4(),
frustum: new Frustum(),
sceneBoundingBoxLastFrame: new BoundingBox()
};
}, function () {
this.update(true);
}, {
update: function (force) {
Node.prototype.update.call(this, force);
mat4.invert(this.viewMatrix._array, this.worldTransform._array);
this.updateProjectionMatrix();
mat4.invert(this.invProjectionMatrix._array, this.projectionMatrix._array);
this.frustum.setFromProjection(this.projectionMatrix);
},
updateProjectionMatrix: function () {
},
castRay: function () {
var v4 = vec4.create();
return function (ndc, out) {
var ray = out !== undefined ? out : new Ray();
var x = ndc._array[0];
var y = ndc._array[1];
vec4.set(v4, x, y, -1, 1);
vec4.transformMat4(v4, v4, this.invProjectionMatrix._array);
vec4.transformMat4(v4, v4, this.worldTransform._array);
vec3.scale(ray.origin._array, v4, 1 / v4[3]);
vec4.set(v4, x, y, 1, 1);
vec4.transformMat4(v4, v4, this.invProjectionMatrix._array);
vec4.transformMat4(v4, v4, this.worldTransform._array);
vec3.scale(v4, v4, 1 / v4[3]);
vec3.sub(ray.direction._array, v4, ray.origin._array);
vec3.normalize(ray.direction._array, ray.direction._array);
ray.direction._dirty = true;
ray.origin._dirty = true;
return ray;
};
}()
});
return Camera;
});define('qtek/math/Frustum', [
'require',
'./Vector3',
'./BoundingBox',
'./Plane',
'../dep/glmatrix'
], function (require) {
'use strict';
var Vector3 = require('./Vector3');
var BoundingBox = require('./BoundingBox');
var Plane = require('./Plane');
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var Frustum = function () {
this.planes = [];
for (var i = 0; i < 6; i++) {
this.planes.push(new Plane());
}
this.boundingBox = new BoundingBox();
this.vertices = [];
for (var i = 0; i < 8; i++) {
this.vertices[i] = vec3.fromValues(0, 0, 0);
}
};
Frustum.prototype = {
setFromProjection: function (projectionMatrix) {
var planes = this.planes;
var m = projectionMatrix._array;
var m0 = m[0], m1 = m[1], m2 = m[2], m3 = m[3];
var m4 = m[4], m5 = m[5], m6 = m[6], m7 = m[7];
var m8 = m[8], m9 = m[9], m10 = m[10], m11 = m[11];
var m12 = m[12], m13 = m[13], m14 = m[14], m15 = m[15];
vec3.set(planes[0].normal._array, m3 - m0, m7 - m4, m11 - m8);
planes[0].distance = -(m15 - m12);
planes[0].normalize();
vec3.set(planes[1].normal._array, m3 + m0, m7 + m4, m11 + m8);
planes[1].distance = -(m15 + m12);
planes[1].normalize();
vec3.set(planes[2].normal._array, m3 + m1, m7 + m5, m11 + m9);
planes[2].distance = -(m15 + m13);
planes[2].normalize();
vec3.set(planes[3].normal._array, m3 - m1, m7 - m5, m11 - m9);
planes[3].distance = -(m15 - m13);
planes[3].normalize();
vec3.set(planes[4].normal._array, m3 - m2, m7 - m6, m11 - m10);
planes[4].distance = -(m15 - m14);
planes[4].normalize();
vec3.set(planes[5].normal._array, m3 + m2, m7 + m6, m11 + m10);
planes[5].distance = -(m15 + m14);
planes[5].normalize();
if (m15 === 0) {
var aspect = m5 / m0;
var zNear = -m14 / (m10 - 1);
var zFar = -m14 / (m10 + 1);
var farY = -zFar / m5;
var nearY = -zNear / m5;
this.boundingBox.min.set(-farY * aspect, -farY, zFar);
this.boundingBox.max.set(farY * aspect, farY, zNear);
var vertices = this.vertices;
vec3.set(vertices[0], -farY * aspect, -farY, zFar);
vec3.set(vertices[1], -farY * aspect, farY, zFar);
vec3.set(vertices[2], farY * aspect, -farY, zFar);
vec3.set(vertices[3], farY * aspect, farY, zFar);
vec3.set(vertices[4], -nearY * aspect, -nearY, zNear);
vec3.set(vertices[5], -nearY * aspect, nearY, zNear);
vec3.set(vertices[6], nearY * aspect, -nearY, zNear);
vec3.set(vertices[7], nearY * aspect, nearY, zNear);
} else {
var left = (-1 - m12) / m0;
var right = (1 - m12) / m0;
var top = (1 - m13) / m5;
var bottom = (-1 - m13) / m5;
var near = (-1 - m14) / m10;
var far = (1 - m14) / m10;
this.boundingBox.min.set(left, bottom, far);
this.boundingBox.max.set(right, top, near);
for (var i = 0; i < 8; i++) {
vec3.copy(this.vertices[i], this.boundingBox.vertices[i]);
}
}
},
getTransformedBoundingBox: function () {
var tmpVec3 = vec3.create();
return function (bbox, matrix) {
var vertices = this.vertices;
var m4 = matrix._array;
var _min = bbox.min._array;
var _max = bbox.max._array;
var v = vertices[0];
vec3.transformMat4(tmpVec3, v, m4);
vec3.copy(_min, tmpVec3);
vec3.copy(_max, tmpVec3);
for (var i = 1; i < 8; i++) {
v = vertices[i];
vec3.transformMat4(tmpVec3, v, m4);
_min[0] = Math.min(tmpVec3[0], _min[0]);
_min[1] = Math.min(tmpVec3[1], _min[1]);
_min[2] = Math.min(tmpVec3[2], _min[2]);
_max[0] = Math.max(tmpVec3[0], _max[0]);
_max[1] = Math.max(tmpVec3[1], _max[1]);
_max[2] = Math.max(tmpVec3[2], _max[2]);
}
bbox.min._dirty = true;
bbox.max._dirty = true;
return bbox;
};
}()
};
return Frustum;
});define('qtek/math/Ray', [
'require',
'./Vector3',
'../dep/glmatrix'
], function (require) {
'use strict';
var Vector3 = require('./Vector3');
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var EPSILON = 0.00001;
var Ray = function (origin, direction) {
this.origin = origin || new Vector3();
this.direction = direction || new Vector3();
};
Ray.prototype = {
constructor: Ray,
intersectPlane: function (plane, out) {
var pn = plane.normal._array;
var d = plane.distance;
var ro = this.origin._array;
var rd = this.direction._array;
var divider = vec3.dot(pn, rd);
if (divider === 0) {
return null;
}
if (!out) {
out = new Vector3();
}
var t = (vec3.dot(pn, ro) - d) / divider;
vec3.scaleAndAdd(out._array, ro, rd, -t);
out._dirty = true;
return out;
},
mirrorAgainstPlane: function (plane) {
var d = vec3.dot(plane.normal._array, this.direction._array);
vec3.scaleAndAdd(this.direction._array, this.direction._array, plane.normal._array, -d * 2);
this.direction._dirty = true;
},
distanceToPoint: function () {
var v = vec3.create();
return function (point) {
vec3.sub(v, point, this.origin._array);
var b = vec3.dot(v, this.direction._array);
if (b < 0) {
return vec3.distance(this.origin._array, point);
}
var c2 = vec3.lenSquared(v);
return Math.sqrt(c2 - b * b);
};
}(),
intersectSphere: function () {
var v = vec3.create();
return function (center, radius, out) {
var origin = this.origin._array;
var direction = this.direction._array;
vec3.sub(v, center, origin);
var b = vec3.dot(v, direction);
var c2 = vec3.lenSquared(v);
var d2 = c2 - b * b;
var r2 = radius * radius;
if (d2 > r2) {
return;
}
var a = Math.sqrt(r2 - d2);
var t0 = b - a;
var t1 = b + a;
if (!out) {
out = new Vector3();
}
if (t0 < 0) {
if (t1 < 0) {
return null;
} else {
vec3.scaleAndAdd(out._array, origin, direction, t1);
return out;
}
} else {
vec3.scaleAndAdd(out._array, origin, direction, t0);
return out;
}
};
}(),
intersectBoundingBox: function (bbox, out) {
var dir = this.direction._array;
var origin = this.origin._array;
var min = bbox.min._array;
var max = bbox.max._array;
var invdirx = 1 / dir[0];
var invdiry = 1 / dir[1];
var invdirz = 1 / dir[2];
var tmin, tmax, tymin, tymax, tzmin, tzmax;
if (invdirx >= 0) {
tmin = (min[0] - origin[0]) * invdirx;
tmax = (max[0] - origin[0]) * invdirx;
} else {
tmax = (min[0] - origin[0]) * invdirx;
tmin = (max[0] - origin[0]) * invdirx;
}
if (invdiry >= 0) {
tymin = (min[1] - origin[1]) * invdiry;
tymax = (max[1] - origin[1]) * invdiry;
} else {
tymax = (min[1] - origin[1]) * invdiry;
tymin = (max[1] - origin[1]) * invdiry;
}
if (tmin > tymax || tymin > tmax) {
return null;
}
if (tymin > tmin || tmin !== tmin) {
tmin = tymin;
}
if (tymax < tmax || tmax !== tmax) {
tmax = tymax;
}
if (invdirz >= 0) {
tzmin = (min[2] - origin[2]) * invdirz;
tzmax = (max[2] - origin[2]) * invdirz;
} else {
tzmax = (min[2] - origin[2]) * invdirz;
tzmin = (max[2] - origin[2]) * invdirz;
}
if (tmin > tzmax || tzmin > tmax) {
return null;
}
if (tzmin > tmin || tmin !== tmin) {
tmin = tzmin;
}
if (tzmax < tmax || tmax !== tmax) {
tmax = tzmax;
}
if (tmax < 0) {
return null;
}
var t = tmin >= 0 ? tmin : tmax;
if (!out) {
out = new Vector3();
}
vec3.scaleAndAdd(out._array, origin, dir, t);
return out;
},
intersectTriangle: function () {
var eBA = vec3.create();
var eCA = vec3.create();
var AO = vec3.create();
var vCross = vec3.create();
return function (a, b, c, singleSided, out, barycenteric) {
var dir = this.direction._array;
var origin = this.origin._array;
a = a._array;
b = b._array;
c = c._array;
vec3.sub(eBA, b, a);
vec3.sub(eCA, c, a);
vec3.cross(vCross, eCA, dir);
var det = vec3.dot(eBA, vCross);
if (singleSided) {
if (det > -EPSILON) {
return null;
}
} else {
if (det > -EPSILON && det < EPSILON) {
return null;
}
}
vec3.sub(AO, origin, a);
var u = vec3.dot(vCross, AO) / det;
if (u < 0 || u > 1) {
return null;
}
vec3.cross(vCross, eBA, AO);
var v = vec3.dot(dir, vCross) / det;
if (v < 0 || v > 1 || u + v > 1) {
return null;
}
vec3.cross(vCross, eBA, eCA);
var t = -vec3.dot(AO, vCross) / det;
if (t < 0) {
return null;
}
if (!out) {
out = new Vector3();
}
if (barycenteric) {
Vector3.set(barycenteric, 1 - u - v, u, v);
}
vec3.scaleAndAdd(out._array, origin, dir, t);
return out;
};
}(),
applyTransform: function (matrix) {
Vector3.add(this.direction, this.direction, this.origin);
Vector3.transformMat4(this.origin, this.origin, matrix);
Vector3.transformMat4(this.direction, this.direction, matrix);
Vector3.sub(this.direction, this.direction, this.origin);
Vector3.normalize(this.direction, this.direction);
},
copy: function (ray) {
Vector3.copy(this.origin, ray.origin);
Vector3.copy(this.direction, ray.direction);
},
clone: function () {
var ray = new Ray();
ray.copy(this);
return ray;
}
};
return Ray;
});define('qtek/math/Plane', [
'require',
'./Vector3',
'../dep/glmatrix'
], function (require) {
'use strict';
var Vector3 = require('./Vector3');
var glMatrix = require('../dep/glmatrix');
var vec3 = glMatrix.vec3;
var mat4 = glMatrix.mat4;
var vec4 = glMatrix.vec4;
var Plane = function (normal, distance) {
this.normal = normal || new Vector3(0, 1, 0);
this.distance = distance || 0;
};
Plane.prototype = {
constructor: Plane,
distanceToPoint: function (point) {
return vec3.dot(point._array, this.normal._array) - this.distance;
},
projectPoint: function (point, out) {
if (!out) {
out = new Vector3();
}
var d = this.distanceToPoint(point);
vec3.scaleAndAdd(out._array, point._array, this.normal._array, -d);
out._dirty = true;
return out;
},
normalize: function () {
var invLen = 1 / vec3.len(this.normal._array);
vec3.scale(this.normal._array, invLen);
this.distance *= invLen;
},
intersectFrustum: function (frustum) {
var coords = frustum.vertices;
var normal = this.normal._array;
var onPlane = vec3.dot(coords[0]._array, normal) > this.distance;
for (var i = 1; i < 8; i++) {
if (vec3.dot(coords[i]._array, normal) > this.distance != onPlane) {
return true;
}
}
},
intersectLine: function () {
var rd = vec3.create();
return function (start, end, out) {
var d0 = this.distanceToPoint(start);
var d1 = this.distanceToPoint(end);
if (d0 > 0 && d1 > 0 || d0 < 0 && d1 < 0) {
return null;
}
var pn = this.normal._array;
var d = this.distance;
var ro = start._array;
vec3.sub(rd, end._array, start._array);
vec3.normalize(rd, rd);
var divider = vec3.dot(pn, rd);
if (divider === 0) {
return null;
}
if (!out) {
out = new Vector3();
}
var t = (vec3.dot(pn, ro) - d) / divider;
vec3.scaleAndAdd(out._array, ro, rd, -t);
out._dirty = true;
return out;
};
}(),
applyTransform: function () {
var inverseTranspose = mat4.create();
var normalv4 = vec4.create();
var pointv4 = vec4.create();
pointv4[3] = 1;
return function (m4) {
m4 = m4._array;
vec3.scale(pointv4, this.normal._array, this.distance);
vec4.transformMat4(pointv4, pointv4, m4);
this.distance = vec3.dot(pointv4, this.normal._array);
mat4.invert(inverseTranspose, m4);
mat4.transpose(inverseTranspose, inverseTranspose);
normalv4[3] = 0;
vec3.copy(normalv4, this.normal._array);
vec4.transformMat4(normalv4, normalv4, inverseTranspose);
vec3.copy(this.normal._array, normalv4);
};
}(),
copy: function (plane) {
vec3.copy(this.normal._array, plane.normal._array);
this.normal._dirty = true;
this.distance = plane.distance;
},
clone: function () {
var plane = new Plane();
plane.copy(this);
return plane;
}
};
return Plane;
});define('qtek/StaticGeometry', [
'require',
'./Geometry',
'./math/BoundingBox',
'./dep/glmatrix',
'./core/glenum'
], function (require) {
'use strict';
var Geometry = require('./Geometry');
var BoundingBox = require('./math/BoundingBox');
var glMatrix = require('./dep/glmatrix');
var glenum = require('./core/glenum');
var mat4 = glMatrix.mat4;
var vec3 = glMatrix.vec3;
var StaticGeometry = Geometry.derive(function () {
return {
attributes: {
position: new Geometry.Attribute('position', 'float', 3, 'POSITION', false),
texcoord0: new Geometry.Attribute('texcoord0', 'float', 2, 'TEXCOORD_0', false),
texcoord1: new Geometry.Attribute('texcoord1', 'float', 2, 'TEXCOORD_1', false),
normal: new Geometry.Attribute('normal', 'float', 3, 'NORMAL', false),
tangent: new Geometry.Attribute('tangent', 'float', 4, 'TANGENT', false),
color: new Geometry.Attribute('color', 'float', 4, 'COLOR', false),
weight: new Geometry.Attribute('weight', 'float', 3, 'WEIGHT', false),
joint: new Geometry.Attribute('joint', 'float', 4, 'JOINT', false),
barycentric: new Geometry.Attribute('barycentric', 'float', 3, null, false)
},
hint: glenum.STATIC_DRAW,
faces: null,
_normalType: 'vertex',
_enabledAttributes: null
};
}, {
dirty: function () {
this._cache.dirtyAll();
this._enabledAttributes = null;
},
getVertexNumber: function () {
var mainAttribute = this.attributes[this.mainAttribute];
if (!mainAttribute || !mainAttribute.value) {
return 0;
}
return mainAttribute.value.length / mainAttribute.size;
},
getFaceNumber: function () {
if (!this.faces) {
return 0;
} else {
return this.faces.length / 3;
}
},
getFace: function (idx, out) {
if (idx < this.getFaceNumber() && idx >= 0) {
if (!out) {
out = vec3.create();
}
out[0] = this.faces[idx * 3];
out[1] = this.faces[idx * 3 + 1];
out[2] = this.faces[idx * 3 + 2];
return out;
}
},
isUseFace: function () {
return this.useFace && this.faces != null;
},
createAttribute: function (name, type, size, semantic) {
var attrib = new Geometry.Attribute(name, type, size, semantic, false);
this.attributes[name] = attrib;
this._attributeList.push(name);
return attrib;
},
removeAttribute: function (name) {
var idx = this._attributeList.indexOf(name);
if (idx >= 0) {
this._attributeList.splice(idx, 1);
delete this.attributes[name];
return true;
}
return false;
},
getEnabledAttributes: function () {
if (this._enabledAttributes) {
return this._enabledAttributes;
}
var result = [];
var nVertex = this.getVertexNumber();
for (var i = 0; i < this._attributeList.length; i++) {
var name = this._attributeList[i];
var attrib = this.attributes[name];
if (attrib.value) {
if (attrib.value.length === nVertex * attrib.size) {
result.push(name);
}
}
}
this._enabledAttributes = result;
return result;
},
getBufferChunks: function (_gl) {
this._cache.use(_gl.__GLID__);
if (this._cache.isDirty()) {
this._updateBuffer(_gl);
this._cache.fresh();
}
return this._cache.get('chunks');
},
_updateBuffer: function (_gl) {
var chunks = this._cache.get('chunks');
var firstUpdate = false;
if (!chunks) {
chunks = [];
chunks[0] = {
attributeBuffers: [],
indicesBuffer: null
};
this._cache.put('chunks', chunks);
firstUpdate = true;
}
var chunk = chunks[0];
var attributeBuffers = chunk.attributeBuffers;
var indicesBuffer = chunk.indicesBuffer;
var attributeList = this.getEnabledAttributes();
var prevSearchIdx = 0;
var count = 0;
for (var k = 0; k < attributeList.length; k++) {
var name = attributeList[k];
var attribute = this.attributes[name];
var bufferInfo;
if (!firstUpdate) {
for (var i = prevSearchIdx; i < attributeBuffers.length; i++) {
if (attributeBuffers[i].name === name) {
bufferInfo = attributeBuffers[i];
prevSearchIdx = i + 1;
break;
}
}
if (!bufferInfo) {
for (var i = prevSearchIdx - 1; i >= 0; i--) {
if (attributeBuffers[i].name === name) {
bufferInfo = attributeBuffers[i];
prevSearchIdx = i;
break;
}
}
}
}
var buffer;
if (bufferInfo) {
buffer = bufferInfo.buffer;
} else {
buffer = _gl.createBuffer();
}
_gl.bindBuffer(_gl.ARRAY_BUFFER, buffer);
_gl.bufferData(_gl.ARRAY_BUFFER, attribute.value, this.hint);
attributeBuffers[count++] = new Geometry.AttributeBuffer(name, attribute.type, buffer, attribute.size, attribute.semantic);
}
attributeBuffers.length = count;
if (this.isUseFace()) {
if (!indicesBuffer) {
indicesBuffer = new Geometry.IndicesBuffer(_gl.createBuffer());
chunk.indicesBuffer = indicesBuffer;
}
indicesBuffer.count = this.faces.length;
_gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, indicesBuffer.buffer);
_gl.bufferData(_gl.ELEMENT_ARRAY_BUFFER, this.faces, this.hint);
}
},
generateVertexNormals: function () {
var faces = this.faces;
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
if (!normals || normals.length !== positions.length) {
normals = this.attributes.normal.value = new Float32Array(positions.length);
} else {
for (var i = 0; i < normals.length; i++) {
normals[i] = 0;
}
}
var p1 = vec3.create();
var p2 = vec3.create();
var p3 = vec3.create();
var v21 = vec3.create();
var v32 = vec3.create();
var n = vec3.create();
for (var f = 0; f < faces.length;) {
var i1 = faces[f++];
var i2 = faces[f++];
var i3 = faces[f++];
vec3.set(p1, positions[i1 * 3], positions[i1 * 3 + 1], positions[i1 * 3 + 2]);
vec3.set(p2, positions[i2 * 3], positions[i2 * 3 + 1], positions[i2 * 3 + 2]);
vec3.set(p3, positions[i3 * 3], positions[i3 * 3 + 1], positions[i3 * 3 + 2]);
vec3.sub(v21, p1, p2);
vec3.sub(v32, p2, p3);
vec3.cross(n, v21, v32);
for (var i = 0; i < 3; i++) {
normals[i1 * 3 + i] = normals[i1 * 3 + i] + n[i];
normals[i2 * 3 + i] = normals[i2 * 3 + i] + n[i];
normals[i3 * 3 + i] = normals[i3 * 3 + i] + n[i];
}
}
for (var i = 0; i < normals.length;) {
vec3.set(n, normals[i], normals[i + 1], normals[i + 2]);
vec3.normalize(n, n);
normals[i++] = n[0];
normals[i++] = n[1];
normals[i++] = n[2];
}
},
generateFaceNormals: function () {
if (!this.isUniqueVertex()) {
this.generateUniqueVertex();
}
var faces = this.faces;
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
var p1 = vec3.create();
var p2 = vec3.create();
var p3 = vec3.create();
var v21 = vec3.create();
var v32 = vec3.create();
var n = vec3.create();
if (!normals) {
normals = this.attributes.position.value = new Float32Array(positions.length);
}
for (var f = 0; f < faces.length;) {
var i1 = faces[f++];
var i2 = faces[f++];
var i3 = faces[f++];
vec3.set(p1, positions[i1 * 3], positions[i1 * 3 + 1], positions[i1 * 3 + 2]);
vec3.set(p2, positions[i2 * 3], positions[i2 * 3 + 1], positions[i2 * 3 + 2]);
vec3.set(p3, positions[i3 * 3], positions[i3 * 3 + 1], positions[i3 * 3 + 2]);
vec3.sub(v21, p1, p2);
vec3.sub(v32, p2, p3);
vec3.cross(n, v21, v32);
vec3.normalize(n, n);
for (var i = 0; i < 3; i++) {
normals[i1 * 3 + i] = n[i];
normals[i2 * 3 + i] = n[i];
normals[i3 * 3 + i] = n[i];
}
}
},
generateTangents: function () {
var nVertex = this.getVertexNumber();
if (!this.attributes.tangent.value) {
this.attributes.tangent.value = new Float32Array(nVertex * 4);
}
var texcoords = this.attributes.texcoord0.value;
var positions = this.attributes.position.value;
var tangents = this.attributes.tangent.value;
var normals = this.attributes.normal.value;
var tan1 = [];
var tan2 = [];
for (var i = 0; i < nVertex; i++) {
tan1[i] = [
0,
0,
0
];
tan2[i] = [
0,
0,
0
];
}
var sdir = [
0,
0,
0
];
var tdir = [
0,
0,
0
];
for (var i = 0; i < this.faces.length;) {
var i1 = this.faces[i++], i2 = this.faces[i++], i3 = this.faces[i++], st1s = texcoords[i1 * 2], st2s = texcoords[i2 * 2], st3s = texcoords[i3 * 2], st1t = texcoords[i1 * 2 + 1], st2t = texcoords[i2 * 2 + 1], st3t = texcoords[i3 * 2 + 1], p1x = positions[i1 * 3], p2x = positions[i2 * 3], p3x = positions[i3 * 3], p1y = positions[i1 * 3 + 1], p2y = positions[i2 * 3 + 1], p3y = positions[i3 * 3 + 1], p1z = positions[i1 * 3 + 2], p2z = positions[i2 * 3 + 2], p3z = positions[i3 * 3 + 2];
var x1 = p2x - p1x, x2 = p3x - p1x, y1 = p2y - p1y, y2 = p3y - p1y, z1 = p2z - p1z, z2 = p3z - p1z;
var s1 = st2s - st1s, s2 = st3s - st1s, t1 = st2t - st1t, t2 = st3t - st1t;
var r = 1 / (s1 * t2 - t1 * s2);
sdir[0] = (t2 * x1 - t1 * x2) * r;
sdir[1] = (t2 * y1 - t1 * y2) * r;
sdir[2] = (t2 * z1 - t1 * z2) * r;
tdir[0] = (s1 * x2 - s2 * x1) * r;
tdir[1] = (s1 * y2 - s2 * y1) * r;
tdir[2] = (s1 * z2 - s2 * z1) * r;
vec3.add(tan1[i1], tan1[i1], sdir);
vec3.add(tan1[i2], tan1[i2], sdir);
vec3.add(tan1[i3], tan1[i3], sdir);
vec3.add(tan2[i1], tan2[i1], tdir);
vec3.add(tan2[i2], tan2[i2], tdir);
vec3.add(tan2[i3], tan2[i3], tdir);
}
var tmp = vec3.create();
var nCrossT = vec3.create();
var n = vec3.create();
for (var i = 0; i < nVertex; i++) {
n[0] = normals[i * 3];
n[1] = normals[i * 3 + 1];
n[2] = normals[i * 3 + 2];
var t = tan1[i];
vec3.scale(tmp, n, vec3.dot(n, t));
vec3.sub(tmp, t, tmp);
vec3.normalize(tmp, tmp);
vec3.cross(nCrossT, n, t);
tangents[i * 4] = tmp[0];
tangents[i * 4 + 1] = tmp[1];
tangents[i * 4 + 2] = tmp[2];
tangents[i * 4 + 3] = vec3.dot(nCrossT, tan2[i]) < 0 ? -1 : 1;
}
},
isUniqueVertex: function () {
if (this.isUseFace()) {
return this.getVertexNumber() === this.faces.length;
} else {
return true;
}
},
generateUniqueVertex: function () {
var vertexUseCount = [];
for (var i = 0, len = this.getVertexNumber(); i < len; i++) {
vertexUseCount[i] = 0;
}
var cursor = this.getVertexNumber();
var attributes = this.attributes;
var faces = this.faces;
var attributeNameList = this.getEnabledAttributes();
for (var a = 0; a < attributeNameList.length; a++) {
var name = attributeNameList[a];
var expandedArray = new Float32Array(this.faces.length * attributes[name].size);
var len = attributes[name].value.length;
for (var i = 0; i < len; i++) {
expandedArray[i] = attributes[name].value[i];
}
attributes[name].value = expandedArray;
}
for (var i = 0; i < faces.length; i++) {
var ii = faces[i];
if (vertexUseCount[ii] > 0) {
for (var a = 0; a < attributeNameList.length; a++) {
var name = attributeNameList[a];
var array = attributes[name].value;
var size = attributes[name].size;
for (var k = 0; k < size; k++) {
array[cursor * size + k] = array[ii * size + k];
}
}
faces[i] = cursor;
cursor++;
}
vertexUseCount[ii]++;
}
},
generateBarycentric: function () {
if (!this.isUniqueVertex()) {
this.generateUniqueVertex();
}
var array = this.attributes.barycentric.value;
if (array && array.length === this.faces.length * 3) {
return;
}
array = this.attributes.barycentric.value = new Float32Array(this.faces.length * 3);
for (var i = 0; i < this.faces.length;) {
for (var j = 0; j < 3; j++) {
var ii = this.faces[i++];
array[ii + j] = 1;
}
}
},
convertToDynamic: function (geometry) {
for (var i = 0; i < this.faces.length; i += 3) {
geometry.faces.push(this.face.subarray(i, i + 3));
}
var attributes = this.getEnabledAttributes();
for (var name in attributes) {
var attrib = attributes[name];
var geoAttrib = geometry.attributes[name];
if (!geoAttrib) {
geoAttrib = geometry.attributes[name] = {
type: attrib.type,
size: attrib.size,
value: []
};
if (attrib.semantic) {
geoAttrib.semantic = attrib.semantic;
}
}
for (var i = 0; i < attrib.value.length; i += attrib.size) {
if (attrib.size === 1) {
geoAttrib.value.push(attrib.array[i]);
} else {
geoAttrib.value.push(attrib.subarray(i, i + attrib.size));
}
}
}
if (this.boundingBox) {
geometry.boundingBox = new BoundingBox();
geometry.boundingBox.min.copy(this.boundingBox.min);
geometry.boundingBox.max.copy(this.boundingBox.max);
}
return geometry;
},
applyTransform: function (matrix) {
if (this.boundingBox) {
this.boundingBox.applyTransform(matrix);
}
var positions = this.attributes.position.value;
var normals = this.attributes.normal.value;
var tangents = this.attributes.tangent.value;
matrix = matrix._array;
var inverseTransposeMatrix = mat4.create();
mat4.invert(inverseTransposeMatrix, matrix);
mat4.transpose(inverseTransposeMatrix, inverseTransposeMatrix);
vec3.forEach(positions, 3, 0, null, vec3.transformMat4, matrix);
if (normals) {
vec3.forEach(normals, 3, 0, null, vec3.transformMat4, inverseTransposeMatrix);
}
if (tangents) {
vec3.forEach(tangents, 4, 0, null, vec3.transformMat4, inverseTransposeMatrix);
}
},
dispose: function (_gl) {
this._cache.use(_gl.__GLID__);
var chunks = this._cache.get('chunks');
if (chunks) {
for (var c = 0; c < chunks.length; c++) {
var chunk = chunks[c];
for (var k = 0; k < chunk.attributeBuffers.length; k++) {
var attribs = chunk.attributeBuffers[k];
_gl.deleteBuffer(attribs.buffer);
}
}
}
this._cache.deleteContext(_gl.__GLID__);
}
});
return StaticGeometry;
});define('qtek/core/LinkedList', ['require'], function (require) {
'use strict';
var LinkedList = function () {
this.head = null;
this.tail = null;
this._length = 0;
};
LinkedList.prototype.insert = function (val) {
var entry = new LinkedList.Entry(val);
this.insertEntry(entry);
return entry;
};
LinkedList.prototype.insertAt = function (idx, val) {
if (idx < 0) {
return;
}
var next = this.head;
var cursor = 0;
while (next && cursor != idx) {
next = next.next;
cursor++;
}
if (next) {
var entry = new LinkedList.Entry(val);
var prev = next.prev;
prev.next = entry;
entry.prev = prev;
entry.next = next;
next.prev = entry;
} else {
this.insert(val);
}
};
LinkedList.prototype.insertEntry = function (entry) {
if (!this.head) {
this.head = this.tail = entry;
} else {
this.tail.next = entry;
entry.prev = this.tail;
this.tail = entry;
}
this._length++;
};
LinkedList.prototype.remove = function (entry) {
var prev = entry.prev;
var next = entry.next;
if (prev) {
prev.next = next;
} else {
this.head = next;
}
if (next) {
next.prev = prev;
} else {
this.tail = prev;
}
entry.next = entry.prev = null;
this._length--;
};
LinkedList.prototype.removeAt = function (idx) {
if (idx < 0) {
return;
}
var curr = this.head;
var cursor = 0;
while (curr && cursor != idx) {
curr = curr.next;
cursor++;
}
if (curr) {
this.remove(curr);
return curr.value;
}
};
LinkedList.prototype.getHead = function () {
if (this.head) {
return this.head.value;
}
};
LinkedList.prototype.getTail = function () {
if (this.tail) {
return this.tail.value;
}
};
LinkedList.prototype.getAt = function (idx) {
if (idx < 0) {
return;
}
var curr = this.head;
var cursor = 0;
while (curr && cursor != idx) {
curr = curr.next;
cursor++;
}
return curr.value;
};
LinkedList.prototype.indexOf = function (value) {
var curr = this.head;
var cursor = 0;
while (curr) {
if (curr.value === value) {
return cursor;
}
curr = curr.next;
cursor++;
}
};
LinkedList.prototype.length = function () {
return this._length;
};
LinkedList.prototype.isEmpty = function () {
return this._length === 0;
};
LinkedList.prototype.forEach = function (cb, context) {
var curr = this.head;
var idx = 0;
var haveContext = typeof context != 'undefined';
while (curr) {
if (haveContext) {
cb.call(context, curr.value, idx);
} else {
cb(curr.value, idx);
}
curr = curr.next;
idx++;
}
};
LinkedList.prototype.clear = function () {
this.tail = this.head = null;
this._length = 0;
};
LinkedList.Entry = function (val) {
this.value = val;
this.next = null;
this.prev = null;
};
return LinkedList;
});define('echarts-x/entity/marker/Base', ['require'], function (require) {
var MarkerBase = function (chart) {
this.chart = chart;
};
MarkerBase.prototype.setSeries = function (series, seriesIndex) {
};
MarkerBase.prototype.clear = function () {
};
MarkerBase.prototype.onframe = function (deltaTime) {
};
MarkerBase.prototype.getSceneNode = function () {
};
MarkerBase.prototype.dispose = function () {
var renderer = this.chart.baseLayer.renderer;
renderer.dispose(this.getSceneNode(), true, true);
};
return MarkerBase;
});define('echarts-x/util/geometry/Lines', [
'require',
'qtek/DynamicGeometry',
'qtek/Geometry',
'qtek/math/Vector3',
'qtek/dep/glmatrix'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Geometry = require('qtek/Geometry');
var Vector3 = require('qtek/math/Vector3');
var vec3 = require('qtek/dep/glmatrix').vec3;
var LinesGeometry = DynamicGeometry.derive(function () {
return {
attributes: {
position: new Geometry.Attribute('position', 'float', 3, 'POSITION', true),
color: new Geometry.Attribute('color', 'float', 4, 'COLOR', true)
}
};
}, {
clearLines: function () {
this.attributes.position.value.length = 0;
this.attributes.color.value.length = 0;
},
addLine: function (p0, p1, color) {
this.attributes.position.value.push(p0._array, p1._array);
this.attributes.color.value.push(color, color);
},
addCubicCurve: function (p0, p1, p2, p3, color) {
p0 = p0._array;
p1 = p1._array;
p2 = p2._array;
p3 = p3._array;
var x0 = p0[0], y0 = p0[1], z0 = p0[2];
var x1 = p1[0], y1 = p1[1], z1 = p1[2];
var x2 = p2[0], y2 = p2[1], z2 = p2[2];
var x3 = p3[0], y3 = p3[1], z3 = p3[2];
var len = vec3.dist(p0, p1) + vec3.len(p2, p1) + vec3.len(p3, p2);
var step = 1 / (len + 1) * 15;
var step2 = step * step;
var step3 = step2 * step;
var pre1 = 3 * step;
var pre2 = 3 * step2;
var pre4 = 6 * step2;
var pre5 = 6 * step3;
var tmp1x = x0 - x1 * 2 + x2;
var tmp1y = y0 - y1 * 2 + y2;
var tmp1z = z0 - z1 * 2 + z2;
var tmp2x = (x1 - x2) * 3 - x0 + x3;
var tmp2y = (y1 - y2) * 3 - y0 + y3;
var tmp2z = (z1 - z2) * 3 - z0 + z3;
var fx = x0;
var fy = y0;
var fz = z0;
var dfx = (x1 - x0) * pre1 + tmp1x * pre2 + tmp2x * step3;
var dfy = (y1 - y0) * pre1 + tmp1y * pre2 + tmp2y * step3;
var dfz = (z1 - z0) * pre1 + tmp1z * pre2 + tmp2z * step3;
var ddfx = tmp1x * pre4 + tmp2x * pre5;
var ddfy = tmp1y * pre4 + tmp2y * pre5;
var ddfz = tmp1z * pre4 + tmp2z * pre5;
var dddfx = tmp2x * pre5;
var dddfy = tmp2y * pre5;
var dddfz = tmp2z * pre5;
var positionArr = this.attributes.position.value;
var colorArr = this.attributes.color.value;
var offset = positionArr.length;
var len = 0;
var t = 0;
while (t < 1 + step) {
if (len > 1) {
positionArr.push(positionArr[offset + len - 1]);
colorArr.push(colorArr[offset + len - 1]);
len++;
}
positionArr.push(vec3.fromValues(fx, fy, fz));
colorArr.push(color);
len++;
fx += dfx;
fy += dfy;
fz += dfz;
dfx += ddfx;
dfy += ddfy;
dfz += ddfz;
ddfx += dddfx;
ddfy += dddfy;
ddfz += dddfz;
t += step;
}
}
});
return LinesGeometry;
});define('echarts-x/util/geometry/CurveAnimatingPoints', [
'require',
'qtek/DynamicGeometry',
'qtek/Geometry'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Geometry = require('qtek/Geometry');
var Attribute = Geometry.Attribute;
var CurveAnimatingPoints = DynamicGeometry.derive(function () {
return {
attributes: {
p0: new Attribute('p0', 'float', 3, '', true),
p1: new Attribute('p1', 'float', 3, '', true),
p2: new Attribute('p2', 'float', 3, '', true),
p3: new Attribute('p3', 'float', 3, '', true),
offset: new Attribute('offset', 'float', 1, '', true),
size: new Attribute('size', 'float', 1, '', true),
color: new Attribute('color', 'float', 4, 'COLOR', true)
},
mainAttribute: 'p0'
};
}, {
clearPoints: function () {
var attributes = this.attributes;
attributes.p0.value.length = 0;
attributes.p1.value.length = 0;
attributes.p2.value.length = 0;
attributes.p3.value.length = 0;
attributes.offset.value.length = 0;
attributes.size.value.length = 0;
attributes.color.value.length = 0;
},
addPoint: function (p0, p1, p2, p3, color) {
var attributes = this.attributes;
var offset = Math.random();
for (var i = 0; i < 15; i++) {
attributes.p0.value.push(p0._array);
attributes.p1.value.push(p1._array);
attributes.p2.value.push(p2._array);
attributes.p3.value.push(p3._array);
attributes.offset.value.push(offset);
attributes.size.value.push(i / 15);
attributes.color.value.push(color);
offset += 0.004;
}
}
});
return CurveAnimatingPoints;
});define('echarts-x/util/geometry/Bars', [
'require',
'qtek/DynamicGeometry',
'qtek/Geometry',
'qtek/geometry/Cube',
'qtek/math/Matrix4',
'qtek/math/Vector3',
'qtek/dep/glmatrix'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Geometry = require('qtek/Geometry');
var CubeGeometry = require('qtek/geometry/Cube');
var Matrix4 = require('qtek/math/Matrix4');
var Vector3 = require('qtek/math/Vector3');
var glMatrix = require('qtek/dep/glmatrix');
var vec3 = glMatrix.vec3;
var cubePositions = [
[
-1,
-1,
0
],
[
1,
-1,
0
],
[
1,
1,
0
],
[
-1,
1,
0
],
[
-1,
-1,
-2
],
[
1,
-1,
-2
],
[
1,
1,
-2
],
[
-1,
1,
-2
]
];
var cubeFaces = [
[
1,
5,
6
],
[
1,
6,
2
],
[
0,
3,
7
],
[
0,
7,
4
],
[
3,
2,
7
],
[
2,
6,
7
],
[
1,
4,
5
],
[
1,
0,
4
],
[
4,
6,
5
],
[
4,
7,
6
]
];
var BarsGeometry = DynamicGeometry.derive(function () {
return {
_barMat: new Matrix4(),
_barScaleVec: new Vector3()
};
}, {
clearBars: function () {
this.attributes.position.value.length = 0;
this.attributes.color.value.length = 0;
this.faces.length = 0;
},
addBar: function (start, end, size, color) {
var cubeGeo = this._cubeGeometry;
var barMat = this._barMat;
var scaleVec = this._barScaleVec;
var height = Vector3.dist(start, end);
if (height <= 0) {
return;
}
Vector3.set(scaleVec, size * 0.5, size * 0.5, height * 0.5);
Matrix4.identity(barMat);
Matrix4.lookAt(barMat, start, end, Vector3.UP);
Matrix4.invert(barMat, barMat);
Matrix4.scale(barMat, barMat, scaleVec);
var nVertexBase = this.getVertexNumber();
for (var i = 0; i < cubeFaces.length; i++) {
var face = vec3.clone(cubeFaces[i]);
face[0] += nVertexBase;
face[1] += nVertexBase;
face[2] += nVertexBase;
this.faces.push(face);
}
for (var i = 0; i < cubePositions.length; i++) {
var pos = vec3.clone(cubePositions[i]);
vec3.transformMat4(pos, pos, barMat._array);
this.attributes.position.value.push(pos);
this.attributes.color.value.push(color);
}
}
});
return BarsGeometry;
});define('qtek/geometry/Cube', [
'require',
'../DynamicGeometry',
'./Plane',
'../math/Matrix4',
'../math/Vector3',
'../math/BoundingBox'
], function (require) {
'use strict';
var DynamicGeometry = require('../DynamicGeometry');
var Plane = require('./Plane');
var Matrix4 = require('../math/Matrix4');
var Vector3 = require('../math/Vector3');
var BoundingBox = require('../math/BoundingBox');
var planeMatrix = new Matrix4();
var Cube = DynamicGeometry.derive({
widthSegments: 1,
heightSegments: 1,
depthSegments: 1,
inside: false
}, function () {
this.build();
}, {
build: function () {
this.faces.length = 0;
this.attributes.position.value.length = 0;
this.attributes.texcoord0.value.length = 0;
this.attributes.normal.value.length = 0;
var planes = {
'px': createPlane('px', this.depthSegments, this.heightSegments),
'nx': createPlane('nx', this.depthSegments, this.heightSegments),
'py': createPlane('py', this.widthSegments, this.depthSegments),
'ny': createPlane('ny', this.widthSegments, this.depthSegments),
'pz': createPlane('pz', this.widthSegments, this.heightSegments),
'nz': createPlane('nz', this.widthSegments, this.heightSegments)
};
var cursor = 0;
var attrList = [
'position',
'texcoord0',
'normal'
];
for (var pos in planes) {
for (var k = 0; k < attrList.length; k++) {
var attrName = attrList[k];
var attrArray = planes[pos].attributes[attrName].value;
for (var i = 0; i < attrArray.length; i++) {
var value = attrArray[i];
if (this.inside && attrName === 'normal') {
value[0] = -value[0];
value[1] = -value[1];
value[2] = -value[2];
}
this.attributes[attrName].value.push(value);
}
}
var plane = planes[pos];
for (var i = 0; i < plane.faces.length; i++) {
var face = plane.faces[i];
this.faces.push([
face[0] + cursor,
face[1] + cursor,
face[2] + cursor
]);
}
cursor += planes[pos].getVertexNumber();
}
this.boundingBox = new BoundingBox();
this.boundingBox.max.set(1, 1, 1);
this.boundingBox.min.set(-1, -1, -1);
}
});
function createPlane(pos, widthSegments, heightSegments) {
planeMatrix.identity();
var plane = new Plane({
widthSegments: widthSegments,
heightSegments: heightSegments
});
switch (pos) {
case 'px':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.POSITIVE_X);
Matrix4.rotateY(planeMatrix, planeMatrix, Math.PI / 2);
break;
case 'nx':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.NEGATIVE_X);
Matrix4.rotateY(planeMatrix, planeMatrix, -Math.PI / 2);
break;
case 'py':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.POSITIVE_Y);
Matrix4.rotateX(planeMatrix, planeMatrix, -Math.PI / 2);
break;
case 'ny':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.NEGATIVE_Y);
Matrix4.rotateX(planeMatrix, planeMatrix, Math.PI / 2);
break;
case 'pz':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.POSITIVE_Z);
break;
case 'nz':
Matrix4.translate(planeMatrix, planeMatrix, Vector3.NEGATIVE_Z);
Matrix4.rotateY(planeMatrix, planeMatrix, Math.PI);
break;
}
plane.applyTransform(planeMatrix);
return plane;
}
return Cube;
});define('qtek/geometry/Plane', [
'require',
'../DynamicGeometry',
'../math/BoundingBox'
], function (require) {
'use strict';
var DynamicGeometry = require('../DynamicGeometry');
var BoundingBox = require('../math/BoundingBox');
var Plane = DynamicGeometry.derive({
widthSegments: 1,
heightSegments: 1
}, function () {
this.build();
}, {
build: function () {
var heightSegments = this.heightSegments;
var widthSegments = this.widthSegments;
var positions = this.attributes.position.value;
var texcoords = this.attributes.texcoord0.value;
var normals = this.attributes.normal.value;
var faces = this.faces;
positions.length = 0;
texcoords.length = 0;
normals.length = 0;
faces.length = 0;
for (var y = 0; y <= heightSegments; y++) {
var t = y / heightSegments;
for (var x = 0; x <= widthSegments; x++) {
var s = x / widthSegments;
positions.push([
2 * s - 1,
2 * t - 1,
0
]);
if (texcoords) {
texcoords.push([
s,
t
]);
}
if (normals) {
normals.push([
0,
0,
1
]);
}
if (x < widthSegments && y < heightSegments) {
var i = x + y * (widthSegments + 1);
faces.push([
i,
i + 1,
i + widthSegments + 1
]);
faces.push([
i + widthSegments + 1,
i + 1,
i + widthSegments + 2
]);
}
}
}
this.boundingBox = new BoundingBox();
this.boundingBox.min.set(-1, -1, 0);
this.boundingBox.max.set(1, 1, 0);
}
});
return Plane;
});define('echarts-x/surface/TextureAtlasSurface', [
'require',
'qtek/Texture2D',
'./ZRenderSurface'
], function (require) {
var Texture2D = require('qtek/Texture2D');
var ZRenderSurface = require('./ZRenderSurface');
var TextureAtlasSurface = function (zr, width, height) {
this.zr = zr;
this._x = 0;
this._y = 0;
this._width = width || 1024;
this._height = height || 1024;
this._rowHeight = 0;
this._coords = {};
this._zrenderSurface = new ZRenderSurface(width, height);
this._zrenderSurface.onrefresh = function () {
zr.refreshNextFrame();
};
};
TextureAtlasSurface.prototype = {
clear: function () {
this._x = 0;
this._y = 0;
this._rowHeight = 0;
this._zrenderSurface.clearElements();
this._coords = {};
},
getWidth: function () {
return this._width;
},
getHeight: function () {
return this._height;
},
getTexture: function () {
return this._zrenderSurface.getTexture();
},
resize: function (width, height) {
this._zrenderSurface.resize(width, height);
},
addShape: function (shape, width, height) {
this._fitShape(shape, width, height);
var x = this._x;
var y = this._y;
if (x + width > this._width && y + this._rowHeight > this._height) {
return null;
}
if (x + width > this._width) {
x = this._x = 0;
y += this._rowHeight;
this._y = y;
this._rowHeight = 0;
}
this._x += width;
this._rowHeight = Math.max(this._rowHeight, height);
shape.position[0] += x;
shape.position[1] += y;
this._zrenderSurface.addElement(shape);
var coords = [
[
x / this._width,
y / this._height
],
[
(x + width) / this._width,
(y + height) / this._height
]
];
this._coords[shape.id] = coords;
return coords;
},
refresh: function () {
this._zrenderSurface.refresh();
},
_fitShape: function (shape, width, height) {
var rect = shape.getRect(shape.style);
var lineWidth = shape.style.lineWidth || 0;
var shadowBlur = shape.style.shadowBlur || 0;
var margin = lineWidth + shadowBlur;
rect.x -= margin;
rect.y -= margin;
rect.width += margin * 2;
rect.height += margin * 2;
var scaleX = width / rect.width;
var scaleY = height / rect.height;
var x = rect.x;
var y = rect.y;
shape.position = [
-rect.x * scaleX,
-rect.y * scaleY
];
shape.scale = [
scaleX,
scaleY
];
shape.updateTransform();
},
getImageCoords: function (id) {
return this._coords[id];
}
};
return TextureAtlasSurface;
});define('echarts-x/util/geometry/Sprites', [
'require',
'qtek/DynamicGeometry',
'qtek/math/Matrix4',
'qtek/math/Vector3',
'qtek/dep/glmatrix'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Matrix4 = require('qtek/math/Matrix4');
var Vector3 = require('qtek/math/Vector3');
var vec3 = require('qtek/dep/glmatrix').vec3;
var vec2 = require('qtek/dep/glmatrix').vec2;
var squarePositions = [
[
-1,
-1,
0
],
[
1,
-1,
0
],
[
1,
1,
0
],
[
-1,
1,
0
]
];
var squareTexcoords = [
[
0,
0
],
[
1,
0
],
[
1,
1
],
[
0,
1
]
];
var squareFaces = [
[
0,
1,
2
],
[
0,
2,
3
]
];
var SpritesGeometry = DynamicGeometry.derive({}, {
clearSprites: function () {
var attributes = this.attributes;
attributes.position.value.length = 0;
attributes.texcoord0.value.length = 0;
},
addSprite: function (matrix, coords) {
var nVertexBase = this.getVertexNumber();
for (var i = 0; i < squareFaces.length; i++) {
var face = Array.prototype.slice.call(squareFaces[i]);
face[0] += nVertexBase;
face[1] += nVertexBase;
face[2] += nVertexBase;
this.faces.push(face);
}
for (var i = 0; i < squarePositions.length; i++) {
var pos = vec3.clone(squarePositions[i]);
vec3.transformMat4(pos, pos, matrix._array);
this.attributes.position.value.push(pos);
}
var texcoord0 = this.attributes.texcoord0.value;
var create = vec2.fromValues;
texcoord0.push(create(coords[0][0], coords[1][1]));
texcoord0.push(create(coords[1][0], coords[1][1]));
texcoord0.push(create(coords[1][0], coords[0][1]));
texcoord0.push(create(coords[0][0], coords[0][1]));
}
});
return SpritesGeometry;
});define('echarts-x/util/sprite', ['require'], function (require) {
function makeSprite(size, inCanvas, draw) {
var canvas = inCanvas || document.createElement('canvas');
canvas.width = size;
canvas.height = size;
var ctx = canvas.getContext('2d');
draw && draw(ctx);
return canvas;
}
var spriteUtil = {
makeSpriteFromShape: function (size, shape, inCanvas) {
var rect = shape.getRect(shape.style);
var lineWidth = shape.style.lineWidth || 0;
var shadowBlur = shape.style.shadowBlur || 0;
var margin = lineWidth + shadowBlur;
rect.x -= margin;
rect.y -= margin;
rect.width += margin * 2;
rect.height += margin * 2;
var scaleX = size / rect.width;
var scaleY = size / rect.height;
var x = rect.x;
var y = rect.y;
shape.position = [
-rect.x * scaleX,
-rect.y * scaleY
];
shape.scale = [
scaleX,
scaleY
];
shape.updateTransform();
return makeSprite(size, inCanvas, function (ctx) {
shape.brush(ctx);
});
},
makeSimpleSprite: function (size, inCanvas) {
return makeSprite(size, inCanvas, function (ctx) {
var halfSize = size / 2;
ctx.beginPath();
ctx.arc(halfSize, halfSize, 60, 0, Math.PI * 2, false);
ctx.closePath();
var gradient = ctx.createRadialGradient(halfSize, halfSize, 0, halfSize, halfSize, halfSize);
gradient.addColorStop(0, 'rgba(255, 255, 255, 1)');
gradient.addColorStop(0.5, 'rgba(255, 255, 255, 0.5)');
gradient.addColorStop(1, 'rgba(255, 255, 255, 0)');
ctx.fillStyle = gradient;
ctx.fill();
});
}
};
return spriteUtil;
});define('echarts-x/util/geometry/Points', [
'require',
'qtek/DynamicGeometry',
'qtek/Geometry'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Geometry = require('qtek/Geometry');
var PointsGeometry = DynamicGeometry.derive(function () {
return {
attributes: {
position: new Geometry.Attribute('position', 'float', 3, 'POSITION', true),
size: new Geometry.Attribute('size', 'float', 1, '', true),
color: new Geometry.Attribute('color', 'float', 4, 'COLOR', true)
}
};
}, {
clearPoints: function () {
var attributes = this.attributes;
attributes.position.value.length = 0;
attributes.color.value.length = 0;
attributes.size.value.length = 0;
},
addPoint: function (position, color, size) {
var attributes = this.attributes;
attributes.position.value.push(position._array);
attributes.color.value.push(color);
attributes.size.value.push(size);
}
});
return PointsGeometry;
});define('echarts-x/util/geometry/AnimatingPoints', [
'require',
'qtek/DynamicGeometry',
'qtek/Geometry'
], function (require) {
var DynamicGeometry = require('qtek/DynamicGeometry');
var Geometry = require('qtek/Geometry');
var AnimatingPointsGeometry = DynamicGeometry.derive(function () {
return {
attributes: {
position: new Geometry.Attribute('position', 'float', 3, 'POSITION', true),
size: new Geometry.Attribute('size', 'float', 1, '', true),
delay: new Geometry.Attribute('delay', 'float', 1, '', true),
color: new Geometry.Attribute('color', 'float', 4, 'COLOR', true)
}
};
}, {
clearPoints: function () {
var attributes = this.attributes;
attributes.position.value.length = 0;
attributes.color.value.length = 0;
attributes.size.value.length = 0;
attributes.delay.value.length = 0;
},
addPoint: function (position, color, size, delayTime) {
var attributes = this.attributes;
attributes.position.value.push(position._array);
attributes.color.value.push(color);
attributes.size.value.push(size);
attributes.delay.value.push(delayTime);
}
});
return AnimatingPointsGeometry;
});define('qtek/compositor/Pass', [
'require',
'../core/Base',
'../camera/Orthographic',
'../geometry/Plane',
'../Shader',
'../Material',
'../Mesh',
'../core/glinfo',
'../core/glenum',
'../shader/source/compositor/vertex.essl'
], function (require) {
'use strict';
var Base = require('../core/Base');
var OrthoCamera = require('../camera/Orthographic');
var Plane = require('../geometry/Plane');
var Shader = require('../Shader');
var Material = require('../Material');
var Mesh = require('../Mesh');
var glinfo = require('../core/glinfo');
var glenum = require('../core/glenum');
Shader['import'](require('../shader/source/compositor/vertex.essl'));
var planeGeo = new Plane();
var mesh = new Mesh({ geometry: planeGeo });
var camera = new OrthoCamera();
var Pass = Base.derive(function () {
return {
fragment: '',
outputs: null,
material: null
};
}, function () {
var shader = new Shader({
vertex: Shader.source('buildin.compositor.vertex'),
fragment: this.fragment
});
var material = new Material({ shader: shader });
shader.enableTexturesAll();
this.material = material;
}, {
setUniform: function (name, value) {
var uniform = this.material.uniforms[name];
if (uniform) {
uniform.value = value;
}
},
getUniform: function (name) {
var uniform = this.material.uniforms[name];
if (uniform) {
return uniform.value;
}
},
attachOutput: function (texture, attachment) {
if (!this.outputs) {
this.outputs = {};
}
attachment = attachment || glenum.COLOR_ATTACHMENT0;
this.outputs[attachment] = texture;
},
detachOutput: function (texture) {
for (var attachment in this.outputs) {
if (this.outputs[attachment] === texture) {
this.outputs[attachment] = null;
}
}
},
bind: function (renderer, frameBuffer) {
if (this.outputs) {
for (var attachment in this.outputs) {
var texture = this.outputs[attachment];
if (texture) {
frameBuffer.attach(renderer.gl, texture, attachment);
}
}
}
if (frameBuffer) {
frameBuffer.bind(renderer);
}
},
unbind: function (renderer, frameBuffer) {
frameBuffer.unbind(renderer);
},
render: function (renderer, frameBuffer) {
var _gl = renderer.gl;
mesh.material = this.material;
if (frameBuffer) {
this.bind(renderer, frameBuffer);
var ext = glinfo.getExtension(_gl, 'EXT_draw_buffers');
if (ext && this.outputs) {
var bufs = [];
for (var attachment in this.outputs) {
attachment = +attachment;
if (attachment >= _gl.COLOR_ATTACHMENT0 && attachment <= _gl.COLOR_ATTACHMENT0 + 8) {
bufs.push(attachment);
}
}
ext.drawBuffersEXT(bufs);
}
}
this.trigger('beforerender', this, renderer);
_gl.disable(_gl.BLEND);
_gl.clear(_gl.DEPTH_BUFFER_BIT);
renderer.renderQueue([mesh], camera);
this.trigger('afterrender', this, renderer);
if (frameBuffer) {
this.unbind(renderer, frameBuffer);
}
}
});
return Pass;
});define('qtek/FrameBuffer', [
'require',
'./core/Base',
'./TextureCube',
'./core/glinfo',
'./core/glenum',
'./core/Cache'
], function (require) {
'use strict';
var Base = require('./core/Base');
var TextureCube = require('./TextureCube');
var glinfo = require('./core/glinfo');
var glenum = require('./core/glenum');
var Cache = require('./core/Cache');
var FrameBuffer = Base.derive({
depthBuffer: true,
_attachedTextures: null,
_width: 0,
_height: 0,
_depthTextureAttached: false,
_renderBufferWidth: 0,
_renderBufferHeight: 0,
_binded: false
}, function () {
this._cache = new Cache();
this._attachedTextures = {};
}, {
resize: function (width, height) {
this._width = width;
this._height = height;
},
bind: function (renderer) {
var _gl = renderer.gl;
if (!this._binded) {
_gl.bindFramebuffer(_gl.FRAMEBUFFER, this.getFrameBuffer(_gl));
this._binded = true;
}
this._cache.put('viewport', renderer.viewport);
renderer.setViewport(0, 0, this._width, this._height, 1);
if (this._cache.miss('renderbuffer') && this.depthBuffer && !this._depthTextureAttached) {
this._cache.put('renderbuffer', _gl.createRenderbuffer());
}
if (!this._depthTextureAttached && this.depthBuffer) {
var width = this._width;
var height = this._height;
var renderbuffer = this._cache.get('renderbuffer');
if (width !== this._renderBufferWidth || height !== this._renderBufferHeight) {
_gl.bindRenderbuffer(_gl.RENDERBUFFER, renderbuffer);
_gl.renderbufferStorage(_gl.RENDERBUFFER, _gl.DEPTH_COMPONENT16, width, height);
this._renderBufferWidth = width;
this._renderBufferHeight = height;
_gl.bindRenderbuffer(_gl.RENDERBUFFER, null);
}
if (!this._cache.get('renderbuffer_attached')) {
_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);
this._cache.put('renderbuffer_attached', true);
}
}
},
unbind: function (renderer) {
var _gl = renderer.gl;
_gl.bindFramebuffer(_gl.FRAMEBUFFER, null);
this._binded = false;
this._cache.use(_gl.__GLID__);
var viewport = this._cache.get('viewport');
if (viewport) {
renderer.setViewport(viewport.x, viewport.y, viewport.width, viewport.height);
}
for (var attachment in this._attachedTextures) {
var texture = this._attachedTextures[attachment];
if (!texture.NPOT && texture.useMipmap) {
var target = texture instanceof TextureCube ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D;
_gl.bindTexture(target, texture.getWebGLTexture(_gl));
_gl.generateMipmap(target);
_gl.bindTexture(target, null);
}
}
},
getFrameBuffer: function (_gl) {
this._cache.use(_gl.__GLID__);
if (this._cache.miss('framebuffer')) {
this._cache.put('framebuffer', _gl.createFramebuffer());
}
return this._cache.get('framebuffer');
},
attach: function (_gl, texture, attachment, target, mipmapLevel) {
if (!texture.width) {
throw new Error('The texture attached to color buffer is not a valid.');
}
if (!this._binded) {
_gl.bindFramebuffer(_gl.FRAMEBUFFER, this.getFrameBuffer(_gl));
this._binded = true;
}
this._width = texture.width;
this._height = texture.height;
attachment = attachment || _gl.COLOR_ATTACHMENT0;
target = target || _gl.TEXTURE_2D;
mipmapLevel = mipmapLevel || 0;
if (attachment === _gl.DEPTH_ATTACHMENT) {
var extension = glinfo.getExtension(_gl, 'WEBGL_depth_texture');
if (!extension) {
console.error(' Depth texture is not supported by the browser ');
return;
}
if (texture.format !== glenum.DEPTH_COMPONENT) {
console.error('The texture attached to depth buffer is not a valid.');
return;
}
this._cache.put('renderbuffer_attached', false);
this._depthTextureAttached = true;
}
this._attachedTextures[attachment] = texture;
_gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, target, texture.getWebGLTexture(_gl), mipmapLevel);
},
detach: function () {
},
dispose: function (_gl) {
this._cache.use(_gl.__GLID__);
var renderBuffer = this._cache.get('renderbuffer');
if (renderBuffer) {
_gl.deleteRenderbuffer(renderBuffer);
}
var frameBuffer = this._cache.get('framebuffer');
if (frameBuffer) {
_gl.deleteFramebuffer(frameBuffer);
}
this._cache.deleteContext(_gl.__GLID__);
}
});
FrameBuffer.COLOR_ATTACHMENT0 = glenum.COLOR_ATTACHMENT0;
FrameBuffer.DEPTH_ATTACHMENT = glenum.DEPTH_ATTACHMENT;
FrameBuffer.STENCIL_ATTACHMENT = glenum.STENCIL_ATTACHMENT;
FrameBuffer.DEPTH_STENCIL_ATTACHMENT = glenum.DEPTH_STENCIL_ATTACHMENT;
return FrameBuffer;
});;
define('qtek/shader/source/compositor/vertex.essl', function() { return '\n@export buildin.compositor.vertex\n\nuniform mat4 worldViewProjection : WORLDVIEWPROJECTION;\n\nattribute vec3 position : POSITION;\nattribute vec2 texcoord : TEXCOORD_0;\n\nvarying vec2 v_Texcoord;\n\nvoid main()\n{\n v_Texcoord = texcoord;\n gl_Position = worldViewProjection * vec4(position, 1.0);\n}\n\n@end'});
define('qtek/TextureCube', [
'require',
'./Texture',
'./core/glinfo',
'./core/glenum',
'./core/util'
], function (require) {
var Texture = require('./Texture');
var glinfo = require('./core/glinfo');
var glenum = require('./core/glenum');
var util = require('./core/util');
var targetMap = {
'px': 'TEXTURE_CUBE_MAP_POSITIVE_X',
'py': 'TEXTURE_CUBE_MAP_POSITIVE_Y',
'pz': 'TEXTURE_CUBE_MAP_POSITIVE_Z',
'nx': 'TEXTURE_CUBE_MAP_NEGATIVE_X',
'ny': 'TEXTURE_CUBE_MAP_NEGATIVE_Y',
'nz': 'TEXTURE_CUBE_MAP_NEGATIVE_Z'
};
var TextureCube = Texture.derive(function () {
return {
image: {
px: null,
nx: null,
py: null,
ny: null,
pz: null,
nz: null
},
pixels: {
px: null,
nx: null,
py: null,
ny: null,
pz: null,
nz: null
}
};
}, {
update: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_CUBE_MAP, this._cache.get('webgl_texture'));
this.beforeUpdate(_gl);
var glFormat = this.format;
var glType = this.type;
_gl.texParameteri(_gl.TEXTURE_CUBE_MAP, _gl.TEXTURE_WRAP_S, this.wrapS);
_gl.texParameteri(_gl.TEXTURE_CUBE_MAP, _gl.TEXTURE_WRAP_T, this.wrapT);
_gl.texParameteri(_gl.TEXTURE_CUBE_MAP, _gl.TEXTURE_MAG_FILTER, this.magFilter);
_gl.texParameteri(_gl.TEXTURE_CUBE_MAP, _gl.TEXTURE_MIN_FILTER, this.minFilter);
var anisotropicExt = glinfo.getExtension(_gl, 'EXT_texture_filter_anisotropic');
if (anisotropicExt && this.anisotropic > 1) {
_gl.texParameterf(_gl.TEXTURE_CUBE_MAP, anisotropicExt.TEXTURE_MAX_ANISOTROPY_EXT, this.anisotropic);
}
if (glType === 36193) {
var halfFloatExt = glinfo.getExtension(_gl, 'OES_texture_half_float');
if (!halfFloatExt) {
glType = glenum.FLOAT;
}
}
for (var target in this.image) {
var img = this.image[target];
if (img) {
_gl.texImage2D(_gl[targetMap[target]], 0, glFormat, glFormat, glType, img);
} else {
_gl.texImage2D(_gl[targetMap[target]], 0, glFormat, this.width, this.height, 0, glFormat, glType, this.pixels[target]);
}
}
if (!this.NPOT && this.useMipmap) {
_gl.generateMipmap(_gl.TEXTURE_CUBE_MAP);
}
_gl.bindTexture(_gl.TEXTURE_CUBE_MAP, null);
},
generateMipmap: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_CUBE_MAP, this._cache.get('webgl_texture'));
_gl.generateMipmap(_gl.TEXTURE_CUBE_MAP);
},
bind: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_CUBE_MAP, this.getWebGLTexture(_gl));
},
unbind: function (_gl) {
_gl.bindTexture(_gl.TEXTURE_CUBE_MAP, null);
},
isPowerOfTwo: function () {
if (this.image.px) {
return isPowerOfTwo(this.image.px.width) && isPowerOfTwo(this.image.px.height);
} else {
return isPowerOfTwo(this.width) && isPowerOfTwo(this.height);
}
function isPowerOfTwo(value) {
return value & value - 1 === 0;
}
},
isRenderable: function () {
if (this.image.px) {
return isImageRenderable(this.image.px) && isImageRenderable(this.image.nx) && isImageRenderable(this.image.py) && isImageRenderable(this.image.ny) && isImageRenderable(this.image.pz) && isImageRenderable(this.image.nz);
} else {
return this.width && this.height;
}
},
load: function (imageList) {
var loading = 0;
var self = this;
util.each(imageList, function (src, target) {
var image = new Image();
image.onload = function () {
loading--;
if (loading === 0) {
self.dirty();
self.trigger('success', self);
}
image.onload = null;
};
image.onerror = function () {
loading--;
image.onerror = null;
};
loading++;
image.src = src;
self.image[target] = image;
});
return this;
}
});
function isImageRenderable(image) {
return image.nodeName === 'CANVAS' || image.complete;
}
return TextureCube;
});define('zrender/shape/ShapeBundle', [
'require',
'./Base',
'../tool/util'
], function (require) {
var Base = require('./Base');
var ShapeBundle = function (options) {
Base.call(this, options);
};
ShapeBundle.prototype = {
constructor: ShapeBundle,
type: 'shape-bundle',
brush: function (ctx, isHighlight) {
var style = this.beforeBrush(ctx, isHighlight);
ctx.beginPath();
for (var i = 0; i < style.shapeList.length; i++) {
var subShape = style.shapeList[i];
var subShapeStyle = subShape.style;
if (isHighlight) {
subShapeStyle = subShape.getHighlightStyle(subShapeStyle, subShape.highlightStyle || {}, subShape.brushTypeOnly);
}
subShape.buildPath(ctx, subShapeStyle);
}
switch (style.brushType) {
case 'both':
ctx.fill();
case 'stroke':
style.lineWidth > 0 && ctx.stroke();
break;
default:
ctx.fill();
}
this.drawText(ctx, style, this.style);
this.afterBrush(ctx);
},
getRect: function (style) {
if (style.__rect) {
return style.__rect;
}
var minX = Number.MAX_VALUE;
var maxX = Number.MIN_VALUE;
var minY = Number.MAX_VALUE;
var maxY = Number.MIN_VALUE;
for (var i = 0; i < style.shapeList.length; i++) {
var subShape = style.shapeList[i];
var subRect = subShape.getRect(subShape.style);
var minX = Math.min(subRect.x, minX);
var minY = Math.min(subRect.y, minY);
var maxX = Math.max(subRect.x + subRect.width, maxX);
var maxY = Math.max(subRect.y + subRect.height, maxY);
}
style.__rect = {
x: minX,
y: minY,
width: maxX - minX,
height: maxY - minY
};
return style.__rect;
},
isCover: function (x, y) {
var originPos = this.getTansform(x, y);
x = originPos[0];
y = originPos[1];
var rect = this.style.__rect;
if (!rect) {
rect = this.getRect(this.style);
}
if (x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height) {
for (var i = 0; i < this.style.shapeList.length; i++) {
var subShape = this.style.shapeList[i];
if (subShape.isCover(x, y)) {
return true;
}
}
}
return false;
}
};
require('../tool/util').inherits(ShapeBundle, Base);
return ShapeBundle;
});
|
const addImage = {
loadedImage: false,
previewFile: (preview, fileInput) => {
var encoding = ["png","jpeg","jpg"];
var file = fileInput.files[0];
if (!encoding.includes(file.name.split(".")[1]))
{
showAlert("Not a supported image type!");
preview.src = "";
return;
}
customAlert.hideAlert();
var reader = new FileReader();
reader.onloadend = function () {
preview.src = reader.result;
addImage.loadedImage = true;
};
if (file) {
reader.readAsDataURL(file);
} else {
// preview.src = "";
}
},
dropImage: (event, previewImageArea) => {
var files = event.target.files || event.dataTransfer.files;
for (let i = 0; i < files.length; i++){
let fr = new FileReader();
fr.readAsDataURL(files[i]);
fr.onload = (data) => {
previewImageArea.src = data.target.result;
};
}
addImage.loadedImage = true;
},
finishUploadImage: (result, baseURL) => {
if (result.status !== 201){
customAlert.showAlertFromResponse(result);
document.getElementById("uploadButton").disabled = false;
return;
}
result.json().then((body) => {
document.getElementById("uploadButton").disabled = false;
customAlert.hideAlert();
window.location.href = baseURL + "carrusel";
}).catch((errors) => {
showAlert("Error uploading image");
});
},
finishUploadWithErrors: (errors) => {
customAlert.showAlert("Error uploading image");
},
uploadImage: (image, baseURL) => {
customAlert.hideAlert();
if (image === undefined){
customAlert.showAlert("Error: image is mandatory.");
return;
}
document.getElementById("uploadButton").disabled = true;
user.authFetch(baseURL + "backend/images/add", {
method: "POST",
body: JSON.stringify({
data: image
}),
headers: { "Content-Type": "application/json" }
}, (result) => addImage.finishUploadImage(result, baseURL), addImage.finishUploadWithErrors);
},
initAddImage: (filePreviewArea, uploadButton,uploadFile, baseURL) => {
filePreviewArea.addEventListener("drop", (event) => addImage.dropImage(event, filePreviewArea), false);
window.addEventListener("dragover",function(e){
e = e || event;
e.preventDefault();
},false);
window.addEventListener("drop",function(e){
e = e || event;
e.preventDefault();
},false);
uploadFile.addEventListener("change", () => addImage.previewFile(filePreviewArea,uploadFile));
uploadButton.addEventListener("click", () => addImage.uploadImage(
addImage.loadedImage ? document.getElementById("filePreviewArea").src : undefined,
baseURL
));
}
};
|
export default {
namespaced: true,
state: {},
mutations: {},
getters: {},
actions: {
updateProfile(context, user) {
context.commit('loading_status', true, { root: true })
axios.patch(`/api/profile/update/${user.id}`, user)
.then( response => {
context.commit('loading_status', false, { root: true })
context.commit('set_flashmessage', {message: 'Profile Updated Successfully', type: 'success'}, { root: true })
})
}
}
}
|
// Note: this code depends on a variable called "videos" that contains
// all of the talks data in json format. It should be initialized in
// the Django template file.
// variables to hold the templates, since they will be removed from the DOM after initialization
var groupTemplate, videoTemplate;
var group_category_none_name = "Chronological List"
// initialization code that's called when the window has finished loading
$(window).load(function () {
// preserve the template designs so that they're not lost when updating the display
groupTemplate = $(".group-template").clone();
videoTemplate = $(".video-template").clone();
// initialize the filter bar module with the video data
$('#fixed-side-bar').fixedSideBar();
$('#filter-bar').filterBar({
items: videos,
categories: ["Year", "Project", "None"],
groupsForCategory: {
"Year": groupVideosByYear(),
"Project": groupVideosByProject(),
"None": groupVideosByNone(),
},
defaultCategory: "None",
passesFilter: passesFilter,
displayGroupHeader: formatGroupHeader,
displayItem: formatVideo,
afterDisplay: afterDisplay,
keywords: [] // empty list currently because videos don't currently have keyword associations
});
if(initialFilter && initialFilter.length > 0 && initialFilter != "None")
$('#filter-textbox').val(initialFilter);
$('#filter-bar').applyFilter();
});
// returns a list of videos in reverse chronological order (most recent video first)
function groupVideosByNone() {
var tempGroup = {};
tempGroup[group_category_none_name] = [];
videos.forEach(function(video, index, array) {
tempGroup[group_category_none_name].push(video);
});
tempGroup[group_category_none_name].sort(function(a, b) { return b.date - a.date });
var groups = []
groups.push({"name": group_category_none_name, "items": tempGroup[group_category_none_name]});
return groups;
}
// returns a list of videos grouped by year, sorted with the most recent year first
// TODO: this is same function as in talks.js (and possibly publications.js). Consolidate?
function groupVideosByYear()
{
var tempGroups = {};
videos.forEach(function(video, index, array) {
var group = video.date.getFullYear().toString();
if(!(group in tempGroups)) {
tempGroups[group] = [];
}
tempGroups[group].push(video);
});
var groups = []
for(group in tempGroups) {
tempGroups[group].sort(function(a, b) {return b.date - a.date});
groups.push({"name": group, "items": tempGroups[group]});
}
// years are sorted chronologically, all of the other groupings are sorted by frequency
groups.sort(function(a,b) { return parseInt(b.name) - parseInt(a.name) });
return groups;
}
// returns a list of videos grouped by project, sorted with the most frequent project first
// note: a video can appear in more than one group
// TODO: this is same function as in talks.js (and possibly publications.js). Consolidate? Actually, not the same because
// videos can only belong to one and only one group currently. If this switches to many-to-one, then we have to update this
// to be more like talks.js
function groupVideosByProject()
{
// tempGroups holds all videos that are contained under the same project
var tempGroups = {};
videos.forEach(function(video, index, array) {
group = video.project_short_name;
// console.log("Video: " + video.title + ", Date: " + video.date.toString());
if(!(group in tempGroups)) {
tempGroups[group] = [];
}
tempGroups[group].push(video);
});
var groups = []
for(group in tempGroups) {
tempGroups[group].sort(function(a, b) { return b.date - a.date});
// project name, all videos associated with the project
groups.push({"name": group, "items": tempGroups[group]});
}
// groupings are done by the date of the most recent video from each project
groups.sort(function(a,b) { return b.items[0].date - a.items[0].date });
return groups;
}
// returns true if the publication contains the text entered into the filter box anywhere
// in the title, speakers, venue, keywords, or projects
function passesFilter(video, filter) {
filter = filter.toLowerCase();
var passes = false;
if(!filter || filter.length == 0) passes = true;
if(video.title.toLowerCase().indexOf(filter) >= 0) passes = true;
if(video.caption.toLowerCase().indexOf(filter) >= 0) passes = true;
if(video.project_short_name.toLowerCase().indexOf(filter) >= 0) passes = true;
return passes;
}
// adds html markup to the specified text wherever it matches the filter, applying the highlight style
// TODO: this is same function as in talks.js (and possibly publications.js). Consolidate?
function addHighlight(text, filter) {
var result = text;
if(filter && filter.length > 0)
result = text.replace(new RegExp('(' + filter + ')', 'gi'), "<span class=\"highlight\">$1</span>");
return result;
}
// helper function to populate the template with the group data
// TODO: this is same function as in talks.js (and possibly publications.js). Consolidate?
function formatGroupHeader(group) {
var groupData = groupTemplate.clone();
if (group == group_category_none_name){
// hide the heading and bottom border for when none is selected as a grouping category
groupData.css("border-bottom", "none");
groupData.css("margin-bottom", "11px");
}
else {
groupData.attr("name", group.toLowerCase().replace(new RegExp(" ", "g"), "-"));
groupData.html(group);
}
return groupData[0].outerHTML;
}
function formatVideo(video, filter){
if(filter) filter = filter.toLowerCase();
var videoData = videoTemplate.clone();
videoData.find(".artifact-title").html(addHighlight(video.title, filter));
videoData.find(".artifact-venue").html(addHighlight(video.caption, filter));
videoData.find(".video").attr("src", video.url_embeddable);
videoData.find(".video-link").attr("href", video.url);
if(video.url){
videoData.find(".video-link").attr("href", video.url);
}
else{
videoData.find(".video-link").remove();
videoData.find(".decor_video").remove();
}
if(video.pub_url){
videoData.find(".video-paper-link").attr("href", video.pub_url);
}
else{
videoData.find(".video-paper-link").remove();
videoData.find(".decor_pdf").remove();
}
return videoData[0].outerHTML;
}
// called after initialization or whenever the filter is reapplied
function afterDisplay() {
// Empty for now
}
//Code to use isotope for filtering from http://codepen.io/desandro/pen/wfaGu
// TODO: All of this directly copy/pasted from talks.js. Lots of redundancy here. Could be refactored
// TODO: is this code even necessary? I don't think so...
// init Isotope
var $grid = $('.video-list').isotope({
itemSelector: '.video-template',
layoutMode: 'fitRows',
filter: function() {
return qsRegex ? $(this).text().match( qsRegex ) : true;
}
});
// use value of search field to filter
var $quicksearch = $('#filter-textbox').keyup( debounce( function() {
qsRegex = new RegExp( $quicksearch.val(), 'gi' );
$grid.isotope();
}, 200 ) );
// debounce so filtering doesn't happen every millisecond
function debounce( fn, threshold ) {
var timeout;
return function debounced() {
if ( timeout ) {
clearTimeout( timeout );
}
function delayed() {
fn();
timeout = null;
}
timeout = setTimeout( delayed, threshold || 100 );
}
}
$(window).resize(debounce(function() {
// hack to force the ellipsis to redraw, so that it's in the correct position
$.each($('.line-clamp'), function(index, item) {
$(item).hide().show(0);
});
}));
|
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import Card from 'react-bootstrap/Card';
import CardGroup from 'react-bootstrap/CardGroup'
class HornedBeast extends React.Component {
constructor(props) {
super(props);
this.state = {
NumOfClicks: 0
}
}
NumClicks = (cardprops) => {
let value = this.state.NumOfClicks;
this.setState({ NumOfClicks: value += 1 })
this.props.handleClose(cardprops);
}
render() {
return (
<div>
<CardGroup>
<Card style={{ width: '18rem', height: '35rem' }}>
<Card.Img variant="top" src={this.props.image}
onClick={() => {
this.NumClicks(this.props);
}}
/>
<Card.Body>
<Card.Title>{this.props.title}</Card.Title>
<Card.Text>
❤️ = {this.state.NumOfClicks}
</Card.Text>
<Card.Text>
{this.props.description}
{this.props.keyword}
{this.props.horns}
</Card.Text>
</Card.Body>
</Card>
</CardGroup>
</div>
)
}
}
export default HornedBeast;
|
/**
* @author vue-admin-beautiful (不想保留author可删除)
* @description .eslintrc.js
*/
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/recommended', '@vue/prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/no-v-html': 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
}
|
angular.module('WaffleApp').service('UserStateService', ['socket', '$q', '$http', '$location', 'Auth', function UserStateService(socket, $q, $http, $location, Auth) {
var self = this;
this.state = {};
self.loginDetails = {};
var pendingLogin = $q.defer();
this.login = function(user) {
// TODO use HTTP to log in!s
// See https://auth0.com/blog/2014/01/15/auth-with-socket-io/
// and https://auth0.com/blog/2014/01/07/angularjs-authentication-with-cookies-vs-token/
self.loginDetails = angular.extend({}, user);
return doLogin();
};
this.whenLoggedIn = function() {
return pendingLogin.promise;
};
function doLogin() {
$http.post('http://localhost:3000/login', self.loginDetails).success(function(result) {
Auth.setAuthToken(result.token);
socket.initialize().then(function() {
console.log("initialisation has resolved");
self.isAuthenticated = true;
socket.socket.on('disconnect', function() {
console.error('Disconnected!');
self.isAuthenticated = false;
$location.path('/?disconnect');
});
pendingLogin.resolve();
});
});
//socket.emit('user/signin', self.loginDetails);
return pendingLogin.promise;
}
//socket.on('user/signin', function(data) {
// self.state.username = data.username;
// self.state.id = data.id;
// self.isAuthenticated = true;
// pendingLogin.resolve();
//});
//
//socket.on('user/require-auth', function() {
// self.isAuthenticated = false;
// console.log("User is not authenticated!");
// if (self.loginDetails) {
// doLogin();
// }
//});
}]);
|
var express = require('express');
var bcrypt = require('bcryptjs');
var jwt = require('jsonwebtoken');
var mdAutenticacion = require('../middlewares/autenticacion');
//var SEED = require('../config/config').SEED;
var app= express();
var Usuario= require('../models/usuario');
//===============================================
// Obteber todos los usuarios
//===============================================
app.get('/',(req,res,next)=>{
var desde=req.query.desde ||0;
desde=Number(desde);
// CAMBIO!!! -*-*-*-*-*-*-*
Usuario.find({},'nombres apellidos email telefono tipoUsuario tipoID numDocumento genero codigoUniversitario sedeUniversitaria facultad programaUniversitario role id').skip(desde).limit(5).exec(
(err,usuarios)=>{
if(err){
return res.status(500).json({
ok:false,
mensaje: 'Error cargando usuarios!',
errors:err
});
}
Usuario.count({},(err,conteo)=>{
res.status(200).json({
ok:true,
usuarios: usuarios,
total:conteo
});
})
}); //Metodo de mongoose.
});
/*
// ==========================================
// Obtener jefe de programa por ID <- Nuevo servicio.
// ==========================================
app.get('/:id', (req, res) => {
var id = req.params.id;
Usuario.findById(id)
.populate('usuario', 'nombres apellidos email')
.exec((err, usuario) => {
if (err) {
return res.status(500).json({
ok: false,
mensaje: 'Error al buscar usuario',
errors: err
});
}
if (!usuario) {
return res.status(400).json({
ok: false,
mensaje: 'El usuario con el id ' + id + 'no existe',
errors: { message: 'No existe un usuario con ese ID' }
});
}
res.status(200).json({
ok: true,
usuario: usuario
});
})
})
*/
// ==========================================
// Obtener jefe de programa por C.C <- Nuevo servicio.
// ==========================================
app.get('/:numDocumento', (req, res) => {
var numDocumento = req.params.numDocumento;
Usuario.findOne({numDocumento:numDocumento})
.populate('usuario', 'nombres apellidos email')
.exec((err, usuario) => {
if (err) {
return res.status(500).json({
ok: false,
mensaje: 'Error al buscar usuario por c.c',
errors: err
});
}
if (!usuario) {
return res.status(400).json({
ok: false,
mensaje: 'El usuario con el identificación ' + numDocumento + 'no existe',
errors: { message: 'No existe un usuario con ese ID' }
});
}
res.status(200).json({
ok: true,
usuario: usuario
});
})
})
// ==========================================
// Obtener usuario por ID.
// ==========================================
app.get('/id/:_id', (req, res) => {
var _id = req.params._id;
Usuario.findOne({_id:_id})
.populate('usuario', '_id')
.exec((err, usuario) => {
if (err) {
return res.status(500).json({
ok: false,
mensaje: 'Error al buscar usuario por _id',
errors: err
});
}
if (!usuario) {
return res.status(400).json({
ok: false,
mensaje: 'El usuario con el _id ' + id + ' no existe',
errors: { message: 'No existe un usuario con ese _id' }
});
}
res.status(200).json({
ok: true,
usuario: usuario
});
})
})
//===============================================
// Verificar token
//===============================================
/*
app.use('/',(req,res,next)=>{
var token= req.query.token;
jwt.verify(token,SEED,(err,decoded)=>{
if(err){
return res.status(401).json({
ok:false,
mensaje: 'Token no valido',
errors:err
});
}
next();
});
}); // No es muy flexible este tipo de validaciones.*/
//===============================================
// Actualizar usuarios
//===============================================
// Se puede utilizar put or path
// CAMBIO!!! -*-*-*-*-*-*-*
//app.put('/:id',[mdAutenticacion.verificarToken,mdAutenticacion.verificaraADMIN_ROLE_o_MismoUsuario],(req,res)=>{
app.put('/:id',(req,res)=>{
var id = req.params.id;
var body = req.body;
Usuario.findById(id,(err,usuario)=>{
if(err){
return res.status(500).json({
ok:false,
mensaje: 'Error al buscar usuarios!',
errors:err
});
}
if(!usuario){
return res.status(400).json({
ok:false,
mensaje: 'El usuario con el '+id+' no existe.',
errors:{message: 'No existe un usuario con ese ID'}
});
}
usuario.nombres = body.nombres;
usuario.apellidos= body.apellidos;
usuario.email = body.email;
usuario.telefono= body.telefono;
usuario.tipoUsuario= body.tipoUsuario;
usuario.tipoID=body.tipoID;
usuario.numDocumento=body.numDocumento;
usuario.genero=body.genero;
usuario.codigoUniversitario= body.codigoUniversitario;
usuario.sedeUniversitaria=body.sedeUniversitaria;
usuario.facultad= body.facultad;
usuario.programaUniversitario= body.programaUniversitario;
usuario.estado=body.estado;
usuario.role = body.role;
usuario.save((err,usuarioGuardado)=>{
if(err){
return res.status(400).json({
ok:false,
mensaje: 'Error al actualizar usuarios!',
errors:err
});
}
usuarioGuardado.password=':)';
res.status(200).json({
ok:true,
usuario: usuarioGuardado
});
});
});
});
//===============================================
// Crear un nuevo usuario
//===============================================
app.post('/',(req,res)=>{
var body = req.body;
var usuario= new Usuario({ //referencia a una variable de tipo usuario
nombres: body.nombres,
apellidos: body.apellidos,
email: body.email,
password: bcrypt.hashSync(body.password, 10),
telefono:body.telefono,
tipoUsuario:body.tipoUsuario,
tipoID:body.tipoID,
numDocumento:body.numDocumento,
genero:body.genero,
codigoUniversitario: body.codigoUniversitario,
sedeUniversitaria:body.sedeUniversitaria,
facultad: body.facultad,
programaUniversitario: body.programaUniversitario,
estado:body.estado,
role: body.role
});
usuario.save((err,usuarioGuardado)=>{
if(err){
return res.status(400).json({
ok:false,
mensaje: 'Error al crear usuarios!',
errors:err
});
}
res.status(201).json({
ok:true,
usuario: usuarioGuardado,
usuariotoken: req.usuario
});
});
});
//===============================================
// Eliminar usuarios por el id.
//===============================================
// CAMBIO!!! -*-*-*-*-*-*-*
//app.delete('/:id',[mdAutenticacion.verificarToken, mdAutenticacion.verificaraADMIN_ROLE],(req,res)=>{
app.delete('/:id',(req,res)=>{
var id = req.params.id; // id por el /:id.
Usuario.findByIdAndRemove(id,(err,usuarioBorrado)=>{
if(err){
return res.status(500).json({
ok:false,
mensaje: 'Error al borrar usuarios!',
errors:err
});
}
if(!usuarioBorrado){
return res.status(400).json({
ok:false,
mensaje: 'No existe un usuario con este id: '+id+'.',
errors:{message: 'No existe un usuario con ese ID'}
});
}
res.status(200).json({
ok:true,
usuario: usuarioBorrado
});
});
});
module.exports= app;
|
/* @generated */
// prettier-ignore
if (Intl.ListFormat && typeof Intl.ListFormat.__addLocaleData === 'function') {
Intl.ListFormat.__addLocaleData({"data":{"kw":{"conjunction":{"long":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"},"short":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"},"narrow":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"}},"disjunction":{"long":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, or {1}","pair":"{0} or {1}"},"short":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, or {1}","pair":"{0} or {1}"},"narrow":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, or {1}","pair":"{0} or {1}"}},"unit":{"long":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"},"short":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"},"narrow":{"start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, {1}","pair":"{0}, {1}"}}}},"availableLocales":["kw"]})
}
|
/**
* Copyright IBM Corp. 2016, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import CTALogic from './CTALogic';
import { LinkWithIcon } from '../LinkWithIcon';
import PropTypes from 'prop-types';
import React from 'react';
/**
* Link subcomponent for CTA.
*/
const TextCTA = ({
type,
openLightBox,
renderLightBox,
videoTitle,
...otherProps
}) => {
const Icon = CTALogic.iconSelector(type);
const href =
type !== 'video'
? otherProps.href
? otherProps.href
: otherProps.cta.href
: null;
return type === 'video' ? (
<div>
{CTALogic.launchLightBox(renderLightBox, openLightBox, otherProps.media)}
{!renderLightBox && (
<LinkWithIcon
href="#"
onClick={e => CTALogic.setLightBox(e, openLightBox)}>
<span>{videoTitle[0].title}</span>
<Icon />
</LinkWithIcon>
)}
</div>
) : (
<LinkWithIcon
href={href}
target={CTALogic.external(type)}
onClick={e => CTALogic.jump(e, type)}>
<span>{otherProps.copy}</span>
<Icon />
</LinkWithIcon>
);
};
TextCTA.propTypes = {
/**
* CTA type. Choose from:
*
* | Type | SVG element Name | Description |
* | ---------- | ---------------- | ---------------------------------------------------------------- |
* | `local` | ArrowRight20 | Describes right arrow onClick which loads in self page. |
* | `jump` | ArrowDown20 | Describes down arrow onClick which scrollToView of target. |
* | `external` | Launch20 | Describes launch arrow onClick which loads in new tab. |
* | `download` | Download20 | Describes download arrow onClick for downloading files. |
* | `video` | PlayOutline20 | Describes play icon onClick which loads the video in a lightbox. |
*
* For more details of icons, refer to:
*
* - [Icons library](https://www.carbondesignsystem.com/guidelines/icons/library/)!👀
* - [@carbon/icons-react](https://github.com/carbon-design-system/carbon/tree/master/packages/icons-react)!👀
* - [carbon-icons](https://www.npmjs.com/package/carbon-icons)!👀
*/
type: PropTypes.oneOfType([
PropTypes.oneOf(['jump', 'local', 'external', 'download', 'video']),
PropTypes.arrayOf(
PropTypes.oneOf(['jump', 'local', 'external', 'download', 'video'])
),
]),
/**
* Func to set renderLightBox state.
*/
openLightBox: PropTypes.func,
/**
* Bool to determine whether to open lightbox.
*/
renderLightBox: PropTypes.bool,
/**
* Array of video titles.
*/
videoTitle: PropTypes.arrayOf(
PropTypes.shape({
title: PropTypes.string,
key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
})
),
};
export default TextCTA;
|
function isEmpty(item) {
return !item.id && !item.common && !item.scientific;
}
function filterSpecies(species) {
return species.filter(function (item) {
if (isEmpty(item)) {
return false;
}
if (!item.shouldShow) {
return false;
}
return true;
});
}
function filterStock(items) {
return items.filter(function (item) {
if (isEmpty(item)) {
return false;
}
return true;
});
}
function toKebabCase(string) {
return string
.replace(/\"/g, "")
.replace(/\'/g, "")
.replace(/\s+/g, "-")
.toUpperCase()
.trim();
}
function getId(item) {
return toKebabCase(item.id);
}
function aggregateStock(stock) {
return stock.reduce(function (allStock, item) {
var id = getId(item).concat("|", item.size.toUpperCase());
if (id in allStock) {
allStock[id] += +item.count;
} else {
allStock[id] = +item.count;
}
return allStock;
}, {});
}
function combineSizes(item, stockCount) {
item.sizes["F"].count = updateSizeCount(item, stockCount, "F");
item.sizes["S"].count = updateSizeCount(item, stockCount, "S");
item.sizes["M"].count = updateSizeCount(item, stockCount, "M");
item.sizes["L"].count = updateSizeCount(item, stockCount, "L");
item.sizes["B"].count = updateSizeCount(item, stockCount, "B");
return item.sizes;
}
function updateSizeCount(item, stockCount, size) {
return stockCount[item.id + "|" + size] || 0;
}
function getOriginId(item) {
var subOriginId = toKebabCase(item.origin ? item.origin.replace(/\s+/g, "").substr(0, 5) : "OTHER");
var continentId = item.id.split("-")[0];
if (subOriginId === "SEASI" || subOriginId === "AFRIC") {
subOriginId = "OTHER";
}
return continentId + "-" + subOriginId;
}
function filterAndCombineLists(species, stock) {
var stockDictionary = aggregateStock(filterStock(stock));
var species = filterSpecies(species);
var data = [];
species.forEach(function (item) {
var model = {
id: getId(item),
onCaresList: !!item.onCaresList,
common: item.common,
scientific: item.scientific,
origin: getOriginId(item),
sizes: {
F: { length: +item.sizeF || 0, price: item.priceF, wholesalePrice: item.wholesalePriceF },
S: { length: +item.sizeS || 0, price: item.priceS, wholesalePrice: item.wholesalePriceS },
M: { length: +item.sizeM || 0, price: item.priceM, wholesalePrice: item.wholesalePriceM },
L: { length: +item.sizeL || 0, price: item.priceL, wholesalePrice: item.wholesalePriceL },
B: { length: +item.sizeB || 0, price: item.priceB, wholesalePrice: item.wholesalePriceB },
},
};
if (item.picture) {
model.picture = item.picture;
}
model.sizes = combineSizes(model, stockDictionary);
data.push(model);
});
return data;
}
function getHotItems(hotItemsSheetModel) {
return hotItemsSheetModel.reduce(function (result, item) {
result.push(item.id);
return result;
}, []);
}
|
const express = require('express')
const expressGraphQL = require('express-graphql')
const {
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
GraphQLList,
GraphQLInt,
GraphQLNonNull
} = require('graphql')
const app = express()
const authors = [
{ id: 1, name: 'J. K. Rowling' },
{ id: 2, name: 'J. R. R. Tolkien' },
{ id: 3, name: 'Brent Weeks' }
]
const books = [
{ id: 1, name: 'Harry Potter and the Chamber of Secrets', authorId: 1 },
{ id: 2, name: 'Harry Potter and the Prisoner of Azkaban', authorId: 1 },
{ id: 3, name: 'Harry Potter and the Goblet of Fire', authorId: 1 },
{ id: 4, name: 'The Fellowship of the Ring', authorId: 2 },
{ id: 5, name: 'The Two Towers', authorId: 2 },
{ id: 6, name: 'The Return of the King', authorId: 2 },
{ id: 7, name: 'The Way of Shadows', authorId: 3 },
{ id: 8, name: 'Beyond the Shadows', authorId: 3 }
]
const BookType = new GraphQLObjectType({
name: 'Book',
description: 'This represents a book written by an author',
fields: () => ({
id: { type: GraphQLNonNull(GraphQLInt) },
name: { type: GraphQLNonNull(GraphQLString) },
authorId: { type: GraphQLNonNull(GraphQLInt) },
author: {
type: AuthorType,
resolve: (book) => {
return authors.find(author => author.id === book.authorId)
}
}
})
})
const AuthorType = new GraphQLObjectType({
name: 'Author',
description: 'This represents a author of a book',
fields: () => ({
id: { type: GraphQLNonNull(GraphQLInt) },
name: { type: GraphQLNonNull(GraphQLString) },
books: {
type: new GraphQLList(BookType),
resolve: (author) => {
return books.filter(book => book.authorId === author.id)
}
}
})
})
const RootQueryType = new GraphQLObjectType({
name: 'Query',
description: 'Root Query',
fields: () => ({
book: {
type: BookType,
description: 'A Single Book',
args: {
id: { type: GraphQLInt }
},
resolve: (parent, args) => books.find(book => book.id === args.id)
},
books: {
type: new GraphQLList(BookType),
description: 'List of All Books',
resolve: () => books
},
authors: {
type: new GraphQLList(AuthorType),
description: 'List of All Authors',
resolve: () => authors
},
author: {
type: AuthorType,
description: 'A Single Author',
args: {
id: { type: GraphQLInt }
},
resolve: (parent, args) => authors.find(author => author.id === args.id)
}
})
})
const RootMutationType = new GraphQLObjectType({
name: 'Mutation',
description: 'Root Mutation',
fields: () => ({
addBook: {
type: BookType,
description: 'Add a book',
args: {
name: { type: GraphQLNonNull(GraphQLString) },
authorId: { type: GraphQLNonNull(GraphQLInt) }
},
resolve: (parent, args) => {
const book = { id: books.length + 1, name: args.name, authorId: args.authorId }
books.push(book)
return book
}
},
addAuthor: {
type: AuthorType,
description: 'Add an author',
args: {
name: { type: GraphQLNonNull(GraphQLString) }
},
resolve: (parent, args) => {
const author = { id: authors.length + 1, name: args.name }
authors.push(author)
return author
}
}
})
})
const schema = new GraphQLSchema({
query: RootQueryType,
mutation: RootMutationType
})
app.use('/graphql', expressGraphQL({
schema: schema,
graphiql: true
}))
app.listen(3000, () => console.log('Server Running'))
|
var searchData=
[
['generator_5f_2259',['generator_',['../namespacenc_1_1random.html#aa541047e6b742f1c5251e72f3b7aec95',1,'nc::random']]]
];
|
/* eslint-disable camelcase */
const { Role, User } = require('../models');
const getAllRoles = () =>
Role.fetchAll({ require: true, withRelated: ['permissions'] });
const patchUserRole = (id, newRoles) =>
new User({ id }).fetch({ withRelated: ['roles'] }).then((userModel) => {
const rolesToRemove = userModel
.related('roles')
.filter(
(roleModel) =>
!newRoles
.map(({ id: roleId }) => roleId)
.includes(roleModel.get('id'))
)
.map((roleModel) => roleModel.get('id'));
const rolesToAdd = newRoles
.filter((roleObject) => {
return !userModel
.related('roles')
.map(({ id: roleId }) => roleId)
.includes(roleObject.id);
})
.map(({ id: roleId }) => roleId);
userModel.related('roles').attach(rolesToAdd);
userModel.related('roles').detach(rolesToRemove);
});
const patchRolePermission = (id, newPermissions) =>
new Role({ id }).fetch({ withRelated: ['permissions'] }).then((roleModel) => {
const permissionsToRemove = roleModel
.related('permissions')
.filter(
(permissionModel) =>
!newPermissions
.map(({ id: permissionId }) => permissionId)
.includes(permissionModel.get('id'))
)
.map((permissionModel) => permissionModel.get('id'));
const permissionsToAdd = newPermissions
.filter((permissionObject) => {
return !roleModel
.related('permissions')
.map(({ id: permissionId }) => permissionId)
.includes(permissionObject.id);
})
.map(({ id: permissionId }) => permissionId);
roleModel.related('permissions').attach(permissionsToAdd);
roleModel.related('permissions').detach(permissionsToRemove);
});
module.exports = {
getAllRoles,
patchUserRole,
patchRolePermission,
};
|
import { extend } from 'flarum/extend';
import HeaderSecondary from 'flarum/components/HeaderSecondary';
extend(HeaderSecondary.prototype, 'items', function(items) {
items.remove('logIn');
items.remove('locale');
items.add('backToCourses', <a href="/">Accueil Communauté</a>);
});
const coursesUrl = 'https://beta.myguitare.com';
const logo = $('#home-link');
logo.attr('href', coursesUrl);
logo.click(() => {
window.location.replace(coursesUrl);
});
|
!function(e){function r(r){for(var n,c,u=r[0],i=r[1],s=r[2],f=0,l=[];f<u.length;f++)c=u[f],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&l.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);l.length;)l.shift()();return a.push.apply(a,s||[]),t()}function t(){for(var e,r=0;r<a.length;r++){for(var t=a[r],n=!0,u=1;u<t.length;u++){var i=t[u];0!==o[i]&&(n=!1)}n&&(a.splice(r--,1),e=c(c.s=t[0]))}return e}var n={},o={2:0},a=[];function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var a,u=document.createElement("script");u.charset="utf-8",u.timeout=120,c.nc&&u.setAttribute("nonce",c.nc),u.src=function(e){return c.p+""+({0:"0a301732",1:"83b623c4eada017ae1e852d567e48ab4e706c5a0",4:"component---src-pages-404-js",5:"component---src-pages-index-js",6:"component---src-pages-regalia-js",7:"component---src-pages-stocks-js",8:"component---src-pages-using-typescript-tsx",9:"component---src-pages-weather-js"}[e]||e)+"-"+{0:"0decbd2e975a8333b527",1:"d892361861504ac0887d",4:"c81ed1a0299aac61b157",5:"9d8a9d5bd060a0fabc0a",6:"e56187a3b7ef257a700b",7:"2829196ea5f2f31b0845",8:"f35c8320e7143ca31eff",9:"b163d0a3f4ca893f9aaf"}[e]+".js"}(e);var i=new Error;a=function(r){u.onerror=u.onload=null,clearTimeout(s);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,t[1](i)}o[e]=void 0}};var s=setTimeout((function(){a({type:"timeout",target:u})}),12e4);u.onerror=u.onload=a,document.head.appendChild(u)}return Promise.all(r)},c.m=e,c.c=n,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(t,n,function(r){return e[r]}.bind(null,n));return t},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="/",c.oe=function(e){throw console.error(e),e};var u=window.webpackJsonp=window.webpackJsonp||[],i=u.push.bind(u);u.push=r,u=u.slice();for(var s=0;s<u.length;s++)r(u[s]);var p=i;t()}([]);
//# sourceMappingURL=webpack-runtime-1066f745d3137062dc21.js.map
|
$(function() {
console.log( "ready!" );
//$( ".gallery-thumb" ).first().addClass( "selected" );
//$('.banner').addClass('shrunk');
});
$('.link-spoof').each(function(){
$butt = $(this);
var path = '#bio-' + $butt.attr('id');
$butt.click(function(){
$(path).fadeIn(400).removeClass('hide').promise().done(function(){
$('body').addClass('no-scroll');
});
});
});
$('.closer').click(function(){
$( '.bio' ).fadeOut(400);
$('body').removeClass('no-scroll');
});
$( document ).on( 'keydown', function ( e ) {
if ( e.keyCode === 27 ) { // ESC
$( '.bio' ).fadeOut(400);
$('body').removeClass('no-scroll');
}
});
// $('.covers').each(function(){
// $cover = $(this);
// var id = $cover.attr('id');
// var section = '#' + id + '-gall';
// $cover.click(function(){
// $(this).addClass('selected');
// $(this).siblings().removeClass('selected');
// if($('#wrapper').hasClass("toggled")){
// $('.gall').fadeOut(150).promise().done(function(){
// scrollToSection( '#gallery' );
// $(section).fadeIn(800).removeClass('hide');
// });
// }else{
// $("#wrapper").addClass("toggled");
// $('.gall').fadeOut(50);
// scrollToSectionPlus( '#gallery' );
// $(section).fadeIn(800).removeClass('hide');
// }
// });
// });
$('.gallery-thumb').each(function(){
$cover = $(this);
$cover.click(function(){
$(this).addClass('selected');
$(this).parents('li.product-category').siblings('li.product-category').children('div.gallery-thumb').removeClass('selected');
// $('i.to-top').removeClass('hide');
// alert('ok');
});
});
// $(".menu-toggle").click(function(e) {
// e.preventDefault();
// $("#wrapper").toggleClass("toggled");
// console.log("toggle");
// });
$('.to-top').click(function(){
$('body').animate({ scrollTop: 0 }, 400);
});
//$('.covers').on('click', function(e){
// scrollToSection( '#gallery' );
// return false;
// })
// function scrollToSection( section_name ){
// var scroll_to = $(section_name).offset().top;
// $('html, body').animate({ scrollTop: scroll_to }, 650, function(){
// window.location.hash = section_name;
// } );
// }
// function scrollToSectionPlus( section_name ){
// var scroll_to = $(section_name).offset().top + 100;
// $('html, body').animate({ scrollTop: scroll_to }, 600, function(){
// window.location.hash = section_name;
// } );
// }
|
/* bundleLogger
------------
Provides gulp style logs to the bundle method in browserify.js
*/
var gutil = require('gulp-util');
var prettyHrtime = require('pretty-hrtime');
var startTime;
module.exports = {
start: function(filepath) {
startTime = process.hrtime();
gutil.log('Bundling', gutil.colors.green(filepath) + '...');
},
end: function(filepath) {
var taskTime = process.hrtime(startTime);
var prettyTime = prettyHrtime(taskTime);
gutil.log('Bundled', gutil.colors.green(filepath), 'in', gutil.colors.magenta(prettyTime));
}
};
|
let valor // não inicializada
console.log(valor)
//console.log(valor2) //produz erro
valor = null //ausencia de valor
console.log(valor)
//console.log(valor.toString()) //produz erro
const produto = {}
console.log(produto.preco) //retorna undefined
console.log(produto) //retorna {}
produto.preco = 3.50
console.log(produto)
produto.preco = undefined //evite atribuir undefined
console.log(!!produto.preco)
console.log(produto)
//delete produto.preco
//console.log(produto)
produto.preco = null //sem preço
console.log(!!produto.preco)
console.log(produto)
|
import React from 'react';
import "./Display.css";
export default function Display(props) {
return (
<div className="card">
<div>
<a href={props.website} target="_blank" rel="noopener noreferrer">
<img className="first" src={props.imgUrl} alt="" />
<div className="overlay">
<h5> {props.info} </h5>
</div>
</a>
</div>
</div>
);
}
|
/**
* Hashcolor file.
*
* Credits go to:
* - panpawn and jd
*/
'use strict';
const fs = require('fs');
let customColors = {};
function load() {
fs.readFile('config/customcolors.json', 'utf8', function (err, file) {
if (err) return;
customColors = JSON.parse(file);
});
}
setInterval(function () {
load();
}, 500);
function updateColor() {
fs.writeFileSync('config/customcolors.json', JSON.stringify(customColors));
let newCss = '/* COLORS START */\n';
for (let name in customColors) {
newCss += generateCSS(name, customColors[name]);
}
newCss += '/* COLORS END */\n';
let file = fs.readFileSync('config/custom.css', 'utf8').split('\n');
if (~file.indexOf('/* COLORS START */')) file.splice(file.indexOf('/* COLORS START */'), (file.indexOf('/* COLORS END */') - file.indexOf('/* COLORS START */')) + 1);
fs.writeFileSync('config/custom.css', file.join('\n') + newCss);
SG.reloadCSS();
}
function generateCSS(name, color) {
let css = '';
let rooms = [];
name = toId(name);
Rooms.rooms.forEach((curRoom, id) => {
if (id === 'global' || curRoom.type !== 'chat' || curRoom.isPersonal) return;
if (!isNaN(Number(id.charAt(0)))) return;
rooms.push('#' + id + '-userlist-user-' + name + ' strong em');
rooms.push('#' + id + '-userlist-user-' + name + ' strong');
rooms.push('#' + id + '-userlist-user-' + name + ' span');
});
css = rooms.join(', ');
css += '{\ncolor: ' + color + ' !important;\n}\n';
css += '.chat.chatmessage-' + name + ' strong {\n';
css += 'color: ' + color + ' !important;\n}\n';
return css;
}
exports.commands = {
customcolour: 'customcolor',
customcolor: {
set: function (target, room, user) {
if (!this.can('roomowner')) return false;
target = target.split(',');
for (let u = 0; u < target.length; u++) target[u] = target[u].trim();
if (!target[1]) return this.parse('/help customcolor');
if (toId(target[0]).length > 19) return this.errorReply("Usernames are not this long...");
this.sendReply("|raw|You have given <b><font color=" + target[1] + ">" + Chat.escapeHTML(target[0]) + "</font></b> a custom color.");
this.privateModCommand("(" + target[0] + " has received custom color: '" + target[1] + "' from " + user.name + ".)");
Monitor.adminlog(target[0] + " has received custom color: '" + target[1] + "' from " + user.name + ".");
customColors[toId(target[0])] = target[1];
updateColor();
},
delete: function (target, room, user) {
if (!this.can('roomowner')) return false;
if (!target) return this.parse('/help customcolor');
if (!customColors[toId(target)]) return this.errorReply('/customcolor - ' + target + ' does not have a custom color.');
delete customColors[toId(target)];
updateColor();
this.sendReply("You removed " + target + "'s custom color.");
this.privateModCommand("(" + target + "'s custom color was removed by " + user.name + ".)");
Monitor.adminlog(target + "'s custom color was removed by " + user.name + ".");
if (Users(target) && Users(target).connected) Users(target).popup(user.name + " removed your custom color.");
return;
},
preview: function (target, room, user) {
if (!this.runBroadcast()) return;
target = target.split(',');
for (let u = 0; u < target.length; u++) target[u] = target[u].trim();
if (!target[1]) return this.parse('/help customcolor');
return this.sendReplyBox('<b><font size="3" color="' + target[1] + '">' + Chat.escapeHTML(target[0]) + '</font></b>');
},
reload: function (target, room, user) {
if (!this.can('hotpatch')) return false;
updateColor();
this.privateModCommand("(" + user.name + " has reloaded custom colours.)");
},
'': function (target, room, user) {
return this.parse("/help customcolor");
},
},
customcolorhelp: [
"Commands Include:",
"/customcolor set [user], [hex] - Gives [user] a custom color of [hex]",
"/customcolor delete [user], delete - Deletes a user's custom color",
"/customcolor reload - Reloads colours.",
"/customcolor preview [user], [hex] - Previews what that username looks like with [hex] as the color.",
],
'!hex': true,
hex: function (target, room, user) {
if (!this.runBroadcast()) return;
let targetUser = (target ? target : user.name);
this.sendReplyBox('The hex code of ' + SG.nameColor(targetUser, true) + ' is: <font color="' + SG.hashColor(targetUser) + '"><b>' + SG.hashColor(targetUser) + '</b></font>');
},
};
/* Pokemon Showdown hashColor function
* This gives the color of a username
* based on the userid.
*/
/*eslint-disable */
function MD5(e) {
function t(e, t) {
var n, r, i, s, o;
i = e & 2147483648;
s = t & 2147483648;
n = e & 1073741824;
r = t & 1073741824;
o = (e & 1073741823) + (t & 1073741823);
return n & r ? o ^ 2147483648 ^ i ^ s : n | r ? o & 1073741824 ? o ^ 3221225472 ^ i ^ s : o ^ 1073741824 ^ i ^ s : o ^ i ^ s;
}
function n(e, n, r, i, s, o, u) {
e = t(e, t(t(n & r | ~n & i, s), u));
return t(e << o | e >>> 32 - o, n);
}
function r(e, n, r, i, s, o, u) {
e = t(e, t(t(n & i | r & ~i, s), u));
return t(e << o | e >>> 32 - o, n);
}
function i(e, n, r, i, s, o, u) {
e = t(e, t(t(n ^ r ^ i, s), u));
return t(e << o | e >>> 32 - o, n);
}
function s(e, n, r, i, s, o, u) {
e = t(e, t(t(r ^ (n | ~i), s), u));
return t(e << o | e >>> 32 - o, n);
}
function o(e) {
var t = "",
n = "",
r;
for (r = 0; r <= 3; r++) n = e >>> r * 8 & 255, n = "0" + n.toString(16), t += n.substr(n.length - 2, 2);
return t
}
var u = [],
a, f, l, c, h, p, d, v, e = function(e) {
for (var e = e.replace(/\r\n/g, "\n"), t = "", n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
r < 128 ? t += String.fromCharCode(r) : (r > 127 && r < 2048 ? t += String.fromCharCode(r >> 6 | 192) : (t += String.fromCharCode(r >> 12 | 224), t += String.fromCharCode(r >> 6 & 63 | 128)), t += String.fromCharCode(r & 63 | 128));
}
return t;
}(e),
u = function(e) {
var t, n = e.length;
t = n + 8;
for (var r = ((t - t % 64) / 64 + 1) * 16, i = Array(r - 1), s = 0, o = 0; o < n;) t = (o - o % 4) / 4, s = o % 4 * 8, i[t] |= e.charCodeAt(o) << s, o++;
i[(o - o % 4) / 4] |= 128 << o % 4 * 8;
i[r - 2] = n << 3;
i[r - 1] = n >>> 29;
return i;
}(e);
h = 1732584193;
p = 4023233417;
d = 2562383102;
v = 271733878;
for (e = 0; e < u.length; e += 16) a = h, f = p, l = d, c = v, h = n(h, p, d, v, u[e + 0], 7, 3614090360), v = n(v, h, p, d, u[e + 1], 12, 3905402710), d = n(d, v, h, p, u[e + 2], 17, 606105819), p = n(p, d, v, h, u[e + 3], 22, 3250441966), h = n(h, p, d, v, u[e + 4], 7, 4118548399), v = n(v, h, p, d, u[e + 5], 12, 1200080426), d = n(d, v, h, p, u[e + 6], 17, 2821735955), p = n(p, d, v, h, u[e + 7], 22, 4249261313), h = n(h, p, d, v, u[e + 8], 7, 1770035416), v = n(v, h, p, d, u[e + 9], 12, 2336552879), d = n(d, v, h, p, u[e + 10], 17, 4294925233), p = n(p, d, v, h, u[e + 11], 22, 2304563134), h = n(h, p, d, v, u[e + 12], 7, 1804603682), v = n(v, h, p, d, u[e + 13], 12, 4254626195), d = n(d, v, h, p, u[e + 14], 17, 2792965006), p = n(p, d, v, h, u[e + 15], 22, 1236535329), h = r(h, p, d, v, u[e + 1], 5, 4129170786), v = r(v, h, p, d, u[e + 6], 9, 3225465664), d = r(d, v, h, p, u[e + 11], 14, 643717713), p = r(p, d, v, h, u[e + 0], 20, 3921069994), h = r(h, p, d, v, u[e + 5], 5, 3593408605), v = r(v, h, p, d, u[e + 10], 9, 38016083), d = r(d, v, h, p, u[e + 15], 14, 3634488961), p = r(p, d, v, h, u[e + 4], 20, 3889429448), h = r(h, p, d, v, u[e + 9], 5, 568446438), v = r(v, h, p, d, u[e + 14], 9, 3275163606), d = r(d, v, h, p, u[e + 3], 14, 4107603335), p = r(p, d, v, h, u[e + 8], 20, 1163531501), h = r(h, p, d, v, u[e + 13], 5, 2850285829), v = r(v, h, p, d, u[e + 2], 9, 4243563512), d = r(d, v, h, p, u[e + 7], 14, 1735328473), p = r(p, d, v, h, u[e + 12], 20, 2368359562), h = i(h, p, d, v, u[e + 5], 4, 4294588738), v = i(v, h, p, d, u[e + 8], 11, 2272392833), d = i(d, v, h, p, u[e + 11], 16, 1839030562), p = i(p, d, v, h, u[e + 14], 23, 4259657740), h = i(h, p, d, v, u[e + 1], 4, 2763975236), v = i(v, h, p, d, u[e + 4], 11, 1272893353), d = i(d, v, h, p, u[e + 7], 16, 4139469664), p = i(p, d, v, h, u[e + 10], 23, 3200236656), h = i(h, p, d, v, u[e + 13], 4, 681279174), v = i(v, h, p, d, u[e + 0], 11, 3936430074), d = i(d, v, h, p, u[e + 3], 16, 3572445317), p = i(p, d, v, h, u[e + 6], 23, 76029189), h = i(h, p, d, v, u[e + 9], 4, 3654602809), v = i(v, h, p, d, u[e + 12], 11, 3873151461), d = i(d, v, h, p, u[e + 15], 16, 530742520), p = i(p, d, v, h, u[e + 2], 23, 3299628645), h = s(h, p, d, v, u[e + 0], 6, 4096336452), v = s(v, h, p, d, u[e + 7], 10, 1126891415), d = s(d, v, h, p, u[e + 14], 15, 2878612391), p = s(p, d, v, h, u[e + 5], 21, 4237533241), h = s(h, p, d, v, u[e + 12], 6, 1700485571), v = s(v, h, p, d, u[e + 3], 10, 2399980690), d = s(d, v, h, p, u[e + 10], 15, 4293915773), p = s(p, d, v, h, u[e + 1], 21, 2240044497), h = s(h, p, d, v, u[e + 8], 6, 1873313359), v = s(v, h, p, d, u[e + 15], 10, 4264355552), d = s(d, v, h, p, u[e + 6], 15, 2734768916), p = s(p, d, v, h, u[e + 13], 21, 1309151649), h = s(h, p, d, v, u[e + 4], 6, 4149444226), v = s(v, h, p, d, u[e + 11], 10, 3174756917), d = s(d, v, h, p, u[e + 2], 15, 718787259), p = s(p, d, v, h, u[e + 9], 21, 3951481745), h = t(h, a), p = t(p, f), d = t(d, l), v = t(v, c);
return (o(h) + o(p) + o(d) + o(v)).toLowerCase();
}
/*eslint-enable */
let colorCache = {};
// hashColor function
SG.hashColor = function (name) {
name = toId(name);
if (customColors[name]) return customColors[name];
if (colorCache[name]) return colorCache[name];
let hash = MD5(name);
let H = parseInt(hash.substr(4, 4), 16) % 360; // 0 to 360
let S = parseInt(hash.substr(0, 4), 16) % 50 + 40; // 40 to 89
let L = Math.floor(parseInt(hash.substr(8, 4), 16) % 20 + 30); // 30 to 49
let C = (100 - Math.abs(2 * L - 100)) * S / 100 / 100;
let X = C * (1 - Math.abs((H / 60) % 2 - 1));
let m = L / 100 - C / 2;
let R1, G1, B1;
switch (Math.floor(H / 60)) {
case 1:
R1 = X;
G1 = C;
B1 = 0;
break;
case 2:
R1 = 0;
G1 = C;
B1 = X;
break;
case 3:
R1 = 0;
G1 = X;
B1 = C;
break;
case 4:
R1 = X;
G1 = 0;
B1 = C;
break;
case 5:
R1 = C;
G1 = 0;
B1 = X;
break;
case 0:
default:
R1 = C;
G1 = X;
B1 = 0;
break;
}
let lum = (R1 + m) * 0.2126 + (G1 + m) * 0.7152 + (B1 + m) * 0.0722; // 0.05 (dark blue) to 0.93 (yellow)
let HLmod = (lum - 0.5) * -100; // -43 (yellow) to 45 (dark blue)
if (HLmod > 12) {
HLmod -= 12;
} else if (HLmod < -10) {
HLmod = (HLmod + 10) * 2 / 3;
} else {
HLmod = 0;
}
L += HLmod;
let Smod = 10 - Math.abs(50 - L);
if (HLmod > 15) Smod += (HLmod - 15) / 2;
S -= Smod;
let rgb = hslToRgb(H, S, L);
colorCache[name] = "#" + rgbToHex(rgb.r, rgb.g, rgb.b);
return colorCache[name];
};
function hslToRgb(h, s, l) {
let r, g, b, m, c, x;
if (!isFinite(h)) h = 0;
if (!isFinite(s)) s = 0;
if (!isFinite(l)) l = 0;
h /= 60;
if (h < 0) h = 6 - (-h % 6);
h %= 6;
s = Math.max(0, Math.min(1, s / 100));
l = Math.max(0, Math.min(1, l / 100));
c = (1 - Math.abs((2 * l) - 1)) * s;
x = c * (1 - Math.abs((h % 2) - 1));
if (h < 1) {
r = c;
g = x;
b = 0;
} else if (h < 2) {
r = x;
g = c;
b = 0;
} else if (h < 3) {
r = 0;
g = c;
b = x;
} else if (h < 4) {
r = 0;
g = x;
b = c;
} else if (h < 5) {
r = x;
g = 0;
b = c;
} else {
r = c;
g = 0;
b = x;
}
m = l - c / 2;
r = Math.round((r + m) * 255);
g = Math.round((g + m) * 255);
b = Math.round((b + m) * 255);
return {
r: r,
g: g,
b: b,
};
}
function rgbToHex(R, G, B) {
return toHex(R) + toHex(G) + toHex(B);
}
function toHex(N) {
if (N === null || N === undefined) return "00";
N = parseInt(N);
if (N === 0 || isNaN(N)) return "00";
N = Math.max(0, N);
N = Math.min(N, 255);
N = Math.round(N);
return "0123456789ABCDEF".charAt((N - N % 16) / 16) + "0123456789ABCDEF".charAt(N % 16);
}
|
// Make a linked list for all of the ndeos at each level of a binary tree
// We can keep track of the level as one of the arguments and recursively add linked lists as we go
// See ref file for linked list class
function createListForEachDepth(rootNode, arrayOfLists, level) {
// If no node is there, terminate
if (rootNode === null) {
return ;
}
// If we're at a new level, add a new linked list
if (arrayOfLists.length < level) {
arrayOfLists.push(new LinkedList());
}
// Append the node to the linked list at that level
arrayOfLists[level - 1].appendNode = rootNode;
// Take a step down in the tree and add a level
createListForEachDepth(rootNode.left, arrayOfLists, level + 1);
createListForEachDepth(rootNode.right, arrayOfLists, level + 1);
}
var ourList = createListForEachDepth(binaryTree, [], 0);
|
import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
Vue.use(Vuex)
// https://webpack.js.org/guides/dependency-management/#requirecontext
const modulesFiles = require.context('./modules', true, /\.js$/)
// 不需要像这样`import app from './modules/app'`中导入应用
// 它将自动获取模块文件中的所有vuex模块
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
// set './app.js' => 'app'
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
const value = modulesFiles(modulePath)
modules[moduleName] = value.default
return modules
}, {})
// Vuex五个对象
// (1)State:状态数(值)
// (2)Getter:类似store的计算属性
// (3)Mutation:用于改变状态(值)
// (4)actions:调用Mutation,而不是直接变更状态(可以包含任意异步操作)。
// (5)modules:集中多Vuex个为一个模块
// 详情:https://vuex.vuejs.org/zh/guide/actions.html
const store = new Vuex.Store({
modules,
getters
})
export default store
|
!function(e){const l=e.ar=e.ar||{};l.dictionary=Object.assign(l.dictionary||{},{"%0 of %1":"","Align center":"محاذاة في المنتصف","Align left":"محاذاة لليسار","Align right":"محاذاة لليمين",Aquamarine:"",Big:"كبير",Black:"","Block quote":"اقتباس",Blue:"",Bold:"عريض","Bulleted List":"قائمة نقطية",Cancel:"إلغاء","Cannot upload file:":"لا يمكن رفع الملف:","Centered image":"صورة بالوسط","Change image text alternative":"غير النص البديل للصورة",Column:"عمود",Default:"افتراضي","Delete column":"حذف العمود","Delete row":"حذف الصف","Dim grey":"","Document colors":"",Downloadable:"","Dropdown toolbar":"","Edit link":"تحرير الرابط","Editor toolbar":"","Enter image caption":"ادخل عنوان الصورة","Font Background Color":"","Font Color":"","Font Family":"نوع الخط","Font Size":"حجم الخط","Full size image":"صورة بحجم كامل",Green:"",Grey:"","Header column":"عمود عنوان","Header row":"صف عنوان",Huge:"ضخم","Image toolbar":"","image widget":"عنصر الصورة",Insert:"","Insert column left":"","Insert column right":"","Insert image":"ادراج صورة","Insert image via URL":"","Insert row above":"ادراج صف قبل","Insert row below":"ادراج صف بعد","Insert table":"إدراج جدول",Italic:"مائل",Justify:"ضبط","Left aligned image":"صورة بمحاذاة لليسار","Light blue":"","Light green":"","Light grey":"",Link:"رابط","Link URL":"رابط عنوان","Merge cell down":"دمج الخلايا للأسفل","Merge cell left":"دمج الخلايا لليسار","Merge cell right":"دمج الخلايا لليمين","Merge cell up":"دمج الخلايا للأعلى","Merge cells":"دمج الخلايا",Next:"","Numbered List":"قائمة رقمية","Open in a new tab":"","Open link in new tab":"فتح الرابط في تبويب جديد",Orange:"","Paste the image source URL.":"",Previous:"",Purple:"",Red:"",Redo:"إعادة","Remove color":"","Rich Text Editor, %0":"معالج نصوص، 0%","Right aligned image":"صورة بمحاذاة لليمين",Row:"صف",Save:"حفظ","Select column":"","Select row":"","Show more items":"","Side image":"صورة جانبية",Small:"صغير","Split cell horizontally":"فصل الخلايا بشكل افقي","Split cell vertically":"فصل الخلايا بشكل عمودي",Strikethrough:"يتوسطه خط","Table toolbar":"","Text alignment":"محاذاة النص","Text alignment toolbar":"","Text alternative":"النص البديل","This link has no URL":"لا يحتوي هذا الرابط على عنوان",Tiny:"ضئيل",Turquoise:"",Underline:"تحته خط",Undo:"تراجع",Unlink:"إلغاء الرابط",Update:"","Upload failed":"فشل الرفع","Upload in progress":"جاري الرفع",White:"",Yellow:""}),l.getPluralForm=function(e){return 0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
// !LOCNS:galactic_war
define(['shared/gw_common'], function (GW) {
return {
visible: function(params) { return true; },
describe: function(params) {
return '!LOC(galactic_war:orbital_combat_tech_increases_speed_of_all_orbital_units_by_50_health_by_50_and_damage_by_25.message):Orbital Combat Tech increases speed of all orbital units by 50%, health by 50%, and damage by 25%';
},
summarize: function(params) {
return '!LOC(galactic_war:orbital_combat_tech.message):Orbital Combat Tech';
},
icon: function(params) {
return 'coui://ui/main/game/galactic_war/gw_play/img/tech/gwc_orbital.png';
},
audio: function (parms) {
return {
found: 'PA/VO/Computer/gw/board_tech_available_combat'
}
},
getContext: function (galaxy) {
return {
totalSize: galaxy.stars().length
};
},
deal: function (system, context) {
var chance = 0;
var dist = system.distance();
if (dist > 0) {
if (context.totalSize <= GW.balance.numberOfSystems[0]) {
chance = 28;
if (dist > 4)
chance = 142;
}
else if (context.totalSize <= GW.balance.numberOfSystems[1]) {
chance = 28;
if (dist > 6)
chance = 142;
}
else if (context.totalSize <= GW.balance.numberOfSystems[2]) {
chance = 28;
if (dist > 9)
chance = 142;
}
else if (context.totalSize <= GW.balance.numberOfSystems[3]) {
chance = 28;
if (dist > 11)
chance = 142;
}
else {
chance = 28;
if (dist > 13)
chance = 142;
}
}
return { chance: chance };
},
buff: function(inventory, params) {
var units = [
'/pa/units/orbital/orbital_fighter/orbital_fighter.json',
'/pa/units/orbital/orbital_lander/orbital_lander.json',
'/pa/units/orbital/radar_satellite/radar_satellite.json',
'/pa/units/orbital/solar_array/solar_array.json',
'/pa/units/orbital/defense_satellite/defense_satellite.json',
'/pa/units/orbital/orbital_laser/orbital_laser.json',
'/pa/units/orbital/radar_satellite_adv/radar_satellite_adv.json',
'/pa/units/orbital/orbital_factory/orbital_factory.json',
'/pa/units/orbital/orbital_fabrication_bot/orbital_fabrication_bot.json',
'/pa/units/orbital/mining_platform/mining_platform.json',
];
var mods = [];
var modUnit = function (unit) {
mods.push({
file: unit,
path: 'navigation.move_speed',
op: 'multiply',
value: 1.5
});
mods.push({
file: unit,
path: 'navigation.brake',
op: 'multiply',
value: 1.5
});
mods.push({
file: unit,
path: 'navigation.acceleration',
op: 'multiply',
value: 1.5
});
mods.push({
file: unit,
path: 'navigation.turn_speed',
op: 'multiply',
value: 1.5
});
mods.push({
file: unit,
path: 'max_health',
op: 'multiply',
value: 1.5
});
};
_.forEach(units, modUnit);
var ammos = [
'/pa/units/orbital/orbital_fighter/orbital_fighter_ammo.json',
'/pa/units/orbital/defense_satellite/defense_satellite_ammo.json',
'/pa/units/orbital/defense_satellite/defense_satellite_ammo_ground.json',
'/pa/units/orbital/defense_satellite/defense_satellite_ammo_orbital.json',
'/pa/units/orbital/orbital_laser/orbital_laser_ammo.json',
];
var modAmmo = function (ammo) {
mods.push({
file: ammo,
path: 'damage',
op: 'multiply',
value: 1.25
});
};
_.forEach(ammos, modAmmo);
inventory.addMods(mods);
},
dull: function(inventory) {
}
};
});
|
import {
moduleFor,
test
} from 'ember-qunit';
moduleFor('controller:mixer', 'MixerController', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
// Replace this with your real tests.
test('it exists', function() {
var controller = this.subject();
ok(controller);
});
|
/* eslint-disable */
import axios from 'axios';
// 创建 axios 实例
const service = axios.create({
// baseURL: process.env.BASE_API, // api的base_url
baseURL: 'https://www.easy-mock.com/mock/59b391ede0dc663341a33a00/resume/',
timeout: 5000, // 请求超时时间
});
// request 拦截器
service.interceptors.request.use(config => config, (error) => {
console.log(error);
return Promise.reject(error);
});
// response 拦截器
service.interceptors.response.use(response => response.data, (error) => {
console.log(`err${error}`);
return Promise.reject(error);
});
export default service;
|
/* 2018-9-18 19:24:17 | 版权所有 国信科技 http://ciatgis.cn */
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"function"==typeof define&&define.amd?define(e):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e():t.jeDate=e()}(this,function(){var doc=document,win=window,jet={},doc=document,regymdzz="YYYY|MM|DD|hh|mm|ss|zz",gr=/\-/g,regymd="YYYY|MM|DD|hh|mm|ss|zz".replace("|zz",""),parseInt=function(t){return window.parseInt(t,10)},$Q=function(t,e){return e=e||document,t.nodeType?t:e.querySelector(t)},jeDate=function(t,e){return new jeDatePick(t,"function"==typeof e?e():e)};function DateTime(t,e){var a=this,n=new Date,s=["FullYear","Month","Date","Hours","Minutes","Seconds"],l=jet.extend({YYYY:null,MM:null,DD:null,hh:n.getHours(),mm:n.getMinutes(),ss:n.getSeconds()},e),i=null==e?n:new Date(l.YYYY,l.MM,l.DD,l.hh,l.mm,l.ss);0<(t||[]).length&&jet.each(t,function(t,e){i["set"+s[t]]("Month"==s[t]?parseInt(e)-1:parseInt(e))}),a.reDate=function(){return new DateTime},a.GetValue=function(){return i},a.GetYear=function(){return i.getFullYear()},a.GetMonth=function(){return i.getMonth()+1},a.GetDate=function(){return i.getDate()},a.GetHours=function(){return i.getHours()},a.GetMinutes=function(){return i.getMinutes()},a.GetSeconds=function(){return i.getSeconds()}}function jeDatePick(t,e){this.$opts=jet.extend({language:{name:"cn",month:["01","02","03","04","05","06","07","08","09","10","11","12"],weeks:["日","一","二","三","四","五","六"],times:["小时","分钟","秒数"],timetxt:["时间选择","开始时间","结束时间"],backtxt:"返回日期",clear:"清空",today:"现在",yes:"确定"},format:"YYYY-MM-DD hh:mm:ss",minDate:"1900-01-01 00:00:00",maxDate:"2099-12-31 23:59:59",isShow:!0,multiPane:!0,onClose:!0,range:!1,trigger:"click",position:[],valiDate:[],isinitVal:!1,initDate:{},isTime:!0,isClear:!0,isToday:!0,isYes:!0,festival:!1,fixed:!0,zIndex:2099,method:{},theme:{},shortcut:[],donefun:null,before:null,succeed:null},e||{}),this.valCell=$Q(t),this.format=this.$opts.format,null!=this.valCell?this.init():alert(t+" ID或类名不存在!"),jet.extend(this,this.$opts.method),delete this.$opts.method}jeDate.dateVer="V6.5.0",jeDate.extend=jet.extend=function(){var t,e,a,n=arguments[0],s=1,l=arguments.length;for("boolean"==typeof n&&(n,n=arguments[1]||{},s=2),"object"!==_typeof(n)&&"function"!=typeof n&&(n={}),l===s&&(n=this,--s);s<l;s++)if(null!=(t=arguments[s]))for(e in t)n[e],n!==(a=t[e])&&void 0!==a&&(n[e]=a);return n},jeDate.nowDate=function(t,e){return e=e||"YYYY-MM-DD hh:mm:ss",isNaN(t)||(t={DD:t}),jet.parse(jet.getDateTime(t),e)},jeDate.convert=function(t){t.format=t.format||"YYYY-MM-DD hh:mm:ss",t.addval=t.addval||[];var a=jet.reMatch(t.format),n={};jet.each(jet.reMatch(t.val),function(t,e){n[a[t]]=parseInt(e)});var e=new DateTime(t.addval,n);return{YYYY:e.GetYear(),MM:e.GetMonth(),DD:e.GetDate(),hh:e.GetHours(),mm:e.GetMinutes(),ss:e.GetSeconds()}},jeDate.valText=function(t,e){return jet.valText(t,e)},jeDate.timeStampDate=function(t,e){e=e||"YYYY-MM-DD hh:mm:ss";var a=/^(-)?\d{1,10}$/.test(t)||/^(-)?\d{1,13}$/.test(t);if(/^[1-9]*[1-9][0-9]*$/.test(t)&&a){var n=parseInt(t);if(/^(-)?\d{1,10}$/.test(n))n*=1e3;else if(/^(-)?\d{1,13}$/.test(n))n*=1e3;else{if(!/^(-)?\d{1,14}$/.test(n))return void alert("时间戳格式不正确");n*=100}var s=new Date(n);return jet.parse({YYYY:s.getFullYear(),MM:jet.digit(s.getMonth()+1),DD:jet.digit(s.getDate()),hh:jet.digit(s.getHours()),mm:jet.digit(s.getMinutes()),ss:jet.digit(s.getSeconds())},e)}var l=jet.reMatch(t),i=new Date(l[0],l[1]-1,l[2],l[3]||0,l[4]||0,l[5]||0);return Math.round(i.getTime()/1e3)},jeDate.getLunar=function(t){var e=jeLunar(t.YYYY,parseInt(t.MM)-1,t.DD);return{nM:e.lnongMonth,nD:e.lnongDate,cY:parseInt(e.solarYear),cM:parseInt(e.solarMonth),cD:parseInt(e.solarDate),cW:e.inWeekDays,nW:e.solarWeekDay}},jeDate.parse=jet.parse=function(a,t){return t.replace(new RegExp(regymdzz,"g"),function(t,e){return"zz"==t?"00":jet.digit(a[t])})},jet.extend(jet,{isType:function(t,e){return Object.prototype.toString.call(t)=="[object "+e.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(t){return t.toUpperCase()})+"]"},each:function(t,e,a){var n,s=0,l=t.length;if(void 0===l||"function"===t){for(n in t)if(!1===e.call(t[n],n,t[n]))break}else for(;s<l&&!1!==e.call(t[s],s,t[s++]););return t},on:function(t,e,a){return t.addEventListener?(t.addEventListener(e,a,!1),!0):t.attachEvent?t.attachEvent("on"+e,a):void(t["on"+e]=a)},isObj:function(t){for(var e in t)return!0;return!1},trim:function(t){return t.replace(/(^\s*)|(\s*$)/g,"")},reMatch:function(t){var a=[],e="",n=/(^\w{4}|\w{2}\B)/g;return e=jet.isNum(t)?t.replace(n,"$1-"):/^[A-Za-z]+$/.test(t)?t.replace(n,"$1-"):t,jet.each(e.match(/\w+|d+/g),function(t,e){a.push(jet.isNum(e)?parseInt(e):e)}),a},equals:function(t,e){if(!e)return!1;if(t.length!=e.length)return!1;for(var a=0,n=t.length;a<n;a++)if(t[a]instanceof Array&&e[a]instanceof Array){if(!t[a].equals(e[a]))return!1}else if(t[a]!=e[a])return!1;return!0},docScroll:function(t){return t=t?"scrollLeft":"scrollTop",document.body[t]|document.documentElement[t]},docArea:function(t){return document.documentElement[t?"clientWidth":"clientHeight"]},digit:function(t){return t<10?"0"+(0|t):t},isNum:function(t){return!!/^[+-]?\d*\.?\d*$/.test(t)},getDaysNum:function(t,e){var a=31,n=t%100!=0&&t%4==0||t%400==0;switch(parseInt(e)){case 2:a=n?29:28;break;case 4:case 6:case 9:case 11:a=30}return a},getYM:function(t,e,a){var n=new Date(t,e-1);return n.setMonth(e-1+a),{y:n.getFullYear(),m:n.getMonth()+1}},prevMonth:function(t,e,a){return jet.getYM(t,e,0-(a||1))},nextMonth:function(t,e,a){return jet.getYM(t,e,a||1)},setCss:function(t,e){for(var a in e)t.style[a]=e[a]},html:function(t,e){return void 0===e?t&&1===t.nodeType?t.innerHTML:void 0:void 0!==e&&1==e?t&&1===t.nodeType?t.outerHTML:void 0:t.innerHTML=e},text:function(t,e){var a=document.all?"innerText":"textContent";return void 0===e?t&&1===t.nodeType?t[a]:void 0:t[a]=e},val:function(t,e){if(void 0===e)return t&&1===t.nodeType&&void 0!==t.value?t.value:void 0;e=null==e?"":e+"",t.value=e},attr:function(t,e){return t.getAttribute(e)},hasClass:function(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},stopPropagation:function(t){t&&t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0},template:function(t,e){var a,n,s,l=/[^\w\-\.:]/.test(t)?t:document.getElementById(t).innerHTML;return a=e,n="var $out='"+l.replace(/[\r\n]/g,"").replace(/^(.+?)\{\%|\%\}(.+?)\{\%|\%\}(.+?)$/g,function(t){return t.replace(/(['"])/g,"\\$1")}).replace(/\{\%\s*=\s*(.+?)\%\}/g,"';$out+=$1;$out+='").replace(/\{\%(.+?)\%\}/g,"';$1;$out+='")+"';return new String($out);",s=function(t){var e="";for(var a in t)e+="var "+a+'= $D["'+a+'"];';return e}(a),new new Function("$D",s+n)(a)+""},isValDiv:function(t){return/textarea|input/.test(t.tagName.toLocaleLowerCase())},valText:function(t,e){var a=$Q(t),n=jet.isValDiv(a)?"val":"text";if(null==e)return jet[n](a);jet[n](a,e)},isBool:function(t){return null==t||1==t},getDateTime:function(t){var n=new DateTime,s=jet.extend({YYYY:null,MM:null,DD:null,hh:0,mm:0,ss:0},t),l={YYYY:"FullYear",MM:"Month",DD:"Date",hh:"Hours",mm:"Minutes",ss:"Seconds"};return jet.each(["ss","mm","hh","DD","MM","YYYY"],function(t,e){if(!jet.isNum(parseInt(s[e])))return null;var a=n.GetValue();!parseInt(s[e])&&0!=parseInt(s[e])||a["set"+l[e]](n["Get"+l[e]]()+("MM"==e?-1:0)+parseInt(s[e]))}),{YYYY:n.GetYear(),MM:n.GetMonth(),DD:n.GetDate(),hh:n.GetHours(),mm:n.GetMinutes(),ss:n.GetSeconds()}}});var searandom=function(){for(var t="",e=[1,2,3,4,5,6,7,8,9,0],a=0;a<8;a++)t+=e[Math.round(Math.random()*(e.length-1))];return t},jefix="jefixed",ymdzArr=jet.reMatch(regymdzz),elx="#jedate";function jeLunar(t,e,a){var d=[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42448,83315,21200,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46496,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,21952,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19415,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448],c=[0,21208,43467,63836,85337,107014,128867,150921,173149,195551,218072,240693,263343,285989,308563,331033,353350,375494,397447,419210,440795,462224,483532,504758],u=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],m="日一二三四五六七八九十",p=["正","二","三","四","五","六","七","八","九","十","十一","腊"],Y={"0101":"*1元旦节","0202":"湿地日","0214":"情人节","0308":"妇女节","0312":"植树节","0315":"消费者权益日","0401":"愚人节","0422":"地球日","0501":"*1劳动节","0504":"青年节","0512":"护士节","0518":"博物馆日","0520":"母亲节","0601":"儿童节","0623":"奥林匹克日","0630":"父亲节","0701":"建党节","0801":"建军节","0903":"抗战胜利日","0910":"教师节",1001:"*3国庆节",1201:"艾滋病日",1224:"平安夜",1225:"圣诞节"},f={"0100":"除夕","0101":"*2春节","0115":"元宵节","0505":"*1端午节","0707":"七夕节","0715":"中元节","0815":"*1中秋节","0909":"*1重阳节",1015:"下元节",1208:"腊八节",1223:"小年"};return new function(t){function e(t,e){return new Date(31556925974.7*(t-1900)+6e4*c[e]+Date.UTC(1900,0,6,2,5)).getUTCDate()}function l(t){var e,a=348;for(e=32768;8<e;e>>=1)a+=d[t-1900]&e?1:0;return a+r(t)}function a(t){return"甲乙丙丁戊己庚辛壬癸".charAt(t%10)+"子丑寅卯辰巳午未申酉戌亥".charAt(t%12)}function i(t,e){return d[t-1900]&65536>>e?30:29}function n(t){return t<10?"0"+(0|t):t}function s(t,e){var a=t;return e.replace(/dd?d?d?|MM?M?M?|yy?y?y?/g,function(t){switch(t){case"yyyy":var e="000"+a.getFullYear();return e.substring(e.length-4);case"dd":return n(a.getDate());case"d":return a.getDate().toString();case"MM":return n(a.getMonth()+1);case"M":return a.getMonth()+1}})}var r=function(t){return o(t)?65536&d[t-1900]?30:29:0},o=function(t){return 15&d[t-1900]};this.isToday=!1,this.isRestDay=!1,this.solarYear=s(t,"yyyy"),this.solarMonth=s(t,"M"),this.solarDate=s(t,"d"),this.solarWeekDay=t.getDay(),this.inWeekDays="星期"+m.charAt(this.solarWeekDay);var h=new function(t){var e,a,n=0,s=(t-new Date(1900,0,31))/864e5;for(this.dayCyl=s+40,this.monCyl=14,e=1900;e<2050&&0<s;e++)s-=n=l(e),this.monCyl+=12;for(s<0&&(s+=n,e--,this.monCyl-=12),this.year=e,this.yearCyl=e-1864,a=o(e),this.isLeap=!1,e=1;e<13&&0<s;e++)n=0<a&&e==a+1&&0==this.isLeap?(--e,this.isLeap=!0,r(this.year)):i(this.year,e),1==this.isLeap&&e==a+1&&(this.isLeap=!1),s-=n,0==this.isLeap&&this.monCyl++;0==s&&0<a&&e==a+1&&(this.isLeap?this.isLeap=!1:(this.isLeap=!0,--e,--this.monCyl)),s<0&&(s+=n,--e,--this.monCyl),this.month=e,this.day=s+1}(t);this.lunarYear=h.year,this.shengxiao="鼠牛虎兔龙蛇马羊猴鸡狗猪".charAt((this.lunarYear-4)%12),this.lunarMonth=h.month,this.lunarIsLeapMonth=h.isLeap,this.lnongMonth=this.lunarIsLeapMonth?"闰"+p[h.month-1]:p[h.month-1],this.lunarDate=h.day,this.showInLunar=this.lnongDate=function(t,e){var a;switch(e){case 10:a="初十";break;case 20:a="二十";break;case 30:a="三十";break;default:a="初十廿卅".charAt(Math.floor(e/10)),a+=m.charAt(e%10)}return a}(this.lunarMonth,this.lunarDate),1==this.lunarDate&&(this.showInLunar=this.lnongMonth+"月"),this.ganzhiYear=a(h.yearCyl),this.ganzhiMonth=a(h.monCyl),this.ganzhiDate=a(h.dayCyl++),this.jieqi="",this.restDays=0,e(this.solarYear,2*(this.solarMonth-1))==s(t,"d")&&(this.showInLunar=this.jieqi=u[2*(this.solarMonth-1)]),e(this.solarYear,2*(this.solarMonth-1)+1)==s(t,"d")&&(this.showInLunar=this.jieqi=u[2*(this.solarMonth-1)+1]),"清明"==this.showInLunar&&(this.showInLunar="清明节",this.restDays=1),this.solarFestival=Y[s(t,"MM")+s(t,"dd")],void 0===this.solarFestival?this.solarFestival="":/\*(\d)/.test(this.solarFestival)&&(this.restDays=parseInt(RegExp.$1),this.solarFestival=this.solarFestival.replace(/\*\d/,"")),this.showInLunar=""==this.solarFestival?this.showInLunar:this.solarFestival,this.lunarFestival=f[this.lunarIsLeapMonth?"00":n(this.lunarMonth)+n(this.lunarDate)],void 0===this.lunarFestival?this.lunarFestival="":/\*(\d)/.test(this.lunarFestival)&&(this.restDays=this.restDays>parseInt(RegExp.$1)?this.restDays:parseInt(RegExp.$1),this.lunarFestival=this.lunarFestival.replace(/\*\d/,"")),12==this.lunarMonth&&this.lunarDate==i(this.lunarYear,12)&&(this.lunarFestival=f["0100"],this.restDays=1),this.showInLunar=""==this.lunarFestival?this.showInLunar:this.lunarFestival}(new Date(t,e,a))}return jet.extend(jeDatePick.prototype,{init:function(){var t,r=this,e=r.$opts,a=(new Date,e.trigger),n=e.initDate||[],o=e.range,h=(null==e.zIndex||e.zIndex,jet.isBool(e.isShow)),s=null!=e.isinitVal&&0!=e.isinitVal;if(r.setDatas(),e.before&&e.before(r.valCell),s&&a&&h){if(n[1]){var l=jet.getDateTime(n[0]);t=[{YYYY:l.YYYY,MM:jet.digit(l.MM),DD:jet.digit(l.DD),hh:jet.digit(l.hh),mm:jet.digit(l.mm),ss:jet.digit(l.ss)}]}else t=r.getValue(jet.isObj(n[0])?n[0]:{});o||r.setValue([t[0]],e.format,!0)}function i(){var n=jet.reMatch(r.format),t=""!=r.getValue(),s=[],e=7==r.dlen?"hh:mm:ss":"YYYY-MM"+(r.dlen<=2?"":"-DD");if(r.selectValue=[jet.parse(jet.getDateTime({}),e)],t&&h){var l=r.getValue().split(o);jet.each(new Array(o?2:1),function(a){s[a]={},jet.each(jet.reMatch(l[a]),function(t,e){s[a][n[t]]=parseInt(e)})}),o&&(r.selectValue=l)}else{var a=r.getValue({})[0],i=jet.nextMonth(a.YYYY,a.MM||jet.getDateTime({}).MM);2<r.dlen&&r.dlen<=6&&(i.y,i.m);s=[a]}return r.selectDate=s}var d=[];r.minDate="",r.maxDate="",h&&a||(d=i()),h&&a?a&&jet.on(r.valCell,a,function(){if(!(0<document.querySelectorAll(elx).length)){var t=i();r.minDate=jet.isType(e.minDate,"function")?e.minDate(r):e.minDate,r.maxDate=jet.isType(e.maxDate,"function")?e.maxDate(r):e.maxDate,r.storeData(t[0],t[1]),r.renderDate()}}):(r.minDate=jet.isType(e.minDate,"function")?e.minDate(r):e.minDate,r.maxDate=jet.isType(e.maxDate,"function")?e.maxDate(r):e.maxDate,r.storeData(d[0],d[1]),r.renderDate(),e.succeed&&e.succeed(r.dateCell))},setDatas:function(){var a=this,t=a.$opts,e=t.range,l=[],n=jet.isBool(t.isShow),s=t.multiPane;a.$data=jet.extend({year:!1,month:!1,day:!0,time:!1,timebtn:!1},{shortcut:[],lang:t.language,yaerlist:[],monthlist:[[],[]],ymlist:[[],[]],daylist:[[],[]],clear:t.isClear,today:!e&&t.isToday,yes:t.isYes,pane:s?1:2}),0<t.shortcut.length&&(jet.each(t.shortcut,function(t,e){var a=[],n=jet.isType(e.val,"function")?e.val():e.val;if(jet.isType(n,"object")){for(var s in n)a.push(s+":"+n[s]);l.push(jet.extend({},{name:e.name,val:"{"+a.join("#")+"}"}))}}),a.$data.shortcut=l),a.dlen=function(){var e=jet.reMatch(a.format),n=[];jet.each(ymdzArr,function(t,a){jet.each(e,function(t,e){a==e&&n.push(e)})});var t=n.length;return"hh"==n[0]&&t<=3?7:t}(),a.$data.dlen=a.dlen,a.timeInspect=!1,1==a.dlen?jet.extend(a.$data,{year:!0,day:!1}):2==a.dlen?jet.extend(a.$data,{month:!0,day:!1}):3<a.dlen&&a.dlen<=6?a.$data.timebtn=!0:7==a.dlen&&jet.extend(a.$data,{day:!1,time:!0}),n||(a.$data.clear=!1,a.$data.yes=!1)},renderDate:function(){var t=this,e=t.$opts,a=jet.isBool(e.isShow),n=a?elx:elx+searandom(),s={zIndex:null==e.zIndex?1e4:e.zIndex};if(null==t.dateCell&&(t.dateCell=document.createElement("div"),t.dateCell.id=n.replace(/\#/g,""),t.dateCell.className=elx.replace(/\#/g,"")+" "+(0<e.shortcut.length?" leftmenu":""),t.dateCell.setAttribute("author","chen guojun")),jet.html(t.dateCell,jet.template(t.dateTemplate(),t.$data)),jet.isObj(e.theme)){var l=document.createElement("style"),i=".jedate"+searandom(),r=e.theme,o="background-color:"+r.bgcolor,h="color:"+(null==r.color?"#FFFFFF":r.color),d=null==r.pnColor?"":"color:"+r.pnColor+";";t.dateCell.className=t.dateCell.className+" "+i.replace(/^./g,""),l.setAttribute("type","text/css"),l.innerHTML=i+" .jedate-menu p:hover{"+o+";"+h+";}"+i+" .jedate-header em{"+h+";}"+i+" .jedate-content .yeartable td.action span,"+i+" .jedate-content .monthtable td.action span,"+i+" .jedate-content .yeartable td.action span:hover,"+i+" .jedate-content .monthtable td.action span:hover{"+o+";border:1px "+r.bgcolor+" solid;"+h+";}"+i+" .jedate-content .daystable td.action,"+i+" .jedate-content .daystable td.action:hover,"+i+" .jedate-content .daystable td.action .lunar,"+i+" .jedate-header,"+i+" .jedate-time .timeheader,"+i+" .jedate-time .hmslist ul li.action,"+i+" .jedate-time .hmslist ul li.action:hover,"+i+" .jedate-time .hmslist ul li.disabled.action,"+i+" .jedate-footbtn .timecon,"+i+" .jedate-footbtn .btnscon span{"+o+";"+h+";}"+i+" .jedate-content .daystable td.other,"+i+" .jedate-content .daystable td.other .nolunar,"+i+" .jedate-content .daystable td.other .lunar{"+d+"}"+i+" .jedate-content .daystable td.contain,"+i+" .jedate-content .daystable td.contain:hover{background-"+d+"}",t.dateCell.appendChild(l)}t.compileBindNode(t.dateCell),0<document.querySelectorAll(n).length&&document.body.removeChild($Q(n)),a?document.body.appendChild(t.dateCell):t.valCell.appendChild(t.dateCell),jet.setCss(t.dateCell,jet.extend({position:a?1==e.fixed?"absolute":"fixed":"relative"},a?s:{})),t.methodEventBind(),(7==t.dlen||3<t.dlen&&t.dlen<=6)&&t.locateScroll(),e.festival&&"cn"==e.language.name&&t.showFestival(),a&&(t.dateOrien(t.dateCell,t.valCell),t.blankArea())},setValue:function(t,s,e){var a,n=this.valCell;if(s=s||this.format,"string"==typeof t&&""!=t){var l=t.split(this.$opts.range),i=[];jet.each(l,function(t,e){var a=jet.reMatch(e),n={};jet.each(jet.reMatch(s),function(t,e){n[e]=a[t]}),i.push(n)}),a=i}else a=t;var r=this.parseValue(a,s);return 0!=e&&jet.valText(n,r),r},getValue:function(s){var t,e=this.valCell,a=this.$opts,n=(new DateTime).reDate(),l=n.GetYear(),i=n.GetMonth(),r=n.GetDate(),o=n.GetHours(),h=n.GetMinutes(),d=n.GetSeconds();if(null==s&&jet.isBool(a.isShow))t=jet.valText(e);else{function c(t){return[null==m[t]||null==m[t],m[t]]}var u=jet.isBool(a.isShow)?""==jet.valText(e):!jet.isBool(a.isShow),m=jet.extend({YYYY:null,MM:null,DD:null},s||{}),p=[],Y=new Array(2),f=[{YYYY:l,MM:i,DD:r,hh:o,mm:h,ss:d,zz:0},{YYYY:l,MM:i,DD:r,hh:o,mm:h,ss:d,zz:0}];if(u)jet.each(Y,function(a){var n={};jet.each(ymdzArr,function(t,e){n[e]=parseInt(c(e)[0]?f[a][e]:c(e)[1])}),p.push(jet.extend(f[a],n))});else{var v=0!=a.range,y=this.getValue(),j=y.split(a.range),g=jet.reMatch(this.format);jet.each(Y,function(t){var a={},n=v?jet.reMatch(j[t]):jet.reMatch(y);jet.each(g,function(t,e){a[e]=n[t]});var e=jet.extend(a,s||{});p.push(jet.extend(f[t],e))})}t=p}return t},storeData:function(t,e){e=e||{};var a,n=this,s=n.$opts,l=s.multiPane,i=n.valCell,r=(new Date).getDate(),o=(n.$data,jet.isObj(e)),h={yearlist:[],monthlist:[[],[]],daylist:[],daytit:[],timelist:[]},d=null==t.DD?r:t.DD,c=null==e.DD?r:e.DD,u={hh:t.hh,mm:t.mm,ss:t.ss},m={hh:e.hh||0,mm:e.mm||0,ss:e.ss||0};if(h.yearlist.push(n.eachYear(parseInt(t.YYYY),1)),0==l){var p=o?e.YYYY:t.YYYY;h.yearlist.push(n.eachYear(parseInt(p),2))}if(h.monthlist[0]=n.eachMonth(t.YYYY,0),0==l){o?e.YYYY:t.YYYY;h.monthlist[1]=n.eachMonth(t.YYYY+1,1)}if(h.daylist.push(n.eachDays(t.YYYY,t.MM,d,0)),h.daytit.push({YYYY:t.YYYY,MM:t.MM}),0==l){var Y=jet.nextMonth(t.YYYY,t.MM);h.daylist.push(n.eachDays(Y.y,Y.m,c,1)),h.daytit.push({YYYY:Y.y,MM:Y.m})}n.selectTime=[u,m],h.timelist.push(n.eachTime(u,1)),0==l&&(a=7==n.dlen&&s.range&&!o?u:m,7==n.dlen&&s.range&&""==jet.valText(i)&&(n.selectTime[1]=jet.extend(m,u)),h.timelist.push(n.eachTime(a,2))),jet.extend(n.$data,h)},dateTemplate:function(){var t,e,a,n,s=this,l=s.$opts,i=l.multiPane,r="",o="",h=l.language,d="cn"==h.name?"年":"",c="cn"==h.name?"月":"",u=(t=[],e=i?"11":"23",1==s.dlen?t=["{%=yearlist[i][0].y-"+e+"%}","{%=yearlist[i][yearlist[i].length-1].y%}"]:2==s.dlen?t=i?["{%=yearlist[0][0].y-1%}","{%=yearlist[0][0].y+1%}"]:["{%=yearlist[i][0].y-"+e+"%}","{%=yearlist[i][yearlist[i].length-1].y%}"]:2<s.dlen&&s.dlen<=6&&(t=["{%=yearlist[0][0].y-1%}","{%=yearlist[0][0].y+1%}"]),t),m='<em class="yearprev yprev jedatefont" @on="yearBtn(lprev,'+u[0]+')">󭛂</em>',p=(u[2],u[3],'<em class="yearnext ynext jedatefont" @on="yearBtn(rnext,'+u[1]+')">󭛅</em>'),Y='{% if(dlen>2){ %}<em class="monthprev mprev jedatefont" @on="monthBtn(mprev,{%=daytit[i].YYYY%}-{%=daytit[i].MM%})">󭘂</em>{% } %}',f='{% if(dlen>2){ %}<em class="monthnext mnext jedatefont" @on="monthBtn(mnext,{%=daytit[i].YYYY%}-{%=daytit[i].MM%})">󭘅</em>{% } %}',v='<table class="yeartable year{%= i==0 ? "left":"right"%}" style="display:{%=year ? "block":"none"%};"><tbody><tr>{% for(var y=0;y<=11;y++){ %}<td class="{%=yearlist[i][y].style%}" @on="yearClick({%=yearlist[i][y].y%})"><span>{%=yearlist[i][y].y%}'+d+"</span></td>{% if((y+1)%3==0){ %} </tr>{% } %} {% } %} </tbody></table>",y='<table class="monthtable month{%= i==0 ? "left":"right"%}" style="display:{%=month ? "block":"none"%};"><tbody><tr>{% for(var m=0;m<=11;m++){ %}<td class="{%=monthlist[i][m].style%}" ym="{%=monthlist[i][m].y%}-{%=monthlist[i][m].m%}" @on="monthClick({%=monthlist[i][m].y%}-{%=monthlist[i][m].m%})"><span>{%=monthlist[i][m].m%}'+c+"</span></td>{% if((m+1)%3==0){ %} </tr>{% } %} {% } %} </tbody></table>",j='<table class="daystable days{%= i==0 ? "left":"right"%}" style="display:{%=day ? "block":"none"%};"><thead><tr>{% for(var w=0;w<lang.weeks.length;w++){ %} <th>{%=lang.weeks[w]%}</th> {% } %}</tr></thead><tbody><tr>{% for(var d=0;d<=41;d++){ %}<td class="{%=daylist[i][d].style%}" ymd="{%=daylist[i][d].ymd%}" @on="daysClick({%=daylist[i][d].ymd%})">{%=daylist[i][d].day%}</td>{% if((d+1)%7==0){ %} </tr>{% } %} {% } %} </tbody></table>',g='<div class="jedate-time">{% for(var h=0;h<timelist.length;h++){ %}<div class="timepane"><div class="timeheader">{%= timelist.length == 1 ? lang.timetxt[0]:lang.timetxt[h+1]%}</div><div class="timecontent"><div class="hmstitle"><p>{%=lang.times[0]%}</p><p>{%=lang.times[1]%}</p><p>{%=lang.times[2]%}</p></div><div class="hmslist">{% for(var t=0;t<3;t++){ %}<div class="hmsauto"><ul>{% for(var s=0;s<timelist[h][t].length;s++){ %}<li class="{%=timelist[h][t][s].style%}" @on="hmsClick({%= h %},{%= h>0?3+t:t %})">{%= timelist[h][t][s].hms < 10 ? "0" + timelist[h][t][s].hms :timelist[h][t][s].hms %}</li>{% } %}</ul></div>{% } %}</div></div></div>{% } %}</div>',D=0<l.shortcut.length?"{% for(var s=0;s<shortcut.length;s++){ %}<p @on=shortClick({%= shortcut[s].val %})>{%=shortcut[s].name%}</p>{% } %}":"",M=(a="",1==s.dlen?a='<span class="ymbtn">{%=yearlist[i][0].y%}'+d+" ~ {%=yearlist[i][yearlist[i].length-1].y%}"+d+"</span>":2==s.dlen?a='<span class="ymbtn" @on="yearShow({%=yearlist[0][i].y%})">{%=yearlist[0][i].y%}'+d+"</span>":2<s.dlen&&s.dlen<=6&&(a='<span class="ymbtn" @on="monthShow({%=daytit[i].MM%})">{%=daytit[i].MM%}'+c+'</span><span class="ymbtn" @on="yearShow({%=daytit[i].YYYY%})">{%=daytit[i].YYYY%}'+d+"</span>"),a),x=(n="",1==s.dlen?n=i?[m+p]:[m,p]:2==s.dlen?n=i?[m+p]:[m,p]:2<s.dlen&&s.dlen<=6?n=i?[m+Y+f+p]:[m+Y,f+p]:7==s.dlen&&(n=""),n);1==s.dlen?r=v:2==s.dlen?r=v+y:3==s.dlen?r=v+y+j:3<s.dlen&&s.dlen<=6?(r=v+y+j,o=g):7==s.dlen&&(o=g);return'<div class="jedate-menu" style="display:{%=shortcut.length>0 ? "block":"none"%};">'+D+'</div><div class="jedate-wrap">'+('{% for(var i=0;i<pane;i++){ %}<div class="jedate-pane"><div class="jedate-header">{% if(i==0){ %}'+x[0]+"{% }else{ %}"+x[1]+"{% } %}"+M+'</div><div class="jedate-content{%= i==1?" bordge":"" %}">'+r+"</div></div>{% } %}")+"</div>"+o+'<div class="jedate-footbtn">{% if(timebtn){%}<div class="timecon" style="cursor: pointer;" @on="timeBtn">{%=lang.timetxt[0]%}</div>{% } %}<div class="btnscon">{% if(clear){ %}<span class="clear" @on="clearBtn">{%=lang.clear%}</span>{% } %}{% if(today){ %}<span class="today" @on="nowBtn">{%=lang.today%}</span>{% } %}{% if(yes){ %}<span class="setok" @on="sureBtn">{%=lang.yes%}</span>{% } %}</div></div><div class="jedate-tips"></div>'},compileBindNode:function(t){var s=this;jet.each(t.childNodes,function(t,e){if(1===e.nodeType){s.$opts.festival||e.removeAttribute("ymd"),s.compileBindNode(e);var a=e.getAttribute("@on");if(null!=a){var n=function(t){var e=/\(.*\)/.exec(t);return e=e?(e=e[0],t=t.replace(e,""),e.replace(/[\(\)\'\"]/g,"").split(",")):[],[t,e]}(a);jet.on(e,"click",function(){s[n[0]]&&s[n[0]].apply(e,n[1])}),e.removeAttribute("@on")}}})},methodEventBind:function methodEventBind(){var that=this,opts=that.$opts,multi=opts.multiPane,DTS=that.$data,result=(new DateTime).reDate(),dateY=result.GetYear(),dateM=result.GetMonth(),dateD=result.GetDate(),range=opts.range,elCell=that.dateCell;jet.extend(that,{yearBtn:function(t,e){var a=e.split("#"),n=(jet.reMatch(a[0]),that.selectTime);exarr=[jet.extend({YYYY:parseInt(e),MM:dateM,DD:dateD},n[0]),{}];var s=that.parseValue([exarr[0]],that.format);that.storeData(exarr[0],exarr[1]),that.renderDate(),opts.toggle&&opts.toggle({elem:that.valCell,val:s,date:exarr[0]})},yearShow:function(t){if(DTS.year=!DTS.year,DTS.month=that.dlen<3,2<that.dlen&&that.dlen<=6){var e=$Q(".daystable",elCell);DTS.day="none"==e.style.display}that.renderDate()},monthBtn:function(t,e){var a,n,s=jet.reMatch(e),l=that.selectTime,i=[],r=parseInt(s[0]),o=parseInt(s[1]);if(range)"mprev"==t?(a=jet.prevMonth(r,o),n=jet.nextMonth(a.y,a.m)):(n=jet.nextMonth(r,o),a=jet.prevMonth(n.y,n.m)),i=[jet.extend({YYYY:a.y,MM:a.m,DD:dateD},l[0]),{YYYY:n.y,MM:n.m,DD:dateD}];else{var h="mprev"==t?jet.prevMonth(r,o):jet.nextMonth(r,o);i=[jet.extend({YYYY:h.y,MM:h.m,DD:dateD},l[0]),{}]}var d=that.parseValue([i[0]],that.format);that.storeData(i[0],i[1]),that.renderDate(),opts.toggle&&opts.toggle({elem:that.valCell,val:d,date:i[0]})},monthShow:function(t){if(DTS.year=!1,DTS.month=!DTS.month,2<that.dlen&&that.dlen<=6){var e=$Q(".daystable",elCell);DTS.day="none"==e.style.display}that.renderDate()},shortClick:function shortClick(val){var reval=val.replace(/\#/g,","),evobj=eval("("+reval+")"),gval=jet.getDateTime(evobj),tmval=that.selectTime;if(that.selectValue=[jet.parse(gval,"YYYY-MM-DD")],that.selectDate=[{YYYY:gval.YYYY,MM:gval.MM,DD:gval.DD}],opts.onClose){var nYM=jet.nextMonth(gval.YYYY,gval.MM),ymarr=[{YYYY:gval.YYYY,MM:gval.MM,DD:gval.DD},{YYYY:nYM.y,MM:nYM.m,DD:null}];that.storeData(jet.extend(ymarr[0],tmval[0]),jet.extend(ymarr[1],tmval[1])),that.renderDate()}else that.setValue(gval,that.format),that.closeDate()},yearClick:function(t){if(!jet.hasClass(this,"disabled")){var e="",a=that.dlen;if(range&&1==a){var n=that.selectValue.length;if(that.selectDate=2==n?[{YYYY:parseInt(t),MM:dateM}]:[{YYYY:that.selectDate[0].YYYY,MM:that.selectDate[0].MM},{YYYY:parseInt(t),MM:dateM}],that.selectValue=2==n?[t+"-"+jet.digit(dateM)]:[that.selectValue[0],t+"-"+jet.digit(dateM)],2==that.selectValue.length){var s=[that.selectValue[0],that.selectValue[1]],l=[{},{}];s.sort(function(t,e){return e<t?1:-1}),that.selectValue=s,jet.each(s,function(a,t){jet.each(jet.reMatch(t),function(t,e){l[a][ymdzArr[t]]=e})}),that.selectDate=l}}else 1<a&&a<=6?e=parseInt(t):(that.selectValue=[t+"-"+jet.digit(dateM)],that.selectDate=[{YYYY:parseInt(t),MM:dateM}]);DTS.year=1==a,DTS.month=a<3,DTS.day=2<a&&a<=6;var i=1<a&&a<=6?e:parseInt(that.selectDate[0].YYYY);that.storeData(jet.extend({YYYY:i,MM:dateM,DD:dateD},that.selectTime[0]),{}),that.renderDate()}},monthClick:function(t){if(!jet.hasClass(this,"disabled")){var e=jet.reMatch(t),n=[{},{}],a=that.selectValue.length;if(range){if(that.selectDate=2==a?[{YYYY:e[0],MM:e[1]}]:[{YYYY:that.selectDate[0].YYYY,MM:that.selectDate[0].MM},{YYYY:parseInt(t),MM:e[1]}],that.selectValue=2==a?[t]:[that.selectValue[0],t],2==that.selectValue.length){var s=[that.selectValue[0],that.selectValue[1]];s.sort(function(t,e){return e<t?1:-1}),that.selectValue=s,jet.each(s,function(a,t){jet.each(jet.reMatch(t),function(t,e){n[a][ymdzArr[t]]=e})}),that.selectDate=n}}else that.selectValue=[t],that.selectDate=[{YYYY:e[0],MM:e[1]}];2<that.dlen&&(DTS.year=!1,DTS.month=!1),DTS.day=2<that.dlen&&that.dlen<=6,that.storeData(jet.extend({YYYY:parseInt(that.selectDate[0].YYYY),MM:parseInt(that.selectDate[0].MM),DD:dateD},that.selectTime[0]),{}),that.renderDate()}},daysClick:function(t){if(!jet.hasClass(this,"disabled")){var e,a,n=that.selectTime,s=jet.reMatch(t),l=that.selectValue.length,i="",r=[{},{}];if(range){if(1==l){var o=[that.selectValue[0],t];o.sort(function(t,e){return e<t?1:-1}),that.selectValue=o,jet.each(o,function(a,t){jet.each(jet.reMatch(t),function(t,e){r[a][ymdzArr[t]]=e})}),that.selectDate=r}else that.selectValue=[t],r=[{YYYY:s[0],MM:s[1],DD:s[2]}],that.selectDate=[{YYYY:s[0],MM:s[1],DD:s[2]},{}];e=jet.nextMonth(r[0].YYYY,r[0].MM),a=[{YYYY:r[0].YYYY,MM:r[0].MM,DD:r[0].DD},{YYYY:e.y,MM:e.m,DD:null}],that.storeData(jet.extend(a[0],n[0]),jet.extend(a[1],n[1])),that.renderDate()}else that.selectValue=[t],that.selectDate=[{YYYY:s[0],MM:s[1],DD:s[2]},{YYYY:s[0],MM:s[1],DD:s[2]}],jet.each(new Array(0==range?1:2),function(a){jet.each(s,function(t,e){r[a][ymdzArr[t]]=e}),jet.extend(r[a],n[a])}),opts.onClose?(that.storeData(jet.extend(r[0],n[0]),jet.extend(r[1],n[1])),that.renderDate()):(i=that.setValue(r,that.format),that.closeDate(),opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:i,date:r}))}},hmsClick:function(t,e){var a=parseInt(e),n=parseInt(jet.text(this)),s=parseInt(t),l="action",i=["hh","mm","ss"],r=$Q(".jedate-time",that.dateCell).querySelectorAll("ul")[a],o=that.$data.timelist[0].length;if(!jet.hasClass(this,"disabled")){jet.each(r.childNodes,function(t,e){var a=new RegExp("(^|\\s+)action(\\s+|$)","g");e.className=a.test(e.className)?e.className.replace(a,""):e.className}),that.selectTime[s][1==s?i[a-o]:i[a]]=n,this.className=this.className+l;var h=r.querySelector("."+l);if(r.scrollTop=h?h.offsetTop-145:0,7==that.dlen&&0==t&&range&&!multi){var d=that.getValue({}),c=jet.nextMonth(d[0].YYYY,d[0].MM),u=that.selectTime;that.storeData({YYYY:d[0].YYYY,MM:d[0].MM,DD:null,hh:u[0].hh,mm:u[0].mm,ss:u[0].ss},{YYYY:c.y,MM:c.m,DD:null,hh:u[1].hh,mm:u[1].mm,ss:u[1].ss}),that.renderDate()}}},timeBtn:function(){var t=$Q(".jedate-time",elCell),e="none"==t.style.display;jet.text(this,e?opts.language.backtxt:opts.language.timetxt[0]),jet.setCss(t,{display:e?"block":"none"})},clearBtn:function(){jet.valText(that.valCell,""),that.selectDate=[jet.parse(jet.getDateTime({}),"YYYY-MM-DD hh:mm:ss")],that.closeDate(),opts.clearfun&&opts.clearfun.call(that)},nowBtn:function(){var t,e=jet.getDateTime({}),a=jet.nextMonth(e.YYYY,e.MM);that.selectDate=[e],t=opts.isShow?that.setValue([e],that.format,!0):jet.parse(e,that.format),opts.onClose&&range||!opts.isShow?(that.storeData(e,{YYYY:a.y,MM:a.m,DD:null,hh:0,mm:0,ss:0}),that.renderDate()):that.closeDate(),opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:t,date:e})},sureBtn:function(){function t(t){var e=null==t.hh?0:t.hh,a=null==t.mm?0:t.mm,n=null==t.ss?0:t.ss;return parseInt(jet.digit(e)+""+jet.digit(a)+jet.digit(n))}var e,n=1<that.selectValue.length?[{},{}]:[{}],s=that.selectTime;if(range){if(1<that.selectValue.length){var a=that.selectValue;a.sort(function(t,e){return e<t?1:-1}),jet.each(a,function(a,t){jet.each(jet.reMatch(t),function(t,e){n[a][ymdzArr[t]]=e}),jet.extend(n[a],s[a])})}else 7==that.dlen&&1<s.length&&(n=s);var l=t(s[0])>=t(s[1]),i=that.selectValue,r="";if(null!=i[1]&&(r=i[0].replace(/\-/g,"")==i[1].replace(/\-/g,"")),1==i.length&&that.dlen<7)return void that.tips("cn"==opts.language.name?"未选结束日期":"Please select the end date");if(7==that.dlen&&l||r&&l)return void that.tips("cn"==opts.language.name?"结束时间必须大于开始时间":"The end time must be greater than the start time")}else jet.each(new Array(0==range?1:2),function(a){7!=that.dlen&&jet.each(jet.reMatch(that.selectValue[0]),function(t,e){n[a][ymdzArr[t]]=e}),jet.extend(n[a],s[a])});e=that.setValue(n,that.format,!!opts.isShow),opts.isShow&&that.closeDate(),opts.donefun&&opts.donefun.call(that,{elem:that.valCell,val:e,date:n})},blankArea:function(){jet.on(document,"mouseup",function(t){jet.stopPropagation(t),that.closeDate()}),jet.on($Q(elx),"mouseup",function(t){jet.stopPropagation(t)})}})},eachYear:function(t,e){var a,n=this,s=(n.$opts,parseInt(t)),l=[],i="",r=n.selectDate,o=jet.reMatch(n.minDate),h=jet.reMatch(n.maxDate);a=1==e?s:n.yindex,n.yindex=1==e?12+s:12+n.yindex;for(var d=null==r[1]?"":r[1].YYYY;a<n.yindex;a++)i=a==r[0].YYYY||a==d?"action":a>r[0].YYYY&&a<d?"contain":a<o[0]||a>h[0]?"disabled":"",l.push({style:i,y:a});return l},eachMonth:function(n,t){var e=this.$opts,s=(e.range,[]),a=this.selectDate,l="",i=e.language.month,r=jet.reMatch(this.minDate),o=jet.reMatch(this.maxDate),h=parseInt(r[0]+""+jet.digit(r[1])),d=parseInt(o[0]+""+jet.digit(o[1])),c=parseInt(a[0].YYYY+""+jet.digit(a[0].MM)),u=a[1]?parseInt(a[1].YYYY+""+jet.digit(a[1].MM)):0;return jet.each(i,function(t,e){var a=parseInt(n+""+jet.digit(e));l=a==c||a==u?"action":c<a&&a<u?"contain":a<h||d<a?"disabled":"",s.push({style:l,y:n,m:e})}),s},eachDays:function(t,e,a,n){function s(t,e,a){var n=c.marks;return jet.isType(n,"array")&&0<n.length&&function(t,e){for(var a=t.length;a--;)if(t[a]===e)return!0;return!1}(n,t+"-"+jet.digit(e)+"-"+jet.digit(a))?'<i class="marks"></i>':""}function l(t,e,a){var n="";if(1==c.festival&&"cn"==y.name){var s=jeLunar(t,e-1,a),l=s.solarFestival||s.lunarFestival;n='<p><span class="solar">'+a+'</span><span class="lunar">'+(""!=(l&&s.jieqi)?l:s.jieqi||s.showInLunar)+"</span></p>"}else n='<p class="nolunar">'+a+"</p>";return n}function i(t,e,a,n){var s=parseInt(t+""+jet.digit(e)+jet.digit(a));if(n){if(D<=s&&s<=x)return!0}else if(s<D||x<s)return!0}function r(t,e){if(0<j.length&&""!=j[0])if(/\%/g.test(j[0])){var a=j[0].replace(/\%/g,"").split(","),n=[];jet.each(a,function(t,e){n.push(jet.digit(parseInt(e)))});var s=0==function(t,e){for(var a in e)if(e[a]==t)return!0;return!1}(jet.digit(t),n);e=jet.isBool(j[1])?s?" disabled":e:s?e:" disabled"}else{var l=o.dateRegExp(j[0]).test(jet.digit(t));e=jet.isBool(j[1])?l?" disabled":e:l?e:" disabled"}return e}for(var o=this,h=0,d=[],c=o.$opts,u=(jet.isBool(c.multiPane),new Date(t,e-1,1).getDay()||7),m=(c.range,jet.getDaysNum(t,e)),p=o.selectDate,Y=jet.prevMonth(t,e),f=(jet.isBool(c.isShow),jet.getDaysNum(t,Y.m)),v=jet.nextMonth(t,e),y=(o.valCell,c.language),j=c.valiDate||[],g=jet.reMatch(o.minDate),D=parseInt(g[0]+""+jet.digit(g[1])+jet.digit(g[2])),M=jet.reMatch(o.maxDate),x=parseInt(M[0]+""+jet.digit(M[1])+jet.digit(M[2])),b=p[0]?parseInt(p[0].YYYY+""+jet.digit(p[0].MM)+jet.digit(p[0].DD)):"",C=p[1]?parseInt(p[1].YYYY+""+jet.digit(p[1].MM)+jet.digit(p[1].DD)):"",w=f-u+1;w<=f;w++,h++){var T=s(Y.y,Y.m,w),I=i(Y.y,Y.m,w,!1)?"disabled":"other";I=r(w,I),d.push({style:I,ymd:Y.y+"-"+jet.digit(Y.m)+"-"+jet.digit(w),day:l(Y.y,Y.m,w)+T})}for(var $=1;$<=m;$++,h++){var S=s(t,e,$),V="",k=parseInt(t+""+jet.digit(e)+jet.digit($)),A=b<k,z=k<C;V=r($,V=i(t,e,$,!0)?k==b||k==C?" action":A&&z?" contain":"":" disabled"),d.push({style:"normal"+V,ymd:t+"-"+jet.digit(e)+"-"+jet.digit($),day:l(t,e,$)+S})}for(var L=1,F=42-h;L<=F;L++){var B=s(v.y,v.m,L),E=i(v.y,v.m,L,!1)?"disabled":"other";E=r(L,E),d.push({style:E,ymd:v.y+"-"+jet.digit(v.m)+"-"+jet.digit(L),day:l(v.y,v.m,L)+B})}return d},eachTime:function(i,r){var o=this,t=o.$opts,h=t.range,d=t.multiPane,c=[],u=[],m=["hh","mm","ss"],p=[],Y="",f=o.format,e=jet.trim(o.minDate).replace(/\s+/g," "),a=jet.trim(o.maxDate).replace(/\s+/g," "),v=e.split(" "),n=a.split(" ");return 3<o.dlen&&/\:/.test(v)&&/\:/.test(n)&&(c=jet.reMatch(/\s/.test(e)&&3<o.dlen?v[1]:e),u=jet.reMatch(/\s/.test(a)&&3<o.dlen?n[1]:a),2==v.length&&2==n.length&&v[0]!=n[0]&&(c=[0,0,0],u=[23,59,59])),3==c.length&&3==u.length&&(c[0]!=u[0]&&(c[1]=0,u[1]=59),c[0]==u[0]&&c[1]==u[1]||(c[2]=0,u[2]=59)),jet.each([24,60,60],function(t,e){p[t]=[];var a=null==c[t]||0==c[t]?i[m[t]]:c[t],n=""==o.getValue()?a:i[m[t]];3<o.dlen&&/\:/.test(v)&&1==r&&(o.selectTime[0][m[t]]=n);for(var s=0;s<e;s++){var l=new RegExp(m[t],"g").test(f);Y=s==n?l?"action":"disabled":!l||!h&&d&&(s<c[t]||s>u[t])?"disabled":d?"":s<c[t]||s>u[t]?"disabled":"",p[t].push({style:Y,hms:s})}}),p},closeDate:function(){var t=$Q(elx),e=$Q("#jedatetipscon");t&&document.body.removeChild(t),e&&document.body.removeChild(e),this.setDatas()},parseValue:function(t,a){var n=[],e=this.$opts.range;return jet.each(t,function(t,e){n.push(jet.parse(e,a))}),0==e?n[0]:n.join(e)},dateRegExp:function dateRegExp(valArr){var enval=valArr.split(",")||[],regs="",doExp=function doExp(val){var arr,tmpEval,regs=/#?\{(.*?)\}/;for(val+="";null!=(arr=regs.exec(val));)arr.lastIndex=arr.index+arr[1].length+arr[0].length-arr[1].length-1,tmpEval=parseInt(eval(arr[1])),tmpEval<0&&(tmpEval="9700"+-tmpEval),val=val.substring(0,arr.index)+tmpEval+val.substring(arr.lastIndex+1);return val};if(enval&&0<enval.length){for(var i=0;i<enval.length;i++)regs+=doExp(enval[i]),i!=enval.length-1&&(regs+="|");regs=regs?new RegExp("(?:"+regs+")"):null}else regs=null;return regs},showFestival:function(){var o=this,h=o.$opts;jet.each(o.dateCell.querySelectorAll(".daystable td"),function(t,e){var i=jet.reMatch(jet.attr(e,"ymd")),r=document.createElement("div");e.removeAttribute("ymd"),jet.on(e,"mouseover",function(){var t=new jeLunar(i[0],i[1]-1,i[2]);if(!$Q("#jedatetipscon")){r.id=r.className="jedatetipscon";var e="<p>"+t.solarYear+"年"+t.solarMonth+"月"+t.solarDate+"日 "+t.inWeekDays+'</p><p class="red">农历:'+t.shengxiao+"年 "+t.lnongMonth+"月"+t.lnongDate+"</p><p>"+t.ganzhiYear+"年 "+t.ganzhiMonth+"月 "+t.ganzhiDate+"日</p>",a=""!=(t.solarFestival||t.lunarFestival)?'<p class="red">节日:'+t.solarFestival+t.lunarFestival+"</p>":"",n=""!=t.jieqi?'<p class="red">'+(""!=t.jieqi?"节气:"+t.jieqi:"")+"</p>":"",s=""!=(t.solarFestival||t.lunarFestival||t.jieqi)?a+n:"";jet.html(r,e+s),document.body.appendChild(r);var l=o.lunarOrien(r,this);jet.setCss(r,{zIndex:null==h.zIndex?10005:h.zIndex+5,top:l.top,left:l.left,position:"absolute",display:"block"})}}),jet.on(e,"mouseout",function(){document.body.removeChild($Q("#jedatetipscon"))})}),1!==o.dateCell.nodeType||jet.hasClass(o.dateCell,"grid")||(o.dateCell.className=o.dateCell.className+" grid")},lunarOrien:function(t,e,a){var n,s,l=e.getBoundingClientRect(),i=t.offsetWidth,r=t.offsetHeight;return s=l.right+i/1.5>=jet.docArea(!0)?l.right-i:l.left+(a?0:jet.docScroll(!0)),n=l.bottom+r/1<=jet.docArea()?l.bottom-1:l.top>r/1.5?l.top-r-1:jet.docArea()-r,s+i>jet.docArea(!0)&&(s=l.left-(i-l.width)),{top:Math.max(n+(a?0:jet.docScroll())+1,1)+"px",left:s+"px"}},dateOrien:function(t,e,a){var n,s,l=this.$opts.fixed?e.getBoundingClientRect():t.getBoundingClientRect(),i=l.left,r=l.bottom;if(this.$opts.fixed){var o=t.offsetWidth,h=t.offsetHeight;i+o>jet.docArea(!0)&&(i-=o-l.width),r+h>jet.docArea()&&(r=l.top>h?l.top-h-2:jet.docArea()-h-1),n=Math.max(r+(a?0:jet.docScroll())+1,1)+"px",s=i+"px"}else s=n="50%",t.style.cssText="marginTop:"+-l.height/2+";marginLeft:"+-l.width/2;jet.setCss(t,{top:n,left:s})},tips:function(t,e){var a,n=$Q(".jedate-tips",this.dateCell);jet.html(n,t||""),jet.setCss(n,{display:"block"}),clearTimeout(a),a=setTimeout(function(){jet.html(n,""),jet.setCss(n,{display:"none"})},1e3*(e||2.5))},locateScroll:function(){var t=$Q(".jedate-time",this.dateCell).querySelectorAll("ul");jet.each(t,function(t,e){var a=e.querySelector(".action");e.scrollTop=a?a.offsetTop-145:0}),7!=this.dlen&&jet.setCss($Q(".jedate-time",this.dateCell),{display:"none"})}}),jeDate});
|
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
/**
* The PersonNameInfo model module.
* @module model/PersonNameInfo
* @version 1.0.0
*/
class PersonNameInfo {
/**
* Constructs a new <code>PersonNameInfo</code>.
* @alias module:model/PersonNameInfo
*/
constructor() {
PersonNameInfo.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>PersonNameInfo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/PersonNameInfo} obj Optional instance to populate.
* @return {module:model/PersonNameInfo} The populated <code>PersonNameInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new PersonNameInfo();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
delete data['name'];
}
if (data.hasOwnProperty('first_name')) {
obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
delete data['first_name'];
}
if (data.hasOwnProperty('last_name')) {
obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
delete data['last_name'];
}
if (Object.keys(data).length > 0) {
Object.assign(obj, data);
}
}
return obj;
}
}
/**
* The name of the person
* @member {String} name
*/
PersonNameInfo.prototype['name'] = undefined;
/**
* The first name of the person
* @member {String} first_name
*/
PersonNameInfo.prototype['first_name'] = undefined;
/**
* The last name of the person
* @member {String} last_name
*/
PersonNameInfo.prototype['last_name'] = undefined;
export default PersonNameInfo;
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import React from 'react';
import findDOMNode from "rc-util/es/Dom/findDOMNode";
import classNames from 'classnames';
import KeyCode from "rc-util/es/KeyCode";
import { getOffsetLeft } from './util';
import Star from './Star';
function noop() {}
var Rate = /*#__PURE__*/function (_React$Component) {
_inherits(Rate, _React$Component);
var _super = _createSuper(Rate);
function Rate(props) {
var _this;
_classCallCheck(this, Rate);
_this = _super.call(this, props);
_this.onHover = function (event, index) {
var onHoverChange = _this.props.onHoverChange;
var hoverValue = _this.getStarValue(index, event.pageX);
var cleanedValue = _this.state.cleanedValue;
if (hoverValue !== cleanedValue) {
_this.setState({
hoverValue: hoverValue,
cleanedValue: null
});
}
onHoverChange(hoverValue);
};
_this.onMouseLeave = function () {
var onHoverChange = _this.props.onHoverChange;
_this.setState({
hoverValue: undefined,
cleanedValue: null
});
onHoverChange(undefined);
};
_this.onClick = function (event, index) {
var allowClear = _this.props.allowClear;
var value = _this.state.value;
var newValue = _this.getStarValue(index, event.pageX);
var isReset = false;
if (allowClear) {
isReset = newValue === value;
}
_this.onMouseLeave();
_this.changeValue(isReset ? 0 : newValue);
_this.setState({
cleanedValue: isReset ? newValue : null
});
};
_this.onFocus = function () {
var onFocus = _this.props.onFocus;
_this.setState({
focused: true
});
if (onFocus) {
onFocus();
}
};
_this.onBlur = function () {
var onBlur = _this.props.onBlur;
_this.setState({
focused: false
});
if (onBlur) {
onBlur();
}
};
_this.onKeyDown = function (event) {
var keyCode = event.keyCode;
var _this$props = _this.props,
count = _this$props.count,
allowHalf = _this$props.allowHalf,
onKeyDown = _this$props.onKeyDown,
direction = _this$props.direction;
var reverse = direction === 'rtl';
var value = _this.state.value;
if (keyCode === KeyCode.RIGHT && value < count && !reverse) {
if (allowHalf) {
value += 0.5;
} else {
value += 1;
}
_this.changeValue(value);
event.preventDefault();
} else if (keyCode === KeyCode.LEFT && value > 0 && !reverse) {
if (allowHalf) {
value -= 0.5;
} else {
value -= 1;
}
_this.changeValue(value);
event.preventDefault();
} else if (keyCode === KeyCode.RIGHT && value > 0 && reverse) {
if (allowHalf) {
value -= 0.5;
} else {
value -= 1;
}
_this.changeValue(value);
event.preventDefault();
} else if (keyCode === KeyCode.LEFT && value < count && reverse) {
if (allowHalf) {
value += 0.5;
} else {
value += 1;
}
_this.changeValue(value);
event.preventDefault();
}
if (onKeyDown) {
onKeyDown(event);
}
};
_this.saveRef = function (index) {
return function (node) {
_this.stars[index] = node;
};
};
_this.saveRate = function (node) {
_this.rate = node;
};
var value = props.value;
if (value === undefined) {
value = props.defaultValue;
}
_this.stars = {};
_this.state = {
value: value,
focused: false,
cleanedValue: null
};
return _this;
}
_createClass(Rate, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this$props2 = this.props,
autoFocus = _this$props2.autoFocus,
disabled = _this$props2.disabled;
if (autoFocus && !disabled) {
this.focus();
}
}
}, {
key: "getStarDOM",
value: function getStarDOM(index) {
return findDOMNode(this.stars[index]);
}
}, {
key: "getStarValue",
value: function getStarValue(index, x) {
var _this$props3 = this.props,
allowHalf = _this$props3.allowHalf,
direction = _this$props3.direction;
var reverse = direction === 'rtl';
var value = index + 1;
if (allowHalf) {
var starEle = this.getStarDOM(index);
var leftDis = getOffsetLeft(starEle);
var width = starEle.clientWidth;
if (reverse && x - leftDis > width / 2) {
value -= 0.5;
} else if (!reverse && x - leftDis < width / 2) {
value -= 0.5;
}
}
return value;
}
}, {
key: "focus",
value: function focus() {
var disabled = this.props.disabled;
if (!disabled) {
this.rate.focus();
}
}
}, {
key: "blur",
value: function blur() {
var disabled = this.props.disabled;
if (!disabled) {
this.rate.blur();
}
}
}, {
key: "changeValue",
value: function changeValue(value) {
var onChange = this.props.onChange;
if (!('value' in this.props)) {
this.setState({
value: value
});
}
onChange(value);
}
}, {
key: "render",
value: function render() {
var _this$props4 = this.props,
count = _this$props4.count,
allowHalf = _this$props4.allowHalf,
style = _this$props4.style,
prefixCls = _this$props4.prefixCls,
disabled = _this$props4.disabled,
className = _this$props4.className,
character = _this$props4.character,
characterRender = _this$props4.characterRender,
tabIndex = _this$props4.tabIndex,
direction = _this$props4.direction;
var _this$state = this.state,
value = _this$state.value,
hoverValue = _this$state.hoverValue,
focused = _this$state.focused;
var stars = [];
var disabledClass = disabled ? "".concat(prefixCls, "-disabled") : '';
for (var index = 0; index < count; index += 1) {
stars.push(React.createElement(Star, {
ref: this.saveRef(index),
index: index,
count: count,
disabled: disabled,
prefixCls: "".concat(prefixCls, "-star"),
allowHalf: allowHalf,
value: hoverValue === undefined ? value : hoverValue,
onClick: this.onClick,
onHover: this.onHover,
key: index,
character: character,
characterRender: characterRender,
focused: focused
}));
}
var rateClassName = classNames(prefixCls, disabledClass, className, _defineProperty({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
return React.createElement("ul", {
className: rateClassName,
style: style,
onMouseLeave: disabled ? null : this.onMouseLeave,
tabIndex: disabled ? -1 : tabIndex,
onFocus: disabled ? null : this.onFocus,
onBlur: disabled ? null : this.onBlur,
onKeyDown: disabled ? null : this.onKeyDown,
ref: this.saveRate,
role: "radiogroup"
}, stars);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps, state) {
if ('value' in nextProps && nextProps.value !== undefined) {
return _objectSpread(_objectSpread({}, state), {}, {
value: nextProps.value
});
}
return state;
}
}]);
return Rate;
}(React.Component);
Rate.defaultProps = {
defaultValue: 0,
count: 5,
allowHalf: false,
allowClear: true,
style: {},
prefixCls: 'rc-rate',
onChange: noop,
character: '★',
onHoverChange: noop,
tabIndex: 0,
direction: 'ltr'
};
export default Rate;
|
import {
default as Service
} from '../Sources/application/service';
describe('Service (JSON/Null)', () => {
'use strict';
var service;
beforeEach(() => {
service = new Service('/base/Sources-Tests/service.json.null.test');
});
it('should return an empty array while loading null json data', (done) => {
service.get()
.then((data) => {
expect(data).toEqual([]);
done();
})
.catch((error) => {
expect(error).toBeNull();
done.fail();
});
});
});
|
'use strict';
// var lib = require('./components/components');
(function(scope){
var polymer = scope.Polymer('lancie', {
/**
* The `noevent` event is not actually fired from here,
* we document it as an example of documenting events.
*
* @event noevent
*/
/**
* The `notitle` attribute does not yet have a purpose.
*
* @attribute notitle
* @type string
*/
notitle: '',
/**
* The `aProp` is a property that does something cool.
*
* @property aProp
* @type bool
*/
aProp: false,
ready: function() {
},
/**
* The `task` method does no work at this time.
*
* @method task
* @return {Object} Returns undefined.
* @param {String} dummy Serves no purpose today.
*/
task: function(dummy) {
return dummy;
}
});
return polymer;
})(window);
|
const
UIChunkControllerFactory = require('./factory'),
LocatorConstituent = require('superhero/core/locator/constituent')
/**
* @extends {superhero/core/locator/constituent}
*/
class UIChunkControllerFactoryLocator extends LocatorConstituent
{
/**
* @returns {UIChunkControllerFactory}
*/
locate()
{
const
templates = this.locator.locate('core/ui/templates'),
controllers = this.locator.locate('core/ui/controllers'),
dtoMapper = this.locator.locate('core/ui/dto-mapper'),
bus = this.locator.locate('core/ui/bus')
return new UIChunkControllerFactory({
templates,
controllers,
dtoMapper,
bus
})
}
}
module.exports = UIChunkControllerFactoryLocator
|
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "6bcd422740f0c0be24c1e3722880417c",
"url": "./index.html"
},
{
"revision": "4c13de606b808b234930",
"url": "./static/css/main.42cc8b22.chunk.css"
},
{
"revision": "4ecb5163fe716a6a8912",
"url": "./static/js/2.4321f2dc.chunk.js"
},
{
"revision": "26ea6ac29495713065d05ead3530e733",
"url": "./static/js/2.4321f2dc.chunk.js.LICENSE.txt"
},
{
"revision": "4c13de606b808b234930",
"url": "./static/js/main.c1ae3f3c.chunk.js"
},
{
"revision": "bb4719da6b52e1d0e49f",
"url": "./static/js/runtime-main.c6c4d617.js"
}
]);
|
'use strict'
var _axios = require('axios');
var config = require('../config.json');
_axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf8';
_axios.defaults.withCredentials = true;
const tough = require('tough-cookie');
const axiosCookieJarSupport = require('axios-cookiejar-support').default;
axiosCookieJarSupport(_axios);
const cookieJar = new tough.CookieJar();
exports.get = function(url, params, timeout, successfn, errorfn) {
_axios.get(url, {
baseURL: config.cduestc.url,
method: 'GET',
params: params,
jar: cookieJar,
responseType: "arraybuffer",
timeout: timeout
})
.then(successfn)
.catch(errorfn);
}
exports.post = function(url, params, data, timeout, successfn, errorfn) {
_axios.get(url, {
baseURL: config.cduestc.url,
method: 'POST',
params: params,
jar: cookieJar,
data: data,
responseType: "arraybuffer",
timeout: timeout
})
.then(successfn)
.catch(errorfn);
}
|
!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(113)},function(e,t){function n(){c=!1,a.length?s=a.concat(s):u=-1,s.length&&o()}function o(){if(!c){var e=setTimeout(n);c=!0;for(var t=s.length;t;){for(a=s,s=[];++u<t;)a&&a[u].run();u=-1,t=s.length}a=null,c=!1,clearTimeout(e)}}function r(e,t){this.fun=e,this.array=t}function i(){}var a,l=e.exports={},s=[],c=!1,u=-1;l.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new r(e,t)),1!==s.length||c||setTimeout(o,0)},r.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=i,l.addListener=i,l.once=i,l.off=i,l.removeListener=i,l.removeAllListeners=i,l.emit=i,l.binding=function(e){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(e){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},function(e,t,n){(function(t){"use strict";var n=function(e,n,o,r,i,a,l,s){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[o,r,i,a,l,s],p=0;c=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return u[p++]}))}throw c.framesToPop=1,c}};e.exports=n}).call(t,n(1))},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),o=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i){var a=Object(i);for(var l in a)o.call(a,l)&&(n[l]=a[l])}}return n}e.exports=n},function(e,t,n){(function(t){"use strict";var o=n(17),r=o;"production"!==t.env.NODE_ENV&&(r=function(e,t){for(var n=[],o=2,r=arguments.length;r>o;o++)n.push(arguments[o]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(0!==t.indexOf("Failed Composite propType: ")&&!e){var i=0,a="Warning: "+t.replace(/%s/g,function(){return n[i++]});console.warn(a);try{throw new Error(a)}catch(l){}}}),e.exports=r}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e,n){Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[n]:null},set:function(e){"production"!==t.env.NODE_ENV?s(!1,"Don't set the %s property of the React element. Instead, specify the correct value when initially creating the element.",n):null,this._store[n]=e}})}function r(e){try{var t={props:!0};for(var n in t)o(e,n);u=!0}catch(r){}}var i=n(54),a=n(15),l=n(3),s=n(4),c={key:!0,ref:!0},u=!1,p=function(e,n,o,r,i,a){if(this.type=e,this.key=n,this.ref=o,this._owner=r,this._context=i,"production"!==t.env.NODE_ENV){this._store={props:a,originalProps:l({},a)};try{Object.defineProperty(this._store,"validated",{configurable:!1,enumerable:!1,writable:!0})}catch(s){}if(this._store.validated=!1,u)return void Object.freeze(this)}this.props=a};p.prototype={_isReactElement:!0},"production"!==t.env.NODE_ENV&&r(p.prototype),p.createElement=function(e,t,n){var o,r={},l=null,s=null;if(null!=t){s=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key;for(o in t)t.hasOwnProperty(o)&&!c.hasOwnProperty(o)&&(r[o]=t[o])}var u=arguments.length-2;if(1===u)r.children=n;else if(u>1){for(var d=Array(u),f=0;u>f;f++)d[f]=arguments[f+2];r.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(o in h)"undefined"==typeof r[o]&&(r[o]=h[o])}return new p(e,l,s,a.current,i.current,r)},p.createFactory=function(e){var t=p.createElement.bind(null,e);return t.type=e,t},p.cloneAndReplaceProps=function(e,n){var o=new p(e.type,e.key,e.ref,e._owner,e._context,n);return"production"!==t.env.NODE_ENV&&(o._store.validated=e._store.validated),o},p.cloneElement=function(e,t,n){var o,r=l({},e.props),i=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=a.current),void 0!==t.key&&(i=""+t.key);for(o in t)t.hasOwnProperty(o)&&!c.hasOwnProperty(o)&&(r[o]=t[o])}var d=arguments.length-2;if(1===d)r.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];r.children=f}return new p(e.type,i,s,u,e._context,r)},p.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=p}).call(t,n(1))},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=o},function(e,t,n){e.exports=n(146)},function(e,t,n){"use strict";var o=n(33),r=o({bubbled:null,captured:null}),i=o({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:r};e.exports=a},function(e,t,n){(function(t){"use strict";function o(e,n,o){for(var r in n)n.hasOwnProperty(r)&&("production"!==t.env.NODE_ENV?C("function"==typeof n[r],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",y[o],r):null)}function r(e,n){var o=T.hasOwnProperty(n)?T[n]:null;P.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?w(o===D.OVERRIDE_BASE,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",n):w(o===D.OVERRIDE_BASE)),e.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?w(o===D.DEFINE_MANY||o===D.DEFINE_MANY_MERGED,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n):w(o===D.DEFINE_MANY||o===D.DEFINE_MANY_MERGED))}function i(e,n){if(n){"production"!==t.env.NODE_ENV?w("function"!=typeof n,"ReactClass: You're attempting to use a component class as a mixin. Instead, just use a regular object."):w("function"!=typeof n),"production"!==t.env.NODE_ENV?w(!h.isValidElement(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object."):w(!h.isValidElement(n));var o=e.prototype;n.hasOwnProperty(_)&&R.mixins(e,n.mixins);for(var i in n)if(n.hasOwnProperty(i)&&i!==_){var a=n[i];if(r(o,i),R.hasOwnProperty(i))R[i](e,a);else{var l=T.hasOwnProperty(i),u=o.hasOwnProperty(i),p=a&&a.__reactDontBind,d="function"==typeof a,f=d&&!l&&!u&&!p;if(f)o.__reactAutoBindMap||(o.__reactAutoBindMap={}),o.__reactAutoBindMap[i]=a,o[i]=a;else if(u){var g=T[i];"production"!==t.env.NODE_ENV?w(l&&(g===D.DEFINE_MANY_MERGED||g===D.DEFINE_MANY),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,i):w(l&&(g===D.DEFINE_MANY_MERGED||g===D.DEFINE_MANY)),g===D.DEFINE_MANY_MERGED?o[i]=s(o[i],a):g===D.DEFINE_MANY&&(o[i]=c(o[i],a))}else o[i]=a,"production"!==t.env.NODE_ENV&&"function"==typeof a&&n.displayName&&(o[i].displayName=n.displayName+"_"+i)}}}}function a(e,n){if(n)for(var o in n){var r=n[o];if(n.hasOwnProperty(o)){var i=o in R;"production"!==t.env.NODE_ENV?w(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',o):w(!i);var a=o in e;"production"!==t.env.NODE_ENV?w(!a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",o):w(!a),e[o]=r}}}function l(e,n){"production"!==t.env.NODE_ENV?w(e&&n&&"object"==typeof e&&"object"==typeof n,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."):w(e&&n&&"object"==typeof e&&"object"==typeof n);for(var o in n)n.hasOwnProperty(o)&&("production"!==t.env.NODE_ENV?w(void 0===e[o],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",o):w(void 0===e[o]),e[o]=n[o]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),o=t.apply(this,arguments);if(null==n)return o;if(null==o)return n;var r={};return l(r,n),l(r,o),r}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,n){var o=n.bind(e);if("production"!==t.env.NODE_ENV){o.__reactBoundContext=e,o.__reactBoundMethod=n,o.__reactBoundArguments=null;var r=e.constructor.displayName,i=o.bind;o.bind=function(a){for(var l=[],s=1,c=arguments.length;c>s;s++)l.push(arguments[s]);if(a!==e&&null!==a)"production"!==t.env.NODE_ENV?C(!1,"bind(): React component methods may only be bound to the component instance. See %s",r):null;else if(!l.length)return"production"!==t.env.NODE_ENV?C(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",r):null,o;var u=i.apply(o,arguments);return u.__reactBoundContext=e,u.__reactBoundMethod=n,u.__reactBoundArguments=l,u}}return o}function p(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,g.guard(n,e.constructor.displayName+"."+t))}}var d=n(86),f=n(15),h=n(5),g=n(164),b=n(25),m=n(57),v=n(58),y=n(40),x=n(59),E=n(3),w=n(2),N=n(33),k=n(18),C=n(4),_=k({mixins:null}),D=N({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),O=[],T={mixins:D.DEFINE_MANY,statics:D.DEFINE_MANY,propTypes:D.DEFINE_MANY,contextTypes:D.DEFINE_MANY,childContextTypes:D.DEFINE_MANY,getDefaultProps:D.DEFINE_MANY_MERGED,getInitialState:D.DEFINE_MANY_MERGED,getChildContext:D.DEFINE_MANY_MERGED,render:D.DEFINE_ONCE,componentWillMount:D.DEFINE_MANY,componentDidMount:D.DEFINE_MANY,componentWillReceiveProps:D.DEFINE_MANY,shouldComponentUpdate:D.DEFINE_ONCE,componentWillUpdate:D.DEFINE_MANY,componentDidUpdate:D.DEFINE_MANY,componentWillUnmount:D.DEFINE_MANY,updateComponent:D.OVERRIDE_BASE},R={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,n){"production"!==t.env.NODE_ENV&&o(e,n,v.childContext),e.childContextTypes=E({},e.childContextTypes,n)},contextTypes:function(e,n){"production"!==t.env.NODE_ENV&&o(e,n,v.context),e.contextTypes=E({},e.contextTypes,n)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,n){"production"!==t.env.NODE_ENV&&o(e,n,v.prop),e.propTypes=E({},e.propTypes,n)},statics:function(e,t){a(e,t)}},M={enumerable:!1,get:function(){var e=this.displayName||this.name||"Component";return"production"!==t.env.NODE_ENV?C(!1,"%s.type is deprecated. Use %s directly to access the class.",e,e):null,Object.defineProperty(this,"type",{value:this}),this}},P={replaceState:function(e,t){x.enqueueReplaceState(this,e),t&&x.enqueueCallback(this,t)},isMounted:function(){if("production"!==t.env.NODE_ENV){var e=f.current;null!==e&&("production"!==t.env.NODE_ENV?C(e._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",e.getName()||"A component"):null,e._warnedAboutRefsInRender=!0)}var n=b.get(this);return n&&n!==m.currentlyMountingInstance},setProps:function(e,t){x.enqueueSetProps(this,e),t&&x.enqueueCallback(this,t)},replaceProps:function(e,t){x.enqueueReplaceProps(this,e),t&&x.enqueueCallback(this,t)}},S=function(){};E(S.prototype,d.prototype,P);var I={createClass:function(e){var n=function(e,o){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?C(this instanceof n,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"):null),this.__reactAutoBindMap&&p(this),this.props=e,this.context=o,this.state=null;var r=this.getInitialState?this.getInitialState():null;"production"!==t.env.NODE_ENV&&"undefined"==typeof r&&this.getInitialState._isMockFunction&&(r=null),"production"!==t.env.NODE_ENV?w("object"==typeof r&&!Array.isArray(r),"%s.getInitialState(): must return an object or null",n.displayName||"ReactCompositeComponent"):w("object"==typeof r&&!Array.isArray(r)),this.state=r};n.prototype=new S,n.prototype.constructor=n,O.forEach(i.bind(null,n)),i(n,e),n.getDefaultProps&&(n.defaultProps=n.getDefaultProps()),"production"!==t.env.NODE_ENV&&(n.getDefaultProps&&(n.getDefaultProps.isReactClassApproved={}),n.prototype.getInitialState&&(n.prototype.getInitialState.isReactClassApproved={})),"production"!==t.env.NODE_ENV?w(n.prototype.render,"createClass(...): Class specification must implement a `render` method."):w(n.prototype.render),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?C(!n.prototype.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",e.displayName||"A component"):null);for(var o in T)n.prototype[o]||(n.prototype[o]=null);if(n.type=n,"production"!==t.env.NODE_ENV)try{Object.defineProperty(n,"type",M)}catch(r){}return n},injection:{injectMixin:function(e){O.push(e)}}};e.exports=I}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e,t){for(var n=Math.min(e.length,t.length),o=0;n>o;o++)if(e.charAt(o)!==t.charAt(o))return o;return e.length===t.length?-1:n}function r(e){var t=M(e);return t&&K.getID(t)}function i(e){var n=a(e);if(n)if(U.hasOwnProperty(n)){var o=U[n];o!==e&&("production"!==t.env.NODE_ENV?S(!u(o,n),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",V,n):S(!u(o,n)),U[n]=e)}else U[n]=e;return n}function a(e){return e&&e.getAttribute&&e.getAttribute(V)||""}function l(e,t){var n=a(e);n!==t&&delete U[n],e.setAttribute(V,t),U[t]=e}function s(e){return U.hasOwnProperty(e)&&u(U[e],e)||(U[e]=K.findReactNodeByID(e)),U[e]}function c(e){var t=N.get(e)._rootNodeID;return E.isNullComponentID(t)?null:(U.hasOwnProperty(t)&&u(U[t],t)||(U[t]=K.findReactNodeByID(t)),U[t])}function u(e,n){if(e){"production"!==t.env.NODE_ENV?S(a(e)===n,"ReactMount: Unexpected modification of `%s`",V):S(a(e)===n);var o=K.findReactContainerForID(n);if(o&&R(o,e))return!0}return!1}function p(e){delete U[e]}function d(e){var t=U[e];return t&&u(t,e)?void(Y=t):!1}function f(e){Y=null,w.traverseAncestors(e,d);var t=Y;return Y=null,t}function h(e,t,n,o,r){var i=_.mountComponent(e,t,o,T);e._isTopLevel=!0,K._mountImageIntoNode(i,n,r)}function g(e,t,n,o){var r=O.ReactReconcileTransaction.getPooled();r.perform(h,null,e,t,n,r,o),O.ReactReconcileTransaction.release(r)}var b=n(20),m=n(23),v=n(15),y=n(5),x=n(31),E=n(56),w=n(24),N=n(25),k=n(90),C=n(16),_=n(26),D=n(59),O=n(11),T=n(43),R=n(96),M=n(196),P=n(65),S=n(2),I=n(67),A=n(68),j=n(4),L=w.SEPARATOR,V=b.ID_ATTRIBUTE_NAME,U={},F=1,B=9,q={},H={};if("production"!==t.env.NODE_ENV)var z={};var W=[],Y=null,K={_instancesByReactRootID:q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,n,o,i){return"production"!==t.env.NODE_ENV&&x.checkAndWarnForMutatedProps(n),K.scrollMonitor(o,function(){D.enqueueElementInternal(e,n),i&&D.enqueueCallbackInternal(e,i)}),"production"!==t.env.NODE_ENV&&(z[r(o)]=M(o)),e},_registerComponent:function(e,n){"production"!==t.env.NODE_ENV?S(n&&(n.nodeType===F||n.nodeType===B),"_registerComponent(...): Target container is not a DOM element."):S(n&&(n.nodeType===F||n.nodeType===B)),m.ensureScrollValueMonitoring();var o=K.registerContainer(n);return q[o]=e,o},_renderNewRootComponent:function(e,n,o){"production"!==t.env.NODE_ENV?j(null==v.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var r=P(e,null),i=K._registerComponent(r,n);return O.batchedUpdates(g,r,i,n,o),"production"!==t.env.NODE_ENV&&(z[i]=M(n)),r},render:function(e,n,o){"production"!==t.env.NODE_ENV?S(y.isValidElement(e),"React.render(): Invalid component element.%s","string"==typeof e?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":"function"==typeof e?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":""):S(y.isValidElement(e));var i=q[r(n)];if(i){var a=i._currentElement;if(A(a,e))return K._updateRootComponent(i,e,n,o).getPublicInstance();K.unmountComponentAtNode(n)}var l=M(n),s=l&&K.isRenderedByReact(l);if("production"!==t.env.NODE_ENV&&(!s||l.nextSibling))for(var c=l;c;){if(K.isRenderedByReact(c)){"production"!==t.env.NODE_ENV?j(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup."):null;break}c=c.nextSibling}var u=s&&!i,p=K._renderNewRootComponent(e,n,u).getPublicInstance();return o&&o.call(p),p},constructAndRenderComponent:function(e,t,n){var o=y.createElement(e,t);return K.render(o,n)},constructAndRenderComponentByID:function(e,n,o){var r=document.getElementById(o);return"production"!==t.env.NODE_ENV?S(r,'Tried to get element with id of "%s" but it is not present on the page.',o):S(r),K.constructAndRenderComponent(e,n,r)},registerContainer:function(e){var t=r(e);return t&&(t=w.getReactRootIDFromNodeID(t)),t||(t=w.createReactRootID()),H[t]=e,t},unmountComponentAtNode:function(e){"production"!==t.env.NODE_ENV?j(null==v.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null,"production"!==t.env.NODE_ENV?S(e&&(e.nodeType===F||e.nodeType===B),"unmountComponentAtNode(...): Target container is not a DOM element."):S(e&&(e.nodeType===F||e.nodeType===B));var n=r(e),o=q[n];return o?(K.unmountComponentFromNode(o,e),delete q[n],delete H[n],"production"!==t.env.NODE_ENV&&delete z[n],!0):!1},unmountComponentFromNode:function(e,t){for(_.unmountComponent(e),t.nodeType===B&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var n=w.getReactRootIDFromNodeID(e),o=H[n];if("production"!==t.env.NODE_ENV){var r=z[n];if(r&&r.parentNode!==o){"production"!==t.env.NODE_ENV?S(a(r)===n,"ReactMount: Root element ID differed from reactRootID."):S(a(r)===n);var i=o.firstChild;i&&n===a(i)?z[n]=i:"production"!==t.env.NODE_ENV?j(!1,"ReactMount: Root element has been removed from its original container. New container:",r.parentNode):null}}return o},findReactNodeByID:function(e){var t=K.findReactContainerForID(e);return K.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=K.getID(e);return t?t.charAt(0)===L:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(K.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,n){var o=W,r=0,i=f(n)||e;for(o[0]=i.firstChild,o.length=1;r<o.length;){for(var a,l=o[r++];l;){var s=K.getID(l);s?n===s?a=l:w.isAncestorIDOf(s,n)&&(o.length=r=0,o.push(l.firstChild)):o.push(l.firstChild),l=l.nextSibling}if(a)return o.length=0,a}o.length=0,"production"!==t.env.NODE_ENV?S(!1,"findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",n,K.getID(e)):S(!1)},_mountImageIntoNode:function(e,n,r){if("production"!==t.env.NODE_ENV?S(n&&(n.nodeType===F||n.nodeType===B),"mountComponentIntoNode(...): Target container is not valid."):S(n&&(n.nodeType===F||n.nodeType===B)),r){var i=M(n);if(k.canReuseMarkup(e,i))return;var a=i.getAttribute(k.CHECKSUM_ATTR_NAME);i.removeAttribute(k.CHECKSUM_ATTR_NAME);var l=i.outerHTML;i.setAttribute(k.CHECKSUM_ATTR_NAME,a);var s=o(e,l),c=" (client) "+e.substring(s-20,s+20)+"\n (server) "+l.substring(s-20,s+20);"production"!==t.env.NODE_ENV?S(n.nodeType!==B,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",c):S(n.nodeType!==B),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?j(!1,"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:\n%s",c):null)}"production"!==t.env.NODE_ENV?S(n.nodeType!==B,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See React.renderToString() for server rendering."):S(n.nodeType!==B),I(n,e)},getReactRootID:r,getID:i,setID:l,getNode:s,getNodeFromInstance:c,purgeID:p};C.measureMethods(K,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),e.exports=K}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(){"production"!==t.env.NODE_ENV?m(O.ReactReconcileTransaction&&w,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):m(O.ReactReconcileTransaction&&w)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=u.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled()}function i(e,t,n,r,i){o(),w.batchedUpdates(e,t,n,r,i)}function a(e,t){return e._mountOrder-t._mountOrder}function l(e){var n=e.dirtyComponentsLength;"production"!==t.env.NODE_ENV?m(n===y.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",n,y.length):m(n===y.length),y.sort(a);for(var o=0;n>o;o++){var r=y[o],i=r._pendingCallbacks;if(r._pendingCallbacks=null,h.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var l=0;l<i.length;l++)e.callbackQueue.enqueue(i[l],r.getPublicInstance())}}function s(e){return o(),"production"!==t.env.NODE_ENV?v(null==d.current,"enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null,w.isBatchingUpdates?void y.push(e):void w.batchedUpdates(s,e)}function c(e,n){"production"!==t.env.NODE_ENV?m(w.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."):m(w.isBatchingUpdates),x.enqueue(e,n),E=!0}var u=n(48),p=n(13),d=n(15),f=n(16),h=n(26),g=n(42),b=n(3),m=n(2),v=n(4),y=[],x=u.getPooled(),E=!1,w=null,N={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),_()):y.length=0}},k={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[N,k];b(r.prototype,g.Mixin,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,u.release(this.callbackQueue),this.callbackQueue=null,O.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return g.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(r);var _=function(){for(;y.length||E;){if(y.length){var e=r.getPooled();e.perform(l,null,e),r.release(e)}if(E){E=!1;var t=x;x=u.getPooled(),t.notifyAll(),u.release(t)}}};_=f.measure("ReactUpdates","flushBatchedUpdates",_);var D={injectReconcileTransaction:function(e){"production"!==t.env.NODE_ENV?m(e,"ReactUpdates: must provide a reconcile transaction class"):m(e),O.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){"production"!==t.env.NODE_ENV?m(e,"ReactUpdates: must provide a batching strategy"):m(e),"production"!==t.env.NODE_ENV?m("function"==typeof e.batchedUpdates,"ReactUpdates: must provide a batchedUpdates() function"):m("function"==typeof e.batchedUpdates),"production"!==t.env.NODE_ENV?m("boolean"==typeof e.isBatchingUpdates,"ReactUpdates: must provide an isBatchingUpdates boolean attribute"):m("boolean"==typeof e.isBatchingUpdates),w=e}},O={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:_,injection:D,asap:c};e.exports=O}).call(t,n(1))},function(e,t,n){"use strict";var o=n(3),r=n(7).PropTypes,i=n(19),a=o({},r,{falsy:function(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0},route:r.instanceOf(i),router:r.func});e.exports=a},function(e,t,n){(function(t){"use strict";var o=n(2),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},a=function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},l=function(e,t,n,o,r){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,o,r),a}return new i(e,t,n,o,r)},s=function(e){var n=this;"production"!==t.env.NODE_ENV?o(e instanceof n,"Trying to release an instance into a pool of a different type."):o(e instanceof n),e.destructor&&e.destructor(),n.instancePool.length<n.poolSize&&n.instancePool.push(e)},c=10,u=r,p=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||u,n.poolSize||(n.poolSize=c),n.release=s,n},d={addPoolingTo:p,oneArgumentPooler:r,twoArgumentPooler:i,threeArgumentPooler:a,fiveArgumentPooler:l};e.exports=d}).call(t,n(1))},function(e,t,n){"use strict";var o=n(97),r={getDOMNode:function(){return o(this)}};e.exports=r},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){(function(t){"use strict";function n(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:n,measureMethods:function(e,n,r){if("production"!==t.env.NODE_ENV)for(var i in r)r.hasOwnProperty(i)&&(e[i]=o.measure(n,r[i],e[i]))},measure:function(e,n,r){if("production"!==t.env.NODE_ENV){var i=null,a=function(){return o.enableMeasure?(i||(i=o.storedMeasure(e,n,r)),i.apply(this,arguments)):r.apply(this,arguments)};return a.displayName=e+"_"+n,a}return r},injection:{injectMeasure:function(e){o.storedMeasure=e}}};e.exports=o}).call(t,n(1))},function(e,t){function n(e){return function(){return e}}function o(){}o.thatReturns=n,o.thatReturnsFalse=n(!1),o.thatReturnsTrue=n(!0),o.thatReturnsNull=n(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";var o,r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(3),l=n(2),s=n(4),c=n(45),u=function(){function e(t,n,o,i,a,l,s,u){r(this,e),this.name=t,this.path=n,this.paramNames=c.extractParamNames(this.path),this.ignoreScrollBehavior=!!o,this.isDefault=!!i,this.isNotFound=!!a,this.onEnter=l,this.onLeave=s,this.handler=u}return i(e,[{key:"appendChild",value:function(t){l(t instanceof e,"route.appendChild must use a valid Route"),this.childRoutes||(this.childRoutes=[]),this.childRoutes.push(t)}},{key:"toString",value:function(){var e="<Route";return this.name&&(e+=' name="'+this.name+'"'),e+=' path="'+this.path+'">'}}],[{key:"createRoute",value:function(t,n){t=t||{},"string"==typeof t&&(t={path:t});var r=o;r?s(null==t.parentRoute||t.parentRoute===r,"You should not use parentRoute with createRoute inside another route's child callback; it is ignored"):r=t.parentRoute;var i=t.name,a=t.path||i;!a||t.isDefault||t.isNotFound?a=r?r.path:"/":c.isAbsolute(a)?r&&l(a===r.path||0===r.paramNames.length,'You cannot nest path "%s" inside "%s"; the parent requires URL parameters',a,r.path):a=r?c.join(r.path,a):"/"+a,t.isNotFound&&!/\*$/.test(a)&&(a+="*");var u=new e(i,a,t.ignoreScrollBehavior,t.isDefault,t.isNotFound,t.onEnter,t.onLeave,t.handler);if(r&&(u.isDefault?(l(null==r.defaultRoute,"%s may not have more than one default route",r),r.defaultRoute=u):u.isNotFound&&(l(null==r.notFoundRoute,"%s may not have more than one not found route",r),r.notFoundRoute=u),r.appendChild(u)),"function"==typeof n){var p=o;o=u,n.call(u,u),o=p}return u}},{key:"createDefaultRoute",value:function(t){return e.createRoute(a({},t,{isDefault:!0}))}},{key:"createNotFoundRoute",value:function(t){return e.createRoute(a({},t,{isNotFound:!0}))}},{key:"createRedirect",value:function(t){return e.createRoute(a({},t,{path:t.path||t.from||"*",onEnter:function(e,n,o){e.redirect(t.to,t.params||n,t.query||o)}}))}}]),e}();e.exports=u},function(e,t,n){(function(t){"use strict";function o(e,t){return(e&t)===t}var r=n(2),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var n=e.Properties||{},a=e.DOMAttributeNames||{},s=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&l._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var u in n){"production"!==t.env.NODE_ENV?r(!l.isStandardName.hasOwnProperty(u),"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",u):r(!l.isStandardName.hasOwnProperty(u)),l.isStandardName[u]=!0;var p=u.toLowerCase();if(l.getPossibleStandardName[p]=u,a.hasOwnProperty(u)){var d=a[u];l.getPossibleStandardName[d]=u,l.getAttributeName[u]=d}else l.getAttributeName[u]=p;l.getPropertyName[u]=s.hasOwnProperty(u)?s[u]:u,c.hasOwnProperty(u)?l.getMutationMethod[u]=c[u]:l.getMutationMethod[u]=null;
var f=n[u];l.mustUseAttribute[u]=o(f,i.MUST_USE_ATTRIBUTE),l.mustUseProperty[u]=o(f,i.MUST_USE_PROPERTY),l.hasSideEffects[u]=o(f,i.HAS_SIDE_EFFECTS),l.hasBooleanValue[u]=o(f,i.HAS_BOOLEAN_VALUE),l.hasNumericValue[u]=o(f,i.HAS_NUMERIC_VALUE),l.hasPositiveNumericValue[u]=o(f,i.HAS_POSITIVE_NUMERIC_VALUE),l.hasOverloadedBooleanValue[u]=o(f,i.HAS_OVERLOADED_BOOLEAN_VALUE),"production"!==t.env.NODE_ENV?r(!l.mustUseAttribute[u]||!l.mustUseProperty[u],"DOMProperty: Cannot require using both attribute and property: %s",u):r(!l.mustUseAttribute[u]||!l.mustUseProperty[u]),"production"!==t.env.NODE_ENV?r(l.mustUseProperty[u]||!l.hasSideEffects[u],"DOMProperty: Properties that have side effects must use property: %s",u):r(l.mustUseProperty[u]||!l.hasSideEffects[u]),"production"!==t.env.NODE_ENV?r(!!l.hasBooleanValue[u]+!!l.hasNumericValue[u]+!!l.hasOverloadedBooleanValue[u]<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",u):r(!!l.hasBooleanValue[u]+!!l.hasNumericValue[u]+!!l.hasOverloadedBooleanValue[u]<=1)}}},a={},l={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<l._isCustomAttributeFunctions.length;t++){var n=l._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,o=a[e];return o||(a[e]=o={}),t in o||(n=document.createElement(e),o[t]=n[t]),o[t]},injection:i};e.exports=l}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var r in o)if(o.hasOwnProperty(r)){var i=o[r];i?this[r]=i(n):this[r]=n[r]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;l?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var r=n(13),i=n(3),a=n(17),l=n(64),s={type:null,target:l,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),o.Interface=s,o.augmentClass=function(e,t){var n=this,o=Object.create(n.prototype);i(o,e.prototype),e.prototype=o,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,r.addPoolingTo(e,r.threeArgumentPooler)},r.addPoolingTo(o,r.threeArgumentPooler),e.exports=o},function(e,t,n){"use strict";var o=n(2),r=n(6).canUseDOM,i={length:1,back:function(){o(r,"Cannot use History.back without a DOM"),i.length-=1,window.history.back()}};e.exports=i},function(e,t,n){"use strict";function o(e){return Object.prototype.hasOwnProperty.call(e,g)||(e[g]=f++,p[e[g]]={}),p[e[g]]}var r=n(8),i=n(29),a=n(85),l=n(165),s=n(95),c=n(3),u=n(66),p={},d=!1,f=0,h={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},g="_reactListenersID"+String(Math.random()).slice(2),b=c({},l,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(b.handleTopLevel),b.ReactEventListener=e}},setEnabled:function(e){b.ReactEventListener&&b.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!b.ReactEventListener||!b.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=o(n),l=a.registrationNameDependencies[e],s=r.topLevelTypes,c=0,p=l.length;p>c;c++){var d=l[c];i.hasOwnProperty(d)&&i[d]||(d===s.topWheel?u("wheel")?b.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):u("mousewheel")?b.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):b.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):d===s.topScroll?u("scroll",!0)?b.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):b.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",b.ReactEventListener.WINDOW_HANDLE):d===s.topFocus||d===s.topBlur?(u("focus",!0)?(b.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),b.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):u("focusin")&&(b.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),b.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),i[s.topBlur]=!0,i[s.topFocus]=!0):h.hasOwnProperty(d)&&b.ReactEventListener.trapBubbledEvent(d,h[d],n),i[d]=!0)}},trapBubbledEvent:function(e,t,n){return b.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return b.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!d){var e=s.refreshScrollValues;b.ReactEventListener.monitorScrollValue(e),d=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});e.exports=b},function(e,t,n){(function(t){"use strict";function o(e){return f+e.toString(36)}function r(e,t){return e.charAt(t)===f||t===e.length}function i(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function a(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function l(e){return e?e.substr(0,e.lastIndexOf(f)):""}function s(e,n){if("production"!==t.env.NODE_ENV?d(i(e)&&i(n),"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",e,n):d(i(e)&&i(n)),"production"!==t.env.NODE_ENV?d(a(e,n),"getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",e,n):d(a(e,n)),e===n)return e;var o,l=e.length+h;for(o=l;o<n.length&&!r(n,o);o++);return n.substr(0,o)}function c(e,n){var o=Math.min(e.length,n.length);if(0===o)return"";for(var a=0,l=0;o>=l;l++)if(r(e,l)&&r(n,l))a=l;else if(e.charAt(l)!==n.charAt(l))break;var s=e.substr(0,a);return"production"!==t.env.NODE_ENV?d(i(s),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,n,s):d(i(s)),s}function u(e,n,o,r,i,c){e=e||"",n=n||"","production"!==t.env.NODE_ENV?d(e!==n,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e):d(e!==n);var u=a(n,e);"production"!==t.env.NODE_ENV?d(u||a(e,n),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,n):d(u||a(e,n));for(var p=0,f=u?l:s,h=e;;h=f(h,n)){var b;if(i&&h===e||c&&h===n||(b=o(h,u,r)),b===!1||h===n)break;"production"!==t.env.NODE_ENV?d(p++<g,"traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",e,n):d(p++<g)}}var p=n(94),d=n(2),f=".",h=f.length,g=100,b={createReactRootID:function(){return o(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,o,r){var i=c(e,t);i!==e&&u(e,i,n,o,!1,!0),i!==t&&u(i,t,n,r,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(u("",e,t,n,!0,!1),u(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){u("",e,t,n,!0,!1)},_getFirstCommonAncestorID:c,_getNextDescendantID:s,isAncestorIDOf:a,SEPARATOR:f};e.exports=b}).call(t,n(1))},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){(function(t){"use strict";function o(){r.attachRefs(this,this._currentElement)}var r=n(171),i=n(31),a={mountComponent:function(e,n,r,a){var l=e.mountComponent(n,r,a);return"production"!==t.env.NODE_ENV&&i.checkAndWarnForMutatedProps(e._currentElement),r.getReactMountReady().enqueue(o,e),l},unmountComponent:function(e){r.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,n,a,l){var s=e._currentElement;if(n!==s||null==n._owner){"production"!==t.env.NODE_ENV&&i.checkAndWarnForMutatedProps(n);var c=r.shouldUpdateRefs(s,n);c&&r.detachRefs(e,s),e.receiveComponent(n,a,l),c&&a.getReactMountReady().enqueue(o,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=a}).call(t,n(1))},function(e,t){"use strict";var n={PUSH:"push",REPLACE:"replace",POP:"pop"};e.exports=n},function(e,t,n){(function(t){"use strict";function o(e,t){return null==t||r.hasBooleanValue[e]&&!t||r.hasNumericValue[e]&&isNaN(t)||r.hasPositiveNumericValue[e]&&1>t||r.hasOverloadedBooleanValue[e]&&t===!1}var r=n(20),i=n(206),a=n(4);if("production"!==t.env.NODE_ENV)var l={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},s={},c=function(e){if(!(l.hasOwnProperty(e)&&l[e]||s.hasOwnProperty(e)&&s[e])){s[e]=!0;var n=e.toLowerCase(),o=r.isCustomAttribute(n)?n:r.getPossibleStandardName.hasOwnProperty(n)?r.getPossibleStandardName[n]:null;"production"!==t.env.NODE_ENV?a(null==o,"Unknown DOM property %s. Did you mean %s?",e,o):null}};var u={createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,n){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(o(e,n))return"";var a=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&n===!0?a:a+"="+i(n)}return r.isCustomAttribute(e)?null==n?"":e+"="+i(n):("production"!==t.env.NODE_ENV&&c(e),null)},setValueForProperty:function(e,n,i){if(r.isStandardName.hasOwnProperty(n)&&r.isStandardName[n]){var a=r.getMutationMethod[n];if(a)a(e,i);else if(o(n,i))this.deleteValueForProperty(e,n);else if(r.mustUseAttribute[n])e.setAttribute(r.getAttributeName[n],""+i);else{var l=r.getPropertyName[n];r.hasSideEffects[n]&&""+e[l]==""+i||(e[l]=i)}}else r.isCustomAttribute(n)?null==i?e.removeAttribute(n):e.setAttribute(n,""+i):"production"!==t.env.NODE_ENV&&c(n)},deleteValueForProperty:function(e,n){if(r.isStandardName.hasOwnProperty(n)&&r.isStandardName[n]){var o=r.getMutationMethod[n];if(o)o(e,void 0);else if(r.mustUseAttribute[n])e.removeAttribute(r.getAttributeName[n]);else{var i=r.getPropertyName[n],a=r.getDefaultValueForProperty(e.nodeName,i);r.hasSideEffects[n]&&""+e[i]===a||(e[i]=a)}}else r.isCustomAttribute(n)?e.removeAttribute(n):"production"!==t.env.NODE_ENV&&c(n)}};e.exports=u}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(){var e=d&&d.traverseTwoPhase&&d.traverseEnterLeave;"production"!==t.env.NODE_ENV?s(e,"InstanceHandle not injected before use!"):s(e)}var r=n(85),i=n(49),a=n(60),l=n(61),s=n(2),c={},u=null,p=function(e){if(e){var t=i.executeDispatch,n=r.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},d=null,f={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){d=e,"production"!==t.env.NODE_ENV&&o()},getInstanceHandle:function(){return"production"!==t.env.NODE_ENV&&o(),d},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,n,o){"production"!==t.env.NODE_ENV?s(!o||"function"==typeof o,"Expected %s listener to be a function, instead got type %s",n,typeof o):s(!o||"function"==typeof o);var r=c[n]||(c[n]={});r[e]=o},getListener:function(e,t){var n=c[t];return n&&n[e]},deleteListener:function(e,t){var n=c[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in c)delete c[t][e]},extractEvents:function(e,t,n,o){for(var i,l=r.plugins,s=0,c=l.length;c>s;s++){var u=l[s];if(u){var p=u.extractEvents(e,t,n,o);p&&(i=a(i,p))}}return i},enqueueEvents:function(e){e&&(u=a(u,e))},processEventQueue:function(){var e=u;u=null,l(e,p),"production"!==t.env.NODE_ENV?s(!u,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."):s(!u)},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=f}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return b(e,o)}function r(e,n,r){if("production"!==t.env.NODE_ENV&&!e)throw new Error("Dispatching id must not be null");var i=n?g.bubbled:g.captured,a=o(e,r,i);a&&(r._dispatchListeners=f(r._dispatchListeners,a),r._dispatchIDs=f(r._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,r,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=b(e,o);r&&(n._dispatchListeners=f(n._dispatchListeners,r),n._dispatchIDs=f(n._dispatchIDs,e))}}function l(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function s(e){h(e,i)}function c(e,t,n,o){d.injection.getInstanceHandle().traverseEnterLeave(n,o,a,e,t)}function u(e){h(e,l)}var p=n(8),d=n(29),f=n(60),h=n(61),g=p.PropagationPhases,b=d.getListener,m={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:u,accumulateEnterLeaveDispatches:c};e.exports=m}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(){if(y.current){var e=y.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function i(){var e=y.current;return e&&r(e)||void 0}function a(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,s('Each child in an array or iterator should have a unique "key" prop.',e,t))}function l(e,t,n){_.test(e)&&s("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function s(e,n,o){var a=i(),l="string"==typeof o?o:o.displayName||o.name,s=a||l,c=k[e]||(k[e]={});if(!c.hasOwnProperty(s)){c[s]=!0;var u=a?" Check the render method of "+a+".":l?" Check the React.render call using <"+l+">.":"",p="";if(n&&n._owner&&n._owner!==y.current){var d=r(n._owner);p=" It was passed a child from "+d+"."}"production"!==t.env.NODE_ENV?N(!1,e+"%s%s See https://fb.me/react-warning-keys for more information.",u,p):null}}function c(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var o=e[n];g.isValidElement(o)&&a(o,t)}else if(g.isValidElement(e))e._store.validated=!0;else if(e){var r=E(e);if(r){if(r!==e.entries)for(var i,s=r.call(e);!(i=s.next()).done;)g.isValidElement(i.value)&&a(i.value,t)}else if("object"==typeof e){var c=b.extractIfFragment(e);for(var u in c)c.hasOwnProperty(u)&&l(u,c[u],t)}}}function u(e,n,r,i){for(var a in n)if(n.hasOwnProperty(a)){var l;try{"production"!==t.env.NODE_ENV?w("function"==typeof n[a],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e||"React class",v[i],a):w("function"==typeof n[a]),l=n[a](r,a,e,i)}catch(s){l=s}if(l instanceof Error&&!(l.message in C)){C[l.message]=!0;var c=o(this);"production"!==t.env.NODE_ENV?N(!1,"Failed propType: %s%s",l.message,c):null}}}function p(e,n){var o=n.type,r="string"==typeof o?o:o.displayName,i=n._owner?n._owner.getPublicInstance().constructor.displayName:null,a=e+"|"+r+"|"+i;if(!D.hasOwnProperty(a)){D[a]=!0;var l="";r&&(l=" <"+r+" />");var s="";i&&(s=" The element was created by "+i+"."),"production"!==t.env.NODE_ENV?N(!1,"Don't set .props.%s of the React component%s. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.%s",e,l,s):null}}function d(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function f(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var o in n)n.hasOwnProperty(o)&&(t.hasOwnProperty(o)&&d(t[o],n[o])||(p(o,e),t[o]=n[o]))}}function h(e){if(null!=e.type){var n=x.getComponentClassForElement(e),o=n.displayName||n.name;n.propTypes&&u(o,n.propTypes,e.props,m.prop),"function"==typeof n.getDefaultProps&&("production"!==t.env.NODE_ENV?N(n.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."):null)}}var g=n(5),b=n(38),m=n(58),v=n(40),y=n(15),x=n(39),E=n(100),w=n(2),N=n(4),k={},C={},_=/^\d+$/,D={},O={checkAndWarnForMutatedProps:f,createElement:function(e,n,o){"production"!==t.env.NODE_ENV?N(null!=e,"React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components)."):null;var r=g.createElement.apply(this,arguments);if(null==r)return r;for(var i=2;i<arguments.length;i++)c(arguments[i],e);return h(r),r},createFactory:function(e){var n=O.createElement.bind(null,e);if(n.type=e,"production"!==t.env.NODE_ENV)try{Object.defineProperty(n,"type",{enumerable:!1,get:function(){return"production"!==t.env.NODE_ENV?N(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."):null,Object.defineProperty(this,"type",{value:e}),e}})}catch(o){}return n},cloneElement:function(e,t,n){for(var o=g.cloneElement.apply(this,arguments),r=2;r<arguments.length;r++)c(arguments[r],o.type);return h(o),o}};e.exports=O}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(21),i=n(64),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(o,a),e.exports=o},function(e,t,n){(function(t){"use strict";var o=n(2),r=function(e){var n,r={};"production"!==t.env.NODE_ENV?o(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):o(e instanceof Object&&!Array.isArray(e));for(n in e)e.hasOwnProperty(n)&&(r[n]=n);return r};e.exports=r}).call(t,n(1))},function(e,t,n){try{(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={state:{documents:{},content:{}},StoreDocuments:function(e){this.state.documents=e,this.onChange()},StoreContent:function(e){this.state.content=e,this.onChangeContent()},getDocuments:function(){var e=this.state.documents,t=[];for(var n in e)0!=e[n].ponderation&&t.push(e[n]);return t},getContent:function(){return this.state.content},onChangeContent:function(){},onChange:function(){}};t["default"]=n,e.exports=t["default"]}).call(this)}finally{}},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=n(7),l=n(2),s=n(12),c=n(36),u=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return i(t,e),r(t,[{key:"render",value:function(){l(!1,"%s elements are for router configuration only and should not be rendered",this.constructor.name)}}]),t}(a.Component);u.propTypes={name:s.string,path:s.string,handler:s.func,ignoreScrollBehavior:s.bool},u.defaultProps={handler:c},e.exports=u},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=n(7),l=n(123),s=n(3),c=n(12),u="__routeHandler__",p=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return i(t,e),r(t,[{key:"getChildContext",value:function(){return{routeDepth:this.context.routeDepth+1}}},{key:"componentDidMount",value:function(){this._updateRouteComponent(this.refs[u])}},{key:"componentDidUpdate",value:function(){this._updateRouteComponent(this.refs[u])}},{key:"componentWillUnmount",value:function(){this._updateRouteComponent(null)}},{key:"_updateRouteComponent",value:function(e){this.context.router.setRouteComponentAtDepth(this.getRouteDepth(),e)}},{key:"getRouteDepth",value:function(){return this.context.routeDepth}},{key:"createChildRouteHandler",value:function(e){var t=this.context.router.getRouteAtDepth(this.getRouteDepth());if(null==t)return null;var n=s({},e||this.props,{ref:u,params:this.context.router.getCurrentParams(),query:this.context.router.getCurrentQuery()});return a.createElement(t.handler,n)}},{key:"render",value:function(){var e=this.createChildRouteHandler();return e?a.createElement(l,null,e):a.createElement("script",null)}}]),t}(a.Component);p.contextTypes={routeDepth:c.number.isRequired,router:c.router.isRequired},p.childContextTypes={routeDepth:c.number.isRequired},e.exports=p},function(e,t,n){"use strict";var o=n(98),r={componentDidMount:function(){this.props.autoFocus&&o(this.getDOMNode())}};e.exports=r},function(e,t,n){(function(t){"use strict";var o=n(5),r=n(4);if("production"!==t.env.NODE_ENV){var i="_reactFragment",a="_reactDidWarn",l=!1;try{var s=function(){return 1};Object.defineProperty({},i,{enumerable:!1,value:!0}),Object.defineProperty({},"key",{enumerable:!0,get:s}),l=!0}catch(c){}var u=function(e,n){Object.defineProperty(e,n,{enumerable:!0,get:function(){return"production"!==t.env.NODE_ENV?r(this[a],"A ReactFragment is an opaque type. Accessing any of its properties is deprecated. Pass it to one of the React.Children helpers."):null,this[a]=!0,this[i][n]},set:function(e){"production"!==t.env.NODE_ENV?r(this[a],"A ReactFragment is an immutable opaque type. Mutating its properties is deprecated."):null,this[a]=!0,this[i][n]=e}})},p={},d=function(e){var t="";for(var n in e)t+=n+":"+typeof e[n]+",";var o=!!p[t];return p[t]=!0,o}}var f={create:function(e){if("production"!==t.env.NODE_ENV){if("object"!=typeof e||!e||Array.isArray(e))return"production"!==t.env.NODE_ENV?r(!1,"React.addons.createFragment only accepts a single object.",e):null,e;if(o.isValidElement(e))return"production"!==t.env.NODE_ENV?r(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."):null,e;if(l){var n={};Object.defineProperty(n,i,{enumerable:!1,value:e}),Object.defineProperty(n,a,{writable:!0,enumerable:!1,value:!1});for(var s in e)u(n,s);return Object.preventExtensions(n),n}}return e},extract:function(e){return"production"!==t.env.NODE_ENV&&l?e[i]?e[i]:("production"!==t.env.NODE_ENV?r(d(e),"Any use of a keyed object should be wrapped in React.addons.createFragment(object) before being passed as a child."):null,e):e},extractIfFragment:function(e){if("production"!==t.env.NODE_ENV&&l){if(e[i])return e[i];for(var n in e)if(e.hasOwnProperty(n)&&o.isValidElement(e[n]))return f.extract(e)}return e}};e.exports=f}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=c(t)),n}function r(e){return"production"!==t.env.NODE_ENV?s(u,"There is no registered component for the tag %s",e.type):s(u),new u(e.type,e.props)}function i(e){return new d(e)}function a(e){return e instanceof d}var l=n(3),s=n(2),c=null,u=null,p={},d=null,f={injectGenericComponentClass:function(e){u=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){l(p,e)},injectAutoWrapper:function(e){c=e}},h={getComponentClassForElement:o,createInternalComponent:r,createInstanceForText:i,isTextComponent:a,injection:f};e.exports=h}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var n={};"production"!==t.env.NODE_ENV&&(n={prop:"prop",context:"context",childContext:"child context"}),e.exports=n}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(32),i=n(95),a=n(63),l={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};r.augmentClass(o,l),e.exports=o},function(e,t,n){(function(t){"use strict";var o=n(2),r={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,n,r,i,a,l,s,c){"production"!==t.env.NODE_ENV?o(!this.isInTransaction(),"Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."):o(!this.isInTransaction());var u,p;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),p=e.call(n,r,i,a,l,s,c),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return p},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=o.initialize?o.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(r){}}}},closeAll:function(e){"production"!==t.env.NODE_ENV?o(this.isInTransaction(),"Transaction.closeAll(): Cannot close transaction when none are open."):o(this.isInTransaction());for(var n=this.transactionWrappers,r=e;r<n.length;r++){var a,l=n[r],s=this.wrapperInitData[r];try{a=!0,s!==i.OBSERVED_ERROR&&l.close&&l.close.call(this,s),a=!1}finally{if(a)try{this.closeAll(r+1)}catch(c){}}}this.wrapperInitData.length=0}},i={Mixin:r,OBSERVED_ERROR:{}};e.exports=i}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var n={};"production"!==t.env.NODE_ENV&&Object.freeze(n),e.exports=n}).call(t,n(1))},function(e,t){"use strict";function n(e){return r[e]}function o(e){return(""+e).replace(i,n)}var r={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=o},function(e,t,n){"use strict";function o(e){if(!(e in p)){var t=[],n=e.replace(l,function(e,n){return n?(t.push(n),"([^/?#]+)"):"*"===e?(t.push("splat"),"(.*?)"):"\\"+e});p[e]={matcher:new RegExp("^"+n+"$","i"),paramNames:t}}return p[e]}var r=n(2),i=n(130),a=n(131),l=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|[*.()\[\]\\+|{}^$]/g,s=/:([a-zA-Z_$][a-zA-Z0-9_$?]*[?]?)|[*]/g,c=/\/\/\?|\/\?\/|\/\?/g,u=/\?(.*)$/,p={},d={isAbsolute:function(e){return"/"===e.charAt(0)},join:function(e,t){return e.replace(/\/*$/,"/")+t},extractParamNames:function(e){return o(e).paramNames},extractParams:function(e,t){var n=o(e),r=n.matcher,i=n.paramNames,a=t.match(r);if(!a)return null;var l={};return i.forEach(function(e,t){l[e]=a[t+1]}),l},injectParams:function(e,t){t=t||{};var n=0;return e.replace(s,function(o,i){if(i=i||"splat","?"===i.slice(-1)){if(i=i.slice(0,-1),null==t[i])return""}else r(null!=t[i],'Missing "%s" parameter for path "%s"',i,e);var a;return"splat"===i&&Array.isArray(t[i])?(a=t[i][n++],r(null!=a,'Missing splat # %s for path "%s"',n,e)):a=t[i],a}).replace(c,"/")},extractQuery:function(e){var t=e.match(u);return t&&a.parse(t[1])},withoutQuery:function(e){return e.replace(u,"")},withQuery:function(e,t){var n=d.extractQuery(e);n&&(t=t?i(n,t):n);var o=a.stringify(t,{arrayFormat:"brackets"});return o?d.withoutQuery(e)+"?"+o:d.withoutQuery(e)}};e.exports=d},function(e,t,n){"use strict";t.DefaultRoute=n(74),t.Link=n(124),t.NotFoundRoute=n(75),t.Redirect=n(76),t.Route=n(35),t.ActiveHandler=n(36),t.RouteHandler=t.ActiveHandler,t.HashLocation=n(79),t.HistoryLocation=n(47),t.RefreshLocation=n(80),t.StaticLocation=n(81),t.TestLocation=n(127),t.ImitateBrowserBehavior=n(73),t.ScrollToTopBehavior=n(122),t.History=n(22),t.Navigation=n(118),t.State=n(120),t.createRoute=n(19).createRoute,t.createDefaultRoute=n(19).createDefaultRoute,t.createNotFoundRoute=n(19).createNotFoundRoute,t.createRedirect=n(19).createRedirect,t.createRoutesFromReactChildren=n(78),t.create=n(77),t.run=n(128)},function(e,t,n){"use strict";function o(e){var t={path:c.getCurrentPath(),type:e};l.forEach(function(e){e.call(c,t)})}function r(e){void 0!==e.state&&o(i.POP)}var i=n(27),a=n(22),l=[],s=!1,c={addChangeListener:function(e){l.push(e),s||(window.addEventListener?window.addEventListener("popstate",r,!1):window.attachEvent("onpopstate",r),s=!0)},removeChangeListener:function(e){l=l.filter(function(t){return t!==e}),0===l.length&&(window.addEventListener?window.removeEventListener("popstate",r,!1):window.removeEvent("onpopstate",r),s=!1)},push:function(e){window.history.pushState({path:e},"",e),a.length+=1,o(i.PUSH)},replace:function(e){window.history.replaceState({path:e},"",e),o(i.REPLACE)},pop:a.back,getCurrentPath:function(){return decodeURI(window.location.pathname+window.location.search)},toString:function(){return"<HistoryLocation>"}};e.exports=c},function(e,t,n){(function(t){"use strict";function o(){this._callbacks=null,this._contexts=null}var r=n(13),i=n(3),a=n(2);i(o.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,n=this._contexts;if(e){"production"!==t.env.NODE_ENV?a(e.length===n.length,"Mismatched list of contexts in callback queue"):a(e.length===n.length),this._callbacks=null,this._contexts=null;for(var o=0,r=e.length;r>o;o++)e[o].call(n[o]);e.length=0,n.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(o),e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function r(e){return e===m.topMouseMove||e===m.topTouchMove}function i(e){return e===m.topMouseDown||e===m.topTouchStart}function a(e,n){var o=e._dispatchListeners,r=e._dispatchIDs;if("production"!==t.env.NODE_ENV&&f(e),Array.isArray(o))for(var i=0;i<o.length&&!e.isPropagationStopped();i++)n(e,o[i],r[i]);else o&&n(e,o,r);
}function l(e,t,n){e.currentTarget=b.Mount.getNode(n);var o=t(e,n);return e.currentTarget=null,o}function s(e,t){a(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function c(e){var n=e._dispatchListeners,o=e._dispatchIDs;if("production"!==t.env.NODE_ENV&&f(e),Array.isArray(n)){for(var r=0;r<n.length&&!e.isPropagationStopped();r++)if(n[r](e,o[r]))return o[r]}else if(n&&n(e,o))return o;return null}function u(e){var t=c(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function p(e){"production"!==t.env.NODE_ENV&&f(e);var n=e._dispatchListeners,o=e._dispatchIDs;"production"!==t.env.NODE_ENV?g(!Array.isArray(n),"executeDirectDispatch(...): Invalid `event`."):g(!Array.isArray(n));var r=n?n(e,o):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function d(e){return!!e._dispatchListeners}var f,h=n(8),g=n(2),b={Mount:null,injectMount:function(e){b.Mount=e,"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?g(e&&e.getNode,"EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode."):g(e&&e.getNode))}},m=h.topLevelTypes;"production"!==t.env.NODE_ENV&&(f=function(e){var n=e._dispatchListeners,o=e._dispatchIDs,r=Array.isArray(n),i=Array.isArray(o),a=i?o.length:o?1:0,l=r?n.length:n?1:0;"production"!==t.env.NODE_ENV?g(i===r&&a===l,"EventPluginUtils: Invalid `event`."):g(i===r&&a===l)});var v={isEndish:o,isMoveish:r,isStartish:i,executeDirectDispatch:p,executeDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:u,hasDispatches:d,injection:b,useTouchEvents:!1};e.exports=v}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){"production"!==t.env.NODE_ENV?c(null==e.props.checkedLink||null==e.props.valueLink,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa."):c(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){o(e),"production"!==t.env.NODE_ENV?c(null==e.props.value&&null==e.props.onChange,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink."):c(null==e.props.value&&null==e.props.onChange)}function i(e){o(e),"production"!==t.env.NODE_ENV?c(null==e.props.checked&&null==e.props.onChange,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink"):c(null==e.props.checked&&null==e.props.onChange)}function a(e){this.props.valueLink.requestChange(e.target.value)}function l(e){this.props.checkedLink.requestChange(e.target.checked)}var s=n(92),c=n(2),u={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},p={Mixin:{propTypes:{value:function(e,t,n){return!e[t]||u[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(i(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),a):e.props.checkedLink?(i(e),l):e.props.onChange}};e.exports=p}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){e.remove()}var r=n(23),i=n(60),a=n(61),l=n(2),s={trapBubbledEvent:function(e,n){"production"!==t.env.NODE_ENV?l(this.isMounted(),"Must be mounted to trap events"):l(this.isMounted());var o=this.getDOMNode();"production"!==t.env.NODE_ENV?l(o,"LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered."):l(o);var a=r.trapBubbledEvent(e,n,o);this._localEventListeners=i(this._localEventListeners,a)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,o)}};e.exports=s}).call(t,n(1))},function(e,t,n){"use strict";var o=n(87),r=n(10),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:o.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){r.purgeID(e)}};e.exports=i},function(e,t,n){(function(t){"use strict";var o=n(2),r=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){"production"!==t.env.NODE_ENV?o(!r,"ReactCompositeComponent: injectEnvironment() can only be called once."):o(!r),i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,i.processChildrenUpdates=e.processChildrenUpdates,r=!0}}};e.exports=i}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var o=n(3),r=n(43),i=n(4),a=!1,l={current:r,withContext:function(e,n){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?i(a,"withContext is deprecated and will be removed in a future version. Use a wrapper component with getChildContext instead."):null,a=!0);var r,s=l.current;l.current=o({},s,e);try{r=n()}finally{l.current=s}return r}};e.exports=l}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){e&&(null!=e.dangerouslySetInnerHTML&&("production"!==t.env.NODE_ENV?m(null==e.children,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):m(null==e.children),"production"!==t.env.NODE_ENV?m("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."):m("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML)),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?x(null==e.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."):null,"production"!==t.env.NODE_ENV?x(!e.contentEditable||null==e.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."):null),"production"!==t.env.NODE_ENV?m(null==e.style||"object"==typeof e.style,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."):m(null==e.style||"object"==typeof e.style))}function r(e,n,o,r){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?x("onScroll"!==n||v("scroll",!0),"This browser doesn't support the `onScroll` event"):null);var i=d.findReactContainerForID(e);if(i){var a=i.nodeType===_?i.ownerDocument:i;w(n,a)}r.getPutListenerQueue().enqueuePutListener(e,n,o)}function i(e){M.call(R,e)||("production"!==t.env.NODE_ENV?m(T.test(e),"Invalid tag: %s",e):m(T.test(e)),R[e]=!0)}function a(e){i(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var l=n(84),s=n(20),c=n(28),u=n(23),p=n(52),d=n(10),f=n(168),h=n(16),g=n(3),b=n(44),m=n(2),v=n(66),y=n(18),x=n(4),E=u.deleteListener,w=u.listenTo,N=u.registrationNameModules,k={string:!0,number:!0},C=y({style:null}),_=1,D=null,O={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},T=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,R={},M={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e,o(this._currentElement.props);var r=O[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+r},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(N.hasOwnProperty(o))r(this._rootNodeID,o,i,e);else{o===C&&(i&&(i=this._previousStyleCopy=g({},t.style)),i=l.createMarkupForStyles(i));var a=c.createMarkupForProperty(o,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var s=c.createMarkupForID(this._rootNodeID);return n+" "+s+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var o=this._currentElement.props,r=o.dangerouslySetInnerHTML;if(null!=r){if(null!=r.__html)return n+r.__html}else{var i=k[typeof o.children]?o.children:null,a=null!=i?null:o.children;if(null!=i)return n+b(i);if(null!=a){var l=this.mountChildren(a,e,t);return n+l.join("")}}return n},receiveComponent:function(e,t,n){var o=this._currentElement;this._currentElement=e,this.updateComponent(t,o,e,n)},updateComponent:function(e,t,n,r){o(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,r)},_updateDOMProperties:function(e,t){var n,o,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===C){var l=this._previousStyleCopy;for(o in l)l.hasOwnProperty(o)&&(i=i||{},i[o]="");this._previousStyleCopy=null}else N.hasOwnProperty(n)?E(this._rootNodeID,n):(s.isStandardName[n]||s.isCustomAttribute(n))&&D.deletePropertyByID(this._rootNodeID,n);for(n in a){var c=a[n],u=n===C?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&c!==u)if(n===C)if(c?c=this._previousStyleCopy=g({},c):this._previousStyleCopy=null,u){for(o in u)!u.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in c)c.hasOwnProperty(o)&&u[o]!==c[o]&&(i=i||{},i[o]=c[o])}else i=c;else N.hasOwnProperty(n)?r(this._rootNodeID,n,c,t):(s.isStandardName[n]||s.isCustomAttribute(n))&&D.updatePropertyByID(this._rootNodeID,n,c)}i&&D.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var o=this._currentElement.props,r=k[typeof e.children]?e.children:null,i=k[typeof o.children]?o.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,l=o.dangerouslySetInnerHTML&&o.dangerouslySetInnerHTML.__html,s=null!=r?null:e.children,c=null!=i?null:o.children,u=null!=r||null!=a,p=null!=i||null!=l;null!=s&&null==c?this.updateChildren(null,t,n):u&&!p&&this.updateTextContent(""),null!=i?r!==i&&this.updateTextContent(""+i):null!=l?a!==l&&D.updateInnerHTMLByID(this._rootNodeID,l):null!=c&&this.updateChildren(c,t,n)},unmountComponent:function(){this.unmountChildren(),u.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},h.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),g(a.prototype,a.Mixin,f.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=D=e}},e.exports=a}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){u[e]=!0}function r(e){delete u[e]}function i(e){return!!u[e]}var a,l=n(5),s=n(25),c=n(2),u={},p={injectEmptyComponent:function(e){a=l.createFactory(e)}},d=function(){};d.prototype.componentDidMount=function(){var e=s.get(this);e&&o(e._rootNodeID)},d.prototype.componentWillUnmount=function(){var e=s.get(this);e&&r(e._rootNodeID)},d.prototype.render=function(){return"production"!==t.env.NODE_ENV?c(a,"Trying to return null from a render, but no null placeholder component was injected."):c(a),a()};var f=l.createElement(d),h={emptyElement:f,injection:p,isNullComponentID:i};e.exports=h}).call(t,n(1))},function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};e.exports=n},function(e,t,n){"use strict";var o=n(33),r=o({prop:null,context:null,childContext:null});e.exports=r},function(e,t,n){(function(t){"use strict";function o(e){e!==i.currentlyMountingInstance&&c.enqueueUpdate(e)}function r(e,n){"production"!==t.env.NODE_ENV?p(null==a.current,"%s(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.",n):p(null==a.current);var o=s.get(e);return o?o===i.currentlyUnmountingInstance?null:o:("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?d(!n,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op.",n,n):null),null)}var i=n(57),a=n(15),l=n(5),s=n(25),c=n(11),u=n(3),p=n(2),d=n(4),f={enqueueCallback:function(e,n){"production"!==t.env.NODE_ENV?p("function"==typeof n,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):p("function"==typeof n);var a=r(e);return a&&a!==i.currentlyMountingInstance?(a._pendingCallbacks?a._pendingCallbacks.push(n):a._pendingCallbacks=[n],void o(a)):null},enqueueCallbackInternal:function(e,n){"production"!==t.env.NODE_ENV?p("function"==typeof n,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):p("function"==typeof n),e._pendingCallbacks?e._pendingCallbacks.push(n):e._pendingCallbacks=[n],o(e)},enqueueForceUpdate:function(e){var t=r(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,o(t))},enqueueReplaceState:function(e,t){var n=r(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(e,t){var n=r(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),o(n)}},enqueueSetProps:function(e,n){var i=r(e,"setProps");if(i){"production"!==t.env.NODE_ENV?p(i._isTopLevel,"setProps(...): You called `setProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):p(i._isTopLevel);var a=i._pendingElement||i._currentElement,s=u({},a.props,n);i._pendingElement=l.cloneAndReplaceProps(a,s),o(i)}},enqueueReplaceProps:function(e,n){var i=r(e,"replaceProps");if(i){"production"!==t.env.NODE_ENV?p(i._isTopLevel,"replaceProps(...): You called `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):p(i._isTopLevel);var a=i._pendingElement||i._currentElement;i._pendingElement=l.cloneAndReplaceProps(a,n),o(i)}},enqueueElementInternal:function(e,t){e._pendingElement=t,o(e)}};e.exports=f}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e,n){if("production"!==t.env.NODE_ENV?r(null!=n,"accumulateInto(...): Accumulated items must not be null or undefined."):r(null!=n),null==e)return n;var o=Array.isArray(e),i=Array.isArray(n);return o&&i?(e.push.apply(e,n),e):o?(e.push(n),e):i?[e].concat(n):[e,n]}var r=n(2);e.exports=o}).call(t,n(1))},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var o=r[e];return o?!!n[o]:!1}function o(e){return n}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){(function(t){"use strict";function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function r(e,n){var r;if((null===e||e===!1)&&(e=a.emptyElement),"object"==typeof e){var i=e;"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?u(i&&("function"==typeof i.type||"string"==typeof i.type),"Only functions or strings can be mounted as React components."):null),r=n===i.type&&"string"==typeof i.type?l.createInternalComponent(i):o(i.type)?new i.type(i):new p}else"string"==typeof e||"number"==typeof e?r=l.createInstanceForText(e):"production"!==t.env.NODE_ENV?c(!1,"Encountered invalid React node of type %s",typeof e):c(!1);return"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?u("function"==typeof r.construct&&"function"==typeof r.mountComponent&&"function"==typeof r.receiveComponent&&"function"==typeof r.unmountComponent,"Only React Components can be mounted."):null),r.construct(e),r._mountIndex=0,r._mountImage=null,"production"!==t.env.NODE_ENV&&(r._isOwnerNecessary=!1,r._warnedAboutRefsInRender=!1),"production"!==t.env.NODE_ENV&&Object.preventExtensions&&Object.preventExtensions(r),r}var i=n(149),a=n(56),l=n(39),s=n(3),c=n(2),u=n(4),p=function(){};s(p.prototype,i.Mixin,{_instantiateReactComponent:r}),e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/
function o(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var a=document.createElement("div");a.setAttribute(n,"return;"),o="function"==typeof a[n]}return!o&&r&&"wheel"===e&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var r,i=n(6);i.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=o},function(e,t,n){"use strict";var o=n(6),r=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){(function(t){"use strict";function o(e,n){if(null!=e&&null!=n){var o=typeof e,i=typeof n;if("string"===o||"number"===o)return"string"===i||"number"===i;if("object"===i&&e.type===n.type&&e.key===n.key){var a=e._owner===n._owner,l=null,s=null,c=null;return"production"!==t.env.NODE_ENV&&(a||(null!=e._owner&&null!=e._owner.getPublicInstance()&&null!=e._owner.getPublicInstance().constructor&&(l=e._owner.getPublicInstance().constructor.displayName),null!=n._owner&&null!=n._owner.getPublicInstance()&&null!=n._owner.getPublicInstance().constructor&&(s=n._owner.getPublicInstance().constructor.displayName),null!=n.type&&null!=n.type.displayName&&(c=n.type.displayName),null!=n.type&&"string"==typeof n.type&&(c=n.type),("string"!=typeof n.type||"input"===n.type||"textarea"===n.type)&&(null!=e._owner&&e._owner._isOwnerNecessary===!1||null!=n._owner&&n._owner._isOwnerNecessary===!1)&&(null!=e._owner&&(e._owner._isOwnerNecessary=!0),null!=n._owner&&(n._owner._isOwnerNecessary=!0),"production"!==t.env.NODE_ENV?r(!1,"<%s /> is being rendered by both %s and %s using the same key (%s) in the same place. Currently, this means that they don't preserve state. This behavior should be very rare so we're considering deprecating it. Please contact the React team and explain your use case so that we can take that into consideration.",c||"Unknown Component",l||"[Unknown]",s||"[Unknown]",e.key):null))),a}}return!1}var r=n(4);e.exports=o}).call(t,n(1))},function(e,t,n){e.exports=n.p+"f4769f9bdb7466be65088239c12046d1.eot"},function(e,t,n){try{(function(){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),i=o(r),a=n(108),l=o(a),s={fetchDocuments:function(e){l["default"].ajax({url:"/request/?req="+e,dataType:"json",type:"GET",success:function(e){i["default"].StoreDocuments(e)}.bind(this),error:function(e,t,n){console.error("/request/",t,n.toString())}.bind(this)})},fetchContent:function(e){l["default"].ajax({url:"/documents/"+e,dataType:"text",type:"GET",success:function(e){i["default"].StoreContent(e)}.bind(this),error:function(e,t,n){console.error("/documents/",t,n.toString())}.bind(this)})}};t["default"]=s,e.exports=t["default"]}).call(this)}finally{}},function(e,t){"use strict";function n(){}e.exports=n},function(e,t){"use strict";function n(e,t,n){this.to=e,this.params=t,this.query=n}e.exports=n},function(e,t,n){"use strict";var o=n(27),r={updateScrollPosition:function(e,t){switch(t){case o.PUSH:case o.REPLACE:window.scrollTo(0,0);break;case o.POP:e?window.scrollTo(e.x,e.y):window.scrollTo(0,0)}}};e.exports=r},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=n(12),a=n(36),l=n(35),s=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return r(t,e),t}(l);s.propTypes={name:i.string,path:i.falsy,children:i.falsy,handler:i.func.isRequired},s.defaultProps={handler:a},e.exports=s},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=n(12),a=n(36),l=n(35),s=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return r(t,e),t}(l);s.propTypes={name:i.string,path:i.falsy,children:i.falsy,handler:i.func.isRequired},s.defaultProps={handler:a},e.exports=s},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},i=n(12),a=n(35),l=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return r(t,e),t}(a);l.propTypes={path:i.string,from:i.string,to:i.string,handler:i.falsy},l.defaultProps={},e.exports=l},function(e,t,n){(function(t){"use strict";function o(e,t){for(var n in t)if(t.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}function r(e,t,n,r,i,a){return e.some(function(e){if(e!==t)return!1;for(var l,s=t.paramNames,c=0,u=s.length;u>c;++c)if(l=s[c],r[l]!==n[l])return!1;return o(i,a)&&o(a,i)})}function i(e,t){for(var n,o=0,r=e.length;r>o;++o)n=e[o],n.name&&(d(null==t[n.name],'You may not have more than one route named "%s"',n.name),t[n.name]=n),n.childRoutes&&i(n.childRoutes,t)}function a(e,t){return e.some(function(e){return e.name===t})}function l(e,t){for(var n in t)if(String(e[n])!==String(t[n]))return!1;return!0}function s(e,t){for(var n in t)if(String(e[n])!==String(t[n]))return!1;return!0}function c(e){e=e||{},w(e)&&(e={routes:e});var n=[],o=e.location||P,c=e.scrollBehavior||S,g={},I={},A=null,j=null;"string"==typeof o&&(o=new y(o)),o instanceof y?p(!f||"test"===t.env.NODE_ENV,"You should not use a static location in a DOM environment because the router will not be kept in sync with the current URL"):d(f||o.needsDOM===!1,"You cannot use %s without a DOM",o),o!==m||R()||(o=v);var L=u.createClass({displayName:"Router",statics:{isRunning:!1,cancelPendingTransition:function(){A&&(A.cancel(),A=null)},clearAllRoutes:function(){L.cancelPendingTransition(),L.namedRoutes={},L.routes=[]},addRoutes:function(e){w(e)&&(e=E(e)),i(e,L.namedRoutes),L.routes.push.apply(L.routes,e)},replaceRoutes:function(e){L.clearAllRoutes(),L.addRoutes(e),L.refresh()},match:function(e){return O.findMatch(L.routes,e)},makePath:function(e,t,n){var o;if(M.isAbsolute(e))o=e;else{var r=e instanceof T?e:L.namedRoutes[e];d(r instanceof T,'Cannot find a route named "%s"',e),o=r.path}return M.withQuery(M.injectParams(o,t),n)},makeHref:function(e,t,n){var r=L.makePath(e,t,n);return o===b?"#"+r:r},transitionTo:function(e,t,n){var r=L.makePath(e,t,n);A?o.replace(r):o.push(r)},replaceWith:function(e,t,n){o.replace(L.makePath(e,t,n))},goBack:function(){return _.length>1||o===v?(o.pop(),!0):(p(!1,"goBack() was ignored because there is no router history"),!1)},handleAbort:e.onAbort||function(e){if(o instanceof y)throw new Error("Unhandled aborted transition! Reason: "+e);e instanceof D||(e instanceof C?o.replace(L.makePath(e.to,e.params,e.query)):o.pop())},handleError:e.onError||function(e){throw e},handleLocationChange:function(e){L.dispatch(e.path,e.type)},dispatch:function(e,t){L.cancelPendingTransition();var o=g.path,i=null==t;if(o!==e||i){o&&t===h.PUSH&&L.recordScrollPosition(o);var a=L.match(e);p(null!=a,'No route matches path "%s". Make sure you have <Route path="%s"> somewhere in your routes',e,e),null==a&&(a={});var l,s,c=g.routes||[],u=g.params||{},d=g.query||{},f=a.routes||[],b=a.params||{},m=a.query||{};c.length?(l=c.filter(function(e){return!r(f,e,u,b,d,m)}),s=f.filter(function(e){return!r(c,e,u,b,d,m)})):(l=[],s=f);var v=new N(e,L.replaceWith.bind(L,e));A=v;var y=n.slice(c.length-l.length);N.from(v,l,y,function(n){return n||v.abortReason?j.call(L,n,v):void N.to(v,s,b,m,function(n){j.call(L,n,v,{path:e,action:t,pathname:a.pathname,routes:f,params:b,query:m})})})}},run:function(e){d(!L.isRunning,"Router is already running"),j=function(t,n,o){t&&L.handleError(t),A===n&&(A=null,n.abortReason?L.handleAbort(n.abortReason):e.call(L,L,I=o))},o instanceof y||(o.addChangeListener&&o.addChangeListener(L.handleLocationChange),L.isRunning=!0),L.refresh()},refresh:function(){L.dispatch(o.getCurrentPath(),null)},stop:function(){L.cancelPendingTransition(),o.removeChangeListener&&o.removeChangeListener(L.handleLocationChange),L.isRunning=!1},getLocation:function(){return o},getScrollBehavior:function(){return c},getRouteAtDepth:function(e){var t=g.routes;return t&&t[e]},setRouteComponentAtDepth:function(e,t){n[e]=t},getCurrentPath:function(){return g.path},getCurrentPathname:function(){return g.pathname},getCurrentParams:function(){return g.params},getCurrentQuery:function(){return g.query},getCurrentRoutes:function(){return g.routes},isActive:function(e,t,n){return M.isAbsolute(e)?e===g.path:a(g.routes,e)&&l(g.params,t)&&(null==n||s(g.query,n))}},mixins:[x],propTypes:{children:k.falsy},childContextTypes:{routeDepth:k.number.isRequired,router:k.router.isRequired},getChildContext:function(){return{routeDepth:1,router:L}},getInitialState:function(){return g=I},componentWillReceiveProps:function(){this.setState(g=I)},componentWillUnmount:function(){L.stop()},render:function(){var e=L.getRouteAtDepth(0);return e?u.createElement(e.handler,this.props):null}});return L.clearAllRoutes(),e.routes&&L.addRoutes(e.routes),L}var u=n(7),p=n(4),d=n(2),f=n(6).canUseDOM,h=n(27),g=n(73),b=n(79),m=n(47),v=n(80),y=n(81),x=n(119),E=n(78),w=n(126),N=n(121),k=n(12),C=n(72),_=n(22),D=n(71),O=n(117),T=n(19),R=n(129),M=n(45),P=f?b:"/",S=f?g:null;e.exports=c}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t,n){e=e||"UnknownComponent";for(var o in t)if(t.hasOwnProperty(o)){var r=t[o](n,o,e);r instanceof Error&&c(!1,r.message)}}function r(e){var t=s({},e),n=t.handler;return n&&(t.onEnter=n.willTransitionTo,t.onLeave=n.willTransitionFrom),t}function i(e){if(l.isValidElement(e)){var t=e.type,n=s({},t.defaultProps,e.props);return t.propTypes&&o(t.displayName,t.propTypes,n),t===u?f.createDefaultRoute(r(n)):t===p?f.createNotFoundRoute(r(n)):t===d?f.createRedirect(r(n)):f.createRoute(r(n),function(){n.children&&a(n.children)})}}function a(e){var t=[];return l.Children.forEach(e,function(e){(e=i(e))&&t.push(e)}),t}var l=n(7),s=n(3),c=n(4),u=n(74),p=n(75),d=n(76),f=n(19);e.exports=a},function(e,t,n){"use strict";function o(e){e===l.PUSH&&(s.length+=1);var t={path:p.getCurrentPath(),type:e};c.forEach(function(e){e.call(p,t)})}function r(){var e=p.getCurrentPath();return"/"===e.charAt(0)?!0:(p.replace("/"+e),!1)}function i(){if(r()){var e=a;a=null,o(e||l.POP)}}var a,l=n(27),s=n(22),c=[],u=!1,p={addChangeListener:function(e){c.push(e),r(),u||(window.addEventListener?window.addEventListener("hashchange",i,!1):window.attachEvent("onhashchange",i),u=!0)},removeChangeListener:function(e){c=c.filter(function(t){return t!==e}),0===c.length&&(window.removeEventListener?window.removeEventListener("hashchange",i,!1):window.removeEvent("onhashchange",i),u=!1)},push:function(e){a=l.PUSH,window.location.hash=e},replace:function(e){a=l.REPLACE,window.location.replace(window.location.pathname+window.location.search+"#"+e)},pop:function(){a=l.POP,s.back()},getCurrentPath:function(){return decodeURI(window.location.href.split("#")[1]||"")},toString:function(){return"<HashLocation>"}};e.exports=p},function(e,t,n){"use strict";var o=n(47),r=n(22),i={push:function(e){window.location=e},replace:function(e){window.location.replace(e)},pop:r.back,getCurrentPath:o.getCurrentPath,toString:function(){return"<RefreshLocation>"}};e.exports=i},function(e,t,n){"use strict";function o(){a(!1,"You cannot modify a static location")}var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(2),l=function(){function e(t){r(this,e),this.path=t}return i(e,[{key:"getCurrentPath",value:function(){return this.path}},{key:"toString",value:function(){return'<StaticLocation path="'+this.path+'">'}}]),e}();l.prototype.push=o,l.prototype.replace=o,l.prototype.pop=o,e.exports=l},function(e,t){t.arrayToObject=function(e){for(var t={},n=0,o=e.length;o>n;++n)"undefined"!=typeof e[n]&&(t[n]=e[n]);return t},t.merge=function(e,n){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):e[n]=!0,e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e));for(var o=Object.keys(n),r=0,i=o.length;i>r;++r){var a=o[r],l=n[a];e[a]?e[a]=t.merge(e[a],l):e[a]=l}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var o=n.indexOf(e);if(-1!==o)return n[o];if(n.push(e),Array.isArray(e)){for(var r=[],i=0,a=e.length;a>i;++i)"undefined"!=typeof e[i]&&r.push(e[i]);return r}var l=Object.keys(e);for(i=0,a=l.length;a>i;++i){var s=l[i];e[s]=t.compact(e[s],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){r.forEach(function(t){o[n(t,e)]=o[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:o,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){(function(t){"use strict";var o=n(83),r=n(6),i=n(188),a=n(192),l=n(199),s=n(202),c=n(4),u=s(function(e){return l(e)}),p="cssFloat";if(r.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(p="styleFloat"),"production"!==t.env.NODE_ENV)var d=/^(?:webkit|moz|o)[A-Z]/,f=/;\s*$/,h={},g={},b=function(e){h.hasOwnProperty(e)&&h[e]||(h[e]=!0,"production"!==t.env.NODE_ENV?c(!1,"Unsupported style property %s. Did you mean %s?",e,i(e)):null)},m=function(e){h.hasOwnProperty(e)&&h[e]||(h[e]=!0,"production"!==t.env.NODE_ENV?c(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)):null)},v=function(e,n){g.hasOwnProperty(n)&&g[n]||(g[n]=!0,"production"!==t.env.NODE_ENV?c(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,n.replace(f,"")):null)},y=function(e,t){e.indexOf("-")>-1?b(e):d.test(e)?m(e):f.test(t)&&v(e,t)};var x={createMarkupForStyles:function(e){var n="";for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];"production"!==t.env.NODE_ENV&&y(o,r),null!=r&&(n+=u(o)+":",n+=a(o,r)+";")}return n||null},setValueForStyles:function(e,n){var r=e.style;for(var i in n)if(n.hasOwnProperty(i)){"production"!==t.env.NODE_ENV&&y(i,n[i]);var l=a(i,n[i]);if("float"===i&&(i=p),l)r[i]=l;else{var s=o.shorthandPropertyExpansions[i];if(s)for(var c in s)r[c]="";else r[i]=""}}}};e.exports=x}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(){if(l)for(var e in s){var n=s[e],o=l.indexOf(e);if("production"!==t.env.NODE_ENV?a(o>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):a(o>-1),!c.plugins[o]){"production"!==t.env.NODE_ENV?a(n.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):a(n.extractEvents),c.plugins[o]=n;var i=n.eventTypes;for(var u in i)"production"!==t.env.NODE_ENV?a(r(i[u],n,u),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",u,e):a(r(i[u],n,u))}}}function r(e,n,o){"production"!==t.env.NODE_ENV?a(!c.eventNameDispatchConfigs.hasOwnProperty(o),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",o):a(!c.eventNameDispatchConfigs.hasOwnProperty(o)),c.eventNameDispatchConfigs[o]=e;var r=e.phasedRegistrationNames;if(r){for(var l in r)if(r.hasOwnProperty(l)){var s=r[l];i(s,n,o)}return!0}return e.registrationName?(i(e.registrationName,n,o),!0):!1}function i(e,n,o){"production"!==t.env.NODE_ENV?a(!c.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):a(!c.registrationNameModules[e]),c.registrationNameModules[e]=n,c.registrationNameDependencies[e]=n.eventTypes[o].dependencies}var a=n(2),l=null,s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){"production"!==t.env.NODE_ENV?a(!l,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!l),l=Array.prototype.slice.call(e),o()},injectEventPluginsByName:function(e){var n=!1;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];s.hasOwnProperty(r)&&s[r]===i||("production"!==t.env.NODE_ENV?a(!s[r],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",r):a(!s[r]),s[r]=i,n=!0)}n&&o()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var o=c.registrationNameModules[t.phasedRegistrationNames[n]];if(o)return o}return null},_resetEventPlugins:function(){l=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var o=c.registrationNameModules;for(var r in o)o.hasOwnProperty(r)&&delete o[r]}};e.exports=c}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e,t){this.props=e,this.context=t}var r=n(59),i=n(2),a=n(4);if(o.prototype.setState=function(e,n){"production"!==t.env.NODE_ENV?i("object"==typeof e||"function"==typeof e||null==e,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):i("object"==typeof e||"function"==typeof e||null==e),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),r.enqueueSetState(this,e),n&&r.enqueueCallback(this,n)},o.prototype.forceUpdate=function(e){r.enqueueForceUpdate(this),e&&r.enqueueCallback(this,e)},"production"!==t.env.NODE_ENV){var l={getDOMNode:["getDOMNode","Use React.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call React.render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call React.render again at the top level."]},s=function(e,n){try{Object.defineProperty(o.prototype,e,{get:function(){return void("production"!==t.env.NODE_ENV?a(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1]):null)}})}catch(r){}};for(var c in l)l.hasOwnProperty(c)&&s(c,l[c])}e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var o=n(84),r=n(138),i=n(28),a=n(10),l=n(16),s=n(2),c=n(67),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,n,o){var r=a.getNode(e);"production"!==t.env.NODE_ENV?s(!u.hasOwnProperty(n),"updatePropertyByID(...): %s",u[n]):s(!u.hasOwnProperty(n)),null!=o?i.setValueForProperty(r,n,o):i.deleteValueForProperty(r,n)},deletePropertyByID:function(e,n,o){var r=a.getNode(e);"production"!==t.env.NODE_ENV?s(!u.hasOwnProperty(n),"updatePropertyByID(...): %s",u[n]):s(!u.hasOwnProperty(n)),i.deleteValueForProperty(r,n,o)},updateStylesByID:function(e,t){var n=a.getNode(e);o.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);c(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);r.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);r.processUpdates(e,t)}};l.measureMethods(p,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),e.exports=p}).call(t,n(1))},function(e,t,n){"use strict";var o=n(28),r=n(52),i=n(55),a=n(3),l=n(44),s=function(e){};a(s.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){this._rootNodeID=e;var r=l(this._stringText);return t.renderToStaticMarkup?r:"<span "+o.createMarkupForID(e)+">"+r+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){r.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=s},function(e,t,n){"use strict";function o(e){return i(document.documentElement,e)}var r=n(158),i=n(96),a=n(98),l=n(99),s={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=l();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=l(),n=e.focusedElem,r=e.selectionRange;t!==n&&o(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,r),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};e.exports=s},function(e,t,n){"use strict";var o=n(186),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=o(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(r.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=o(e);return i===n}};e.exports=r},function(e,t,n){"use strict";var o=n(33),r=o({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=r},function(e,t,n){"use strict";function o(e){function t(t,n,o,r,i){if(r=r||E,null==n[o]){var a=y[i];return t?new Error("Required "+a+" `"+o+"` was not specified in "+("`"+r+"`.")):null}return e(n,o,r,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function r(e){function t(t,n,o,r){var i=t[n],a=g(i);if(a!==e){var l=y[r],s=b(i);return new Error("Invalid "+l+" `"+n+"` of type `"+s+"` "+("supplied to `"+o+"`, expected `"+e+"`."))}return null}return o(t)}function i(){return o(x.thatReturns(null))}function a(e){function t(t,n,o,r){var i=t[n];if(!Array.isArray(i)){var a=y[r],l=g(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+l+"` supplied to `"+o+"`, expected an array."))}for(var s=0;s<i.length;s++){var c=e(i,s,o,r);if(c instanceof Error)return c}return null}return o(t)}function l(){function e(e,t,n,o){if(!m.isValidElement(e[t])){var r=y[o];return new Error("Invalid "+r+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return o(e)}function s(e){function t(t,n,o,r){if(!(t[n]instanceof e)){var i=y[r],a=e.name||E;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+o+"`, expected instance of `"+a+"`."))}return null}return o(t)}function c(e){function t(t,n,o,r){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return null;var l=y[r],s=JSON.stringify(e);return new Error("Invalid "+l+" `"+n+"` of value `"+i+"` "+("supplied to `"+o+"`, expected one of "+s+"."))}return o(t)}function u(e){function t(t,n,o,r){var i=t[n],a=g(i);if("object"!==a){var l=y[r];return new Error("Invalid "+l+" `"+n+"` of type "+("`"+a+"` supplied to `"+o+"`, expected an object."))}for(var s in i)if(i.hasOwnProperty(s)){var c=e(i,s,o,r);if(c instanceof Error)return c}return null}return o(t)}function p(e){function t(t,n,o,r){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,o,r))return null}var l=y[r];return new Error("Invalid "+l+" `"+n+"` supplied to "+("`"+o+"`."))}return o(t)}function d(){function e(e,t,n,o){if(!h(e[t])){var r=y[o];return new Error("Invalid "+r+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return o(e)}function f(e){function t(t,n,o,r){var i=t[n],a=g(i);if("object"!==a){var l=y[r];return new Error("Invalid "+l+" `"+n+"` of type `"+a+"` "+("supplied to `"+o+"`, expected `object`."))}for(var s in e){var c=e[s];if(c){var u=c(i,s,o,r);if(u)return u}}return null}return o(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||m.isValidElement(e))return!0;e=v.extractIfFragment(e);for(var t in e)if(!h(e[t]))return!1;return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function b(e){var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var m=n(5),v=n(38),y=n(40),x=n(17),E="<<anonymous>>",w=l(),N=d(),k={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:i(),arrayOf:a,element:w,instanceOf:s,node:N,objectOf:u,oneOf:c,oneOfType:p,shape:f};e.exports=k},function(e,t,n){"use strict";function o(){this.listenersToPut=[]}var r=n(13),i=n(23),a=n(3);a(o.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];i.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),r.addPoolingTo(o),e.exports=o},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:n};e.exports=o},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){function o(e,t){return e&&t?e===t?!0:r(e)?!1:r(t)?o(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var r=n(200);e.exports=o},function(e,t,n){(function(t){"use strict";function o(e){if("production"!==t.env.NODE_ENV){var n=r.current;null!==n&&("production"!==t.env.NODE_ENV?c(n._warnedAboutRefsInRender,"%s is accessing getDOMNode or findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",n.getName()||"A component"):null,n._warnedAboutRefsInRender=!0)}return null==e?null:s(e)?e:i.has(e)?a.getNodeFromInstance(e):("production"!==t.env.NODE_ENV?l(null==e.render||"function"!=typeof e.render,"Component (with keys: %s) contains `render` method but is not mounted in the DOM",Object.keys(e)):l(null==e.render||"function"!=typeof e.render),void("production"!==t.env.NODE_ENV?l(!1,"Element appears to be neither ReactComponent nor DOMNode (keys: %s)",Object.keys(e)):l(!1)))}var r=n(15),i=n(25),a=n(10),l=n(2),s=n(103),c=n(4);e.exports=o}).call(t,n(1))},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(o&&e[o]||e[r]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,r="@@iterator";e.exports=n},function(e,t,n){(function(t){function o(e){return"production"!==t.env.NODE_ENV?i(!!a,"Markup wrapping node not initialized"):i(!!a),d.hasOwnProperty(e)||(e="*"),l.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",l[e]=!a.firstChild),l[e]?d[e]:null}var r=n(6),i=n(2),a=r.canUseDOM?document.createElement("div"):null,l={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],u=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,"<svg>","</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:u,th:u,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";function o(){return!i&&r.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var r=n(6),i=null;e.exports=o},function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&o[e.type]||"TEXTAREA"===e.nodeName)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){
(function(t){"use strict";function o(e){return m[e]}function r(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function i(e){return(""+e).replace(v,o)}function a(e){return"$"+i(e)}function l(e,n,o,i,s){var p=typeof e;if(("undefined"===p||"boolean"===p)&&(e=null),null===e||"string"===p||"number"===p||c.isValidElement(e))return i(s,e,""===n?g+r(e,0):n,o),1;var m,v,x,E=0;if(Array.isArray(e))for(var w=0;w<e.length;w++)m=e[w],v=(""!==n?n+b:g)+r(m,w),x=o+E,E+=l(m,v,x,i,s);else{var N=d(e);if(N){var k,C=N.call(e);if(N!==e.entries)for(var _=0;!(k=C.next()).done;)m=k.value,v=(""!==n?n+b:g)+r(m,_++),x=o+E,E+=l(m,v,x,i,s);else for("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?h(y,"Using Maps as children is not yet fully supported. It is an experimental feature that might be removed. Convert it to a sequence / iterable of keyed ReactElements instead."):null,y=!0);!(k=C.next()).done;){var D=k.value;D&&(m=D[1],v=(""!==n?n+b:g)+a(D[0])+b+r(m,0),x=o+E,E+=l(m,v,x,i,s))}}else if("object"===p){"production"!==t.env.NODE_ENV?f(1!==e.nodeType,"traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components."):f(1!==e.nodeType);var O=u.extract(e);for(var T in O)O.hasOwnProperty(T)&&(m=O[T],v=(""!==n?n+b:g)+a(T)+b+r(m,0),x=o+E,E+=l(m,v,x,i,s))}}return E}function s(e,t,n){return null==e?0:l(e,"",0,t,n)}var c=n(5),u=n(38),p=n(24),d=n(100),f=n(2),h=n(4),g=p.SEPARATOR,b=":",m={"=":"=0",".":"=1",":":"=2"},v=/[=.:]/g,y=!1;e.exports=s}).call(t,n(1))},function(e,t,n){t=e.exports=n(107)(),t.push([e.id,'/*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:transparent!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(69)+");src:url("+n(69)+"?#iefix) format('embedded-opentype'),url("+n(213)+") format('woff2'),url("+n(212)+") format('woff'),url("+n(214)+") format('truetype'),url("+n(215)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before{content:"\\E227"}.glyphicon-yen:before{content:"\\A5"}.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:9pt}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:1pc;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:10pc;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{margin:0;min-width:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 9pt;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=datetime-local],input[type=month],input[type=time]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\\9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:9pt;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:9pt;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;padding:5px 10px;font-size:9pt;line-height:1.5}.input-lg{height:46px;padding:10px 1pc;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 1pc;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;padding:10px 1pc;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.333333px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 9pt;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;background-image:none;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#337ab7;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 1pc;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:9pt;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:9pt;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10pc;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 9pt rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:9pt;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:9pt;padding-right:9pt}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 1pc;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:9pt;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 9pt;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:9pt;border-radius:3px}.input-group-addon.input-lg{padding:10px 1pc;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;visibility:visible!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin:8px -15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\\A0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 9pt;line-height:1.42857143;text-decoration:none;color:#337ab7;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 1pc;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:9pt}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:9pt;font-weight:700;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:3pc 0}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-left:auto;margin-right:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:9pt;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 25%,transparent 50%,hsla(0,0%,100%,.15) 50%,hsla(0,0%,100%,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:625pc}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:1pc}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal,.modal-open{overflow:hidden}.modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);background-clip:padding-box;outline:0}.modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;visibility:visible;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:9pt;font-weight:400;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel,.carousel-inner{position:relative}.carousel-inner{overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\\9;background-color:transparent}.carousel-indicators .active{margin:0;width:9pt;height:9pt;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{content:" ";display:table}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]);
},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<t.length;r++){var a=t[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){var o,r;/*!
* jQuery JavaScript Library v2.1.4
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2015-04-28T16:01Z
*/
!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){function a(e){var t="length"in e&&e.length,n=oe.type(e);return"function"===n||oe.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function l(e,t,n){if(oe.isFunction(t))return oe.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)return oe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pe.test(t))return oe.filter(t,e,n);t=oe.filter(t,e)}return oe.grep(e,function(e){return X.call(t,e)>=0!==n})}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t=ve[e]={};return oe.each(e.match(me)||[],function(e,n){t[n]=!0}),t}function u(){te.removeEventListener("DOMContentLoaded",u,!1),n.removeEventListener("load",u,!1),oe.ready()}function p(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=oe.expando+p.uid++}function d(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(ke,"-$1").toLowerCase(),n=e.getAttribute(o),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ne.test(n)?oe.parseJSON(n):n}catch(r){}we.set(e,t,n)}else n=void 0;return n}function f(){return!0}function h(){return!1}function g(){try{return te.activeElement}catch(e){}}function b(e,t){return oe.nodeName(e,"table")&&oe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function m(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function v(e){var t=Fe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n=0,o=e.length;o>n;n++)Ee.set(e[n],"globalEval",!t||Ee.get(t[n],"globalEval"))}function x(e,t){var n,o,r,i,a,l,s,c;if(1===t.nodeType){if(Ee.hasData(e)&&(i=Ee.access(e),a=Ee.set(t,i),c=i.events)){delete a.handle,a.events={};for(r in c)for(n=0,o=c[r].length;o>n;n++)oe.event.add(t,r,c[r][n])}we.hasData(e)&&(l=we.access(e),s=oe.extend({},l),we.set(t,s))}}function E(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&oe.nodeName(e,t)?oe.merge([e],n):n}function w(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Oe.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function N(e,t){var o,r=oe(t.createElement(e)).appendTo(t.body),i=n.getDefaultComputedStyle&&(o=n.getDefaultComputedStyle(r[0]))?o.display:oe.css(r[0],"display");return r.detach(),i}function k(e){var t=te,n=ze[e];return n||(n=N(e,t),"none"!==n&&n||(He=(He||oe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=He[0].contentDocument,t.write(),t.close(),n=N(e,t),He.detach()),ze[e]=n),n}function C(e,t,n){var o,r,i,a,l=e.style;return n=n||Ke(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||oe.contains(e.ownerDocument,e)||(a=oe.style(e,t)),Ye.test(a)&&We.test(t)&&(o=l.width,r=l.minWidth,i=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=o,l.minWidth=r,l.maxWidth=i)),void 0!==a?a+"":a}function _(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function D(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),o=t,r=Ze.length;r--;)if(t=Ze[r]+n,t in e)return t;return o}function O(e,t,n){var o=Ge.exec(t);return o?Math.max(0,o[1]-(n||0))+(o[2]||"px"):t}function T(e,t,n,o,r){for(var i=n===(o?"border":"content")?4:"width"===t?1:0,a=0;4>i;i+=2)"margin"===n&&(a+=oe.css(e,n+_e[i],!0,r)),o?("content"===n&&(a-=oe.css(e,"padding"+_e[i],!0,r)),"margin"!==n&&(a-=oe.css(e,"border"+_e[i]+"Width",!0,r))):(a+=oe.css(e,"padding"+_e[i],!0,r),"padding"!==n&&(a+=oe.css(e,"border"+_e[i]+"Width",!0,r)));return a}function R(e,t,n){var o=!0,r="width"===t?e.offsetWidth:e.offsetHeight,i=Ke(e),a="border-box"===oe.css(e,"boxSizing",!1,i);if(0>=r||null==r){if(r=C(e,t,i),(0>r||null==r)&&(r=e.style[t]),Ye.test(r))return r;o=a&&(ee.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+T(e,t,n||(a?"border":"content"),o,i)+"px"}function M(e,t){for(var n,o,r,i=[],a=0,l=e.length;l>a;a++)o=e[a],o.style&&(i[a]=Ee.get(o,"olddisplay"),n=o.style.display,t?(i[a]||"none"!==n||(o.style.display=""),""===o.style.display&&De(o)&&(i[a]=Ee.access(o,"olddisplay",k(o.nodeName)))):(r=De(o),"none"===n&&r||Ee.set(o,"olddisplay",r?n:oe.css(o,"display"))));for(a=0;l>a;a++)o=e[a],o.style&&(t&&"none"!==o.style.display&&""!==o.style.display||(o.style.display=t?i[a]||"":"none"));return e}function P(e,t,n,o,r){return new P.prototype.init(e,t,n,o,r)}function S(){return setTimeout(function(){et=void 0}),et=oe.now()}function I(e,t){var n,o=0,r={height:e};for(t=t?1:0;4>o;o+=2-t)n=_e[o],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function A(e,t,n){for(var o,r=(at[t]||[]).concat(at["*"]),i=0,a=r.length;a>i;i++)if(o=r[i].call(n,t,e))return o}function j(e,t,n){var o,r,i,a,l,s,c,u,p=this,d={},f=e.style,h=e.nodeType&&De(e),g=Ee.get(e,"fxshow");n.queue||(l=oe._queueHooks(e,"fx"),null==l.unqueued&&(l.unqueued=0,s=l.empty.fire,l.empty.fire=function(){l.unqueued||s()}),l.unqueued++,p.always(function(){p.always(function(){l.unqueued--,oe.queue(e,"fx").length||l.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],c=oe.css(e,"display"),u="none"===c?Ee.get(e,"olddisplay")||k(e.nodeName):c,"inline"===u&&"none"===oe.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",p.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(o in t)if(r=t[o],nt.exec(r)){if(delete t[o],i=i||"toggle"===r,r===(h?"hide":"show")){if("show"!==r||!g||void 0===g[o])continue;h=!0}d[o]=g&&g[o]||oe.style(e,o)}else c=void 0;if(oe.isEmptyObject(d))"inline"===("none"===c?k(e.nodeName):c)&&(f.display=c);else{g?"hidden"in g&&(h=g.hidden):g=Ee.access(e,"fxshow",{}),i&&(g.hidden=!h),h?oe(e).show():p.done(function(){oe(e).hide()}),p.done(function(){var t;Ee.remove(e,"fxshow");for(t in d)oe.style(e,t,d[t])});for(o in d)a=A(h?g[o]:0,o,p),o in g||(g[o]=a.start,h&&(a.end=a.start,a.start="width"===o||"height"===o?1:0))}}function L(e,t){var n,o,r,i,a;for(n in e)if(o=oe.camelCase(n),r=t[o],i=e[n],oe.isArray(i)&&(r=i[1],i=e[n]=i[0]),n!==o&&(e[o]=i,delete e[n]),a=oe.cssHooks[o],a&&"expand"in a){i=a.expand(i),delete e[o];for(n in i)n in e||(e[n]=i[n],t[n]=r)}else t[o]=r}function V(e,t,n){var o,r,i=0,a=it.length,l=oe.Deferred().always(function(){delete s.elem}),s=function(){if(r)return!1;for(var t=et||S(),n=Math.max(0,c.startTime+c.duration-t),o=n/c.duration||0,i=1-o,a=0,s=c.tweens.length;s>a;a++)c.tweens[a].run(i);return l.notifyWith(e,[c,i,n]),1>i&&s?n:(l.resolveWith(e,[c]),!1)},c=l.promise({elem:e,props:oe.extend({},t),opts:oe.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:et||S(),duration:n.duration,tweens:[],createTween:function(t,n){var o=oe.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(o),o},stop:function(t){var n=0,o=t?c.tweens.length:0;if(r)return this;for(r=!0;o>n;n++)c.tweens[n].run(1);return t?l.resolveWith(e,[c,t]):l.rejectWith(e,[c,t]),this}}),u=c.props;for(L(u,c.opts.specialEasing);a>i;i++)if(o=it[i].call(c,e,u,c.opts))return o;return oe.map(u,A,c),oe.isFunction(c.opts.start)&&c.opts.start.call(e,c),oe.fx.timer(oe.extend(s,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function U(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var o,r=0,i=t.toLowerCase().match(me)||[];if(oe.isFunction(n))for(;o=i[r++];)"+"===o[0]?(o=o.slice(1)||"*",(e[o]=e[o]||[]).unshift(n)):(e[o]=e[o]||[]).push(n)}}function F(e,t,n,o){function r(l){var s;return i[l]=!0,oe.each(e[l]||[],function(e,l){var c=l(t,n,o);return"string"!=typeof c||a||i[c]?a?!(s=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),s}var i={},a=e===Nt;return r(t.dataTypes[0])||!i["*"]&&r("*")}function B(e,t){var n,o,r=oe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:o||(o={}))[n]=t[n]);return o&&oe.extend(!0,e,o),e}function q(e,t,n){for(var o,r,i,a,l=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(r in l)if(l[r]&&l[r].test(o)){s.unshift(r);break}if(s[0]in n)i=s[0];else{for(r in n){if(!s[0]||e.converters[r+" "+s[0]]){i=r;break}a||(a=r)}i=i||a}return i?(i!==s[0]&&s.unshift(i),n[i]):void 0}function H(e,t,n,o){var r,i,a,l,s,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!s&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=i,i=u.shift())if("*"===i)i=s;else if("*"!==s&&s!==i){if(a=c[s+" "+i]||c["* "+i],!a)for(r in c)if(l=r.split(" "),l[1]===i&&(a=c[s+" "+l[0]]||c["* "+l[0]])){a===!0?a=c[r]:c[r]!==!0&&(i=l[0],u.unshift(l[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+s+" to "+i}}}return{state:"success",data:t}}function z(e,t,n,o){var r;if(oe.isArray(t))oe.each(t,function(t,r){n||Ot.test(e)?o(e,r):z(e+"["+("object"==typeof r?t:"")+"]",r,n,o)});else if(n||"object"!==oe.type(t))o(e,t);else for(r in t)z(e+"["+r+"]",t[r],n,o)}function W(e){return oe.isWindow(e)?e:9===e.nodeType&&e.defaultView}var Y=[],K=Y.slice,$=Y.concat,G=Y.push,X=Y.indexOf,Q={},J=Q.toString,Z=Q.hasOwnProperty,ee={},te=n.document,ne="2.1.4",oe=function(e,t){return new oe.fn.init(e,t)},re=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ie=/^-ms-/,ae=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};oe.fn=oe.prototype={jquery:ne,constructor:oe,selector:"",length:0,toArray:function(){return K.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:K.call(this)},pushStack:function(e){var t=oe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return oe.each(this,e,t)},map:function(e){return this.pushStack(oe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:G,sort:Y.sort,splice:Y.splice},oe.extend=oe.fn.extend=function(){var e,t,n,o,r,i,a=arguments[0]||{},l=1,s=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[l]||{},l++),"object"==typeof a||oe.isFunction(a)||(a={}),l===s&&(a=this,l--);s>l;l++)if(null!=(e=arguments[l]))for(t in e)n=a[t],o=e[t],a!==o&&(c&&o&&(oe.isPlainObject(o)||(r=oe.isArray(o)))?(r?(r=!1,i=n&&oe.isArray(n)?n:[]):i=n&&oe.isPlainObject(n)?n:{},a[t]=oe.extend(c,i,o)):void 0!==o&&(a[t]=o));return a},oe.extend({expando:"jQuery"+(ne+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===oe.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!oe.isArray(e)&&e-parseFloat(e)+1>=0},isPlainObject:function(e){return"object"!==oe.type(e)||e.nodeType||oe.isWindow(e)?!1:e.constructor&&!Z.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[J.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=oe.trim(e),e&&(1===e.indexOf("use strict")?(t=te.createElement("script"),t.text=e,te.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ie,"ms-").replace(ae,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var o,r=0,i=e.length,l=a(e);if(n){if(l)for(;i>r&&(o=t.apply(e[r],n),o!==!1);r++);else for(r in e)if(o=t.apply(e[r],n),o===!1)break}else if(l)for(;i>r&&(o=t.call(e[r],r,e[r]),o!==!1);r++);else for(r in e)if(o=t.call(e[r],r,e[r]),o===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(re,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(a(Object(e))?oe.merge(n,"string"==typeof e?[e]:e):G.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:X.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,r=e.length;n>o;o++)e[r++]=t[o];return e.length=r,e},grep:function(e,t,n){for(var o,r=[],i=0,a=e.length,l=!n;a>i;i++)o=!t(e[i],i),o!==l&&r.push(e[i]);return r},map:function(e,t,n){var o,r=0,i=e.length,l=a(e),s=[];if(l)for(;i>r;r++)o=t(e[r],r,n),null!=o&&s.push(o);else for(r in e)o=t(e[r],r,n),null!=o&&s.push(o);return $.apply([],s)},guid:1,proxy:function(e,t){var n,o,r;return"string"==typeof t&&(n=e[t],t=e,e=n),oe.isFunction(e)?(o=K.call(arguments,2),r=function(){return e.apply(t||this,o.concat(K.call(arguments)))},r.guid=e.guid=e.guid||oe.guid++,r):void 0},now:Date.now,support:ee}),oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()});var se=/*!
* Sizzle CSS Selector Engine v2.2.0-pre
* http://sizzlejs.com/
*
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-12-16
*/
function(e){function t(e,t,n,o){var r,i,a,l,s,c,p,f,h,g;if((t?t.ownerDocument||t:F)!==P&&M(t),t=t||P,n=n||[],l=t.nodeType,"string"!=typeof e||!e||1!==l&&9!==l&&11!==l)return n;if(!o&&I){if(11!==l&&(r=ve.exec(e)))if(a=r[1]){if(9===l){if(i=t.getElementById(a),!i||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(t.ownerDocument&&(i=t.ownerDocument.getElementById(a))&&V(t,i)&&i.id===a)return n.push(i),n}else{if(r[2])return J.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&E.getElementsByClassName)return J.apply(n,t.getElementsByClassName(a)),n}if(E.qsa&&(!A||!A.test(e))){if(f=p=U,h=t,g=1!==l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){for(c=C(e),(p=t.getAttribute("id"))?f=p.replace(xe,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",s=c.length;s--;)c[s]=f+d(c[s]);h=ye.test(e)&&u(t.parentNode)||t,g=c.join(",")}if(g)try{return J.apply(n,h.querySelectorAll(g)),n}catch(b){}finally{p||t.removeAttribute("id")}}}return D(e.replace(se,"$1"),t,n,o)}function n(){function e(n,o){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=o}var t=[];return e}function o(e){return e[U]=!0,e}function r(e){var t=P.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),o=e.length;o--;)w.attrHandle[n[o]]=t}function a(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||K)-(~e.sourceIndex||K);if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function l(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function s(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return o(function(t){return t=+t,o(function(n,o){for(var r,i=e([],n.length,t),a=i.length;a--;)n[r=i[a]]&&(n[r]=!(o[r]=n[r]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,o="";n>t;t++)o+=e[t].value;return o}function f(e,t,n){var o=t.dir,r=n&&"parentNode"===o,i=q++;return t.first?function(t,n,i){for(;t=t[o];)if(1===t.nodeType||r)return e(t,n,i)}:function(t,n,a){var l,s,c=[B,i];if(a){for(;t=t[o];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[o];)if(1===t.nodeType||r){if(s=t[U]||(t[U]={}),(l=s[o])&&l[0]===B&&l[1]===i)return c[2]=l[2];if(s[o]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,o){for(var r=e.length;r--;)if(!e[r](t,n,o))return!1;return!0}:e[0]}function g(e,n,o){for(var r=0,i=n.length;i>r;r++)t(e,n[r],o);return o}function b(e,t,n,o,r){for(var i,a=[],l=0,s=e.length,c=null!=t;s>l;l++)(i=e[l])&&(!n||n(i,o,r))&&(a.push(i),c&&t.push(l));return a}function m(e,t,n,r,i,a){return r&&!r[U]&&(r=m(r)),i&&!i[U]&&(i=m(i,a)),o(function(o,a,l,s){var c,u,p,d=[],f=[],h=a.length,m=o||g(t||"*",l.nodeType?[l]:l,[]),v=!e||!o&&t?m:b(m,d,e,l,s),y=n?i||(o?e:h||r)?[]:a:v;if(n&&n(v,y,l,s),r)for(c=b(y,f),r(c,[],l,s),u=c.length;u--;)(p=c[u])&&(y[f[u]]=!(v[f[u]]=p));if(o){if(i||e){if(i){for(c=[],u=y.length;u--;)(p=y[u])&&c.push(v[u]=p);i(null,y=[],c,s)}for(u=y.length;u--;)(p=y[u])&&(c=i?ee(o,p):d[u])>-1&&(o[c]=!(a[c]=p))}}else y=b(y===a?y.splice(h,y.length):y),i?i(null,a,y,s):J.apply(a,y)})}function v(e){for(var t,n,o,r=e.length,i=w.relative[e[0].type],a=i||w.relative[" "],l=i?1:0,s=f(function(e){return e===t},a,!0),c=f(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,o){var r=!i&&(o||n!==O)||((t=n).nodeType?s(e,n,o):c(e,n,o));return t=null,r}];r>l;l++)if(n=w.relative[e[l].type])u=[f(h(u),n)];else{if(n=w.filter[e[l].type].apply(null,e[l].matches),n[U]){for(o=++l;r>o&&!w.relative[e[o].type];o++);return m(l>1&&h(u),l>1&&d(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(se,"$1"),n,o>l&&v(e.slice(l,o)),r>o&&v(e=e.slice(o)),r>o&&d(e))}u.push(n)}return h(u)}function y(e,n){var r=n.length>0,i=e.length>0,a=function(o,a,l,s,c){var u,p,d,f=0,h="0",g=o&&[],m=[],v=O,y=o||i&&w.find.TAG("*",c),x=B+=null==v?1:Math.random()||.1,E=y.length;for(c&&(O=a!==P&&a);h!==E&&null!=(u=y[h]);h++){if(i&&u){for(p=0;d=e[p++];)if(d(u,a,l)){s.push(u);break}c&&(B=x)}r&&((u=!d&&u)&&f--,o&&g.push(u))}if(f+=h,r&&h!==f){for(p=0;d=n[p++];)d(g,m,a,l);if(o){if(f>0)for(;h--;)g[h]||m[h]||(m[h]=X.call(s));m=b(m)}J.apply(s,m),c&&!o&&m.length>0&&f+n.length>1&&t.uniqueSort(s)}return c&&(B=x,O=v),g};return r?o(a):a}var x,E,w,N,k,C,_,D,O,T,R,M,P,S,I,A,j,L,V,U="sizzle"+1*new Date,F=e.document,B=0,q=0,H=n(),z=n(),W=n(),Y=function(e,t){return e===t&&(R=!0),0},K=1<<31,$={}.hasOwnProperty,G=[],X=G.pop,Q=G.push,J=G.push,Z=G.slice,ee=function(e,t){for(var n=0,o=e.length;o>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",oe="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=oe.replace("w","w#"),ie="\\["+ne+"*("+oe+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ae=":("+oe+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",le=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ce=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),pe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+re+"$"),he={ID:new RegExp("^#("+oe+")"),CLASS:new RegExp("^\\.("+oe+")"),TAG:new RegExp("^("+oe.replace("w","w*")+")"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,be=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,xe=/'|\\/g,Ee=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var o="0x"+t-65536;return o!==o||n?t:0>o?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320)},Ne=function(){M()};try{J.apply(G=Z.call(F.childNodes),F.childNodes),G[F.childNodes.length].nodeType}catch(ke){J={apply:G.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}E=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},M=t.setDocument=function(e){var t,n,o=e?e.ownerDocument||e:F;return o!==P&&9===o.nodeType&&o.documentElement?(P=o,S=o.documentElement,n=o.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ne,!1):n.attachEvent&&n.attachEvent("onunload",Ne)),I=!k(o),E.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),E.getElementsByTagName=r(function(e){return e.appendChild(o.createComment("")),!e.getElementsByTagName("*").length}),E.getElementsByClassName=me.test(o.getElementsByClassName),E.getById=r(function(e){return S.appendChild(e).id=U,!o.getElementsByName||!o.getElementsByName(U).length}),E.getById?(w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&I){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ee,we);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ee,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=E.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):E.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[r++];)1===n.nodeType&&o.push(n);return o}return i},w.find.CLASS=E.getElementsByClassName&&function(e,t){return I?t.getElementsByClassName(e):void 0},j=[],A=[],(E.qsa=me.test(o.querySelectorAll))&&(r(function(e){S.appendChild(e).innerHTML="<a id='"+U+"'></a><select id='"+U+"-\f]' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||A.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+U+"-]").length||A.push("~="),e.querySelectorAll(":checked").length||A.push(":checked"),e.querySelectorAll("a#"+U+"+*").length||A.push(".#.+[+~]")}),r(function(e){var t=o.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&A.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(E.matchesSelector=me.test(L=S.matches||S.webkitMatchesSelector||S.mozMatchesSelector||S.oMatchesSelector||S.msMatchesSelector))&&r(function(e){E.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),j.push("!=",ae)}),A=A.length&&new RegExp(A.join("|")),j=j.length&&new RegExp(j.join("|")),t=me.test(S.compareDocumentPosition),V=t||me.test(S.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,o=t&&t.parentNode;return e===o||!(!o||1!==o.nodeType||!(n.contains?n.contains(o):e.compareDocumentPosition&&16&e.compareDocumentPosition(o)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return R=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!E.sortDetached&&t.compareDocumentPosition(e)===n?e===o||e.ownerDocument===F&&V(F,e)?-1:t===o||t.ownerDocument===F&&V(F,t)?1:T?ee(T,e)-ee(T,t):0:4&n?-1:1)}:function(e,t){if(e===t)return R=!0,0;var n,r=0,i=e.parentNode,l=t.parentNode,s=[e],c=[t];if(!i||!l)return e===o?-1:t===o?1:i?-1:l?1:T?ee(T,e)-ee(T,t):0;if(i===l)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;s[r]===c[r];)r++;return r?a(s[r],c[r]):s[r]===F?-1:c[r]===F?1:0},o):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&M(e),n=n.replace(pe,"='$1']"),E.matchesSelector&&I&&(!j||!j.test(n))&&(!A||!A.test(n)))try{var o=L.call(e,n);if(o||E.disconnectedMatch||e.document&&11!==e.document.nodeType)return o}catch(r){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&M(e),V(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&M(e);var n=w.attrHandle[t.toLowerCase()],o=n&&$.call(w.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==o?o:E.attributes||!I?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],o=0,r=0;if(R=!E.detectDuplicates,T=!E.sortStable&&e.slice(0),e.sort(Y),R){for(;t=e[r++];)t===e[r]&&(o=n.push(r));for(;o--;)e.splice(n[o],1)}return T=null,e},N=t.getText=function(e){var t,n="",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=N(t);return n},w=t.selectors={cacheLength:50,createPseudo:o,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ee,we),e[3]=(e[3]||e[4]||e[5]||"").replace(Ee,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ee,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,o){return function(r){var i=t.attr(r,e);return null==i?"!="===n:n?(i+="","="===n?i===o:"!="===n?i!==o:"^="===n?o&&0===i.indexOf(o):"*="===n?o&&i.indexOf(o)>-1:"$="===n?o&&i.slice(-o.length)===o:"~="===n?(" "+i.replace(le," ")+" ").indexOf(o)>-1:"|="===n?i===o||i.slice(0,o.length+1)===o+"-":!1):!0}},CHILD:function(e,t,n,o,r){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),l="of-type"===t;return 1===o&&0===r?function(e){return!!e.parentNode}:function(t,n,s){var c,u,p,d,f,h,g=i!==a?"nextSibling":"previousSibling",b=t.parentNode,m=l&&t.nodeName.toLowerCase(),v=!s&&!l;if(b){if(i){for(;g;){for(p=t;p=p[g];)if(l?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?b.firstChild:b.lastChild],a&&v){for(u=b[U]||(b[U]={}),c=u[e]||[],f=c[0]===B&&c[1],d=c[0]===B&&c[2],p=f&&b.childNodes[f];p=++f&&p&&p[g]||(d=f=0)||h.pop();)if(1===p.nodeType&&++d&&p===t){u[e]=[B,f,d];break}}else if(v&&(c=(t[U]||(t[U]={}))[e])&&c[0]===B)d=c[1];else for(;(p=++f&&p&&p[g]||(d=f=0)||h.pop())&&((l?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++d||(v&&((p[U]||(p[U]={}))[e]=[B,d]),p!==t)););return d-=r,d===o||d%o===0&&d/o>=0}}},PSEUDO:function(e,n){var r,i=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[U]?i(n):i.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,t){for(var o,r=i(e,n),a=r.length;a--;)o=ee(e,r[a]),e[o]=!(t[o]=r[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=_(e.replace(se,"$1"));return r[U]?o(function(e,t,n,o){for(var i,a=r(e,null,o,[]),l=e.length;l--;)(i=a[l])&&(e[l]=!(t[l]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:o(function(e){return function(n){return t(e,n).length>0}}),contains:o(function(e){return e=e.replace(Ee,we),function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:o(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Ee,we).toLowerCase(),function(t){var n;do if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===S},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return be.test(e.nodeName)},input:function(e){return ge.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var o=0>n?n+t:n;--o>=0;)e.push(o);return e}),gt:c(function(e,t,n){for(var o=0>n?n+t:n;++o<t;)e.push(o);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=l(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=s(x);return p.prototype=w.filters=w.pseudos,w.setFilters=new p,C=t.tokenize=function(e,n){var o,r,i,a,l,s,c,u=z[e+" "];if(u)return n?0:u.slice(0);for(l=e,s=[],c=w.preFilter;l;){(!o||(r=ce.exec(l)))&&(r&&(l=l.slice(r[0].length)||l),s.push(i=[])),o=!1,(r=ue.exec(l))&&(o=r.shift(),i.push({value:o,type:r[0].replace(se," ")}),l=l.slice(o.length));for(a in w.filter)!(r=he[a].exec(l))||c[a]&&!(r=c[a](r))||(o=r.shift(),i.push({value:o,type:a,matches:r}),l=l.slice(o.length));if(!o)break}return n?l.length:l?t.error(e):z(e,s).slice(0)},_=t.compile=function(e,t){var n,o=[],r=[],i=W[e+" "];if(!i){for(t||(t=C(e)),n=t.length;n--;)i=v(t[n]),i[U]?o.push(i):r.push(i);i=W(e,y(r,o)),i.selector=e}return i},D=t.select=function(e,t,n,o){var r,i,a,l,s,c="function"==typeof e&&e,p=!o&&C(e=c.selector||e);if(n=n||[],1===p.length){if(i=p[0]=p[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&E.getById&&9===t.nodeType&&I&&w.relative[i[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ee,we),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(r=he.needsContext.test(e)?0:i.length;r--&&(a=i[r],!w.relative[l=a.type]);)if((s=w.find[l])&&(o=s(a.matches[0].replace(Ee,we),ye.test(i[0].type)&&u(t.parentNode)||t))){if(i.splice(r,1),e=o.length&&d(i),!e)return J.apply(n,o),n;break}}return(c||_(e,p))(o,t,!I,n,ye.test(e)&&u(t.parentNode)||t),n},E.sortStable=U.split("").sort(Y).join("")===U,E.detectDuplicates=!!R,M(),E.sortDetached=r(function(e){return 1&e.compareDocumentPosition(P.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),E.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var o;return n?void 0:e[t]===!0?t.toLowerCase():(o=e.getAttributeNode(t))&&o.specified?o.value:null}),t}(n);oe.find=se,oe.expr=se.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=se.uniqueSort,oe.text=se.getText,oe.isXMLDoc=se.isXML,oe.contains=se.contains;var ce=oe.expr.match.needsContext,ue=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pe=/^.[^:#\[\.,]*$/;oe.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?oe.find.matchesSelector(o,e)?[o]:[]:oe.find.matches(e,oe.grep(t,function(e){return 1===e.nodeType}))},oe.fn.extend({find:function(e){var t,n=this.length,o=[],r=this;if("string"!=typeof e)return this.pushStack(oe(e).filter(function(){for(t=0;n>t;t++)if(oe.contains(r[t],this))return!0}));for(t=0;n>t;t++)oe.find(e,r[t],o);return o=this.pushStack(n>1?oe.unique(o):o),o.selector=this.selector?this.selector+" "+e:e,o},filter:function(e){return this.pushStack(l(this,e||[],!1))},not:function(e){return this.pushStack(l(this,e||[],!0))},is:function(e){return!!l(this,"string"==typeof e&&ce.test(e)?oe(e):e||[],!1).length}});var de,fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,he=oe.fn.init=function(e,t){var n,o;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:fe.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||de).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof oe?t[0]:t,oe.merge(this,oe.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),ue.test(n[1])&&oe.isPlainObject(t))for(n in t)oe.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return o=te.getElementById(n[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=te,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):oe.isFunction(e)?"undefined"!=typeof de.ready?de.ready(e):e(oe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),oe.makeArray(e,this))};he.prototype=oe.fn,de=oe(te);var ge=/^(?:parents|prev(?:Until|All))/,be={children:!0,contents:!0,next:!0,prev:!0};oe.extend({dir:function(e,t,n){for(var o=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&oe(e).is(n))break;o.push(e)}return o},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),oe.fn.extend({has:function(e){var t=oe(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(oe.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,o=0,r=this.length,i=[],a=ce.test(e)||"string"!=typeof e?oe(e,t||this.context):0;r>o;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?oe.unique(i):i)},index:function(e){return e?"string"==typeof e?X.call(oe(e),this[0]):X.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(oe.unique(oe.merge(this.get(),oe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),oe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return oe.dir(e,"parentNode")},parentsUntil:function(e,t,n){return oe.dir(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return oe.dir(e,"nextSibling")},prevAll:function(e){return oe.dir(e,"previousSibling")},nextUntil:function(e,t,n){return oe.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return oe.dir(e,"previousSibling",n)},siblings:function(e){return oe.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return oe.sibling(e.firstChild)},contents:function(e){return e.contentDocument||oe.merge([],e.childNodes)}},function(e,t){oe.fn[e]=function(n,o){var r=oe.map(this,t,n);return"Until"!==e.slice(-5)&&(o=n),o&&"string"==typeof o&&(r=oe.filter(o,r)),this.length>1&&(be[e]||oe.unique(r),ge.test(e)&&r.reverse()),this.pushStack(r)}});var me=/\S+/g,ve={};oe.Callbacks=function(e){e="string"==typeof e?ve[e]||c(e):oe.extend({},e);var t,n,o,r,i,a,l=[],s=!e.once&&[],u=function(c){for(t=e.memory&&c,n=!0,a=r||0,r=0,i=l.length,o=!0;l&&i>a;a++)if(l[a].apply(c[0],c[1])===!1&&e.stopOnFalse){t=!1;break}o=!1,l&&(s?s.length&&u(s.shift()):t?l=[]:p.disable())},p={add:function(){if(l){var n=l.length;!function a(t){oe.each(t,function(t,n){var o=oe.type(n);"function"===o?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==o&&a(n)})}(arguments),o?i=l.length:t&&(r=n,u(t))}return this},remove:function(){return l&&oe.each(arguments,function(e,t){for(var n;(n=oe.inArray(t,l,n))>-1;)l.splice(n,1),o&&(i>=n&&i--,a>=n&&a--)}),this},has:function(e){return e?oe.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],i=0,this},disable:function(){return l=s=t=void 0,this},disabled:function(){return!l},lock:function(){return s=void 0,t||p.disable(),this},locked:function(){return!s},fireWith:function(e,t){return!l||n&&!s||(t=t||[],t=[e,t.slice?t.slice():t],o?s.push(t):u(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!n}};return p},oe.extend({Deferred:function(e){var t=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",o={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return oe.Deferred(function(n){oe.each(t,function(t,i){var a=oe.isFunction(e[t])&&e[t];r[i[1]](function(){var e=a&&a.apply(this,arguments);e&&oe.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[i[0]+"With"](this===o?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?oe.extend(e,o):o}},r={};return o.pipe=o.then,oe.each(t,function(e,i){var a=i[2],l=i[3];o[i[1]]=a.add,l&&a.add(function(){n=l},t[1^e][2].disable,t[2][2].lock),r[i[0]]=function(){return r[i[0]+"With"](this===r?o:this,arguments),this},r[i[0]+"With"]=a.fireWith}),o.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,o,r=0,i=K.call(arguments),a=i.length,l=1!==a||e&&oe.isFunction(e.promise)?a:0,s=1===l?e:oe.Deferred(),c=function(e,n,o){return function(r){n[e]=this,o[e]=arguments.length>1?K.call(arguments):r,o===t?s.notifyWith(n,o):--l||s.resolveWith(n,o)}};if(a>1)for(t=new Array(a),n=new Array(a),o=new Array(a);a>r;r++)i[r]&&oe.isFunction(i[r].promise)?i[r].promise().done(c(r,o,i)).fail(s.reject).progress(c(r,n,t)):--l;return l||s.resolveWith(o,i),s.promise()}});var ye;oe.fn.ready=function(e){return oe.ready.promise().done(e),this},oe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?oe.readyWait++:oe.ready(!0)},ready:function(e){(e===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,e!==!0&&--oe.readyWait>0||(ye.resolveWith(te,[oe]),oe.fn.triggerHandler&&(oe(te).triggerHandler("ready"),oe(te).off("ready"))))}}),oe.ready.promise=function(e){return ye||(ye=oe.Deferred(),"complete"===te.readyState?setTimeout(oe.ready):(te.addEventListener("DOMContentLoaded",u,!1),n.addEventListener("load",u,!1))),ye.promise(e)},oe.ready.promise();var xe=oe.access=function(e,t,n,o,r,i,a){var l=0,s=e.length,c=null==n;if("object"===oe.type(n)){r=!0;for(l in n)oe.access(e,t,l,n[l],!0,i,a)}else if(void 0!==o&&(r=!0,oe.isFunction(o)||(a=!0),c&&(a?(t.call(e,o),t=null):(c=t,t=function(e,t,n){return c.call(oe(e),n)})),t))for(;s>l;l++)t(e[l],n,a?o:o.call(e[l],l,t(e[l],n)));return r?e:c?t.call(e):s?t(e[0],n):i};oe.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},p.uid=1,p.accepts=oe.acceptData,p.prototype={key:function(e){if(!p.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=p.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(o){t[this.expando]=n,oe.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var o,r=this.key(e),i=this.cache[r];if("string"==typeof t)i[t]=n;else if(oe.isEmptyObject(i))oe.extend(this.cache[r],t);else for(o in t)i[o]=t[o];return i},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var o;return void 0===t||t&&"string"==typeof t&&void 0===n?(o=this.get(e,t),void 0!==o?o:this.get(e,oe.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,o,r,i=this.key(e),a=this.cache[i];if(void 0===t)this.cache[i]={};else{oe.isArray(t)?o=t.concat(t.map(oe.camelCase)):(r=oe.camelCase(t),t in a?o=[t,r]:(o=r,o=o in a?[o]:o.match(me)||[])),n=o.length;for(;n--;)delete a[o[n]]}},hasData:function(e){return!oe.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var Ee=new p,we=new p,Ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ke=/([A-Z])/g;oe.extend({hasData:function(e){return we.hasData(e)||Ee.hasData(e)},data:function(e,t,n){return we.access(e,t,n)},removeData:function(e,t){we.remove(e,t)},_data:function(e,t,n){return Ee.access(e,t,n)},_removeData:function(e,t){Ee.remove(e,t)}}),oe.fn.extend({data:function(e,t){var n,o,r,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(r=we.get(i),1===i.nodeType&&!Ee.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(o=a[n].name,0===o.indexOf("data-")&&(o=oe.camelCase(o.slice(5)),d(i,o,r[o])));Ee.set(i,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){we.set(this,e)}):xe(this,function(t){var n,o=oe.camelCase(e);if(i&&void 0===t){if(n=we.get(i,e),void 0!==n)return n;if(n=we.get(i,o),void 0!==n)return n;if(n=d(i,o,void 0),void 0!==n)return n}else this.each(function(){var n=we.get(this,o);we.set(this,o,t),-1!==e.indexOf("-")&&void 0!==n&&we.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){we.remove(this,e)})}}),oe.extend({queue:function(e,t,n){var o;return e?(t=(t||"fx")+"queue",o=Ee.get(e,t),n&&(!o||oe.isArray(n)?o=Ee.access(e,t,oe.makeArray(n)):o.push(n)),o||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=oe.queue(e,t),o=n.length,r=n.shift(),i=oe._queueHooks(e,t),a=function(){oe.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,a,i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ee.get(e,n)||Ee.access(e,n,{empty:oe.Callbacks("once memory").add(function(){Ee.remove(e,[t+"queue",n])})})}}),oe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?oe.queue(this[0],e):void 0===t?this:this.each(function(){var n=oe.queue(this,e,t);oe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&oe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){oe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,r=oe.Deferred(),i=this,a=this.length,l=function(){--o||r.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=Ee.get(i[a],e+"queueHooks"),n&&n.empty&&(o++,n.empty.add(l));return l(),r.promise(t)}});var Ce=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_e=["Top","Right","Bottom","Left"],De=function(e,t){return e=t||e,"none"===oe.css(e,"display")||!oe.contains(e.ownerDocument,e)},Oe=/^(?:checkbox|radio)$/i;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ee.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ee.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Te="undefined";ee.focusinBubbles="onfocusin"in n;var Re=/^key/,Me=/^(?:mouse|pointer|contextmenu)|click/,Pe=/^(?:focusinfocus|focusoutblur)$/,Se=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(e,t,n,o,r){var i,a,l,s,c,u,p,d,f,h,g,b=Ee.get(e);if(b)for(n.handler&&(i=n,n=i.handler,r=i.selector),n.guid||(n.guid=oe.guid++),(s=b.events)||(s=b.events={}),(a=b.handle)||(a=b.handle=function(t){return typeof oe!==Te&&oe.event.triggered!==t.type?oe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(me)||[""],c=t.length;c--;)l=Se.exec(t[c])||[],f=g=l[1],h=(l[2]||"").split(".").sort(),f&&(p=oe.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=oe.event.special[f]||{},u=oe.extend({type:f,origType:g,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&oe.expr.match.needsContext.test(r),namespace:h.join(".")},i),(d=s[f])||(d=s[f]=[],d.delegateCount=0,p.setup&&p.setup.call(e,o,h,a)!==!1||e.addEventListener&&e.addEventListener(f,a,!1)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,u):d.push(u),oe.event.global[f]=!0)},remove:function(e,t,n,o,r){var i,a,l,s,c,u,p,d,f,h,g,b=Ee.hasData(e)&&Ee.get(e);if(b&&(s=b.events)){for(t=(t||"").match(me)||[""],c=t.length;c--;)if(l=Se.exec(t[c])||[],f=g=l[1],h=(l[2]||"").split(".").sort(),f){for(p=oe.event.special[f]||{},f=(o?p.delegateType:p.bindType)||f,d=s[f]||[],l=l[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)u=d[i],!r&&g!==u.origType||n&&n.guid!==u.guid||l&&!l.test(u.namespace)||o&&o!==u.selector&&("**"!==o||!u.selector)||(d.splice(i,1),u.selector&&d.delegateCount--,p.remove&&p.remove.call(e,u));a&&!d.length&&(p.teardown&&p.teardown.call(e,h,b.handle)!==!1||oe.removeEvent(e,f,b.handle),delete s[f])}else for(f in s)oe.event.remove(e,f+t[c],n,o,!0);oe.isEmptyObject(s)&&(delete b.handle,Ee.remove(e,"events"))}},trigger:function(e,t,o,r){var i,a,l,s,c,u,p,d=[o||te],f=Z.call(e,"type")?e.type:e,h=Z.call(e,"namespace")?e.namespace.split("."):[];if(a=l=o=o||te,3!==o.nodeType&&8!==o.nodeType&&!Pe.test(f+oe.event.triggered)&&(f.indexOf(".")>=0&&(h=f.split("."),f=h.shift(),h.sort()),c=f.indexOf(":")<0&&"on"+f,e=e[oe.expando]?e:new oe.Event(f,"object"==typeof e&&e),
e.isTrigger=r?2:3,e.namespace=h.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),t=null==t?[e]:oe.makeArray(t,[e]),p=oe.event.special[f]||{},r||!p.trigger||p.trigger.apply(o,t)!==!1)){if(!r&&!p.noBubble&&!oe.isWindow(o)){for(s=p.delegateType||f,Pe.test(s+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),l=a;l===(o.ownerDocument||te)&&d.push(l.defaultView||l.parentWindow||n)}for(i=0;(a=d[i++])&&!e.isPropagationStopped();)e.type=i>1?s:p.bindType||f,u=(Ee.get(a,"events")||{})[e.type]&&Ee.get(a,"handle"),u&&u.apply(a,t),u=c&&a[c],u&&u.apply&&oe.acceptData(a)&&(e.result=u.apply(a,t),e.result===!1&&e.preventDefault());return e.type=f,r||e.isDefaultPrevented()||p._default&&p._default.apply(d.pop(),t)!==!1||!oe.acceptData(o)||c&&oe.isFunction(o[f])&&!oe.isWindow(o)&&(l=o[c],l&&(o[c]=null),oe.event.triggered=f,o[f](),oe.event.triggered=void 0,l&&(o[c]=l)),e.result}},dispatch:function(e){e=oe.event.fix(e);var t,n,o,r,i,a=[],l=K.call(arguments),s=(Ee.get(this,"events")||{})[e.type]||[],c=oe.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=oe.event.handlers.call(this,e,s),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,o=((oe.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,l),void 0!==o&&(e.result=o)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,o,r,i,a=[],l=t.delegateCount,s=e.target;if(l&&s.nodeType&&(!e.button||"click"!==e.type))for(;s!==this;s=s.parentNode||this)if(s.disabled!==!0||"click"!==e.type){for(o=[],n=0;l>n;n++)i=t[n],r=i.selector+" ",void 0===o[r]&&(o[r]=i.needsContext?oe(r,this).index(s)>=0:oe.find(r,this,null,[s]).length),o[r]&&o.push(i);o.length&&a.push({elem:s,handlers:o})}return l<t.length&&a.push({elem:this,handlers:t.slice(l)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,o,r,i=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||te,o=n.documentElement,r=n.body,e.pageX=t.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),e.which||void 0===i||(e.which=1&i?1:2&i?3:4&i?2:0),e}},fix:function(e){if(e[oe.expando])return e;var t,n,o,r=e.type,i=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Me.test(r)?this.mouseHooks:Re.test(r)?this.keyHooks:{}),o=a.props?this.props.concat(a.props):this.props,e=new oe.Event(i),t=o.length;t--;)n=o[t],e[n]=i[n];return e.target||(e.target=te),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,i):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return oe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,o){var r=oe.extend(new oe.Event,n,{type:e,isSimulated:!0,originalEvent:{}});o?oe.event.trigger(r,null,t):oe.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},oe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},oe.Event=function(e,t){return this instanceof oe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?f:h):this.type=e,t&&oe.extend(this,t),this.timeStamp=e&&e.timeStamp||oe.now(),void(this[oe.expando]=!0)):new oe.Event(e,t)},oe.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=f,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=f,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=f,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){oe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,o=this,r=e.relatedTarget,i=e.handleObj;return(!r||r!==o&&!oe.contains(o,r))&&(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),ee.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){oe.event.simulate(t,e.target,oe.event.fix(e),!0)};oe.event.special[t]={setup:function(){var o=this.ownerDocument||this,r=Ee.access(o,t);r||o.addEventListener(e,n,!0),Ee.access(o,t,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this,r=Ee.access(o,t)-1;r?Ee.access(o,t,r):(o.removeEventListener(e,n,!0),Ee.remove(o,t))}}}),oe.fn.extend({on:function(e,t,n,o,r){var i,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],r);return this}if(null==n&&null==o?(o=t,n=t=void 0):null==o&&("string"==typeof t?(o=n,n=void 0):(o=n,n=t,t=void 0)),o===!1)o=h;else if(!o)return this;return 1===r&&(i=o,o=function(e){return oe().off(e),i.apply(this,arguments)},o.guid=i.guid||(i.guid=oe.guid++)),this.each(function(){oe.event.add(this,e,o,n,t)})},one:function(e,t,n,o){return this.on(e,t,n,o,1)},off:function(e,t,n){var o,r;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,oe(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=h),this.each(function(){oe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){oe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?oe.event.trigger(e,t,n,!0):void 0}});var Ie=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ae=/<([\w:]+)/,je=/<|&#?\w+;/,Le=/<(?:script|style|link)/i,Ve=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^$|\/(?:java|ecma)script/i,Fe=/^true\/(.*)/,Be=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,qe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qe.optgroup=qe.option,qe.tbody=qe.tfoot=qe.colgroup=qe.caption=qe.thead,qe.th=qe.td,oe.extend({clone:function(e,t,n){var o,r,i,a,l=e.cloneNode(!0),s=oe.contains(e.ownerDocument,e);if(!(ee.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||oe.isXMLDoc(e)))for(a=E(l),i=E(e),o=0,r=i.length;r>o;o++)w(i[o],a[o]);if(t)if(n)for(i=i||E(e),a=a||E(l),o=0,r=i.length;r>o;o++)x(i[o],a[o]);else x(e,l);return a=E(l,"script"),a.length>0&&y(a,!s&&E(e,"script")),l},buildFragment:function(e,t,n,o){for(var r,i,a,l,s,c,u=t.createDocumentFragment(),p=[],d=0,f=e.length;f>d;d++)if(r=e[d],r||0===r)if("object"===oe.type(r))oe.merge(p,r.nodeType?[r]:r);else if(je.test(r)){for(i=i||u.appendChild(t.createElement("div")),a=(Ae.exec(r)||["",""])[1].toLowerCase(),l=qe[a]||qe._default,i.innerHTML=l[1]+r.replace(Ie,"<$1></$2>")+l[2],c=l[0];c--;)i=i.lastChild;oe.merge(p,i.childNodes),i=u.firstChild,i.textContent=""}else p.push(t.createTextNode(r));for(u.textContent="",d=0;r=p[d++];)if((!o||-1===oe.inArray(r,o))&&(s=oe.contains(r.ownerDocument,r),i=E(u.appendChild(r),"script"),s&&y(i),n))for(c=0;r=i[c++];)Ue.test(r.type||"")&&n.push(r);return u},cleanData:function(e){for(var t,n,o,r,i=oe.event.special,a=0;void 0!==(n=e[a]);a++){if(oe.acceptData(n)&&(r=n[Ee.expando],r&&(t=Ee.cache[r]))){if(t.events)for(o in t.events)i[o]?oe.event.remove(n,o):oe.removeEvent(n,o,t.handle);Ee.cache[r]&&delete Ee.cache[r]}delete we.cache[n[we.expando]]}}}),oe.fn.extend({text:function(e){return xe(this,function(e){return void 0===e?oe.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=b(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,o=e?oe.filter(e,this):this,r=0;null!=(n=o[r]);r++)t||1!==n.nodeType||oe.cleanData(E(n)),n.parentNode&&(t&&oe.contains(n.ownerDocument,n)&&y(E(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(oe.cleanData(E(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return oe.clone(this,e,t)})},html:function(e){return xe(this,function(e){var t=this[0]||{},n=0,o=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!qe[(Ae.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ie,"<$1></$2>");try{for(;o>n;n++)t=this[n]||{},1===t.nodeType&&(oe.cleanData(E(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,oe.cleanData(E(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=$.apply([],e);var n,o,r,i,a,l,s=0,c=this.length,u=this,p=c-1,d=e[0],f=oe.isFunction(d);if(f||c>1&&"string"==typeof d&&!ee.checkClone&&Ve.test(d))return this.each(function(n){var o=u.eq(n);f&&(e[0]=d.call(this,n,o.html())),o.domManip(e,t)});if(c&&(n=oe.buildFragment(e,this[0].ownerDocument,!1,this),o=n.firstChild,1===n.childNodes.length&&(n=o),o)){for(r=oe.map(E(n,"script"),m),i=r.length;c>s;s++)a=n,s!==p&&(a=oe.clone(a,!0,!0),i&&oe.merge(r,E(a,"script"))),t.call(this[s],a,s);if(i)for(l=r[r.length-1].ownerDocument,oe.map(r,v),s=0;i>s;s++)a=r[s],Ue.test(a.type||"")&&!Ee.access(a,"globalEval")&&oe.contains(l,a)&&(a.src?oe._evalUrl&&oe._evalUrl(a.src):oe.globalEval(a.textContent.replace(Be,"")))}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){oe.fn[e]=function(e){for(var n,o=[],r=oe(e),i=r.length-1,a=0;i>=a;a++)n=a===i?this:this.clone(!0),oe(r[a])[t](n),G.apply(o,n.get());return this.pushStack(o)}});var He,ze={},We=/^margin/,Ye=new RegExp("^("+Ce+")(?!px)[a-z%]+$","i"),Ke=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):n.getComputedStyle(e,null)};!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",a.innerHTML="",r.appendChild(i);var e=n.getComputedStyle(a,null);t="1%"!==e.top,o="4px"===e.width,r.removeChild(i)}var t,o,r=te.documentElement,i=te.createElement("div"),a=te.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",ee.clearCloneStyle="content-box"===a.style.backgroundClip,i.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",i.appendChild(a),n.getComputedStyle&&oe.extend(ee,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==o&&e(),o},reliableMarginRight:function(){var e,t=a.appendChild(te.createElement("div"));return t.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",a.style.width="1px",r.appendChild(i),e=!parseFloat(n.getComputedStyle(t,null).marginRight),r.removeChild(i),a.removeChild(t),e}}))}(),oe.swap=function(e,t,n,o){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];r=n.apply(e,o||[]);for(i in t)e.style[i]=a[i];return r};var $e=/^(none|table(?!-c[ea]).+)/,Ge=new RegExp("^("+Ce+")(.*)$","i"),Xe=new RegExp("^([+-])=("+Ce+")","i"),Qe={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"},Ze=["Webkit","O","Moz","ms"];oe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=C(e,"opacity");return""===n?"1":n}}}},cssNumber:{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":"cssFloat"},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,i,a,l=oe.camelCase(t),s=e.style;return t=oe.cssProps[l]||(oe.cssProps[l]=D(s,l)),a=oe.cssHooks[t]||oe.cssHooks[l],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,o))?r:s[t]:(i=typeof n,"string"===i&&(r=Xe.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(oe.css(e,t)),i="number"),null!=n&&n===n&&("number"!==i||oe.cssNumber[l]||(n+="px"),ee.clearCloneStyle||""!==n||0!==t.indexOf("background")||(s[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,o))||(s[t]=n)),void 0)}},css:function(e,t,n,o){var r,i,a,l=oe.camelCase(t);return t=oe.cssProps[l]||(oe.cssProps[l]=D(e.style,l)),a=oe.cssHooks[t]||oe.cssHooks[l],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=C(e,t,o)),"normal"===r&&t in Je&&(r=Je[t]),""===n||n?(i=parseFloat(r),n===!0||oe.isNumeric(i)?i||0:r):r}}),oe.each(["height","width"],function(e,t){oe.cssHooks[t]={get:function(e,n,o){return n?$e.test(oe.css(e,"display"))&&0===e.offsetWidth?oe.swap(e,Qe,function(){return R(e,t,o)}):R(e,t,o):void 0},set:function(e,n,o){var r=o&&Ke(e);return O(e,n,o?T(e,t,o,"border-box"===oe.css(e,"boxSizing",!1,r),r):0)}}}),oe.cssHooks.marginRight=_(ee.reliableMarginRight,function(e,t){return t?oe.swap(e,{display:"inline-block"},C,[e,"marginRight"]):void 0}),oe.each({margin:"",padding:"",border:"Width"},function(e,t){oe.cssHooks[e+t]={expand:function(n){for(var o=0,r={},i="string"==typeof n?n.split(" "):[n];4>o;o++)r[e+_e[o]+t]=i[o]||i[o-2]||i[0];return r}},We.test(e)||(oe.cssHooks[e+t].set=O)}),oe.fn.extend({css:function(e,t){return xe(this,function(e,t,n){var o,r,i={},a=0;if(oe.isArray(t)){for(o=Ke(e),r=t.length;r>a;a++)i[t[a]]=oe.css(e,t[a],!1,o);return i}return void 0!==n?oe.style(e,t,n):oe.css(e,t)},e,t,arguments.length>1)},show:function(){return M(this,!0)},hide:function(){return M(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){De(this)?oe(this).show():oe(this).hide()})}}),oe.Tween=P,P.prototype={constructor:P,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(oe.cssNumber[n]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,n=P.propHooks[this.prop];return this.options.duration?this.pos=t=oe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=oe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){oe.fx.step[e.prop]?oe.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[oe.cssProps[e.prop]]||oe.cssHooks[e.prop])?oe.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},oe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},oe.fx=P.prototype.init,oe.fx.step={};var et,tt,nt=/^(?:toggle|show|hide)$/,ot=new RegExp("^(?:([+-])=|)("+Ce+")([a-z%]*)$","i"),rt=/queueHooks$/,it=[j],at={"*":[function(e,t){var n=this.createTween(e,t),o=n.cur(),r=ot.exec(t),i=r&&r[3]||(oe.cssNumber[e]?"":"px"),a=(oe.cssNumber[e]||"px"!==i&&+o)&&ot.exec(oe.css(n.elem,e)),l=1,s=20;if(a&&a[3]!==i){i=i||a[3],r=r||[],a=+o||1;do l=l||".5",a/=l,oe.style(n.elem,e,a+i);while(l!==(l=n.cur()/o)&&1!==l&&--s)}return r&&(a=n.start=+a||+o||0,n.unit=i,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};oe.Animation=oe.extend(V,{tweener:function(e,t){oe.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,o=0,r=e.length;r>o;o++)n=e[o],at[n]=at[n]||[],at[n].unshift(t)},prefilter:function(e,t){t?it.unshift(e):it.push(e)}}),oe.speed=function(e,t,n){var o=e&&"object"==typeof e?oe.extend({},e):{complete:n||!n&&t||oe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!oe.isFunction(t)&&t};return o.duration=oe.fx.off?0:"number"==typeof o.duration?o.duration:o.duration in oe.fx.speeds?oe.fx.speeds[o.duration]:oe.fx.speeds._default,(null==o.queue||o.queue===!0)&&(o.queue="fx"),o.old=o.complete,o.complete=function(){oe.isFunction(o.old)&&o.old.call(this),o.queue&&oe.dequeue(this,o.queue)},o},oe.fn.extend({fadeTo:function(e,t,n,o){return this.filter(De).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(e,t,n,o){var r=oe.isEmptyObject(e),i=oe.speed(t,n,o),a=function(){var t=V(this,oe.extend({},e),i);(r||Ee.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||i.queue===!1?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var o=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",i=oe.timers,a=Ee.get(this);if(r)a[r]&&a[r].stop&&o(a[r]);else for(r in a)a[r]&&a[r].stop&&rt.test(r)&&o(a[r]);for(r=i.length;r--;)i[r].elem!==this||null!=e&&i[r].queue!==e||(i[r].anim.stop(n),t=!1,i.splice(r,1));(t||!n)&&oe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Ee.get(this),o=n[e+"queue"],r=n[e+"queueHooks"],i=oe.timers,a=o?o.length:0;for(n.finish=!0,oe.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;a>t;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),oe.each(["toggle","show","hide"],function(e,t){var n=oe.fn[t];oe.fn[t]=function(e,o,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,o,r)}}),oe.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){oe.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),oe.timers=[],oe.fx.tick=function(){var e,t=0,n=oe.timers;for(et=oe.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||oe.fx.stop(),et=void 0},oe.fx.timer=function(e){oe.timers.push(e),e()?oe.fx.start():oe.timers.pop()},oe.fx.interval=13,oe.fx.start=function(){tt||(tt=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(tt),tt=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fn.delay=function(e,t){return e=oe.fx?oe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var o=setTimeout(t,e);n.stop=function(){clearTimeout(o)}})},function(){var e=te.createElement("input"),t=te.createElement("select"),n=t.appendChild(te.createElement("option"));e.type="checkbox",ee.checkOn=""!==e.value,ee.optSelected=n.selected,t.disabled=!0,ee.optDisabled=!n.disabled,e=te.createElement("input"),e.value="t",e.type="radio",ee.radioValue="t"===e.value}();var lt,st,ct=oe.expr.attrHandle;oe.fn.extend({attr:function(e,t){return xe(this,oe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){oe.removeAttr(this,e)})}}),oe.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(e&&3!==i&&8!==i&&2!==i)return typeof e.getAttribute===Te?oe.prop(e,t,n):(1===i&&oe.isXMLDoc(e)||(t=t.toLowerCase(),o=oe.attrHooks[t]||(oe.expr.match.bool.test(t)?st:lt)),void 0===n?o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=oe.find.attr(e,t),null==r?void 0:r):null!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void oe.removeAttr(e,t))},removeAttr:function(e,t){var n,o,r=0,i=t&&t.match(me);if(i&&1===e.nodeType)for(;n=i[r++];)o=oe.propFix[n]||n,oe.expr.match.bool.test(n)&&(e[o]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!ee.radioValue&&"radio"===t&&oe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),st={set:function(e,t,n){return t===!1?oe.removeAttr(e,n):e.setAttribute(n,n),n}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ct[t]||oe.find.attr;ct[t]=function(e,t,o){var r,i;return o||(i=ct[t],ct[t]=r,r=null!=n(e,t,o)?t.toLowerCase():null,ct[t]=i),r}});var ut=/^(?:input|select|textarea|button)$/i;oe.fn.extend({prop:function(e,t){return xe(this,oe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[oe.propFix[e]||e]})}}),oe.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var o,r,i,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return i=1!==a||!oe.isXMLDoc(e),i&&(t=oe.propFix[t]||t,r=oe.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(o=r.set(e,n,t))?o:e[t]=n:r&&"get"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||ut.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),ee.optSelected||(oe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this});var pt=/[\t\r\n\f]/g;oe.fn.extend({addClass:function(e){var t,n,o,r,i,a,l="string"==typeof e&&e,s=0,c=this.length;if(oe.isFunction(e))return this.each(function(t){oe(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(me)||[];c>s;s++)if(n=this[s],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(pt," "):" ")){for(i=0;r=t[i++];)o.indexOf(" "+r+" ")<0&&(o+=r+" ");a=oe.trim(o),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,o,r,i,a,l=0===arguments.length||"string"==typeof e&&e,s=0,c=this.length;if(oe.isFunction(e))return this.each(function(t){oe(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(me)||[];c>s;s++)if(n=this[s],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(pt," "):"")){for(i=0;r=t[i++];)for(;o.indexOf(" "+r+" ")>=0;)o=o.replace(" "+r+" "," ");a=e?oe.trim(o):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):oe.isFunction(e)?this.each(function(n){oe(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,o=0,r=oe(this),i=e.match(me)||[];t=i[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===Te||"boolean"===n)&&(this.className&&Ee.set(this,"__className__",this.className),this.className=this.className||e===!1?"":Ee.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,o=this.length;o>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(pt," ").indexOf(t)>=0)return!0;return!1}});var dt=/\r/g;oe.fn.extend({val:function(e){var t,n,o,r=this[0];{if(arguments.length)return o=oe.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=o?e.call(this,n,oe(this).val()):e,null==r?r="":"number"==typeof r?r+="":oe.isArray(r)&&(r=oe.map(r,function(e){return null==e?"":e+""})),t=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=oe.valHooks[r.type]||oe.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(dt,""):null==n?"":n)}}}),oe.extend({valHooks:{option:{get:function(e){var t=oe.find.attr(e,"value");return null!=t?t:oe.trim(oe.text(e))}},select:{get:function(e){for(var t,n,o=e.options,r=e.selectedIndex,i="select-one"===e.type||0>r,a=i?null:[],l=i?r+1:o.length,s=0>r?l:i?r:0;l>s;s++)if(n=o[s],(n.selected||s===r)&&(ee.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!oe.nodeName(n.parentNode,"optgroup"))){if(t=oe(n).val(),i)return t;a.push(t)}return a},set:function(e,t){for(var n,o,r=e.options,i=oe.makeArray(t),a=r.length;a--;)o=r[a],(o.selected=oe.inArray(o.value,i)>=0)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(e,t){return oe.isArray(t)?e.checked=oe.inArray(oe(e).val(),t)>=0:void 0}},ee.checkOn||(oe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),oe.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(e,t){oe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),oe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ft=oe.now(),ht=/\?/;oe.parseJSON=function(e){return JSON.parse(e+"")},oe.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(o){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+e),t};var gt=/#.*$/,bt=/([?&])_=[^&]*/,mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yt=/^(?:GET|HEAD)$/,xt=/^\/\//,Et=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,wt={},Nt={},kt="*/".concat("*"),Ct=n.location.href,_t=Et.exec(Ct.toLowerCase())||[];oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct,type:"GET",isLocal:vt.test(_t[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?B(B(e,oe.ajaxSettings),t):B(oe.ajaxSettings,e)},ajaxPrefilter:U(wt),ajaxTransport:U(Nt),ajax:function(e,t){function n(e,t,n,a){var s,u,m,v,x,w=t;2!==y&&(y=2,l&&clearTimeout(l),o=void 0,i=a||"",E.readyState=e>0?4:0,s=e>=200&&300>e||304===e,n&&(v=q(p,E,n)),v=H(p,v,E,s),s?(p.ifModified&&(x=E.getResponseHeader("Last-Modified"),x&&(oe.lastModified[r]=x),x=E.getResponseHeader("etag"),x&&(oe.etag[r]=x)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=v.state,u=v.data,m=v.error,s=!m)):(m=w,(e||!w)&&(w="error",0>e&&(e=0))),E.status=e,E.statusText=(t||w)+"",s?h.resolveWith(d,[u,w,E]):h.rejectWith(d,[E,w,m]),E.statusCode(b),b=void 0,c&&f.trigger(s?"ajaxSuccess":"ajaxError",[E,p,s?u:m]),g.fireWith(d,[E,w]),c&&(f.trigger("ajaxComplete",[E,p]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,r,i,a,l,s,c,u,p=oe.ajaxSetup({},t),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?oe(d):oe.event,h=oe.Deferred(),g=oe.Callbacks("once memory"),b=p.statusCode||{},m={},v={},y=0,x="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!a)for(a={};t=mt.exec(i);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=v[n]=v[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)b[t]=[b[t],e[t]];else E.always(e[E.status]);return this},abort:function(e){var t=e||x;return o&&o.abort(t),n(0,t),this}};if(h.promise(E).complete=g.add,E.success=E.done,E.error=E.fail,p.url=((e||p.url||Ct)+"").replace(gt,"").replace(xt,_t[1]+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=oe.trim(p.dataType||"*").toLowerCase().match(me)||[""],null==p.crossDomain&&(s=Et.exec(p.url.toLowerCase()),p.crossDomain=!(!s||s[1]===_t[1]&&s[2]===_t[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(_t[3]||("http:"===_t[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=oe.param(p.data,p.traditional)),F(wt,p,t,E),2===y)return E;c=oe.event&&p.global,c&&0===oe.active++&&oe.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!yt.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(ht.test(r)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=bt.test(r)?r.replace(bt,"$1_="+ft++):r+(ht.test(r)?"&":"?")+"_="+ft++)),p.ifModified&&(oe.lastModified[r]&&E.setRequestHeader("If-Modified-Since",oe.lastModified[r]),oe.etag[r]&&E.setRequestHeader("If-None-Match",oe.etag[r])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+kt+"; q=0.01":""):p.accepts["*"]);for(u in p.headers)E.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(p.beforeSend.call(d,E,p)===!1||2===y))return E.abort();x="abort";for(u in{success:1,error:1,complete:1})E[u](p[u]);if(o=F(Nt,p,t,E)){E.readyState=1,c&&f.trigger("ajaxSend",[E,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){E.abort("timeout")},p.timeout));try{y=1,o.send(m,n)}catch(w){if(!(2>y))throw w;n(-1,w)}}else n(-1,"No Transport");return E},getJSON:function(e,t,n){return oe.get(e,t,n,"json")},getScript:function(e,t){return oe.get(e,void 0,t,"script")}}),oe.each(["get","post"],function(e,t){oe[t]=function(e,n,o,r){return oe.isFunction(n)&&(r=r||o,o=n,n=void 0),oe.ajax({url:e,type:t,dataType:r,data:n,success:o})}}),oe._evalUrl=function(e){return oe.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},oe.fn.extend({wrapAll:function(e){var t;return oe.isFunction(e)?this.each(function(t){oe(this).wrapAll(e.call(this,t))}):(this[0]&&(t=oe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return oe.isFunction(e)?this.each(function(t){oe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=oe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=oe.isFunction(e);return this.each(function(n){oe(this).wrapAll(t?e.call(this,n):e);
})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}}),oe.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},oe.expr.filters.visible=function(e){return!oe.expr.filters.hidden(e)};var Dt=/%20/g,Ot=/\[\]$/,Tt=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;oe.param=function(e,t){var n,o=[],r=function(e,t){t=oe.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(e)||e.jquery&&!oe.isPlainObject(e))oe.each(e,function(){r(this.name,this.value)});else for(n in e)z(n,e[n],t,r);return o.join("&").replace(Dt,"+")},oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=oe.prop(this,"elements");return e?oe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!oe(this).is(":disabled")&&Mt.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!Oe.test(e))}).map(function(e,t){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:n.replace(Tt,"\r\n")}}).get()}}),oe.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Pt=0,St={},It={0:200,1223:204},At=oe.ajaxSettings.xhr();n.attachEvent&&n.attachEvent("onunload",function(){for(var e in St)St[e]()}),ee.cors=!!At&&"withCredentials"in At,ee.ajax=At=!!At,oe.ajaxTransport(function(e){var t;return ee.cors||At&&!e.crossDomain?{send:function(n,o){var r,i=e.xhr(),a=++Pt;if(i.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)i[r]=e.xhrFields[r];e.mimeType&&i.overrideMimeType&&i.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)i.setRequestHeader(r,n[r]);t=function(e){return function(){t&&(delete St[a],t=i.onload=i.onerror=null,"abort"===e?i.abort():"error"===e?o(i.status,i.statusText):o(It[i.status]||i.status,i.statusText,"string"==typeof i.responseText?{text:i.responseText}:void 0,i.getAllResponseHeaders()))}},i.onload=t(),i.onerror=t("error"),t=St[a]=t("abort");try{i.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}:void 0}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return oe.globalEval(e),e}}}),oe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),oe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(o,r){t=oe("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),te.head.appendChild(t[0])},abort:function(){n&&n()}}}});var jt=[],Lt=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jt.pop()||oe.expando+"_"+ft++;return this[e]=!0,e}}),oe.ajaxPrefilter("json jsonp",function(e,t,o){var r,i,a,l=e.jsonp!==!1&&(Lt.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Lt.test(e.data)&&"data");return l||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=oe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,l?e[l]=e[l].replace(Lt,"$1"+r):e.jsonp!==!1&&(e.url+=(ht.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||oe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=n[r],n[r]=function(){a=arguments},o.always(function(){n[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,jt.push(r)),a&&oe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"):void 0}),oe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||te;var o=ue.exec(e),r=!n&&[];return o?[t.createElement(o[1])]:(o=oe.buildFragment([e],t,r),r&&r.length&&oe(r).remove(),oe.merge([],o.childNodes))};var Vt=oe.fn.load;oe.fn.load=function(e,t,n){if("string"!=typeof e&&Vt)return Vt.apply(this,arguments);var o,r,i,a=this,l=e.indexOf(" ");return l>=0&&(o=oe.trim(e.slice(l)),e=e.slice(0,l)),oe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&oe.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){i=arguments,a.html(o?oe("<div>").append(oe.parseHTML(e)).find(o):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){oe.fn[t]=function(e){return this.on(t,e)}}),oe.expr.filters.animated=function(e){return oe.grep(oe.timers,function(t){return e===t.elem}).length};var Ut=n.document.documentElement;oe.offset={setOffset:function(e,t,n){var o,r,i,a,l,s,c,u=oe.css(e,"position"),p=oe(e),d={};"static"===u&&(e.style.position="relative"),l=p.offset(),i=oe.css(e,"top"),s=oe.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(i+s).indexOf("auto")>-1,c?(o=p.position(),a=o.top,r=o.left):(a=parseFloat(i)||0,r=parseFloat(s)||0),oe.isFunction(t)&&(t=t.call(e,n,l)),null!=t.top&&(d.top=t.top-l.top+a),null!=t.left&&(d.left=t.left-l.left+r),"using"in t?t.using.call(e,d):p.css(d)}},oe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){oe.offset.setOffset(this,e,t)});var t,n,o=this[0],r={top:0,left:0},i=o&&o.ownerDocument;if(i)return t=i.documentElement,oe.contains(t,o)?(typeof o.getBoundingClientRect!==Te&&(r=o.getBoundingClientRect()),n=W(i),{top:r.top+n.pageYOffset-t.clientTop,left:r.left+n.pageXOffset-t.clientLeft}):r},position:function(){if(this[0]){var e,t,n=this[0],o={top:0,left:0};return"fixed"===oe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),oe.nodeName(e[0],"html")||(o=e.offset()),o.top+=oe.css(e[0],"borderTopWidth",!0),o.left+=oe.css(e[0],"borderLeftWidth",!0)),{top:t.top-o.top-oe.css(n,"marginTop",!0),left:t.left-o.left-oe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Ut;e&&!oe.nodeName(e,"html")&&"static"===oe.css(e,"position");)e=e.offsetParent;return e||Ut})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var o="pageYOffset"===t;oe.fn[e]=function(r){return xe(this,function(e,r,i){var a=W(e);return void 0===i?a?a[t]:e[r]:void(a?a.scrollTo(o?n.pageXOffset:i,o?i:n.pageYOffset):e[r]=i)},e,r,arguments.length,null)}}),oe.each(["top","left"],function(e,t){oe.cssHooks[t]=_(ee.pixelPosition,function(e,n){return n?(n=C(e,t),Ye.test(n)?oe(e).position()[t]+"px":n):void 0})}),oe.each({Height:"height",Width:"width"},function(e,t){oe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,o){oe.fn[o]=function(o,r){var i=arguments.length&&(n||"boolean"!=typeof o),a=n||(o===!0||r===!0?"margin":"border");return xe(this,function(t,n,o){var r;return oe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?oe.css(t,n,a):oe.style(t,n,o,a)},t,i?o:void 0,i,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,o=[],r=function(){return oe}.apply(t,o),!(void 0!==r&&(e.exports=r));var Ft=n.jQuery,Bt=n.$;return oe.noConflict=function(e){return n.$===oe&&(n.$=Bt),e&&n.jQuery===oe&&(n.jQuery=Ft),oe},typeof i===Te&&(n.jQuery=n.$=oe),oe})},function(e,t,n){try{(function(){"use strict";function t(e){return e&&e.__esModule?e:{"default":e}}var o=n(7),r=t(o),i=n(46),a=r["default"].createClass({displayName:"App",render:function(){return r["default"].createElement("div",{className:"container"},r["default"].createElement("h1",{className:"text-center"},"Search Engine"),r["default"].createElement(i.RouteHandler,null))}});e.exports=a}).call(this)}finally{}},function(e,t,n){try{(function(){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function(e,t,n){for(var o=!0;o;){var r=e,i=t,a=n;l=c=s=void 0,o=!1,null===r&&(r=Function.prototype);var l=Object.getOwnPropertyDescriptor(r,i);if(void 0!==l){if("value"in l)return l.value;var s=l.get;return void 0===s?void 0:s.call(a)}var c=Object.getPrototypeOf(r);if(null===c)return void 0;e=c,t=i,n=a,o=!0}},s=n(7),c=o(s),u=n(34),p=o(u),d=function(e){function t(){r(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var e=p["default"].getContent();this.state={content:e}}return i(t,e),a(t,[{key:"render",value:function(){var e={fontFamily:"Arial",fontSize:"20"};return c["default"].createElement("div",{style:e,className:"content"},this.state.content)}}]),t}(c["default"].Component);t["default"]=d,e.exports=t["default"]}).call(this)}finally{}},function(e,t,n){try{(function(){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function(e,t,n){for(var o=!0;o;){var r=e,i=t,a=n;l=c=s=void 0,o=!1,null===r&&(r=Function.prototype);var l=Object.getOwnPropertyDescriptor(r,i);if(void 0!==l){if("value"in l)return l.value;var s=l.get;return void 0===s?void 0:s.call(a)}var c=Object.getPrototypeOf(r);if(null===c)return void 0;e=c,t=i,n=a,o=!0}},s=n(7),c=o(s),u=n(112),p=o(u),d=n(70),f=o(d),h=n(34),g=o(h),b=function(e){function t(){r(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={documents:!1}}return i(t,e),a(t,[{key:"handleSubmit",value:function(e){e.preventDefault();var t=document.getElementById("request").value;f["default"].fetchDocuments(t)}},{key:"onChange",value:function(){var e=g["default"].getDocuments();e===[]&&(e=!1),this.setState({documents:e})}},{key:"conponentWillUnmount",value:function(){this.setState({})}},{key:"componentDidMount",value:function(){g["default"].onChange=this.onChange.bind(this)}},{key:"render",value:function(){return c["default"].createElement("div",{className:"container"},c["default"].createElement("form",{className:"homePage",onSubmit:this.handleSubmit,action:"return false;"},c["default"].createElement("input",{type:"text",className:"form-control",id:"request",placeholder:"your request"}),c["default"].createElement("input",{className:"btn btn-default",type:"submit",value:"search"})),c["default"].createElement(p["default"],{list:this.state.documents}))}}]),t}(c["default"].Component);t["default"]=b,e.exports=t["default"]}).call(this)}finally{}},function(e,t,n){try{(function(){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function(e,t,n){for(var o=!0;o;){var r=e,i=t,a=n;l=c=s=void 0,o=!1,null===r&&(r=Function.prototype);var l=Object.getOwnPropertyDescriptor(r,i);if(void 0!==l){if("value"in l)return l.value;var s=l.get;return void 0===s?void 0:s.call(a)}var c=Object.getPrototypeOf(r);if(null===c)return void 0;e=c,t=i,n=a,o=!0}},s=n(7),c=o(s),u=n(114),p=o(u),d=n(46),f=n(70),h=o(f),g=n(34),b=o(g),m=function(e){function t(){r(this,t),l(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),a(t,[{key:"handleClick",value:function(e){e.preventDefault(),h["default"].fetchContent(e.target.textContent)}},{key:"onChange",value:function(){this.transitionTo("content")}},{key:"componentDidMount",value:function(){b["default"].onChangeContent=this.onChange.bind(this)}},{key:"render",value:function(){var e="",t={fontFamily:"Arial",fontSize:"20"};this.props.list!==!1&&(e=this.props.list.map(function(e){return c["default"].createElement("tr",{className:"RequestList",onClick:this.handleClick},c["default"].createElement("th",null," ",e.document," "),c["default"].createElement("th",null,e.ponderation))}.bind(this)));var n=c["default"].createElement("table",{className:"table"},c["default"].createElement("thead",null,c["default"].createElement("tr",null,c["default"].createElement("th",null,"Document Name"),c["default"].createElement("th",null,"Ponderation "))),c["default"].createElement("tbody",null,e));return c["default"].createElement("div",{style:t},this.props.list!==!1?{tableInstance:n}:{RequestNode:e})}}]),t}(c["default"].Component);t["default"]=m,p["default"].onClass(m,d.Navigation),e.exports=t["default"]}).call(this)}finally{}},function(e,t,n){try{(function(){"use strict";function e(e){return e&&e.__esModule?e:{"default":e}}var t=n(109),o=e(t),r=n(111),i=e(r),a=n(110),l=e(a),s=n(7),c=e(s),u=n(46),p=e(u);n(211);var d=c["default"].createElement(u.Route,{name:"app",path:"/",handler:o["default"]},c["default"].createElement(u.Route,{name:"content",handler:l["default"]}),c["default"].createElement(u.Route,{name:"home",handler:i["default"]}),c["default"].createElement(u.DefaultRoute,{handler:i["default"]}));p["default"].run(d,p["default"].HashLocalion,function(e){c["default"].render(c["default"].createElement(e,null),document.body)})}).call(this)}finally{}},function(e,t,n){function o(e){var t=e.getDefaultProps;t&&(e.defaultProps=t(),delete e.getDefaultProps)}function r(e){function t(e){var t=e.state||{};l(t,n.call(e)),e.state=t}var n=e.getInitialState,o=e.componentWillMount;n&&(o?e.componentWillMount=function(){t(this),o.call(this)}:e.componentWillMount=function(){t(this)},delete e.getInitialState)}function i(e,t){o(t),r(t);var n={},l={};Object.keys(t).forEach(function(e){"mixins"!==e&&"statics"!==e&&("function"==typeof t[e]?n[e]=t[e]:l[e]=t[e])}),s(e.prototype,n);var c=function(e,t,n){if(!e)return t;if(!t)return e;var o={};return Object.keys(e).forEach(function(n){t[n]||(o[n]=e[n])}),Object.keys(t).forEach(function(n){e[n]?o[n]=function(){return t[n].apply(this,arguments)&&e[n].apply(this,arguments)}:o[n]=t[n]}),o};return a({childContextTypes:c,contextTypes:c,propTypes:a.MANY_MERGED_LOOSE,defaultProps:a.MANY_MERGED_LOOSE})(e,l),t.statics&&Object.getOwnPropertyNames(t.statics).forEach(function(n){var o=e[n],r=t.statics[n];if(void 0!==o&&void 0!==r)throw new TypeError("Cannot mixin statics because statics."+n+" and Component."+n+" are defined.");e[n]=void 0!==o?o:r}),t.mixins&&t.mixins.reverse().forEach(i.bind(null,e)),e}var a=n(116),l=n(115),s=a({componentDidMount:a.MANY,componentWillMount:a.MANY,componentWillReceiveProps:a.MANY,shouldComponentUpdate:a.ONCE,componentWillUpdate:a.MANY,componentDidUpdate:a.MANY,componentWillUnmount:a.MANY,getChildContext:a.MANY_MERGED});e.exports=function(){var e=s;return e.onClass=function(e,t){return i(e,t)},e.decorate=function(t){return function(n){return e.onClass(n,t)}},e}()},function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var o,r,i=n(e),a=1;a<arguments.length;a++){o=arguments[a],r=Object.keys(Object(o));for(var l=0;l<r.length;l++)i[r[l]]=o[r[l]]}return i}},function(e,t){var n=function(e){return Object.prototype.toString.call(e)},o=function(e){throw e},r=e.exports=function(e,t){function o(e,t,n){t in e?e[t]=n:Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}var i=t||{};return i.unknownFunction||(i.unknownFunction=r.ONCE),i.nonFunctionProperty||(i.nonFunctionProperty=function(e,t,o){if(void 0!==e&&void 0!==t){var r=function(e){return e&&e.constructor&&e.constructor.name?e.constructor.name:n(e).slice(8,-1)};throw new TypeError("Cannot mixin key "+o+" because it is provided by multiple sources, and the types are "+r(e)+" and "+r(t))}return void 0===e?t:e}),function(t,n){Object.keys(n).forEach(function(r){var a=t[r],l=n[r],s=e[r];if(void 0!==a||void 0!==l){var c=function(e){return"function"!=typeof e?e:function(){return e.call(this,arguments)}};if(s){var u=s(a,l,r);return void o(t,r,c(u))}var p="function"==typeof a,d="function"==typeof l;return p&&void 0===l||d&&void 0===a||p&&d?void o(t,r,c(i.unknownFunction(a,l,r))):void(t[r]=i.nonFunctionProperty(a,l,r))}})}};r._mergeObjects=function(e,t){var r=function(e,t){var r=n(e);if("[object Object]"!==r){var i=e.constructor?e.constructor.name:"Unknown",a=t.constructor?t.constructor.name:"Unknown";o("cannot merge returned value of type "+i+" with an "+a)}};if(Array.isArray(e)&&Array.isArray(t))return e.concat(t);r(e,t),r(t,e);var i={};return Object.keys(e).forEach(function(n){Object.prototype.hasOwnProperty.call(t,n)&&o("cannot merge returns because both have the "+JSON.stringify(n)+" key"),i[n]=e[n]}),Object.keys(t).forEach(function(e){i[e]=t[e]}),i},r.ONCE=function(e,t,n){if(e&&t)throw new TypeError("Cannot mixin "+n+" because it has a unique constraint.");var o=e||t;return function(e){return o.apply(this,e)}},r.MANY=function(e,t,n){return function(n){return t&&t.apply(this,n),e?e.apply(this,n):void 0}},r.MANY_MERGED_LOOSE=function(e,t,n){return e&&t?r._mergeObjects(e,t):e||t},r.MANY_MERGED=function(e,t,n){return function(n){var o=t&&t.apply(this,n),i=e&&e.apply(this,n);return o&&i?r._mergeObjects(o,i):i||o}},r.REDUCE_LEFT=function(e,t,n){var o=e||function(e){return e},r=t||function(e){return e};return function(e){return r.call(this,o.apply(this,e))}},r.REDUCE_RIGHT=function(e,t,n){var o=e||function(e){return e},r=t||function(e){return e};return function(e){return o.call(this,r.apply(this,e))}}},function(e,t,n){"use strict";function o(e,t,n){var r=e.childRoutes;if(r)for(var i,s,c=0,u=r.length;u>c;++c)if(s=r[c],!s.isDefault&&!s.isNotFound&&(i=o(s,t,n)))return i.routes.unshift(e),i;var p=e.defaultRoute;if(p&&(f=a.extractParams(p.path,t)))return new l(t,f,n,[e,p]);var d=e.notFoundRoute;if(d&&(f=a.extractParams(d.path,t)))return new l(t,f,n,[e,d]);var f=a.extractParams(e.path,t);return f?new l(t,f,n,[e]):null}var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(45),l=function(){function e(t,n,o,i){r(this,e),this.pathname=t,this.params=n,this.query=o,this.routes=i}return i(e,null,[{key:"findMatch",value:function(e,t){for(var n=a.withoutQuery(t),r=a.extractQuery(t),i=null,l=0,s=e.length;null==i&&s>l;++l)i=o(e[l],n,r);return i}}]),e}();e.exports=l},function(e,t,n){"use strict";var o=n(12),r={contextTypes:{router:o.router.isRequired},makePath:function(e,t,n){return this.context.router.makePath(e,t,n)},makeHref:function(e,t,n){return this.context.router.makeHref(e,t,n)},transitionTo:function(e,t,n){this.context.router.transitionTo(e,t,n)},replaceWith:function(e,t,n){this.context.router.replaceWith(e,t,n)},goBack:function(){return this.context.router.goBack()}};e.exports=r},function(e,t,n){"use strict";function o(e,t){if(!t)return!0;if(e.pathname===t.pathname)return!1;var n=e.routes,o=t.routes,r=n.filter(function(e){return-1!==o.indexOf(e)});return!r.some(function(e){return e.ignoreScrollBehavior})}var r=n(2),i=n(6).canUseDOM,a=n(125),l={statics:{recordScrollPosition:function(e){this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[e]=a()},getScrollPosition:function(e){return this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[e]||null}},componentWillMount:function(){r(null==this.constructor.getScrollBehavior()||i,"Cannot use scroll behavior without a DOM")},componentDidMount:function(){this._updateScroll()},componentDidUpdate:function(e,t){this._updateScroll(t)},_updateScroll:function(e){if(o(this.state,e)){var t=this.constructor.getScrollBehavior();t&&t.updateScrollPosition(this.constructor.getScrollPosition(this.state.path),this.state.action)}}};e.exports=l},function(e,t,n){"use strict";var o=n(12),r={contextTypes:{router:o.router.isRequired},getPath:function(){return this.context.router.getCurrentPath()},getPathname:function(){return this.context.router.getCurrentPathname()},getParams:function(){return this.context.router.getCurrentParams()},getQuery:function(){return this.context.router.getCurrentQuery()},getRoutes:function(){return this.context.router.getCurrentRoutes()},isActive:function(e,t,n){return this.context.router.isActive(e,t,n)}};e.exports=r},function(e,t,n){"use strict";function o(e,t){this.path=e,this.abortReason=null,this.retry=t.bind(this)}var r=n(71),i=n(72);o.prototype.abort=function(e){null==this.abortReason&&(this.abortReason=e||"ABORT")},o.prototype.redirect=function(e,t,n){this.abort(new i(e,t,n))},o.prototype.cancel=function(){this.abort(new r)},o.from=function(e,t,n,o){t.reduce(function(t,o,r){return function(i){if(i||e.abortReason)t(i);else if(o.onLeave)try{o.onLeave(e,n[r],t),o.onLeave.length<3&&t()}catch(a){t(a)}else t()}},o)()},o.to=function(e,t,n,o,r){t.reduceRight(function(t,r){return function(i){if(i||e.abortReason)t(i);else if(r.onEnter)try{r.onEnter(e,n,o,t),r.onEnter.length<4&&t()}catch(a){t(a)}else t()}},r)()},e.exports=o},function(e,t){"use strict";var n={updateScrollPosition:function(){window.scrollTo(0,0)}};e.exports=n},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=n(7),l=function(e){function t(){o(this,t),null!=e&&e.apply(this,arguments)}return i(t,e),r(t,[{key:"render",value:function(){return this.props.children}}]),t}(a.Component);e.exports=l},function(e,t,n){"use strict";function o(e){return 0===e.button}function r(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},s=n(7),c=n(3),u=n(12),p=function(e){function t(){i(this,t),null!=e&&e.apply(this,arguments)}return l(t,e),a(t,[{key:"handleClick",value:function(e){var t,n=!0;this.props.onClick&&(t=this.props.onClick(e)),!r(e)&&o(e)&&((t===!1||e.defaultPrevented===!0)&&(n=!1),e.preventDefault(),n&&this.context.router.transitionTo(this.props.to,this.props.params,this.props.query))}},{key:"getHref",value:function(){return this.context.router.makeHref(this.props.to,this.props.params,this.props.query)}},{key:"getClassName",value:function(){var e=this.props.className;return this.getActiveState()&&(e+=" "+this.props.activeClassName),e}},{key:"getActiveState",value:function(){return this.context.router.isActive(this.props.to,this.props.params,this.props.query)}},{key:"render",value:function(){var e=c({},this.props,{href:this.getHref(),className:this.getClassName(),onClick:this.handleClick.bind(this)});return e.activeStyle&&this.getActiveState()&&(e.style=e.activeStyle),s.DOM.a(e,this.props.children)}}]),t}(s.Component);p.contextTypes={router:u.router.isRequired},p.propTypes={activeClassName:u.string.isRequired,to:u.oneOfType([u.string,u.route]).isRequired,params:u.object,query:u.object,activeStyle:u.object,onClick:u.func},p.defaultProps={activeClassName:"active",className:""},e.exports=p},function(e,t,n){"use strict";function o(){return r(i,"Cannot get current scroll position without a DOM"),{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}var r=n(2),i=n(6).canUseDOM;e.exports=o},function(e,t,n){"use strict";function o(e){return null==e||i.isValidElement(e)}function r(e){return o(e)||Array.isArray(e)&&e.every(o)}var i=n(7);e.exports=r},function(e,t,n){"use strict";var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),a=n(27),l=n(22),s=function(){function e(t){o(this,e),this.history=t||[],this.listeners=[],this._updateHistoryLength()}return r(e,[{key:"needsDOM",get:function(){return!1}},{key:"_updateHistoryLength",value:function(){l.length=this.history.length}},{key:"_notifyChange",value:function(e){for(var t={path:this.getCurrentPath(),type:e},n=0,o=this.listeners.length;o>n;++n)this.listeners[n].call(this,t)}},{key:"addChangeListener",value:function(e){this.listeners.push(e)}},{key:"removeChangeListener",value:function(e){this.listeners=this.listeners.filter(function(t){return t!==e})}},{key:"push",value:function(e){this.history.push(e),this._updateHistoryLength(),this._notifyChange(a.PUSH)}},{key:"replace",value:function(e){i(this.history.length,"You cannot replace the current path with no history"),this.history[this.history.length-1]=e,this._notifyChange(a.REPLACE)}},{key:"pop",value:function(){this.history.pop(),this._updateHistoryLength(),this._notifyChange(a.POP)}},{key:"getCurrentPath",value:function(){return this.history[this.history.length-1]}},{key:"toString",value:function(){return"<TestLocation>"}}]),e}();e.exports=s},function(e,t,n){"use strict";function o(e,t,n){"function"==typeof t&&(n=t,t=null);var o=r({routes:e,location:t});return o.run(n),o}var r=n(77);e.exports=o},function(e,t){"use strict";function n(){/*! taken from modernizr
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
* changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
*/
var e=navigator.userAgent;return-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}e.exports=n},function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var o,r,i=n(e),a=1;a<arguments.length;a++){o=arguments[a],r=Object.keys(Object(o));for(var l=0;l<r.length;l++)i[r[l]]=o[r[l]]}return i}},function(e,t,n){e.exports=n(132)},function(e,t,n){var o=n(134),r=n(133);e.exports={stringify:o,parse:r}},function(e,t,n){var o=n(82),r={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3};r.parseValues=function(e,t){for(var n={},r=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0,a=r.length;a>i;++i){var l=r[i],s=-1===l.indexOf("]=")?l.indexOf("="):l.indexOf("]=")+1;if(-1===s)n[o.decode(l)]="";else{var c=o.decode(l.slice(0,s)),u=o.decode(l.slice(s+1));if(Object.prototype.hasOwnProperty(c))continue;n.hasOwnProperty(c)?n[c]=[].concat(n[c]).concat(u):n[c]=u}}return n},r.parseObject=function(e,t,n){if(!e.length)return t;var o=e.shift(),i={};if("[]"===o)i=[],i=i.concat(r.parseObject(e,t,n));else{var a="["===o[0]&&"]"===o[o.length-1]?o.slice(1,o.length-1):o,l=parseInt(a,10),s=""+l;!isNaN(l)&&o!==a&&s===a&&l>=0&&l<=n.arrayLimit?(i=[],i[l]=r.parseObject(e,t,n)):i[a]=r.parseObject(e,t,n)}return i},r.parseKeys=function(e,t,n){if(e){var o=/^([^\[\]]*)/,i=/(\[[^\[\]]*\])/g,a=o.exec(e);if(!Object.prototype.hasOwnProperty(a[1])){var l=[];a[1]&&l.push(a[1]);for(var s=0;null!==(a=i.exec(e))&&s<n.depth;)++s,Object.prototype.hasOwnProperty(a[1].replace(/\[|\]/g,""))||l.push(a[1]);return a&&l.push("["+e.slice(a.index)+"]"),r.parseObject(l,t,n)}}},e.exports=function(e,t){if(""===e||null===e||"undefined"==typeof e)return{};t=t||{},t.delimiter="string"==typeof t.delimiter||o.isRegExp(t.delimiter)?t.delimiter:r.delimiter,t.depth="number"==typeof t.depth?t.depth:r.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:r.arrayLimit,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:r.parameterLimit;for(var n="string"==typeof e?r.parseValues(e,t):e,i={},a=Object.keys(n),l=0,s=a.length;s>l;++l){var c=a[l],u=r.parseKeys(c,n[c],t);i=o.merge(i,u)}return o.compact(i)}},function(e,t,n){var o=n(82),r={delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}}};r.stringify=function(e,t,n){if(o.isBuffer(e)?e=e.toString():e instanceof Date?e=e.toISOString():null===e&&(e=""),"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[encodeURIComponent(t)+"="+encodeURIComponent(e)];var i=[];if("undefined"==typeof e)return i;for(var a=Object.keys(e),l=0,s=a.length;s>l;++l){var c=a[l];i=Array.isArray(e)?i.concat(r.stringify(e[c],n(t,c),n)):i.concat(r.stringify(e[c],t+"["+c+"]",n))}return i},e.exports=function(e,t){t=t||{};var n="undefined"==typeof t.delimiter?r.delimiter:t.delimiter,o=[];if("object"!=typeof e||null===e)return"";var i;i=t.arrayFormat in r.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";for(var a=r.arrayPrefixGenerators[i],l=Object.keys(e),s=0,c=l.length;c>s;++s){var u=l[s];o=o.concat(r.stringify(e[u],u,a))}return o.join(n)}},function(e,t,n){"use strict";function o(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case O.topCompositionStart:return T.compositionStart;case O.topCompositionEnd:return T.compositionEnd;case O.topCompositionUpdate:return T.compositionUpdate}}function a(e,t){return e===O.topKeyDown&&t.keyCode===E}function l(e,t){switch(e){case O.topKeyUp:return-1!==x.indexOf(t.keyCode);case O.topKeyDown:return t.keyCode!==E;case O.topKeyPress:case O.topMouseDown:case O.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function c(e,t,n,o){var r,c;if(w?r=i(e):M?l(e,o)&&(r=T.compositionEnd):a(e,o)&&(r=T.compositionStart),!r)return null;C&&(M||r!==T.compositionStart?r===T.compositionEnd&&M&&(c=M.getData()):M=b.getPooled(t));var u=m.getPooled(r,n,o);if(c)u.data=c;else{var p=s(o);null!==p&&(u.data=p)}return h.accumulateTwoPhaseDispatches(u),u}function u(e,t){switch(e){case O.topCompositionEnd:return s(t);case O.topKeyPress:var n=t.which;return n!==_?null:(R=!0,D);case O.topTextInput:var o=t.data;return o===D&&R?null:o;default:return null}}function p(e,t){if(M){if(e===O.topCompositionEnd||l(e,t)){var n=M.getData();return b.release(M),M=null,n}return null}switch(e){case O.topPaste:return null;case O.topKeyPress:return t.which&&!r(t)?String.fromCharCode(t.which):null;case O.topCompositionEnd:return C?null:t.data;default:return null}}function d(e,t,n,o){var r;if(r=k?u(e,o):p(e,o),!r)return null;var i=v.getPooled(T.beforeInput,n,o);return i.data=r,h.accumulateTwoPhaseDispatches(i),i}var f=n(8),h=n(30),g=n(6),b=n(143),m=n(179),v=n(182),y=n(18),x=[9,13,27,32],E=229,w=g.canUseDOM&&"CompositionEvent"in window,N=null;g.canUseDOM&&"documentMode"in document&&(N=document.documentMode);var k=g.canUseDOM&&"TextEvent"in window&&!N&&!o(),C=g.canUseDOM&&(!w||N&&N>8&&11>=N),_=32,D=String.fromCharCode(_),O=f.topLevelTypes,T={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[O.topCompositionEnd,O.topKeyPress,O.topTextInput,O.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[O.topBlur,O.topCompositionEnd,O.topKeyDown,O.topKeyPress,O.topKeyUp,O.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[O.topBlur,O.topCompositionStart,O.topKeyDown,O.topKeyPress,O.topKeyUp,O.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[O.topBlur,O.topCompositionUpdate,O.topKeyDown,O.topKeyPress,O.topKeyUp,O.topMouseDown]}},R=!1,M=null,P={eventTypes:T,extractEvents:function(e,t,n,o){return[c(e,t,n,o),d(e,t,n,o)]}};e.exports=P},function(e,t,n){"use strict";function o(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=N.getPooled(O.change,R,e);x.accumulateTwoPhaseDispatches(t),w.batchedUpdates(i,t)}function i(e){y.enqueueEvents(e),y.processEventQueue()}function a(e,t){T=e,R=t,T.attachEvent("onchange",r)}function l(){T&&(T.detachEvent("onchange",r),T=null,R=null)}function s(e,t,n){return e===D.topChange?n:void 0}function c(e,t,n){e===D.topFocus?(l(),a(t,n)):e===D.topBlur&&l()}function u(e,t){T=e,R=t,M=e.value,P=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",A),T.attachEvent("onpropertychange",d)}function p(){T&&(delete T.value,T.detachEvent("onpropertychange",d),T=null,R=null,M=null,P=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==M&&(M=t,r(e))}}function f(e,t,n){return e===D.topInput?n:void 0}function h(e,t,n){e===D.topFocus?(p(),u(t,n)):e===D.topBlur&&p()}function g(e,t,n){return e!==D.topSelectionChange&&e!==D.topKeyUp&&e!==D.topKeyDown||!T||T.value===M?void 0:(M=T.value,R)}function b(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function m(e,t,n){return e===D.topClick?n:void 0}var v=n(8),y=n(29),x=n(30),E=n(6),w=n(11),N=n(21),k=n(66),C=n(104),_=n(18),D=v.topLevelTypes,O={change:{phasedRegistrationNames:{bubbled:_({onChange:null}),captured:_({onChangeCapture:null})},dependencies:[D.topBlur,D.topChange,D.topClick,D.topFocus,D.topInput,D.topKeyDown,D.topKeyUp,D.topSelectionChange]}},T=null,R=null,M=null,P=null,S=!1;E.canUseDOM&&(S=k("change")&&(!("documentMode"in document)||document.documentMode>8));var I=!1;E.canUseDOM&&(I=k("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return P.get.call(this)},set:function(e){M=""+e,P.set.call(this,e)}},j={eventTypes:O,extractEvents:function(e,t,n,r){var i,a;if(o(t)?S?i=s:a=c:C(t)?I?i=f:(i=g,a=h):b(t)&&(i=m),i){var l=i(e,t,n);if(l){var u=N.getPooled(O.change,l,r);return x.accumulateTwoPhaseDispatches(u),u}}a&&a(e,t,n)}};e.exports=j},function(e,t){"use strict";var n=0,o={createReactRootIndex:function(){return n++}};e.exports=o},function(e,t,n){(function(t){"use strict";function o(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r=n(139),i=n(91),a=n(207),l=n(2),s={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:a,processUpdates:function(e,n){for(var s,c=null,u=null,p=0;p<e.length;p++)if(s=e[p],s.type===i.MOVE_EXISTING||s.type===i.REMOVE_NODE){var d=s.fromIndex,f=s.parentNode.childNodes[d],h=s.parentID;"production"!==t.env.NODE_ENV?l(f,"processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",d,h):l(f),c=c||{},c[h]=c[h]||[],c[h][d]=f,u=u||[],u.push(f)}var g=r.dangerouslyRenderMarkup(n);if(u)for(var b=0;b<u.length;b++)u[b].parentNode.removeChild(u[b]);for(var m=0;m<e.length;m++)switch(s=e[m],s.type){case i.INSERT_MARKUP:o(s.parentNode,g[s.markupIndex],s.toIndex);break;case i.MOVE_EXISTING:o(s.parentNode,c[s.parentID][s.fromIndex],s.toIndex);break;case i.TEXT_CONTENT:a(s.parentNode,s.textContent);break;case i.REMOVE_NODE:}}};e.exports=s}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){return e.substring(1,e.indexOf(" "))}var r=n(6),i=n(191),a=n(17),l=n(101),s=n(2),c=/^(<[^ \/>]+)/,u="data-danger-index",p={dangerouslyRenderMarkup:function(e){"production"!==t.env.NODE_ENV?s(r.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):s(r.canUseDOM);for(var n,p={},d=0;d<e.length;d++)"production"!==t.env.NODE_ENV?s(e[d],"dangerouslyRenderMarkup(...): Missing markup."):s(e[d]),n=o(e[d]),n=l(n)?n:"*",p[n]=p[n]||[],p[n][d]=e[d];var f=[],h=0;for(n in p)if(p.hasOwnProperty(n)){var g,b=p[n];for(g in b)if(b.hasOwnProperty(g)){var m=b[g];b[g]=m.replace(c,"$1 "+u+'="'+g+'" ')}for(var v=i(b.join(""),a),y=0;y<v.length;++y){var x=v[y];x.hasAttribute&&x.hasAttribute(u)?(g=+x.getAttribute(u),x.removeAttribute(u),"production"!==t.env.NODE_ENV?s(!f.hasOwnProperty(g),"Danger: Assigning to an already-occupied result index."):s(!f.hasOwnProperty(g)),f[g]=x,h+=1):"production"!==t.env.NODE_ENV&&console.error("Danger: Discarding unexpected node:",x)}}return"production"!==t.env.NODE_ENV?s(h===f.length,"Danger: Did not assign to every index of resultList."):s(h===f.length),"production"!==t.env.NODE_ENV?s(f.length===e.length,"Danger: Expected markup to render %s nodes, but rendered %s.",e.length,f.length):s(f.length===e.length),f},dangerouslyReplaceNodeWithMarkup:function(e,n){"production"!==t.env.NODE_ENV?s(r.canUseDOM,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):s(r.canUseDOM),"production"!==t.env.NODE_ENV?s(n,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):s(n),"production"!==t.env.NODE_ENV?s("html"!==e.tagName.toLowerCase(),"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See React.renderToString()."):s("html"!==e.tagName.toLowerCase());var o=i(n,a)[0];e.parentNode.replaceChild(o,e)}};e.exports=p}).call(t,n(1))},function(e,t,n){"use strict";var o=n(18),r=[o({ResponderEventPlugin:null}),o({SimpleEventPlugin:null}),o({TapEventPlugin:null}),o({EnterLeaveEventPlugin:null}),o({ChangeEventPlugin:null}),o({SelectEventPlugin:null}),o({BeforeInputEventPlugin:null}),o({AnalyticsEventPlugin:null}),o({MobileSafariClickEventPlugin:null})];e.exports=r},function(e,t,n){"use strict";var o=n(8),r=n(30),i=n(41),a=n(10),l=n(18),s=o.topLevelTypes,c=a.getFirstReactDOM,u={mouseEnter:{registrationName:l({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:l({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},p=[null,null],d={eventTypes:u,extractEvents:function(e,t,n,o){if(e===s.topMouseOver&&(o.relatedTarget||o.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var l;if(t.window===t)l=t;else{var d=t.ownerDocument;l=d?d.defaultView||d.parentWindow:window}var f,h;if(e===s.topMouseOut?(f=t,h=c(o.relatedTarget||o.toElement)||l):(f=l,h=t),f===h)return null;var g=f?a.getID(f):"",b=h?a.getID(h):"",m=i.getPooled(u.mouseLeave,g,o);m.type="mouseleave",m.target=f,m.relatedTarget=h;var v=i.getPooled(u.mouseEnter,b,o);return v.type="mouseenter",v.target=h,v.relatedTarget=f,r.accumulateEnterLeaveDispatches(m,v,g,b),p[0]=m,p[1]=v,p}};e.exports=d},function(e,t,n){(function(t){var o=n(17),r={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,n,r){return e.addEventListener?(e.addEventListener(n,r,!0),{remove:function(){e.removeEventListener(n,r,!0)}}):("production"!==t.env.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:o})},registerDefault:function(){}};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";function o(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var r=n(13),i=n(3),a=n(102);i(o.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,o=n.length,r=this.getText(),i=r.length;for(e=0;o>e&&n[e]===r[e];e++);var a=o-e;for(t=1;a>=t&&n[o-t]===r[i-t];t++);var l=t>1?1-t:void 0;return this._fallbackText=r.slice(e,l),this._fallbackText}}),r.addPoolingTo(o),e.exports=o},function(e,t,n){"use strict";var o,r=n(20),i=n(6),a=r.injection.MUST_USE_ATTRIBUTE,l=r.injection.MUST_USE_PROPERTY,s=r.injection.HAS_BOOLEAN_VALUE,c=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,p=r.injection.HAS_POSITIVE_NUMERIC_VALUE,d=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;o=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|s,allowTransparency:a,alt:null,async:s,autoComplete:null,autoPlay:s,cellPadding:null,cellSpacing:null,charSet:a,checked:l|s,classID:a,className:o?a:l,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:l|s,coords:null,crossOrigin:null,data:null,dateTime:a,defer:s,dir:null,disabled:a|s,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:s,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:l,label:null,lang:null,list:a,loop:l|s,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:l|s,muted:l|s,name:null,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:l|s,rel:null,required:s,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:a|s,selected:l|s,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:l,srcSet:a,start:u,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:l|c,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|s,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var o=n(8),r=n(17),i=o.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,o){if(e===i.topTouchStart){var a=o.target;a&&!a.onclick&&(a.onclick=r)}}};e.exports=a},function(e,t,n){(function(t){"use strict";var o=n(49),r=n(148),i=n(86),a=n(9),l=n(54),s=n(15),c=n(5),u=n(31),p=n(150),d=n(88),f=n(161),h=n(24),g=n(10),b=n(16),m=n(92),v=n(26),y=n(172),x=n(3),E=n(97),w=n(203);f.inject();var N=c.createElement,k=c.createFactory,C=c.cloneElement;"production"!==t.env.NODE_ENV&&(N=u.createElement,k=u.createFactory,C=u.cloneElement);var _=b.measure("React","render",g.render),D={Children:{map:r.map,forEach:r.forEach,count:r.count,only:w},Component:i,DOM:p,PropTypes:m,initializeTouchEvents:function(e){o.useTouchEvents=e},createClass:a.createClass,createElement:N,cloneElement:C,createFactory:k,createMixin:function(e){return e},constructAndRenderComponent:g.constructAndRenderComponent,constructAndRenderComponentByID:g.constructAndRenderComponentByID,findDOMNode:E,render:_,renderToString:y.renderToString,renderToStaticMarkup:y.renderToStaticMarkup,unmountComponentAtNode:g.unmountComponentAtNode,isValidElement:c.isValidElement,withContext:l.withContext,__spread:x};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:s,InstanceHandles:h,Mount:g,Reconciler:v,TextComponent:d}),"production"!==t.env.NODE_ENV){var O=n(6);if(O.canUseDOM&&window.top===window.self){navigator.userAgent.indexOf("Chrome")>-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: https://fb.me/react-devtools");for(var T=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],R=0;R<T.length;R++)if(!T[R]){console.error("One or more ES5 shim/shams expected by React are not available: https://fb.me/react-warning-polyfills");break}}}D.version="0.13.3",e.exports=D}).call(t,n(1))},function(e,t,n){"use strict";var o=n(26),r=n(193),i=n(65),a=n(68),l={instantiateChildren:function(e,t,n){var o=r(e);for(var a in o)if(o.hasOwnProperty(a)){var l=o[a],s=i(l,null);o[a]=s}return o},updateChildren:function(e,t,n,l){var s=r(t);if(!s&&!e)return null;var c;for(c in s)if(s.hasOwnProperty(c)){var u=e&&e[c],p=u&&u._currentElement,d=s[c];if(a(p,d))o.receiveComponent(u,d,n,l),s[c]=u;else{u&&o.unmountComponent(u,c);var f=i(d,null);s[c]=f}}for(c in e)!e.hasOwnProperty(c)||s&&s.hasOwnProperty(c)||o.unmountComponent(e[c]);return s},unmountChildren:function(e){for(var t in e){var n=e[t];o.unmountComponent(n)}}};e.exports=l},function(e,t,n){(function(t){"use strict";function o(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,o){var r=e;r.forEachFunction.call(r.forEachContext,t,o)}function i(e,t,n){if(null==e)return e;var i=o.getPooled(t,n);f(e,r,i),o.release(i)}function a(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function l(e,n,o,r){var i=e,a=i.mapResult,l=!a.hasOwnProperty(o);if("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?h(l,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",o):null),l){var s=i.mapFunction.call(i.mapContext,n,r);a[o]=s}}function s(e,t,n){if(null==e)return e;var o={},r=a.getPooled(o,t,n);return f(e,l,r),a.release(r),d.create(o)}function c(e,t,n,o){return null}function u(e,t){return f(e,c,null)}var p=n(13),d=n(38),f=n(105),h=n(4),g=p.twoArgumentPooler,b=p.threeArgumentPooler;p.addPoolingTo(o,g),p.addPoolingTo(a,b);var m={forEach:i,map:s,count:u};e.exports=m}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var r=n(53),i=n(54),a=n(15),l=n(5),s=n(31),c=n(25),u=n(57),p=n(39),d=n(16),f=n(58),h=n(40),g=n(26),b=n(11),m=n(3),v=n(43),y=n(2),x=n(68),E=n(4),w=1,N={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,n,o){this._context=o,this._mountOrder=w++,this._rootNodeID=e;var r=this._processProps(this._currentElement.props),i=this._processContext(this._currentElement._context),a=p.getComponentClassForElement(this._currentElement),l=new a(r,i);"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E(null!=l.render,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.",a.displayName||a.name||"Component"):null),l.props=r,l.context=i,l.refs=v,this._instance=l,c.set(l,this),"production"!==t.env.NODE_ENV&&this._warnIfContextsDiffer(this._currentElement._context,o),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E(!l.getInitialState||l.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!l.getDefaultProps||l.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!l.propTypes,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E(!l.contextTypes,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",this.getName()||"a component"):null,"production"!==t.env.NODE_ENV?E("function"!=typeof l.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",this.getName()||"A component"):null);var s=l.state;void 0===s&&(l.state=s=null),"production"!==t.env.NODE_ENV?y("object"==typeof s&&!Array.isArray(s),"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):y("object"==typeof s&&!Array.isArray(s)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var d,f,h=u.currentlyMountingInstance;u.currentlyMountingInstance=this;try{l.componentWillMount&&(l.componentWillMount(),this._pendingStateQueue&&(l.state=this._processPendingState(l.props,l.context))),d=this._getValidatedChildContext(o),f=this._renderValidatedComponent(d)}finally{u.currentlyMountingInstance=h}this._renderedComponent=this._instantiateReactComponent(f,this._currentElement.type);var b=g.mountComponent(this._renderedComponent,e,n,this._mergeChildContext(o,d));return l.componentDidMount&&n.getReactMountReady().enqueue(l.componentDidMount,l),b},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=u.currentlyUnmountingInstance;u.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{u.currentlyUnmountingInstance=t}}g.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,c.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=l.cloneAndReplaceProps(n,m({},n.props,e)),b.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return v;var n=this._currentElement.type.contextTypes;if(!n)return v;t={};for(var o in n)t[o]=e[o];return t},_processContext:function(e){var n=this._maskContext(e);if("production"!==t.env.NODE_ENV){var o=p.getComponentClassForElement(this._currentElement);o.contextTypes&&this._checkPropTypes(o.contextTypes,n,f.context)}return n},_getValidatedChildContext:function(e){var n=this._instance,o=n.getChildContext&&n.getChildContext();if(o){"production"!==t.env.NODE_ENV?y("object"==typeof n.constructor.childContextTypes,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",this.getName()||"ReactCompositeComponent"):y("object"==typeof n.constructor.childContextTypes),"production"!==t.env.NODE_ENV&&this._checkPropTypes(n.constructor.childContextTypes,o,f.childContext);for(var r in o)"production"!==t.env.NODE_ENV?y(r in n.constructor.childContextTypes,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",r):y(r in n.constructor.childContextTypes);return o}return null},_mergeChildContext:function(e,t){return t?m({},e,t):e},_processProps:function(e){if("production"!==t.env.NODE_ENV){var n=p.getComponentClassForElement(this._currentElement);n.propTypes&&this._checkPropTypes(n.propTypes,e,f.prop)}return e},_checkPropTypes:function(e,n,r){var i=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var l;try{"production"!==t.env.NODE_ENV?y("function"==typeof e[a],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",i||"React class",h[r],a):y("function"==typeof e[a]),l=e[a](n,a,i,r)}catch(s){l=s}if(l instanceof Error){var c=o(this);r===f.prop?"production"!==t.env.NODE_ENV?E(!1,"Failed Composite propType: %s%s",l.message,c):null:"production"!==t.env.NODE_ENV?E(!1,"Failed Context Types: %s%s",l.message,c):null}}},receiveComponent:function(e,t,n){var o=this._currentElement,r=this._context;this._pendingElement=null,this.updateComponent(t,o,e,r,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&g.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&("production"!==t.env.NODE_ENV&&s.checkAndWarnForMutatedProps(this._currentElement),this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context))},_warnIfContextsDiffer:function(e,n){e=this._maskContext(e),n=this._maskContext(n);for(var o=Object.keys(n).sort(),r=this.getName()||"ReactCompositeComponent",i=0;i<o.length;i++){var a=o[i];"production"!==t.env.NODE_ENV?E(e[a]===n[a],"owner-based and parent-based contexts differ (values: `%s` vs `%s`) for key (%s) while mounting %s (see: http://fb.me/react-context-by-parent)",e[a],n[a],a,r):null}},updateComponent:function(e,n,o,r,i){var a=this._instance,l=a.context,s=a.props;n!==o&&(l=this._processContext(o._context),s=this._processProps(o.props),"production"!==t.env.NODE_ENV&&null!=i&&this._warnIfContextsDiffer(o._context,i),a.componentWillReceiveProps&&a.componentWillReceiveProps(s,l));var c=this._processPendingState(s,l),u=this._pendingForceUpdate||!a.shouldComponentUpdate||a.shouldComponentUpdate(s,c,l);"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?E("undefined"!=typeof u,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",this.getName()||"ReactCompositeComponent"):null),u?(this._pendingForceUpdate=!1,this._performComponentUpdate(o,s,c,l,e,i)):(this._currentElement=o,this._context=i,a.props=s,a.state=c,a.context=l)},_processPendingState:function(e,t){var n=this._instance,o=this._pendingStateQueue,r=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!o)return n.state;if(r&&1===o.length)return o[0];for(var i=m({},r?o[0]:n.state),a=r?1:0;a<o.length;a++){var l=o[a];m(i,"function"==typeof l?l.call(n,i,e,t):l)}return i},_performComponentUpdate:function(e,t,n,o,r,i){var a=this._instance,l=a.props,s=a.state,c=a.context;a.componentWillUpdate&&a.componentWillUpdate(t,n,o),this._currentElement=e,this._context=i,a.props=t,a.state=n,a.context=o,this._updateRenderedComponent(r,i),a.componentDidUpdate&&r.getReactMountReady().enqueue(a.componentDidUpdate.bind(a,l,s,c),a)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,o=n._currentElement,r=this._getValidatedChildContext(),i=this._renderValidatedComponent(r);if(x(o,i))g.receiveComponent(n,i,e,this._mergeChildContext(t,r));else{var a=this._rootNodeID,l=n._rootNodeID;g.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i,this._currentElement.type);var s=g.mountComponent(this._renderedComponent,a,e,this._mergeChildContext(t,r));this._replaceNodeWithMarkupByID(l,s)}},_replaceNodeWithMarkupByID:function(e,t){r.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,n=e.render();return"production"!==t.env.NODE_ENV&&"undefined"==typeof n&&e.render._isMockFunction&&(n=null),n},_renderValidatedComponent:function(e){var n,o=i.current;i.current=this._mergeChildContext(this._currentElement._context,e),a.current=this;try{n=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=o,a.current=null}return"production"!==t.env.NODE_ENV?y(null===n||n===!1||l.isValidElement(n),"%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.",this.getName()||"ReactCompositeComponent"):y(null===n||n===!1||l.isValidElement(n)),n},attachRef:function(e,t){var n=this.getPublicInstance(),o=n.refs===v?n.refs={}:n.refs;o[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};d.measureMethods(N,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var k={Mixin:N};e.exports=k}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function o(e){return"production"!==t.env.NODE_ENV?i.createFactory(e):r.createFactory(e)}var r=n(5),i=n(31),a=n(201),l=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",
figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},o);e.exports=l}).call(t,n(1))},function(e,t,n){"use strict";var o=n(37),r=n(14),i=n(9),a=n(5),l=n(33),s=a.createFactory("button"),c=l({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),u=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[o,r],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&c[t]||(e[t]=this.props[t]);return s(e,this.props.children)}});e.exports=u},function(e,t,n){"use strict";var o=n(8),r=n(51),i=n(14),a=n(9),l=n(5),s=l.createFactory("form"),c=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(o.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(o.topLevelTypes.topSubmit,"submit")}});e.exports=c},function(e,t,n){"use strict";var o=n(8),r=n(51),i=n(14),a=n(9),l=n(5),s=l.createFactory("iframe"),c=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(o.topLevelTypes.topLoad,"load")}});e.exports=c},function(e,t,n){"use strict";var o=n(8),r=n(51),i=n(14),a=n(9),l=n(5),s=l.createFactory("img"),c=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(o.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(o.topLevelTypes.topError,"error")}});e.exports=c},function(e,t,n){(function(t){"use strict";function o(){this.isMounted()&&this.forceUpdate()}var r=n(37),i=n(28),a=n(50),l=n(14),s=n(9),c=n(5),u=n(10),p=n(11),d=n(3),f=n(2),h=c.createFactory("input"),g={},b=s.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[r,a.Mixin,l],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=d({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,h(e,this.props.children)},componentDidMount:function(){var e=u.getID(this.getDOMNode());g[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=u.getID(e);delete g[t]},componentDidUpdate:function(e,t,n){var o=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(o,"checked",this.props.checked||!1);var r=a.getValue(this);null!=r&&i.setValueForProperty(o,"value",""+r)},_handleChange:function(e){var n,r=a.getOnChange(this);r&&(n=r.call(this,e)),p.asap(o,this);var i=this.props.name;if("radio"===this.props.type&&null!=i){for(var l=this.getDOMNode(),s=l;s.parentNode;)s=s.parentNode;for(var c=s.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),d=0,h=c.length;h>d;d++){var b=c[d];if(b!==l&&b.form===l.form){var m=u.getID(b);"production"!==t.env.NODE_ENV?f(m,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."):f(m);var v=g[m];"production"!==t.env.NODE_ENV?f(v,"ReactDOMInput: Unknown radio button ID %s.",m):f(v),p.asap(o,v)}}}return n}});e.exports=b}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var o=n(14),r=n(9),i=n(5),a=n(4),l=i.createFactory("option"),s=r.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[o],componentWillMount:function(){"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null==this.props.selected,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."):null)},render:function(){return l(this.props,this.props.children)}});e.exports=s}).call(t,n(1))},function(e,t,n){"use strict";function o(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=l.getValue(this);null!=e&&this.isMounted()&&i(this,e)}}function r(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function i(e,t){var n,o,r,i=e.getDOMNode().options;if(e.props.multiple){for(n={},o=0,r=t.length;r>o;o++)n[""+t[o]]=!0;for(o=0,r=i.length;r>o;o++){var a=n.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(n=""+t,o=0,r=i.length;r>o;o++)if(i[o].value===n)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}var a=n(37),l=n(50),s=n(14),c=n(9),u=n(5),p=n(11),d=n(3),f=u.createFactory("select"),h=c.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[a,l.Mixin,s],propTypes:{defaultValue:r,value:r},render:function(){var e=d({},this.props);return e.onChange=this._handleChange,e.value=null,f(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=l.getValue(this);null!=e?i(this,e):null!=this.props.defaultValue&&i(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=l.getValue(this);null!=t?(this._pendingUpdate=!1,i(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?i(this,this.props.defaultValue):i(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,n=l.getOnChange(this);return n&&(t=n.call(this,e)),this._pendingUpdate=!0,p.asap(o,this),t}});e.exports=h},function(e,t,n){"use strict";function o(e,t,n,o){return e===n&&t===o}function r(e){var t=document.selection,n=t.createRange(),o=n.text.length,r=n.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",n);var i=r.text.length,a=i+o;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,i=t.focusNode,a=t.focusOffset,l=t.getRangeAt(0),s=o(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=s?0:l.toString().length,u=l.cloneRange();u.selectNodeContents(e),u.setEnd(l.startContainer,l.startOffset);var p=o(u.startContainer,u.startOffset,u.endContainer,u.endOffset),d=p?0:u.toString().length,f=d+c,h=document.createRange();h.setStart(n,r),h.setEnd(i,a);var g=h.collapsed;return{start:g?f:d,end:g?d:f}}function a(e,t){var n,o,r=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,o=n):t.start>t.end?(n=t.end,o=t.start):(n=t.start,o=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function l(e,t){if(window.getSelection){var n=window.getSelection(),o=e[u()].length,r=Math.min(t.start,o),i="undefined"==typeof t.end?r:Math.min(t.end,o);if(!n.extend&&r>i){var a=i;i=r,r=a}var l=c(e,r),s=c(e,i);if(l&&s){var p=document.createRange();p.setStart(l.node,l.offset),n.removeAllRanges(),r>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(6),c=n(195),u=n(102),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?r:i,setOffsets:p?a:l};e.exports=d},function(e,t,n){(function(t){"use strict";function o(){this.isMounted()&&this.forceUpdate()}var r=n(37),i=n(28),a=n(50),l=n(14),s=n(9),c=n(5),u=n(11),p=n(3),d=n(2),f=n(4),h=c.createFactory("textarea"),g=s.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[r,a.Mixin,l],getInitialState:function(){var e=this.props.defaultValue,n=this.props.children;null!=n&&("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?f(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."):null),"production"!==t.env.NODE_ENV?d(null==e,"If you supply `defaultValue` on a <textarea>, do not pass children."):d(null==e),Array.isArray(n)&&("production"!==t.env.NODE_ENV?d(n.length<=1,"<textarea> can only have at most one child."):d(n.length<=1),n=n[0]),e=""+n),null==e&&(e="");var o=a.getValue(this);return{initialValue:""+(null!=o?o:e)}},render:function(){var e=p({},this.props);return"production"!==t.env.NODE_ENV?d(null==e.dangerouslySetInnerHTML,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):d(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,h(e,this.state.initialValue)},componentDidUpdate:function(e,t,n){var o=a.getValue(this);if(null!=o){var r=this.getDOMNode();i.setValueForProperty(r,"value",""+o)}},_handleChange:function(e){var t,n=a.getOnChange(this);return n&&(t=n.call(this,e)),u.asap(o,this),t}});e.exports=g}).call(t,n(1))},function(e,t,n){"use strict";function o(){this.reinitializeTransaction()}var r=n(11),i=n(42),a=n(3),l=n(17),s={initialize:l,close:function(){d.isBatchingUpdates=!1}},c={initialize:l,close:r.flushBatchedUpdates.bind(r)},u=[c,s];a(o.prototype,i.Mixin,{getTransactionWrappers:function(){return u}});var p=new o,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,o,r){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,o,r):p.perform(e,null,t,n,o,r)}};e.exports=d},function(e,t,n){(function(t){"use strict";function o(e){return h.createClass({tagName:e.toUpperCase(),render:function(){return new O(e,null,null,null,null,this.props)}})}function r(){if(R.EventEmitter.injectReactEventListener(T),R.EventPluginHub.injectEventPluginOrder(s),R.EventPluginHub.injectInstanceHandle(M),R.EventPluginHub.injectMount(P),R.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:j,EnterLeaveEventPlugin:c,ChangeEventPlugin:a,MobileSafariClickEventPlugin:d,SelectEventPlugin:I,BeforeInputEventPlugin:i}),R.NativeComponent.injectGenericComponentClass(m),R.NativeComponent.injectTextComponentClass(D),R.NativeComponent.injectAutoWrapper(o),R.Class.injectMixin(f),R.NativeComponent.injectComponentClasses({button:v,form:y,iframe:w,img:x,input:N,option:k,select:C,textarea:_,html:V("html"),head:V("head"),body:V("body")}),R.DOMProperty.injectDOMPropertyConfig(p),R.DOMProperty.injectDOMPropertyConfig(L),R.EmptyComponent.injectEmptyComponent("noscript"),R.Updates.injectReconcileTransaction(S),R.Updates.injectBatchingStrategy(b),R.RootIndex.injectCreateReactRootIndex(u.canUseDOM?l.createReactRootIndex:A.createReactRootIndex),R.Component.injectEnvironment(g),R.DOMComponent.injectIDOperations(E),"production"!==t.env.NODE_ENV){var e=u.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(e)){var r=n(162);r.start()}}}var i=n(135),a=n(136),l=n(137),s=n(140),c=n(141),u=n(6),p=n(144),d=n(145),f=n(14),h=n(9),g=n(52),b=n(160),m=n(55),v=n(151),y=n(152),x=n(154),E=n(87),w=n(153),N=n(155),k=n(156),C=n(157),_=n(159),D=n(88),O=n(5),T=n(166),R=n(167),M=n(24),P=n(10),S=n(170),I=n(175),A=n(176),j=n(177),L=n(174),V=n(190);e.exports={inject:r}}).call(t,n(1))},function(e,t,n){"use strict";function o(e){return Math.floor(100*e)/100}function r(e,t,n){e[t]=(e[t]||0)+n}var i=n(20),a=n(163),l=n(10),s=n(16),c=n(205),u={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){u._injected||s.injection.injectMeasure(u.measure),u._allMeasurements.length=0,s.enableMeasure=!0},stop:function(){s.enableMeasure=!1},getLastMeasurements:function(){return u._allMeasurements},printExclusive:function(e){e=e||u._allMeasurements;var t=a.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":o(e.inclusive),"Exclusive mount time (ms)":o(e.exclusive),"Exclusive render time (ms)":o(e.render),"Mount time per instance (ms)":o(e.exclusive/e.count),"Render time per instance (ms)":o(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||u._allMeasurements;var t=a.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":o(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||u._allMeasurements,console.table(u.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||u._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[i.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,o){var r=u._allMeasurements[u._allMeasurements.length-1].writes;r[e]=r[e]||[],r[e].push({type:t,time:n,args:o})},measure:function(e,t,n){return function(){for(var o=[],i=0,a=arguments.length;a>i;i++)o.push(arguments[i]);var s,p,d;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return u._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),d=c(),p=n.apply(this,o),u._allMeasurements[u._allMeasurements.length-1].totalTime=c()-d,p;if("_mountImageIntoNode"===t||"ReactDOMIDOperations"===e){if(d=c(),p=n.apply(this,o),s=c()-d,"_mountImageIntoNode"===t){var f=l.getID(o[1]);u._recordWrite(f,t,s,o[0])}else"dangerouslyProcessChildrenUpdates"===t?o[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=o[1][e.markupIndex]),u._recordWrite(e.parentID,e.type,s,t)}):u._recordWrite(o[0],t,s,Array.prototype.slice.call(o,1));return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,o);if("string"==typeof this._currentElement.type)return n.apply(this,o);var h="mountComponent"===t?o[0]:this._rootNodeID,g="_renderValidatedComponent"===t,b="mountComponent"===t,m=u._mountStack,v=u._allMeasurements[u._allMeasurements.length-1];if(g?r(v.counts,h,1):b&&m.push(0),d=c(),p=n.apply(this,o),s=c()-d,g)r(v.render,h,s);else if(b){var y=m.pop();m[m.length-1]+=s,r(v.exclusive,h,s-y),r(v.inclusive,h,s)}else r(v.inclusive,h,s);return v.displayNames[h]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},p}}};e.exports=u},function(e,t,n){function o(e){for(var t=0,n=0;n<e.length;n++){var o=e[n];t+=o.totalTime}return t}function r(e){for(var t=[],n=0;n<e.length;n++){var o,r=e[n];for(o in r.writes)r.writes[o].forEach(function(e){t.push({id:o,type:u[e.type]||e.type,args:e.args})})}return t}function i(e){for(var t,n={},o=0;o<e.length;o++){var r=e[o],i=s({},r.exclusive,r.inclusive);for(var a in i)t=r.displayNames[a].current,n[t]=n[t]||{componentName:t,inclusive:0,exclusive:0,render:0,count:0},r.render[a]&&(n[t].render+=r.render[a]),r.exclusive[a]&&(n[t].exclusive+=r.exclusive[a]),r.inclusive[a]&&(n[t].inclusive+=r.inclusive[a]),r.counts[a]&&(n[t].count+=r.counts[a])}var l=[];for(t in n)n[t].exclusive>=c&&l.push(n[t]);return l.sort(function(e,t){return t.exclusive-e.exclusive}),l}function a(e,t){for(var n,o={},r=0;r<e.length;r++){var i,a=e[r],u=s({},a.exclusive,a.inclusive);t&&(i=l(a));for(var p in u)if(!t||i[p]){var d=a.displayNames[p];n=d.owner+" > "+d.current,o[n]=o[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(o[n].time+=a.inclusive[p]),a.counts[p]&&(o[n].count+=a.counts[p])}}var f=[];for(n in o)o[n].time>=c&&f.push(o[n]);return f.sort(function(e,t){return t.time-e.time}),f}function l(e){var t={},n=Object.keys(e.writes),o=s({},e.exclusive,e.inclusive);for(var r in o){for(var i=!1,a=0;a<n.length;a++)if(0===n[a].indexOf(r)){i=!0;break}!i&&e.counts[r]>0&&(t[r]=!0)}return t}var s=n(3),c=1.2,u={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:i,getInclusiveSummary:a,getDOMSummary:r,getTotalTime:o};e.exports=p},function(e,t){"use strict";var n={guard:function(e,t){return e}};e.exports=n},function(e,t,n){"use strict";function o(e){r.enqueueEvents(e),r.processEventQueue()}var r=n(29),i={handleTopLevel:function(e,t,n,i){var a=r.extractEvents(e,t,n,i);o(a)}};e.exports=i},function(e,t,n){"use strict";function o(e){var t=p.getID(e),n=u.getReactRootIDFromNodeID(t),o=p.findReactContainerForID(n),r=p.getFirstReactDOM(o);return r}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){for(var t=p.getFirstReactDOM(h(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=o(n);for(var r=0,i=e.ancestors.length;i>r;r++){t=e.ancestors[r];var a=p.getID(t)||"";b._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function a(e){var t=g(window);e(t)}var l=n(142),s=n(6),c=n(13),u=n(24),p=n(10),d=n(11),f=n(3),h=n(64),g=n(197);f(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(r,c.twoArgumentPooler);var b={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:s.canUseDOM?window:null,setHandleTopLevel:function(e){b._handleTopLevel=e},setEnabled:function(e){b._enabled=!!e},isEnabled:function(){return b._enabled},trapBubbledEvent:function(e,t,n){var o=n;return o?l.listen(o,t,b.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var o=n;return o?l.capture(o,t,b.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);l.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(b._enabled){var n=r.getPooled(e,t);try{d.batchedUpdates(i,n)}finally{r.release(n)}}}};e.exports=b},function(e,t,n){"use strict";var o=n(20),r=n(29),i=n(53),a=n(9),l=n(56),s=n(23),c=n(39),u=n(55),p=n(16),d=n(94),f=n(11),h={Component:i.injection,Class:a.injection,DOMComponent:u.injection,DOMProperty:o.injection,EmptyComponent:l.injection,EventPluginHub:r.injection,EventEmitter:s.injection,NativeComponent:c.injection,Perf:p.injection,RootIndex:d.injection,Updates:f.injection};e.exports=h},function(e,t,n){"use strict";function o(e,t,n){h.push({parentID:e,parentNode:null,type:u.INSERT_MARKUP,markupIndex:g.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function r(e,t,n){h.push({parentID:e,parentNode:null,type:u.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){h.push({parentID:e,parentNode:null,type:u.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){h.push({parentID:e,parentNode:null,type:u.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function l(){h.length&&(c.processChildrenUpdates(h,g),s())}function s(){h.length=0,g.length=0}var c=n(53),u=n(91),p=n(26),d=n(147),f=0,h=[],g=[],b={Mixin:{mountChildren:function(e,t,n){var o=d.instantiateChildren(e,t,n);this._renderedChildren=o;var r=[],i=0;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a],s=this._rootNodeID+a,c=p.mountComponent(l,s,t,n);l._mountIndex=i,r.push(c),i++}return r},updateTextContent:function(e){f++;var t=!0;try{var n=this._renderedChildren;d.unmountChildren(n);for(var o in n)n.hasOwnProperty(o)&&this._unmountChildByName(n[o],o);this.setTextContent(e),t=!1}finally{f--,f||(t?s():l())}},updateChildren:function(e,t,n){f++;var o=!0;try{this._updateChildren(e,t,n),o=!1}finally{f--,f||(o?s():l())}},_updateChildren:function(e,t,n){var o=this._renderedChildren,r=d.updateChildren(o,e,t,n);if(this._renderedChildren=r,r||o){var i,a=0,l=0;for(i in r)if(r.hasOwnProperty(i)){var s=o&&o[i],c=r[i];s===c?(this.moveChild(s,l,a),a=Math.max(s._mountIndex,a),s._mountIndex=l):(s&&(a=Math.max(s._mountIndex,a),this._unmountChildByName(s,i)),this._mountChildByNameAtIndex(c,i,l,t,n)),l++}for(i in o)!o.hasOwnProperty(i)||r&&r.hasOwnProperty(i)||this._unmountChildByName(o[i],i)}},unmountChildren:function(){var e=this._renderedChildren;d.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&r(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){o(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){i(this._rootNodeID,e._mountIndex)},setTextContent:function(e){a(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,o,r){var i=this._rootNodeID+t,a=p.mountComponent(e,i,o,r);e._mountIndex=n,this.createChild(e,a)},_unmountChildByName:function(e,t){this.removeChild(e),e._mountIndex=null}}};e.exports=b},function(e,t,n){(function(t){"use strict";var o=n(2),r={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,n,i){"production"!==t.env.NODE_ENV?o(r.isValidOwner(i),"addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):o(r.isValidOwner(i)),i.attachRef(n,e)},removeComponentAsRefFrom:function(e,n,i){"production"!==t.env.NODE_ENV?o(r.isValidOwner(i),"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):o(r.isValidOwner(i)),i.getPublicInstance().refs[n]===e.getPublicInstance()&&i.detachRef(n)}};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";function o(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=r.getPooled(null),this.putListenerQueue=s.getPooled()}var r=n(48),i=n(13),a=n(23),l=n(89),s=n(93),c=n(42),u=n(3),p={initialize:l.getSelectionInformation,close:l.restoreSelection},d={initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},g=[h,p,d,f],b={getTransactionWrappers:function(){return g},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){r.release(this.reactMountReady),this.reactMountReady=null,s.release(this.putListenerQueue),this.putListenerQueue=null}};u(o.prototype,c.Mixin,b),i.addPoolingTo(o),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function r(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(169),a={};a.attachRefs=function(e,t){var n=t.ref;null!=n&&o(n,e,t._owner)},a.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},e.exports=a},function(e,t,n){(function(t){"use strict";function o(e){"production"!==t.env.NODE_ENV?p(i.isValidElement(e),"renderToString(): You must pass a valid ReactElement."):p(i.isValidElement(e));var n;try{var o=a.createReactRootID();return n=s.getPooled(!1),n.perform(function(){var t=u(e,null),r=t.mountComponent(o,n,c);return l.addChecksumToMarkup(r)},null)}finally{s.release(n)}}function r(e){"production"!==t.env.NODE_ENV?p(i.isValidElement(e),"renderToStaticMarkup(): You must pass a valid ReactElement."):p(i.isValidElement(e));var n;try{var o=a.createReactRootID();return n=s.getPooled(!0),n.perform(function(){var t=u(e,null);return t.mountComponent(o,n,c)},null)}finally{s.release(n)}}var i=n(5),a=n(24),l=n(90),s=n(173),c=n(43),u=n(65),p=n(2);e.exports={renderToString:o,renderToStaticMarkup:r}}).call(t,n(1))},function(e,t,n){"use strict";function o(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var r=n(13),i=n(48),a=n(93),l=n(42),s=n(3),c=n(17),u={initialize:function(){this.reactMountReady.reset()},close:c},p={initialize:function(){this.putListenerQueue.reset()},close:c},d=[p,u],f={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};s(o.prototype,l.Mixin,f),r.addPoolingTo(o),e.exports=o},function(e,t,n){"use strict";var o=n(20),r=o.injection.MUST_USE_ATTRIBUTE,i={Properties:{clipPath:r,cx:r,cy:r,d:r,dx:r,dy:r,fill:r,fillOpacity:r,fontFamily:r,fontSize:r,fx:r,fy:r,gradientTransform:r,gradientUnits:r,markerEnd:r,markerMid:r,markerStart:r,offset:r,opacity:r,patternContentUnits:r,patternUnits:r,points:r,preserveAspectRatio:r,r:r,rx:r,ry:r,spreadMethod:r,stopColor:r,stopOpacity:r,stroke:r,strokeDasharray:r,strokeLinecap:r,strokeOpacity:r,strokeWidth:r,textAnchor:r,transform:r,version:r,viewBox:r,x1:r,x2:r,x:r,y1:r,y2:r,y:r},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};e.exports=i},function(e,t,n){"use strict";function o(e){if("selectionStart"in e&&l.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e){if(v||null==g||g!==c())return null;var t=o(g);if(!m||!d(m,t)){m=t;var n=s.getPooled(h.select,b,e);return n.type="select",n.target=g,a.accumulateTwoPhaseDispatches(n),n}}var i=n(8),a=n(30),l=n(89),s=n(21),c=n(99),u=n(104),p=n(18),d=n(208),f=i.topLevelTypes,h={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[f.topBlur,f.topContextMenu,f.topFocus,f.topKeyDown,f.topMouseDown,f.topMouseUp,f.topSelectionChange]}},g=null,b=null,m=null,v=!1,y={eventTypes:h,extractEvents:function(e,t,n,o){switch(e){case f.topFocus:(u(t)||"true"===t.contentEditable)&&(g=t,b=n,m=null);break;case f.topBlur:g=null,b=null,m=null;break;case f.topMouseDown:v=!0;break;case f.topContextMenu:case f.topMouseUp:return v=!1,r(o);case f.topSelectionChange:case f.topKeyDown:case f.topKeyUp:return r(o)}}};e.exports=y},function(e,t){"use strict";var n=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};e.exports=o},function(e,t,n){(function(t){"use strict";var o=n(8),r=n(49),i=n(30),a=n(178),l=n(21),s=n(181),c=n(183),u=n(41),p=n(180),d=n(184),f=n(32),h=n(185),g=n(62),b=n(2),m=n(18),v=n(4),y=o.topLevelTypes,x={blur:{phasedRegistrationNames:{bubbled:m({onBlur:!0}),captured:m({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:m({onClick:!0}),captured:m({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:m({onContextMenu:!0}),captured:m({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:m({onCopy:!0}),captured:m({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:m({onCut:!0}),captured:m({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:m({onDoubleClick:!0}),captured:m({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:m({onDrag:!0}),captured:m({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:m({onDragEnd:!0}),captured:m({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:m({onDragEnter:!0}),captured:m({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:m({onDragExit:!0}),captured:m({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:m({onDragLeave:!0}),captured:m({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:m({onDragOver:!0}),captured:m({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:m({onDragStart:!0}),captured:m({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:m({onDrop:!0}),captured:m({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:m({onFocus:!0}),captured:m({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:m({onInput:!0}),captured:m({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:m({onKeyDown:!0}),captured:m({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:m({onKeyPress:!0}),captured:m({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:m({onKeyUp:!0}),captured:m({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:m({onLoad:!0}),captured:m({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:m({onError:!0}),captured:m({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:m({onMouseDown:!0}),captured:m({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:m({onMouseMove:!0}),captured:m({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:m({onMouseOut:!0}),captured:m({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:m({onMouseOver:!0}),captured:m({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:m({onMouseUp:!0}),captured:m({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:m({onPaste:!0}),captured:m({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:m({onReset:!0}),captured:m({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:m({onScroll:!0}),captured:m({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:m({onSubmit:!0}),captured:m({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:m({onTouchCancel:!0}),captured:m({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:m({onTouchEnd:!0}),captured:m({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:m({onTouchMove:!0}),captured:m({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:m({onTouchStart:!0}),captured:m({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:m({onWheel:!0}),captured:m({onWheelCapture:!0})}}},E={topBlur:x.blur,topClick:x.click,topContextMenu:x.contextMenu,
topCopy:x.copy,topCut:x.cut,topDoubleClick:x.doubleClick,topDrag:x.drag,topDragEnd:x.dragEnd,topDragEnter:x.dragEnter,topDragExit:x.dragExit,topDragLeave:x.dragLeave,topDragOver:x.dragOver,topDragStart:x.dragStart,topDrop:x.drop,topError:x.error,topFocus:x.focus,topInput:x.input,topKeyDown:x.keyDown,topKeyPress:x.keyPress,topKeyUp:x.keyUp,topLoad:x.load,topMouseDown:x.mouseDown,topMouseMove:x.mouseMove,topMouseOut:x.mouseOut,topMouseOver:x.mouseOver,topMouseUp:x.mouseUp,topPaste:x.paste,topReset:x.reset,topScroll:x.scroll,topSubmit:x.submit,topTouchCancel:x.touchCancel,topTouchEnd:x.touchEnd,topTouchMove:x.touchMove,topTouchStart:x.touchStart,topWheel:x.wheel};for(var w in E)E[w].dependencies=[w];var N={eventTypes:x,executeDispatch:function(e,n,o){var i=r.executeDispatch(e,n,o);"production"!==t.env.NODE_ENV?v("boolean"!=typeof i,"Returning `false` from an event handler is deprecated and will be ignored in a future release. Instead, manually call e.stopPropagation() or e.preventDefault(), as appropriate."):null,i===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,n,o,r){var m=E[e];if(!m)return null;var v;switch(e){case y.topInput:case y.topLoad:case y.topError:case y.topReset:case y.topSubmit:v=l;break;case y.topKeyPress:if(0===g(r))return null;case y.topKeyDown:case y.topKeyUp:v=c;break;case y.topBlur:case y.topFocus:v=s;break;case y.topClick:if(2===r.button)return null;case y.topContextMenu:case y.topDoubleClick:case y.topMouseDown:case y.topMouseMove:case y.topMouseOut:case y.topMouseOver:case y.topMouseUp:v=u;break;case y.topDrag:case y.topDragEnd:case y.topDragEnter:case y.topDragExit:case y.topDragLeave:case y.topDragOver:case y.topDragStart:case y.topDrop:v=p;break;case y.topTouchCancel:case y.topTouchEnd:case y.topTouchMove:case y.topTouchStart:v=d;break;case y.topScroll:v=f;break;case y.topWheel:v=h;break;case y.topCopy:case y.topCut:case y.topPaste:v=a}"production"!==t.env.NODE_ENV?b(v,"SimpleEventPlugin: Unhandled event type, `%s`.",e):b(v);var x=v.getPooled(m,o,r);return i.accumulateTwoPhaseDispatches(x),x}};e.exports=N}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(21),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(21),i={data:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(41),i={dataTransfer:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(32),i={relatedTarget:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(21),i={data:null};r.augmentClass(o,i),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(32),i=n(62),a=n(194),l=n(63),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:l,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(o,s),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(32),i=n(63),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};r.augmentClass(o,a),e.exports=o},function(e,t,n){"use strict";function o(e,t,n){r.call(this,e,t,n)}var r=n(41),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(o,i),e.exports=o},function(e,t){"use strict";function n(e){for(var t=1,n=0,r=0;r<e.length;r++)t=(t+e.charCodeAt(r))%o,n=(n+t)%o;return t|n<<16}var o=65521;e.exports=n},function(e,t){function n(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function o(e){return r(e.replace(i,"ms-"))}var r=n(187),i=/^-ms-/;e.exports=o},function(e,t,n){function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function r(e){return o(e)?Array.isArray(e)?e.slice():i(e):[e]}var i=n(209);e.exports=r},function(e,t,n){(function(t){"use strict";function o(e){var n=i.createFactory(e),o=r.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){"production"!==t.env.NODE_ENV?a(!1,"%s tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this.constructor.displayName):a(!1)},render:function(){return n(this.props)}});return o}var r=n(9),i=n(5),a=n(2);e.exports=o}).call(t,n(1))},function(e,t,n){(function(t){function o(e){var t=e.match(u);return t&&t[1].toLowerCase()}function r(e,n){var r=c;"production"!==t.env.NODE_ENV?s(!!c,"createNodesFromMarkup dummy not initialized"):s(!!c);var i=o(e),u=i&&l(i);if(u){r.innerHTML=u[1]+e+u[2];for(var p=u[0];p--;)r=r.lastChild}else r.innerHTML=e;var d=r.getElementsByTagName("script");d.length&&("production"!==t.env.NODE_ENV?s(n,"createNodesFromMarkup(...): Unexpected <script> element rendered."):s(n),a(d).forEach(n));for(var f=a(r.childNodes);r.lastChild;)r.removeChild(r.lastChild);return f}var i=n(6),a=n(189),l=n(101),s=n(2),c=i.canUseDOM?document.createElement("div"):null,u=/^\s*<(\w+)/;e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";function o(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var o=isNaN(t);return o||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var r=n(83),i=r.isUnitlessNumber;e.exports=o},function(e,t,n){(function(t){"use strict";function o(e,n,o){var r=e,i=!r.hasOwnProperty(o);"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(i,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",o):null),i&&null!=n&&(r[o]=n)}function r(e){if(null==e)return e;var t={};return i(e,o,t),t}var i=n(105),a=n(4);e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";function o(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var r=n(62),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=o},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),i=0,a=0;r;){if(3===r.nodeType){if(a=i+r.textContent.length,t>=i&&a>=t)return{node:r,offset:t-i};i=a}r=n(o(r))}}e.exports=r},function(e,t){"use strict";function n(e){return e?e.nodeType===o?e.documentElement:e.firstChild:null}var o=9;e.exports=n},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){function n(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function o(e){return r(e).replace(i,"-ms-")}var r=n(198),i=/^ms-/;e.exports=o},function(e,t,n){function o(e){return r(e)&&3==e.nodeType}var r=n(103);e.exports=o},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var r={};for(var i in e)o.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}var o=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){(function(t){"use strict";function o(e){return"production"!==t.env.NODE_ENV?i(r.isValidElement(e),"onlyChild must be passed a children with exactly one child."):i(r.isValidElement(e)),e}var r=n(5),i=n(2);e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";var o,r=n(6);r.canUseDOM&&(o=window.performance||window.msPerformance||window.webkitPerformance),e.exports=o||{}},function(e,t,n){var o=n(204);o&&o.now||(o=Date);var r=o.now.bind(o);e.exports=r},function(e,t,n){"use strict";function o(e){return'"'+r(e)+'"'}var r=n(44);e.exports=o},function(e,t,n){"use strict";var o=n(6),r=n(44),i=n(67),a=function(e,t){e.textContent=t};o.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,r(t))})),e.exports=a},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}e.exports=n},function(e,t,n){(function(t){function o(e){var n=e.length;if("production"!==t.env.NODE_ENV?r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e),"toArray: Array-like object expected"):r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),"production"!==t.env.NODE_ENV?r("number"==typeof n,"toArray: Object needs a length property"):r("number"==typeof n),"production"!==t.env.NODE_ENV?r(0===n||n-1 in e,"toArray: Object should have keys for indices"):r(0===n||n-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(o){}for(var i=Array(n),a=0;n>a;a++)i[a]=e[a];return i}var r=n(2);e.exports=o}).call(t,n(1))},function(e,t,n){function o(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=p[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(l(o.parts[i],t))}else{for(var a=[],i=0;i<o.parts.length;i++)a.push(l(o.parts[i],t));p[o.id]={id:o.id,refs:1,parts:a}}}}function r(e){for(var t=[],n={},o=0;o<e.length;o++){var r=e[o],i=r[0],a=r[1],l=r[2],s=r[3],c={css:a,media:l,sourceMap:s};n[i]?n[i].parts.push(c):t.push(n[i]={id:i,parts:[c]})}return t}function i(){var e=document.createElement("style"),t=h();return e.type="text/css",t.appendChild(e),e}function a(){var e=document.createElement("link"),t=h();return e.rel="stylesheet",t.appendChild(e),e}function l(e,t){var n,o,r;if(t.singleton){var l=b++;n=g||(g=i()),o=s.bind(null,n,l,!1),r=s.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=a(),o=u.bind(null,n),r=function(){n.parentNode.removeChild(n),n.href&&URL.revokeObjectURL(n.href)}):(n=i(),o=c.bind(null,n),r=function(){n.parentNode.removeChild(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}function s(e,t,n,o){var r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=m(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function c(e,t){var n=t.css,o=t.media;t.sourceMap;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function u(e,t){var n=t.css,o=(t.media,t.sourceMap);o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var p={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},f=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=d(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,b=0;e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=f());var n=r(e);return o(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var l=n[a],s=p[l.id];s.refs--,i.push(s)}if(e){var c=r(e);o(c,t)}for(var a=0;a<i.length;a++){var s=i[a];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete p[s.id]}}}};var m=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var o=n(106);"string"==typeof o&&(o=[[e.id,o,""]]);n(210)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,n){e.exports=n.p+"fa2772327f55d8198301fdb8bcfc8158.woff"},function(e,t,n){e.exports=n.p+"448c34a56d699c29117adc64c43affeb.woff2"},function(e,t,n){e.exports=n.p+"e18bbf611f2a2e43afc071aa2f4e1512.ttf"},function(e,t,n){e.exports=n.p+"89889688147bd7575d6327160d64e760.svg"}]);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.