code stringlengths 2 1.05M |
|---|
function runningLogger(){
console.log("I am running");
}
runningLogger();
function multiplyByTen(num){
console.log(num*10);
}
multiplyByTen(20);
function stringReturnOne(){
return 'One';
}
function stringReturnTwo(){
return 'two';
}
console.log(stringReturnOne(), stringReturnTwo());
function caller(para){
if(typeof(para) == 'function' ){
para;
}
}
caller(runningLogger());
function myDoubleConsoleLog(par1, par2){
if (typeof(par1) == 'function'){
console.log(par1);
}
else if (typeof(par2) == 'function'){
console.log(par2);
}
}
myDoubleConsoleLog(stringReturnOne(), stringReturnTwo());
function delay(){
console.log('ending');
}
function caller2(para){
console.log('Starting');
if (typeof(para) == 'function'){
setTimeout(delay,2000);
}
return 'Interesting';
}
console.log(caller2(caller));
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"\u01c1goagas",
"\u01c3uias"
],
"DAY": [
"Sontaxtsees",
"Mantaxtsees",
"Denstaxtsees",
"Wunstaxtsees",
"Dondertaxtsees",
"Fraitaxtsees",
"Satertaxtsees"
],
"FIRSTDAYOFWEEK": 0,
"MONTH": [
"\u01c3Khanni",
"\u01c3Khan\u01c0g\u00f4ab",
"\u01c0Khuu\u01c1kh\u00e2b",
"\u01c3H\u00f4a\u01c2khaib",
"\u01c3Khaits\u00e2b",
"Gama\u01c0aeb",
"\u01c2Khoesaob",
"Ao\u01c1khuum\u00fb\u01c1kh\u00e2b",
"Tara\u01c0khuum\u00fb\u01c1kh\u00e2b",
"\u01c2N\u00fb\u01c1n\u00e2iseb",
"\u01c0Hoo\u01c2gaeb",
"H\u00f4asore\u01c1kh\u00e2b"
],
"SHORTDAY": [
"Son",
"Ma",
"De",
"Wu",
"Do",
"Fr",
"Sat"
],
"SHORTMONTH": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y h:mm:ss a",
"mediumDate": "d MMM y",
"mediumTime": "h:mm:ss a",
"short": "dd/MM/y h:mm a",
"shortDate": "dd/MM/y",
"shortTime": "h:mm a"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "$",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4-",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "naq-na",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
module.exports = function (gulp = require("gulp"), options) {
require("./build/")(gulp, options);
require("./watch/")(gulp, options);
};
|
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
global.ng = global.ng || {};
global.ng.common = global.ng.common || {};
global.ng.common.locales = global.ng.common.locales || {};
const u = undefined;
function plural(n) {
if (n === 0) return 0;
if (n === 1) return 1;
if (n === 2) return 2;
if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10) return 3;
if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99) return 4;
return 5;
}
global.ng.common.locales['ar-dj'] = [
'ar-DJ',
[['ص', 'م'], u, u],
[['ص', 'م'], u, ['صباحًا', 'مساءً']],
[
['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
[
'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس',
'الجمعة', 'السبت'
],
u,
['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت']
],
u,
[
['ي', 'ف', 'م', 'أ', 'و', 'ن', 'ل', 'غ', 'س', 'ك', 'ب', 'د'],
[
'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو',
'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'
],
u
],
u,
[['ق.م', 'م'], u, ['قبل الميلاد', 'ميلادي']],
6,
[6, 0],
['d\u200f/M\u200f/y', 'dd\u200f/MM\u200f/y', 'd MMMM y', 'EEEE، d MMMM y'],
['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'],
['{1} {0}', u, u, u],
[
'.', ',', ';', '\u200e%\u200e', '\u200e+', '\u200e-', 'E', '×', '‰', '∞',
'ليس رقمًا', ':'
],
['#,##0.###', '#,##0%', '¤ #,##0.00', '#E0'],
'DJF',
'Fdj',
'فرنك جيبوتي',
{
'AED': ['د.إ.\u200f'],
'ARS': [u, 'AR$'],
'AUD': ['AU$'],
'BBD': [u, 'BB$'],
'BHD': ['د.ب.\u200f'],
'BMD': [u, 'BM$'],
'BND': [u, 'BN$'],
'BSD': [u, 'BS$'],
'BZD': [u, 'BZ$'],
'CAD': ['CA$'],
'CLP': [u, 'CL$'],
'CNY': ['CN¥'],
'COP': [u, 'CO$'],
'CUP': [u, 'CU$'],
'DJF': ['Fdj'],
'DOP': [u, 'DO$'],
'DZD': ['د.ج.\u200f'],
'EGP': ['ج.م.\u200f', 'E£'],
'FJD': [u, 'FJ$'],
'GBP': ['UK£'],
'GYD': [u, 'GY$'],
'HKD': ['HK$'],
'IQD': ['د.ع.\u200f'],
'IRR': ['ر.إ.'],
'JMD': [u, 'JM$'],
'JOD': ['د.أ.\u200f'],
'JPY': ['JP¥'],
'KWD': ['د.ك.\u200f'],
'KYD': [u, 'KY$'],
'LBP': ['ل.ل.\u200f', 'L£'],
'LRD': [u, '$LR'],
'LYD': ['د.ل.\u200f'],
'MAD': ['د.م.\u200f'],
'MRU': ['أ.م.'],
'MXN': ['MX$'],
'NZD': ['NZ$'],
'OMR': ['ر.ع.\u200f'],
'QAR': ['ر.ق.\u200f'],
'SAR': ['ر.س.\u200f'],
'SBD': [u, 'SB$'],
'SDD': ['د.س.\u200f'],
'SDG': ['ج.س.'],
'SRD': [u, 'SR$'],
'SYP': ['ل.س.\u200f', '£'],
'THB': ['฿'],
'TND': ['د.ت.\u200f'],
'TTD': [u, 'TT$'],
'TWD': ['NT$'],
'USD': ['US$'],
'UYU': [u, 'UY$'],
'XXX': ['***'],
'YER': ['ر.ي.\u200f']
},
'rtl',
plural,
[
[
[
'فجرًا', 'صباحًا', 'ظهرًا', 'بعد الظهر', 'مساءً',
'منتصف الليل', 'ليلاً'
],
[
'فجرًا', 'ص', 'ظهرًا', 'بعد الظهر', 'مساءً',
'منتصف الليل', 'ليلاً'
],
[
'فجرًا', 'صباحًا', 'ظهرًا', 'بعد الظهر', 'مساءً',
'منتصف الليل', 'ليلاً'
]
],
u,
[
['03:00', '06:00'], ['06:00', '12:00'], ['12:00', '13:00'], ['13:00', '18:00'],
['18:00', '24:00'], ['00:00', '01:00'], ['01:00', '03:00']
]
]
];
})(typeof globalThis !== 'undefined' && globalThis || typeof global !== 'undefined' && global ||
typeof window !== 'undefined' && window);
|
module.exports = {
app: 'src/main/webapp/',
dist: 'build/www/',
test: 'src/test/javascript/',
scss: 'src/main/webapp/scss/',
sassSrc: 'src/main/webapp/scss/**/*.{scss,sass}',
sassVendor: 'src/main/webapp/scss/vendor.scss',
cssDir: 'src/main/webapp/content/css',
bower: 'src/main/webapp/bower_components/',
tmp: 'build/tmp',
revManifest: 'build/tmp/rev-manifest.json',
port: 9000,
apiPort: 8080,
liveReloadPort: 35729,
uri: 'http://localhost:',
constantTemplate:
'(function () {\n' +
' \'use strict\';\n' +
' // DO NOT EDIT THIS FILE, EDIT THE GULP TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE\n' +
' angular\n' +
' .module(\'<%- moduleName %>\')\n' +
'<% constants.forEach(function(constant) { %> .constant(\'<%- constant.name %>\', <%= constant.value %>)\n<% }) %>;\n' +
'})();\n'
};
|
/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function() {
CKEDITOR.dialog.add('pastetext', function(a) {
return{title:a.lang.pasteText.title,minWidth:CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350,minHeight:240,onShow:function() {
this.setupContent();
},onOk:function() {
this.commitContent();
},contents:[
{label:a.lang.common.generalTab,id:'general',elements:[
{type:'html',id:'pasteMsg',html:'<div style="white-space:normal;width:340px;">' + a.lang.clipboard.pasteMsg + '</div>'},
{type:'textarea',id:'content',className:'cke_pastetext',onLoad:function() {
var b = this.getDialog().getContentElement('general', 'pasteMsg').getElement(),c = this.getElement().getElementsByTag('textarea').getItem(0);
c.setAttribute('aria-labelledby', b.$.id);
c.setStyle('direction', a.config.contentsLangDirection);
},focus:function() {
this.getElement().focus();
},setup:function() {
this.setValue('');
},commit:function() {
var b = this.getValue();
setTimeout(function() {
a.fire('paste', {text:b});
}, 0);
}}
]}
]};
});
})();
|
/**
* @fileoverview Validate strings passed to the RegExp constructor
* @author Michael Ficarra
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
var eslintTester = require("eslint-tester");
eslintTester.addRuleTest("lib/rules/no-invalid-regexp", {
valid: [
"RegExp('')",
"RegExp()",
"RegExp('.', 'g')",
"new RegExp('.')",
"new RegExp",
"new RegExp('.', 'im')",
"global.RegExp('\\\\')"
],
invalid: [
{ code: "RegExp('[');", errors: [{ message: "Invalid regular expression: /[/: Unterminated character class", type: "CallExpression" }] },
{ code: "RegExp('.', 'z');", errors: [{ message: "Invalid flags supplied to RegExp constructor 'z'", type: "CallExpression" }] },
{ code: "new RegExp(')');", errors: [{ message: "Invalid regular expression: /)/: Unmatched ')'", type: "NewExpression" }] }
]
});
|
var express = require ('express'),
bodyParser = require('body-parser'),
rand = require('generate-key'),
app = express(),
data = {
users: [],
chirps: [],
};
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
function authUser (username, key) {
var user = data.users.filter(function (user) {
return user.name === username;
});
if (user[0]) {
return key === user[0].key ? user[0].id : false;
}
}
function userExists (username) {
var user = data.users.filter(function (user) {
return user.name === username;
})[0];
return user;
}
app.post('/chirp', function (req, res) {
var chirp = req.body,
userId = authUser(chirp.user, chirp.key);
if (userId) {
data.chirps.push({
'userId': userId,
'chirpTime': Date.now(),
'chirpText': chirp.chirpText,
});
}
res.json({
'chirpId': data.length - 1,
});
});
app.post('/register', function (req, res) {
var user,
userId;
console.log(req.body);
if (userExists(req.body.username)) {
res.status(403);
res.end();
return;
}
user = {
username: req.body.user,
key: rand.generateKey(100),
};
data.users.push(user);
userId = data.users.length - 1;
console.log('Registered user: ' + user.username);
res.json({
userId: userId,
key: user.key,
});
});
app.get('/all_chirps', function (req, res) {
res.json(data.chirps);
});
app.listen(8000);
|
var inflect = require('i')();
module.exports = function defineField(Proto, Klass, fieldName) {
var prop = Proto[fieldName]
, columnName = !!Klass.underscored ? inflect.underscore(fieldName) : fieldName;
if (!!prop.columnName && fieldName !== prop.columnName) {
Klass.aliases.push({ fieldName: fieldName, columnName: prop.columnName });
columnName = prop.columnName;
} else if (!!Klass.underscored && fieldName !== columnName) {
Klass.aliases.push({ fieldName: fieldName, columnName: columnName });
}
if (typeof prop === 'function' && [String, Number, Boolean, Date, Buffer, this.Types.ENUM, this.Types.TINYINT, this.Types.BIGINT, this.Types.FLOAT, this.Types.DECIMAL, this.Types.TEXT].indexOf(Proto[fieldName]) === -1 && fieldName !== 'defaults') {
// Allow definition of custom getters and setters for fields, but make sure not to include association accessor functions.
if (/^(set|get)(.*)$/.test(fieldName)) {
var getterOrSetter = RegExp.$1 === 'get' ? 'getters' : 'setters';
if (fieldName !== false && Klass[getterOrSetter][fieldName] === undefined) {
fieldName = inflect.camelize(RegExp.$2, false);
Klass[getterOrSetter][fieldName] = function() {
return prop.apply(this, arguments);
};
}
}
} else if (fieldName !== 'defaults') {
if (typeof Klass.fields !== 'object') {
Klass.fields = {};
}
if (typeof Klass.getters !== 'object') {
Klass.getters = {};
}
if (typeof Klass.setters !== 'object') {
Klass.setters = {};
}
Klass.fields[fieldName] = prop;
Klass.getters[fieldName] = function() {
if (fieldName === 'id' && Klass.type.toLowerCase() === 'odm') {
return this.entity._id;
} else {
return this.entity.get(columnName);
}
};
Klass.setters[fieldName] = function(val) {
this.entity.set(columnName, val);
return this;
};
delete Proto[fieldName];
}
};
|
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
formlyConfig: {
hostname: 'localhost', // change to 0.0.0.0 to listen on all connections
base: 'src',
port: 4000,
livereloadport: 35701
},
connect: {
dev: {
options: {
hostname: '<%= formlyConfig.hostname %>',
port: '<%= formlyConfig.port %>',
base: '<%= formlyConfig.base %>',
livereload: '<%= formlyConfig.livereloadport %>'
}
}
},
'gh-pages': {
options: {
base: '<%= formlyConfig.base %>'
},
src: ['**']
},
clean: {
build: ['.tmp/**/*'],
dist: ['dist/**/*']
},
copy: {
vanilla: {
files: [
{
expand: true,
cwd: '<%= formlyConfig.base %>/',
src: ['directives/formly*.*', 'modules/formly*.*', 'providers/formly*.*', '!.jshintrc'],
dest: '.tmp/'
}
]
},
bootstrap: {
files: [
{
expand: true,
cwd: '<%= formlyConfig.base %>/',
src: ['directives/formly*.js', 'directives/bootstrap/formly*.html', 'modules/formly*.*', 'providers/formly*.*', '!.jshintrc'],
dest: '.tmp/'
}
]
},
deploy: {
files: [{
expand: true,
cwd: '.tmp/dist',
src: ['formly*.*'],
dest: 'dist/'
}]
}
},
concat: {
build: {
// specifing files so that they are added in this order
src: ['.tmp/modules/formly*.js', '.tmp/directives/formly*.js', '.tmp/providers/formly*.js', '.tmp/formly*.js'],
dest: '.tmp/formly.js'
}
},
uglify: {
vanilla: {
src: '.tmp/dist/formly.js',
dest: '.tmp/dist/formly.min.js'
},
bootstrap: {
src: '.tmp/dist/formly.bootstrap.js',
dest: '.tmp/dist/formly.bootstrap.min.js'
},
options: {
mangle: true,
sourceMap: true
}
},
ngtemplates: {
vanilla: {
cwd: '.tmp/',
src: [
'directives/formly*.html'
],
dest: '.tmp/formly-templates.js',
options: {
module: 'formly.render',
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true, // Only if you don't use comment directives!
removeEmptyAttributes: true,
removeRedundantAttributes: false, //removing this as it can removes properties that can be used when styling
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
}
},
bootstrap: {
cwd: '.tmp/',
src: [
'directives/bootstrap/formly*.html'
],
dest: '.tmp/formly-templates.js',
options: {
module: 'formly.render',
url: function(url) {
return url.replace('bootstrap/', '');
},
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true, // Only if you don't use comment directives!
removeEmptyAttributes: true,
removeRedundantAttributes: false, //removing this as it can removes properties that can be used when styling
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
}
}
},
ngmin: {
vanilla: {
src: '.tmp/formly.js',
dest: '.tmp/dist/formly.js'
},
bootstrap: {
src: '.tmp/formly.js',
dest: '.tmp/dist/formly.bootstrap.js'
}
},
watch: {
livereload: {
files: ['<%= formlyConfig.base %>/**/*.{js,html}'],
options: {
livereload: '<%= formlyConfig.livereloadport %>'
}
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-ngmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('publish', [
'gh-pages'
]);
grunt.registerTask('dev', [
'connect:dev',
'watch'
]);
grunt.registerTask('build', [
'clean:dist',
'build:vanilla',
'build:bootstrap'
]);
grunt.registerTask('build:vanilla', [
'clean:build',
'copy:vanilla',
'ngtemplates:vanilla',
'concat:build',
'ngmin:vanilla',
'uglify:vanilla',
'copy:deploy'
]);
grunt.registerTask('build:bootstrap', [
'clean:build',
'copy:bootstrap',
'ngtemplates:bootstrap',
'concat:build',
'ngmin:bootstrap',
'uglify:bootstrap',
'copy:deploy'
]);
}; |
/**
* Theme Customizer enhancements for a better user experience.
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
( function( $ ) {
// Site title and description.
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '.site-description' ).text( to );
} );
} );
// Header text color.
wp.customize( 'header_textcolor', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-title, .site-description' ).css( {
'clip': 'rect(1px, 1px, 1px, 1px)',
'position': 'absolute'
} );
} else {
$( '.site-title, .site-description' ).css( {
'clip': 'auto',
'color': to,
'position': 'relative'
} );
}
} );
} );
//--FRONT PAGE COLORS
//Services section
wp.customize('services_bg',function( value ) {
value.bind( function( newval ) {
$('.services-area').css('background-color', newval );
} );
});
wp.customize('services_title',function( value ) {
value.bind( function( newval ) {
$('.services-area .widget-title').css('color', newval );
} );
});
wp.customize('services_icon_bg',function( value ) {
value.bind( function( newval ) {
$('.service-icon').css('background-color', newval );
} );
});
wp.customize('services_item_title',function( value ) {
value.bind( function( newval ) {
$('.service-title, .service-title a').css('color', newval );
} );
});
wp.customize('services_body_text',function( value ) {
value.bind( function( newval ) {
$('.service-desc').css('color', newval );
} );
});
//Employees section
wp.customize('employees_bg',function( value ) {
value.bind( function( newval ) {
$('.employees-area').css('background-color', newval );
} );
});
wp.customize('employees_title',function( value ) {
value.bind( function( newval ) {
$('.employees-area .widget-title').css('color', newval );
} );
});
wp.customize('employees_name',function( value ) {
value.bind( function( newval ) {
$('.employee-name').css('color', newval );
} );
});
wp.customize('employees_function',function( value ) {
value.bind( function( newval ) {
$('.employee-position, .employee-social a').css('color', newval );
} );
});
wp.customize('employees_body_text',function( value ) {
value.bind( function( newval ) {
$('.employee-desc').css('color', newval );
} );
});
//Testimonials section
wp.customize('testimonials_bg',function( value ) {
value.bind( function( newval ) {
$('.testimonials-area').css('background-color', newval );
} );
});
wp.customize('testimonials_title',function( value ) {
value.bind( function( newval ) {
$('.testimonials-area .widget-title').css('color', newval );
} );
});
wp.customize('testimonials_client',function( value ) {
value.bind( function( newval ) {
$('.client-name').css('color', newval );
} );
});
wp.customize('testimonials_function',function( value ) {
value.bind( function( newval ) {
$('.client-function').css('color', newval );
} );
});
wp.customize('testimonials_body_bg',function( value ) {
value.bind( function( newval ) {
$('.testimonial-body').css('background-color', newval );
} );
});
wp.customize('testimonials_body_text',function( value ) {
value.bind( function( newval ) {
$('.testimonial-body').css('color', newval );
} );
});
//Skills section
wp.customize('skills_bg',function( value ) {
value.bind( function( newval ) {
$('.skills-area').css('background-color', newval );
} );
});
wp.customize('skills_title',function( value ) {
value.bind( function( newval ) {
$('.skills-area .widget-title').css('color', newval );
} );
});
wp.customize('skills_bar',function( value ) {
value.bind( function( newval ) {
$('.skill-bar div').css('background-color', newval );
} );
});
wp.customize('skills_body_text',function( value ) {
value.bind( function( newval ) {
$('.skills-desc, .skills-list').css('color', newval );
} );
});
//Facts section
wp.customize('facts_bg',function( value ) {
value.bind( function( newval ) {
$('.facts-area').css('background-color', newval );
} );
});
wp.customize('facts_title',function( value ) {
value.bind( function( newval ) {
$('.facts-area .widget-title').css('color', newval );
} );
});
wp.customize('facts_numbers',function( value ) {
value.bind( function( newval ) {
$('.fact').css('color', newval );
} );
});
wp.customize('facts_body_text',function( value ) {
value.bind( function( newval ) {
$('.fact-name').css('color', newval );
} );
});
//Clients section
wp.customize('clients_bg',function( value ) {
value.bind( function( newval ) {
$('.clients-area').css('background-color', newval );
} );
});
wp.customize('clients_title',function( value ) {
value.bind( function( newval ) {
$('.clients-area .widget-title').css('color', newval );
} );
});
//Blockquote section
wp.customize('blockquote_bg',function( value ) {
value.bind( function( newval ) {
$('.blockquote-area').css('background-color', newval );
} );
});
wp.customize('blockquote_title',function( value ) {
value.bind( function( newval ) {
$('.blockquote-area .widget-title').css('color', newval );
} );
});
wp.customize('blockquote_body_text',function( value ) {
value.bind( function( newval ) {
$('.blockquote-area blockquote').css('color', newval );
} );
});
//Social section
wp.customize('social_bg',function( value ) {
value.bind( function( newval ) {
$('.social-area').css('background-color', newval );
} );
});
wp.customize('social_title',function( value ) {
value.bind( function( newval ) {
$('.social-area .widget-title').css('color', newval );
} );
});
//Projects section
wp.customize('projects_bg',function( value ) {
value.bind( function( newval ) {
$('.projects-area').css('background-color', newval );
} );
});
wp.customize('projects_title',function( value ) {
value.bind( function( newval ) {
$('.projects-area .widget-title').css('color', newval );
} );
});
wp.customize('projects_item_bg',function( value ) {
value.bind( function( newval ) {
$('.project-image').css('background-color', newval );
} );
});
wp.customize('projects_icons',function( value ) {
value.bind( function( newval ) {
$('.link-icon, .pp-icon').css('color', newval );
} );
});
//Latest news section
wp.customize('latest_news_bg',function( value ) {
value.bind( function( newval ) {
$('.latest-news-area').css('background-color', newval );
} );
});
wp.customize('latest_news_title',function( value ) {
value.bind( function( newval ) {
$('.latest-news-area .widget-title').css('color', newval );
} );
});
wp.customize('latest_news_post_title',function( value ) {
value.bind( function( newval ) {
$('.latest-news-area .entry-title a').css('color', newval );
} );
});
wp.customize('latest_news_body_text',function( value ) {
value.bind( function( newval ) {
$('.blog-post').css('color', newval );
} );
});
wp.customize('latest_news_see_all',function( value ) {
value.bind( function( newval ) {
$('.all-news').css('color', newval );
$('.all-news').css('border-color', newval );
} );
});
//Call to action section
wp.customize('action_area_bg',function( value ) {
value.bind( function( newval ) {
$('.action-area').css('background-color', newval );
} );
});
wp.customize('action_area_title',function( value ) {
value.bind( function( newval ) {
$('.action-area .widget-title').css('color', newval );
} );
});
wp.customize('action_area_message',function( value ) {
value.bind( function( newval ) {
$('.action-text').css('color', newval );
} );
});
wp.customize('action_area_btn',function( value ) {
value.bind( function( newval ) {
$('.call-to-action').css('background-color', newval );
} );
});
wp.customize('action_area_btn_bs',function( value ) {
value.bind( function( newval ) {
$('.call-to-action').css('box-shadow', '0 5px 0' + newval );
} );
});
//Welcome area
wp.customize('header_title_color',function( value ) {
value.bind( function( newval ) {
$('.welcome-title').css('color', newval );
} );
});
wp.customize('header_desc_color',function( value ) {
value.bind( function( newval ) {
$('.welcome-desc').css('color', newval );
} );
});
wp.customize('header_btn_bg',function( value ) {
value.bind( function( newval ) {
$('.welcome-button').css('background-color', newval );
} );
});
wp.customize('header_btn_bs',function( value ) {
value.bind( function( newval ) {
$('.welcome-button').css('box-shadow', '0 5px 0' + newval );
} );
});
// Menu background
wp.customize('menu_color',function( value ) {
value.bind( function( newval ) {
$('.top-bar').css('background-color', newval );
} );
});
// Menu Links
wp.customize('menu_links_color',function( value ) {
value.bind( function( newval ) {
$('.main-navigation a').css('color', newval );
} );
});
// Site title
wp.customize('site_title_color',function( value ) {
value.bind( function( newval ) {
$('.site-title a').css('color', newval );
} );
});
// Site description
wp.customize('site_desc_color',function( value ) {
value.bind( function( newval ) {
$('.site-description').css('color', newval );
} );
});
// Entry title
wp.customize('entry_title_color',function( value ) {
value.bind( function( newval ) {
$('.hentry .entry-title, .hentry .entry-title a').css('color', newval );
} );
});
// Body text color
wp.customize('body_text_color',function( value ) {
value.bind( function( newval ) {
$('body').css('color', newval );
} );
});
// Footer background
wp.customize('footer_color',function( value ) {
value.bind( function( newval ) {
$('.footer-widget-area, .site-footer').css('background-color', newval );
} );
});
//Dribbble section
wp.customize('dribbble_bg',function( value ) {
value.bind( function( newval ) {
$('.home.page .dribbble-area').css('background-color', newval );
} );
});
wp.customize('dribbble_title',function( value ) {
value.bind( function( newval ) {
$('.home.page .dribbble-area .widget-title').css('color', newval );
} );
});
//flickr section
wp.customize('flickr_bg',function( value ) {
value.bind( function( newval ) {
$('.home.page .mflickr-area').css('background-color', newval );
} );
});
wp.customize('flickr_title',function( value ) {
value.bind( function( newval ) {
$('.home.page .mflickr-area .widget-title').css('color', newval );
} );
});
//instagram section
wp.customize('instagram_bg',function( value ) {
value.bind( function( newval ) {
$('.home.page .instagram-area').css('background-color', newval );
} );
});
wp.customize('instagram_title',function( value ) {
value.bind( function( newval ) {
$('.home.page .instagram-area .widget-title').css('color', newval );
} );
});
//contact section
wp.customize('contact_bg',function( value ) {
value.bind( function( newval ) {
$('.contact-area').css('background-color', newval );
} );
});
wp.customize('contact_title',function( value ) {
value.bind( function( newval ) {
$('.contact-area .widget-title').css('color', newval );
} );
});
wp.customize('contact_button',function( value ) {
value.bind( function( newval ) {
$('.contact-area input[type="submit"]').css('background-color', newval );
} );
});
wp.customize('contact_button_shadow',function( value ) {
value.bind( function( newval ) {
$('.contact-area input[type="submit"]').css('box-shadow', '0 5px 0 ' + newval );
} );
});
//Text section
wp.customize('text_title',function( value ) {
value.bind( function( newval ) {
$('.panel.widget_text .widget-title').css('color', newval );
} );
});
wp.customize('text_body_text',function( value ) {
value.bind( function( newval ) {
$('.panel.widget_text .textwidget').css('color', newval );
} );
});
// Font sizes
wp.customize('h1_size',function( value ) {
value.bind( function( newval ) {
$('h1').css('font-size', newval + 'px' );
} );
});
wp.customize('h2_size',function( value ) {
value.bind( function( newval ) {
$('h2').css('font-size', newval + 'px' );
} );
});
wp.customize('h3_size',function( value ) {
value.bind( function( newval ) {
$('h3').css('font-size', newval + 'px' );
} );
});
wp.customize('h4_size',function( value ) {
value.bind( function( newval ) {
$('h4').css('font-size', newval + 'px' );
} );
});
wp.customize('h5_size',function( value ) {
value.bind( function( newval ) {
$('h5').css('font-size', newval + 'px' );
} );
});
wp.customize('h6_size',function( value ) {
value.bind( function( newval ) {
$('h6').css('font-size', newval + 'px' );
} );
});
wp.customize('body_size',function( value ) {
value.bind( function( newval ) {
$('body').css('font-size', newval + 'px' );
} );
});
wp.customize('widget_title_size',function( value ) {
value.bind( function( newval ) {
$('section .widget-title, .panel.widget .widget-title').css('font-size', newval + 'px' );
} );
});
wp.customize('menu_size',function( value ) {
value.bind( function( newval ) {
$('.main-navigation li').css('font-size', newval + 'px' );
} );
});
//Logos
wp.customize('logo_size',function( value ) {
value.bind( function( newval ) {
$('.site-logo').css('max-width', newval + 'px' );
} );
});
//Logos
wp.customize('wlogo_size',function( value ) {
value.bind( function( newval ) {
$('.welcome-logo').css('max-width', newval + 'px' );
} );
});
} )( jQuery );
|
var getMeshMixin = require('../getMeshMixin');
var registerPrimitive = require('../registerPrimitive');
var utils = require('../../../utils/');
registerPrimitive('a-image', utils.extendDeep({}, getMeshMixin(), {
defaultComponents: {
geometry: {
primitive: 'plane'
},
material: {
color: '#FFF',
shader: 'flat',
side: 'double',
transparent: true
}
},
mappings: {
height: 'geometry.height',
width: 'geometry.width'
}
}));
|
let p;
let a = function () {
var _ret;
while (p = p.parentPath) {
if (a) {
_ret = 'a';
} else {
_ret = 'b';
}
}
return _ret;
}();
|
/**
* HD-keret Tab
*
* @description Tab-kezelő
* @requires jQuery
* @example
* HTML-CSS: http://blog.webprog.biz/jquery-tabok
* const tab = new HD.Site.Tab({
* $trigger : $('ul.tab li'),
* activeClass : 'selected'
* });
* tab.init();
*/
/* global $ */
'use strict';
var HD = window.HD || {};
HD.Site = HD.Site || {};
/**
* Tab objektum (Module minta)
* @param {Object} options - beállítások
* @returns {Object} tab-kezelő felület
*/
HD.Site.Tab = function(options){
/**
* Alapértelmezett beállítások
* @type {Object}
*/
const defaultOptions = {
$trigger : $('.tab'),
activeClass : 'active',
dataGroup : 'tabgroup',
dataId : 'tabid'
};
options = $.extend({}, defaultOptions, options);
/**
* Publikus felület
* @type {Object}
*/
const Interface = {
/**
* Felülírt beállítások
* @type {Object}
*/
options : options,
/**
* Eseménykezelő csatolása
* @public
*/
init : function(){
options.$trigger.click(function(event){
const group = $(event.target).data(options.dataGroup);
const id = $(event.target).data(options.dataId);
const $all = $('*');
$all.filter(function(){
return $(event.target).data(options.dataGroup) === group;
}).removeClass(options.activeClass);
$all.filter(function(){
return $(event.target).data(options.dataGroup) === group &&
$(event.target).data(options.dataId) === id;
}).addClass(options.activeClass);
});
}
};
return Interface;
};
|
var _ = require('lodash');
module.exports = {
formatObjectKeys: function (o) {
var nO = {};
_.forIn(o, function (v, k, o) {
nO[ _.camelCase(k) ] = v;
});
return nO;
}
}; |
import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import App from './containers/App';
import todoApp from './reducers';
const store = createStore(todoApp);
const rootElement = document.getElementById('root');
render(
<Provider store={store}>
<App />
</Provider>,
rootElement
);
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
function Animator(target, animations) {
var anims, // list of all animations
cursor, // pointer to the current animation
events = {
/*
This event fires whenever the current animation is completed.
The callback function is passed one parameter, target, equal to
the target on which the animation completed.
$(document).bind('deck.animator.completed', function(target) {
alert('The animation of '+target+' has just completed.');
});
*/
completed: 'deck.animator.completed',
/*
This event fires whenever an animation is performed. The callback
function is passed two parameters, target and index, equal to
the target on which the animation is performed and the index of
the animation i.e between 0 and animation.lenght.
*/
progress: 'deck.animator.progress',
/*
This event fires at the beginning of deck.animator initialization.
*/
beforeInitialize: 'deck.animator.beforeInit',
/*
This event fires at the end of deck.animator initialization.
*/
initialize: 'deck.animator.init'
};
if( $.isArray(animations) ) {
anims = animations;
cursor = 0;
} else {
throw "Animator only takes an array of animation as argument.";
}
/*
Restart animator.
*/
this.restart = function() {
init();
}
/*
Move to next animation.
*/
this.next = function() {
if( cursor < anims.length ) {
anim = animations[cursor++];
if( $.isArray(anim) ) {
$(anim).each( function() {
this(target);
});
} else {
anim(target);
}
$(document).trigger(events.progress, {'target':target, 'index':cursor-1});
} else {
$(document).trigger(events.completed, {'target':target});
}
}
/*
Return true if animation is complete.
*/
this.isCompleted = function() {
return cursor == anims.length;
}
/*
Push new animation into the animator.
*/
this.push = function(anim) {
this.anims.push(anim);
}
function init() {
$(document).trigger(events.beforeInitialize, {'target':target});
cursor = 0;
if( anims.length>0 ) {
anim = animations[cursor++];
if( $.isArray(anim) ) {
$(anim).each( function() {
this(target);
});
} else {
anim(target);
}
$(document).trigger(events.initialize, {'target':target});
} else {
throw "Animator requires at list one animation."
}
}
}
/*
Animator.Appear(e,d)
e element
d duration
*/
Animator.Appear = function(e, d) {
d = d || 0;
return function(t) {
var $svg = $(t).svg('get');
$(e, $svg.root()).each( function(){
$(this).animate({'svgOpacity': 1.}, d);
})
}
}
/*
Animator.Disappear(e,d)
e element
d duration
*/
Animator.Disappear = function(e, d) {
d = d || 0;
return function(t) {
var $svg = $(t).svg('get');
$(e, $svg.root()).each( function(){
$(this).animate({'svgOpacity': 0.}, d);
})
}
}
/*
Animator.Transform(e,tr,d)
e element
tr the transformation
d duration
*/
Animator.Transform = function(e,tr,d) {
d = d || 0;
return function(t) {
var $svg = $(t).svg('get');
$(e, $svg.root()).each( function(){
$(this).animate({'svgTransform': tr}, d);
})
}
}
|
'use strict';
/**
* Benchmark dependencies.
*/
var microtime = require('microtime')
, benchmark = require('benchmark')
, yaml = require('yamlparser')
, path = require('path')
, fs = require('fs');
/**
* Useragent parsers.
*/
var useragent2 = require('../')
, useragent = require('useragent');
/**
* Figure out which test we want to run.
*/
var file = process.argv.slice(2)[0] || 'testcases';
/**
* Setup the test-files.
*/
var useragentlist = path.join(__dirname, '..', 'tests', 'fixtures', file+'.yaml')
, yammy = yaml.eval(fs.readFileSync(useragentlist).toString()).test_cases
, testcases = yammy.map(function (test) {
return test.user_agent_string;
}).slice(0, 1000)
, length = testcases.length;
/**
* Setup the benchmark
*/
var froomfroom = new benchmark.Suite;
froomfroom
.add('useragent latest', function () {
for (var i = 0; i < length; i++ ) {
useragent2.parse(testcases[i]);
}
})
.add('useragent1', function () {
for (var i = 0; i < length; i++ ) {
useragent.parse(testcases[i]);
}
})
.on('cycle', function (event) {
var details = event.target;
console.log('Executed benchmark (%s)', details.name);
console.log('Count (%d), Cycles (%d), Elapsed (%d), Hz (%d)\n'
, details.count
, details.cycles
, details.times.elapsed
, details.hz
);
})
.on('complete', function () {
console.log(this.filter('fastest').pluck('name') + ' is the fastest parser');
});
/**
* Start the benchmark, froom frooom!!
*/
froomfroom.run({ minSamples: 100 });
|
//easyUi三级级联菜单 作者:chenhu
var menu1Data;
var menu2Data;
var menu3Data;
/**
*
* @param m1(1级菜单)
* @param m2(2级菜单)
* @param m3(3级菜单)
*/
function initMenu(m1,m2,m3){
var value1=$("#"+m1).val();
if(value1==""||value1==undefined){
value1='c1';
}
var srmCombx = $("#"+m1).combobox({
loader:function(param,success,error){
$.ajax({
url: '/gbdbas/sellCenter/queryCountryMenu?type=nation&code='+value1,
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
onSelect:function(record){ //onSelect 用户点击时触发的事件 在此的意义在于,用户点击一级后自动二级combobox
piperowCombx.combobox({
loader:function(param,success,error){
$.ajax({
url:'/gbdbas/sellCenter/queryCascdeMenu?type=province&rela='+$("#"+m1).combobox("getValue")+'',
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
onSelect:function(record){ //这里也使用了onSelect事件,在二级combobox被用户点击时触发三级combobox
pipeCombx.combobox({
loader:function(param,success,error){
$.ajax({
url: '/gbdbas/sellCenter/queryCascdeMenu?type=city&rela='+$("#"+m2).combobox("getValue")+'',
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
valueField: 'code',
textField: 'value',
value:'',
editable:false
});
},
onLoadSuccess:function(){ //清空三级下拉框 就是成功加载完触发的事件 当一级combobox改变时,二级和三级就需要清空
pipeCombx.combobox("clear");
pipeCombx.combobox('setValue', '--请选择--'); //给combobox下拉框设置一个值,否则为空不好看
},
valueField: 'code',
textField: 'value',
value:'',
editable:false
}).combobox("clear"); //清空二级下拉框
},
valueField: 'code',
textField: 'value',
editable:false
});
/******************************************************************************************************/
//下面的俩个是组件,
// 二层Combo
var piperowCombx = $("#"+m2).combobox({
loader:function(param,success,error){
$.ajax({
url: '/gbdbas/sellCenter/queryCountryMenu?type=province&code='+$("#"+m2).combobox("getValue")+'',
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
onSelect:function(record){ //这里也使用了onSelect事件,在二级combobox被用户点击时触发三级combobox
pipeCombx.combobox({
loader:function(param,success,error){
$.ajax({
url: '/gbdbas/sellCenter/queryCascdeMenu?type=city&rela='+$("#"+m2).combobox("getValue")+'',
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
valueField: 'code',
textField: 'value',
value:'',
editable:false
});
},
valueField: 'code',
textField: 'value',
editable:false
});
//三层Combo
var pipeCombx=$("#"+m3).combobox({
loader:function(param,success,error){
$.ajax({
url: '/gbdbas/sellCenter/queryCountryMenu?type=city&code='+$("#"+m3).combobox("getValue")+'',
dataType: 'json',
success: function(data){
data.unshift({code:'',value:'--请选择--'});
success(data);
},
error: function(){
error.apply(this, arguments);
}
});
},
valueField: 'code',
textField: 'value',
editable:false
});
} |
require("requirish")._(module);
var _ = require("underscore");
var should = require("should");
var server_engine = require("lib/server/server_engine");
var resolveNodeId = require("lib/datamodel/nodeid").resolveNodeId;
var DataValue = require("lib/datamodel/datavalue").DataValue;
var Variant = require("lib/datamodel/variant").Variant;
var VariantArrayType = require("lib/datamodel/variant").VariantArrayType;
var DataType = require("lib/datamodel/variant").DataType;
var NodeId = require("lib/datamodel/nodeid").NodeId;
var StatusCodes = require("lib/datamodel/opcua_status_code").StatusCodes;
var engine, FolderTypeId, BaseDataVariableTypeId, ref_Organizes_Id;
var getMethodDeclaration_ArgumentList = require("lib/datamodel/argument_list").getMethodDeclaration_ArgumentList;
var UAMethod = require("lib/address_space/ua_method").UAMethod;
var translate_service = require("lib/services/translate_browse_paths_to_node_ids_service");
var resourceLeakDetector = require("test/helpers/resource_leak_detector").resourceLeakDetector;
describe("ServerEngine - addMethod", function () {
before(function (done) {
resourceLeakDetector.start();
done();
});
after(function () {
resourceLeakDetector.stop();
});
before(function (done) {
engine = new server_engine.ServerEngine();
engine.initialize({nodeset_filename: server_engine.mini_nodeset_filename}, function () {
FolderTypeId = engine.address_space.findObjectType("FolderType").nodeId;
BaseDataVariableTypeId = engine.address_space.findVariableType("BaseDataVariableType").nodeId;
ref_Organizes_Id = engine.address_space.findReferenceType("Organizes").nodeId;
ref_Organizes_Id.toString().should.eql("ns=0;i=35");
done();
});
});
after(function () {
engine.shutdown();
engine = null;
});
it("should be able to attach a method on a object of the address space and call it", function (done) {
var objectFolder = engine.findObject("ObjectsFolder");
var object = engine.addObjectInFolder(objectFolder, {browseName: "MyObject", nodeId: "ns=1;s=MyObject"});
var method = engine.addMethod(object, {
browseName: "Bark",
inputArguments: [
{
name: "nbBarks",
description: {text: "specifies the number of time I should bark"},
dataType: DataType.UInt32
}
],
outputArguments: [
{
name: "Barks",
description: {text: "the generated barks"},
dataType: DataType.String,
valueRank: 1
}
]
});
method.should.be.instanceOf(UAMethod);
method.nodeId.should.be.instanceOf(NodeId);
var objectMethod = object.getMethodById(method.nodeId);
_.isObject(objectMethod).should.eql(true);
var arg = getMethodDeclaration_ArgumentList(engine.address_space, object.nodeId, method.nodeId);
arg.statusCode.should.eql(StatusCodes.Good);
arg.methodDeclaration.should.eql(objectMethod);
var methodInputArguments = objectMethod.getInputArguments();
_.isArray(methodInputArguments).should.eql(true);
var methodOutputArguments = objectMethod.getOutputArguments();
_.isArray(methodOutputArguments).should.eql(true);
engine.bindMethod(method.nodeId, function (inputArguments, context, callback) {
var nbBarks = inputArguments[0].value;
console.log("Hello World ! I will bark ", nbBarks, "times");
var barks = [];
for (var i = 0; i < nbBarks; i++) {
barks.push("Whaff");
}
var callMethodResult = {
statusCode: StatusCodes.Good,
outputArguments: [
{
dataType: DataType.String,
arrayType: VariantArrayType.Array,
value: barks
}
]
};
callback(null, callMethodResult);
});
// now call it
var inputArguments = [{dataType: DataType.UInt32, value: 3}];
var context = {};
// it should be possible to find the InputArguments and OutputArguments property
// using translate browse path
var hasPropertyRefId = resolveNodeId("HasProperty");
/* NodeId ns=0;i=46*/
var browsePath = [{
startingNode: /* NodeId */ method.nodeId,
relativePath: /* RelativePath */ {
elements: /* RelativePathElement */ [
{
referenceTypeId: hasPropertyRefId,
isInverse: false,
includeSubtypes: false,
targetName: {namespaceIndex: 0, name: "InputArguments"}
}
]
}
}, {
startingNode: method.nodeId,
relativePath: {
elements: [
{
referenceTypeId: hasPropertyRefId,
isInverse: false,
includeSubtypes: false,
targetName: {name: "OutputArguments"}
}
]
}
}
];
var result = engine.browsePath(new translate_service.BrowsePath(browsePath[0]));
result.statusCode.should.eql(StatusCodes.Good);
result = engine.browsePath(new translate_service.BrowsePath(browsePath[1]));
result.statusCode.should.eql(StatusCodes.Good);
objectMethod.execute(inputArguments, context, function (err, callMethodResponse) {
done(err);
callMethodResponse.statusCode.should.eql(StatusCodes.Good);
callMethodResponse.outputArguments.length.should.eql(1);
callMethodResponse.outputArguments[0].value.should.eql(["Whaff", "Whaff", "Whaff"]);
console.log(" Result = ", callMethodResponse.outputArguments[0].value);
});
});
});
|
// Copyright (c) 2005 Thomas Fuchs (http://mir.aculo.us)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Effect2 = {}
/* ------------- transitions ------------- */
Effect2.Transitions = {}
Effect2.Transitions.linear = function(pos) {
return pos;
}
Effect2.Transitions.sinoidal = function(pos) {
return (-Math.cos(pos*Math.PI)/2) + 0.5;
}
Effect2.Transitions.reverse = function(pos) {
return 1-pos;
}
Effect2.Transitions.flicker = function(pos) {
return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random(0.25);
}
Effect2.Transitions.wobble = function(pos) {
return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
}
/* ------------- core effects ------------- */
Effect2.Base = function() {};
Effect2.Base.prototype = {
setOptions: function(options) {
this.options = {
transition: Effect2.Transitions.sinoidal,
duration: 1.0, // seconds
fps: 25.0, // max. 100fps
sync: false, // true for combining
from: 0.0,
to: 1.0
}.extend(options || {});
},
start: function(options) {
this.setOptions(options || {});
this.currentFrame = 0;
this.startOn = new Date().getTime();
this.finishOn = this.startOn + (this.options.duration*1000);
if(this.options.beforeStart) this.options.beforeStart(this);
if(!this.options.sync) this.loop();
},
loop: function() {
timePos = new Date().getTime();
if(timePos >= this.finishOn) {
this.render(this.options.to);
if(this.finish) this.finish();
if(this.options.afterFinish) this.options.afterFinish(this);
return;
}
pos = (timePos - this.startOn) / (this.finishOn - this.startOn);
frame = Math.round(pos * this.options.fps * this.options.duration);
if(frame > this.currentFrame) {
this.render(pos);
this.currentFrame = frame;
}
this.timeout = setTimeout(this.loop.bind(this), 10);
},
render: function(pos) {
if(this.options.transition) pos = this.options.transition(pos);
pos = pos * (this.options.to-this.options.from);
pos += this.options.from;
if(this.options.beforeUpdate) this.options.beforeUpdate(this);
if(this.update) this.update(pos);
if(this.options.afterUpdate) this.options.afterUpdate(this);
},
cancel: function() {
if(this.timeout) clearTimeout(this.timeout);
}
}
Effect2.Parallel = Class.create();
Effect2.Parallel.prototype = (new Effect2.Base()).extend({
initialize: function(effects) {
this.effects = effects || [];
this.start(arguments[1]);
},
update: function(position) {
for (var i = 0; i < this.effects.length; i++)
this.effects[i].render(position);
},
finish: function(position) {
for (var i = 0; i < this.effects.length; i++)
if(this.effects[i].finish) this.effects[i].finish(position);
}
});
Effect2.Opacity = Class.create();
Effect2.Opacity.prototype = (new Effect2.Base()).extend({
initialize: function() {
this.element = $(arguments[0] || document.rootElement);
options = {
from: 0.0,
to: 1.0
}.extend(arguments[1] || {});
this.start(options);
},
update: function(position) {
this.setOpacity(position);
},
setOpacity: function(opacity) {
opacity = (opacity == 1) ? 0.99999 : opacity;
this.element.style.opacity = opacity;
this.element.style.filter = "alpha(opacity:"+opacity*100+")";
}
});
Effect2.MoveBy = Class.create();
Effect2.MoveBy.prototype = (new Effect2.Base()).extend({
initialize: function(element, toTop, toLeft) {
this.element = $(element);
this.originalTop =
this.element.style.top ? parseFloat(this.element.style.top) : 0;
this.originalLeft =
this.element.style.left ? parseFloat(this.element.style.left) : 0;
this.toTop = toTop;
this.toLeft = toLeft;
if(this.element.style.position == "")
this.element.style.position = "relative";
this.start(arguments[3]);
},
update: function(position) {
topd = this.toTop * position + this.originalTop;
leftd = this.toLeft * position + this.originalLeft;
this.setPosition(topd, leftd);
},
setPosition: function(topd, leftd) {
this.element.style.top = topd + "px";
this.element.style.left = leftd + "px";
}
});
Effect2.Scale = Class.create();
Effect2.Scale.prototype = (new Effect2.Base()).extend({
initialize: function(element, percent) {
this.element = $(element)
options = {
scaleX: true,
scaleY: true,
scaleContent: true,
scaleFromCenter: false,
scaleMode: 'box', // 'box' or 'contents'
scaleFrom: 100.0
}.extend(arguments[2] || {});
this.originalTop = this.element.offsetTop;
this.originalLeft = this.element.offsetLeft;
if (this.element.style.fontSize=="") this.sizeEm = 1.0;
if (this.element.style.fontSize && this.element.style.fontSize.indexOf("em")>0)
this.sizeEm = parseFloat(this.element.style.fontSize);
this.factor = (percent/100.0) - (options.scaleFrom/100.0);
if(options.scaleMode=='box') {
this.originalHeight = this.element.clientHeight;
this.originalWidth = this.element.clientWidth;
} else
if(options.scaleMode=='contents') {
this.originalHeight = this.element.scrollHeight;
this.originalWidth = this.element.scrollWidth;
}
this.start(options);
},
update: function(position) {
currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
if(this.options.scaleContent && this.sizeEm)
this.element.style.fontSize = this.sizeEm*currentScale + "em";
this.setDimensions(
this.originalWidth * currentScale,
this.originalHeight * currentScale);
},
setDimensions: function(width, height) {
if(this.options.scaleX) this.element.style.width = width + 'px';
if(this.options.scaleY) this.element.style.height = height + 'px';
if(this.options.scaleFromCenter) {
topd = (height - this.originalHeight)/2;
leftd = (width - this.originalWidth)/2;
if(this.element.style.position=='absolute') {
if(this.options.scaleY) this.element.style.top = this.originalTop-topd + "px";
if(this.options.scaleX) this.element.style.left = this.originalLeft-leftd + "px";
} else {
if(this.options.scaleY) this.element.style.top = -topd + "px";
if(this.options.scaleX) this.element.style.left = -leftd + "px";
}
}
}
});
/* ------------- prepackaged effects ------------- */
Effect2.Fade = function(element) {
options = {
from: 1.0,
to: 0.0,
afterFinish: function(effect)
{ Element.hide(effect.element);
effect.setOpacity(1); }
}.extend(arguments[1] || {});
new Effect2.Opacity(element,options);
}
Effect2.Appear = function(element) {
options = {
from: 0.0,
to: 1.0,
beforeStart: function(effect)
{ effect.setOpacity(0);
Element.show(effect.element); },
afterUpdate: function(effect)
{ Element.show(effect.element); }
}.extend(arguments[1] || {});
new Effect2.Opacity(element,options);
}
Effect2.Puff = function(element) {
new Effect2.Parallel(
[ new Effect2.Scale(element, 200, { sync: true, scaleFromCenter: true }),
new Effect2.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ],
{ duration: 1.0,
afterUpdate: function(effect)
{ effect.effects[0].element.style.position = 'absolute'; },
afterFinish: function(effect)
{ Element.hide(effect.effects[0].element); }
}
);
}
Effect2.BlindUp = function(element) {
$(element).style.overflow = 'hidden';
new Effect2.Scale(element, 0,
{ scaleContent: false,
scaleX: false,
afterFinish: function(effect)
{ Element.hide(effect.element) }
}.extend(arguments[1] || {})
);
}
Effect2.BlindDown = function(element) {
$(element).style.height = '0px';
$(element).style.overflow = 'hidden';
Element.show(element);
new Effect2.Scale(element, 100,
{ scaleContent: false,
scaleX: false,
scaleMode: 'contents',
scaleFrom: 0
}.extend(arguments[1] || {})
);
}
Effect2.SwitchOff = function(element) {
new Effect2.Appear(element,
{ duration: 0.4,
transition: Effect2.Transitions.flicker,
afterFinish: function(effect)
{ effect.element.style.overflow = 'hidden';
new Effect2.Scale(effect.element, 1,
{ duration: 0.3, scaleFromCenter: true,
scaleX: false, scaleContent: false,
afterUpdate: function(effect) {
if(effect.element.style.position=="")
effect.element.style.position = 'relative'; },
afterFinish: function(effect) { Element.hide(effect.element); }
} )
}
} )
}
Effect2.DropOut = function(element) {
new Effect2.Parallel(
[ new Effect2.MoveBy(element, 100, 0, { sync: true }),
new Effect2.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ],
{ duration: 0.5,
afterFinish: function(effect)
{ Element.hide(effect.effects[0].element); }
});
}
Effect2.Shake = function(element) {
new Effect2.MoveBy(element, 0, 20,
{ duration: 0.05, afterFinish: function(effect) {
new Effect2.MoveBy(effect.element, 0, -40,
{ duration: 0.1, afterFinish: function(effect) {
new Effect2.MoveBy(effect.element, 0, 40,
{ duration: 0.1, afterFinish: function(effect) {
new Effect2.MoveBy(effect.element, 0, -40,
{ duration: 0.1, afterFinish: function(effect) {
new Effect2.MoveBy(effect.element, 0, 40,
{ duration: 0.1, afterFinish: function(effect) {
new Effect2.MoveBy(effect.element, 0, -20,
{ duration: 0.05, afterFinish: function(effect) {
}}) }}) }}) }}) }}) }});
}
Effect2.SlideDown = function(element) {
$(element).style.height = '0px';
$(element).style.overflow = 'hidden';
$(element).firstChild.style.position = 'relative';
Element.show(element);
new Effect2.Scale(element, 100,
{ scaleContent: false,
scaleX: false,
scaleMode: 'contents',
scaleFrom: 0,
afterUpdate: function(effect)
{ effect.element.firstChild.style.bottom =
(effect.originalHeight - effect.element.clientHeight) + 'px'; }
}.extend(arguments[1] || {})
);
}
Effect2.SlideUp = function(element) {
$(element).style.overflow = 'hidden';
$(element).firstChild.style.position = 'relative';
Element.show(element);
new Effect2.Scale(element, 0,
{ scaleContent: false,
scaleX: false,
afterUpdate: function(effect)
{ effect.element.firstChild.style.bottom =
(effect.originalHeight - effect.element.clientHeight) + 'px'; },
afterFinish: function(effect)
{ Element.hide(effect.element); }
}.extend(arguments[1] || {})
);
} |
/*! jQuery UI - v1.10.3 - 2013-10-05
* http://jqueryui.com
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(t){t.datepicker.regional.it={closeText:"Chiudi",prevText:"<Prec",nextText:"Succ>",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},t.datepicker.setDefaults(t.datepicker.regional.it)}); |
version https://git-lfs.github.com/spec/v1
oid sha256:100a892c56984f35e6998ee87a41df5bba6cc5f68c5fbdde5688c75bfb64ea4a
size 15974
|
define([
"dojo",
"dojox",
"dojo/_base/connect",
"dojo/_base/declare"
], function(dojo, dojox) {
dojo.declare("dojox.editor.plugins._SpellCheckParser", null, {
lang: "english",
parseIntoWords: function(/*String*/ text){
// summary:
// Parse the text into words
// text:
// Plain text without html tags
// tags:
// public
// returns:
// Array holding all the words
function isCharExt(c){
var ch = c.charCodeAt(0);
return 48 <= ch && ch <= 57 || 65 <= ch && ch <= 90 || 97 <= ch && ch <= 122;
}
var words = this.words = [],
indices = this.indices = [],
index = 0,
length = text && text.length,
start = 0;
while(index < length){
var ch;
// Skip the white charactor and need to treat HTML entity respectively
while(index < length && !isCharExt(ch = text.charAt(index)) && ch != "&"){ index++; }
if(ch == "&"){ // An HTML entity, skip it
while(++index < length && (ch = text.charAt(index)) != ";" && isCharExt(ch)){}
}else{ // A word
start = index;
while(++index < length && isCharExt(text.charAt(index))){}
if(start < length){
words.push(text.substring(start, index));
indices.push(start);
}
}
}
return words;
},
getIndices: function(){
// summary:
// Get the indices of the words. They are in one-to-one correspondence
// tags:
// public
// returns:
// Index array
return this.indices;
}
});
// Register this parser in the SpellCheck plugin.
dojo.subscribe(dijit._scopeName + ".Editor.plugin.SpellCheck.getParser", null, function(sp){
if(sp.parser){ return; }
sp.parser = new dojox.editor.plugins._SpellCheckParser();
});
return dojox.editor.plugins._SpellCheckParser;
}); |
'use strict';
import path from 'path';
export default function(gulp, plugins, args, config, taskTarget, browserSync) {
let dirs = config.directories;
// Watch task
gulp.task('watch', () => {
if (!args.production) {
// Styles
gulp.watch([
path.join(dirs.source, dirs.styles, '**/*.{scss,sass}'),
path.join(dirs.source, dirs.modules, '**/*.{scss,sass}')
], ['sass']);
// Jade Templates
gulp.watch([
path.join(dirs.source, '**/*.jade'),
path.join(dirs.source, dirs.data, '**/*.{json,yaml,yml}')
], ['jade']);
// Copy
gulp.watch([
path.join(dirs.source, '**/*'),
'!' + path.join(dirs.source, '{**/\_*,**/\_*/**}'),
'!' + path.join(dirs.source, '**/*.jade')
], ['copy']);
// Images
gulp.watch([
path.join(dirs.source, dirs.images, '**/*.{jpg,jpeg,gif,svg,png}')
], ['imagemin']);
// All other files
gulp.watch([
path.join(dirs.temporary, '**/*'),
'!' + path.join(dirs.temporary, '**/*.{css,map,html,js}')
]).on('change', browserSync.reload);
}
});
}
|
define(function(require, exports, module)
{
var Class = require('class'),
pv = require('pgui.validation'),
_ = require('underscore');
exports.ModalOperationLink = Class.extend({
init: function(container, parentGrid)
{
this.parentGrid = parentGrid;
this.container = container;
this.contentLink = container.attr('content-link');
this.$row = this.container.closest('.pg-row');
var self = this;
this.container.click(function(event)
{
event.preventDefault();
self._invokeModalDialog();
});
},
_doOkCreateButton: function(container, formContainer, errorContainer)
{
return null;
},
_doValidateForm: function(form)
{
return null;
},
_doUpdateGridAfterCommit: function(response, successCallback)
{
return null;
},
_invokeModalDialog: function(){
$.get(this.contentLink, {},
_.bind(function(data) {
this._showModalDialog($(data));
}, this));
},
_bindButtonEvents: function($formContainer, errorContainer) { },
_showModalDialog: function(content)
{
var self = this;
require(['pgui.controls'], function(ctrls) {
var formContainer =
$('<div class="modal hide" style="overflow: visible;"></div>')
.addClass("wide-modal")
.appendTo($('body'))
.append(content);
self._applyUnobtrusive(formContainer);
var errorContainer = self._createErrorContainer(formContainer);
formContainer.find('.modal-body').css('overflow', 'visible');
formContainer.find('.modal-body').css('max-height', 'inherit');
self._applyFormValidator(formContainer, errorContainer);
if (formContainer.height() > $(window).height() - 300)
formContainer.addClass('modal-big-length');
formContainer.find('.title').html(self.container.attr('dialog-title'));
formContainer.modal({
modal: true,
show: false,
backdrop: 'static'
});
ctrls.initEditors(formContainer, function() {
self._bindButtonEvents(formContainer, errorContainer);
formContainer.modal('show');
});
});
},
_createButtons: function(dialog, formContainer, errorContainer)
{
var uiDialogButtonPane = $('<div></div>')
.addClass('ui-dialog-buttonpane')
.addClass('ui-widget-content')
.addClass('ui-helper-clearfix');
var uiButtonSet = $( "<div></div>" )
.addClass( "ui-dialog-buttonset" )
.appendTo( uiDialogButtonPane );
var cancelButtonBlock = $('<div></div>').css('float', 'right').appendTo(uiButtonSet);
var cancelButton =
$('<button type="button">Cancel</button>')
.click(function() { dialog.dialog('close'); })
.appendTo(cancelButtonBlock);
cancelButton.button();
var saveButtonBlock = $('<div></div>');
saveButtonBlock.addClass('drop-down-list-margin-fix-wrapper');
var saveButtonElement = this._doOkCreateButton(saveButtonBlock, formContainer, errorContainer);
saveButtonBlock.appendTo(uiButtonSet);
dialog.dialog('widget').append(uiDialogButtonPane);
dialog.dialog('widget').css('overflow', 'visible');
//var saveButton = new PhpGen.DropDownButton(saveButtonElement);
},
_applyUnobtrusive: function(formContainer)
{
//controls.initEditors(formContainer);
},
_createErrorContainer: function(formContainer)
{
/*var errorContainer = $('<ul class="modal-editing-error-box">');
formContainer.append(errorContainer);
errorContainer.hide();
return errorContainer;*/
return formContainer.find('.error-container');
},
_applyFormValidator: function(formContainer, errorContainer)
{
var $form = formContainer.find('form');
$form.pgui_validate_form({ });
},
_beforeFormSubmit: function(formContainer, errorContainer)
{
var form = formContainer.find("form");
if (!form.valid()) {
return false;
}
return pv.ValidateSimpleForm(form, errorContainer, false);
},
_showError: function(formContainer, message)
{
var $errorContainer = formContainer.find('.error-container');
var $errorMessage =
$('<div class="alert alert-error">')
.appendTo($errorContainer);
$errorMessage.html(message);
$errorMessage.prepend(
$('<button class="close" type="button"><i class="icon-remove"></i></button>')
.click(function(e){
$errorMessage.remove();
}));
},
_processCommit: function(formContainer, errorContainer, success)
{
var dialog = formContainer;
var form = formContainer.find("form");
require(['jquery/jquery.form'], _.bind(function()
{
form.ajaxSubmit(
{
dataType: 'xml',
beforeSubmit : _.bind(function()
{
if (!this._beforeFormSubmit(formContainer, errorContainer))
return false;
$("body").css("cursor", "wait");
}, this),
success:_.bind(function(response)
{
if ($(response).find('type').text() == 'error')
{
this._showError(formContainer, $(response).find('error_message').text())
}
else
{
this._doUpdateGridAfterCommit(response, success);
dialog.modal('hide');
}
require(['pgui.controls'], function(ctrls) {
ctrls.destroyEditors(formContainer, function() {});
});
$("body").css("cursor", "auto");
}, this)
});
}, this));
}
});
}); |
'use strict';
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var loadFunctions = require('../load_functions.js');
var fitFunctions = loadFunctions('fit_functions');
var TimelionFunction = require('./timelion_function');
var offsetTime = require('../offset_time');
var _ = require('lodash');
var moment = require('moment');
function offsetSeries(response, offset) {
if (offset) {
response = _.map(response, function (point) {
return [offsetTime(point[0], offset, true), point[1]];
});
}
return response;
}
module.exports = (function (_TimelionFunction) {
_inherits(Datasource, _TimelionFunction);
function Datasource(name, config) {
_classCallCheck(this, Datasource);
// Additional arguments that every dataSource take
config.args.push({
name: 'offset',
types: ['string', 'null'],
help: 'Offset the series retrieval by a date expression. Eg -1M to make events from one month ago appear as if they are happening now'
});
config.args.push({
name: 'fit',
types: ['string', 'null'],
help: 'Algorithm to use for fitting series to the target time span and interval. Available: ' + _.keys(fitFunctions).join(', ')
});
// Wrap the original function so we can modify inputs/outputs with offset & fit
var originalFunction = config.fn;
config.fn = function (args, tlConfig) {
var config = _.clone(tlConfig);
if (args.byName.offset) {
config.time = _.cloneDeep(tlConfig.time);
config.time.from = offsetTime(config.time.from, args.byName.offset);
config.time.to = offsetTime(config.time.to, args.byName.offset);
}
return Promise.resolve(originalFunction(args, config)).then(function (seriesList) {
seriesList.list = _.map(seriesList.list, function (series) {
if (series.data.length === 0) throw new Error(name + '() returned no results');
series.data = offsetSeries(series.data, args.byName.offset);
series.fit = args.byName.fit || series.fit || 'nearest';
return series;
});
return seriesList;
});
};
_get(Object.getPrototypeOf(Datasource.prototype), 'constructor', this).call(this, name, config);
// You need to call timelionFn if calling up a datasource from another datasource,
// otherwise teh series will end up being offset twice.
this.timelionFn = originalFunction;
this.datasource = true;
this.cacheKey = function (item) {
return item.text;
};
Object.freeze(this);
}
return Datasource;
})(TimelionFunction);
|
function* G() {
yield 'hi';
yield 'there';
}
function f(...args) {
return args;
}
var result = f(0, ...[1, 2], 3, ...G());
expect(result).toEqual([0, 1, 2, 3, 'hi', 'there']);
result = f(...G());
expect(result).toEqual(['hi', 'there']);
function g() {
'use strict';
expect(this).toBeUndefined();
}
g();
g(...[]);
|
rf.StandaloneDashboard(function(db){
var chart = new ChartComponent('someid');
chart.setDimensions (4, 4);
chart.setCaption("Expenses incurred on Food Consumption by Year");
chart.setLabels (["2009", "2010", "2011"]);
chart.addSeries ("beverages", "Beverages", [1355, 1916, 1150]);
chart.addSeries ("packaged_foods", "Packaged Foods", [1513, 976, 1321]);
chart.setOption ("showLegendFlag", false);
db.addComponent (chart);
});
|
//used for the media picker dialog
angular.module("umbraco").controller("Umbraco.Overlays.TreePickerController",
function ($scope, entityResource, eventsService, $log, searchService, angularHelper, $timeout, localizationService, treeService) {
var tree = null;
var dialogOptions = $scope.model;
$scope.dialogTreeEventHandler = $({});
$scope.section = dialogOptions.section;
$scope.treeAlias = dialogOptions.treeAlias;
$scope.multiPicker = dialogOptions.multiPicker;
$scope.hideHeader = true;
$scope.searchInfo = {
searchFromId: dialogOptions.startNodeId,
searchFromName: null,
showSearch: false,
results: [],
selectedSearchResults: []
}
$scope.model.selection = [];
$scope.init = function(contentType) {
if(contentType === "content") {
entityType = "Document";
if(!$scope.model.title) {
$scope.model.title = localizationService.localize("defaultdialogs_selectContent");
}
} else if(contentType === "member") {
entityType = "Member";
if(!$scope.model.title) {
$scope.model.title = localizationService.localize("defaultdialogs_selectMember");
}
} else if(contentType === "media") {
entityType = "Media";
if(!$scope.model.title) {
$scope.model.title = localizationService.localize("defaultdialogs_selectMedia");
}
}
}
//create the custom query string param for this tree
$scope.customTreeParams = dialogOptions.startNodeId ? "startNodeId=" + dialogOptions.startNodeId : "";
$scope.customTreeParams += dialogOptions.customTreeParams ? "&" + dialogOptions.customTreeParams : "";
var searchText = "Search...";
localizationService.localize("general_search").then(function (value) {
searchText = value + "...";
});
// Allow the entity type to be passed in but defaults to Document for backwards compatibility.
var entityType = dialogOptions.entityType ? dialogOptions.entityType : "Document";
//min / max values
if (dialogOptions.minNumber) {
dialogOptions.minNumber = parseInt(dialogOptions.minNumber, 10);
}
if (dialogOptions.maxNumber) {
dialogOptions.maxNumber = parseInt(dialogOptions.maxNumber, 10);
}
if (dialogOptions.section === "member") {
entityType = "Member";
}
else if (dialogOptions.section === "media") {
entityType = "Media";
}
//Configures filtering
if (dialogOptions.filter) {
dialogOptions.filterExclude = false;
dialogOptions.filterAdvanced = false;
//used advanced filtering
if (angular.isFunction(dialogOptions.filter)) {
dialogOptions.filterAdvanced = true;
}
else if (angular.isObject(dialogOptions.filter)) {
dialogOptions.filterAdvanced = true;
}
else {
if (dialogOptions.filter.startsWith("!")) {
dialogOptions.filterExclude = true;
dialogOptions.filter = dialogOptions.filter.substring(1);
}
//used advanced filtering
if (dialogOptions.filter.startsWith("{")) {
dialogOptions.filterAdvanced = true;
//convert to object
dialogOptions.filter = angular.fromJson(dialogOptions.filter);
}
}
}
function nodeExpandedHandler(ev, args) {
if (angular.isArray(args.children)) {
//iterate children
_.each(args.children, function (child) {
//check if any of the items are list views, if so we need to add some custom
// children: A node to activate the search, any nodes that have already been
// selected in the search
if (child.metaData.isContainer) {
child.hasChildren = true;
child.children = [
{
level: child.level + 1,
hasChildren: false,
parent: function () {
return child;
},
name: searchText,
metaData: {
listViewNode: child,
},
cssClass: "icon-search",
cssClasses: ["not-published"]
}
];
//add base transition classes to this node
child.cssClasses.push("tree-node-slide-up");
var listViewResults = _.filter($scope.searchInfo.selectedSearchResults, function(i) {
return i.parentId == child.id;
});
_.each(listViewResults, function(item) {
child.children.unshift({
id: item.id,
name: item.name,
cssClass: "icon umb-tree-icon sprTree " + item.icon,
level: child.level + 1,
metaData: {
isSearchResult: true
},
hasChildren: false,
parent: function () {
return child;
}
});
});
}
//now we need to look in the already selected search results and
// toggle the check boxes for those ones that are listed
var exists = _.find($scope.searchInfo.selectedSearchResults, function (selected) {
return child.id == selected.id;
});
if (exists) {
child.selected = true;
}
});
//check filter
performFiltering(args.children);
}
}
//gets the tree object when it loads
function treeLoadedHandler(ev, args) {
tree = args.tree;
}
//wires up selection
function nodeSelectHandler(ev, args) {
args.event.preventDefault();
args.event.stopPropagation();
if (args.node.metaData.listViewNode) {
//check if list view 'search' node was selected
$scope.searchInfo.showSearch = true;
$scope.searchInfo.searchFromId = args.node.metaData.listViewNode.id;
$scope.searchInfo.searchFromName = args.node.metaData.listViewNode.name;
//add transition classes
var listViewNode = args.node.parent();
listViewNode.cssClasses.push('tree-node-slide-up-hide-active');
}
else if (args.node.metaData.isSearchResult) {
//check if the item selected was a search result from a list view
//unselect
select(args.node.name, args.node.id);
//remove it from the list view children
var listView = args.node.parent();
listView.children = _.reject(listView.children, function(child) {
return child.id == args.node.id;
});
//remove it from the custom tracked search result list
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function (i) {
return i.id == args.node.id;
});
}
else {
eventsService.emit("dialogs.treePickerController.select", args);
if (args.node.filtered) {
return;
}
//This is a tree node, so we don't have an entity to pass in, it will need to be looked up
//from the server in this method.
select(args.node.name, args.node.id);
//toggle checked state
args.node.selected = args.node.selected === true ? false : true;
}
}
/** Method used for selecting a node */
function select(text, id, entity) {
//if we get the root, we just return a constructed entity, no need for server data
if (id < 0) {
if ($scope.multiPicker) {
if (entity) {
multiSelectItem(entity);
} else {
//otherwise we have to get it from the server
entityResource.getById(id, entityType).then(function (ent) {
multiSelectItem(ent);
});
}
}
else {
var node = {
alias: null,
icon: "icon-folder",
id: id,
name: text
};
$scope.model.selection.push(node);
$scope.model.submit($scope.model);
}
}
else {
if ($scope.multiPicker) {
if (entity) {
multiSelectItem(entity);
} else {
//otherwise we have to get it from the server
entityResource.getById(id, entityType).then(function (ent) {
multiSelectItem(ent);
});
}
}
else {
$scope.hideSearch();
//if an entity has been passed in, use it
if (entity) {
$scope.model.selection.push(entity);
$scope.model.submit($scope.model);
} else {
//otherwise we have to get it from the server
entityResource.getById(id, entityType).then(function (ent) {
$scope.model.selection.push(ent);
$scope.model.submit($scope.model);
});
}
}
}
}
function multiSelectItem(item) {
var found = false;
var foundIndex = 0;
if($scope.model.selection.length > 0) {
for(i = 0; $scope.model.selection.length > i; i++) {
var selectedItem = $scope.model.selection[i];
if(selectedItem.id === item.id) {
found = true;
foundIndex = i;
}
}
}
if(found) {
$scope.model.selection.splice(foundIndex, 1);
} else {
$scope.model.selection.push(item);
}
}
function performFiltering(nodes) {
if (!dialogOptions.filter) {
return;
}
//remove any list view search nodes from being filtered since these are special nodes that always must
// be allowed to be clicked on
nodes = _.filter(nodes, function(n) {
return !angular.isObject(n.metaData.listViewNode);
});
if (dialogOptions.filterAdvanced) {
//filter either based on a method or an object
var filtered = angular.isFunction(dialogOptions.filter)
? _.filter(nodes, dialogOptions.filter)
: _.where(nodes, dialogOptions.filter);
angular.forEach(filtered, function (value, key) {
value.filtered = true;
if (dialogOptions.filterCssClass) {
if (!value.cssClasses) {
value.cssClasses = [];
}
value.cssClasses.push(dialogOptions.filterCssClass);
}
});
} else {
var a = dialogOptions.filter.toLowerCase().replace(/\s/g, '').split(',');
angular.forEach(nodes, function (value, key) {
var found = a.indexOf(value.metaData.contentType.toLowerCase()) >= 0;
if (!dialogOptions.filterExclude && !found || dialogOptions.filterExclude && found) {
value.filtered = true;
if (dialogOptions.filterCssClass) {
if (!value.cssClasses) {
value.cssClasses = [];
}
value.cssClasses.push(dialogOptions.filterCssClass);
}
}
});
}
}
$scope.multiSubmit = function (result) {
entityResource.getByIds(result, entityType).then(function (ents) {
$scope.submit(ents);
});
};
/** method to select a search result */
$scope.selectResult = function (evt, result) {
if (result.filtered) {
return;
}
result.selected = result.selected === true ? false : true;
//since result = an entity, we'll pass it in so we don't have to go back to the server
select(result.name, result.id, result);
//add/remove to our custom tracked list of selected search results
if (result.selected) {
$scope.searchInfo.selectedSearchResults.push(result);
}
else {
$scope.searchInfo.selectedSearchResults = _.reject($scope.searchInfo.selectedSearchResults, function(i) {
return i.id == result.id;
});
}
//ensure the tree node in the tree is checked/unchecked if it already exists there
if (tree) {
var found = treeService.getDescendantNode(tree.root, result.id);
if (found) {
found.selected = result.selected;
}
}
};
$scope.hideSearch = function () {
//Traverse the entire displayed tree and update each node to sync with the selected search results
if (tree) {
//we need to ensure that any currently displayed nodes that get selected
// from the search get updated to have a check box!
function checkChildren(children) {
_.each(children, function (child) {
//check if the id is in the selection, if so ensure it's flagged as selected
var exists = _.find($scope.searchInfo.selectedSearchResults, function (selected) {
return child.id == selected.id;
});
//if the curr node exists in selected search results, ensure it's checked
if (exists) {
child.selected = true;
}
//if the curr node does not exist in the selected search result, and the curr node is a child of a list view search result
else if (child.metaData.isSearchResult) {
//if this tree node is under a list view it means that the node was added
// to the tree dynamically under the list view that was searched, so we actually want to remove
// it all together from the tree
var listView = child.parent();
listView.children = _.reject(listView.children, function(c) {
return c.id == child.id;
});
}
//check if the current node is a list view and if so, check if there's any new results
// that need to be added as child nodes to it based on search results selected
if (child.metaData.isContainer) {
child.cssClasses = _.reject(child.cssClasses, function(c) {
return c === 'tree-node-slide-up-hide-active';
});
var listViewResults = _.filter($scope.searchInfo.selectedSearchResults, function (i) {
return i.parentId == child.id;
});
_.each(listViewResults, function (item) {
var childExists = _.find(child.children, function(c) {
return c.id == item.id;
});
if (!childExists) {
var parent = child;
child.children.unshift({
id: item.id,
name: item.name,
cssClass: "icon umb-tree-icon sprTree " + item.icon,
level: child.level + 1,
metaData: {
isSearchResult: true
},
hasChildren: false,
parent: function () {
return parent;
}
});
}
});
}
//recurse
if (child.children && child.children.length > 0) {
checkChildren(child.children);
}
});
}
checkChildren(tree.root.children);
}
$scope.searchInfo.showSearch = false;
$scope.searchInfo.searchFromId = dialogOptions.startNodeId;
$scope.searchInfo.searchFromName = null;
$scope.searchInfo.results = [];
}
$scope.onSearchResults = function(results) {
//filter all items - this will mark an item as filtered
performFiltering(results);
//now actually remove all filtered items so they are not even displayed
results = _.filter(results, function(item) {
return !item.filtered;
});
$scope.searchInfo.results = results;
//sync with the curr selected results
_.each($scope.searchInfo.results, function (result) {
var exists = _.find($scope.model.selection, function (selectedId) {
return result.id == selectedId;
});
if (exists) {
result.selected = true;
}
});
$scope.searchInfo.showSearch = true;
};
$scope.dialogTreeEventHandler.bind("treeLoaded", treeLoadedHandler);
$scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler);
$scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler);
$scope.$on('$destroy', function () {
$scope.dialogTreeEventHandler.unbind("treeLoaded", treeLoadedHandler);
$scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler);
$scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler);
});
});
|
var objLoader = new yOSON.Components.Loader(schema);
objLoader.init(yOSON.module, yOSON.controller, yOSON.action);
|
(function () {
'use strict';
var home = angular.module("flexget.home", ['angular.filter']);
registerPlugin(home);
home.run(function (route) {
route.register('home', '/home', 'home');
});
})();
|
const { test } = QUnit;
export default function(message, testFn) {
const isPhantom = navigator.userAgent.indexOf('PhantomJS') !== -1;
if (isPhantom) {
message = '[SKIPPED in PhantomJS] ' + message;
testFn = (assert) => assert.ok(true);
}
test(message, testFn);
}
|
IonicModule
.directive('ionHeaderBar', tapScrollToTopDirective())
/**
* @ngdoc directive
* @name ionHeaderBar
* @module ionic
* @restrict E
*
* @description
* Adds a fixed header bar above some content.
*
* Can also be a subheader (lower down) if the 'bar-subheader' class is applied.
* See [the header CSS docs](/docs/components/#subheader).
*
* @param {string=} align-title How to align the title. By default the title
* will be aligned the same as how the platform aligns its titles (iOS centers
* titles, Android aligns them left).
* Available: 'left', 'right', or 'center'. Defaults to the same as the platform.
* @param {boolean=} no-tap-scroll By default, the header bar will scroll the
* content to the top when tapped. Set no-tap-scroll to true to disable this
* behavior.
* Available: true or false. Defaults to false.
*
* @usage
* ```html
* <ion-header-bar align-title="left" class="bar-positive">
* <div class="buttons">
* <button class="button" ng-click="doSomething()">Left Button</button>
* </div>
* <h1 class="title">Title!</h1>
* <div class="buttons">
* <button class="button">Right Button</button>
* </div>
* </ion-header-bar>
* <ion-content>
* Some content!
* </ion-content>
* ```
*/
.directive('ionHeaderBar', headerFooterBarDirective(true))
/**
* @ngdoc directive
* @name ionFooterBar
* @module ionic
* @restrict E
*
* @description
* Adds a fixed footer bar below some content.
*
* Can also be a subfooter (higher up) if the 'bar-subfooter' class is applied.
* See [the footer CSS docs](/docs/components/#footer).
*
* Note: If you use ionFooterBar in combination with ng-if, the surrounding content
* will not align correctly. This will be fixed soon.
*
* @param {string=} align-title Where to align the title.
* Available: 'left', 'right', or 'center'. Defaults to 'center'.
*
* @usage
* ```html
* <ion-content>
* Some content!
* </ion-content>
* <ion-footer-bar align-title="left" class="bar-assertive">
* <div class="buttons">
* <button class="button">Left Button</button>
* </div>
* <h1 class="title">Title!</h1>
* <div class="buttons" ng-click="doSomething()">
* <button class="button">Right Button</button>
* </div>
* </ion-footer-bar>
* ```
*/
.directive('ionFooterBar', headerFooterBarDirective(false));
function tapScrollToTopDirective() {
return ['$ionicScrollDelegate', function($ionicScrollDelegate) {
return {
restrict: 'E',
link: function($scope, $element, $attr) {
if ($attr.noTapScroll == 'true') {
return;
}
ionic.on('tap', onTap, $element[0]);
$scope.$on('$destroy', function() {
ionic.off('tap', onTap, $element[0]);
});
function onTap(e) {
var depth = 3;
var current = e.target;
//Don't scroll to top in certain cases
while (depth-- && current) {
if (current.classList.contains('button') ||
current.tagName.match(/input|textarea|select/i) ||
current.isContentEditable) {
return;
}
current = current.parentNode;
}
var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];
var bounds = $element[0].getBoundingClientRect();
if (ionic.DomUtil.rectContains(
touch.pageX, touch.pageY,
bounds.left, bounds.top - 20,
bounds.left + bounds.width, bounds.top + bounds.height
)) {
$ionicScrollDelegate.scrollTop(true);
}
}
}
};
}];
}
function headerFooterBarDirective(isHeader) {
return [function() {
return {
restrict: 'E',
controller: '$ionicHeaderBar',
compile: function(tElement, $attr) {
tElement.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');
if (tElement[0].parentNode.querySelector('.tabs-top')) tElement.addClass('has-tabs-top');
return { pre: prelink };
function prelink($scope, $element, $attr, ctrl) {
if (isHeader) {
$scope.$watch(function() { return $element[0].className; }, function(value) {
var isShown = value.indexOf('ng-hide') === -1;
var isSubheader = value.indexOf('bar-subheader') !== -1;
$scope.$hasHeader = isShown && !isSubheader;
$scope.$hasSubheader = isShown && isSubheader;
});
$scope.$on('$destroy', function() {
delete $scope.$hasHeader;
delete $scope.$hasSubheader;
});
ctrl.align();
} else {
$scope.$watch(function() { return $element[0].className; }, function(value) {
var isShown = value.indexOf('ng-hide') === -1;
var isSubfooter = value.indexOf('bar-subfooter') !== -1;
$scope.$hasFooter = isShown && !isSubfooter;
$scope.$hasSubfooter = isShown && isSubfooter;
});
$scope.$on('$destroy', function() {
delete $scope.$hasFooter;
delete $scope.$hasSubfooter;
});
$scope.$watch('$hasTabs', function(val) {
$element.toggleClass('has-tabs', !!val);
});
}
}
}
};
}];
}
|
import { ChangeDetectionStrategy, Component, ContentChildren, ContentChild, Directive, ElementRef, EventEmitter, Input, Optional, Output, Renderer, ViewEncapsulation, NgZone } from '@angular/core';
import { isPresent, swipeShouldReset } from '../../util/util';
import { Item } from './item';
import { List } from '../list/list';
import { Platform } from '../../platform/platform';
import { DomController } from '../../platform/dom-controller';
const SWIPE_MARGIN = 30;
const ELASTIC_FACTOR = 0.55;
/**
* @name ItemOptions
* @description
* The option buttons for an `ion-item-sliding`. These buttons can be placed either on the left or right side.
* You can combine the `(ionSwipe)` event plus the `expandable` directive to create a full swipe action for the item.
*
* @usage
*
* ```html
* <ion-item-sliding>
* <ion-item>
* Item 1
* </ion-item>
* <ion-item-options side="right" (ionSwipe)="saveItem(item)">
* <button ion-button expandable (click)="saveItem(item)">
* <ion-icon name="star"></ion-icon>
* </button>
* </ion-item-options>
* </ion-item-sliding>
*```
*/
export class ItemOptions {
constructor(_elementRef, _renderer) {
this._elementRef = _elementRef;
this._renderer = _renderer;
/**
* @output {event} Emitted when the item has been fully swiped.
*/
this.ionSwipe = new EventEmitter();
}
/**
* @private
*/
getSides() {
if (isPresent(this.side) && this.side === 'left') {
return 1 /* Left */;
}
else {
return 2 /* Right */;
}
}
/**
* @private
*/
width() {
return this._elementRef.nativeElement.offsetWidth;
}
}
ItemOptions.decorators = [
{ type: Directive, args: [{
selector: 'ion-item-options',
},] },
];
/** @nocollapse */
ItemOptions.ctorParameters = [
{ type: ElementRef, },
{ type: Renderer, },
];
ItemOptions.propDecorators = {
'side': [{ type: Input },],
'ionSwipe': [{ type: Output },],
};
/**
* @name ItemSliding
* @description
* A sliding item is a list item that can be swiped to reveal buttons. It requires
* an [Item](../Item) component as a child and a [List](../../list/List) component as
* a parent. All buttons to reveal can be placed in the `<ion-item-options>` element.
*
* @usage
* ```html
* <ion-list>
* <ion-item-sliding #item>
* <ion-item>
* Item
* </ion-item>
* <ion-item-options side="left">
* <button ion-button (click)="favorite(item)">Favorite</button>
* <button ion-button color="danger" (click)="share(item)">Share</button>
* </ion-item-options>
*
* <ion-item-options side="right">
* <button ion-button (click)="unread(item)">Unread</button>
* </ion-item-options>
* </ion-item-sliding>
* </ion-list>
* ```
*
* ### Swipe Direction
* By default, the buttons are revealed when the sliding item is swiped from right to left,
* so the buttons are placed in the right side. But it's also possible to reveal them
* in the right side (sliding from left to right) by setting the `side` attribute
* on the `ion-item-options` element. Up to 2 `ion-item-options` can used at the same time
* in order to reveal two different sets of buttons depending the swipping direction.
*
* ```html
* <ion-item-options side="right">
* <button ion-button (click)="archive(item)">
* <ion-icon name="archive"></ion-icon>
* Archive
* </button>
* </ion-item-options>
*
* <ion-item-options side="left">
* <button ion-button (click)="archive(item)">
* <ion-icon name="archive"></ion-icon>
* Archive
* </button>
* </ion-item-options>
* ```
*
* ### Listening for events (ionDrag) and (ionSwipe)
* It's possible to know the current relative position of the sliding item by subscribing
* to the (ionDrag)` event.
*
* ```html
* <ion-item-sliding (ionDrag)="logDrag($event)">
* <ion-item>Item</ion-item>
* <ion-item-options>
* <button ion-button>Favorite</button>
* </ion-item-options>
* </ion-item-sliding>
* ```
*
* ### Button Layout
* If an icon is placed with text in the option button, by default it will
* display the icon on top of the text. This can be changed to display the icon
* to the left of the text by setting `icon-left` as an attribute on the
* `<ion-item-options>` element.
*
* ```html
* <ion-item-options icon-left>
* <button ion-button (click)="archive(item)">
* <ion-icon name="archive"></ion-icon>
* Archive
* </button>
* </ion-item-options>
*
* ```
*
*
* @demo /docs/v2/demos/src/item-sliding/
* @see {@link /docs/v2/components#lists List Component Docs}
* @see {@link ../Item Item API Docs}
* @see {@link ../../list/List List API Docs}
*/
export class ItemSliding {
constructor(list, _plt, _dom, _renderer, _elementRef, _zone) {
this._plt = _plt;
this._dom = _dom;
this._renderer = _renderer;
this._elementRef = _elementRef;
this._zone = _zone;
this._openAmount = 0;
this._startX = 0;
this._optsWidthRightSide = 0;
this._optsWidthLeftSide = 0;
this._tmr = null;
this._optsDirty = true;
this._state = 2 /* Disabled */;
/**
* @output {event} Emitted when the sliding position changes.
* It reports the relative position.
*
* ```ts
* ondrag(item) {
* let percent = item.getSlidingPercent();
* if (percent > 0) {
* // positive
* console.log('right side');
* } else {
* // negative
* console.log('left side');
* }
* if (Math.abs(percent) > 1) {
* console.log('overscroll');
* }
* }
* ```
*
*/
this.ionDrag = new EventEmitter();
list && list.containsSlidingItem(true);
_elementRef.nativeElement.$ionComponent = this;
this.setElementClass('item-wrapper', true);
}
set _itemOptions(itemOptions) {
let sides = 0;
// Reset left and right options in case they were removed
this._leftOptions = this._rightOptions = null;
for (var item of itemOptions.toArray()) {
var side = item.getSides();
if (side === 1 /* Left */) {
this._leftOptions = item;
}
else {
this._rightOptions = item;
}
sides |= item.getSides();
}
this._optsDirty = true;
this._sides = sides;
}
/**
* @private
*/
getOpenAmount() {
return this._openAmount;
}
/**
* @private
*/
getSlidingPercent() {
let openAmount = this._openAmount;
if (openAmount > 0) {
return openAmount / this._optsWidthRightSide;
}
else if (openAmount < 0) {
return openAmount / this._optsWidthLeftSide;
}
else {
return 0;
}
}
/**
* @private
*/
startSliding(startX) {
if (this._tmr) {
this._plt.cancelTimeout(this._tmr);
this._tmr = null;
}
if (this._openAmount === 0) {
this._optsDirty = true;
this._setState(4 /* Enabled */);
}
this._startX = startX + this._openAmount;
this.item.setElementStyle(this._plt.Css.transition, 'none');
}
/**
* @private
*/
moveSliding(x) {
if (this._optsDirty) {
this.calculateOptsWidth();
return;
}
let openAmount = (this._startX - x);
switch (this._sides) {
case 2 /* Right */:
openAmount = Math.max(0, openAmount);
break;
case 1 /* Left */:
openAmount = Math.min(0, openAmount);
break;
case 3 /* Both */: break;
case 0 /* None */: return;
default:
(void 0) /* assert */;
break;
}
if (openAmount > this._optsWidthRightSide) {
var optsWidth = this._optsWidthRightSide;
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
}
else if (openAmount < -this._optsWidthLeftSide) {
var optsWidth = -this._optsWidthLeftSide;
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
}
this._setOpenAmount(openAmount, false);
return openAmount;
}
/**
* @private
*/
endSliding(velocity) {
let restingPoint = (this._openAmount > 0)
? this._optsWidthRightSide
: -this._optsWidthLeftSide;
// Check if the drag didn't clear the buttons mid-point
// and we aren't moving fast enough to swipe open
let isResetDirection = (this._openAmount > 0) === !(velocity < 0);
let isMovingFast = Math.abs(velocity) > 0.3;
let isOnCloseZone = Math.abs(this._openAmount) < Math.abs(restingPoint / 2);
if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {
restingPoint = 0;
}
this._setOpenAmount(restingPoint, true);
this.fireSwipeEvent();
return restingPoint;
}
/**
* @private
*/
fireSwipeEvent() {
if (this._state & 32 /* SwipeRight */) {
this._zone.run(() => this._rightOptions.ionSwipe.emit(this));
}
else if (this._state & 64 /* SwipeLeft */) {
this._zone.run(() => this._leftOptions.ionSwipe.emit(this));
}
}
/**
* @private
*/
calculateOptsWidth() {
if (!this._optsDirty) {
return;
}
this._optsWidthRightSide = 0;
if (this._rightOptions) {
this._optsWidthRightSide = this._rightOptions.width();
(void 0) /* assert */;
}
this._optsWidthLeftSide = 0;
if (this._leftOptions) {
this._optsWidthLeftSide = this._leftOptions.width();
(void 0) /* assert */;
}
this._optsDirty = false;
}
_setOpenAmount(openAmount, isFinal) {
const platform = this._plt;
if (this._tmr) {
platform.cancelTimeout(this._tmr);
this._tmr = null;
}
this._openAmount = openAmount;
if (isFinal) {
this.item.setElementStyle(platform.Css.transition, '');
}
else {
if (openAmount > 0) {
let state = (openAmount >= (this._optsWidthRightSide + SWIPE_MARGIN))
? 8 /* Right */ | 32 /* SwipeRight */
: 8 /* Right */;
this._setState(state);
}
else if (openAmount < 0) {
let state = (openAmount <= (-this._optsWidthLeftSide - SWIPE_MARGIN))
? 16 /* Left */ | 64 /* SwipeLeft */
: 16 /* Left */;
this._setState(state);
}
}
if (openAmount === 0) {
this._tmr = platform.timeout(() => {
this._setState(2 /* Disabled */);
this._tmr = null;
}, 600);
this.item.setElementStyle(platform.Css.transform, '');
return;
}
this.item.setElementStyle(platform.Css.transform, `translate3d(${-openAmount}px,0,0)`);
let ionDrag = this.ionDrag;
if (ionDrag.observers.length > 0) {
ionDrag.emit(this);
}
}
_setState(state) {
if (state === this._state) {
return;
}
this.setElementClass('active-slide', (state !== 2 /* Disabled */));
this.setElementClass('active-options-right', !!(state & 8 /* Right */));
this.setElementClass('active-options-left', !!(state & 16 /* Left */));
this.setElementClass('active-swipe-right', !!(state & 32 /* SwipeRight */));
this.setElementClass('active-swipe-left', !!(state & 64 /* SwipeLeft */));
this._state = state;
}
/**
* Close the sliding item. Items can also be closed from the [List](../../list/List).
*
* The sliding item can be closed by grabbing a reference to `ItemSliding`. In the
* below example, the template reference variable `slidingItem` is placed on the element
* and passed to the `share` method.
*
* ```html
* <ion-list>
* <ion-item-sliding #slidingItem>
* <ion-item>
* Item
* </ion-item>
* <ion-item-options>
* <button ion-button (click)="share(slidingItem)">Share</button>
* </ion-item-options>
* </ion-item-sliding>
* </ion-list>
* ```
*
* ```ts
* import { Component } from '@angular/core';
* import { ItemSliding } from 'ionic-angular';
*
* @Component({...})
* export class MyClass {
* constructor() { }
*
* share(slidingItem: ItemSliding) {
* slidingItem.close();
* }
* }
* ```
*/
close() {
this._setOpenAmount(0, true);
}
/**
* @private
*/
setElementClass(cssClass, shouldAdd) {
this._renderer.setElementClass(this._elementRef.nativeElement, cssClass, shouldAdd);
}
}
ItemSliding.decorators = [
{ type: Component, args: [{
selector: 'ion-item-sliding',
template: `
<ng-content select="ion-item,[ion-item]"></ng-content>
<ng-content select="ion-item-options"></ng-content>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None
},] },
];
/** @nocollapse */
ItemSliding.ctorParameters = [
{ type: List, decorators: [{ type: Optional },] },
{ type: Platform, },
{ type: DomController, },
{ type: Renderer, },
{ type: ElementRef, },
{ type: NgZone, },
];
ItemSliding.propDecorators = {
'item': [{ type: ContentChild, args: [Item,] },],
'ionDrag': [{ type: Output },],
'_itemOptions': [{ type: ContentChildren, args: [ItemOptions,] },],
};
//# sourceMappingURL=item-sliding.js.map |
var controlCajaApp = angular.module('controlCajaApp', ['ngRoute']);
controlCajaApp.config(function ($routeProvider) {
$routeProvider
.when('/', {
controller: 'ControlCajaCtrl',
controllerAs: 'controlCaja',
templateUrl: 'total.html'
})
.when('/nuevo', {
controller: 'ControlCajaCtrl',
controllerAs: 'controlCaja',
templateUrl: 'nuevo.html'
})
.when('/lista', {
controller: 'ControlCajaCtrl',
controllerAs: 'controlCaja',
templateUrl: 'lista.html'
})
.otherwise({
redirectTo: '/'
});
}); |
var _ = require('underscore');
var util = require('util');
var fs = require('fs');
var mkdirp = require('mkdirp');
var getGames = function(data) {
var yearsKey = data.start.substring(2) + '-' + data.end.substring(2);
var items = _.filter(data.matches,
{ 'Div': data.division, 'Years': yearsKey }
);
items.forEach(function(g) {
var parts = g.Date.split('/');
g.Date = new Date(parts[2], parts[1]-1, parts[0]);
});
return _.sortBy(items, function(o) { return -o.Date.dateTime; });
}
var getGamesByMatchdays = function(data){
var items = data.games;
var size = Math.floor(data.teams.length/2);
console.log(util.format("%s %s %s teams -> %s matchday size",
data.division,
data.start + "-"+ data.end,
data.teams.length, size));
var matchdays = _.groupBy(items, function(element, index){
return Math.floor(index/size);
});
return matchdays;
}
var getYears = function(start, end, seperator){
return util.format("%s%s%s", start, seperator, end.substring(2));
}
var createList = function(header, items) {
var txt = header + ":\n";
items.forEach(function(i) {
txt += "- " + i + "\n";
});
return txt + "\n";
}
var createSeasonInfo = function(data){
var txt = '';
_.keys(data).forEach(function (k) {
txt += k + ": " + data[k] + "\n";
});
return txt + "\n";
}
var getUniqueTeams = function(data){
var homes = _.chain(data.games).pluck('HomeTeam').value();
var aways = _.chain(data.games).pluck('HomeTeam').value();
var teams = _.uniq(_.union(homes, aways)).sort();
return teams;
}
var createHeader = function(data){
var text = "";
text += "############################\n";
text += util.format("# %s %s-%s", data.title, data.start, data.end);
text += "\n";
text += "\n";
return text;
}
var saveToFile = function(file, text){
fs.writeFile(file, text, function(err) {
if(err) {
console.log(err);
} else {
console.log("The file was saved as " + file);
}
});
}
var getFileName = function(data, ext){
var title = (data.title.replace(" ", '') + data.division.substring(1)).toLowerCase();
if (ext == "txt") data.files.push(title);
return data.outputPath + data.years + '/' + title + "." + ext;
}
var createYaml = function(data){
mkdirp(data.outputPath + data.years, function(err) {});
var txt = createHeader(data);
var season = {
'league': data.country,
'season': data.start + "/" + data.end.substring(2), //2012/13
'start_at': data.startingDate
};
txt += createSeasonInfo(season);
txt += createList('fixtures', data.files);
txt += createList(data.teams.length + " teams", data.teams);
saveToFile(getFileName(data, "yml"), txt);
}
var createFixtues = function(data) {
mkdirp(data.outputPath + data.years, function(err) {});
var text = createHeader(data);
var matchdays = getGamesByMatchdays(data);
_.keys(matchdays).forEach(function(d) {
text += "Matchday " + (parseInt(d) + 1) + "\n\n";
var lastDate = new Date();
matchdays[d].forEach(function(g) {
if (lastDate.getTime() != g.Date.getTime()) {
text += g.Date.format("[Y-m-d]") + "\n";
lastDate = g.Date;
}
text += "\t";
text += "15.00\t\t"
text += g.HomeTeam + "\t";
text += g.FTHG + "-" + g.FTAG + "\t";
text += g.AwayTeam + "\n";
});
text += "\n";
});
var file = getFileName(data, "txt")
saveToFile(file, text);
}
var loadData = function(data) {
data.games = getGames(data);
data.teams = getUniqueTeams(data);
if (data.games.length > 0) {
data.startingDate = _.min(_.pluck(data.games, 'Date')).format('Y-m-d');
}
data.files = [];
data.years = util.format("%s-%s", data.start, data.end.substring(2));
data.yearsKey = util.format("%s %s", data.start.substring(2), data.end.substring(2));
}
var openFootballUtil = function() {
this.createYaml = createYaml;
this.createFixtues = createFixtues;
this.loadData = loadData;
};
module.exports = openFootballUtil;
|
var gulp = require('gulp');
var path = require('path');
var $ = require('gulp-load-plugins')();
var del = require('del');
var environment = $.util.env.type || 'development';
var isProduction = environment === 'production';
var webpackConfig = require('./webpack.config.js')[environment];
var port = $.util.env.port || 1337;
var src = 'src/';
var dist = 'dist/';
var autoprefixerBrowsers = [
'ie >= 9',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 6',
'opera >= 23',
'ios >= 6',
'android >= 4.4',
'bb >= 10'
];
gulp.task('scripts', function() {
return gulp.src(webpackConfig.entry)
.pipe($.webpack(webpackConfig))
.pipe(isProduction ? $.uglifyjs() : $.util.noop())
.pipe(gulp.dest(dist + 'js/'))
.pipe($.size({ title : 'js' }))
.pipe($.connect.reload());
});
gulp.task('html', function() {
return gulp.src(src + 'index.html')
.pipe(gulp.dest(dist))
.pipe($.size({ title : 'html' }))
.pipe($.connect.reload());
});
gulp.task('styles',function(cb) {
return gulp.src(src + 'stylus/main.styl')
.pipe($.stylus({
compress: isProduction,
'include css' : true
}))
.pipe($.autoprefixer({browsers: autoprefixerBrowsers}))
.pipe(gulp.dest(dist + 'css/'))
.pipe($.size({ title : 'css' }))
.pipe($.connect.reload());
});
gulp.task('serve', function() {
$.connect.server({
root: dist,
port: port,
livereload: {
port: 35728
}
});
});
gulp.task('static', function(cb) {
return gulp.src(src + 'static/**/*')
.pipe($.size({ title : 'static' }))
.pipe(gulp.dest(dist + 'static/'));
});
gulp.task('watch', function() {
gulp.watch(src + 'stylus/*.styl', ['styles']);
gulp.watch(src + 'index.html', ['html']);
gulp.watch(src + 'app/**/*.js', ['scripts']);
});
gulp.task('clean', function(cb) {
del([dist], cb);
});
// by default build project and then watch files in order to trigger livereload
gulp.task('default', ['build', 'serve', 'watch']);
// waits until clean is finished then builds the project
gulp.task('build', ['clean'], function(){
gulp.start(['static', 'html','scripts','styles']);
});
|
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.GPX');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.proj');
goog.require('ol.source.BingMaps');
goog.require('ol.source.GPX');
goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
goog.require('ol.style.Style');
var projection = ol.proj.get('EPSG:3857');
var raster = new ol.layer.Tile({
source: new ol.source.BingMaps({
imagerySet: 'Aerial',
key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3'
})
});
var style = {
'Point': [new ol.style.Style({
image: new ol.style.Circle({
fill: new ol.style.Fill({
color: 'rgba(255,255,0,0.4)'
}),
radius: 5,
stroke: new ol.style.Stroke({
color: '#ff0',
width: 1
})
})
})],
'LineString': [new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#f00',
width: 3
})
})],
'MultiLineString': [new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#0f0',
width: 3
})
})]
};
var vector = new ol.layer.Vector({
source: new ol.source.GPX({
projection: projection,
url: 'data/gpx/fells_loop.gpx'
}),
style: function(feature, resolution) {
return style[feature.getGeometry().getType()];
}
});
var map = new ol.Map({
layers: [raster, vector],
target: document.getElementById('map'),
view: new ol.View({
center: [-7916041.528716288, 5228379.045749711],
zoom: 12
})
});
var displayFeatureInfo = function(pixel) {
var features = [];
map.forEachFeatureAtPixel(pixel, function(feature, layer) {
features.push(feature);
});
if (features.length > 0) {
var info = [];
var i, ii;
for (i = 0, ii = features.length; i < ii; ++i) {
info.push(features[i].get('desc'));
}
document.getElementById('info').innerHTML = info.join(', ') || '(unknown)';
map.getTarget().style.cursor = 'pointer';
} else {
document.getElementById('info').innerHTML = ' ';
map.getTarget().style.cursor = '';
}
};
$(map.getViewport()).on('mousemove', function(evt) {
var pixel = map.getEventPixel(evt.originalEvent);
displayFeatureInfo(pixel);
});
map.on('click', function(evt) {
displayFeatureInfo(evt.pixel);
});
var exportGPXElement = document.getElementById('export-gpx');
if ('download' in exportGPXElement) {
var vectorSource = /** @type {ol.source.Vector} */ (vector.getSource());
exportGPXElement.addEventListener('click', function(e) {
if (!exportGPXElement.href) {
var features = [];
vectorSource.forEachFeature(function(feature) {
var clone = feature.clone();
clone.getGeometry().transform(projection, 'EPSG:4326');
features.push(clone);
});
var node = new ol.format.GPX().writeFeatures(features);
var string = new XMLSerializer().serializeToString(
/** @type {Node} */ (node));
var base64 = exampleNS.strToBase64(string);
exportGPXElement.href =
'data:gpx+xml;base64,' + base64;
}
}, false);
} else {
var info = document.getElementById('no-download');
/**
* display error message
*/
info.style.display = '';
}
|
import {UPDATE_JWT, UNAUTHENTICATED_ERROR} from 'src/common/actions/types'
const initialState = {
currentUser: null,
lgJWT: null,
isBusy: false,
}
export default function auth(state = initialState, action) {
switch (action.type) {
case UNAUTHENTICATED_ERROR:
return Object.assign({}, state, {
currentUser: null,
})
case UPDATE_JWT:
return Object.assign({}, state, {
lgJWT: action.lgJWT,
})
default:
return state
}
}
|
/**
*
* Get tag name of a DOM-element found by given selector.
*
* <example>
:index.html
<div id="elem">Lorem ipsum</div>
:getTagNameAsync.js
client.getTagName('#elem').then(function(tagName) {
console.log(tagName); // outputs: "div"
});
:getTagNameSync.js
it('should demonstrate the getTagName command', function () {
var elem = browser.element('#elem');
var tagName = elem.getTagName();
console.log(tagName); // outputs: "div"
})
* </example>
*
* @param {String} selector element with requested tag name
* @returns {String|String[]} the element's tag name, as a lowercase string
*
* @uses protocol/elements, protocol/elementIdName
* @type property
*
*/
import { CommandError } from '../utils/ErrorHandler'
let getTagName = function (selector) {
return this.elements(selector).then((res) => {
/**
* throw NoSuchElement error if no element was found
*/
if (!res.value || res.value.length === 0) {
throw new CommandError(7)
}
let elementIdNameCommands = []
for (let elem of res.value) {
elementIdNameCommands.push(this.elementIdName(elem.ELEMENT))
}
return Promise.all(elementIdNameCommands)
}).then((tagNames) => {
tagNames = tagNames.map((tagName) => tagName.value.toLowerCase())
return tagNames.length === 1 ? tagNames[0] : tagNames
})
}
export default getTagName
|
define(['jquery', 'domReady!'], function ($) {
'use strict';
/**
* scroll to the bottom of text
*/
function consoleScroll() {
var logData = document.getElementById('log_data'),
dh = logData.scrollHeight,
ch = logData.clientHeight;
if (dh > ch) {
logData.scrollTop = dh - ch;
}
}
/**
* Update elements
* @param {String} log
* @param {String} url
*/
function doUpdate(log, url) {
$.post(url, {
log: log
}, function (json) {
$('#log_data').html(json.content);
$('#connector-log-header').html(json.header);
consoleScroll();
});
}
/**
* Export/return log updater
* @param {Object} logUpdater
*/
return function (logUpdater) {
consoleScroll();
//Observer select
$('#connector-log-selector').change(function () {
doUpdate($('#connector-log-selector').val(), logUpdater.url);
});
//Observe button click for reload
$('#connector-log-reloader').click(function () {
doUpdate($('#connector-log-selector').val(), logUpdater.url);
});
};
});
|
/**
* @author Adam Meadows [@job13er](https://github.com/job13er)
* @copyright 2015 Ciena Corporation. All rightst reserverd.
*/
/* eslint-disable max-nested-callbacks */
import _ from 'lodash';
import $ from 'jquery';
import React from 'react/addons';
import rewireComponents, {createStubComponent} from 'beaker/lib/jasmine/rewire-components';
describe('rewireComponents()', () => {
let rewireDepsSpy, createStubComponentSpy, rewiredModule;
beforeEach(() => {
rewireDepsSpy = jasmine.createSpy('rewireDeps');
createStubComponentSpy = jasmine.createSpy('createStubComponent').and.callFake((name, props) => {
return _.assign({name}, props);
});
rewireComponents.__Rewire__('rewireDeps', rewireDepsSpy);
rewireComponents.__Rewire__('createStubComponent', createStubComponentSpy);
rewiredModule = {name: 'my-module'};
});
afterEach(() => {
rewireComponents.__ResetDependency__('rewireDeps');
rewireComponents.__ResetDependency__('createStubComponent');
});
describe('simple components', () => {
beforeEach(() => {
rewireComponents(rewiredModule, ['Foo', 'Bar', 'Baz']);
});
it('calls rewireDeps()', () => {
expect(rewireDepsSpy).toHaveBeenCalledWith(rewiredModule, {
'Foo': {name: 'Foo'},
'Bar': {name: 'Bar'},
'Baz': {name: 'Baz'},
});
});
});
describe('complex components', () => {
beforeEach(() => {
rewireComponents(rewiredModule, {
'Foo': {foo: 'foo'},
'Bar': {bar: 'bar'},
'Baz': {baz: 'baz'},
});
});
it('calls rewireDeps()', () => {
expect(rewireDepsSpy).toHaveBeenCalledWith(rewiredModule, {
'Foo': {name: 'Foo', foo: 'foo'},
'Bar': {name: 'Bar', bar: 'bar'},
'Baz': {name: 'Baz', baz: 'baz'},
});
});
});
});
describe('createStubComponent()', () => {
let component, ComponentClass;
beforeEach(() => {
ComponentClass = createStubComponent('ComponentClass');
component = React.addons.TestUtils.renderIntoDocument(
<ComponentClass />
);
});
it('renders expected DOM', () => {
expect($(React.findDOMNode(component))).toHaveClass('stub');
expect($(React.findDOMNode(component))).toHaveClass('ComponentClass');
});
});
|
/* eslint-disable */
;(function(root, factory) {
if (typeof define === 'function' && define.amd) { // AMD
define(['../core'], factory);
} else if (typeof exports === 'object') { // Node.js
module.exports = factory(require('../core'));
} else { // Browser
root.Blockly.Msg = factory(root.Blockly);
}
}(this, function(Blockly) {
var Blockly = {};Blockly.Msg={};// This file was automatically generated. Do not modify.
'use strict';
Blockly.Msg["ADD_COMMENT"] = "Add Comment"; // untranslated
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
Blockly.Msg["CHANGE_VALUE_TITLE"] = "Change value:"; // untranslated
Blockly.Msg["CLEAN_UP"] = "Clean up Blocks"; // untranslated
Blockly.Msg["COLLAPSED_WARNINGS_WARNING"] = "Collapsed blocks contain warnings."; // untranslated
Blockly.Msg["COLLAPSE_ALL"] = "Collapse Blocks"; // untranslated
Blockly.Msg["COLLAPSE_BLOCK"] = "Collapse Block"; // untranslated
Blockly.Msg["COLOUR_BLEND_COLOUR1"] = "colour 1"; // untranslated
Blockly.Msg["COLOUR_BLEND_COLOUR2"] = "colour 2"; // untranslated
Blockly.Msg["COLOUR_BLEND_HELPURL"] = "https://meyerweb.com/eric/tools/color-blend/#:::rgbp"; // untranslated
Blockly.Msg["COLOUR_BLEND_RATIO"] = "ratio"; // untranslated
Blockly.Msg["COLOUR_BLEND_TITLE"] = "blend"; // untranslated
Blockly.Msg["COLOUR_BLEND_TOOLTIP"] = "Blends two colours together with a given ratio (0.0 - 1.0)."; // untranslated
Blockly.Msg["COLOUR_PICKER_HELPURL"] = "https://en.wikipedia.org/wiki/Color"; // untranslated
Blockly.Msg["COLOUR_PICKER_TOOLTIP"] = "Choose a colour from the palette."; // untranslated
Blockly.Msg["COLOUR_RANDOM_HELPURL"] = "http://randomcolour.com"; // untranslated
Blockly.Msg["COLOUR_RANDOM_TITLE"] = "random colour"; // untranslated
Blockly.Msg["COLOUR_RANDOM_TOOLTIP"] = "Choose a colour at random."; // untranslated
Blockly.Msg["COLOUR_RGB_BLUE"] = "blue"; // untranslated
Blockly.Msg["COLOUR_RGB_GREEN"] = "green"; // untranslated
Blockly.Msg["COLOUR_RGB_HELPURL"] = "https://www.december.com/html/spec/colorpercompact.html"; // untranslated
Blockly.Msg["COLOUR_RGB_RED"] = "red"; // untranslated
Blockly.Msg["COLOUR_RGB_TITLE"] = "colour with"; // untranslated
Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "break out of loop"; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "continue with next iteration of loop"; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK"] = "Break out of the containing loop."; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE"] = "Skip the rest of this loop, and continue with the next iteration."; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_WARNING"] = "Warning: This block may only be used within a loop."; // untranslated
Blockly.Msg["CONTROLS_FOREACH_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
Blockly.Msg["CONTROLS_FOREACH_TITLE"] = "for each item %1 in list %2"; // untranslated
Blockly.Msg["CONTROLS_FOREACH_TOOLTIP"] = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated
Blockly.Msg["CONTROLS_FOR_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
Blockly.Msg["CONTROLS_FOR_TITLE"] = "count with %1 from %2 to %3 by %4"; // untranslated
Blockly.Msg["CONTROLS_FOR_TOOLTIP"] = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks."; // untranslated
Blockly.Msg["CONTROLS_IF_ELSEIF_TOOLTIP"] = "Add a condition to the if block."; // untranslated
Blockly.Msg["CONTROLS_IF_ELSE_TOOLTIP"] = "Add a final, catch-all condition to the if block."; // untranslated
Blockly.Msg["CONTROLS_IF_HELPURL"] = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
Blockly.Msg["CONTROLS_IF_IF_TOOLTIP"] = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated
Blockly.Msg["CONTROLS_IF_MSG_ELSE"] = "else"; // untranslated
Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"] = "else if"; // untranslated
Blockly.Msg["CONTROLS_IF_MSG_IF"] = "if"; // untranslated
Blockly.Msg["CONTROLS_IF_TOOLTIP_1"] = "If a value is true, then do some statements."; // untranslated
Blockly.Msg["CONTROLS_IF_TOOLTIP_2"] = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated
Blockly.Msg["CONTROLS_IF_TOOLTIP_3"] = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements."; // untranslated
Blockly.Msg["CONTROLS_IF_TOOLTIP_4"] = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements."; // untranslated
Blockly.Msg["CONTROLS_REPEAT_HELPURL"] = "https://en.wikipedia.org/wiki/For_loop"; // untranslated
Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"] = "do"; // untranslated
Blockly.Msg["CONTROLS_REPEAT_TITLE"] = "repeat %1 times"; // untranslated
Blockly.Msg["CONTROLS_REPEAT_TOOLTIP"] = "Do some statements several times."; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_UNTIL"] = "repeat until"; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_WHILE"] = "repeat while"; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "While a value is false, then do some statements."; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "While a value is true, then do some statements."; // untranslated
Blockly.Msg["DELETE_ALL_BLOCKS"] = "Delete all %1 blocks?"; // untranslated
Blockly.Msg["DELETE_BLOCK"] = "Delete Block"; // untranslated
Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable"; // untranslated
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?"; // untranslated
Blockly.Msg["DELETE_X_BLOCKS"] = "Delete %1 Blocks"; // untranslated
Blockly.Msg["DIALOG_CANCEL"] = "Aoka ihany";
Blockly.Msg["DIALOG_OK"] = "OK";
Blockly.Msg["DISABLE_BLOCK"] = "Disable Block"; // untranslated
Blockly.Msg["DUPLICATE_BLOCK"] = "Duplicate"; // untranslated
Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment"; // untranslated
Blockly.Msg["ENABLE_BLOCK"] = "Enable Block"; // untranslated
Blockly.Msg["EXPAND_ALL"] = "Expand Blocks"; // untranslated
Blockly.Msg["EXPAND_BLOCK"] = "Expand Block"; // untranslated
Blockly.Msg["EXTERNAL_INPUTS"] = "External Inputs"; // untranslated
Blockly.Msg["HELP"] = "Help"; // untranslated
Blockly.Msg["INLINE_INPUTS"] = "Inline Inputs"; // untranslated
Blockly.Msg["IOS_CANCEL"] = "Cancel"; // untranslated
Blockly.Msg["IOS_ERROR"] = "Error"; // untranslated
Blockly.Msg["IOS_OK"] = "OK"; // untranslated
Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Add Input"; // untranslated
Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Allow statements"; // untranslated
Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "This function has duplicate inputs."; // untranslated
Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "INPUTS"; // untranslated
Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Add"; // untranslated
Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+ Add Variable"; // untranslated
Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Delete"; // untranslated
Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "You can't use an empty variable name."; // untranslated
Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Rename"; // untranslated
Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Variable name"; // untranslated
Blockly.Msg["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
Blockly.Msg["LISTS_CREATE_EMPTY_TITLE"] = "create empty list"; // untranslated
Blockly.Msg["LISTS_CREATE_EMPTY_TOOLTIP"] = "Returns a list, of length 0, containing no data records"; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TITLE_ADD"] = "list"; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TOOLTIP"] = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_INPUT_WITH"] = "create list with"; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_ITEM_TOOLTIP"] = "Add an item to the list."; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_TOOLTIP"] = "Create a list with any number of items."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_FIRST"] = "first"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_FROM_END"] = "# from end"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_FROM_START"] = "#"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_GET"] = "get"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_GET_REMOVE"] = "get and remove"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_LAST"] = "last"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_RANDOM"] = "random"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_REMOVE"] = "remove"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TAIL"] = ""; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FIRST"] = "Returns the first item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FROM"] = "Returns the item at the specified position in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_LAST"] = "Returns the last item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_RANDOM"] = "Returns a random item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST"] = "Removes and returns the first item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM"] = "Removes and returns the item at the specified position in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST"] = "Removes and returns the last item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM"] = "Removes and returns a random item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST"] = "Removes the first item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM"] = "Removes the item at the specified position in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST"] = "Removes the last item in a list."; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM"] = "Removes a random item in a list."; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_END"] = "to # from end"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_START"] = "to #"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_END_LAST"] = "to last"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_START_FIRST"] = "get sub-list from first"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_END"] = "get sub-list from # from end"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_START"] = "get sub-list from #"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_TAIL"] = ""; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_TOOLTIP"] = "Creates a copy of the specified portion of a list."; // untranslated
Blockly.Msg["LISTS_INDEX_FROM_END_TOOLTIP"] = "%1 is the last item."; // untranslated
Blockly.Msg["LISTS_INDEX_FROM_START_TOOLTIP"] = "%1 is the first item."; // untranslated
Blockly.Msg["LISTS_INDEX_OF_FIRST"] = "find first occurrence of item"; // untranslated
Blockly.Msg["LISTS_INDEX_OF_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
Blockly.Msg["LISTS_INDEX_OF_LAST"] = "find last occurrence of item"; // untranslated
Blockly.Msg["LISTS_INDEX_OF_TOOLTIP"] = "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found."; // untranslated
Blockly.Msg["LISTS_INLIST"] = "in list"; // untranslated
Blockly.Msg["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
Blockly.Msg["LISTS_ISEMPTY_TITLE"] = "%1 is empty"; // untranslated
Blockly.Msg["LISTS_ISEMPTY_TOOLTIP"] = "Returns true if the list is empty."; // untranslated
Blockly.Msg["LISTS_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
Blockly.Msg["LISTS_LENGTH_TITLE"] = "length of %1"; // untranslated
Blockly.Msg["LISTS_LENGTH_TOOLTIP"] = "Returns the length of a list."; // untranslated
Blockly.Msg["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg["LISTS_REPEAT_TITLE"] = "create list with item %1 repeated %2 times"; // untranslated
Blockly.Msg["LISTS_REPEAT_TOOLTIP"] = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated
Blockly.Msg["LISTS_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
Blockly.Msg["LISTS_REVERSE_MESSAGE0"] = "reverse %1"; // untranslated
Blockly.Msg["LISTS_REVERSE_TOOLTIP"] = "Reverse a copy of a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_INPUT_TO"] = "as"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_INSERT"] = "insert at"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_SET"] = "set"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST"] = "Inserts the item at the start of a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FROM"] = "Inserts the item at the specified position in a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_LAST"] = "Append the item to the end of a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM"] = "Inserts the item randomly in a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FIRST"] = "Sets the first item in a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Sets the item at the specified position in a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Sets the last item in a list."; // untranslated
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Sets a random item in a list."; // untranslated
Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "ascending"; // untranslated
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "descending"; // untranslated
Blockly.Msg["LISTS_SORT_TITLE"] = "sort %1 %2 %3"; // untranslated
Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Sort a copy of a list."; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "alphabetic, ignore case"; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "numeric"; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "alphabetic"; // untranslated
Blockly.Msg["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "make list from text"; // untranslated
Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "make text from list"; // untranslated
Blockly.Msg["LISTS_SPLIT_TOOLTIP_JOIN"] = "Join a list of texts into one text, separated by a delimiter."; // untranslated
Blockly.Msg["LISTS_SPLIT_TOOLTIP_SPLIT"] = "Split text into a list of texts, breaking at each delimiter."; // untranslated
Blockly.Msg["LISTS_SPLIT_WITH_DELIMITER"] = "with delimiter"; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_FALSE"] = "false"; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_TOOLTIP"] = "Returns either true or false."; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_TRUE"] = "true"; // untranslated
Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_EQ"] = "Return true if both inputs equal each other."; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GT"] = "Return true if the first input is greater than the second input."; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GTE"] = "Return true if the first input is greater than or equal to the second input."; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LT"] = "Return true if the first input is smaller than the second input."; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LTE"] = "Return true if the first input is smaller than or equal to the second input."; // untranslated
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_NEQ"] = "Return true if both inputs are not equal to each other."; // untranslated
Blockly.Msg["LOGIC_NEGATE_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
Blockly.Msg["LOGIC_NEGATE_TITLE"] = "not %1"; // untranslated
Blockly.Msg["LOGIC_NEGATE_TOOLTIP"] = "Returns true if the input is false. Returns false if the input is true."; // untranslated
Blockly.Msg["LOGIC_NULL"] = "null"; // untranslated
Blockly.Msg["LOGIC_NULL_HELPURL"] = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
Blockly.Msg["LOGIC_NULL_TOOLTIP"] = "Returns null."; // untranslated
Blockly.Msg["LOGIC_OPERATION_AND"] = "and"; // untranslated
Blockly.Msg["LOGIC_OPERATION_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
Blockly.Msg["LOGIC_OPERATION_OR"] = "or"; // untranslated
Blockly.Msg["LOGIC_OPERATION_TOOLTIP_AND"] = "Return true if both inputs are true."; // untranslated
Blockly.Msg["LOGIC_OPERATION_TOOLTIP_OR"] = "Return true if at least one of the inputs is true."; // untranslated
Blockly.Msg["LOGIC_TERNARY_CONDITION"] = "test"; // untranslated
Blockly.Msg["LOGIC_TERNARY_HELPURL"] = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
Blockly.Msg["LOGIC_TERNARY_IF_FALSE"] = "if false"; // untranslated
Blockly.Msg["LOGIC_TERNARY_IF_TRUE"] = "if true"; // untranslated
Blockly.Msg["LOGIC_TERNARY_TOOLTIP"] = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
Blockly.Msg["MATH_ADDITION_SYMBOL"] = "+"; // untranslated
Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Return the sum of the two numbers."; // untranslated
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Return the quotient of the two numbers."; // untranslated
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Return the difference of the two numbers."; // untranslated
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Return the product of the two numbers."; // untranslated
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Return the first number raised to the power of the second number."; // untranslated
Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2"; // untranslated
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2"; // untranslated
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in degrees from -180 to 180."; // untranslated
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
Blockly.Msg["MATH_CHANGE_TITLE"] = "change %1 by %2"; // untranslated
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Add a number to variable '%1'."; // untranslated
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated
Blockly.Msg["MATH_CONSTRAIN_TITLE"] = "constrain %1 low %2 high %3"; // untranslated
Blockly.Msg["MATH_CONSTRAIN_TOOLTIP"] = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
Blockly.Msg["MATH_DIVISION_SYMBOL"] = "÷"; // untranslated
Blockly.Msg["MATH_IS_DIVISIBLE_BY"] = "is divisible by"; // untranslated
Blockly.Msg["MATH_IS_EVEN"] = "is even"; // untranslated
Blockly.Msg["MATH_IS_NEGATIVE"] = "is negative"; // untranslated
Blockly.Msg["MATH_IS_ODD"] = "is odd"; // untranslated
Blockly.Msg["MATH_IS_POSITIVE"] = "is positive"; // untranslated
Blockly.Msg["MATH_IS_PRIME"] = "is prime"; // untranslated
Blockly.Msg["MATH_IS_TOOLTIP"] = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
Blockly.Msg["MATH_IS_WHOLE"] = "is whole"; // untranslated
Blockly.Msg["MATH_MODULO_HELPURL"] = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
Blockly.Msg["MATH_MODULO_TITLE"] = "remainder of %1 ÷ %2"; // untranslated
Blockly.Msg["MATH_MODULO_TOOLTIP"] = "Return the remainder from dividing the two numbers."; // untranslated
Blockly.Msg["MATH_MULTIPLICATION_SYMBOL"] = "×"; // untranslated
Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://en.wikipedia.org/wiki/Number"; // untranslated
Blockly.Msg["MATH_NUMBER_TOOLTIP"] = "A number."; // untranslated
Blockly.Msg["MATH_ONLIST_HELPURL"] = ""; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_AVERAGE"] = "average of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_MAX"] = "max of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_MEDIAN"] = "median of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_MIN"] = "min of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_MODE"] = "modes of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_RANDOM"] = "random item of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_STD_DEV"] = "standard deviation of list"; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_SUM"] = "sum of list"; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_MAX"] = "Return the largest number in the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_MEDIAN"] = "Return the median number in the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_MIN"] = "Return the smallest number in the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_MODE"] = "Return a list of the most common item(s) in the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_RANDOM"] = "Return a random element from the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Return the standard deviation of the list."; // untranslated
Blockly.Msg["MATH_ONLIST_TOOLTIP_SUM"] = "Return the sum of all the numbers in the list."; // untranslated
Blockly.Msg["MATH_POWER_SYMBOL"] = "^"; // untranslated
Blockly.Msg["MATH_RANDOM_FLOAT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
Blockly.Msg["MATH_RANDOM_FLOAT_TITLE_RANDOM"] = "random fraction"; // untranslated
Blockly.Msg["MATH_RANDOM_FLOAT_TOOLTIP"] = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
Blockly.Msg["MATH_RANDOM_INT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
Blockly.Msg["MATH_RANDOM_INT_TITLE"] = "random integer from %1 to %2"; // untranslated
Blockly.Msg["MATH_RANDOM_INT_TOOLTIP"] = "Return a random integer between the two specified limits, inclusive."; // untranslated
Blockly.Msg["MATH_ROUND_HELPURL"] = "https://en.wikipedia.org/wiki/Rounding"; // untranslated
Blockly.Msg["MATH_ROUND_OPERATOR_ROUND"] = "round"; // untranslated
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDDOWN"] = "round down"; // untranslated
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDUP"] = "round up"; // untranslated
Blockly.Msg["MATH_ROUND_TOOLTIP"] = "Round a number up or down."; // untranslated
Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Square_root"; // untranslated
Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE"] = "absolute"; // untranslated
Blockly.Msg["MATH_SINGLE_OP_ROOT"] = "square root"; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_ABS"] = "Return the absolute value of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_EXP"] = "Return e to the power of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_LN"] = "Return the natural logarithm of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_LOG10"] = "Return the base 10 logarithm of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_NEG"] = "Return the negation of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_POW10"] = "Return 10 to the power of a number."; // untranslated
Blockly.Msg["MATH_SINGLE_TOOLTIP_ROOT"] = "Return the square root of a number."; // untranslated
Blockly.Msg["MATH_SUBTRACTION_SYMBOL"] = "-"; // untranslated
Blockly.Msg["MATH_TRIG_ACOS"] = "acos"; // untranslated
Blockly.Msg["MATH_TRIG_ASIN"] = "asin"; // untranslated
Blockly.Msg["MATH_TRIG_ATAN"] = "atan"; // untranslated
Blockly.Msg["MATH_TRIG_COS"] = "cos"; // untranslated
Blockly.Msg["MATH_TRIG_HELPURL"] = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated
Blockly.Msg["MATH_TRIG_SIN"] = "sin"; // untranslated
Blockly.Msg["MATH_TRIG_TAN"] = "tan"; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_ACOS"] = "Return the arccosine of a number."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_ASIN"] = "Return the arcsine of a number."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Return the arctangent of a number."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_COS"] = "Return the cosine of a degree (not radian)."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_SIN"] = "Return the sine of a degree (not radian)."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_TAN"] = "Return the tangent of a degree (not radian)."; // untranslated
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Create colour variable..."; // untranslated
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Create number variable..."; // untranslated
Blockly.Msg["NEW_STRING_VARIABLE"] = "Create string variable..."; // untranslated
Blockly.Msg["NEW_VARIABLE"] = "Create variable..."; // untranslated
Blockly.Msg["NEW_VARIABLE_TITLE"] = "New variable name:"; // untranslated
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "New variable type:"; // untranslated
Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = ""; // untranslated
Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "allow statements"; // untranslated
Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "with:"; // untranslated
Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Run the user-defined function '%1'."; // untranslated
Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Run the user-defined function '%1' and use its output."; // untranslated
Blockly.Msg["PROCEDURES_CALL_BEFORE_PARAMS"] = "with:"; // untranslated
Blockly.Msg["PROCEDURES_CREATE_DO"] = "Create '%1'"; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Describe this function..."; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = ""; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"] = "do something"; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"] = "to"; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_TOOLTIP"] = "Creates a function with no output."; // untranslated
Blockly.Msg["PROCEDURES_DEFRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_DEFRETURN_RETURN"] = "return"; // untranslated
Blockly.Msg["PROCEDURES_DEFRETURN_TOOLTIP"] = "Creates a function with an output."; // untranslated
Blockly.Msg["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Warning: This function has duplicate parameters."; // untranslated
Blockly.Msg["PROCEDURES_HIGHLIGHT_DEF"] = "Highlight function definition"; // untranslated
Blockly.Msg["PROCEDURES_IFRETURN_HELPURL"] = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
Blockly.Msg["PROCEDURES_IFRETURN_TOOLTIP"] = "If a value is true, then return a second value."; // untranslated
Blockly.Msg["PROCEDURES_IFRETURN_WARNING"] = "Warning: This block may be used only within a function definition."; // untranslated
Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "input name:"; // untranslated
Blockly.Msg["PROCEDURES_MUTATORARG_TOOLTIP"] = "Add an input to the function."; // untranslated
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TITLE"] = "inputs"; // untranslated
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Add, remove, or reorder inputs to this function."; // untranslated
Blockly.Msg["REDO"] = "Redo"; // untranslated
Blockly.Msg["REMOVE_COMMENT"] = "Remove Comment"; // untranslated
Blockly.Msg["RENAME_VARIABLE"] = "Rename variable..."; // untranslated
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Rename all '%1' variables to:"; // untranslated
Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_APPEND_TITLE"] = "to %1 append text %2"; // untranslated
Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Append some text to variable '%1'."; // untranslated
Blockly.Msg["TEXT_CHANGECASE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_LOWERCASE"] = "to lower case"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_TITLECASE"] = "to Title Case"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_UPPERCASE"] = "to UPPER CASE"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_TOOLTIP"] = "Return a copy of the text in a different case."; // untranslated
Blockly.Msg["TEXT_CHARAT_FIRST"] = "get first letter"; // untranslated
Blockly.Msg["TEXT_CHARAT_FROM_END"] = "get letter # from end"; // untranslated
Blockly.Msg["TEXT_CHARAT_FROM_START"] = "get letter #"; // untranslated
Blockly.Msg["TEXT_CHARAT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
Blockly.Msg["TEXT_CHARAT_LAST"] = "get last letter"; // untranslated
Blockly.Msg["TEXT_CHARAT_RANDOM"] = "get random letter"; // untranslated
Blockly.Msg["TEXT_CHARAT_TAIL"] = ""; // untranslated
Blockly.Msg["TEXT_CHARAT_TITLE"] = "in text %1 %2"; // untranslated
Blockly.Msg["TEXT_CHARAT_TOOLTIP"] = "Returns the letter at the specified position."; // untranslated
Blockly.Msg["TEXT_COUNT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
Blockly.Msg["TEXT_COUNT_MESSAGE0"] = "count %1 in %2"; // untranslated
Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Count how many times some text occurs within some other text."; // untranslated
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Add an item to the text."; // untranslated
Blockly.Msg["TEXT_CREATE_JOIN_TITLE_JOIN"] = "join"; // untranslated
Blockly.Msg["TEXT_CREATE_JOIN_TOOLTIP"] = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_END"] = "to letter # from end"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_START"] = "to letter #"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_END_LAST"] = "to last letter"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_INPUT_IN_TEXT"] = "in text"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_START_FIRST"] = "get substring from first letter"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_END"] = "get substring from letter # from end"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_START"] = "get substring from letter #"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"] = ""; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_TOOLTIP"] = "Returns a specified portion of the text."; // untranslated
Blockly.Msg["TEXT_INDEXOF_HELPURL"] = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
Blockly.Msg["TEXT_INDEXOF_OPERATOR_FIRST"] = "find first occurrence of text"; // untranslated
Blockly.Msg["TEXT_INDEXOF_OPERATOR_LAST"] = "find last occurrence of text"; // untranslated
Blockly.Msg["TEXT_INDEXOF_TITLE"] = "in text %1 %2 %3"; // untranslated
Blockly.Msg["TEXT_INDEXOF_TOOLTIP"] = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated
Blockly.Msg["TEXT_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
Blockly.Msg["TEXT_ISEMPTY_TITLE"] = "%1 is empty"; // untranslated
Blockly.Msg["TEXT_ISEMPTY_TOOLTIP"] = "Returns true if the provided text is empty."; // untranslated
Blockly.Msg["TEXT_JOIN_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
Blockly.Msg["TEXT_JOIN_TITLE_CREATEWITH"] = "create text with"; // untranslated
Blockly.Msg["TEXT_JOIN_TOOLTIP"] = "Create a piece of text by joining together any number of items."; // untranslated
Blockly.Msg["TEXT_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_LENGTH_TITLE"] = "length of %1"; // untranslated
Blockly.Msg["TEXT_LENGTH_TOOLTIP"] = "Returns the number of letters (including spaces) in the provided text."; // untranslated
Blockly.Msg["TEXT_PRINT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
Blockly.Msg["TEXT_PRINT_TITLE"] = "print %1"; // untranslated
Blockly.Msg["TEXT_PRINT_TOOLTIP"] = "Print the specified text, number or other value."; // untranslated
Blockly.Msg["TEXT_PROMPT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
Blockly.Msg["TEXT_PROMPT_TOOLTIP_NUMBER"] = "Prompt for user for a number."; // untranslated
Blockly.Msg["TEXT_PROMPT_TOOLTIP_TEXT"] = "Prompt for user for some text."; // untranslated
Blockly.Msg["TEXT_PROMPT_TYPE_NUMBER"] = "prompt for number with message"; // untranslated
Blockly.Msg["TEXT_PROMPT_TYPE_TEXT"] = "prompt for text with message"; // untranslated
Blockly.Msg["TEXT_REPLACE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
Blockly.Msg["TEXT_REPLACE_MESSAGE0"] = "replace %1 with %2 in %3"; // untranslated
Blockly.Msg["TEXT_REPLACE_TOOLTIP"] = "Replace all occurances of some text within some other text."; // untranslated
Blockly.Msg["TEXT_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
Blockly.Msg["TEXT_REVERSE_MESSAGE0"] = "reverse %1"; // untranslated
Blockly.Msg["TEXT_REVERSE_TOOLTIP"] = "Reverses the order of the characters in the text."; // untranslated
Blockly.Msg["TEXT_TEXT_HELPURL"] = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
Blockly.Msg["TEXT_TEXT_TOOLTIP"] = "A letter, word, or line of text."; // untranslated
Blockly.Msg["TEXT_TRIM_HELPURL"] = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
Blockly.Msg["TEXT_TRIM_OPERATOR_BOTH"] = "trim spaces from both sides of"; // untranslated
Blockly.Msg["TEXT_TRIM_OPERATOR_LEFT"] = "trim spaces from left side of"; // untranslated
Blockly.Msg["TEXT_TRIM_OPERATOR_RIGHT"] = "trim spaces from right side of"; // untranslated
Blockly.Msg["TEXT_TRIM_TOOLTIP"] = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
Blockly.Msg["TODAY"] = "Today"; // untranslated
Blockly.Msg["UNDO"] = "Undo"; // untranslated
Blockly.Msg["UNNAMED_KEY"] = "unnamed"; // untranslated
Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "item"; // untranslated
Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Create 'set %1'"; // untranslated
Blockly.Msg["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
Blockly.Msg["VARIABLES_GET_TOOLTIP"] = "Returns the value of this variable."; // untranslated
Blockly.Msg["VARIABLES_SET"] = "set %1 to %2"; // untranslated
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Create 'get %1'"; // untranslated
Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Sets this variable to be equal to the input."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated
Blockly.Msg["WORKSPACE_ARIA_LABEL"] = "Blockly Workspace"; // untranslated
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Say something..."; // untranslated
Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"];
Blockly.Msg["CONTROLS_IF_ELSE_TITLE_ELSE"] = Blockly.Msg["CONTROLS_IF_MSG_ELSE"];
Blockly.Msg["CONTROLS_IF_IF_TITLE_IF"] = Blockly.Msg["CONTROLS_IF_MSG_IF"];
Blockly.Msg["CONTROLS_IF_MSG_THEN"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_WHILEUNTIL_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["LISTS_CREATE_WITH_ITEM_TITLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["LISTS_GET_INDEX_HELPURL"] = Blockly.Msg["LISTS_INDEX_OF_HELPURL"];
Blockly.Msg["LISTS_GET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_GET_SUBLIST_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_INDEX_OF_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_SET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["MATH_CHANGE_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["PROCEDURES_DEFRETURN_COMMENT"] = Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"];
Blockly.Msg["PROCEDURES_DEFRETURN_DO"] = Blockly.Msg["PROCEDURES_DEFNORETURN_DO"];
Blockly.Msg["PROCEDURES_DEFRETURN_PROCEDURE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"];
Blockly.Msg["PROCEDURES_DEFRETURN_TITLE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"];
Blockly.Msg["TEXT_APPEND_VARIABLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["MATH_HUE"] = "230";
Blockly.Msg["LOOPS_HUE"] = "120";
Blockly.Msg["LISTS_HUE"] = "260";
Blockly.Msg["LOGIC_HUE"] = "210";
Blockly.Msg["VARIABLES_HUE"] = "330";
Blockly.Msg["TEXTS_HUE"] = "160";
Blockly.Msg["PROCEDURES_HUE"] = "290";
Blockly.Msg["COLOUR_HUE"] = "20";
Blockly.Msg["VARIABLES_DYNAMIC_HUE"] = "310";
return Blockly.Msg;
}));
|
define(
//begin v1.x content
{
"dateFormatItem-Ehm": "E, h:mm a",
"days-standAlone-short": [
"не",
"по",
"ут",
"ср",
"че",
"пе",
"су"
],
"months-format-narrow": [
"ј",
"ф",
"м",
"а",
"м",
"ј",
"ј",
"а",
"с",
"о",
"н",
"д"
],
"field-second-relative+0": "сада",
"quarters-standAlone-narrow": [
"1.",
"2.",
"3.",
"4."
],
"field-weekday": "дан у недељи",
"dateFormatItem-yQQQ": "QQQ. y",
"dateFormatItem-yMEd": "E, d.M.y.",
"field-wed-relative+0": "ове среде",
"dateFormatItem-GyMMMEd": "E, d. MMM y. G",
"dateFormatItem-MMMEd": "E d. MMM",
"field-wed-relative+1": "следеће среде",
"eraNarrow": [
"п.н.е.",
"н.е."
],
"dateFormatItem-yMM": "MM.y.",
"field-tue-relative+-1": "прошлог уторка",
"dateFormatItem-MMMdd": "dd.MMM",
"days-format-short": [
"нед",
"пон",
"уто",
"сре",
"чет",
"пет",
"суб"
],
"dateFormat-long": "dd. MMMM y.",
"field-fri-relative+-1": "прошлог петка",
"field-wed-relative+-1": "прошле среде",
"months-format-wide": [
"јануар",
"фебруар",
"март",
"април",
"мај",
"јун",
"јул",
"август",
"септембар",
"октобар",
"новембар",
"децембар"
],
"dateTimeFormat-medium": "{1} {0}",
"dayPeriods-format-wide-pm": "поподне",
"dateFormat-full": "EEEE, dd. MMMM y.",
"field-thu-relative+-1": "прошлог четвртка",
"dateFormatItem-Md": "d/M",
"dateFormatItem-yMd": "d.M.y.",
"dateFormatItem-yM": "M.y.",
"field-era": "ера",
"months-standAlone-wide": [
"јануар",
"фебруар",
"март",
"април",
"мај",
"јун",
"јул",
"август",
"септембар",
"октобар",
"новембар",
"децембар"
],
"timeFormat-short": "HH.mm",
"quarters-format-wide": [
"Прво тромесечје",
"Друго тромесечје",
"Треће тромесечје",
"Четврто тромесечје"
],
"timeFormat-long": "HH.mm.ss z",
"dateFormatItem-yMMM": "MMM y.",
"dateFormatItem-yQQQQ": "QQQQ. y",
"field-year": "година",
"dateFormatItem-MMdd": "MM-dd",
"field-hour": "час",
"months-format-abbr": [
"јан",
"феб",
"мар",
"апр",
"мај",
"јун",
"јул",
"авг",
"сеп",
"окт",
"нов",
"дец"
],
"field-sat-relative+0": "ове суботе",
"field-sat-relative+1": "следеће суботе",
"timeFormat-full": "HH.mm.ss zzzz",
"field-day-relative+0": "данас",
"field-day-relative+1": "сутра",
"field-thu-relative+0": "овог четвртка",
"dateFormatItem-GyMMMd": "d. MMM y. G",
"field-day-relative+2": "прекосутра",
"field-thu-relative+1": "следећег четвртка",
"dateFormatItem-H": "HH",
"months-standAlone-abbr": [
"јан",
"феб",
"мар",
"апр",
"мај",
"јун",
"јул",
"авг",
"сеп",
"окт",
"нов",
"дец"
],
"quarters-format-abbr": [
"К1",
"К2",
"К3",
"К4"
],
"quarters-standAlone-wide": [
"Прво тромесечје",
"Друго тромесечје",
"Треће тромесечје",
"Четврто тромесечје"
],
"dateFormatItem-Gy": "y. G",
"dateFormatItem-M": "L",
"days-standAlone-wide": [
"недеља",
"понедељак",
"уторак",
"среда",
"четвртак",
"петак",
"субота"
],
"dateFormatItem-MMMMd": "d. MMMM",
"timeFormat-medium": "HH.mm.ss",
"dateFormatItem-yMMdd": "dd.MM.y.",
"field-sun-relative+0": "ове недеље",
"dateFormatItem-Hm": "HH.mm",
"quarters-standAlone-abbr": [
"К1",
"К2",
"К3",
"К4"
],
"field-sun-relative+1": "следеће недеље",
"eraAbbr": [
"п. н. е.",
"н. е."
],
"field-minute": "минут",
"field-dayperiod": "пре подне/поподне",
"days-standAlone-abbr": [
"нед",
"пон",
"уто",
"сре",
"чет",
"пет",
"суб"
],
"dateFormatItem-d": "d",
"dateFormatItem-ms": "mm.ss",
"quarters-format-narrow": [
"1.",
"2.",
"3.",
"4."
],
"field-day-relative+-1": "јуче",
"dateFormatItem-h": "hh a",
"dateTimeFormat-long": "{1} {0}",
"field-day-relative+-2": "прекјуче",
"dateFormatItem-MMMd": "d. MMM",
"dateFormatItem-MEd": "E, M-d",
"dateTimeFormat-full": "{1} {0}",
"field-fri-relative+0": "овог петка",
"dateFormatItem-yMMMM": "MMMM y.",
"field-fri-relative+1": "следећег петка",
"field-day": "дан",
"days-format-wide": [
"недеља",
"понедељак",
"уторак",
"среда",
"четвртак",
"петак",
"субота"
],
"field-zone": "зона",
"dateFormatItem-y": "y.",
"months-standAlone-narrow": [
"ј",
"ф",
"м",
"а",
"м",
"ј",
"ј",
"а",
"с",
"о",
"н",
"д"
],
"field-year-relative+-1": "Прошле године",
"field-month-relative+-1": "Прошлог месеца",
"dateFormatItem-hm": "hh.mm a",
"days-format-abbr": [
"нед",
"пон",
"уто",
"сре",
"чет",
"пет",
"суб"
],
"eraNames": [
"Пре нове ере",
"Нове ере"
],
"dateFormatItem-yMMMd": "d. MMM y.",
"days-format-narrow": [
"н",
"п",
"у",
"с",
"ч",
"п",
"с"
],
"days-standAlone-narrow": [
"н",
"п",
"у",
"с",
"ч",
"п",
"с"
],
"dateFormatItem-MMM": "LLL",
"field-month": "месец",
"field-tue-relative+0": "овог уторка",
"field-tue-relative+1": "следећег уторка",
"dayPeriods-format-wide-am": "пре подне",
"dateFormatItem-MMMMEd": "E d. MMMM",
"dateFormatItem-EHm": "E, HH:mm",
"field-mon-relative+0": "овог понедељка",
"field-mon-relative+1": "следећег понедељка",
"dateFormat-short": "d.M.yy.",
"dateFormatItem-EHms": "E, HH:mm:ss",
"dateFormatItem-Ehms": "E, h:mm:ss a",
"field-second": "секунд",
"field-sat-relative+-1": "прошле суботе",
"dateFormatItem-yMMMEd": "E, d. MMM y.",
"field-sun-relative+-1": "прошле недеље",
"field-month-relative+0": "Овог месеца",
"field-month-relative+1": "Следећег месеца",
"dateFormatItem-Ed": "E d.",
"dateTimeFormats-appendItem-Timezone": "{0} {1}",
"field-week": "недеља",
"dateFormat-medium": "dd.MM.y.",
"field-year-relative+0": "Ове године",
"field-week-relative+-1": "Прошле недеље",
"field-year-relative+1": "Следеће године",
"dateTimeFormat-short": "{1} {0}",
"dateFormatItem-Hms": "HH.mm.ss",
"dateFormatItem-hms": "hh.mm.ss a",
"dateFormatItem-GyMMM": "MMM y. G",
"field-mon-relative+-1": "прошлог понедељка",
"field-week-relative+0": "Ове недеље",
"field-week-relative+1": "Следеће недеље"
}
//end v1.x content
); |
/****************************************************************************
Copyright (c) 2008-2010 Ricardo Quesada
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
Copyright (c) 2009 Jason Booth
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
/**
* enum for jpg
* @constant
* @type Number
*/
cc.IMAGE_FORMAT_JPEG = 0;
/**
* enum for png
* @constant
* @type Number
*/
cc.IMAGE_FORMAT_PNG = 1;
/**
* enum for raw
* @constant
* @type Number
*/
cc.IMAGE_FORMAT_RAWDATA = 9;
/**
* @param {Number} x
* @return {Number}
* Constructor
*/
cc.NextPOT = function (x) {
x = x - 1;
x = x | (x >> 1);
x = x | (x >> 2);
x = x | (x >> 4);
x = x | (x >> 8);
x = x | (x >> 16);
return x + 1;
};
/**
* cc.RenderTexture is a generic rendering target. To render things into it,<br/>
* simply construct a render target, call begin on it, call visit on any cocos<br/>
* scenes or objects to render them, and call end. For convenience, render texture<br/>
* adds a sprite as it's display child with the results, so you can simply add<br/>
* the render texture to your scene and treat it like any other CocosNode.<br/>
* There are also functions for saving the render texture to disk in PNG or JPG format.
* @class
* @extends cc.Node
*
* @property {cc.Sprite} sprite - The sprite.
* @property {cc.Sprite} clearFlags - Code for "auto" update.
* @property {Number} clearDepthVal - Clear depth value.
* @property {Boolean} autoDraw - Indicate auto draw mode activate or not.
* @property {Number} clearStencilVal - Clear stencil value.
* @property {cc.Color} clearColorVal - Clear color value, valid only when "autoDraw" is true.
*/
cc.RenderTexture = cc.Node.extend(/** @lends cc.RenderTexture# */{
sprite:null,
//
// <p>Code for "auto" update<br/>
// Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT.<br/>
// They can be OR'ed. Valid when "autoDraw is YES.</p>
// @public
//
clearFlags:0,
clearDepthVal:0,
autoDraw:false,
_texture:null,
_pixelFormat:cc.Texture2D.PIXEL_FORMAT_RGBA8888,
clearStencilVal:0,
_clearColor:null,
_className:"RenderTexture",
/**
* creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid
* Constructor of cc.RenderTexture for Canvas
* @param {Number} width
* @param {Number} height
* @param {cc.IMAGE_FORMAT_JPEG|cc.IMAGE_FORMAT_PNG|cc.IMAGE_FORMAT_RAWDATA} format
* @param {Number} depthStencilFormat
* @example
* // Example
* var rt = new cc.RenderTexture(width, height, format, depthStencilFormat)
* @function
*/
ctor: function(width, height, format, depthStencilFormat){
cc.Node.prototype.ctor.call(this);
this._cascadeColorEnabled = true;
this._cascadeOpacityEnabled = true;
this._clearColor = new cc.Color(0,0,0,255);
if(width !== undefined && height !== undefined) {
format = format || cc.Texture2D.PIXEL_FORMAT_RGBA8888;
depthStencilFormat = depthStencilFormat || 0;
this.initWithWidthAndHeight(width, height, format, depthStencilFormat);
}
this.setAnchorPoint(0,0);
},
_createRenderCmd: function(){
if(cc._renderType === cc._RENDER_TYPE_CANVAS)
return new cc.RenderTexture.CanvasRenderCmd(this);
else
return new cc.RenderTexture.WebGLRenderCmd(this);
},
/**
* Clear RenderTexture.
* @function
*/
cleanup: function(){
cc.Node.prototype.onExit.call(this);
this._renderCmd.cleanup();
},
/**
* Gets the sprite
* @return {cc.Sprite}
*/
getSprite:function () {
return this.sprite;
},
/**
* Set the sprite
* @param {cc.Sprite} sprite
*/
setSprite:function (sprite) {
this.sprite = sprite;
},
/**
* Used for grab part of screen to a texture.
* @param {cc.Point} rtBegin
* @param {cc.Rect} fullRect
* @param {cc.Rect} fullViewport
*/
setVirtualViewport: function(rtBegin, fullRect, fullViewport){
this._renderCmd.setVirtualViewport(rtBegin, fullRect, fullViewport);
},
/**
* Initializes the instance of cc.RenderTexture
* @function
* @param {Number} width
* @param {Number} height
* @param {cc.IMAGE_FORMAT_JPEG|cc.IMAGE_FORMAT_PNG|cc.IMAGE_FORMAT_RAWDATA} [format]
* @param {Number} [depthStencilFormat]
* @return {Boolean}
*/
initWithWidthAndHeight: function(width, height, format, depthStencilFormat){
return this._renderCmd.initWithWidthAndHeight(width, height, format, depthStencilFormat);
},
/**
* starts grabbing
* @function
*/
begin: function(){
cc.renderer._turnToCacheMode(this.__instanceId);
this._renderCmd.begin();
},
/**
* starts rendering to the texture while clearing the texture first.<br/>
* This is more efficient then calling -clear first and then -begin
* @param {Number} r red 0-255
* @param {Number} g green 0-255
* @param {Number} b blue 0-255
* @param {Number} a alpha 0-255 0 is transparent
* @param {Number} [depthValue=]
* @param {Number} [stencilValue=]
*/
beginWithClear:function (r, g, b, a, depthValue, stencilValue) {
//todo: only for WebGL?
var gl = cc._renderContext;
depthValue = depthValue || gl.COLOR_BUFFER_BIT;
stencilValue = stencilValue || (gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
this._beginWithClear(r , g , b , a , depthValue, stencilValue, (gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT));
},
_beginWithClear: function(r, g, b, a, depthValue, stencilValue, flags){
this.begin();
this._renderCmd._beginWithClear(r, g, b, a, depthValue, stencilValue, flags);
},
/**
* ends grabbing
* @function
*/
end: function(){
this._renderCmd.end();
},
/**
* clears the texture with a color
* @param {Number|cc.Rect} r red 0-1
* @param {Number} g green 0-1
* @param {Number} b blue 0-1
* @param {Number} a alpha 0-1
*/
clear:function (r, g, b, a) {
this.beginWithClear(r, g, b, a);
this.end();
},
/**
* clears the texture with rect.
* @function
* @param {number} x
* @param {number} y
* @param {number} width
* @param {number} height
*/
clearRect: function(x, y, width, height){
this._renderCmd.clearRect(x, y, width, height);
},
/**
* clears the texture with a specified depth value
* @function
* @param {Number} depthValue
*/
clearDepth: function(depthValue){
this._renderCmd.clearDepth(depthValue);
},
/**
* clears the texture with a specified stencil value
* @function
* @param {Number} stencilValue
*/
clearStencil: function(stencilValue) {
this._renderCmd.clearStencil(stencilValue);
},
/**
* Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw is YES.
* @return {Number}
*/
getClearFlags:function () {
return this.clearFlags;
},
/**
* Set the clearFlags
* @param {Number} clearFlags
*/
setClearFlags:function (clearFlags) {
this.clearFlags = clearFlags;
},
/**
* Clear color value. Valid only when "autoDraw" is true.
* @function
* @return {cc.Color}
*/
getClearColor:function () {
return this._clearColor;
},
/**
* Set the clear color value. Valid only when "autoDraw" is true.
* @function
* @param {cc.Color} clearColor The clear color
*/
setClearColor: function(clearColor){
var locClearColor = this._clearColor;
locClearColor.r = clearColor.r;
locClearColor.g = clearColor.g;
locClearColor.b = clearColor.b;
locClearColor.a = clearColor.a;
this._renderCmd.updateClearColor(clearColor);
},
/**
* Value for clearDepth. Valid only when autoDraw is true.
* @return {Number}
*/
getClearDepth:function () {
return this.clearDepthVal;
},
/**
* Set value for clearDepth. Valid only when autoDraw is true.
* @param {Number} clearDepth
*/
setClearDepth:function (clearDepth) {
this.clearDepthVal = clearDepth;
},
/**
* Value for clear Stencil. Valid only when autoDraw is true
* @return {Number}
*/
getClearStencil:function () {
return this.clearStencilVal;
},
/**
* Set value for clear Stencil. Valid only when autoDraw is true
* @return {Number}
*/
setClearStencil:function (clearStencil) {
this.clearStencilVal = clearStencil;
},
/**
* When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons. <br/>
* Will be enabled in the future.
* @return {Boolean}
*/
isAutoDraw:function () {
return this.autoDraw;
},
/**
* When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons. <br/>
* Will be enabled in the future.
* @return {Boolean}
*/
setAutoDraw:function (autoDraw) {
this.autoDraw = autoDraw;
},
//---- some stub functions for jsb
/**
* saves the texture into a file using JPEG format. The file will be saved in the Documents folder.
* Returns YES if the operation is successful.
* (doesn't support in HTML5)
* @param {Number} filePath
* @param {Number} format
*/
saveToFile:function (filePath, format) {
cc.log("saveToFile isn't supported on Cocos2d-Html5");
},
/**
* creates a new CCImage from with the texture's data. Caller is responsible for releasing it by calling delete.
* @return {*}
*/
newCCImage:function(flipImage){
cc.log("saveToFile isn't supported on cocos2d-html5");
return null;
},
/**
* Listen "come to background" message, and save render texture. It only has effect on Android.
* @param {cc.Class} obj
*/
listenToBackground:function (obj) { },
/**
* Listen "come to foreground" message and restore the frame buffer object. It only has effect on Android.
* @param {cc.Class} obj
*/
listenToForeground:function (obj) { }
});
var _p = cc.RenderTexture.prototype;
// Extended
/** @expose */
_p.clearColorVal;
cc.defineGetterSetter(_p, "clearColorVal", _p.getClearColor, _p.setClearColor);
/**
* creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid
* @deprecated since v3.0 please use new cc.RenderTexture() instead.
* @param {Number} width
* @param {Number} height
* @param {cc.IMAGE_FORMAT_JPEG|cc.IMAGE_FORMAT_PNG|cc.IMAGE_FORMAT_RAWDATA} format
* @param {Number} depthStencilFormat
* @return {cc.RenderTexture}
*/
cc.RenderTexture.create = function (width, height, format, depthStencilFormat) {
return new cc.RenderTexture(width, height, format, depthStencilFormat);
};
|
run_spec(__dirname, ["json"], { insertPragma: true });
|
var path = require('path');
var isProduction = process.env.NODE_ENV === 'production';
var config = {
entry: path.resolve(__dirname, 'src/Cerebral.js'),
devtool: 'eval-source-map',
output: {
path: path.resolve(__dirname, isProduction ? 'dist' : 'build'),
libraryTarget: 'umd',
library: 'Cerebral',
filename: 'cerebral.js'
},
module: {
preLoaders: [{
test: /\.js$/,
loader: 'jshint',
exclude: [/events/, /react/]
}]
},
jshint: {
globalstrict: true,
newcap: false,
proto: true
}
};
module.exports = config;
|
var gulp = require('gulp');
var config = require('../../config');
gulp.task('$usemin', ['$inject-files'], function () {
var usemin = require('gulp-usemin');
var minifyCss = require('gulp-minify-css');
var ngAnnotate = require('gulp-ng-annotate');
var inject = require('gulp-inject');
var processhtml = require('gulp-processhtml');
var ver = require('gulp-ver');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var clone = require('gulp-clone');
var copy = require('gulp-copy');
var sourcemaps = require('gulp-sourcemaps');
var urlAdjuster = require('gulp-css-url-adjuster');
var staticAssetsDir = 'static-assets/';
//TODO: extract this area to config.js
gulp.src(['app/**/font/*.*']).pipe(copy('deployment/' + staticAssetsDir + 'font', {prefix: 10}));
gulp.src([
'app/**/img/*.png',
'app/**/img/*.gif'
]).pipe(copy('deployment/' + staticAssetsDir + 'img', {prefix: 10}));
gulp.src(['app/demo-code/**/*.json', 'app/**/*-logo.*']).pipe(copy('deployment/'));
var clonesArray = [
{name: 'css'}, {name: 'vendorCSS'}, {name: 'demoCSS'}, {name: 'scDepsCSS'},
{name: 'js', isJs: true}, {name: 'vendorJS', isJs: true, isVendor: true}, {name: 'demoJS', isJs: true}, {name: 'scDepsJS', isJs: true}
].map(function (item) {
item.clone = clone.sink();
if (item.isJs) {
item.opts = [ngAnnotate(), item.clone, sourcemaps.init()];
if (!item.isVendor) { item.opts.push(uglify());}
} else {
item.opts = [
sourcemaps.init(),
urlAdjuster({prepend: '../' + staticAssetsDir}), //relative path to image
'concat',
item.clone,
minifyCss()
];
}
item.opts.push(rename({suffix: '.min'}));
item.opts.push(sourcemaps.write('.'));
if (config.useminVersioned === true) {
item.opts.push(ver({prefix: 'v'}));
}
return item;
});
return clonesArray.reduce(function (useminTask, item) {
return useminTask.pipe(item.clone.tap());
}, gulp.src(config.usemin.src)
.pipe(inject(gulp.src(config.usemin.injectSrc, {read: false}),
{starttag: '<!-- inject:' + config.tempFolderPath + '/templates-and-app-version:js -->'}
))
.pipe(usemin(clonesArray.reduce(function (useminMap, item) {
useminMap[item.name] = item.opts;
return useminMap;
}, {
html: [
processhtml({commentMarker: 'process', process: true})
]
})))).pipe(gulp.dest(config.usemin.dist));
});
|
require(['requirescript'], function() {
require(['init_youtubeviewer'], function (init_youtubeviewer) {
require(['launch']);
});
});
|
/**
* UIFactory is an factory object used to keep the keystone field elements
* somewhat DRY.
* @alias UIFactory
* @param {Object} types The keystone.Field.Types object.
* @constructor
*
*/
module.exports = function UIFactory(types) {
var _cons = function(opts) {
opts = opts || {};
return opts;
};
/**
* PageContentEditor returns a definition object for a large markdown input.
*
* @method MarkDownEditor
* @return
*
*/
this.PageContentEditor = function() {
var o = _cons.apply(arguments);
o.type = types.Markdown;
o.height = 400;
o.wysiwyg = true;
return o;
};
/**
* TextBox
*
* @method SmallTextArea
* @return
*
*/
this.TextBox = function() {
var o = _cons(arguments);
o.type = types.Textarea;
o.width = 'medium';
return o;
};
/**
* TextField
*
* @method TextField
* @return
*
*/
this.TextField = function() {
var o = _cons(arguments);
o.type = String;
o.width = 'medium';
return o;
};
/**
* ShortTextField
*
* @method ShortTextField
* @return
*
*/
this.ShortTextField = function() {
var o = this.TextField.apply(arguments);
o.width = 'short';
return o;
};
/**
* NumberField
*
* @method NumberField
* @param {Number} min
* @param {Number} max
* @return
*
*/
this.NumberField = function(min, max) {
min = min || 1;
max = max || 9999999999;
var o = _cons(arguments[2]);
o.min = min;
o.max = max;
o.type = Number;
return o;
};
/**
* Selection
*
* @method Selection
* @param {Array} options
* @return
*
*/
this.Selection = function(options) {
var o = _cons(arguments[1]);
o.type = types.Select;
o.options = options;
return o;
};
/**
* PriceField
*
* @method PriceField
* @return
*
*/
this.PriceField = function() {
var o = _cons(arguments[0]);
o.type = types.Money;
return o;
};
};
|
/**
* Copyright Marc J. Schmidt. See the LICENSE file at the top-level
* directory of this distribution and at
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
*/
;
(function() {
// Only used for the dirty checking, so the event callback count is limted to max 1 call per fps per sensor.
// In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
// would generate too many unnecessary events.
var requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
function (fn) {
return window.setTimeout(fn, 20);
};
/**
* Class for dimension change detection.
*
* @param {Element|Element[]|Elements|jQuery} element
* @param {Function} callback
*
* @constructor
*/
var ResizeSensor = function(element, callback) {
/**
*
* @constructor
*/
function EventQueue() {
this.q = [];
this.add = function(ev) {
this.q.push(ev);
};
var i, j;
this.call = function() {
for (i = 0, j = this.q.length; i < j; i++) {
this.q[i].call();
}
};
}
/**
* @param {HTMLElement} element
* @param {String} prop
* @returns {String|Number}
*/
function getComputedStyle(element, prop) {
if (element.currentStyle) {
return element.currentStyle[prop];
} else if (window.getComputedStyle) {
return window.getComputedStyle(element, null).getPropertyValue(prop);
} else {
return element.style[prop];
}
}
/**
*
* @param {HTMLElement} element
* @param {Function} resized
*/
function attachResizeEvent(element, resized) {
if (!element.resizedAttached) {
element.resizedAttached = new EventQueue();
element.resizedAttached.add(resized);
} else if (element.resizedAttached) {
element.resizedAttached.add(resized);
return;
}
element.resizeSensor = document.createElement('div');
element.resizeSensor.className = 'resize-sensor';
var style = 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;';
var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;';
element.resizeSensor.style.cssText = style;
element.resizeSensor.innerHTML =
'<div class="resize-sensor-expand" style="' + style + '">' +
'<div style="' + styleChild + '"></div>' +
'</div>' +
'<div class="resize-sensor-shrink" style="' + style + '">' +
'<div style="' + styleChild + ' width: 200%; height: 200%"></div>' +
'</div>';
element.appendChild(element.resizeSensor);
if (getComputedStyle(element, 'position') == 'static') {
element.style.position = 'relative';
}
var expand = element.resizeSensor.childNodes[0];
var expandChild = expand.childNodes[0];
var shrink = element.resizeSensor.childNodes[1];
var reset = function() {
expandChild.style.width = 100000 + 'px';
expandChild.style.height = 100000 + 'px';
expand.scrollLeft = 100000;
expand.scrollTop = 100000;
shrink.scrollLeft = 100000;
shrink.scrollTop = 100000;
};
reset();
var dirty = false;
var dirtyChecking = function() {
if (!element.resizedAttached) return;
if (dirty) {
element.resizedAttached.call();
dirty = false;
}
requestAnimationFrame(dirtyChecking);
};
requestAnimationFrame(dirtyChecking);
var lastWidth, lastHeight;
var cachedWidth, cachedHeight; //useful to not query offsetWidth twice
var onScroll = function() {
if ((cachedWidth = element.offsetWidth) != lastWidth || (cachedHeight = element.offsetHeight) != lastHeight) {
dirty = true;
lastWidth = cachedWidth;
lastHeight = cachedHeight;
}
reset();
};
var addEvent = function(el, name, cb) {
if (el.attachEvent) {
el.attachEvent('on' + name, cb);
} else {
el.addEventListener(name, cb);
}
};
addEvent(expand, 'scroll', onScroll);
addEvent(shrink, 'scroll', onScroll);
}
var elementType = Object.prototype.toString.call(element);
var isCollectionTyped = ('[object Array]' === elementType
|| ('[object NodeList]' === elementType)
|| ('[object HTMLCollection]' === elementType)
|| ('undefined' !== typeof jQuery && element instanceof jQuery) //jquery
|| ('undefined' !== typeof Elements && element instanceof Elements) //mootools
);
if (isCollectionTyped) {
var i = 0, j = element.length;
for (; i < j; i++) {
attachResizeEvent(element[i], callback);
}
} else {
attachResizeEvent(element, callback);
}
this.detach = function() {
if (isCollectionTyped) {
var i = 0, j = element.length;
for (; i < j; i++) {
ResizeSensor.detach(element[i]);
}
} else {
ResizeSensor.detach(element);
}
};
};
ResizeSensor.detach = function(element) {
if (element.resizeSensor) {
element.removeChild(element.resizeSensor);
delete element.resizeSensor;
delete element.resizedAttached;
}
};
// make available to common module loader
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = ResizeSensor;
}
else {
window.ResizeSensor = ResizeSensor;
}
})();
|
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",lang:"en",init:function(a){if(!a.blockless){var b;b=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]"});b=a.addCommand("numberedListStyle",b);a.addFeature(b);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");b=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}"});b=a.addCommand("bulletedListStyle",
b);a.addFeature(b);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});a.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;for(;a;){var b=a.getName();if("ol"==b)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==b)return{bulletedlist:CKEDITOR.TRISTATE_OFF};
a=a.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)})(); |
import Rectangle from "src/dataTypes/geometry/Rectangle";
import StringList from "src/dataTypes/strings/StringList";
import NumberListOperators from "src/operators/numeric/numberList/NumberListOperators";
function NumberListDraw() {}
export default NumberListDraw;
/**
* draws a simple graph
* @param {Rectangle} frame
* @param {NumberList} numberList
*
* @param {Number} margin
* @param {Object} xValues horizontal values, could be a stringList, a numberList or an Interval
* @return {Number} index of element clicked
* tags:draw
*/
NumberListDraw.drawSimpleGraph = function(frame, numberList, margin, xValues, graphics) {
if(numberList == null || NumberListOperators.normalized(numberList) == null) return;
if(graphics==null) graphics = frame.graphics; //momentary fix
margin = margin || 0;
//setup
if(frame.memory == null || numberList != frame.memory.numberList) {
frame.memory = {
numberList: numberList,
minmax: numberList.getMinMaxInterval(),
zero: null
};
if(frame.memory.minmax.x > 0 && frame.memory.minmax.y > 0) {
frame.memory.normalizedList = NumberListOperators.normalizedToMax(numberList);
} else {
frame.memory.normalizedList = NumberListOperators.normalized(numberList);
frame.memory.zero = -frame.memory.minmax.x / frame.memory.minmax.getAmplitude();
}
frame.memory.xTexts = new StringList();
if(xValues != null && xValues.type == "Interval") {
var kx = (xValues.getAmplitude() + 1) / numberList.length;
}
numberList.forEach(function(val, i) {
frame.memory.xTexts[i] = (xValues == null) ? String(numberList[i]) : ((kx == null ? xValues[i] : (xValues.x + i * kx)) + ":" + numberList[i]);
});
}
var i;
var subframe = new Rectangle(frame.x + margin, frame.y + margin, frame.width - margin * 2, frame.height - margin * 2);
subframe.bottom = subframe.getBottom();
var x;
var dx = subframe.width / numberList.length;
var overI = -1;
var mouseOnFrame = subframe.containsPoint(graphics.mP);
var normalColor = mouseOnFrame ? 'rgb(160,160,160)' : 'black';
if(frame.memory.zero) {
var zeroY = subframe.bottom - subframe.height * frame.memory.zero; //Math.max(subframe.bottom - subframe.height*frame.memory.zero, subframe.y);
for(i = 0; numberList[i] != null; i++) {
x = subframe.x + i * dx;
if(mouseOnFrame && graphics.mX > x && graphics.mX < x + dx) {
overI = i;
graphics.setFill('black');
} else {
graphics.setFill(normalColor);
}
graphics.fRect(subframe.x + i * dx, zeroY, dx, -subframe.height * (frame.memory.normalizedList[i] - frame.memory.zero));
}
} else {
for(i = 0; numberList[i] != null; i++) {
x = subframe.x + i * dx;
if(mouseOnFrame && graphics.mX > x && graphics.mX < x + dx) {
overI = i;
graphics.setFill('black');
} else {
graphics.setFill(normalColor);
}
graphics.fRect(x, subframe.bottom, dx, -subframe.height * frame.memory.normalizedList[i]);
}
}
var clicked;
if(overI != -1) {
graphics.setText('white', 12);
var text = frame.memory.xTexts[overI];
var w = graphics.getTextW(text);
graphics.setFill('rgb(100,100,100)');
graphics.fLines(
graphics.mX, graphics.mY,
graphics.mX + 16, graphics.mY - 10,
graphics.mX + w + 16, graphics.mY - 10,
graphics.mX + w + 16, graphics.mY - 30,
graphics.mX + 6, graphics.mY - 30,
graphics.mX + 6, graphics.mY - 10
);
graphics.setFill('white');
graphics.fText(text, graphics.mX + 10, graphics.mY - 26);
if(graphics.MOUSE_DOWN) {
clicked = overI;
}
}
return clicked;
};
|
'use strict';
var Collection = require('ampersand-collection');
var LodashMixin = require('ampersand-collection-lodash-mixin');
module.exports = Collection.extend(LodashMixin);
|
var searchData=
[
['integer_20functions',['Integer functions',['../a00787.html',1,'']]],
['i16',['i16',['../a00721.html#ga3ab5fe184343d394fb6c2723c3ee3699',1,'glm']]],
['i16vec1',['i16vec1',['../a00721.html#gafe730798732aa7b0647096a004db1b1c',1,'glm']]],
['i16vec2',['i16vec2',['../a00721.html#ga2996630ba7b10535af8e065cf326f761',1,'glm']]],
['i16vec3',['i16vec3',['../a00721.html#gae9c90a867a6026b1f6eab00456f3fb8b',1,'glm']]],
['i16vec4',['i16vec4',['../a00721.html#ga550831bfc26d1e0101c1cb3d79938c06',1,'glm']]],
['i32',['i32',['../a00721.html#ga96faea43ac5f875d2d3ffbf8d213e3eb',1,'glm']]],
['i32vec1',['i32vec1',['../a00721.html#ga54b8a4e0f5a7203a821bf8e9c1265bcf',1,'glm']]],
['i32vec2',['i32vec2',['../a00721.html#ga8b44026374982dcd1e52d22bac99247e',1,'glm']]],
['i32vec3',['i32vec3',['../a00721.html#ga7f526b5cccef126a2ebcf9bdd890394e',1,'glm']]],
['i32vec4',['i32vec4',['../a00721.html#ga866a05905c49912309ed1fa5f5980e61',1,'glm']]],
['i64',['i64',['../a00721.html#gadb997e409103d4da18abd837e636a496',1,'glm']]],
['i64vec1',['i64vec1',['../a00721.html#ga2b65767f8b5aed1bd1cf86c541662b50',1,'glm']]],
['i64vec2',['i64vec2',['../a00721.html#ga48310188e1d0c616bf8d78c92447523b',1,'glm']]],
['i64vec3',['i64vec3',['../a00721.html#ga667948cfe6fb3d6606c750729ec49f77',1,'glm']]],
['i64vec4',['i64vec4',['../a00721.html#gaa4e31c3d9de067029efeb161a44b0232',1,'glm']]],
['i8',['i8',['../a00721.html#ga302ec977b0c0c3ea245b6c9275495355',1,'glm']]],
['i8vec1',['i8vec1',['../a00721.html#ga7e80d927ff0a3861ced68dfff8a4020b',1,'glm']]],
['i8vec2',['i8vec2',['../a00721.html#gad06935764d78f43f9d542c784c2212ec',1,'glm']]],
['i8vec3',['i8vec3',['../a00721.html#ga5a08d36cf7917cd19d081a603d0eae3e',1,'glm']]],
['i8vec4',['i8vec4',['../a00721.html#ga4177a44206121dabc8c4ff1c0f544574',1,'glm']]],
['identity',['identity',['../a00668.html#ga81696f2b8d1db02ea1aff8da8f269314',1,'glm']]],
['imat2',['imat2',['../a00712.html#gaabe04f9948d4a213bb1c20137de03e01',1,'glm']]],
['imat2x2',['imat2x2',['../a00712.html#gaa4732a240522ad9bc28144fda2fc14ec',1,'glm']]],
['imat2x3',['imat2x3',['../a00712.html#ga3f42dd3d5d94a0fd5706f7ec8dd0c605',1,'glm']]],
['imat2x4',['imat2x4',['../a00712.html#ga9d8faafdca42583d67e792dd038fc668',1,'glm']]],
['imat3',['imat3',['../a00712.html#ga038f68437155ffa3c2583a15264a8195',1,'glm']]],
['imat3x2',['imat3x2',['../a00712.html#ga7b33bbe4f12c060892bd3cc8d4cd737f',1,'glm']]],
['imat3x3',['imat3x3',['../a00712.html#ga6aacc960f62e8f7d2fe9d32d5050e7a4',1,'glm']]],
['imat3x4',['imat3x4',['../a00712.html#ga6e9ce23496d8b08dfc302d4039694b58',1,'glm']]],
['imat4',['imat4',['../a00712.html#ga96b0d26a33b81bb6a60ca0f39682f7eb',1,'glm']]],
['imat4x2',['imat4x2',['../a00712.html#ga8ce7ef51d8b2c1901fa5414deccbc3fa',1,'glm']]],
['imat4x3',['imat4x3',['../a00712.html#ga705ee0bf49d6c3de4404ce2481bf0df5',1,'glm']]],
['imat4x4',['imat4x4',['../a00712.html#ga43ed5e4f475b6f4cad7cba78f29c405b',1,'glm']]],
['imulextended',['imulExtended',['../a00787.html#gac0c510a70e852f57594a9141848642e3',1,'glm']]],
['infiniteperspective',['infinitePerspective',['../a00665.html#ga44fa38a18349450325cae2661bb115ca',1,'glm']]],
['infiniteperspectivelh',['infinitePerspectiveLH',['../a00665.html#ga3201b30f5b3ea0f933246d87bfb992a9',1,'glm']]],
['infiniteperspectiverh',['infinitePerspectiveRH',['../a00665.html#ga99672ffe5714ef478dab2437255fe7e1',1,'glm']]],
['int1',['int1',['../a00732.html#ga0670a2111b5e4a6410bd027fa0232fc3',1,'glm']]],
['int16',['int16',['../a00682.html#ga4355d16fcf9f644c9ac84293f0b1801f',1,'glm']]],
['int16_5ft',['int16_t',['../a00721.html#gae8f5e3e964ca2ae240adc2c0d74adede',1,'glm']]],
['int1x1',['int1x1',['../a00732.html#ga056ffe02d3a45af626f8e62221881c7a',1,'glm']]],
['int2',['int2',['../a00732.html#gafe3a8fd56354caafe24bfe1b1e3ad22a',1,'glm']]],
['int2x2',['int2x2',['../a00732.html#ga4e5ce477c15836b21e3c42daac68554d',1,'glm']]],
['int2x3',['int2x3',['../a00732.html#ga197ded5ad8354f6b6fb91189d7a269b3',1,'glm']]],
['int2x4',['int2x4',['../a00732.html#ga2749d59a7fddbac44f34ba78e57ef807',1,'glm']]],
['int3',['int3',['../a00732.html#ga909c38a425f215a50c847145d7da09f0',1,'glm']]],
['int32',['int32',['../a00682.html#ga56f1a81c92849566ae864511088eb7e8',1,'glm']]],
['int32_5ft',['int32_t',['../a00721.html#ga042ef09ff2f0cb24a36f541bcb3a3710',1,'glm']]],
['int3x2',['int3x2',['../a00732.html#gaa4cbe16a92cf3664376c7a2fc5126aa8',1,'glm']]],
['int3x3',['int3x3',['../a00732.html#ga15c9649286f0bf431bdf9b3509580048',1,'glm']]],
['int3x4',['int3x4',['../a00732.html#gaacac46ddc7d15d0f9529d05c92946a0f',1,'glm']]],
['int4',['int4',['../a00732.html#gaecdef18c819c205aeee9f94dc93de56a',1,'glm']]],
['int4x2',['int4x2',['../a00732.html#ga97a39dd9bc7d572810d80b8467cbffa1',1,'glm']]],
['int4x3',['int4x3',['../a00732.html#gae4a2c53f14aeec9a17c2b81142b7e82d',1,'glm']]],
['int4x4',['int4x4',['../a00732.html#ga04dee1552424198b8f58b377c2ee00d8',1,'glm']]],
['int64',['int64',['../a00682.html#gaff5189f97f9e842d9636a0f240001b2e',1,'glm']]],
['int64_5ft',['int64_t',['../a00721.html#ga322a7d7d2c2c68994dc872a33de63c61',1,'glm']]],
['int8',['int8',['../a00682.html#gae47c588f3ab8c61121c1c7ab7edc47cd',1,'glm']]],
['int8_5ft',['int8_t',['../a00721.html#ga4bf09d8838a86866b39ee6e109341645',1,'glm']]],
['intbitstofloat',['intBitsToFloat',['../a00662.html#ga4fb7c21c2dce064b26fd9ccdaf9adcd4',1,'glm::intBitsToFloat(int const &v)'],['../a00662.html#ga7a0a8291a1cf3e1c2aee33030a1bd7b0',1,'glm::intBitsToFloat(vec< L, int, Q > const &v)']]],
['integer_2ehpp',['integer.hpp',['../a00401.html',1,'']]],
['intermediate',['intermediate',['../a00769.html#gacc5cd5f3e78de61d141c2355417424de',1,'glm']]],
['interpolate',['interpolate',['../a00754.html#ga4e67863d150724b10c1ac00972dc958c',1,'glm']]],
['intersect_2ehpp',['intersect.hpp',['../a00506.html',1,'']]],
['intersectlinesphere',['intersectLineSphere',['../a00748.html#ga9c68139f3d8a4f3d7fe45f9dbc0de5b7',1,'glm']]],
['intersectlinetriangle',['intersectLineTriangle',['../a00748.html#ga9d29b9b3acb504d43986502f42740df4',1,'glm']]],
['intersectrayplane',['intersectRayPlane',['../a00748.html#gad3697a9700ea379739a667ea02573488',1,'glm']]],
['intersectraysphere',['intersectRaySphere',['../a00748.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)'],['../a00748.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]],
['intersectraytriangle',['intersectRayTriangle',['../a00748.html#ga65bf2c594482f04881c36bc761f9e946',1,'glm']]],
['inverse',['inverse',['../a00669.html#gab41da854ae678e23e114b598cbca4065',1,'glm::inverse(qua< T, Q > const &q)'],['../a00734.html#ga070f521a953f6461af4ab4cf8ccbf27e',1,'glm::inverse(tdualquat< T, Q > const &q)'],['../a00788.html#gaed509fe8129b01e4f20a6d0de5690091',1,'glm::inverse(mat< C, R, T, Q > const &m)']]],
['inversesqrt',['inversesqrt',['../a00664.html#ga523dd6bd0ad9f75ae2d24c8e4b017b7a',1,'glm']]],
['inversetranspose',['inverseTranspose',['../a00713.html#gab213cd0e3ead5f316d583f99d6312008',1,'glm']]],
['io_2ehpp',['io.hpp',['../a00509.html',1,'']]],
['iround',['iround',['../a00710.html#ga57824268ebe13a922f1d69a5d37f637f',1,'glm']]],
['iscompnull',['isCompNull',['../a00785.html#gaf6ec1688eab7442fe96fe4941d5d4e76',1,'glm']]],
['isdenormal',['isdenormal',['../a00731.html#ga74aa7c7462245d83bd5a9edf9c6c2d91',1,'glm']]],
['isfinite',['isfinite',['../a00732.html#gaf4b04dcd3526996d68c1bfe17bfc8657',1,'glm::isfinite(genType const &x)'],['../a00732.html#gac3b12b8ac3014418fe53c299478b6603',1,'glm::isfinite(const vec< 1, T, Q > &x)'],['../a00732.html#ga8e76dc3e406ce6a4155c2b12a2e4b084',1,'glm::isfinite(const vec< 2, T, Q > &x)'],['../a00732.html#ga929ef27f896d902c1771a2e5e150fc97',1,'glm::isfinite(const vec< 3, T, Q > &x)'],['../a00732.html#ga19925badbe10ce61df1d0de00be0b5ad',1,'glm::isfinite(const vec< 4, T, Q > &x)']]],
['isidentity',['isIdentity',['../a00757.html#gaee935d145581c82e82b154ccfd78ad91',1,'glm']]],
['isinf',['isinf',['../a00662.html#ga2885587c23a106301f20443896365b62',1,'glm::isinf(vec< L, T, Q > const &x)'],['../a00669.html#ga45722741ea266b4e861938b365c5f362',1,'glm::isinf(qua< T, Q > const &x)']]],
['ismultiple',['isMultiple',['../a00719.html#gaec593d33956a8fe43f78fccc63ddde9a',1,'glm::isMultiple(genIUType v, genIUType Multiple)'],['../a00719.html#ga354caf634ef333d9cb4844407416256a',1,'glm::isMultiple(vec< L, T, Q > const &v, T Multiple)'],['../a00719.html#gabb4360e38c0943d8981ba965dead519d',1,'glm::isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)']]],
['isnan',['isnan',['../a00662.html#ga29ef934c00306490de837b4746b4e14d',1,'glm::isnan(vec< L, T, Q > const &x)'],['../a00669.html#ga1bb55f8963616502e96dc564384d8a03',1,'glm::isnan(qua< T, Q > const &x)']]],
['isnormalized',['isNormalized',['../a00757.html#gae785af56f47ce220a1609f7f84aa077a',1,'glm::isNormalized(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gaa068311695f28f5f555f5f746a6a66fb',1,'glm::isNormalized(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga4d9bb4d0465df49fedfad79adc6ce4ad',1,'glm::isNormalized(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gac3c974f459fd75453134fad7ae89a39e',1,'glm::isNormalized(vec< L, T, Q > const &v, T const &epsilon)']]],
['isnull',['isNull',['../a00757.html#ga9790ec222ce948c0ff0d8ce927340dba',1,'glm::isNull(mat< 2, 2, T, Q > const &m, T const &epsilon)'],['../a00757.html#gae14501c6b14ccda6014cc5350080103d',1,'glm::isNull(mat< 3, 3, T, Q > const &m, T const &epsilon)'],['../a00757.html#ga2b98bb30a9fefa7cdea5f1dcddba677b',1,'glm::isNull(mat< 4, 4, T, Q > const &m, T const &epsilon)'],['../a00785.html#gab4a3637dbcb4bb42dc55caea7a1e0495',1,'glm::isNull(vec< L, T, Q > const &v, T const &epsilon)']]],
['isorthogonal',['isOrthogonal',['../a00757.html#ga58f3289f74dcab653387dd78ad93ca40',1,'glm']]],
['ispoweroftwo',['isPowerOfTwo',['../a00719.html#gadf491730354aa7da67fbe23d4d688763',1,'glm::isPowerOfTwo(genIUType v)'],['../a00719.html#gabf2b61ded7049bcb13e25164f832a290',1,'glm::isPowerOfTwo(vec< L, T, Q > const &v)']]],
['ivec1',['ivec1',['../a00692.html#gaedd0562c2e77714929d7723a7e2e0dba',1,'glm']]],
['ivec2',['ivec2',['../a00699.html#ga6f9269106d91b2d2b91bcf27cd5f5560',1,'glm']]],
['ivec3',['ivec3',['../a00699.html#gad0d784d8eee201aca362484d2daee46c',1,'glm']]],
['ivec4',['ivec4',['../a00699.html#ga5abb4603dae0ce58c595e66d9123d812',1,'glm']]]
];
|
define(
({
loading: 'Betöltés...',
loadMore: 'Továbbiak betöltése'
})
);
|
import Head from 'next/head'
import Post from '../components/post'
export async function getStaticProps() {
// fetch list of posts
const response = await fetch(
'https://jsonplaceholder.typicode.com/posts?_page=1'
)
const postList = await response.json()
return {
props: {
postList,
},
}
}
export default function IndexPage({ postList }) {
return (
<main>
<Head>
<title>Home page</title>
</Head>
<h1>List of posts</h1>
<section>
{postList.map((post) => (
<Post {...post} key={post.id} />
))}
</section>
</main>
)
}
|
/*!
* CanJS - 2.2.7
* http://canjs.com/
* Copyright (c) 2015 Bitovi
* Fri, 24 Jul 2015 20:57:32 GMT
* Licensed MIT
*/
/*can@2.2.7#control/plugin/plugin*/
define([
'jquery',
'can/util/library',
'can/control'
], function ($, can) {
$ = $ || window.$;
var i, isAControllerOf = function (instance, controllers) {
var name = instance.constructor.pluginName || instance.constructor._shortName;
for (i = 0; i < controllers.length; i++) {
if (typeof controllers[i] === 'string' ? name === controllers[i] : instance instanceof controllers[i]) {
return true;
}
}
return false;
}, makeArray = can.makeArray, old = can.Control.setup;
can.Control.setup = function () {
if (this !== can.Control) {
var pluginName = this.pluginName || this._fullName;
if (pluginName !== 'can_control') {
this.plugin(pluginName);
}
old.apply(this, arguments);
}
};
$.fn.extend({
controls: function () {
var controllerNames = makeArray(arguments), instances = [], controls, c;
this.each(function () {
controls = can.$(this).data('controls');
if (!controls) {
return;
}
for (var i = 0; i < controls.length; i++) {
c = controls[i];
if (!controllerNames.length || isAControllerOf(c, controllerNames)) {
instances.push(c);
}
}
});
return instances;
},
control: function (control) {
return this.controls.apply(this, arguments)[0];
}
});
can.Control.plugin = function (pluginname) {
var control = this;
if (!$.fn[pluginname]) {
$.fn[pluginname] = function (options) {
var args = makeArray(arguments), isMethod = typeof options === 'string' && $.isFunction(control.prototype[options]), meth = args[0], returns;
this.each(function () {
var plugin = can.$(this).control(control);
if (plugin) {
if (isMethod) {
returns = plugin[meth].apply(plugin, args.slice(1));
} else {
plugin.update.apply(plugin, args);
}
} else {
control.newInstance.apply(control, [this].concat(args));
}
});
return returns !== undefined ? returns : this;
};
}
};
can.Control.prototype.update = function (options) {
can.extend(this.options, options);
this.on();
};
return can;
}); |
function ResourceManager(options) {
var t = this;
// exports
t.fetchResources = fetchResources;
t.setResources = setResources;
t.mutateResourceEvent = mutateResourceEvent;
// locals
var resourceSources = [];
var cache;
// initialize the resources.
setResources(options.resources);
// add the resource sources
function setResources(sources) {
resourceSources = [];
var resource;
if ($.isFunction(sources)) {
// is it a function?
resource = {
resources: sources
};
resourceSources.push(resource);
cache = undefined;
} else if (typeof sources == 'string') {
// is it a URL string?
resource = {
url: sources
};
resourceSources.push(resource);
cache = undefined;
} else if (typeof sources == 'object' && sources != null) {
// is it json object?
for (var i = 0; i < sources.length; i++) {
var s = sources[i];
normalizeSource(s);
resource = {
resources: s
};
resourceSources.push(resource);
}
cache = undefined;
}
}
/**
* ----------------------------------------------------------------
* Fetch resources from source array
* ----------------------------------------------------------------
*/
function fetchResources(useCache, currentView) {
// if useCache is not defined, default to true
useCache = (typeof useCache !== 'undefined' ? useCache : true);
if (!useCache || cache === undefined) {
// do a fetch resource from source, rebuild cache
cache = [];
var len = resourceSources.length;
for (var i = 0; i < len; i++) {
var resources = fetchResourceSource(resourceSources[i], currentView);
cache = cache.concat(resources);
}
}
if($.isFunction(options.resourceFilter)) {
return $.grep(cache, options.resourceFilter);
}
return cache;
}
/**
* ----------------------------------------------------------------
* Fetch resources from each source. If source is a function, call
* the function and return the resource. If source is a URL, get
* the data via synchronized ajax call. If the source is an
* object, return it as is.
* ----------------------------------------------------------------
*/
function fetchResourceSource(source, currentView) {
var resources = source.resources;
if (resources) {
if ($.isFunction(resources)) {
return resources();
}
} else {
var url = source.url;
if (url) {
var data = {};
if (typeof currentView === 'object') {
var startParam = options.startParam;
var endParam = options.endParam;
if (startParam) {
data[startParam] = Math.round(+currentView.intervalStart / 1000);
}
if (endParam) {
data[endParam] = Math.round(+currentView.intervalEnd / 1000);
}
}
$.ajax($.extend({}, ajaxDefaults, source, {
data: data,
dataType: 'json',
cache: false,
success: function(res) {
res = res || [];
resources = res;
},
error: function() {
// TODO - need to rewrite callbacks, etc.
//alert("ajax error getting json from " + url);
},
async: false // too much work coordinating callbacks so dumb it down
}));
}
}
return resources;
}
/**
* ----------------------------------------------------------------
* normalize the source object
* ----------------------------------------------------------------
*/
function normalizeSource(source) {
if (source.className) {
if (typeof source.className == 'string') {
source.className = source.className.split(/\s+/);
}
} else {
source.className = [];
}
var normalizers = fc.sourceNormalizers;
for (var i = 0; i < normalizers.length; i++) {
normalizers[i](source);
}
}
/* Event Modification Math
-----------------------------------------------------------------------------------------*/
// Modify the date(s) of an event and make this change propagate to all other events with
// the same ID (related repeating events).
//
// If `newStart`/`newEnd` are not specified, the "new" dates are assumed to be `event.start` and `event.end`.
// The "old" dates to be compare against are always `event._start` and `event._end` (set by EventManager).
//
// Returns an object with delta information and a function to undo all operations.
//
function mutateResourceEvent(event, newResources, newStart, newEnd) {
var oldAllDay = event._allDay;
var oldStart = event._start;
var oldEnd = event._end;
var clearEnd = false;
var newAllDay;
var dateDelta;
var durationDelta;
var undoFunc;
// if no new dates were passed in, compare against the event's existing dates
if (!newStart && !newEnd) {
newStart = event.start;
newEnd = event.end;
}
// NOTE: throughout this function, the initial values of `newStart` and `newEnd` are
// preserved. These values may be undefined.
// detect new allDay
if (event.allDay != oldAllDay) { // if value has changed, use it
newAllDay = event.allDay;
}
else { // otherwise, see if any of the new dates are allDay
newAllDay = !(newStart || newEnd).hasTime();
}
// normalize the new dates based on allDay
if (newAllDay) {
if (newStart) {
newStart = newStart.clone().stripTime();
}
if (newEnd) {
newEnd = newEnd.clone().stripTime();
}
}
// compute dateDelta
if (newStart) {
if (newAllDay) {
dateDelta = dayishDiff(newStart, oldStart.clone().stripTime()); // treat oldStart as allDay
}
else {
dateDelta = dayishDiff(newStart, oldStart);
}
}
if (newAllDay != oldAllDay) {
// if allDay has changed, always throw away the end
clearEnd = true;
}
else if (newEnd) {
durationDelta = dayishDiff(
// new duration
newEnd || t.getDefaultEventEnd(newAllDay, newStart || oldStart),
newStart || oldStart
).subtract(dayishDiff(
// subtract old duration
oldEnd || t.getDefaultEventEnd(oldAllDay, oldStart),
oldStart
));
}
undoFunc = mutateResourceEvents(
t.clientEvents(event._id), // get events with this ID
clearEnd,
newAllDay,
dateDelta,
durationDelta,
newResources
);
return {
dateDelta: dateDelta,
durationDelta: durationDelta,
undo: undoFunc
};
}
// Modifies an array of events in the following ways (operations are in order):
// - clear the event's `end`
// - convert the event to allDay
// - add `dateDelta` to the start and end
// - add `durationDelta` to the event's duration
//
// Returns a function that can be called to undo all the operations.
//
function mutateResourceEvents(events, clearEnd, forceAllDay, dateDelta, durationDelta, newResources) {
var isAmbigTimezone = t.getIsAmbigTimezone();
var undoFunctions = [];
$.each(events, function(i, event) {
var oldResources = event.resources;
var oldAllDay = event._allDay;
var oldStart = event._start;
var oldEnd = event._end;
var newAllDay = forceAllDay != null ? forceAllDay : oldAllDay;
var newStart = oldStart.clone();
var newEnd = (!clearEnd && oldEnd) ? oldEnd.clone() : null;
// NOTE: this function is responsible for transforming `newStart` and `newEnd`,
// which were initialized to the OLD values first. `newEnd` may be null.
// normlize newStart/newEnd to be consistent with newAllDay
if (newAllDay) {
newStart.stripTime();
if (newEnd) {
newEnd.stripTime();
}
}
else {
if (!newStart.hasTime()) {
newStart = t.rezoneDate(newStart);
}
if (newEnd && !newEnd.hasTime()) {
newEnd = t.rezoneDate(newEnd);
}
}
// ensure we have an end date if necessary
if (!newEnd && (options.forceEventDuration || +durationDelta)) {
newEnd = t.getDefaultEventEnd(newAllDay, newStart);
}
// translate the dates
newStart.add(dateDelta);
if (newEnd) {
newEnd.add(dateDelta).add(durationDelta);
}
// if the dates have changed, and we know it is impossible to recompute the
// timezone offsets, strip the zone.
if (isAmbigTimezone) {
if (+dateDelta || +durationDelta) {
newStart.stripZone();
if (newEnd) {
newEnd.stripZone();
}
}
}
event.allDay = newAllDay;
event.start = newStart;
event.end = newEnd;
event.resources = newResources;
backupEventDates(event);
undoFunctions.push(function() {
event.allDay = oldAllDay;
event.start = oldStart;
event.end = oldEnd;
event.resources = oldResources;
backupEventDates(event);
});
});
return function() {
for (var i=0; i<undoFunctions.length; i++) {
undoFunctions[i]();
}
};
}
}
|
export default {
selectedTypes (state = [], action) {
const { t } = action
const index = state.indexOf(t)
const newState = [...state]
if (index === -1) {
newState.push(t)
} else {
newState.splice(index, 1)
}
switch (action.type) {
case 'SELECT_TYPE':
return newState
case 'CLEAN_SELECTED_TYPES':
return []
default:
return state
}
},
bizplanPDF (state = {}, action) {
const { PDFName, PDFUrl } = action
switch (action.type) {
case 'ADD_PDF':
return {PDFName, PDFUrl}
case 'REMOVE_PDF':
return ''
default:
return state
}
},
uploading (state = false, action) {
switch (action.type) {
case 'UPLOADING_PDF':
return true
case 'UPLOADED_PDF':
return false
default:
return state
}
}
}
|
/**
* mvi - methods to perform multivariate interpolation
*
* Copyright (c) 2013 Cameron Beccario
* The MIT License - http://opensource.org/licenses/MIT
* https://github.com/cambecc/air
*
* Thin plate spline code adapted from TPSDemo, Copyright (c) 2003, 2004, 2005 by Jarno Elonen.
* http://elonen.iki.fi/code/tpsdemo
*
* LU decomposition adapted from JAMA project created by NIST.
* http://math.nist.gov/javanumerics/jama
*/
mvi = function() {
"use strict";
var mvi = {
scaleVector: scaleVector,
addVectors: addVectors,
inverseDistanceWeighting: inverseDistanceWeighting,
thinPlateSpline: thinPlateSpline,
bilinear: bilinear
};
/**
* Multiply the vector v (in rectangular [x, y] form) by the scalar s, in place, and return it.
*/
function scaleVector(v, s) {
v[0] *= s;
v[1] *= s;
return v;
}
/**
* Add the second vector into the first and return it. Both vectors must be in rectangular [x, y] form.
*/
function addVectors(a, b) {
a[0] += b[0];
a[1] += b[1];
return a;
}
/**
* Returns the square of the distance between the two specified points x0, y0 and x1, y1.
*/
function dist2(x0, y0, x1, y1) {
var dx = x0 - x1;
var dy = y0 - y1;
return dx * dx + dy * dy;
}
/**
* Returns the distance between the two specified points x0, y0 and x1, y1.
*/
function dist(x0, y0, x1, y1) {
return Math.sqrt(dist2(x0, y0, x1, y1));
}
/**
* Builds a k-d tree from the specified points, each point of the form [x, y, ...]
*/
function kdTree(points, k, depth) {
if (points.length == 0) {
return null;
}
var axis = depth % k; // cycle through each axis as we descend downwards
var compareByAxis = function(a, b) {
return a[axis] - b[axis];
}
points.sort(compareByAxis);
// Pivot on the median point using the policy that all points to the left must be _strictly smaller_.
var median = Math.floor(points.length / 2);
var node = points[median];
// Scan backwards for points aligned on the same axis. We want the start of any such sequence.
while (median > 0 && compareByAxis(node, points[median - 1]) === 0) {
node = points[--median];
}
node.left = kdTree(points.slice(0, median), k, depth + 1);
node.right = kdTree(points.slice(median + 1), k, depth + 1);
// Provide a function that easily calculates a point's distance to the partitioning plane of this node.
var plane = node[axis];
node.planeDistance = function(p) { return plane - p[axis]; };
return node;
}
/**
* Given array a, representing a binary heap, this method pushes the key down from the top of the heap. After
* invocation, the key having the largest "distance2" value is at the top of the heap.
*/
function heapify(a, key) {
var i = 0;
var length = a.length;
var child;
while ((child = i * 2 + 1) < length) {
var favorite = a[child];
var right = child + 1;
var r;
if (right < length && (r = a[right]).distance2 > favorite.distance2) {
favorite = r;
child = right;
}
if (key.distance2 >= favorite.distance2) {
break;
}
a[i] = favorite;
i = child;
}
a[i] = key;
}
/**
* Finds the neighbors nearest to the specified point, starting the search at the k-d tree provided as 'node'.
* The n closest neighbors are placed in the results array (of length n) in no defined order.
*/
function nearest(point, node, results) {
// This recursive function descends the k-d tree, visiting partitions containing the desired point.
// As it descends, it keeps a priority queue of the closest neighbors found. Each visited node is
// compared against the worst (i.e., most distant) neighbor in the queue, replacing it if the current
// node is closer. The queue is implemented as a binary heap so the worst neighbor is always the
// element at the top of the queue.
// Calculate distance of the point to the plane this node uses to split the search space.
var planeDistance = node.planeDistance(point);
var containingSide;
var otherSide;
if (planeDistance <= 0) {
// point is contained in the right partition of the current node.
containingSide = node.right;
otherSide = node.left;
}
else {
// point is contained in the left partition of the current node.
containingSide = node.left;
otherSide = node.right;
}
if (containingSide) {
// Search the containing partition for neighbors.
nearest(point, containingSide, results);
}
// Now determine if the current node is a close neighbor. Do the comparison using _squared_ distance to
// avoid unnecessary Math.sqrt operations.
var d2 = dist2(point[0], point[1], node[0], node[1]);
var n = results[0];
if (d2 < n.distance2) {
// Current node is closer than the worst neighbor encountered so far, so replace it and adjust the queue.
n.point = node;
n.distance2 = d2;
heapify(results, n);
}
if (otherSide) {
// The other partition *might* have relevant neighbors if the point is closer to the partition plane
// than the worst neighbor encountered so far. If so, descend down the other side.
if ((planeDistance * planeDistance) < results[0].distance2) {
nearest(point, otherSide, results);
}
}
}
/**
* Returns a function that performs inverse distance weighting (en.wikipedia.org/wiki/Inverse_distance_weighting)
* interpolation over the specified points using k closest neighbors. The points array must be comprised of
* elements with the structure [x, y, z], where z is a vector [vx, vy] in rectangular form.
*
* The returned function has the signature f(x, y, result). When invoked, a zero vector should be passed as
* 'result' to provide the initial value. After invocation, result holds the interpolated vector vxi, vyi in its
* 0th and 1st elements, respectively.
*/
function inverseDistanceWeighting(points, k) {
// Build a space partitioning tree to use for quick lookup of closest neighbors.
var tree = kdTree(points, 2, 0);
// Define special scratch objects for intermediate calculations to avoid unnecessary array allocations.
var temp = [];
var nearestNeighbors = [];
for (var i = 0; i < k; i++) {
nearestNeighbors.push({});
}
function clear() {
for (var i = 0; i < k; i++) {
var n = nearestNeighbors[i];
n.point = null;
n.distance2 = Infinity;
}
}
// Return a function that interpolates a vector for the point (x, y) and stores it in "result".
return function(x, y, result) {
var weightSum = 0;
clear(); // reset our scratch objects
temp[0] = x;
temp[1] = y;
nearest(temp, tree, nearestNeighbors); // calculate nearest neighbors
// Sum up the values at each nearest neighbor, adjusted by the inverse square of the distance.
for (var i = 0; i < k; i++) {
var neighbor = nearestNeighbors[i];
var sample = neighbor.point[2];
var d2 = neighbor.distance2;
if (d2 === 0) { // (x, y) is exactly on top of a point.
result[0] = sample[0];
result[1] = sample[1];
return result;
}
var weight = 1 / d2;
temp[0] = sample[0];
temp[1] = sample[1];
result = addVectors(result, scaleVector(temp, weight));
weightSum += weight;
}
// Divide by the total weight to calculate an average, which is our interpolated result.
return scaleVector(result, 1 / weightSum);
}
}
/**
* Swap elements i and j in array a.
*/
function swap(a, i, j) {
var t = a[i];
a[i] = a[j];
a[j] = t;
}
/**
* Swap element i between two arrays a and b.
*/
function swapBetween(a, b, i) {
var t = a[i];
a[i] = b[i];
b[i] = t;
}
/**
* Returns a two-dimensional array [rows][columns] with each element initialized to 0.
*/
function createMatrix(rows, columns) {
var M = [];
for (var i = 0; i < rows; i++) {
M[i] = [];
for (var j = 0; j < columns; j++) {
M[i][j] = 0;
}
}
M.rows = rows;
M.columns = columns;
return M;
}
/**
* Copies elements from the top-right to the bottom-left.
*/
function mirrorDiagonal(M) {
for (var i = 0; i < M.rows; i++) {
for (var j = i + 1; j < M.columns; j++) {
M[j][i] = M[i][j];
}
}
return M;
}
/**
* Finds the LU decomposition for matrix M, modifying M in place.
*/
function LUDecomposition(M) {
var pivots = M.map(function(row, i) { return i; });
var i, j;
for (var k = 0; k < M.columns; k++) {
// Find pivot p.
var p = k;
for (i = k + 1; i < M.rows; i++) {
if (Math.abs(M[i][k]) > Math.abs(M[p][k])) {
p = i;
}
}
// Exchange if necessary.
if (p != k) {
for (j = 0; j < M.columns; j++) {
swapBetween(M[p], M[k], j);
}
swap(pivots, p, k);
}
// Compute multipliers and eliminate k-th column.
if (M[k][k] != 0.0) {
for (i = k + 1; i < M.rows; i++) {
M[i][k] /= M[k][k];
for (j = k + 1; j < M.columns; j++) {
M[i][j] -= M[i][k] * M[k][j];
}
}
}
}
M.pivots = pivots;
return M;
}
/**
* Returns true if matrix M is singular.
*/
function isSingular(M) {
for (var i = 0; i < Math.min(M.rows, M.columns); i++) {
if (M[i][i] == 0.0) {
return true;
}
}
return false;
}
/**
* Creates a copy of matrix M according to the specified array of pivots.
*/
function copyWithPivoting(M, pivots) {
var A = createMatrix(M.rows, M.columns);
for (var i = 0; i < M.rows; i++) {
for (var j = 0; j < M.columns; j++) {
A[i][j] = M[pivots[i]][j];
}
}
return A;
}
/**
* Returns matrix X such that L · X = B.
*/
function solve(L, B) {
if (L.rows != B.rows)
throw new Error("Matrix row dimensions must agree: " + L.rows + " " + B.rows);
var LU = LUDecomposition(L);
if (isSingular(LU))
throw new Error("Matrix is singular");
var X = copyWithPivoting(B, LU.pivots);
var i, j, k;
// Solve LU.L * Y = B
for (k = 0; k < LU.columns; k++) {
for (i = k + 1; i < LU.columns; i++) {
for (j = 0; j < B.columns; j++) {
X[i][j] -= X[k][j] * LU[i][k];
}
}
}
// Solve LU.U * X = Y
for (k = LU.columns - 1; k >= 0; k--) {
for (j = 0; j < B.columns; j++) {
X[k][j] /= LU[k][k];
}
for (i = 0; i < k; i++) {
for (j = 0; j < B.columns; j++) {
X[i][j] -= X[k][j] * LU[i][k];
}
}
}
return X;
}
/**
* TPS kernel function.
*/
function f(r) {
return r == 0.0 ? 0.0 : r * r * Math.log(r);
}
/**
* Creates the L matrix for TPS interpolation.
*/
function buildL(points, rigidity) {
var n = points.length;
var L = createMatrix(n + 3, n + 3);
var a = 0; // mean of distances between control points' xy-projections
// Calculate how much each point influences all other points using radial basis function f.
for (var i = 0; i < n; i++) {
var x = points[i][0];
var y = points[i][1];
for (var j = i + 1; j < n; j++) {
var d = dist(x, y, points[j][0], points[j][1]);
L[i][j] = f(d);
a += d * 2;
}
L[i][n + 0] = 1.0;
L[i][n + 1] = x;
L[i][n + 2] = y;
}
// Set rigidity parameters on the diagonal.
a /= n * n;
for (var k = 0; k < n; k++) {
L[k][k] = rigidity * a * a; // λa^2
}
// L is diagonally symmetrical, no need to recalculate the other side.
return mirrorDiagonal(L);
}
/**
* Creates the B matrix for TPS interpolation.
*/
function buildB(points) {
var B = createMatrix(points.length + 3, 1);
points.forEach(function(point, i) {
B[i][0] = point[2]; // z-coordinate
});
return B;
}
/**
* Returns a function that performs thin plate spline (en.wikipedia.org/wiki/Thin_plate_spline) interpolation
* over the specified control points. The resulting function has the signature f(x, y) and returns the z value
* interpolated at that point. At least three control points are required.
*
* @param points an array of control points having the form: [[x0, y0, z0], [x1, y1, z1], ... ]
* @param rigidity the rigidity of the deformation: larger values increase relaxation (smoothness) of the
* interpolated surface, with 0 the most rigid (goes exactly through all control points)
* @returns {Function} f(x, y) -> z
*/
function thinPlateSpline(points, rigidity) {
// Solve for matrix X of unknown weights in the linear equation system: L·X=B, where matrix L contains
// the control points' relationships, and B is a matrix of the control points' z-coordinates.
var n = points.length;
var L = buildL(points, rigidity); // n+3 × n+3
var B = buildB(points); // n+3 × 1
var X = solve(L, B); // n+3 × 1
var weights = X.map(function(row) { return row[0]; });
var a1 = weights[n + 0];
var a2 = weights[n + 1];
var a3 = weights[n + 2];
return function(x, y) {
var z = a1 + a2 * x + a3 * y;
for (var i = 0; i < n; i++) {
var point = points[i];
z += weights[i] * f(dist(point[0], point[1], x, y));
}
return z;
}
}
// UNDONE
function bilinear(x, y, g00, g10, g01, g11) {
// g(0, 0)(1 - x)(1 - y) + g(1, 0)x(1-y) + g(0, 1)(1 - x)y + g(1, 1)xy
var s = (1 - x) * (1 - y);
var t = x * (1 - y);
var u = (1 - x) * y;
var v = x * y;
return [
g00[0] * s + g10[0] * t + g01[0] * u + g11[0] * v,
g00[1] * s + g10[1] * t + g01[1] * u + g11[1] * v
];
}
return mvi;
}();
|
import { addCallback } from 'meteor/vulcan:core';
// limit the number of items that can be requested at once
function CommentsMaxLimit (parameters, terms) {
var maxLimit = 1000;
// if a limit was provided with the terms, add it too (note: limit=0 means "no limit")
if (typeof terms.limit !== 'undefined') {
_.extend(parameters.options, {limit: parseInt(terms.limit)});
}
// limit to "maxLimit" items at most when limit is undefined, equal to 0, or superior to maxLimit
if(!parameters.options.limit || parameters.options.limit === 0 || parameters.options.limit > maxLimit) {
parameters.options.limit = maxLimit;
}
return parameters;
}
addCallback("comments.parameters", CommentsMaxLimit);
|
/**
* @license Highcharts JS v7.0.0 (2018-12-11)
*
* Indicator series type for Highstock
*
* (c) 2010-2018 Daniel Studencki
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define(function () {
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var reduceArrayMixin = (function (H) {
/**
* (c) 2010-2018 Pawel Fus & Daniel Studencki
*
* License: www.highcharts.com/license
*/
var reduce = H.reduce;
var reduceArrayMixin = {
/**
* Get min value of array filled by OHLC data.
* @param {array} arr Array of OHLC points (arrays).
* @param {string} index Index of "low" value in point array.
* @returns {number} Returns min value.
*/
minInArray: function (arr, index) {
return reduce(arr, function (min, target) {
return Math.min(min, target[index]);
}, Number.MAX_VALUE);
},
/**
* Get max value of array filled by OHLC data.
* @param {array} arr Array of OHLC points (arrays).
* @param {string} index Index of "high" value in point array.
* @returns {number} Returns max value.
*/
maxInArray: function (arr, index) {
return reduce(arr, function (min, target) {
return Math.max(min, target[index]);
}, -Number.MAX_VALUE);
},
/**
* Get extremes of array filled by OHLC data.
* @param {array} arr Array of OHLC points (arrays).
* @param {string} minIndex Index of "low" value in point array.
* @param {string} maxIndex Index of "high" value in point array.
* @returns {array} Returns array with min and max value.
*/
getArrayExtremes: function (arr, minIndex, maxIndex) {
return reduce(arr, function (prev, target) {
return [
Math.min(prev[0], target[minIndex]),
Math.max(prev[1], target[maxIndex])
];
}, [Number.MAX_VALUE, -Number.MAX_VALUE]);
}
};
return reduceArrayMixin;
}(Highcharts));
var multipleLinesMixin = (function (H) {
/**
*
* (c) 2010-2018 Wojciech Chmiel
*
* License: www.highcharts.com/license
*
* */
var each = H.each,
merge = H.merge,
error = H.error,
defined = H.defined,
SMA = H.seriesTypes.sma;
/**
* Mixin useful for all indicators that have more than one line.
* Merge it with your implementation where you will provide
* getValues method appropriate to your indicator and pointArrayMap,
* pointValKey, linesApiNames properites. Notice that pointArrayMap
* should be consistent with amount of lines calculated in getValues method.
*
* @private
* @mixin multipleLinesMixin
*/
var multipleLinesMixin = {
/**
* Lines ids. Required to plot appropriate amount of lines.
* Notice that pointArrayMap should have more elements than
* linesApiNames, because it contains main line and additional lines ids.
* Also it should be consistent with amount of lines calculated in
* getValues method from your implementation.
*
* @private
* @name multipleLinesMixin.pointArrayMap
* @type {Array<string>}
*/
pointArrayMap: ['top', 'bottom'],
/**
* Main line id.
*
* @private
* @name multipleLinesMixin.pointValKey
* @type {string}
*/
pointValKey: 'top',
/**
* Additional lines DOCS names. Elements of linesApiNames array should
* be consistent with DOCS line names defined in your implementation.
* Notice that linesApiNames should have decreased amount of elements
* relative to pointArrayMap (without pointValKey).
*
* @private
* @name multipleLinesMixin.linesApiNames
* @type {Array<string>}
*/
linesApiNames: ['bottomLine'],
/**
* Create translatedLines Collection based on pointArrayMap.
*
* @private
* @function multipleLinesMixin.getTranslatedLinesNames
*
* @param {string} excludedValue
* pointValKey - main line id
*
* @return {Array<string>}
* Returns translated lines names without excluded value.
*/
getTranslatedLinesNames: function (excludedValue) {
var translatedLines = [];
each(this.pointArrayMap, function (propertyName) {
if (propertyName !== excludedValue) {
translatedLines.push(
'plot' +
propertyName.charAt(0).toUpperCase() +
propertyName.slice(1)
);
}
});
return translatedLines;
},
/**
* @private
* @function multipleLinesMixin.toYData
*
* @param {string} point
*
* @return {Array<number>}
* Returns point Y value for all lines
*/
toYData: function (point) {
var pointColl = [];
each(this.pointArrayMap, function (propertyName) {
pointColl.push(point[propertyName]);
});
return pointColl;
},
/**
* Add lines plot pixel values.
*
* @private
* @function multipleLinesMixin.translate
*/
translate: function () {
var indicator = this,
pointArrayMap = indicator.pointArrayMap,
LinesNames = [],
value;
LinesNames = indicator.getTranslatedLinesNames();
SMA.prototype.translate.apply(indicator, arguments);
each(indicator.points, function (point) {
each(pointArrayMap, function (propertyName, i) {
value = point[propertyName];
if (value !== null) {
point[LinesNames[i]] = indicator.yAxis.toPixels(
value,
true
);
}
});
});
},
/**
* Draw main and additional lines.
*
* @private
* @function multipleLinesMixin.drawGraph
*/
drawGraph: function () {
var indicator = this,
pointValKey = indicator.pointValKey,
linesApiNames = indicator.linesApiNames,
mainLinePoints = indicator.points,
pointsLength = mainLinePoints.length,
mainLineOptions = indicator.options,
mainLinePath = indicator.graph,
gappedExtend = {
options: {
gapSize: mainLineOptions.gapSize
}
},
secondaryLines = [], // additional lines point place holders
secondaryLinesNames = indicator.getTranslatedLinesNames(
pointValKey
),
point;
// Generate points for additional lines:
each(secondaryLinesNames, function (plotLine, index) {
// create additional lines point place holders
secondaryLines[index] = [];
while (pointsLength--) {
point = mainLinePoints[pointsLength];
secondaryLines[index].push({
x: point.x,
plotX: point.plotX,
plotY: point[plotLine],
isNull: !defined(point[plotLine])
});
}
pointsLength = mainLinePoints.length;
});
// Modify options and generate additional lines:
each(linesApiNames, function (lineName, i) {
if (secondaryLines[i]) {
indicator.points = secondaryLines[i];
if (mainLineOptions[lineName]) {
indicator.options = merge(
mainLineOptions[lineName].styles,
gappedExtend
);
} else {
error(
'Error: "There is no ' + lineName +
' in DOCS options declared. Check if linesApiNames' +
' are consistent with your DOCS line names."' +
' at mixin/multiple-line.js:34'
);
}
indicator.graph = indicator['graph' + lineName];
SMA.prototype.drawGraph.call(indicator);
// Now save lines:
indicator['graph' + lineName] = indicator.graph;
} else {
error(
'Error: "' + lineName + ' doesn\'t have equivalent ' +
'in pointArrayMap. To many elements in linesApiNames ' +
'relative to pointArrayMap."'
);
}
});
// Restore options and draw a main line:
indicator.points = mainLinePoints;
indicator.options = mainLineOptions;
indicator.graph = mainLinePath;
SMA.prototype.drawGraph.call(indicator);
}
};
return multipleLinesMixin;
}(Highcharts));
(function (H, reduceArrayMixin, multipleLinesMixin) {
/* *
*
* License: www.highcharts.com/license
*
* */
var getArrayExtremes = reduceArrayMixin.getArrayExtremes,
merge = H.merge;
/**
* The Price Channel series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.pc
*
* @augments Highcharts.Series
*/
H.seriesType('pc', 'sma',
/**
* Price channel (PC). This series requires the `linkedTo` option to be
* set and should be loaded after the `stock/indicators/indicators.js`.
*
* @sample {highstock} stock/indicators/price-channel
* Price Channel
*
* @extends plotOptions.sma
* @since 7.0.0
* @product highstock
* @excluding allAreas, colorAxis, compare, compareBase, joinBy, keys,
* navigatorOptions, pointInterval, pointIntervalUnit,
* pointPlacement, pointRange, pointStart, showInNavigator,
* stacking
* @optionparent plotOptions.pc
*/
{
/**
* @excluding index
*/
params: {
period: 20
},
lineWidth: 1,
topLine: {
styles: {
/**
* Color of the top line. If not set, it's inherited from
* [plotOptions.pc.color](#plotOptions.pc.color).
*
* @type {Highcharts.ColorString}
*/
lineColor: '#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1'.split(' ')[2],
/**
* Pixel width of the line.
*/
lineWidth: 1
}
},
bottomLine: {
styles: {
/**
* Color of the bottom line. If not set, it's inherited from
* [plotOptions.pc.color](#plotOptions.pc.color).
*
* @type {Highcharts.ColorString}
*/
lineColor: '#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1'.split(' ')[8],
/**
* Pixel width of the line.
*/
lineWidth: 1
}
},
dataGrouping: {
approximation: 'averages'
}
},
/**
* @lends Highcharts.Series#
*/
merge(multipleLinesMixin, {
pointArrayMap: ['top', 'middle', 'bottom'],
pointValKey: 'middle',
nameBase: 'Price Channel',
nameComponents: ['period'],
linesApiNames: ['topLine', 'bottomLine'],
getValues: function (series, params) {
var period = params.period,
xVal = series.xData,
yVal = series.yData,
yValLen = yVal ? yVal.length : 0,
PC = [], // 0- date, 1-top line, 2-middle line, 3-bottom line
ML, TL, BL, // middle line, top line and bottom line
date,
low = 2,
high = 1,
xData = [],
yData = [],
slicedY,
extremes,
i;
if (yValLen < period) {
return false;
}
for (i = period; i <= yValLen; i++) {
date = xVal[i - 1];
slicedY = yVal.slice(i - period, i);
extremes = getArrayExtremes(slicedY, low, high);
TL = extremes[1];
BL = extremes[0];
ML = (TL + BL) / 2;
PC.push([date, TL, ML, BL]);
xData.push(date);
yData.push([TL, ML, BL]);
}
return {
values: PC,
xData: xData,
yData: yData
};
}
})
);
/**
* A Price channel indicator. If the [type](#series.pc.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.pc
* @since 7.0.0
* @product highstock
* @excluding allAreas, colorAxis, compare, compareBase, dataParser, dataURL,
* joinBy, keys, navigatorOptions, pointInterval,
* pointIntervalUnit, pointPlacement, pointRange, pointStart,
* showInNavigator, stacking
* @optionparent series.pc
*/
}(Highcharts, reduceArrayMixin, multipleLinesMixin));
return (function () {
}());
})); |
module.exports = {
'.react-tabs [role=tablist]': {
'border-bottom': '1px solid #aaa',
'margin': '0 0 10px',
'padding': '0'
},
'.react-tabs [role=tab]': {
'display': 'inline-block',
'border': '1px solid transparent',
'border-bottom': 'none',
'bottom': '-1px',
'position': 'relative',
'list-style': 'none',
'padding': '6px 12px',
'cursor': 'pointer'
},
'.react-tabs [role=tab][aria-selected=true]': {
'background': '#fff',
'border-color': '#aaa',
'color': 'black',
'border-radius': '5px 5px 0 0',
'-moz-border-radius': '5px 5px 0 0',
'-webkit-border-radius': '5px 5px 0 0'
},
'.react-tabs [role=tab][aria-disabled=true]': {
'color': 'GrayText',
'cursor': 'default'
},
'.react-tabs [role=tab]:focus': {
'box-shadow': '0 0 5px hsl(208, 99%, 50%)',
'border-color': 'hsl(208, 99%, 50%)',
'outline': 'none'
},
'.react-tabs [role=tab]:focus:after': {
'content': '""',
'position': 'absolute',
'height': '5px',
'left': '-4px',
'right': '-4px',
'bottom': '-5px',
'background': '#fff'
}
};
|
var Terminal = (function() {
var history = (localStorage.getItem("history") ? localStorage.getItem("history").split(",") : []),
historyIndex = history.length;
self = {};
var KEY_UP = 38,
KEY_DOWN = 40,
KEY_TAB = 9;
// Auxiliary functions
var resetPrompt = function(terminal, prompt) {
var newPrompt = prompt.parentNode.cloneNode(true);
prompt.setAttribute("contenteditable", false);
if(self.prompt) {
newPrompt.querySelector(".prompt").textContent = self.prompt;
}
terminal.appendChild(newPrompt);
newPrompt.querySelector(".input").innerHTML = " ";
newPrompt.querySelector(".input").focus();
};
var runCommand = function(terminal, cmd, args) {
terminal.innerHTML += (self.commands[cmd](args));
};
var updateHistory = function(cmd) {
history.push(cmd);
localStorage.setItem("history", history);
historyIndex = history.length;
};
var browseHistory = function(prompt, direction) {
var changedPrompt = false;
if(direction == KEY_UP && historyIndex > 0) {
prompt.textContent = history[--historyIndex];
changedPrompt = true;
} else if(direction == KEY_DOWN) {
if(historyIndex < history.length) ++historyIndex;
if(historyIndex < history.length) prompt.textContent = history[historyIndex];
else prompt.textContent = " ";
changedPrompt = true;
}
if(changedPrompt) {
var range = document.createRange();
var sel = window.getSelection();
range.setStart(prompt.childNodes[0], prompt.textContent.length);
range.collapse(true);
sel.removeAllRanges();
sel.addRange(range);
}
};
var autoCompleteInput = function(input) {
var cmds = self.commands,
re = new RegExp("^" + input, "ig"),
suggestions = [];
for(var cmd in cmds) {
if(cmds.hasOwnProperty(cmd) && cmd.match(re)) {
suggestions.push(cmd);
}
}
return suggestions;
};
// Terminal functions
self.init = function(elem, commands) {
self.commands = commands;
elem.addEventListener("keydown", function(event) {
if(event.keyCode == KEY_TAB) {
var prompt = event.target;
var suggestions = autoCompleteInput(prompt.textContent.replace(/\s+/g, ""));
if(suggestions.length == 1) {
prompt.textContent = suggestions[0];
var range = document.createRange();
var sel = window.getSelection();
range.setStart(prompt.childNodes[0], suggestions[0].length);
range.collapse(true);
sel.removeAllRanges();
sel.addRange(range);
}
event.preventDefault(true);
return false;
}
});
elem.addEventListener("keyup", function(event) {
if(historyIndex < 0) return;
browseHistory(event.target, event.keyCode);
});
elem.addEventListener("keypress", function(event) {
var prompt = event.target;
if(event.keyCode != 13) return false;
updateHistory(prompt.textContent);
var input = prompt.textContent.split(" ");
if(input[0] && input[0] in self.commands) {
runCommand(elem, input[0], input);
}
resetPrompt(elem, prompt);
event.preventDefault();
});
elem.querySelector(".input").focus();
return self;
};
return self;
})();
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.nil = exports.UUID = undefined;
var _crypto;
function _load_crypto() {
return _crypto = require("crypto");
}
const invalidName = "options.name must be either a string or a Buffer";
const moreThan10000 = "can not generate more than 10000 UUIDs per second";
// Node ID according to rfc4122#section-4.5
const randomHost = (0, (_crypto || _load_crypto()).randomBytes)(16);
randomHost[0] = randomHost[0] | 0x01;
// randomize clockSeq initially, as per rfc4122#section-4.1.5
const seed = (0, (_crypto || _load_crypto()).randomBytes)(2);
let clockSeq = (seed[0] | seed[1] << 8) & 0x3fff;
// clock values
let lastMTime = 0;
let lastNTime = 0;
// lookup table hex to byte
const hex2byte = {};
// lookup table byte to hex
const byte2hex = [];
// populate lookup tables
for (let i = 0; i < 256; i++) {
const hex = (i + 0x100).toString(16).substr(1);
hex2byte[hex] = i;
byte2hex[i] = hex;
}
// UUID class
class UUID {
constructor(uuid) {
const check = UUID.check(uuid);
if (!check) {
throw new Error("not a UUID");
}
this.version = check.version;
if (check.format === "ascii") {
this.ascii = uuid;
} else {
this.binary = uuid;
}
}
static v1() {
return uuidTimeBased(randomHost);
}
static v5(name, namespace) {
return uuidNamed(name, "sha1", 0x50, namespace);
}
toString() {
if (this.ascii == null) {
this.ascii = stringify(this.binary);
}
return this.ascii;
}
toBuffer() {
if (this.binary == null) {
this.binary = UUID.parse(this.ascii);
}
return Buffer.from(this.binary);
}
inspect() {
return `UUID v${this.version} ${this.toString()}`;
}
static check(uuid, offset = 0) {
if (typeof uuid === "string") {
uuid = uuid.toLowerCase();
if (!/^[a-f0-9]{8}(\-[a-f0-9]{4}){3}\-([a-f0-9]{12})$/.test(uuid)) {
return false;
}
if (uuid === "00000000-0000-0000-0000-000000000000") {
return { version: undefined, variant: "nil", format: "ascii" };
}
return {
version: (hex2byte[uuid[14] + uuid[15]] & 0xf0) >> 4,
variant: getVariant((hex2byte[uuid[19] + uuid[20]] & 0xe0) >> 5),
format: "ascii"
};
}
if (Buffer.isBuffer(uuid)) {
if (uuid.length < offset + 16) {
return false;
}
let i = 0;
for (; i < 16; i++) {
if (uuid[offset + i] !== 0) {
break;
}
}
if (i === 16) {
return { version: undefined, variant: "nil", format: "binary" };
}
return {
version: (uuid[offset + 6] & 0xf0) >> 4,
variant: getVariant((uuid[offset + 8] & 0xe0) >> 5),
format: "binary"
};
}
throw new Error("Unknown type of uuid");
}
// read stringified uuid into a Buffer
static parse(input) {
const buffer = Buffer.allocUnsafe(16);
let j = 0;
for (let i = 0; i < 16; i++) {
buffer[i] = hex2byte[input[j++] + input[j++]];
if (i === 3 || i === 5 || i === 7 || i === 9) {
j += 1;
}
}
return buffer;
}
}
exports.UUID = UUID; // from rfc4122#appendix-C
UUID.URL = new UUID("6ba7b811-9dad-11d1-80b4-00c04fd430c8");
UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8");
// according to rfc4122#section-4.1.1
function getVariant(bits) {
switch (bits) {
case 0:
case 1:
case 3:
return "ncs";
case 4:
case 5:
return "rfc4122";
case 6:
return "microsoft";
default:
return "future";
}
}
var UuidEncoding;
(function (UuidEncoding) {
UuidEncoding[UuidEncoding["ASCII"] = 0] = "ASCII";
UuidEncoding[UuidEncoding["BINARY"] = 1] = "BINARY";
UuidEncoding[UuidEncoding["OBJECT"] = 2] = "OBJECT";
})(UuidEncoding || (UuidEncoding = {}));
// v1
function uuidTimeBased(nodeId, encoding = UuidEncoding.ASCII) {
let mTime = Date.now();
let nTime = lastNTime + 1;
const delta = mTime - lastMTime + (nTime - lastNTime) / 10000;
if (delta < 0) {
clockSeq = clockSeq + 1 & 0x3fff;
nTime = 0;
} else if (mTime > lastMTime) {
nTime = 0;
} else if (nTime >= 10000) {
return moreThan10000;
}
lastMTime = mTime;
lastNTime = nTime;
// unix timestamp to gregorian epoch as per rfc4122#section-4.5
mTime += 12219292800000;
const buffer = Buffer.allocUnsafe(16);
const myClockSeq = clockSeq;
const timeLow = ((mTime & 0xfffffff) * 10000 + nTime) % 0x100000000;
const timeHigh = mTime / 0x100000000 * 10000 & 0xfffffff;
buffer[0] = timeLow >>> 24 & 0xff;
buffer[1] = timeLow >>> 16 & 0xff;
buffer[2] = timeLow >>> 8 & 0xff;
buffer[3] = timeLow & 0xff;
buffer[4] = timeHigh >>> 8 & 0xff;
buffer[5] = timeHigh & 0xff;
buffer[6] = timeHigh >>> 24 & 0x0f | 0x10;
buffer[7] = timeHigh >>> 16 & 0x3f | 0x80;
buffer[8] = myClockSeq >>> 8;
buffer[9] = myClockSeq & 0xff;
let result;
switch (encoding) {
case UuidEncoding.BINARY:
buffer[10] = nodeId[0];
buffer[11] = nodeId[1];
buffer[12] = nodeId[2];
buffer[13] = nodeId[3];
buffer[14] = nodeId[4];
buffer[15] = nodeId[5];
result = buffer;
break;
case UuidEncoding.OBJECT:
buffer[10] = nodeId[0];
buffer[11] = nodeId[1];
buffer[12] = nodeId[2];
buffer[13] = nodeId[3];
buffer[14] = nodeId[4];
buffer[15] = nodeId[5];
result = new UUID(buffer);
break;
default:
result = byte2hex[buffer[0]] + byte2hex[buffer[1]] + byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" + byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" + byte2hex[buffer[6]] + byte2hex[buffer[7]] + "-" + byte2hex[buffer[8]] + byte2hex[buffer[9]] + "-" + byte2hex[nodeId[0]] + byte2hex[nodeId[1]] + byte2hex[nodeId[2]] + byte2hex[nodeId[3]] + byte2hex[nodeId[4]] + byte2hex[nodeId[5]];
break;
}
return result;
}
// v3 + v5
function uuidNamed(name, hashMethod, version, namespace, encoding = UuidEncoding.ASCII) {
const hash = (0, (_crypto || _load_crypto()).createHash)(hashMethod);
const nameIsNotAString = typeof name !== "string";
if (nameIsNotAString && !Buffer.isBuffer(name)) {
throw new Error(invalidName);
}
hash.update(namespace);
hash.update(name, nameIsNotAString ? "latin1" : "utf8");
const buffer = hash.digest();
let result;
switch (encoding) {
case UuidEncoding.BINARY:
buffer[6] = buffer[6] & 0x0f | version;
buffer[8] = buffer[8] & 0x3f | 0x80;
result = buffer;
break;
case UuidEncoding.OBJECT:
buffer[6] = buffer[6] & 0x0f | version;
buffer[8] = buffer[8] & 0x3f | 0x80;
result = new UUID(buffer);
break;
default:
result = byte2hex[buffer[0]] + byte2hex[buffer[1]] + byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" + byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" + byte2hex[buffer[6] & 0x0f | version] + byte2hex[buffer[7]] + "-" + byte2hex[buffer[8] & 0x3f | 0x80] + byte2hex[buffer[9]] + "-" + byte2hex[buffer[10]] + byte2hex[buffer[11]] + byte2hex[buffer[12]] + byte2hex[buffer[13]] + byte2hex[buffer[14]] + byte2hex[buffer[15]];
break;
}
return result;
}
function stringify(buffer) {
return byte2hex[buffer[0]] + byte2hex[buffer[1]] + byte2hex[buffer[2]] + byte2hex[buffer[3]] + "-" + byte2hex[buffer[4]] + byte2hex[buffer[5]] + "-" + byte2hex[buffer[6]] + byte2hex[buffer[7]] + "-" + byte2hex[buffer[8]] + byte2hex[buffer[9]] + "-" + byte2hex[buffer[10]] + byte2hex[buffer[11]] + byte2hex[buffer[12]] + byte2hex[buffer[13]] + byte2hex[buffer[14]] + byte2hex[buffer[15]];
}
// according to rfc4122#section-4.1.7
const nil = exports.nil = new UUID("00000000-0000-0000-0000-000000000000");
// UUID.v4 = uuidRandom
// UUID.v4fast = uuidRandomFast
// UUID.v3 = function(options, callback) {
// return uuidNamed("md5", 0x30, options, callback)
// }
//# sourceMappingURL=uuid.js.map |
it("should allow wasm with unused exports", function() {
return import("./module").then(function(module) {
const result = module.run();
expect(result).toEqual(42);
});
});
|
/*!
* froala_editor v2.9.3 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2019 Froala Labs
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = function( root, jQuery ) {
if ( jQuery === undefined ) {
// require('jQuery') returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
// that require this pattern but the window provided is a noop
// if it's defined (how jquery works)
if ( typeof window !== 'undefined' ) {
jQuery = require('jquery');
}
else {
jQuery = require('jquery')(root);
}
}
return factory(jQuery);
};
} else {
// Browser globals
factory(window.jQuery);
}
}(function ($) {
/**
* Slovak
*/
$.FE.LANGUAGE['sk'] = {
translation: {
// Place holder
"Type something": "Nap\u00ed\u0161te hoci\u010do",
// Basic formatting
"Bold": "Tu\u010dn\u00e9",
"Italic": "Kurz\u00edva",
"Underline": "Pod\u010diarknut\u00e9",
"Strikethrough": "Pre\u0161krtnut\u00e9",
// Main buttons
"Insert": "Vlo\u017ei\u0165",
"Delete": "Vymaza\u0165",
"Cancel": "Zru\u0161i\u0165",
"OK": "OK",
"Back": "Sp\u00e4\u0165",
"Remove": "Odstr\u00e1ni\u0165",
"More": "Viac",
"Update": "Aktualizova\u0165",
"Style": "\u0165t\u00fdl",
// Font
"Font Family": "Typ p\u00edsma",
"Font Size": "Ve\u013ekos\u0165 p\u00edsma",
// Colors
"Colors": "Farby",
"Background": "Pozadie",
"Text": "Text",
"HEX Color": "Hex Farby",
// Paragraphs
"Paragraph Format": "Form\u00e1t odstavca",
"Normal": "Norm\u00e1lne",
"Code": "K\u00f3d",
"Heading 1": "Nadpis 1",
"Heading 2": "Nadpis 2",
"Heading 3": "Nadpis 3",
"Heading 4": "Nadpis 4",
// Style
"Paragraph Style": "\u0165t\u00fdl odstavca",
"Inline Style": "Inline \u0161t\u00fdl",
// Alignment
"Align": "Zarovnanie",
"Align Left": "Zarovna\u0165 v\u013eavo",
"Align Center": "Zarovna\u0165 na stred",
"Align Right": "Zarovna\u0165 vpravo",
"Align Justify": "Zarovna\u0165 do bloku",
"None": "\u017diadne",
// Lists
"Ordered List": "\u010c\u00edslovan\u00fd zoznam",
"Default": "Štandardné",
"Lower Alpha": "Nižšia alfa",
"Lower Greek": "Nižšie grécke",
"Lower Roman": "Nižší roman",
"Upper Alpha": "Horná alfa",
"Upper Roman": "Horný román",
"Unordered List": "Ne\u010d\u00edslovan\u00fd zoznam",
"Circle": "Kružnice",
"Disc": "Kotúč",
"Square": "Námestie",
// Line height
"Line Height": "Výška riadku",
"Single": "Jednoposteľová",
"Double": "Dvojitý",
// Indent
"Decrease Indent": "Zmen\u0161i\u0165 odsadenie",
"Increase Indent": "Zv\u00e4\u010d\u0161i\u0165 odsadenie",
// Links
"Insert Link": "Vlo\u017ei\u0165 odkaz",
"Open in new tab": "Otvori\u0165 v novom okne",
"Open Link": "Otvori\u0165 odkaz",
"Edit Link": "Upravi\u0165 odkaz",
"Unlink": "Odstr\u00e1ni\u0165 odkaz",
"Choose Link": "Vyberte odkaz",
// Images
"Insert Image": "Vlo\u017ei\u0165 obr\u00e1zok",
"Upload Image": "Nahra\u0165 obr\u00e1zok",
"By URL": "Z URL adresy",
"Browse": "Vybra\u0165",
"Drop image": "Pretiahnite obr\u00e1zok do tohto miesta",
"or click": "alebo kliknite a vlo\u017ete",
"Manage Images": "Spr\u00e1va obr\u00e1zkov",
"Loading": "Nahr\u00e1vam",
"Deleting": "Odstra\u0148ujem",
"Tags": "Zna\u010dky",
"Are you sure? Image will be deleted.": "Ste si ist\u00fd? Obr\u00e1zok bude odstranen\u00fd.",
"Replace": "Vymeni\u0165",
"Uploading": "Nahr\u00e1vam",
"Loading image": "Obr\u00e1zok se na\u010d\u00edtav\u00e1",
"Display": "Zobrazi\u0165",
"Inline": "Inline",
"Break Text": "Zalomenie textu",
"Alternative Text": "Alternat\u00edvny text",
"Change Size": "Zmeni\u0165 ve\u013ekos\u0165",
"Width": "\u0165\u00edrka",
"Height": "V\u00fd\u0161ka",
"Something went wrong. Please try again.": "Nie\u010do sa pokazilo. Pros\u00edm, sk\u00faste to znova.",
"Image Caption": "Titulok obrázka",
"Advanced Edit": "Pokročilá úprava",
// Video
"Insert Video": "Vlo\u017ei\u0165 video",
"Embedded Code": "Vlo\u017een\u00fd k\u00f3d",
"Paste in a video URL": "Vložte do adresy URL videa",
"Drop video": "Drop video",
"Your browser does not support HTML5 video.": "Váš prehliadač nepodporuje video html5.",
"Upload Video": "Nahrať video",
// Tables
"Insert Table": "Vlo\u017ei\u0165 tabu\u013eku",
"Table Header": "Hlavi\u010dka tabu\u013eky",
"Remove Table": "Odstrani\u0165 tabu\u013eku",
"Table Style": "\u0165t\u00fdl tabu\u013eky",
"Horizontal Align": "Horizont\u00e1lne zarovnanie",
"Row": "Riadok",
"Insert row above": "Vlo\u017ei\u0165 riadok nad",
"Insert row below": "Vlo\u017ei\u0165 riadok pod",
"Delete row": "Odstrani\u0165 riadok",
"Column": "St\u013apec",
"Insert column before": "Vlo\u017ei\u0165 st\u013apec v\u013eavo",
"Insert column after": "Vlo\u017ei\u0165 st\u013apec vpravo",
"Delete column": "Odstrani\u0165 st\u013apec",
"Cell": "Bunka",
"Merge cells": "Zl\u00fa\u010di\u0165 bunky",
"Horizontal split": "Horizont\u00e1lne rozdelenie",
"Vertical split": "Vertik\u00e1lne rozdelenie",
"Cell Background": "Bunka pozadia",
"Vertical Align": "Vertik\u00e1lne zarovn\u00e1n\u00ed",
"Top": "Vrch",
"Middle": "Stred",
"Bottom": "Spodok",
"Align Top": "Zarovnat na vrch",
"Align Middle": "Zarovnat na stred",
"Align Bottom": "Zarovnat na spodok",
"Cell Style": "\u0165t\u00fdl bunky",
// Files
"Upload File": "Nahra\u0165 s\u00fabor",
"Drop file": "Vlo\u017ete s\u00fabor sem",
// Emoticons
"Emoticons": "Emotikony",
"Grinning face": "Tv\u00e1r s \u00fasmevom",
"Grinning face with smiling eyes": "Tv\u00e1r s \u00fasmevom a o\u010dami",
"Face with tears of joy": "Tv\u00e1r so slzamy radosti",
"Smiling face with open mouth": "Usmievaj\u00faci sa tv\u00e1r s otvoren\u00fdmi \u00fastami",
"Smiling face with open mouth and smiling eyes": "Usmievaj\u00faci sa tv\u00e1r s otvoren\u00fdmi \u00fastami a o\u010dami",
"Smiling face with open mouth and cold sweat": "Usmievaj\u00faci sa tv\u00e1r s otvoren\u00fdmi \u00fastami a studen\u00fd pot",
"Smiling face with open mouth and tightly-closed eyes": "Usmievaj\u00faci sa tv\u00e1r s otvoren\u00fdmi \u00fastami a zavret\u00fdmi o\u010dami",
"Smiling face with halo": "Usmievaj\u00faci sa tv\u00e1r s halo",
"Smiling face with horns": "Usmievaj\u00faci sa tv\u00e1r s rohmi",
"Winking face": "Mrkaj\u00faca tv\u00e1r",
"Smiling face with smiling eyes": "Usmievaj\u00faci sa tv\u00e1r a o\u010dami",
"Face savoring delicious food": "Tv\u00e1r vychutn\u00e1vaj\u00faca si chutn\u00e9 jedlo",
"Relieved face": "Spokojn\u00e1 tv\u00e1r",
"Smiling face with heart-shaped eyes": "Usmievaj\u00faci sa tv\u00e1r s o\u010dami v tvare srdca",
"Smiling face with sunglasses": "Usmievaj\u00faci sa tv\u00e1r so slne\u010dn\u00fdmi okuliarmi",
"Smirking face": "U\u0161k\u0155\u0148aj\u00faca sa tv\u00e1r",
"Neutral face": "Neutr\u00e1lna tva\u0155",
"Expressionless face": "Bezv\u00fdrazn\u00e1 tv\u00e1r",
"Unamused face": "Nepobaven\u00e1 tv\u00e1r",
"Face with cold sweat": "Tv\u00e1r so studen\u00fdm potom",
"Pensive face": "Zamyslen\u00e1 tv\u00e1r",
"Confused face": "Zmeten\u00e1 tv\u00e1r",
"Confounded face": "Nahnevan\u00e1 tv\u00e1r",
"Kissing face": "Bozkavaj\u00faca tv\u00e1r",
"Face throwing a kiss": "Tv\u00e1r hadzaj\u00faca pusu",
"Kissing face with smiling eyes": "Bozk\u00e1vaj\u00faca tv\u00e1r s o\u010dami a \u00fasmevom",
"Kissing face with closed eyes": "Bozk\u00e1vaj\u00faca tv\u00e1r so zavret\u00fdmi o\u010dami",
"Face with stuck out tongue": "Tv\u00e1r s vyplazen\u00fdm jazykom",
"Face with stuck out tongue and winking eye": "Mrkaj\u00faca tv\u00e1r s vyplazen\u00fdm jazykom",
"Face with stuck out tongue and tightly-closed eyes": "Tv\u00e1r s vyplazen\u00fdm jazykom a privret\u00fdmi o\u010dami",
"Disappointed face": "Sklaman\u00e1 tv\u00e1r",
"Worried face": "Obavaj\u00faca se tv\u00e1r",
"Angry face": "Nahnevan\u00e1 tv\u00e1r",
"Pouting face": "Na\u0161pulen\u00e1 tv\u00e1r",
"Crying face": "Pla\u010d\u00faca tv\u00e1r",
"Persevering face": "H\u00fa\u017eevnat\u00e1 tv\u00e1r",
"Face with look of triumph": "Tv\u00e1r s v\u00fdrazom v\u00ed\u0165aza",
"Disappointed but relieved face": "Sklaman\u00e1 ale spokojn\u00e1 tv\u00e1r",
"Frowning face with open mouth": "Zamra\u010den\u00e1 tvar s otvoren\u00fdmi \u00fastami",
"Anguished face": "\u00dazkostn\u00e1 tv\u00e1r",
"Fearful face": "Strachuj\u00faca sa tv\u00e1r",
"Weary face": "Unaven\u00e1 tv\u00e1r",
"Sleepy face": "Ospal\u00e1 tv\u00e1r",
"Tired face": "Unaven\u00e1 tv\u00e1r",
"Grimacing face": "Sv\u00e1r s grimasou",
"Loudly crying face": "Nahlas pl\u00e1\u010d\u00faca tv\u00e1r",
"Face with open mouth": "Tv\u00e1r s otvoren\u00fdm \u00fastami",
"Hushed face": "Ml\u010diaca tv\u00e1r",
"Face with open mouth and cold sweat": "Tv\u00e1r s otvoren\u00fdmi \u00fastami a studen\u00fdm potom",
"Face screaming in fear": "Tv\u00e1r kri\u010diaca strachom",
"Astonished face": "Tv\u00e1r v \u00fa\u017ease",
"Flushed face": "S\u010dervenanie v tv\u00e1ri",
"Sleeping face": "Spiaca tv\u00e1r",
"Dizzy face": "Tv\u00e1r vyjadruj\u00faca z\u00e1vrat",
"Face without mouth": "Tv\u00e1r bez \u00fast",
"Face with medical mask": "Tv\u00e1r s lek\u00e1rskou maskou",
// Line breaker
"Break": "Zalomenie",
// Math
"Subscript": "Doln\u00fd index",
"Superscript": "Horn\u00fd index",
// Full screen
"Fullscreen": "Cel\u00e1 obrazovka",
// Horizontal line
"Insert Horizontal Line": "Vlo\u017ei\u0165 vodorovn\u00fa \u010diaru",
// Clear formatting
"Clear Formatting": "Vymaza\u0165 formatovanie",
// Save
"Save": "\u0055\u006c\u006f\u017e\u0069\u0165",
// Undo, redo
"Undo": "Sp\u00e4\u0165",
"Redo": "Znova",
// Select all
"Select All": "Vybra\u0165 v\u0161etko",
// Code view
"Code View": "Zobrazi\u0165 html k\u00f3d",
// Quote
"Quote": "Cit\u00e1t",
"Increase": "Nav\u00fd\u0161i\u0165",
"Decrease": "Zn\u00ed\u017ei\u0165",
// Quick Insert
"Quick Insert": "Vlo\u017ei\u0165 zr\u00fdchlene",
// Spcial Characters
"Special Characters": "Špeciálne znaky",
"Latin": "Latinčina",
"Greek": "Grécky",
"Cyrillic": "Cyriliky",
"Punctuation": "Interpunkcia",
"Currency": "Mena",
"Arrows": "Šípky",
"Math": "Matematika",
"Misc": "Misc",
// Print.
"Print": "Vytlačiť",
// Spell Checker.
"Spell Checker": "Kontrola pravopisu",
// Help
"Help": "Pomoc",
"Shortcuts": "Skratky",
"Inline Editor": "Inline editor",
"Show the editor": "Zobraziť editor",
"Common actions": "Spoločné akcie",
"Copy": "Kópie",
"Cut": "Rez",
"Paste": "Pasta",
"Basic Formatting": "Základné formátovanie",
"Increase quote level": "Zvýšiť úroveň cenovej ponuky",
"Decrease quote level": "Znížiť úroveň cenovej ponuky",
"Image / Video": "Obrázok / video",
"Resize larger": "Zmena veľkosti",
"Resize smaller": "Meniť veľkosť",
"Table": "Stôl",
"Select table cell": "Vyberte bunku tabuľky",
"Extend selection one cell": "Rozšíriť výber jednej bunky",
"Extend selection one row": "Rozšíriť výber o jeden riadok",
"Navigation": "Navigácia",
"Focus popup / toolbar": "Zameranie / panel s nástrojmi",
"Return focus to previous position": "Vrátiť zaostrenie na predchádzajúcu pozíciu",
// Embed.ly
"Embed URL": "Vložiť adresu URL",
"Paste in a URL to embed": "Vložte do adresy URL, ktorú chcete vložiť",
// Word Paste.
"The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?": "Vložený obsah vychádza z dokumentu Microsoft Word. chcete formát uchovať alebo ho vyčistiť?",
"Keep": "Zachovať",
"Clean": "Čistý",
"Word Paste Detected": "Slovná vložka bola zistená"
},
direction: "ltr"
};
}));
|
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
plugins: []
}
|
console.log("Hello World");
console.log(require('./content-1.js'));
if(window.location.href.indexOf('load') !== -1 ) {
console.log(require('./content-2.js'));
}
|
'use strict';
var request = require('request');
var fs = require('fs');
var sca = "https://soichi7.ppa.iu.edu/api";
var jwt = fs.readFileSync('/home/hayashis/.sca/keys/cli.jwt', {encoding: 'ascii'}).trim();
request.get({
url: sca+"/sca/resource/best",
json: true,
headers: { 'Authorization': 'Bearer '+jwt },
qs: {
//user: "hayashis",
//service: "soichih/sca-service-hpss",
service: "soichih/sca-product-raw",
}
}, function(err, res, body) {
if(err) throw err;
console.dir(res.statusCode + " "+res.statusMessage);
console.dir(body);
});
|
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'use strict';
/**
* @class
* Initializes a new instance of the FlattenParameterGroup class.
* @constructor
* Additional parameters for the putSimpleProductWithGrouping operation.
*
* @member {string} name Product name with value 'groupproduct'
*
* @member {string} productId Unique identifier representing a specific product
* for a given latitude & longitude. For example, uberX in San Francisco will
* have a different product_id than uberX in Los Angeles.
*
* @member {string} [description] Description of product.
*
* @member {string} maxProductDisplayName Display name of product.
*
* @member {string} [genericValue] Generic URL value.
*
* @member {string} [odatavalue] URL value.
*
*/
class FlattenParameterGroup {
constructor() {
}
/**
* Defines the metadata of FlattenParameterGroup
*
* @returns {object} metadata of FlattenParameterGroup
*
*/
mapper() {
return {
required: false,
type: {
name: 'Composite',
className: 'FlattenParameterGroup',
modelProperties: {
name: {
required: true,
type: {
name: 'String'
}
},
productId: {
required: true,
type: {
name: 'String'
}
},
description: {
required: false,
type: {
name: 'String'
}
},
maxProductDisplayName: {
required: true,
type: {
name: 'String'
}
},
genericValue: {
required: false,
type: {
name: 'String'
}
},
odatavalue: {
required: false,
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = FlattenParameterGroup;
|
var SimpleDom = require('simple-dom'),
Renderer = require('mobiledoc-dom-renderer').default,
config = require('../config'),
logging = require('../logging'),
errors = require('../errors'),
defaults = require(config.get('paths').internalAppPath + 'default-cards'),
options = {
dom: new SimpleDom.Document(),
cards: defaults.cards,
atoms: defaults.atoms,
unknownCardHandler: function (args) {
var error = new errors.InternalServerError({message: 'Mobiledoc card \'' + args.env.name + '\' not found.'});
logging.error(error);
}
};
// function getCards() {
// return config.get('internalApps').reduce(
// function (cards, appName) {
// var app = require(path.join(config.get('paths').internalAppPath, appName));
// if (app.hasOwnProperty('cards')) {
// cards = cards.concat(app.cards);
// }
// return cards;
// }, [ ]);
// }
// function getAtoms() {
// return config.get('internalApps').reduce(
// function (atoms, appName) {
// var app = require(path.join(config.get('paths').internalAppPath, appName));
// if (app.hasOwnProperty('atoms')) {
// atoms = atoms.concat(app.atoms);
// }
// return atoms;
// }, [ ]);
// }
module.exports = {
render: function (mobiledoc) {
var renderer = new Renderer(options),
rendered = renderer.render(mobiledoc),
serializer = new SimpleDom.HTMLSerializer([]),
html = serializer.serializeChildren(rendered.result);
return html;
}
};
|
// Load modules
var Utils = require('./utils');
// Declare internals
var internals = {
delimiter: '&',
arrayPrefixGenerators: {
brackets: function (prefix, key) {
return prefix + '[]';
},
indices: function (prefix, key) {
return prefix + '[' + key + ']';
},
repeat: function (prefix, key) {
return prefix;
}
},
strictNullHandling: false,
skipNulls: false,
encode: true
};
internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter) {
if (typeof filter === 'function') {
obj = filter(prefix, obj);
}
else if (Utils.isBuffer(obj)) {
obj = obj.toString();
}
else if (obj instanceof Date) {
obj = obj.toISOString();
}
else if (obj === null) {
if (strictNullHandling) {
return encode ? Utils.encode(prefix) : prefix;
}
obj = '';
}
if (typeof obj === 'string' ||
typeof obj === 'number' ||
typeof obj === 'boolean') {
if (encode) {
return [Utils.encode(prefix) + '=' + Utils.encode(obj)];
}
return [prefix + '=' + obj];
}
var values = [];
if (typeof obj === 'undefined') {
return values;
}
var objKeys = Array.isArray(filter) ? filter : Object.keys(obj);
for (var i = 0, il = objKeys.length; i < il; ++i) {
var key = objKeys[i];
if (skipNulls &&
obj[key] === null) {
continue;
}
if (Array.isArray(obj)) {
values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));
}
else {
values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));
}
}
return values;
};
module.exports = function (obj, options) {
options = options || {};
var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;
var encode = typeof options.encode === 'boolean' ? options.encode : internals.encode;
var objKeys;
var filter;
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
}
else if (Array.isArray(options.filter)) {
objKeys = filter = options.filter;
}
var keys = [];
if (typeof obj !== 'object' ||
obj === null) {
return '';
}
var arrayFormat;
if (options.arrayFormat in internals.arrayPrefixGenerators) {
arrayFormat = options.arrayFormat;
}
else if ('indices' in options) {
arrayFormat = options.indices ? 'indices' : 'repeat';
}
else {
arrayFormat = 'indices';
}
var generateArrayPrefix = internals.arrayPrefixGenerators[arrayFormat];
if (!objKeys) {
objKeys = Object.keys(obj);
}
for (var i = 0, il = objKeys.length; i < il; ++i) {
var key = objKeys[i];
if (skipNulls &&
obj[key] === null) {
continue;
}
keys = keys.concat(internals.stringify(obj[key], key, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));
}
return keys.join(delimiter);
};
|
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import Root from './containers/Root'
import configureStore from './store/configureStore'
const store = configureStore()
render(
<Root store={store} />,
document.getElementById('root')
)
|
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactRouter"] = factory(require("react"));
else
root["ReactRouter"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_4__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.createMemoryHistory = exports.hashHistory = exports.browserHistory = exports.applyRouterMiddleware = exports.formatPattern = exports.useRouterHistory = exports.match = exports.routerShape = exports.locationShape = exports.RouterContext = exports.createRoutes = exports.Route = exports.Redirect = exports.IndexRoute = exports.IndexRedirect = exports.withRouter = exports.IndexLink = exports.Link = exports.Router = undefined;
var _RouteUtils = __webpack_require__(5);
Object.defineProperty(exports, 'createRoutes', {
enumerable: true,
get: function get() {
return _RouteUtils.createRoutes;
}
});
var _PropTypes = __webpack_require__(16);
Object.defineProperty(exports, 'locationShape', {
enumerable: true,
get: function get() {
return _PropTypes.locationShape;
}
});
Object.defineProperty(exports, 'routerShape', {
enumerable: true,
get: function get() {
return _PropTypes.routerShape;
}
});
var _PatternUtils = __webpack_require__(8);
Object.defineProperty(exports, 'formatPattern', {
enumerable: true,
get: function get() {
return _PatternUtils.formatPattern;
}
});
var _Router2 = __webpack_require__(40);
var _Router3 = _interopRequireDefault(_Router2);
var _Link2 = __webpack_require__(24);
var _Link3 = _interopRequireDefault(_Link2);
var _IndexLink2 = __webpack_require__(36);
var _IndexLink3 = _interopRequireDefault(_IndexLink2);
var _withRouter2 = __webpack_require__(51);
var _withRouter3 = _interopRequireDefault(_withRouter2);
var _IndexRedirect2 = __webpack_require__(37);
var _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2);
var _IndexRoute2 = __webpack_require__(38);
var _IndexRoute3 = _interopRequireDefault(_IndexRoute2);
var _Redirect2 = __webpack_require__(26);
var _Redirect3 = _interopRequireDefault(_Redirect2);
var _Route2 = __webpack_require__(39);
var _Route3 = _interopRequireDefault(_Route2);
var _RouterContext2 = __webpack_require__(17);
var _RouterContext3 = _interopRequireDefault(_RouterContext2);
var _match2 = __webpack_require__(49);
var _match3 = _interopRequireDefault(_match2);
var _useRouterHistory2 = __webpack_require__(31);
var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2);
var _applyRouterMiddleware2 = __webpack_require__(42);
var _applyRouterMiddleware3 = _interopRequireDefault(_applyRouterMiddleware2);
var _browserHistory2 = __webpack_require__(43);
var _browserHistory3 = _interopRequireDefault(_browserHistory2);
var _hashHistory2 = __webpack_require__(47);
var _hashHistory3 = _interopRequireDefault(_hashHistory2);
var _createMemoryHistory2 = __webpack_require__(28);
var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.Router = _Router3.default; /* components */
exports.Link = _Link3.default;
exports.IndexLink = _IndexLink3.default;
exports.withRouter = _withRouter3.default;
/* components (configuration) */
exports.IndexRedirect = _IndexRedirect3.default;
exports.IndexRoute = _IndexRoute3.default;
exports.Redirect = _Redirect3.default;
exports.Route = _Route3.default;
/* utils */
exports.RouterContext = _RouterContext3.default;
exports.match = _match3.default;
exports.useRouterHistory = _useRouterHistory3.default;
exports.applyRouterMiddleware = _applyRouterMiddleware3.default;
/* histories */
exports.browserHistory = _browserHistory3.default;
exports.hashHistory = _hashHistory3.default;
exports.createMemoryHistory = _createMemoryHistory3.default;
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (true) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (true) {
var ReactIs = __webpack_require__(23);
// By explicitly using `prop-types` you are opting into new development behavior.
// http://fb.me/prop-types-in-prod
var throwOnDirectAccess = true;
module.exports = __webpack_require__(65)(ReactIs.isElement, throwOnDirectAccess);
} else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = require('./factoryWithThrowingShims')();
}
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var React = __webpack_require__(4);
var factory = __webpack_require__(52);
if (typeof React === 'undefined') {
throw Error(
'create-react-class could not find the React object. If you are using script tags, ' +
'make sure that React is being loaded before create-react-class.'
);
}
// Hack to grab NoopUpdateQueue from isomorphic React
var ReactNoopUpdateQueue = new React.Component().updater;
module.exports = factory(
React.Component,
React.isValidElement,
ReactNoopUpdateQueue
);
/***/ }),
/* 4 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.isReactChildren = isReactChildren;
exports.createRouteFromReactElement = createRouteFromReactElement;
exports.createRoutesFromReactChildren = createRoutesFromReactChildren;
exports.createRoutes = createRoutes;
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isValidChild(object) {
return object == null || _react2.default.isValidElement(object);
}
function isReactChildren(object) {
return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);
}
function createRoute(defaultProps, props) {
return _extends({}, defaultProps, props);
}
function createRouteFromReactElement(element) {
var type = element.type;
var route = createRoute(type.defaultProps, element.props);
if (route.children) {
var childRoutes = createRoutesFromReactChildren(route.children, route);
if (childRoutes.length) route.childRoutes = childRoutes;
delete route.children;
}
return route;
}
/**
* Creates and returns a routes object from the given ReactChildren. JSX
* provides a convenient way to visualize how routes in the hierarchy are
* nested.
*
* import { Route, createRoutesFromReactChildren } from 'react-router'
*
* const routes = createRoutesFromReactChildren(
* <Route component={App}>
* <Route path="home" component={Dashboard}/>
* <Route path="news" component={NewsFeed}/>
* </Route>
* )
*
* Note: This method is automatically used when you provide <Route> children
* to a <Router> component.
*/
function createRoutesFromReactChildren(children, parentRoute) {
var routes = [];
_react2.default.Children.forEach(children, function (element) {
if (_react2.default.isValidElement(element)) {
// Component classes may have a static create* method.
if (element.type.createRouteFromReactElement) {
var route = element.type.createRouteFromReactElement(element, parentRoute);
if (route) routes.push(route);
} else {
routes.push(createRouteFromReactElement(element));
}
}
});
return routes;
}
/**
* Creates and returns an array of routes from the given object which
* may be a JSX route, a plain object route, or an array of either.
*/
function createRoutes(routes) {
if (isReactChildren(routes)) {
routes = createRoutesFromReactChildren(routes);
} else if (routes && !Array.isArray(routes)) {
routes = [routes];
}
return routes;
}
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {
var _parsePath = parsePath(path),
pathname = _parsePath.pathname,
search = _parsePath.search,
hash = _parsePath.hash;
return createPath({
pathname: pathname,
search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value,
hash: hash
});
};
var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {
var _parsePath2 = parsePath(path),
pathname = _parsePath2.pathname,
search = _parsePath2.search,
hash = _parsePath2.hash;
return createPath({
pathname: pathname,
search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) {
return prefix === '?' ? prefix : suffix;
}),
hash: hash
});
};
var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {
var _parsePath3 = parsePath(path),
search = _parsePath3.search;
var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));
return match && match[1];
};
var extractPath = function extractPath(string) {
var match = string.match(/^(https?:)?\/\/[^\/]*/);
return match == null ? string : string.substring(match[0].length);
};
var parsePath = exports.parsePath = function parsePath(path) {
var pathname = extractPath(path);
var search = '';
var hash = '';
true ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like "%s"', path) : void 0;
var hashIndex = pathname.indexOf('#');
if (hashIndex !== -1) {
hash = pathname.substring(hashIndex);
pathname = pathname.substring(0, hashIndex);
}
var searchIndex = pathname.indexOf('?');
if (searchIndex !== -1) {
search = pathname.substring(searchIndex);
pathname = pathname.substring(0, searchIndex);
}
if (pathname === '') pathname = '/';
return {
pathname: pathname,
search: search,
hash: hash
};
};
var createPath = exports.createPath = function createPath(location) {
if (location == null || typeof location === 'string') return location;
var basename = location.basename,
pathname = location.pathname,
search = location.search,
hash = location.hash;
var path = (basename || '') + pathname;
if (search && search !== '?') path += search;
if (hash) path += hash;
return path;
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = function() {};
if (true) {
warning = function(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
if (format === undefined) {
throw new Error(
'`warning(condition, format, ...args)` requires a warning ' +
'message argument'
);
}
if (format.length < 10 || (/^[s\W]*$/).test(format)) {
throw new Error(
'The warning format should be able to uniquely identify this ' +
'warning. Please, use a more descriptive format than: ' + format
);
}
if (!condition) {
var argIndex = 0;
var message = 'Warning: ' +
format.replace(/%s/g, function() {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch(x) {}
}
};
}
module.exports = warning;
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.compilePattern = compilePattern;
exports.matchPattern = matchPattern;
exports.getParamNames = getParamNames;
exports.getParams = getParams;
exports.formatPattern = formatPattern;
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
function _compilePattern(pattern) {
var regexpSource = '';
var paramNames = [];
var tokens = [];
var match = void 0,
lastIndex = 0,
matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g;
while (match = matcher.exec(pattern)) {
if (match.index !== lastIndex) {
tokens.push(pattern.slice(lastIndex, match.index));
regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index));
}
if (match[1]) {
regexpSource += '([^/]+)';
paramNames.push(match[1]);
} else if (match[0] === '**') {
regexpSource += '(.*)';
paramNames.push('splat');
} else if (match[0] === '*') {
regexpSource += '(.*?)';
paramNames.push('splat');
} else if (match[0] === '(') {
regexpSource += '(?:';
} else if (match[0] === ')') {
regexpSource += ')?';
} else if (match[0] === '\\(') {
regexpSource += '\\(';
} else if (match[0] === '\\)') {
regexpSource += '\\)';
}
tokens.push(match[0]);
lastIndex = matcher.lastIndex;
}
if (lastIndex !== pattern.length) {
tokens.push(pattern.slice(lastIndex, pattern.length));
regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length));
}
return {
pattern: pattern,
regexpSource: regexpSource,
paramNames: paramNames,
tokens: tokens
};
}
var CompiledPatternsCache = Object.create(null);
function compilePattern(pattern) {
if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern);
return CompiledPatternsCache[pattern];
}
/**
* Attempts to match a pattern on the given pathname. Patterns may use
* the following special characters:
*
* - :paramName Matches a URL segment up to the next /, ?, or #. The
* captured string is considered a "param"
* - () Wraps a segment of the URL that is optional
* - * Consumes (non-greedy) all characters up to the next
* character in the pattern, or to the end of the URL if
* there is none
* - ** Consumes (greedy) all characters up to the next character
* in the pattern, or to the end of the URL if there is none
*
* The function calls callback(error, matched) when finished.
* The return value is an object with the following properties:
*
* - remainingPathname
* - paramNames
* - paramValues
*/
function matchPattern(pattern, pathname) {
// Ensure pattern starts with leading slash for consistency with pathname.
if (pattern.charAt(0) !== '/') {
pattern = '/' + pattern;
}
var _compilePattern2 = compilePattern(pattern),
regexpSource = _compilePattern2.regexpSource,
paramNames = _compilePattern2.paramNames,
tokens = _compilePattern2.tokens;
if (pattern.charAt(pattern.length - 1) !== '/') {
regexpSource += '/?'; // Allow optional path separator at end.
}
// Special-case patterns like '*' for catch-all routes.
if (tokens[tokens.length - 1] === '*') {
regexpSource += '$';
}
var match = pathname.match(new RegExp('^' + regexpSource, 'i'));
if (match == null) {
return null;
}
var matchedPath = match[0];
var remainingPathname = pathname.substr(matchedPath.length);
if (remainingPathname) {
// Require that the match ends at a path separator, if we didn't match
// the full path, so any remaining pathname is a new path segment.
if (matchedPath.charAt(matchedPath.length - 1) !== '/') {
return null;
}
// If there is a remaining pathname, treat the path separator as part of
// the remaining pathname for properly continuing the match.
remainingPathname = '/' + remainingPathname;
}
return {
remainingPathname: remainingPathname,
paramNames: paramNames,
paramValues: match.slice(1).map(function (v) {
return v && decodeURIComponent(v);
})
};
}
function getParamNames(pattern) {
return compilePattern(pattern).paramNames;
}
function getParams(pattern, pathname) {
var match = matchPattern(pattern, pathname);
if (!match) {
return null;
}
var paramNames = match.paramNames,
paramValues = match.paramValues;
var params = {};
paramNames.forEach(function (paramName, index) {
params[paramName] = paramValues[index];
});
return params;
}
/**
* Returns a version of the given pattern with params interpolated. Throws
* if there is a dynamic segment of the pattern for which there is no param.
*/
function formatPattern(pattern, params) {
params = params || {};
var _compilePattern3 = compilePattern(pattern),
tokens = _compilePattern3.tokens;
var parenCount = 0,
pathname = '',
splatIndex = 0,
parenHistory = [];
var token = void 0,
paramName = void 0,
paramValue = void 0;
for (var i = 0, len = tokens.length; i < len; ++i) {
token = tokens[i];
if (token === '*' || token === '**') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
!(paramValue != null || parenCount > 0) ? true ? (0, _invariant2.default)(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : (0, _invariant2.default)(false) : void 0;
if (paramValue != null) pathname += encodeURI(paramValue);
} else if (token === '(') {
parenHistory[parenCount] = '';
parenCount += 1;
} else if (token === ')') {
var parenText = parenHistory.pop();
parenCount -= 1;
if (parenCount) parenHistory[parenCount - 1] += parenText;else pathname += parenText;
} else if (token === '\\(') {
pathname += '(';
} else if (token === '\\)') {
pathname += ')';
} else if (token.charAt(0) === ':') {
paramName = token.substring(1);
paramValue = params[paramName];
!(paramValue != null || parenCount > 0) ? true ? (0, _invariant2.default)(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : (0, _invariant2.default)(false) : void 0;
if (paramValue == null) {
if (parenCount) {
parenHistory[parenCount - 1] = '';
var curTokenIdx = tokens.indexOf(token);
var tokensSubset = tokens.slice(curTokenIdx, tokens.length);
var nextParenIdx = -1;
for (var _i = 0; _i < tokensSubset.length; _i++) {
if (tokensSubset[_i] == ')') {
nextParenIdx = _i;
break;
}
}
!(nextParenIdx > 0) ? true ? (0, _invariant2.default)(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : (0, _invariant2.default)(false) : void 0;
// jump to ending paren
i = curTokenIdx + nextParenIdx - 1;
}
} else if (parenCount) parenHistory[parenCount - 1] += encodeURIComponent(paramValue);else pathname += encodeURIComponent(paramValue);
} else {
if (parenCount) parenHistory[parenCount - 1] += token;else pathname += token;
}
}
!(parenCount <= 0) ? true ? (0, _invariant2.default)(false, 'Path "%s" is missing end paren', pattern) : (0, _invariant2.default)(false) : void 0;
return pathname.replace(/\/+/g, '/');
}
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = routerWarning;
exports._resetWarned = _resetWarned;
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var warned = {};
function routerWarning(falseToWarn, message) {
// Only issue deprecation warnings once.
if (message.indexOf('deprecated') !== -1) {
if (warned[message]) {
return;
}
warned[message] = true;
}
message = '[react-router] ' + message;
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
_warning2.default.apply(undefined, [falseToWarn, message].concat(args));
}
function _resetWarned() {
warned = {};
}
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
var _PathUtils = __webpack_require__(6);
var _Actions = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createQuery = exports.createQuery = function createQuery(props) {
return _extends(Object.create(null), props);
};
var createLocation = exports.createLocation = function createLocation() {
var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/';
var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP;
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input;
true ? (0, _warning2.default)(!object.path, 'Location descriptor objects should have a `pathname`, not a `path`.') : void 0;
var pathname = object.pathname || '/';
var search = object.search || '';
var hash = object.hash || '';
var state = object.state;
return {
pathname: pathname,
search: search,
hash: hash,
state: state,
action: action,
key: key
};
};
var isDate = function isDate(object) {
return Object.prototype.toString.call(object) === '[object Date]';
};
var statesAreEqual = exports.statesAreEqual = function statesAreEqual(a, b) {
if (a === b) return true;
var typeofA = typeof a === 'undefined' ? 'undefined' : _typeof(a);
var typeofB = typeof b === 'undefined' ? 'undefined' : _typeof(b);
if (typeofA !== typeofB) return false;
!(typeofA !== 'function') ? true ? (0, _invariant2.default)(false, 'You must not store functions in location state') : (0, _invariant2.default)(false) : void 0;
// Not the same object, but same type.
if (typeofA === 'object') {
!!(isDate(a) && isDate(b)) ? true ? (0, _invariant2.default)(false, 'You must not store Date objects in location state') : (0, _invariant2.default)(false) : void 0;
if (!Array.isArray(a)) {
var keysofA = Object.keys(a);
var keysofB = Object.keys(b);
return keysofA.length === keysofB.length && keysofA.every(function (key) {
return statesAreEqual(a[key], b[key]);
});
}
return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
return statesAreEqual(item, b[index]);
});
}
// All other serializable types (string, number, boolean)
// should be strict equal.
return false;
};
var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a, b) {
return a.key === b.key &&
// a.action === b.action && // Different action !== location change.
a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && statesAreEqual(a.state, b.state);
};
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.routes = exports.route = exports.components = exports.component = exports.history = undefined;
exports.falsy = falsy;
var _propTypes = __webpack_require__(2);
function falsy(props, propName, componentName) {
if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
}
var history = exports.history = (0, _propTypes.shape)({
listen: _propTypes.func.isRequired,
push: _propTypes.func.isRequired,
replace: _propTypes.func.isRequired,
go: _propTypes.func.isRequired,
goBack: _propTypes.func.isRequired,
goForward: _propTypes.func.isRequired
});
var component = exports.component = _propTypes.elementType;
var components = exports.components = (0, _propTypes.oneOfType)([component, _propTypes.object]);
var route = exports.route = (0, _propTypes.oneOfType)([_propTypes.object, _propTypes.element]);
var routes = exports.routes = (0, _propTypes.oneOfType)([route, (0, _propTypes.arrayOf)(route)]);
/***/ }),
/* 12 */
/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
/**
* Indicates that navigation was caused by a call to history.push.
*/
var PUSH = exports.PUSH = 'PUSH';
/**
* Indicates that navigation was caused by a call to history.replace.
*/
var REPLACE = exports.REPLACE = 'REPLACE';
/**
* Indicates that navigation was caused by some other action such
* as using a browser's back/forward buttons and/or manually manipulating
* the URL in a browser's location bar. This is the default.
*
* See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate
* for more information.
*/
var POP = exports.POP = 'POP';
/***/ }),
/* 13 */
/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
var addEventListener = exports.addEventListener = function addEventListener(node, event, listener) {
return node.addEventListener ? node.addEventListener(event, listener, false) : node.attachEvent('on' + event, listener);
};
var removeEventListener = exports.removeEventListener = function removeEventListener(node, event, listener) {
return node.removeEventListener ? node.removeEventListener(event, listener, false) : node.detachEvent('on' + event, listener);
};
/**
* Returns true if the HTML5 history API is supported. 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/reactjs/react-router/issues/586
*/
var supportsHistory = exports.supportsHistory = function supportsHistory() {
var ua = window.navigator.userAgent;
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
return window.history && 'pushState' in window.history;
};
/**
* Returns false if using go(n) with hash history causes a full page reload.
*/
var supportsGoWithoutReloadUsingHash = exports.supportsGoWithoutReloadUsingHash = function supportsGoWithoutReloadUsingHash() {
return window.navigator.userAgent.indexOf('Firefox') === -1;
};
/**
* Returns true if browser fires popstate on hash change.
* IE10 and IE11 do not.
*/
var supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = function supportsPopstateOnHashchange() {
return window.navigator.userAgent.indexOf('Trident') === -1;
};
/**
* Returns true if a given popstate event is an extraneous WebKit event.
* Accounts for the fact that Chrome on iOS fires real popstate events
* containing undefined state when pressing the back button.
*/
var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
};
/***/ }),
/* 14 */
/***/ (function(module, exports) {
"use strict";
exports.__esModule = true;
exports.loopAsync = loopAsync;
exports.mapAsync = mapAsync;
function loopAsync(turns, work, callback) {
var currentTurn = 0,
isDone = false;
var sync = false,
hasNext = false,
doneArgs = void 0;
function done() {
isDone = true;
if (sync) {
// Iterate instead of recursing if possible.
doneArgs = [].concat(Array.prototype.slice.call(arguments));
return;
}
callback.apply(this, arguments);
}
function next() {
if (isDone) {
return;
}
hasNext = true;
if (sync) {
// Iterate instead of recursing if possible.
return;
}
sync = true;
while (!isDone && currentTurn < turns && hasNext) {
hasNext = false;
work.call(this, currentTurn++, next, done);
}
sync = false;
if (isDone) {
// This means the loop finished synchronously.
callback.apply(this, doneArgs);
return;
}
if (currentTurn >= turns && hasNext) {
isDone = true;
callback();
}
}
next();
}
function mapAsync(array, work, callback) {
var length = array.length;
var values = [];
if (length === 0) return callback(null, values);
var isDone = false,
doneCount = 0;
function done(index, error, value) {
if (isDone) return;
if (error) {
isDone = true;
callback(error);
} else {
values[index] = value;
isDone = ++doneCount === length;
if (isDone) callback(null, values);
}
}
array.forEach(function (item, index) {
work(item, index, function (error, value) {
done(index, error, value);
});
});
}
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.ContextProvider = ContextProvider;
exports.ContextSubscriber = ContextSubscriber;
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(2);
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Works around issues with context updates failing to propagate.
// Caveat: the context value is expected to never change its identity.
// https://github.com/facebook/react/issues/2517
// https://github.com/reactjs/react-router/issues/470
var contextProviderShape = _propTypes2.default.shape({
subscribe: _propTypes2.default.func.isRequired,
eventIndex: _propTypes2.default.number.isRequired
});
function makeContextName(name) {
return '@@contextSubscriber/' + name;
}
var prefixUnsafeLifecycleMethods = parseFloat(_react2.default.version) >= 16.3;
function ContextProvider(name) {
var _childContextTypes, _config;
var contextName = makeContextName(name);
var listenersKey = contextName + '/listeners';
var eventIndexKey = contextName + '/eventIndex';
var subscribeKey = contextName + '/subscribe';
var config = (_config = {
childContextTypes: (_childContextTypes = {}, _childContextTypes[contextName] = contextProviderShape.isRequired, _childContextTypes),
getChildContext: function getChildContext() {
var _ref;
return _ref = {}, _ref[contextName] = {
eventIndex: this[eventIndexKey],
subscribe: this[subscribeKey]
}, _ref;
},
// this method will be updated to UNSAFE_componentWillMount below for React versions >= 16.3
componentWillMount: function componentWillMount() {
this[listenersKey] = [];
this[eventIndexKey] = 0;
},
// this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3
componentWillReceiveProps: function componentWillReceiveProps() {
this[eventIndexKey]++;
},
componentDidUpdate: function componentDidUpdate() {
var _this = this;
this[listenersKey].forEach(function (listener) {
return listener(_this[eventIndexKey]);
});
}
}, _config[subscribeKey] = function (listener) {
var _this2 = this;
// No need to immediately call listener here.
this[listenersKey].push(listener);
return function () {
_this2[listenersKey] = _this2[listenersKey].filter(function (item) {
return item !== listener;
});
};
}, _config);
if (prefixUnsafeLifecycleMethods) {
config.UNSAFE_componentWillMount = config.componentWillMount;
config.UNSAFE_componentWillReceiveProps = config.componentWillReceiveProps;
delete config.componentWillMount;
delete config.componentWillReceiveProps;
}
return config;
}
function ContextSubscriber(name) {
var _contextTypes, _config2;
var contextName = makeContextName(name);
var lastRenderedEventIndexKey = contextName + '/lastRenderedEventIndex';
var handleContextUpdateKey = contextName + '/handleContextUpdate';
var unsubscribeKey = contextName + '/unsubscribe';
var config = (_config2 = {
contextTypes: (_contextTypes = {}, _contextTypes[contextName] = contextProviderShape, _contextTypes),
getInitialState: function getInitialState() {
var _ref2;
if (!this.context[contextName]) {
return {};
}
return _ref2 = {}, _ref2[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _ref2;
},
componentDidMount: function componentDidMount() {
if (!this.context[contextName]) {
return;
}
this[unsubscribeKey] = this.context[contextName].subscribe(this[handleContextUpdateKey]);
},
// this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3
componentWillReceiveProps: function componentWillReceiveProps() {
var _setState;
if (!this.context[contextName]) {
return;
}
this.setState((_setState = {}, _setState[lastRenderedEventIndexKey] = this.context[contextName].eventIndex, _setState));
},
componentWillUnmount: function componentWillUnmount() {
if (!this[unsubscribeKey]) {
return;
}
this[unsubscribeKey]();
this[unsubscribeKey] = null;
}
}, _config2[handleContextUpdateKey] = function (eventIndex) {
if (eventIndex !== this.state[lastRenderedEventIndexKey]) {
var _setState2;
this.setState((_setState2 = {}, _setState2[lastRenderedEventIndexKey] = eventIndex, _setState2));
}
}, _config2);
if (prefixUnsafeLifecycleMethods) {
config.UNSAFE_componentWillReceiveProps = config.componentWillReceiveProps;
delete config.componentWillReceiveProps;
}
return config;
}
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.locationShape = exports.routerShape = undefined;
var _propTypes = __webpack_require__(2);
var routerShape = exports.routerShape = (0, _propTypes.shape)({
push: _propTypes.func.isRequired,
replace: _propTypes.func.isRequired,
go: _propTypes.func.isRequired,
goBack: _propTypes.func.isRequired,
goForward: _propTypes.func.isRequired,
setRouteLeaveHook: _propTypes.func.isRequired,
isActive: _propTypes.func.isRequired
});
var locationShape = exports.locationShape = (0, _propTypes.shape)({
pathname: _propTypes.string.isRequired,
search: _propTypes.string.isRequired,
state: _propTypes.object,
action: _propTypes.string.isRequired,
key: _propTypes.string
});
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _reactIs = __webpack_require__(23);
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _getRouteParams = __webpack_require__(46);
var _getRouteParams2 = _interopRequireDefault(_getRouteParams);
var _ContextUtils = __webpack_require__(15);
var _RouteUtils = __webpack_require__(5);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A <RouterContext> renders the component tree for a given router state
* and sets the history object and the current location in context.
*/
var RouterContext = (0, _createReactClass2.default)({
displayName: 'RouterContext',
mixins: [(0, _ContextUtils.ContextProvider)('router')],
propTypes: {
router: _propTypes.object.isRequired,
location: _propTypes.object.isRequired,
routes: _propTypes.array.isRequired,
params: _propTypes.object.isRequired,
components: _propTypes.array.isRequired,
createElement: _propTypes.func.isRequired
},
getDefaultProps: function getDefaultProps() {
return {
createElement: _react2.default.createElement
};
},
childContextTypes: {
router: _propTypes.object.isRequired
},
getChildContext: function getChildContext() {
return {
router: this.props.router
};
},
createElement: function createElement(component, props) {
return component == null ? null : this.props.createElement(component, props);
},
render: function render() {
var _this = this;
var _props = this.props,
location = _props.location,
routes = _props.routes,
params = _props.params,
components = _props.components,
router = _props.router;
var element = null;
if (components) {
element = components.reduceRight(function (element, components, index) {
if (components == null) return element; // Don't create new children; use the grandchildren.
var route = routes[index];
var routeParams = (0, _getRouteParams2.default)(route, params);
var props = {
location: location,
params: params,
route: route,
router: router,
routeParams: routeParams,
routes: routes
};
if ((0, _RouteUtils.isReactChildren)(element)) {
props.children = element;
} else if (element) {
for (var prop in element) {
if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop];
}
}
// Handle components is object for { [name]: component } but not valid element
// type of react, such as React.memo, React.lazy and so on.
if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object' && !(0, _reactIs.isValidElementType)(components)) {
var elements = {};
for (var key in components) {
if (Object.prototype.hasOwnProperty.call(components, key)) {
// Pass through the key as a prop to createElement to allow
// custom createElement functions to know which named component
// they're rendering, for e.g. matching up to fetched data.
elements[key] = _this.createElement(components[key], _extends({
key: key }, props));
}
}
return elements;
}
return _this.createElement(components, props);
}, element);
}
!(element === null || element === false || _react2.default.isValidElement(element)) ? true ? (0, _invariant2.default)(false, 'The root route must render a single element') : (0, _invariant2.default)(false) : void 0;
return element;
}
});
exports.default = RouterContext;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined;
var _LocationUtils = __webpack_require__(10);
var _DOMUtils = __webpack_require__(13);
var _DOMStateStorage = __webpack_require__(32);
var _PathUtils = __webpack_require__(6);
var _ExecutionEnvironment = __webpack_require__(19);
var PopStateEvent = 'popstate';
var HashChangeEvent = 'hashchange';
var needsHashchangeListener = _ExecutionEnvironment.canUseDOM && !(0, _DOMUtils.supportsPopstateOnHashchange)();
var _createLocation = function _createLocation(historyState) {
var key = historyState && historyState.key;
return (0, _LocationUtils.createLocation)({
pathname: window.location.pathname,
search: window.location.search,
hash: window.location.hash,
state: key ? (0, _DOMStateStorage.readState)(key) : undefined
}, undefined, key);
};
var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {
var historyState = void 0;
try {
historyState = window.history.state || {};
} catch (error) {
// IE 11 sometimes throws when accessing window.history.state
// See https://github.com/ReactTraining/history/pull/289
historyState = {};
}
return _createLocation(historyState);
};
var getUserConfirmation = exports.getUserConfirmation = function getUserConfirmation(message, callback) {
return callback(window.confirm(message));
}; // eslint-disable-line no-alert
var startListener = exports.startListener = function startListener(listener) {
var handlePopState = function handlePopState(event) {
if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit
return;
listener(_createLocation(event.state));
};
(0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);
var handleUnpoppedHashChange = function handleUnpoppedHashChange() {
return listener(getCurrentLocation());
};
if (needsHashchangeListener) {
(0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);
}
return function () {
(0, _DOMUtils.removeEventListener)(window, PopStateEvent, handlePopState);
if (needsHashchangeListener) {
(0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleUnpoppedHashChange);
}
};
};
var updateLocation = function updateLocation(location, updateState) {
var state = location.state,
key = location.key;
if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state);
updateState({ key: key }, (0, _PathUtils.createPath)(location));
};
var pushLocation = exports.pushLocation = function pushLocation(location) {
return updateLocation(location, function (state, path) {
return window.history.pushState(state, null, path);
});
};
var replaceLocation = exports.replaceLocation = function replaceLocation(location) {
return updateLocation(location, function (state, path) {
return window.history.replaceState(state, null, path);
});
};
var go = exports.go = function go(n) {
if (n) window.history.go(n);
};
/***/ }),
/* 19 */
/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _AsyncUtils = __webpack_require__(57);
var _PathUtils = __webpack_require__(6);
var _runTransitionHook = __webpack_require__(21);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
var _Actions = __webpack_require__(12);
var _LocationUtils = __webpack_require__(10);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createHistory = function createHistory() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var getCurrentLocation = options.getCurrentLocation,
getUserConfirmation = options.getUserConfirmation,
pushLocation = options.pushLocation,
replaceLocation = options.replaceLocation,
go = options.go,
keyLength = options.keyLength;
var currentLocation = void 0;
var pendingLocation = void 0;
var beforeListeners = [];
var listeners = [];
var allKeys = [];
var getCurrentIndex = function getCurrentIndex() {
if (pendingLocation && pendingLocation.action === _Actions.POP) return allKeys.indexOf(pendingLocation.key);
if (currentLocation) return allKeys.indexOf(currentLocation.key);
return -1;
};
var updateLocation = function updateLocation(nextLocation) {
var currentIndex = getCurrentIndex();
currentLocation = nextLocation;
if (currentLocation.action === _Actions.PUSH) {
allKeys = [].concat(allKeys.slice(0, currentIndex + 1), [currentLocation.key]);
} else if (currentLocation.action === _Actions.REPLACE) {
allKeys[currentIndex] = currentLocation.key;
}
listeners.forEach(function (listener) {
return listener(currentLocation);
});
};
var listenBefore = function listenBefore(listener) {
beforeListeners.push(listener);
return function () {
return beforeListeners = beforeListeners.filter(function (item) {
return item !== listener;
});
};
};
var listen = function listen(listener) {
listeners.push(listener);
return function () {
return listeners = listeners.filter(function (item) {
return item !== listener;
});
};
};
var confirmTransitionTo = function confirmTransitionTo(location, callback) {
(0, _AsyncUtils.loopAsync)(beforeListeners.length, function (index, next, done) {
(0, _runTransitionHook2.default)(beforeListeners[index], location, function (result) {
return result != null ? done(result) : next();
});
}, function (message) {
if (getUserConfirmation && typeof message === 'string') {
getUserConfirmation(message, function (ok) {
return callback(ok !== false);
});
} else {
callback(message !== false);
}
});
};
var transitionTo = function transitionTo(nextLocation) {
if (currentLocation && (0, _LocationUtils.locationsAreEqual)(currentLocation, nextLocation) || pendingLocation && (0, _LocationUtils.locationsAreEqual)(pendingLocation, nextLocation)) return; // Nothing to do
pendingLocation = nextLocation;
confirmTransitionTo(nextLocation, function (ok) {
if (pendingLocation !== nextLocation) return; // Transition was interrupted during confirmation
pendingLocation = null;
if (ok) {
// Treat PUSH to same path like REPLACE to be consistent with browsers
if (nextLocation.action === _Actions.PUSH) {
var prevPath = (0, _PathUtils.createPath)(currentLocation);
var nextPath = (0, _PathUtils.createPath)(nextLocation);
if (nextPath === prevPath && (0, _LocationUtils.statesAreEqual)(currentLocation.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;
}
if (nextLocation.action === _Actions.POP) {
updateLocation(nextLocation);
} else if (nextLocation.action === _Actions.PUSH) {
if (pushLocation(nextLocation) !== false) updateLocation(nextLocation);
} else if (nextLocation.action === _Actions.REPLACE) {
if (replaceLocation(nextLocation) !== false) updateLocation(nextLocation);
}
} else if (currentLocation && nextLocation.action === _Actions.POP) {
var prevIndex = allKeys.indexOf(currentLocation.key);
var nextIndex = allKeys.indexOf(nextLocation.key);
if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL
}
});
};
var push = function push(input) {
return transitionTo(createLocation(input, _Actions.PUSH));
};
var replace = function replace(input) {
return transitionTo(createLocation(input, _Actions.REPLACE));
};
var goBack = function goBack() {
return go(-1);
};
var goForward = function goForward() {
return go(1);
};
var createKey = function createKey() {
return Math.random().toString(36).substr(2, keyLength || 6);
};
var createHref = function createHref(location) {
return (0, _PathUtils.createPath)(location);
};
var createLocation = function createLocation(location, action) {
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey();
return (0, _LocationUtils.createLocation)(location, action, key);
};
return {
getCurrentLocation: getCurrentLocation,
listenBefore: listenBefore,
listen: listen,
transitionTo: transitionTo,
push: push,
replace: replace,
go: go,
goBack: goBack,
goForward: goForward,
createKey: createKey,
createPath: _PathUtils.createPath,
createHref: createHref,
createLocation: createLocation
};
};
exports.default = createHistory;
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var runTransitionHook = function runTransitionHook(hook, location, callback) {
var result = hook(location, callback);
if (hook.length < 2) {
// Assume the hook runs synchronously and automatically
// call the callback with the return value.
callback(result);
} else {
true ? (0, _warning2.default)(result === undefined, 'You should not "return" in a transition hook with a callback argument; ' + 'call the callback instead') : void 0;
}
};
exports.default = runTransitionHook;
/***/ }),
/* 22 */
/***/ (function(module, exports) {
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
if (false) {
module.exports = require('./cjs/react-is.production.min.js');
} else {
module.exports = __webpack_require__(67);
}
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _PropTypes = __webpack_require__(16);
var _ContextUtils = __webpack_require__(15);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function isLeftClickEvent(event) {
return event.button === 0;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
// TODO: De-duplicate against hasAnyProperties in createTransitionManager.
function isEmptyObject(object) {
for (var p in object) {
if (Object.prototype.hasOwnProperty.call(object, p)) return false;
}return true;
}
function resolveToLocation(to, router) {
return typeof to === 'function' ? to(router.location) : to;
}
/**
* A <Link> is used to create an <a> element that links to a route.
* When that route is active, the link gets the value of its
* activeClassName prop.
*
* For example, assuming you have the following route:
*
* <Route path="/posts/:postID" component={Post} />
*
* You could use the following component to link to that route:
*
* <Link to={`/posts/${post.id}`} />
*/
var Link = (0, _createReactClass2.default)({
displayName: 'Link',
mixins: [(0, _ContextUtils.ContextSubscriber)('router')],
contextTypes: {
router: _PropTypes.routerShape
},
propTypes: {
to: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.object, _propTypes.func]),
activeStyle: _propTypes.object,
activeClassName: _propTypes.string,
onlyActiveOnIndex: _propTypes.bool.isRequired,
onClick: _propTypes.func,
target: _propTypes.string,
innerRef: (0, _propTypes.oneOfType)([_propTypes.string, _propTypes.func])
},
getDefaultProps: function getDefaultProps() {
return {
onlyActiveOnIndex: false,
style: {}
};
},
handleClick: function handleClick(event) {
if (this.props.onClick) this.props.onClick(event);
if (event.defaultPrevented) return;
var router = this.context.router;
!router ? true ? (0, _invariant2.default)(false, '<Link>s rendered outside of a router context cannot navigate.') : (0, _invariant2.default)(false) : void 0;
if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;
// If target prop is set (e.g. to "_blank"), let browser handle link.
/* istanbul ignore if: untestable with Karma */
if (this.props.target) return;
event.preventDefault();
router.push(resolveToLocation(this.props.to, router));
},
render: function render() {
var _props = this.props,
to = _props.to,
activeClassName = _props.activeClassName,
activeStyle = _props.activeStyle,
onlyActiveOnIndex = _props.onlyActiveOnIndex,
innerRef = _props.innerRef,
props = _objectWithoutProperties(_props, ['to', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex', 'innerRef']);
// Ignore if rendered outside the context of router to simplify unit testing.
var router = this.context.router;
if (router) {
// If user does not specify a `to` prop, return an empty anchor tag.
if (!to) {
return _react2.default.createElement('a', _extends({}, props, { ref: innerRef }));
}
var toLocation = resolveToLocation(to, router);
props.href = router.createHref(toLocation);
if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) {
if (router.isActive(toLocation, onlyActiveOnIndex)) {
if (activeClassName) {
if (props.className) {
props.className += ' ' + activeClassName;
} else {
props.className = activeClassName;
}
}
if (activeStyle) props.style = _extends({}, props.style, activeStyle);
}
}
}
return _react2.default.createElement('a', _extends({}, props, { onClick: this.handleClick, ref: innerRef }));
}
});
exports.default = Link;
/***/ }),
/* 25 */
/***/ (function(module, exports) {
'use strict';
exports.__esModule = true;
exports.isPromise = isPromise;
function isPromise(obj) {
return obj && typeof obj.then === 'function';
}
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _RouteUtils = __webpack_require__(5);
var _PatternUtils = __webpack_require__(8);
var _InternalPropTypes = __webpack_require__(11);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A <Redirect> is used to declare another URL path a client should
* be sent to when they request a given URL.
*
* Redirects are placed alongside routes in the route configuration
* and are traversed in the same manner.
*/
/* eslint-disable react/require-render-return */
var Redirect = (0, _createReactClass2.default)({
displayName: 'Redirect',
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element) {
var route = (0, _RouteUtils.createRouteFromReactElement)(element);
if (route.from) route.path = route.from;
route.onEnter = function (nextState, replace) {
var location = nextState.location,
params = nextState.params;
var pathname = void 0;
if (route.to.charAt(0) === '/') {
pathname = (0, _PatternUtils.formatPattern)(route.to, params);
} else if (!route.to) {
pathname = location.pathname;
} else {
var routeIndex = nextState.routes.indexOf(route);
var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);
var pattern = parentPattern.replace(/\/*$/, '/') + route.to;
pathname = (0, _PatternUtils.formatPattern)(pattern, params);
}
replace({
pathname: pathname,
query: route.query || location.query,
state: route.state || location.state
});
};
return route;
},
getRoutePattern: function getRoutePattern(routes, routeIndex) {
var parentPattern = '';
for (var i = routeIndex; i >= 0; i--) {
var route = routes[i];
var pattern = route.path || '';
parentPattern = pattern.replace(/\/*$/, '/') + parentPattern;
if (pattern.indexOf('/') === 0) break;
}
return '/' + parentPattern;
}
},
propTypes: {
path: _propTypes.string,
from: _propTypes.string, // Alias for path
to: _propTypes.string.isRequired,
query: _propTypes.object,
state: _propTypes.object,
onEnter: _InternalPropTypes.falsy,
children: _InternalPropTypes.falsy
},
/* istanbul ignore next: sanity check */
render: function render() {
true ? true ? (0, _invariant2.default)(false, '<Redirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
}
});
exports.default = Redirect;
/***/ }),
/* 27 */
/***/ (function(module, exports) {
"use strict";
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.createRouterObject = createRouterObject;
exports.assignRouterState = assignRouterState;
function createRouterObject(history, transitionManager, state) {
var router = _extends({}, history, {
setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute,
isActive: transitionManager.isActive
});
return assignRouterState(router, state);
}
function assignRouterState(router, _ref) {
var location = _ref.location,
params = _ref.params,
routes = _ref.routes;
router.location = location;
router.params = params;
router.routes = routes;
return router;
}
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = createMemoryHistory;
var _useQueries = __webpack_require__(34);
var _useQueries2 = _interopRequireDefault(_useQueries);
var _useBasename = __webpack_require__(33);
var _useBasename2 = _interopRequireDefault(_useBasename);
var _createMemoryHistory = __webpack_require__(62);
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createMemoryHistory(options) {
// signatures and type checking differ between `useQueries` and
// `createMemoryHistory`, have to create `memoryHistory` first because
// `useQueries` doesn't understand the signature
var memoryHistory = (0, _createMemoryHistory2.default)(options);
var createHistory = function createHistory() {
return memoryHistory;
};
var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);
return history;
}
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = createRouterHistory;
var _useRouterHistory = __webpack_require__(31);
var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
function createRouterHistory(createHistory) {
var history = void 0;
if (canUseDOM) history = (0, _useRouterHistory2.default)(createHistory)();
return history;
}
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = createTransitionManager;
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
var _computeChangedRoutes2 = __webpack_require__(44);
var _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2);
var _TransitionUtils = __webpack_require__(41);
var _TransitionUtils2 = _interopRequireDefault(_TransitionUtils);
var _isActive2 = __webpack_require__(48);
var _isActive3 = _interopRequireDefault(_isActive2);
var _getComponents = __webpack_require__(45);
var _getComponents2 = _interopRequireDefault(_getComponents);
var _matchRoutes = __webpack_require__(50);
var _matchRoutes2 = _interopRequireDefault(_matchRoutes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function hasAnyProperties(object) {
for (var p in object) {
if (Object.prototype.hasOwnProperty.call(object, p)) return true;
}return false;
}
function createTransitionManager(history, routes) {
var state = {};
var _getTransitionUtils = (0, _TransitionUtils2.default)(),
runEnterHooks = _getTransitionUtils.runEnterHooks,
runChangeHooks = _getTransitionUtils.runChangeHooks,
runLeaveHooks = _getTransitionUtils.runLeaveHooks;
// Signature should be (location, indexOnly), but needs to support (path,
// query, indexOnly)
function isActive(location, indexOnly) {
location = history.createLocation(location);
return (0, _isActive3.default)(location, indexOnly, state.location, state.routes, state.params);
}
var partialNextState = void 0;
function match(location, callback) {
if (partialNextState && partialNextState.location === location) {
// Continue from where we left off.
finishMatch(partialNextState, callback);
} else {
(0, _matchRoutes2.default)(routes, location, function (error, nextState) {
if (error) {
callback(error);
} else if (nextState) {
finishMatch(_extends({}, nextState, { location: location }), callback);
} else {
callback();
}
});
}
}
function finishMatch(nextState, callback) {
var _computeChangedRoutes = (0, _computeChangedRoutes3.default)(state, nextState),
leaveRoutes = _computeChangedRoutes.leaveRoutes,
changeRoutes = _computeChangedRoutes.changeRoutes,
enterRoutes = _computeChangedRoutes.enterRoutes;
runLeaveHooks(leaveRoutes, state);
// Tear down confirmation hooks for left routes
leaveRoutes.filter(function (route) {
return enterRoutes.indexOf(route) === -1;
}).forEach(removeListenBeforeHooksForRoute);
// change and enter hooks are run in series
runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) {
if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
runEnterHooks(enterRoutes, nextState, finishEnterHooks);
});
function finishEnterHooks(error, redirectInfo) {
if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
// TODO: Fetch components after state is updated.
(0, _getComponents2.default)(nextState, function (error, components) {
if (error) {
callback(error);
} else {
// TODO: Make match a pure function and have some other API
// for "match and update state".
callback(null, null, state = _extends({}, nextState, { components: components }));
}
});
}
function handleErrorOrRedirect(error, redirectInfo) {
if (error) callback(error);else callback(null, redirectInfo);
}
}
var RouteGuid = 1;
function getRouteID(route) {
var create = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return route.__id__ || create && (route.__id__ = RouteGuid++);
}
var RouteHooks = Object.create(null);
function getRouteHooksForRoutes(routes) {
return routes.map(function (route) {
return RouteHooks[getRouteID(route)];
}).filter(function (hook) {
return hook;
});
}
function transitionHook(location, callback) {
(0, _matchRoutes2.default)(routes, location, function (error, nextState) {
if (nextState == null) {
// TODO: We didn't actually match anything, but hang
// onto error/nextState so we don't have to matchRoutes
// again in the listen callback.
callback();
return;
}
// Cache some state here so we don't have to
// matchRoutes() again in the listen callback.
partialNextState = _extends({}, nextState, { location: location });
var hooks = getRouteHooksForRoutes((0, _computeChangedRoutes3.default)(state, partialNextState).leaveRoutes);
var result = void 0;
for (var i = 0, len = hooks.length; result == null && i < len; ++i) {
// Passing the location arg here indicates to
// the user that this is a transition hook.
result = hooks[i](location);
}
callback(result);
});
}
/* istanbul ignore next: untestable with Karma */
function beforeUnloadHook() {
// Synchronously check to see if any route hooks want
// to prevent the current window/tab from closing.
if (state.routes) {
var hooks = getRouteHooksForRoutes(state.routes);
var message = void 0;
for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) {
// Passing no args indicates to the user that this is a
// beforeunload hook. We don't know the next location.
message = hooks[i]();
}
return message;
}
}
var unlistenBefore = void 0,
unlistenBeforeUnload = void 0;
function removeListenBeforeHooksForRoute(route) {
var routeID = getRouteID(route);
if (!routeID) {
return;
}
delete RouteHooks[routeID];
if (!hasAnyProperties(RouteHooks)) {
// teardown transition & beforeunload hooks
if (unlistenBefore) {
unlistenBefore();
unlistenBefore = null;
}
if (unlistenBeforeUnload) {
unlistenBeforeUnload();
unlistenBeforeUnload = null;
}
}
}
/**
* Registers the given hook function to run before leaving the given route.
*
* During a normal transition, the hook function receives the next location
* as its only argument and can return either a prompt message (string) to show the user,
* to make sure they want to leave the page; or `false`, to prevent the transition.
* Any other return value will have no effect.
*
* During the beforeunload event (in browsers) the hook receives no arguments.
* In this case it must return a prompt message to prevent the transition.
*
* Returns a function that may be used to unbind the listener.
*/
function listenBeforeLeavingRoute(route, hook) {
var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks);
var routeID = getRouteID(route, true);
RouteHooks[routeID] = hook;
if (thereWereNoRouteHooks) {
// setup transition & beforeunload hooks
unlistenBefore = history.listenBefore(transitionHook);
if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook);
}
return function () {
removeListenBeforeHooksForRoute(route);
};
}
/**
* This is the API for stateful environments. As the location
* changes, we update state and call the listener. We can also
* gracefully handle errors and redirects.
*/
function listen(listener) {
function historyListener(location) {
if (state.location === location) {
listener(null, state);
} else {
match(location, function (error, redirectLocation, nextState) {
if (error) {
listener(error);
} else if (redirectLocation) {
history.replace(redirectLocation);
} else if (nextState) {
listener(null, nextState);
} else {
true ? (0, _routerWarning2.default)(false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : void 0;
}
});
}
}
// TODO: Only use a single history listener. Otherwise we'll end up with
// multiple concurrent calls to match.
// Set up the history listener first in case the initial match redirects.
var unsubscribe = history.listen(historyListener);
if (state.location) {
// Picking up on a matchContext.
listener(null, state);
} else {
historyListener(history.getCurrentLocation());
}
return unsubscribe;
}
return {
isActive: isActive,
match: match,
listenBeforeLeavingRoute: listenBeforeLeavingRoute,
listen: listen
};
}
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = useRouterHistory;
var _useQueries = __webpack_require__(34);
var _useQueries2 = _interopRequireDefault(_useQueries);
var _useBasename = __webpack_require__(33);
var _useBasename2 = _interopRequireDefault(_useBasename);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function useRouterHistory(createHistory) {
return function (options) {
var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);
return history;
};
}
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.readState = exports.saveState = undefined;
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var QuotaExceededErrors = {
QuotaExceededError: true,
QUOTA_EXCEEDED_ERR: true
};
var SecurityErrors = {
SecurityError: true
};
var KeyPrefix = '@@History/';
var createKey = function createKey(key) {
return KeyPrefix + key;
};
var saveState = exports.saveState = function saveState(key, state) {
if (!window.sessionStorage) {
// Session storage is not available or hidden.
// sessionStorage is undefined in Internet Explorer when served via file protocol.
true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available') : void 0;
return;
}
try {
if (state == null) {
window.sessionStorage.removeItem(createKey(key));
} else {
window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
}
} catch (error) {
if (SecurityErrors[error.name]) {
// Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any
// attempt to access window.sessionStorage.
true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available due to security settings') : void 0;
return;
}
if (QuotaExceededErrors[error.name] && window.sessionStorage.length === 0) {
// Safari "private mode" throws QuotaExceededError.
true ? (0, _warning2.default)(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : void 0;
return;
}
throw error;
}
};
var readState = exports.readState = function readState(key) {
var json = void 0;
try {
json = window.sessionStorage.getItem(createKey(key));
} catch (error) {
if (SecurityErrors[error.name]) {
// Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any
// attempt to access window.sessionStorage.
true ? (0, _warning2.default)(false, '[history] Unable to read state; sessionStorage is not available due to security settings') : void 0;
return undefined;
}
}
if (json) {
try {
return JSON.parse(json);
} catch (error) {
// Ignore invalid JSON.
}
}
return undefined;
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _runTransitionHook = __webpack_require__(21);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
var _PathUtils = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var useBasename = function useBasename(createHistory) {
return function () {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var history = createHistory(options);
var basename = options.basename;
var addBasename = function addBasename(location) {
if (!location) return location;
if (basename && location.basename == null) {
if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) {
location.pathname = location.pathname.substring(basename.length);
location.basename = basename;
if (location.pathname === '') location.pathname = '/';
} else {
location.basename = '';
}
}
return location;
};
var prependBasename = function prependBasename(location) {
if (!basename) return location;
var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;
var pname = object.pathname;
var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/';
var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname;
var pathname = normalizedBasename + normalizedPathname;
return _extends({}, object, {
pathname: pathname
});
};
// Override all read methods with basename-aware versions.
var getCurrentLocation = function getCurrentLocation() {
return addBasename(history.getCurrentLocation());
};
var listenBefore = function listenBefore(hook) {
return history.listenBefore(function (location, callback) {
return (0, _runTransitionHook2.default)(hook, addBasename(location), callback);
});
};
var listen = function listen(listener) {
return history.listen(function (location) {
return listener(addBasename(location));
});
};
// Override all write methods with basename-aware versions.
var push = function push(location) {
return history.push(prependBasename(location));
};
var replace = function replace(location) {
return history.replace(prependBasename(location));
};
var createPath = function createPath(location) {
return history.createPath(prependBasename(location));
};
var createHref = function createHref(location) {
return history.createHref(prependBasename(location));
};
var createLocation = function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));
};
return _extends({}, history, {
getCurrentLocation: getCurrentLocation,
listenBefore: listenBefore,
listen: listen,
push: push,
replace: replace,
createPath: createPath,
createHref: createHref,
createLocation: createLocation
});
};
};
exports.default = useBasename;
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _queryString = __webpack_require__(66);
var _runTransitionHook = __webpack_require__(21);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
var _LocationUtils = __webpack_require__(10);
var _PathUtils = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var defaultStringifyQuery = function defaultStringifyQuery(query) {
return (0, _queryString.stringify)(query).replace(/%20/g, '+');
};
var defaultParseQueryString = _queryString.parse;
/**
* Returns a new createHistory function that may be used to create
* history objects that know how to handle URL queries.
*/
var useQueries = function useQueries(createHistory) {
return function () {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var history = createHistory(options);
var stringifyQuery = options.stringifyQuery,
parseQueryString = options.parseQueryString;
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;
if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;
var decodeQuery = function decodeQuery(location) {
if (!location) return location;
if (location.query == null) location.query = parseQueryString(location.search.substring(1));
return location;
};
var encodeQuery = function encodeQuery(location, query) {
if (query == null) return location;
var object = typeof location === 'string' ? (0, _PathUtils.parsePath)(location) : location;
var queryString = stringifyQuery(query);
var search = queryString ? '?' + queryString : '';
return _extends({}, object, {
search: search
});
};
// Override all read methods with query-aware versions.
var getCurrentLocation = function getCurrentLocation() {
return decodeQuery(history.getCurrentLocation());
};
var listenBefore = function listenBefore(hook) {
return history.listenBefore(function (location, callback) {
return (0, _runTransitionHook2.default)(hook, decodeQuery(location), callback);
});
};
var listen = function listen(listener) {
return history.listen(function (location) {
return listener(decodeQuery(location));
});
};
// Override all write methods with query-aware versions.
var push = function push(location) {
return history.push(encodeQuery(location, location.query));
};
var replace = function replace(location) {
return history.replace(encodeQuery(location, location.query));
};
var createPath = function createPath(location) {
return history.createPath(encodeQuery(location, location.query));
};
var createHref = function createHref(location) {
return history.createHref(encodeQuery(location, location.query));
};
var createLocation = function createLocation(location) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var newLocation = history.createLocation.apply(history, [encodeQuery(location, location.query)].concat(args));
if (location.query) newLocation.query = (0, _LocationUtils.createQuery)(location.query);
return decodeQuery(newLocation);
};
return _extends({}, history, {
getCurrentLocation: getCurrentLocation,
listenBefore: listenBefore,
listen: listen,
push: push,
replace: replace,
createPath: createPath,
createHref: createHref,
createLocation: createLocation
});
};
};
exports.default = useQueries;
/***/ }),
/* 35 */
/***/ (function(module, exports) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _Link = __webpack_require__(24);
var _Link2 = _interopRequireDefault(_Link);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* An <IndexLink> is used to link to an <IndexRoute>.
*/
var IndexLink = (0, _createReactClass2.default)({
displayName: 'IndexLink',
render: function render() {
return _react2.default.createElement(_Link2.default, _extends({}, this.props, { onlyActiveOnIndex: true }));
}
});
exports.default = IndexLink;
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _Redirect = __webpack_require__(26);
var _Redirect2 = _interopRequireDefault(_Redirect);
var _InternalPropTypes = __webpack_require__(11);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* An <IndexRedirect> is used to redirect from an indexRoute.
*/
/* eslint-disable react/require-render-return */
var IndexRedirect = (0, _createReactClass2.default)({
displayName: 'IndexRedirect',
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
parentRoute.indexRoute = _Redirect2.default.createRouteFromReactElement(element);
} else {
true ? (0, _routerWarning2.default)(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0;
}
}
},
propTypes: {
to: _propTypes.string.isRequired,
query: _propTypes.object,
state: _propTypes.object,
onEnter: _InternalPropTypes.falsy,
children: _InternalPropTypes.falsy
},
/* istanbul ignore next: sanity check */
render: function render() {
true ? true ? (0, _invariant2.default)(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
}
});
exports.default = IndexRedirect;
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _RouteUtils = __webpack_require__(5);
var _InternalPropTypes = __webpack_require__(11);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* An <IndexRoute> is used to specify its parent's <Route indexRoute> in
* a JSX route config.
*/
/* eslint-disable react/require-render-return */
var IndexRoute = (0, _createReactClass2.default)({
displayName: 'IndexRoute',
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
parentRoute.indexRoute = (0, _RouteUtils.createRouteFromReactElement)(element);
} else {
true ? (0, _routerWarning2.default)(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0;
}
}
},
propTypes: {
path: _InternalPropTypes.falsy,
component: _InternalPropTypes.component,
components: _InternalPropTypes.components,
getComponent: _propTypes.func,
getComponents: _propTypes.func
},
/* istanbul ignore next: sanity check */
render: function render() {
true ? true ? (0, _invariant2.default)(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
}
});
exports.default = IndexRoute;
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _RouteUtils = __webpack_require__(5);
var _InternalPropTypes = __webpack_require__(11);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A <Route> is used to declare which components are rendered to the
* page when the URL matches a given pattern.
*
* Routes are arranged in a nested tree structure. When a new URL is
* requested, the tree is searched depth-first to find a route whose
* path matches the URL. When one is found, all routes in the tree
* that lead to it are considered "active" and their components are
* rendered into the DOM, nested in the same order as in the tree.
*/
/* eslint-disable react/require-render-return */
var Route = (0, _createReactClass2.default)({
displayName: 'Route',
statics: {
createRouteFromReactElement: _RouteUtils.createRouteFromReactElement
},
propTypes: {
path: _propTypes.string,
component: _InternalPropTypes.component,
components: _InternalPropTypes.components,
getComponent: _propTypes.func,
getComponents: _propTypes.func
},
/* istanbul ignore next: sanity check */
render: function render() {
true ? true ? (0, _invariant2.default)(false, '<Route> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
}
});
exports.default = Route;
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _propTypes = __webpack_require__(2);
var _createTransitionManager2 = __webpack_require__(30);
var _createTransitionManager3 = _interopRequireDefault(_createTransitionManager2);
var _InternalPropTypes = __webpack_require__(11);
var _RouterContext = __webpack_require__(17);
var _RouterContext2 = _interopRequireDefault(_RouterContext);
var _RouteUtils = __webpack_require__(5);
var _RouterUtils = __webpack_require__(27);
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var propTypes = {
history: _propTypes.object,
children: _InternalPropTypes.routes,
routes: _InternalPropTypes.routes, // alias for children
render: _propTypes.func,
createElement: _propTypes.func,
onError: _propTypes.func,
onUpdate: _propTypes.func,
// PRIVATE: For client-side rehydration of server match.
matchContext: _propTypes.object
};
var prefixUnsafeLifecycleMethods = parseFloat(_react2.default.version) >= 16.3;
/**
* A <Router> is a high-level API for automatically setting up
* a router that renders a <RouterContext> with all the props
* it needs each time the URL changes.
*/
var Router = (0, _createReactClass2.default)({
displayName: 'Router',
propTypes: propTypes,
getDefaultProps: function getDefaultProps() {
return {
render: function render(props) {
return _react2.default.createElement(_RouterContext2.default, props);
}
};
},
getInitialState: function getInitialState() {
return {
location: null,
routes: null,
params: null,
components: null
};
},
handleError: function handleError(error) {
if (this.props.onError) {
this.props.onError.call(this, error);
} else {
// Throw errors by default so we don't silently swallow them!
throw error; // This error probably occurred in getChildRoutes or getComponents.
}
},
createRouterObject: function createRouterObject(state) {
var matchContext = this.props.matchContext;
if (matchContext) {
return matchContext.router;
}
var history = this.props.history;
return (0, _RouterUtils.createRouterObject)(history, this.transitionManager, state);
},
createTransitionManager: function createTransitionManager() {
var matchContext = this.props.matchContext;
if (matchContext) {
return matchContext.transitionManager;
}
var history = this.props.history;
var _props = this.props,
routes = _props.routes,
children = _props.children;
!history.getCurrentLocation ? true ? (0, _invariant2.default)(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : (0, _invariant2.default)(false) : void 0;
return (0, _createTransitionManager3.default)(history, (0, _RouteUtils.createRoutes)(routes || children));
},
// this method will be updated to UNSAFE_componentWillMount below for React versions >= 16.3
componentWillMount: function componentWillMount() {
var _this = this;
this.transitionManager = this.createTransitionManager();
this.router = this.createRouterObject(this.state);
this._unlisten = this.transitionManager.listen(function (error, state) {
if (error) {
_this.handleError(error);
} else {
// Keep the identity of this.router because of a caveat in ContextUtils:
// they only work if the object identity is preserved.
(0, _RouterUtils.assignRouterState)(_this.router, state);
_this.setState(state, _this.props.onUpdate);
}
});
},
// this method will be updated to UNSAFE_componentWillReceiveProps below for React versions >= 16.3
/* istanbul ignore next: sanity check */
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
true ? (0, _routerWarning2.default)(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0;
true ? (0, _routerWarning2.default)((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0;
},
componentWillUnmount: function componentWillUnmount() {
if (this._unlisten) this._unlisten();
},
render: function render() {
var _state = this.state,
location = _state.location,
routes = _state.routes,
params = _state.params,
components = _state.components;
var _props2 = this.props,
createElement = _props2.createElement,
render = _props2.render,
props = _objectWithoutProperties(_props2, ['createElement', 'render']);
if (location == null) return null; // Async match
// Only forward non-Router-specific props to routing context, as those are
// the only ones that might be custom routing context props.
Object.keys(propTypes).forEach(function (propType) {
return delete props[propType];
});
return render(_extends({}, props, {
router: this.router,
location: location,
routes: routes,
params: params,
components: components,
createElement: createElement
}));
}
});
if (prefixUnsafeLifecycleMethods) {
Router.prototype.UNSAFE_componentWillReceiveProps = Router.prototype.componentWillReceiveProps;
Router.prototype.UNSAFE_componentWillMount = Router.prototype.componentWillMount;
delete Router.prototype.componentWillReceiveProps;
delete Router.prototype.componentWillMount;
}
exports.default = Router;
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.default = getTransitionUtils;
var _AsyncUtils = __webpack_require__(14);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PendingHooks = function PendingHooks() {
var _this = this;
_classCallCheck(this, PendingHooks);
this.hooks = [];
this.add = function (hook) {
return _this.hooks.push(hook);
};
this.remove = function (hook) {
return _this.hooks = _this.hooks.filter(function (h) {
return h !== hook;
});
};
this.has = function (hook) {
return _this.hooks.indexOf(hook) !== -1;
};
this.clear = function () {
return _this.hooks = [];
};
};
function getTransitionUtils() {
var enterHooks = new PendingHooks();
var changeHooks = new PendingHooks();
function createTransitionHook(hook, route, asyncArity, pendingHooks) {
var isSync = hook.length < asyncArity;
var transitionHook = function transitionHook() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
hook.apply(route, args);
if (isSync) {
var callback = args[args.length - 1];
// Assume hook executes synchronously and
// automatically call the callback.
callback();
}
};
pendingHooks.add(transitionHook);
return transitionHook;
}
function getEnterHooks(routes) {
return routes.reduce(function (hooks, route) {
if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));
return hooks;
}, []);
}
function getChangeHooks(routes) {
return routes.reduce(function (hooks, route) {
if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));
return hooks;
}, []);
}
function runTransitionHooks(length, iter, callback) {
if (!length) {
callback();
return;
}
var redirectInfo = void 0;
function replace(location) {
redirectInfo = location;
}
(0, _AsyncUtils.loopAsync)(length, function (index, next, done) {
iter(index, replace, function (error) {
if (error || redirectInfo) {
done(error, redirectInfo); // No need to continue.
} else {
next();
}
});
}, callback);
}
/**
* Runs all onEnter hooks in the given array of routes in order
* with onEnter(nextState, replace, callback) and calls
* callback(error, redirectInfo) when finished. The first hook
* to use replace short-circuits the loop.
*
* If a hook needs to run asynchronously, it may use the callback
* function. However, doing so will cause the transition to pause,
* which could lead to a non-responsive UI if the hook is slow.
*/
function runEnterHooks(routes, nextState, callback) {
enterHooks.clear();
var hooks = getEnterHooks(routes);
return runTransitionHooks(hooks.length, function (index, replace, next) {
var wrappedNext = function wrappedNext() {
if (enterHooks.has(hooks[index])) {
next.apply(undefined, arguments);
enterHooks.remove(hooks[index]);
}
};
hooks[index](nextState, replace, wrappedNext);
}, callback);
}
/**
* Runs all onChange hooks in the given array of routes in order
* with onChange(prevState, nextState, replace, callback) and calls
* callback(error, redirectInfo) when finished. The first hook
* to use replace short-circuits the loop.
*
* If a hook needs to run asynchronously, it may use the callback
* function. However, doing so will cause the transition to pause,
* which could lead to a non-responsive UI if the hook is slow.
*/
function runChangeHooks(routes, state, nextState, callback) {
changeHooks.clear();
var hooks = getChangeHooks(routes);
return runTransitionHooks(hooks.length, function (index, replace, next) {
var wrappedNext = function wrappedNext() {
if (changeHooks.has(hooks[index])) {
next.apply(undefined, arguments);
changeHooks.remove(hooks[index]);
}
};
hooks[index](state, nextState, replace, wrappedNext);
}, callback);
}
/**
* Runs all onLeave hooks in the given array of routes in order.
*/
function runLeaveHooks(routes, prevState) {
for (var i = 0, len = routes.length; i < len; ++i) {
if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);
}
}
return {
runEnterHooks: runEnterHooks,
runChangeHooks: runChangeHooks,
runLeaveHooks: runLeaveHooks
};
}
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _RouterContext = __webpack_require__(17);
var _RouterContext2 = _interopRequireDefault(_RouterContext);
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function () {
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
if (true) {
middlewares.forEach(function (middleware, index) {
true ? (0, _routerWarning2.default)(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0;
});
}
var withContext = middlewares.map(function (middleware) {
return middleware.renderRouterContext;
}).filter(Boolean);
var withComponent = middlewares.map(function (middleware) {
return middleware.renderRouteComponent;
}).filter(Boolean);
var makeCreateElement = function makeCreateElement() {
var baseCreateElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _react.createElement;
return function (Component, props) {
return withComponent.reduceRight(function (previous, renderRouteComponent) {
return renderRouteComponent(previous, props);
}, baseCreateElement(Component, props));
};
};
return function (renderProps) {
return withContext.reduceRight(function (previous, renderRouterContext) {
return renderRouterContext(previous, renderProps);
}, _react2.default.createElement(_RouterContext2.default, _extends({}, renderProps, {
createElement: makeCreateElement(renderProps.createElement)
})));
};
};
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createBrowserHistory = __webpack_require__(60);
var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
var _createRouterHistory = __webpack_require__(29);
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = (0, _createRouterHistory2.default)(_createBrowserHistory2.default);
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _PatternUtils = __webpack_require__(8);
function routeParamsChanged(route, prevState, nextState) {
if (!route.path) return false;
var paramNames = (0, _PatternUtils.getParamNames)(route.path);
return paramNames.some(function (paramName) {
return prevState.params[paramName] !== nextState.params[paramName];
});
}
/**
* Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by
* the change from prevState to nextState. We leave routes if either
* 1) they are not in the next state or 2) they are in the next state
* but their params have changed (i.e. /users/123 => /users/456).
*
* leaveRoutes are ordered starting at the leaf route of the tree
* we're leaving up to the common parent route. enterRoutes are ordered
* from the top of the tree we're entering down to the leaf route.
*
* changeRoutes are any routes that didn't leave or enter during
* the transition.
*/
function computeChangedRoutes(prevState, nextState) {
var prevRoutes = prevState && prevState.routes;
var nextRoutes = nextState.routes;
var leaveRoutes = void 0,
changeRoutes = void 0,
enterRoutes = void 0;
if (prevRoutes) {
var parentIsLeaving = false;
leaveRoutes = prevRoutes.filter(function (route) {
if (parentIsLeaving) {
return true;
} else {
var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
if (isLeaving) parentIsLeaving = true;
return isLeaving;
}
});
// onLeave hooks start at the leaf route.
leaveRoutes.reverse();
enterRoutes = [];
changeRoutes = [];
nextRoutes.forEach(function (route) {
var isNew = prevRoutes.indexOf(route) === -1;
var paramsChanged = leaveRoutes.indexOf(route) !== -1;
if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
});
} else {
leaveRoutes = [];
changeRoutes = [];
enterRoutes = nextRoutes;
}
return {
leaveRoutes: leaveRoutes,
changeRoutes: changeRoutes,
enterRoutes: enterRoutes
};
}
exports.default = computeChangedRoutes;
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _AsyncUtils = __webpack_require__(14);
var _PromiseUtils = __webpack_require__(25);
function getComponentsForRoute(nextState, route, callback) {
if (route.component || route.components) {
callback(null, route.component || route.components);
return;
}
var getComponent = route.getComponent || route.getComponents;
if (getComponent) {
var componentReturn = getComponent.call(route, nextState, callback);
if ((0, _PromiseUtils.isPromise)(componentReturn)) componentReturn.then(function (component) {
return callback(null, component);
}, callback);
} else {
callback();
}
}
/**
* Asynchronously fetches all components needed for the given router
* state and calls callback(error, components) when finished.
*
* Note: This operation may finish synchronously if no routes have an
* asynchronous getComponents method.
*/
function getComponents(nextState, callback) {
(0, _AsyncUtils.mapAsync)(nextState.routes, function (route, index, callback) {
getComponentsForRoute(nextState, route, callback);
}, callback);
}
exports.default = getComponents;
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _PatternUtils = __webpack_require__(8);
/**
* Extracts an object of params the given route cares about from
* the given params object.
*/
function getRouteParams(route, params) {
var routeParams = {};
if (!route.path) return routeParams;
(0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {
if (Object.prototype.hasOwnProperty.call(params, p)) {
routeParams[p] = params[p];
}
});
return routeParams;
}
exports.default = getRouteParams;
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _createHashHistory = __webpack_require__(61);
var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
var _createRouterHistory = __webpack_require__(29);
var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = (0, _createRouterHistory2.default)(_createHashHistory2.default);
/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.default = isActive;
var _PatternUtils = __webpack_require__(8);
function deepEqual(a, b) {
if (a == b) return true;
if (a == null || b == null) return false;
if (Array.isArray(a)) {
return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
return deepEqual(item, b[index]);
});
}
if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') {
for (var p in a) {
if (!Object.prototype.hasOwnProperty.call(a, p)) {
continue;
}
if (a[p] === undefined) {
if (b[p] !== undefined) {
return false;
}
} else if (!Object.prototype.hasOwnProperty.call(b, p)) {
return false;
} else if (!deepEqual(a[p], b[p])) {
return false;
}
}
return true;
}
return String(a) === String(b);
}
/**
* Returns true if the current pathname matches the supplied one, net of
* leading and trailing slash normalization. This is sufficient for an
* indexOnly route match.
*/
function pathIsActive(pathname, currentPathname) {
// Normalize leading slash for consistency. Leading slash on pathname has
// already been normalized in isActive. See caveat there.
if (currentPathname.charAt(0) !== '/') {
currentPathname = '/' + currentPathname;
}
// Normalize the end of both path names too. Maybe `/foo/` shouldn't show
// `/foo` as active, but in this case, we would already have failed the
// match.
if (pathname.charAt(pathname.length - 1) !== '/') {
pathname += '/';
}
if (currentPathname.charAt(currentPathname.length - 1) !== '/') {
currentPathname += '/';
}
return currentPathname === pathname;
}
/**
* Returns true if the given pathname matches the active routes and params.
*/
function routeIsActive(pathname, routes, params) {
var remainingPathname = pathname,
paramNames = [],
paramValues = [];
// for...of would work here but it's probably slower post-transpilation.
for (var i = 0, len = routes.length; i < len; ++i) {
var route = routes[i];
var pattern = route.path || '';
if (pattern.charAt(0) === '/') {
remainingPathname = pathname;
paramNames = [];
paramValues = [];
}
if (remainingPathname !== null && pattern) {
var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
if (matched) {
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
paramValues = [].concat(paramValues, matched.paramValues);
} else {
remainingPathname = null;
}
if (remainingPathname === '') {
// We have an exact match on the route. Just check that all the params
// match.
// FIXME: This doesn't work on repeated params.
return paramNames.every(function (paramName, index) {
return String(paramValues[index]) === String(params[paramName]);
});
}
}
}
return false;
}
/**
* Returns true if all key/value pairs in the given query are
* currently active.
*/
function queryIsActive(query, activeQuery) {
if (activeQuery == null) return query == null;
if (query == null) return true;
return deepEqual(query, activeQuery);
}
/**
* Returns true if a <Link> to the given pathname/query combination is
* currently active.
*/
function isActive(_ref, indexOnly, currentLocation, routes, params) {
var pathname = _ref.pathname,
query = _ref.query;
if (currentLocation == null) return false;
// TODO: This is a bit ugly. It keeps around support for treating pathnames
// without preceding slashes as absolute paths, but possibly also works
// around the same quirks with basenames as in matchRoutes.
if (pathname.charAt(0) !== '/') {
pathname = '/' + pathname;
}
if (!pathIsActive(pathname, currentLocation.pathname)) {
// The path check is necessary and sufficient for indexOnly, but otherwise
// we still need to check the routes.
if (indexOnly || !routeIsActive(pathname, routes, params)) {
return false;
}
}
return queryIsActive(query, currentLocation.query);
}
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _Actions = __webpack_require__(12);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _createMemoryHistory = __webpack_require__(28);
var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
var _createTransitionManager = __webpack_require__(30);
var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
var _RouteUtils = __webpack_require__(5);
var _RouterUtils = __webpack_require__(27);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
/**
* A high-level API to be used for server-side rendering.
*
* This function matches a location to a set of routes and calls
* callback(error, redirectLocation, renderProps) when finished.
*
* Note: You probably don't want to use this in a browser unless you're using
* server-side rendering with async routes.
*/
function match(_ref, callback) {
var history = _ref.history,
routes = _ref.routes,
location = _ref.location,
options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']);
!(history || location) ? true ? (0, _invariant2.default)(false, 'match needs a history or a location') : (0, _invariant2.default)(false) : void 0;
history = history ? history : (0, _createMemoryHistory2.default)(options);
var transitionManager = (0, _createTransitionManager2.default)(history, (0, _RouteUtils.createRoutes)(routes));
if (location) {
// Allow match({ location: '/the/path', ... })
location = history.createLocation(location);
} else {
location = history.getCurrentLocation();
}
transitionManager.match(location, function (error, redirectLocation, nextState) {
var renderProps = void 0;
if (nextState) {
var router = (0, _RouterUtils.createRouterObject)(history, transitionManager, nextState);
renderProps = _extends({}, nextState, {
router: router,
matchContext: { transitionManager: transitionManager, router: router }
});
}
callback(error, redirectLocation && history.createLocation(redirectLocation, _Actions.REPLACE), renderProps);
});
}
exports.default = match;
/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = matchRoutes;
var _AsyncUtils = __webpack_require__(14);
var _PromiseUtils = __webpack_require__(25);
var _PatternUtils = __webpack_require__(8);
var _routerWarning = __webpack_require__(9);
var _routerWarning2 = _interopRequireDefault(_routerWarning);
var _RouteUtils = __webpack_require__(5);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getChildRoutes(route, location, paramNames, paramValues, callback) {
if (route.childRoutes) {
return [null, route.childRoutes];
}
if (!route.getChildRoutes) {
return [];
}
var sync = true,
result = void 0;
var partialNextState = {
location: location,
params: createParams(paramNames, paramValues)
};
var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) {
childRoutes = !error && (0, _RouteUtils.createRoutes)(childRoutes);
if (sync) {
result = [error, childRoutes];
return;
}
callback(error, childRoutes);
});
if ((0, _PromiseUtils.isPromise)(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {
return callback(null, (0, _RouteUtils.createRoutes)(childRoutes));
}, callback);
sync = false;
return result; // Might be undefined.
}
function getIndexRoute(route, location, paramNames, paramValues, callback) {
if (route.indexRoute) {
callback(null, route.indexRoute);
} else if (route.getIndexRoute) {
var partialNextState = {
location: location,
params: createParams(paramNames, paramValues)
};
var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) {
callback(error, !error && (0, _RouteUtils.createRoutes)(indexRoute)[0]);
});
if ((0, _PromiseUtils.isPromise)(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {
return callback(null, (0, _RouteUtils.createRoutes)(indexRoute)[0]);
}, callback);
} else if (route.childRoutes || route.getChildRoutes) {
var onChildRoutes = function onChildRoutes(error, childRoutes) {
if (error) {
callback(error);
return;
}
var pathless = childRoutes.filter(function (childRoute) {
return !childRoute.path;
});
(0, _AsyncUtils.loopAsync)(pathless.length, function (index, next, done) {
getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {
if (error || indexRoute) {
var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);
done(error, routes);
} else {
next();
}
});
}, function (err, routes) {
callback(null, routes);
});
};
var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);
if (result) {
onChildRoutes.apply(undefined, result);
}
} else {
callback();
}
}
function assignParams(params, paramNames, paramValues) {
return paramNames.reduce(function (params, paramName, index) {
var paramValue = paramValues && paramValues[index];
if (Array.isArray(params[paramName])) {
params[paramName].push(paramValue);
} else if (paramName in params) {
params[paramName] = [params[paramName], paramValue];
} else {
params[paramName] = paramValue;
}
return params;
}, params);
}
function createParams(paramNames, paramValues) {
return assignParams({}, paramNames, paramValues);
}
function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {
var pattern = route.path || '';
if (pattern.charAt(0) === '/') {
remainingPathname = location.pathname;
paramNames = [];
paramValues = [];
}
// Only try to match the path if the route actually has a pattern, and if
// we're not just searching for potential nested absolute paths.
if (remainingPathname !== null && pattern) {
try {
var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
if (matched) {
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
paramValues = [].concat(paramValues, matched.paramValues);
} else {
remainingPathname = null;
}
} catch (error) {
callback(error);
}
// By assumption, pattern is non-empty here, which is the prerequisite for
// actually terminating a match.
if (remainingPathname === '') {
var match = {
routes: [route],
params: createParams(paramNames, paramValues)
};
getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
if (error) {
callback(error);
} else {
if (Array.isArray(indexRoute)) {
var _match$routes;
true ? (0, _routerWarning2.default)(indexRoute.every(function (route) {
return !route.path;
}), 'Index routes should not have paths') : void 0;
(_match$routes = match.routes).push.apply(_match$routes, indexRoute);
} else if (indexRoute) {
true ? (0, _routerWarning2.default)(!indexRoute.path, 'Index routes should not have paths') : void 0;
match.routes.push(indexRoute);
}
callback(null, match);
}
});
return;
}
}
if (remainingPathname != null || route.childRoutes) {
// Either a) this route matched at least some of the path or b)
// we don't have to load this route's children asynchronously. In
// either case continue checking for matches in the subtree.
var onChildRoutes = function onChildRoutes(error, childRoutes) {
if (error) {
callback(error);
} else if (childRoutes) {
// Check the child routes to see if any of them match.
matchRoutes(childRoutes, location, function (error, match) {
if (error) {
callback(error);
} else if (match) {
// A child route matched! Augment the match and pass it up the stack.
match.routes.unshift(route);
callback(null, match);
} else {
callback();
}
}, remainingPathname, paramNames, paramValues);
} else {
callback();
}
};
var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);
if (result) {
onChildRoutes.apply(undefined, result);
}
} else {
callback();
}
}
/**
* Asynchronously matches the given location to a set of routes and calls
* callback(error, state) when finished. The state object will have the
* following properties:
*
* - routes An array of routes that matched, in hierarchical order
* - params An object of URL parameters
*
* Note: This operation may finish synchronously if no routes have an
* asynchronous getChildRoutes method.
*/
function matchRoutes(routes, location, callback, remainingPathname) {
var paramNames = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var paramValues = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];
if (remainingPathname === undefined) {
// TODO: This is a little bit ugly, but it works around a quirk in history
// that strips the leading slash from pathnames when using basenames with
// trailing slashes.
if (location.pathname.charAt(0) !== '/') {
location = _extends({}, location, {
pathname: '/' + location.pathname
});
}
remainingPathname = location.pathname;
}
(0, _AsyncUtils.loopAsync)(routes.length, function (index, next, done) {
matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {
if (error || match) {
done(error, match);
} else {
next();
}
});
}, callback);
}
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.default = withRouter;
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _react = __webpack_require__(4);
var _react2 = _interopRequireDefault(_react);
var _createReactClass = __webpack_require__(3);
var _createReactClass2 = _interopRequireDefault(_createReactClass);
var _hoistNonReactStatics = __webpack_require__(63);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _ContextUtils = __webpack_require__(15);
var _PropTypes = __webpack_require__(16);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
function withRouter(WrappedComponent, options) {
var withRef = options && options.withRef;
var WithRouter = (0, _createReactClass2.default)({
displayName: 'WithRouter',
mixins: [(0, _ContextUtils.ContextSubscriber)('router')],
contextTypes: { router: _PropTypes.routerShape },
propTypes: { router: _PropTypes.routerShape },
getWrappedInstance: function getWrappedInstance() {
!withRef ? true ? (0, _invariant2.default)(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : (0, _invariant2.default)(false) : void 0;
return this.wrappedInstance;
},
render: function render() {
var _this = this;
var router = this.props.router || this.context.router;
if (!router) {
return _react2.default.createElement(WrappedComponent, this.props);
}
var params = router.params,
location = router.location,
routes = router.routes;
var props = _extends({}, this.props, { router: router, params: params, location: location, routes: routes });
if (withRef) {
props.ref = function (c) {
_this.wrappedInstance = c;
};
}
return _react2.default.createElement(WrappedComponent, props);
}
});
WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';
WithRouter.WrappedComponent = WrappedComponent;
return (0, _hoistNonReactStatics2.default)(WithRouter, WrappedComponent);
}
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var _assign = __webpack_require__(22);
var emptyObject = __webpack_require__(54);
var _invariant = __webpack_require__(55);
if (true) {
var warning = __webpack_require__(56);
}
var MIXINS_KEY = 'mixins';
// Helper function to allow the creation of anonymous functions which do not
// have .name set to the name of the variable being assigned to.
function identity(fn) {
return fn;
}
var ReactPropTypeLocationNames;
if (true) {
ReactPropTypeLocationNames = {
prop: 'prop',
context: 'context',
childContext: 'child context'
};
} else {
ReactPropTypeLocationNames = {};
}
function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
/**
* Policies that describe methods in `ReactClassInterface`.
*/
var injectedMixins = [];
/**
* Composite components are higher-level components that compose other composite
* or host components.
*
* To create a new type of `ReactClass`, pass a specification of
* your new class to `React.createClass`. The only requirement of your class
* specification is that you implement a `render` method.
*
* var MyComponent = React.createClass({
* render: function() {
* return <div>Hello World</div>;
* }
* });
*
* The class specification supports a specific protocol of methods that have
* special meaning (e.g. `render`). See `ReactClassInterface` for
* more the comprehensive protocol. Any other properties and methods in the
* class specification will be available on the prototype.
*
* @interface ReactClassInterface
* @internal
*/
var ReactClassInterface = {
/**
* An array of Mixin objects to include when defining your component.
*
* @type {array}
* @optional
*/
mixins: 'DEFINE_MANY',
/**
* An object containing properties and methods that should be defined on
* the component's constructor instead of its prototype (static methods).
*
* @type {object}
* @optional
*/
statics: 'DEFINE_MANY',
/**
* Definition of prop types for this component.
*
* @type {object}
* @optional
*/
propTypes: 'DEFINE_MANY',
/**
* Definition of context types for this component.
*
* @type {object}
* @optional
*/
contextTypes: 'DEFINE_MANY',
/**
* Definition of context types this component sets for its children.
*
* @type {object}
* @optional
*/
childContextTypes: 'DEFINE_MANY',
// ==== Definition methods ====
/**
* Invoked when the component is mounted. Values in the mapping will be set on
* `this.props` if that prop is not specified (i.e. using an `in` check).
*
* This method is invoked before `getInitialState` and therefore cannot rely
* on `this.state` or use `this.setState`.
*
* @return {object}
* @optional
*/
getDefaultProps: 'DEFINE_MANY_MERGED',
/**
* Invoked once before the component is mounted. The return value will be used
* as the initial value of `this.state`.
*
* getInitialState: function() {
* return {
* isOn: false,
* fooBaz: new BazFoo()
* }
* }
*
* @return {object}
* @optional
*/
getInitialState: 'DEFINE_MANY_MERGED',
/**
* @return {object}
* @optional
*/
getChildContext: 'DEFINE_MANY_MERGED',
/**
* Uses props from `this.props` and state from `this.state` to render the
* structure of the component.
*
* No guarantees are made about when or how often this method is invoked, so
* it must not have side effects.
*
* render: function() {
* var name = this.props.name;
* return <div>Hello, {name}!</div>;
* }
*
* @return {ReactComponent}
* @required
*/
render: 'DEFINE_ONCE',
// ==== Delegate methods ====
/**
* Invoked when the component is initially created and about to be mounted.
* This may have side effects, but any external subscriptions or data created
* by this method must be cleaned up in `componentWillUnmount`.
*
* @optional
*/
componentWillMount: 'DEFINE_MANY',
/**
* Invoked when the component has been mounted and has a DOM representation.
* However, there is no guarantee that the DOM node is in the document.
*
* Use this as an opportunity to operate on the DOM when the component has
* been mounted (initialized and rendered) for the first time.
*
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidMount: 'DEFINE_MANY',
/**
* Invoked before the component receives new props.
*
* Use this as an opportunity to react to a prop transition by updating the
* state using `this.setState`. Current props are accessed via `this.props`.
*
* componentWillReceiveProps: function(nextProps, nextContext) {
* this.setState({
* likesIncreasing: nextProps.likeCount > this.props.likeCount
* });
* }
*
* NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
* transition may cause a state change, but the opposite is not true. If you
* need it, you are probably looking for `componentWillUpdate`.
*
* @param {object} nextProps
* @optional
*/
componentWillReceiveProps: 'DEFINE_MANY',
/**
* Invoked while deciding if the component should be updated as a result of
* receiving new props, state and/or context.
*
* Use this as an opportunity to `return false` when you're certain that the
* transition to the new props/state/context will not require a component
* update.
*
* shouldComponentUpdate: function(nextProps, nextState, nextContext) {
* return !equal(nextProps, this.props) ||
* !equal(nextState, this.state) ||
* !equal(nextContext, this.context);
* }
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @return {boolean} True if the component should update.
* @optional
*/
shouldComponentUpdate: 'DEFINE_ONCE',
/**
* Invoked when the component is about to update due to a transition from
* `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
* and `nextContext`.
*
* Use this as an opportunity to perform preparation before an update occurs.
*
* NOTE: You **cannot** use `this.setState()` in this method.
*
* @param {object} nextProps
* @param {?object} nextState
* @param {?object} nextContext
* @param {ReactReconcileTransaction} transaction
* @optional
*/
componentWillUpdate: 'DEFINE_MANY',
/**
* Invoked when the component's DOM representation has been updated.
*
* Use this as an opportunity to operate on the DOM when the component has
* been updated.
*
* @param {object} prevProps
* @param {?object} prevState
* @param {?object} prevContext
* @param {DOMElement} rootNode DOM element representing the component.
* @optional
*/
componentDidUpdate: 'DEFINE_MANY',
/**
* Invoked when the component is about to be removed from its parent and have
* its DOM representation destroyed.
*
* Use this as an opportunity to deallocate any external resources.
*
* NOTE: There is no `componentDidUnmount` since your component will have been
* destroyed by that point.
*
* @optional
*/
componentWillUnmount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillMount`.
*
* @optional
*/
UNSAFE_componentWillMount: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillReceiveProps`.
*
* @optional
*/
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
/**
* Replacement for (deprecated) `componentWillUpdate`.
*
* @optional
*/
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
// ==== Advanced methods ====
/**
* Updates the component's currently mounted DOM representation.
*
* By default, this implements React's rendering and reconciliation algorithm.
* Sophisticated clients may wish to override this.
*
* @param {ReactReconcileTransaction} transaction
* @internal
* @overridable
*/
updateComponent: 'OVERRIDE_BASE'
};
/**
* Similar to ReactClassInterface but for static methods.
*/
var ReactClassStaticInterface = {
/**
* This method is invoked after a component is instantiated and when it
* receives new props. Return an object to update state in response to
* prop changes. Return null to indicate no change to state.
*
* If an object is returned, its keys will be merged into the existing state.
*
* @return {object || null}
* @optional
*/
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
};
/**
* Mapping from class specification keys to special processing functions.
*
* Although these are declared like instance properties in the specification
* when defining classes using `React.createClass`, they are actually static
* and are accessible on the constructor instead of the prototype. Despite
* being static, they must be defined outside of the "statics" key under
* which all other static methods are defined.
*/
var RESERVED_SPEC_KEYS = {
displayName: function(Constructor, displayName) {
Constructor.displayName = displayName;
},
mixins: function(Constructor, mixins) {
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
mixSpecIntoComponent(Constructor, mixins[i]);
}
}
},
childContextTypes: function(Constructor, childContextTypes) {
if (true) {
validateTypeDef(Constructor, childContextTypes, 'childContext');
}
Constructor.childContextTypes = _assign(
{},
Constructor.childContextTypes,
childContextTypes
);
},
contextTypes: function(Constructor, contextTypes) {
if (true) {
validateTypeDef(Constructor, contextTypes, 'context');
}
Constructor.contextTypes = _assign(
{},
Constructor.contextTypes,
contextTypes
);
},
/**
* Special case getDefaultProps which should move into statics but requires
* automatic merging.
*/
getDefaultProps: function(Constructor, getDefaultProps) {
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps = createMergedResultFunction(
Constructor.getDefaultProps,
getDefaultProps
);
} else {
Constructor.getDefaultProps = getDefaultProps;
}
},
propTypes: function(Constructor, propTypes) {
if (true) {
validateTypeDef(Constructor, propTypes, 'prop');
}
Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
},
statics: function(Constructor, statics) {
mixStaticSpecIntoComponent(Constructor, statics);
},
autobind: function() {}
};
function validateTypeDef(Constructor, typeDef, location) {
for (var propName in typeDef) {
if (typeDef.hasOwnProperty(propName)) {
// use a warning instead of an _invariant so components
// don't show up in prod but only in __DEV__
if (true) {
warning(
typeof typeDef[propName] === 'function',
'%s: %s type `%s` is invalid; it must be a function, usually from ' +
'React.PropTypes.',
Constructor.displayName || 'ReactClass',
ReactPropTypeLocationNames[location],
propName
);
}
}
}
}
function validateMethodOverride(isAlreadyDefined, name) {
var specPolicy = ReactClassInterface.hasOwnProperty(name)
? ReactClassInterface[name]
: null;
// Disallow overriding of base class methods unless explicitly allowed.
if (ReactClassMixin.hasOwnProperty(name)) {
_invariant(
specPolicy === 'OVERRIDE_BASE',
'ReactClassInterface: You are attempting to override ' +
'`%s` from your class specification. Ensure that your method names ' +
'do not overlap with React methods.',
name
);
}
// Disallow defining methods more than once unless explicitly allowed.
if (isAlreadyDefined) {
_invariant(
specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
'ReactClassInterface: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be due ' +
'to a mixin.',
name
);
}
}
/**
* Mixin helper which handles policy validation and reserved
* specification keys when building React classes.
*/
function mixSpecIntoComponent(Constructor, spec) {
if (!spec) {
if (true) {
var typeofSpec = typeof spec;
var isMixinValid = typeofSpec === 'object' && spec !== null;
if (true) {
warning(
isMixinValid,
"%s: You're attempting to include a mixin that is either null " +
'or not an object. Check the mixins included by the component, ' +
'as well as any mixins they include themselves. ' +
'Expected object but got %s.',
Constructor.displayName || 'ReactClass',
spec === null ? null : typeofSpec
);
}
}
return;
}
_invariant(
typeof spec !== 'function',
"ReactClass: You're attempting to " +
'use a component class or function as a mixin. Instead, just use a ' +
'regular object.'
);
_invariant(
!isValidElement(spec),
"ReactClass: You're attempting to " +
'use a component as a mixin. Instead, just use a regular object.'
);
var proto = Constructor.prototype;
var autoBindPairs = proto.__reactAutoBindPairs;
// By handling mixins before any other properties, we ensure the same
// chaining order is applied to methods with DEFINE_MANY policy, whether
// mixins are listed before or after these methods in the spec.
if (spec.hasOwnProperty(MIXINS_KEY)) {
RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
}
for (var name in spec) {
if (!spec.hasOwnProperty(name)) {
continue;
}
if (name === MIXINS_KEY) {
// We have already handled mixins in a special case above.
continue;
}
var property = spec[name];
var isAlreadyDefined = proto.hasOwnProperty(name);
validateMethodOverride(isAlreadyDefined, name);
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
RESERVED_SPEC_KEYS[name](Constructor, property);
} else {
// Setup methods on prototype:
// The following member methods should not be automatically bound:
// 1. Expected ReactClass methods (in the "interface").
// 2. Overridden methods (that were mixed in).
var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
var isFunction = typeof property === 'function';
var shouldAutoBind =
isFunction &&
!isReactClassMethod &&
!isAlreadyDefined &&
spec.autobind !== false;
if (shouldAutoBind) {
autoBindPairs.push(name, property);
proto[name] = property;
} else {
if (isAlreadyDefined) {
var specPolicy = ReactClassInterface[name];
// These cases should already be caught by validateMethodOverride.
_invariant(
isReactClassMethod &&
(specPolicy === 'DEFINE_MANY_MERGED' ||
specPolicy === 'DEFINE_MANY'),
'ReactClass: Unexpected spec policy %s for key %s ' +
'when mixing in component specs.',
specPolicy,
name
);
// For methods which are defined more than once, call the existing
// methods before calling the new property, merging if appropriate.
if (specPolicy === 'DEFINE_MANY_MERGED') {
proto[name] = createMergedResultFunction(proto[name], property);
} else if (specPolicy === 'DEFINE_MANY') {
proto[name] = createChainedFunction(proto[name], property);
}
} else {
proto[name] = property;
if (true) {
// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
proto[name].displayName = spec.displayName + '_' + name;
}
}
}
}
}
}
}
function mixStaticSpecIntoComponent(Constructor, statics) {
if (!statics) {
return;
}
for (var name in statics) {
var property = statics[name];
if (!statics.hasOwnProperty(name)) {
continue;
}
var isReserved = name in RESERVED_SPEC_KEYS;
_invariant(
!isReserved,
'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.',
name
);
var isAlreadyDefined = name in Constructor;
if (isAlreadyDefined) {
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
? ReactClassStaticInterface[name]
: null;
_invariant(
specPolicy === 'DEFINE_MANY_MERGED',
'ReactClass: You are attempting to define ' +
'`%s` on your component more than once. This conflict may be ' +
'due to a mixin.',
name
);
Constructor[name] = createMergedResultFunction(Constructor[name], property);
return;
}
Constructor[name] = property;
}
}
/**
* Merge two objects, but throw if both contain the same key.
*
* @param {object} one The first object, which is mutated.
* @param {object} two The second object
* @return {object} one after it has been mutated to contain everything in two.
*/
function mergeIntoWithNoDuplicateKeys(one, two) {
_invariant(
one && two && typeof one === 'object' && typeof two === 'object',
'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
);
for (var key in two) {
if (two.hasOwnProperty(key)) {
_invariant(
one[key] === undefined,
'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.',
key
);
one[key] = two[key];
}
}
return one;
}
/**
* Creates a function that invokes two functions and merges their return values.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createMergedResultFunction(one, two) {
return function mergedResult() {
var a = one.apply(this, arguments);
var b = two.apply(this, arguments);
if (a == null) {
return b;
} else if (b == null) {
return a;
}
var c = {};
mergeIntoWithNoDuplicateKeys(c, a);
mergeIntoWithNoDuplicateKeys(c, b);
return c;
};
}
/**
* Creates a function that invokes two functions and ignores their return vales.
*
* @param {function} one Function to invoke first.
* @param {function} two Function to invoke second.
* @return {function} Function that invokes the two argument functions.
* @private
*/
function createChainedFunction(one, two) {
return function chainedFunction() {
one.apply(this, arguments);
two.apply(this, arguments);
};
}
/**
* Binds a method to the component.
*
* @param {object} component Component whose method is going to be bound.
* @param {function} method Method to be bound.
* @return {function} The bound method.
*/
function bindAutoBindMethod(component, method) {
var boundMethod = method.bind(component);
if (true) {
boundMethod.__reactBoundContext = component;
boundMethod.__reactBoundMethod = method;
boundMethod.__reactBoundArguments = null;
var componentName = component.constructor.displayName;
var _bind = boundMethod.bind;
boundMethod.bind = function(newThis) {
for (
var _len = arguments.length,
args = Array(_len > 1 ? _len - 1 : 0),
_key = 1;
_key < _len;
_key++
) {
args[_key - 1] = arguments[_key];
}
// User is trying to bind() an autobound method; we effectively will
// ignore the value of "this" that the user is trying to use, so
// let's warn.
if (newThis !== component && newThis !== null) {
if (true) {
warning(
false,
'bind(): React component methods may only be bound to the ' +
'component instance. See %s',
componentName
);
}
} else if (!args.length) {
if (true) {
warning(
false,
'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',
componentName
);
}
return boundMethod;
}
var reboundMethod = _bind.apply(boundMethod, arguments);
reboundMethod.__reactBoundContext = component;
reboundMethod.__reactBoundMethod = method;
reboundMethod.__reactBoundArguments = args;
return reboundMethod;
};
}
return boundMethod;
}
/**
* Binds all auto-bound methods in a component.
*
* @param {object} component Component whose method is going to be bound.
*/
function bindAutoBindMethods(component) {
var pairs = component.__reactAutoBindPairs;
for (var i = 0; i < pairs.length; i += 2) {
var autoBindKey = pairs[i];
var method = pairs[i + 1];
component[autoBindKey] = bindAutoBindMethod(component, method);
}
}
var IsMountedPreMixin = {
componentDidMount: function() {
this.__isMounted = true;
}
};
var IsMountedPostMixin = {
componentWillUnmount: function() {
this.__isMounted = false;
}
};
/**
* Add more to the ReactClass base class. These are all legacy features and
* therefore not already part of the modern ReactComponent.
*/
var ReactClassMixin = {
/**
* TODO: This will be deprecated because state should always keep a consistent
* type signature and the only use case for this, is to avoid that.
*/
replaceState: function(newState, callback) {
this.updater.enqueueReplaceState(this, newState, callback);
},
/**
* Checks whether or not this composite component is mounted.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function() {
if (true) {
warning(
this.__didWarnIsMounted,
'%s: isMounted is deprecated. Instead, make sure to clean up ' +
'subscriptions and pending requests in componentWillUnmount to ' +
'prevent memory leaks.',
(this.constructor && this.constructor.displayName) ||
this.name ||
'Component'
);
this.__didWarnIsMounted = true;
}
return !!this.__isMounted;
}
};
var ReactClassComponent = function() {};
_assign(
ReactClassComponent.prototype,
ReactComponent.prototype,
ReactClassMixin
);
/**
* Creates a composite component class given a class specification.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
*
* @param {object} spec Class specification (which must define `render`).
* @return {function} Component constructor function.
* @public
*/
function createClass(spec) {
// To keep our warnings more understandable, we'll use a little hack here to
// ensure that Constructor.name !== 'Constructor'. This makes sure we don't
// unnecessarily identify a class without displayName as 'Constructor'.
var Constructor = identity(function(props, context, updater) {
// This constructor gets overridden by mocks. The argument is used
// by mocks to assert on what gets mounted.
if (true) {
warning(
this instanceof Constructor,
'Something is calling a React component directly. Use a factory or ' +
'JSX instead. See: https://fb.me/react-legacyfactory'
);
}
// Wire up auto-binding
if (this.__reactAutoBindPairs.length) {
bindAutoBindMethods(this);
}
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
this.state = null;
// ReactClasses doesn't have constructors. Instead, they use the
// getInitialState and componentWillMount methods for initialization.
var initialState = this.getInitialState ? this.getInitialState() : null;
if (true) {
// We allow auto-mocks to proceed as if they're returning null.
if (
initialState === undefined &&
this.getInitialState._isMockFunction
) {
// This is probably bad practice. Consider warning here and
// deprecating this convenience.
initialState = null;
}
}
_invariant(
typeof initialState === 'object' && !Array.isArray(initialState),
'%s.getInitialState(): must return an object or null',
Constructor.displayName || 'ReactCompositeComponent'
);
this.state = initialState;
});
Constructor.prototype = new ReactClassComponent();
Constructor.prototype.constructor = Constructor;
Constructor.prototype.__reactAutoBindPairs = [];
injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
mixSpecIntoComponent(Constructor, IsMountedPreMixin);
mixSpecIntoComponent(Constructor, spec);
mixSpecIntoComponent(Constructor, IsMountedPostMixin);
// Initialize the defaultProps property after all mixins have been merged.
if (Constructor.getDefaultProps) {
Constructor.defaultProps = Constructor.getDefaultProps();
}
if (true) {
// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
// initializer or constructor respectively.
if (Constructor.getDefaultProps) {
Constructor.getDefaultProps.isReactClassApproved = {};
}
if (Constructor.prototype.getInitialState) {
Constructor.prototype.getInitialState.isReactClassApproved = {};
}
}
_invariant(
Constructor.prototype.render,
'createClass(...): Class specification must implement a `render` method.'
);
if (true) {
warning(
!Constructor.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.',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.componentWillRecieveProps,
'%s has a method called ' +
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
spec.displayName || 'A component'
);
warning(
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
'Did you mean UNSAFE_componentWillReceiveProps()?',
spec.displayName || 'A component'
);
}
// Reduce time spent doing lookups by setting these on the prototype.
for (var methodName in ReactClassInterface) {
if (!Constructor.prototype[methodName]) {
Constructor.prototype[methodName] = null;
}
}
return Constructor;
}
return createClass;
}
module.exports = factory;
/***/ }),
/* 53 */
/***/ (function(module, exports) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var emptyObject = {};
if (true) {
Object.freeze(emptyObject);
}
module.exports = emptyObject;
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (true) {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var emptyFunction = __webpack_require__(53);
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = emptyFunction;
if (true) {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
}
module.exports = warning;
/***/ }),
/* 57 */
/***/ (function(module, exports) {
"use strict";
exports.__esModule = true;
var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) {
var currentTurn = 0,
isDone = false;
var isSync = false,
hasNext = false,
doneArgs = void 0;
var done = function done() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
isDone = true;
if (isSync) {
// Iterate instead of recursing if possible.
doneArgs = args;
return;
}
callback.apply(undefined, args);
};
var next = function next() {
if (isDone) return;
hasNext = true;
if (isSync) return; // Iterate instead of recursing if possible.
isSync = true;
while (!isDone && currentTurn < turns && hasNext) {
hasNext = false;
work(currentTurn++, next, done);
}
isSync = false;
if (isDone) {
// This means the loop finished synchronously.
callback.apply(undefined, doneArgs);
return;
}
if (currentTurn >= turns && hasNext) {
isDone = true;
callback();
}
};
next();
};
/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;
var _BrowserProtocol = __webpack_require__(18);
Object.defineProperty(exports, 'getUserConfirmation', {
enumerable: true,
get: function get() {
return _BrowserProtocol.getUserConfirmation;
}
});
Object.defineProperty(exports, 'go', {
enumerable: true,
get: function get() {
return _BrowserProtocol.go;
}
});
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
var _LocationUtils = __webpack_require__(10);
var _DOMUtils = __webpack_require__(13);
var _DOMStateStorage = __webpack_require__(32);
var _PathUtils = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var HashChangeEvent = 'hashchange';
var getHashPath = function getHashPath() {
// We can't use window.location.hash here because it's not
// consistent across browsers - Firefox will pre-decode it!
var href = window.location.href;
var hashIndex = href.indexOf('#');
return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
};
var pushHashPath = function pushHashPath(path) {
return window.location.hash = path;
};
var replaceHashPath = function replaceHashPath(path) {
var hashIndex = window.location.href.indexOf('#');
window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path);
};
var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation(pathCoder, queryKey) {
var path = pathCoder.decodePath(getHashPath());
var key = (0, _PathUtils.getQueryStringValueFromPath)(path, queryKey);
var state = void 0;
if (key) {
path = (0, _PathUtils.stripQueryStringValueFromPath)(path, queryKey);
state = (0, _DOMStateStorage.readState)(key);
}
var init = (0, _PathUtils.parsePath)(path);
init.state = state;
return (0, _LocationUtils.createLocation)(init, undefined, key);
};
var prevLocation = void 0;
var startListener = exports.startListener = function startListener(listener, pathCoder, queryKey) {
var handleHashChange = function handleHashChange() {
var path = getHashPath();
var encodedPath = pathCoder.encodePath(path);
if (path !== encodedPath) {
// Always be sure we have a properly-encoded hash.
replaceHashPath(encodedPath);
} else {
var currentLocation = getCurrentLocation(pathCoder, queryKey);
if (prevLocation && currentLocation.key && prevLocation.key === currentLocation.key) return; // Ignore extraneous hashchange events
prevLocation = currentLocation;
listener(currentLocation);
}
};
// Ensure the hash is encoded properly.
var path = getHashPath();
var encodedPath = pathCoder.encodePath(path);
if (path !== encodedPath) replaceHashPath(encodedPath);
(0, _DOMUtils.addEventListener)(window, HashChangeEvent, handleHashChange);
return function () {
return (0, _DOMUtils.removeEventListener)(window, HashChangeEvent, handleHashChange);
};
};
var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) {
var state = location.state,
key = location.key;
var path = pathCoder.encodePath((0, _PathUtils.createPath)(location));
if (state !== undefined) {
path = (0, _PathUtils.addQueryStringValueToPath)(path, queryKey, key);
(0, _DOMStateStorage.saveState)(key, state);
}
prevLocation = location;
updateHash(path);
};
var pushLocation = exports.pushLocation = function pushLocation(location, pathCoder, queryKey) {
return updateLocation(location, pathCoder, queryKey, function (path) {
if (getHashPath() !== path) {
pushHashPath(path);
} else {
true ? (0, _warning2.default)(false, 'You cannot PUSH the same path using hash history') : void 0;
}
});
};
var replaceLocation = exports.replaceLocation = function replaceLocation(location, pathCoder, queryKey) {
return updateLocation(location, pathCoder, queryKey, function (path) {
if (getHashPath() !== path) replaceHashPath(path);
});
};
/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;
var _BrowserProtocol = __webpack_require__(18);
Object.defineProperty(exports, 'getUserConfirmation', {
enumerable: true,
get: function get() {
return _BrowserProtocol.getUserConfirmation;
}
});
Object.defineProperty(exports, 'go', {
enumerable: true,
get: function get() {
return _BrowserProtocol.go;
}
});
var _LocationUtils = __webpack_require__(10);
var _PathUtils = __webpack_require__(6);
var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {
return (0, _LocationUtils.createLocation)(window.location);
};
var pushLocation = exports.pushLocation = function pushLocation(location) {
window.location.href = (0, _PathUtils.createPath)(location);
return false; // Don't update location
};
var replaceLocation = exports.replaceLocation = function replaceLocation(location) {
window.location.replace((0, _PathUtils.createPath)(location));
return false; // Don't update location
};
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _ExecutionEnvironment = __webpack_require__(19);
var _BrowserProtocol = __webpack_require__(18);
var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol);
var _RefreshProtocol = __webpack_require__(59);
var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol);
var _DOMUtils = __webpack_require__(13);
var _createHistory = __webpack_require__(20);
var _createHistory2 = _interopRequireDefault(_createHistory);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates and returns a history object that uses HTML5's history API
* (pushState, replaceState, and the popstate event) to manage history.
* This is the recommended method of managing history in browsers because
* it provides the cleanest URLs.
*
* Note: In browsers that do not support the HTML5 history API full
* page reloads will be used to preserve clean URLs. You can force this
* behavior using { forceRefresh: true } in options.
*/
var createBrowserHistory = function createBrowserHistory() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
!_ExecutionEnvironment.canUseDOM ? true ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0;
var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)();
var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol;
var getUserConfirmation = Protocol.getUserConfirmation,
getCurrentLocation = Protocol.getCurrentLocation,
pushLocation = Protocol.pushLocation,
replaceLocation = Protocol.replaceLocation,
go = Protocol.go;
var history = (0, _createHistory2.default)(_extends({
getUserConfirmation: getUserConfirmation }, options, {
getCurrentLocation: getCurrentLocation,
pushLocation: pushLocation,
replaceLocation: replaceLocation,
go: go
}));
var listenerCount = 0,
stopListener = void 0;
var startListener = function startListener(listener, before) {
if (++listenerCount === 1) stopListener = BrowserProtocol.startListener(history.transitionTo);
var unlisten = before ? history.listenBefore(listener) : history.listen(listener);
return function () {
unlisten();
if (--listenerCount === 0) stopListener();
};
};
var listenBefore = function listenBefore(listener) {
return startListener(listener, true);
};
var listen = function listen(listener) {
return startListener(listener, false);
};
return _extends({}, history, {
listenBefore: listenBefore,
listen: listen
});
};
exports.default = createBrowserHistory;
/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _ExecutionEnvironment = __webpack_require__(19);
var _DOMUtils = __webpack_require__(13);
var _HashProtocol = __webpack_require__(58);
var HashProtocol = _interopRequireWildcard(_HashProtocol);
var _createHistory = __webpack_require__(20);
var _createHistory2 = _interopRequireDefault(_createHistory);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DefaultQueryKey = '_k';
var addLeadingSlash = function addLeadingSlash(path) {
return path.charAt(0) === '/' ? path : '/' + path;
};
var HashPathCoders = {
hashbang: {
encodePath: function encodePath(path) {
return path.charAt(0) === '!' ? path : '!' + path;
},
decodePath: function decodePath(path) {
return path.charAt(0) === '!' ? path.substring(1) : path;
}
},
noslash: {
encodePath: function encodePath(path) {
return path.charAt(0) === '/' ? path.substring(1) : path;
},
decodePath: addLeadingSlash
},
slash: {
encodePath: addLeadingSlash,
decodePath: addLeadingSlash
}
};
var createHashHistory = function createHashHistory() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
!_ExecutionEnvironment.canUseDOM ? true ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0;
var queryKey = options.queryKey,
hashType = options.hashType;
true ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\'t ' + 'use location state if you don\'t want a key in your URL query string') : void 0;
if (typeof queryKey !== 'string') queryKey = DefaultQueryKey;
if (hashType == null) hashType = 'slash';
if (!(hashType in HashPathCoders)) {
true ? (0, _warning2.default)(false, 'Invalid hash type: %s', hashType) : void 0;
hashType = 'slash';
}
var pathCoder = HashPathCoders[hashType];
var getUserConfirmation = HashProtocol.getUserConfirmation;
var getCurrentLocation = function getCurrentLocation() {
return HashProtocol.getCurrentLocation(pathCoder, queryKey);
};
var pushLocation = function pushLocation(location) {
return HashProtocol.pushLocation(location, pathCoder, queryKey);
};
var replaceLocation = function replaceLocation(location) {
return HashProtocol.replaceLocation(location, pathCoder, queryKey);
};
var history = (0, _createHistory2.default)(_extends({
getUserConfirmation: getUserConfirmation }, options, {
getCurrentLocation: getCurrentLocation,
pushLocation: pushLocation,
replaceLocation: replaceLocation,
go: HashProtocol.go
}));
var listenerCount = 0,
stopListener = void 0;
var startListener = function startListener(listener, before) {
if (++listenerCount === 1) stopListener = HashProtocol.startListener(history.transitionTo, pathCoder, queryKey);
var unlisten = before ? history.listenBefore(listener) : history.listen(listener);
return function () {
unlisten();
if (--listenerCount === 0) stopListener();
};
};
var listenBefore = function listenBefore(listener) {
return startListener(listener, true);
};
var listen = function listen(listener) {
return startListener(listener, false);
};
var goIsSupportedWithoutReload = (0, _DOMUtils.supportsGoWithoutReloadUsingHash)();
var go = function go(n) {
true ? (0, _warning2.default)(goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;
history.go(n);
};
var createHref = function createHref(path) {
return '#' + pathCoder.encodePath(history.createHref(path));
};
return _extends({}, history, {
listenBefore: listenBefore,
listen: listen,
go: go,
createHref: createHref
});
};
exports.default = createHashHistory;
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _warning = __webpack_require__(7);
var _warning2 = _interopRequireDefault(_warning);
var _invariant = __webpack_require__(1);
var _invariant2 = _interopRequireDefault(_invariant);
var _LocationUtils = __webpack_require__(10);
var _PathUtils = __webpack_require__(6);
var _createHistory = __webpack_require__(20);
var _createHistory2 = _interopRequireDefault(_createHistory);
var _Actions = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createStateStorage = function createStateStorage(entries) {
return entries.filter(function (entry) {
return entry.state;
}).reduce(function (memo, entry) {
memo[entry.key] = entry.state;
return memo;
}, {});
};
var createMemoryHistory = function createMemoryHistory() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (Array.isArray(options)) {
options = { entries: options };
} else if (typeof options === 'string') {
options = { entries: [options] };
}
var getCurrentLocation = function getCurrentLocation() {
var entry = entries[current];
var path = (0, _PathUtils.createPath)(entry);
var key = void 0,
state = void 0;
if (entry.key) {
key = entry.key;
state = readState(key);
}
var init = (0, _PathUtils.parsePath)(path);
return (0, _LocationUtils.createLocation)(_extends({}, init, { state: state }), undefined, key);
};
var canGo = function canGo(n) {
var index = current + n;
return index >= 0 && index < entries.length;
};
var go = function go(n) {
if (!n) return;
if (!canGo(n)) {
true ? (0, _warning2.default)(false, 'Cannot go(%s) there is not enough history', n) : void 0;
return;
}
current += n;
var currentLocation = getCurrentLocation();
// Change action to POP
history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP }));
};
var pushLocation = function pushLocation(location) {
current += 1;
if (current < entries.length) entries.splice(current);
entries.push(location);
saveState(location.key, location.state);
};
var replaceLocation = function replaceLocation(location) {
entries[current] = location;
saveState(location.key, location.state);
};
var history = (0, _createHistory2.default)(_extends({}, options, {
getCurrentLocation: getCurrentLocation,
pushLocation: pushLocation,
replaceLocation: replaceLocation,
go: go
}));
var _options = options,
entries = _options.entries,
current = _options.current;
if (typeof entries === 'string') {
entries = [entries];
} else if (!Array.isArray(entries)) {
entries = ['/'];
}
entries = entries.map(function (entry) {
return (0, _LocationUtils.createLocation)(entry);
});
if (current == null) {
current = entries.length - 1;
} else {
!(current >= 0 && current < entries.length) ? true ? (0, _invariant2.default)(false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : (0, _invariant2.default)(false) : void 0;
}
var storage = createStateStorage(entries);
var saveState = function saveState(key, state) {
return storage[key] = state;
};
var readState = function readState(key) {
return storage[key];
};
return _extends({}, history, {
canGo: canGo
});
};
exports.default = createMemoryHistory;
/***/ }),
/* 63 */
/***/ (function(module, exports) {
'use strict';
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var REACT_STATICS = {
childContextTypes: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try { // Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
return targetComponent;
}
return targetComponent;
}
module.exports = hoistNonReactStatics;
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var printWarning = function() {};
if (true) {
var ReactPropTypesSecret = __webpack_require__(35);
var loggedTypeFailures = {};
var has = Function.call.bind(Object.prototype.hasOwnProperty);
printWarning = function(text) {
var message = 'Warning: ' + text;
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
}
/**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if (true) {
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
if (typeof typeSpecs[typeSpecName] !== 'function') {
var err = Error(
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
);
err.name = 'Invariant Violation';
throw err;
}
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
if (error && !(error instanceof Error)) {
printWarning(
(componentName || 'React class') + ': type specification of ' +
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
'You may have forgotten to pass an argument to the type checker ' +
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
'shape all require an argument).'
);
}
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;
var stack = getStack ? getStack() : '';
printWarning(
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
);
}
}
}
}
}
/**
* Resets warning cache when testing.
*
* @private
*/
checkPropTypes.resetWarningCache = function() {
if (true) {
loggedTypeFailures = {};
}
}
module.exports = checkPropTypes;
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var ReactIs = __webpack_require__(23);
var assign = __webpack_require__(22);
var ReactPropTypesSecret = __webpack_require__(35);
var checkPropTypes = __webpack_require__(64);
var has = Function.call.bind(Object.prototype.hasOwnProperty);
var printWarning = function() {};
if (true) {
printWarning = function(text) {
var message = 'Warning: ' + text;
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
}
function emptyFunctionThatReturnsNull() {
return null;
}
module.exports = function(isValidElement, throwOnDirectAccess) {
/* global Symbol */
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
/**
* Returns the iterator method function contained on the iterable object.
*
* Be sure to invoke the function with the iterable as context:
*
* var iteratorFn = getIteratorFn(myIterable);
* if (iteratorFn) {
* var iterator = iteratorFn.call(myIterable);
* ...
* }
*
* @param {?object} maybeIterable
* @return {?function}
*/
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
/**
* Collection of methods that allow declaration and validation of props that are
* supplied to React components. Example usage:
*
* var Props = require('ReactPropTypes');
* var MyArticle = React.createClass({
* propTypes: {
* // An optional string prop named "description".
* description: Props.string,
*
* // A required enum prop named "category".
* category: Props.oneOf(['News','Photos']).isRequired,
*
* // A prop named "dialog" that requires an instance of Dialog.
* dialog: Props.instanceOf(Dialog).isRequired
* },
* render: function() { ... }
* });
*
* A more formal specification of how these methods are used:
*
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
* decl := ReactPropTypes.{type}(.isRequired)?
*
* Each and every declaration produces a function with the same signature. This
* allows the creation of custom validation functions. For example:
*
* var MyLink = React.createClass({
* propTypes: {
* // An optional string or URI prop named "href".
* href: function(props, propName, componentName) {
* var propValue = props[propName];
* if (propValue != null && typeof propValue !== 'string' &&
* !(propValue instanceof URI)) {
* return new Error(
* 'Expected a string or an URI for ' + propName + ' in ' +
* componentName
* );
* }
* }
* },
* render: function() {...}
* });
*
* @internal
*/
var ANONYMOUS = '<<anonymous>>';
// Important!
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
var ReactPropTypes = {
array: createPrimitiveTypeChecker('array'),
bool: createPrimitiveTypeChecker('boolean'),
func: createPrimitiveTypeChecker('function'),
number: createPrimitiveTypeChecker('number'),
object: createPrimitiveTypeChecker('object'),
string: createPrimitiveTypeChecker('string'),
symbol: createPrimitiveTypeChecker('symbol'),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
elementType: createElementTypeTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker,
exact: createStrictShapeTypeChecker,
};
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
*/
/*eslint-disable no-self-compare*/
function is(x, y) {
// SameValue algorithm
if (x === y) {
// Steps 1-5, 7-10
// Steps 6.b-6.e: +0 != -0
return x !== 0 || 1 / x === 1 / y;
} else {
// Step 6.a: NaN == NaN
return x !== x && y !== y;
}
}
/*eslint-enable no-self-compare*/
/**
* We use an Error-like object for backward compatibility as people may call
* PropTypes directly and inspect their output. However, we don't use real
* Errors anymore. We don't inspect their stack anyway, and creating them
* is prohibitively expensive if they are created too often, such as what
* happens in oneOfType() for any type before the one that matched.
*/
function PropTypeError(message) {
this.message = message;
this.stack = '';
}
// Make `instanceof Error` still work for returned errors.
PropTypeError.prototype = Error.prototype;
function createChainableTypeChecker(validate) {
if (true) {
var manualPropTypeCallCache = {};
var manualPropTypeWarningCount = 0;
}
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS;
propFullName = propFullName || propName;
if (secret !== ReactPropTypesSecret) {
if (throwOnDirectAccess) {
// New behavior only for users of `prop-types` package
var err = new Error(
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use `PropTypes.checkPropTypes()` to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
err.name = 'Invariant Violation';
throw err;
} else if (("development") !== 'production' && typeof console !== 'undefined') {
// Old behavior for people using React.PropTypes
var cacheKey = componentName + ':' + propName;
if (
!manualPropTypeCallCache[cacheKey] &&
// Avoid spamming the console because they are often not actionable except for lib authors
manualPropTypeWarningCount < 3
) {
printWarning(
'You are manually calling a React.PropTypes validation ' +
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
'and will throw in the standalone `prop-types` package. ' +
'You may be seeing this warning due to a third-party PropTypes ' +
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
);
manualPropTypeCallCache[cacheKey] = true;
manualPropTypeWarningCount++;
}
}
}
if (props[propName] == null) {
if (isRequired) {
if (props[propName] === null) {
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
}
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
}
return null;
} else {
return validate(props, propName, componentName, location, propFullName);
}
}
var chainedCheckType = checkType.bind(null, false);
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location, propFullName, secret) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== expectedType) {
// `propValue` being instance of, say, date/regexp, pass the 'object'
// check, but we can offer a more precise error message here rather than
// 'of type `object`'.
var preciseType = getPreciseType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
}
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
if (error instanceof Error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!isValidElement(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!ReactIs.isValidElementType(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location, propFullName) {
if (!(props[propName] instanceof expectedClass)) {
var expectedClassName = expectedClass.name || ANONYMOUS;
var actualClassName = getClassName(props[propName]);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createEnumTypeChecker(expectedValues) {
if (!Array.isArray(expectedValues)) {
if (true) {
if (arguments.length > 1) {
printWarning(
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
);
} else {
printWarning('Invalid argument supplied to oneOf, expected an array.');
}
}
return emptyFunctionThatReturnsNull;
}
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
for (var i = 0; i < expectedValues.length; i++) {
if (is(propValue, expectedValues[i])) {
return null;
}
}
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
var type = getPreciseType(value);
if (type === 'symbol') {
return String(value);
}
return value;
});
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
}
return createChainableTypeChecker(validate);
}
function createObjectOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
}
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
}
for (var key in propValue) {
if (has(propValue, key)) {
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error instanceof Error) {
return error;
}
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createUnionTypeChecker(arrayOfTypeCheckers) {
if (!Array.isArray(arrayOfTypeCheckers)) {
true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
return emptyFunctionThatReturnsNull;
}
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (typeof checker !== 'function') {
printWarning(
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
);
return emptyFunctionThatReturnsNull;
}
}
function validate(props, propName, componentName, location, propFullName) {
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
var checker = arrayOfTypeCheckers[i];
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
return null;
}
}
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
}
return createChainableTypeChecker(validate);
}
function createNodeChecker() {
function validate(props, propName, componentName, location, propFullName) {
if (!isNode(props[propName])) {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
for (var key in shapeTypes) {
var checker = shapeTypes[key];
if (!checker) {
continue;
}
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createStrictShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
// We need to check all keys in case some are required but missing from
// props.
var allKeys = assign({}, props[propName], shapeTypes);
for (var key in allKeys) {
var checker = shapeTypes[key];
if (!checker) {
return new PropTypeError(
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
);
}
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case 'number':
case 'string':
case 'undefined':
return true;
case 'boolean':
return !propValue;
case 'object':
if (Array.isArray(propValue)) {
return propValue.every(isNode);
}
if (propValue === null || isValidElement(propValue)) {
return true;
}
var iteratorFn = getIteratorFn(propValue);
if (iteratorFn) {
var iterator = iteratorFn.call(propValue);
var step;
if (iteratorFn !== propValue.entries) {
while (!(step = iterator.next()).done) {
if (!isNode(step.value)) {
return false;
}
}
} else {
// Iterator will provide entry [k,v] tuples rather than values.
while (!(step = iterator.next()).done) {
var entry = step.value;
if (entry) {
if (!isNode(entry[1])) {
return false;
}
}
}
}
} else {
return false;
}
return true;
default:
return false;
}
}
function isSymbol(propType, propValue) {
// Native Symbol.
if (propType === 'symbol') {
return true;
}
// falsy value can't be a Symbol
if (!propValue) {
return false;
}
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
if (propValue['@@toStringTag'] === 'Symbol') {
return true;
}
// Fallback for non-spec compliant Symbols which are polyfilled.
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
return true;
}
return false;
}
// Equivalent of `typeof` but with special handling for array and regexp.
function getPropType(propValue) {
var propType = typeof propValue;
if (Array.isArray(propValue)) {
return 'array';
}
if (propValue instanceof RegExp) {
// Old webkits (at least until Android 4.0) return 'function' rather than
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
// passes PropTypes.object.
return 'object';
}
if (isSymbol(propType, propValue)) {
return 'symbol';
}
return propType;
}
// This handles more types than `getPropType`. Only used for error messages.
// See `createPrimitiveTypeChecker`.
function getPreciseType(propValue) {
if (typeof propValue === 'undefined' || propValue === null) {
return '' + propValue;
}
var propType = getPropType(propValue);
if (propType === 'object') {
if (propValue instanceof Date) {
return 'date';
} else if (propValue instanceof RegExp) {
return 'regexp';
}
}
return propType;
}
// Returns a string that is postfixed to a warning about an invalid type.
// For example, "undefined" or "of type array"
function getPostfixForTypeWarning(value) {
var type = getPreciseType(value);
switch (type) {
case 'array':
case 'object':
return 'an ' + type;
case 'boolean':
case 'date':
case 'regexp':
return 'a ' + type;
default:
return type;
}
}
// Returns class name of the object, if any.
function getClassName(propValue) {
if (!propValue.constructor || !propValue.constructor.name) {
return ANONYMOUS;
}
return propValue.constructor.name;
}
ReactPropTypes.checkPropTypes = checkPropTypes;
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
var strictUriEncode = __webpack_require__(68);
var objectAssign = __webpack_require__(22);
function encoderForArrayFormat(opts) {
switch (opts.arrayFormat) {
case 'index':
return function (key, value, index) {
return value === null ? [
encode(key, opts),
'[',
index,
']'
].join('') : [
encode(key, opts),
'[',
encode(index, opts),
']=',
encode(value, opts)
].join('');
};
case 'bracket':
return function (key, value) {
return value === null ? encode(key, opts) : [
encode(key, opts),
'[]=',
encode(value, opts)
].join('');
};
default:
return function (key, value) {
return value === null ? encode(key, opts) : [
encode(key, opts),
'=',
encode(value, opts)
].join('');
};
}
}
function parserForArrayFormat(opts) {
var result;
switch (opts.arrayFormat) {
case 'index':
return function (key, value, accumulator) {
result = /\[(\d*)\]$/.exec(key);
key = key.replace(/\[\d*\]$/, '');
if (!result) {
accumulator[key] = value;
return;
}
if (accumulator[key] === undefined) {
accumulator[key] = {};
}
accumulator[key][result[1]] = value;
};
case 'bracket':
return function (key, value, accumulator) {
result = /(\[\])$/.exec(key);
key = key.replace(/\[\]$/, '');
if (!result) {
accumulator[key] = value;
return;
} else if (accumulator[key] === undefined) {
accumulator[key] = [value];
return;
}
accumulator[key] = [].concat(accumulator[key], value);
};
default:
return function (key, value, accumulator) {
if (accumulator[key] === undefined) {
accumulator[key] = value;
return;
}
accumulator[key] = [].concat(accumulator[key], value);
};
}
}
function encode(value, opts) {
if (opts.encode) {
return opts.strict ? strictUriEncode(value) : encodeURIComponent(value);
}
return value;
}
function keysSorter(input) {
if (Array.isArray(input)) {
return input.sort();
} else if (typeof input === 'object') {
return keysSorter(Object.keys(input)).sort(function (a, b) {
return Number(a) - Number(b);
}).map(function (key) {
return input[key];
});
}
return input;
}
exports.extract = function (str) {
return str.split('?')[1] || '';
};
exports.parse = function (str, opts) {
opts = objectAssign({arrayFormat: 'none'}, opts);
var formatter = parserForArrayFormat(opts);
// Create an object with no prototype
// https://github.com/sindresorhus/query-string/issues/47
var ret = Object.create(null);
if (typeof str !== 'string') {
return ret;
}
str = str.trim().replace(/^(\?|#|&)/, '');
if (!str) {
return ret;
}
str.split('&').forEach(function (param) {
var parts = param.replace(/\+/g, ' ').split('=');
// Firefox (pre 40) decodes `%3D` to `=`
// https://github.com/sindresorhus/query-string/pull/37
var key = parts.shift();
var val = parts.length > 0 ? parts.join('=') : undefined;
// missing `=` should be `null`:
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
val = val === undefined ? null : decodeURIComponent(val);
formatter(decodeURIComponent(key), val, ret);
});
return Object.keys(ret).sort().reduce(function (result, key) {
var val = ret[key];
if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {
// Sort object keys, not values
result[key] = keysSorter(val);
} else {
result[key] = val;
}
return result;
}, Object.create(null));
};
exports.stringify = function (obj, opts) {
var defaults = {
encode: true,
strict: true,
arrayFormat: 'none'
};
opts = objectAssign(defaults, opts);
var formatter = encoderForArrayFormat(opts);
return obj ? Object.keys(obj).sort().map(function (key) {
var val = obj[key];
if (val === undefined) {
return '';
}
if (val === null) {
return encode(key, opts);
}
if (Array.isArray(val)) {
var result = [];
val.slice().forEach(function (val2) {
if (val2 === undefined) {
return;
}
result.push(formatter(key, val2, result.length));
});
return result.join('&');
}
return encode(key, opts) + '=' + encode(val, opts);
}).filter(function (x) {
return x.length > 0;
}).join('&') : '';
};
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
/** @license React v16.8.6
* react-is.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
if (true) {
(function() {
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
function isValidElementType(type) {
return typeof type === 'string' || typeof type === 'function' ||
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
}
/**
* Forked from fbjs/warning:
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
*
* Only change is we use console.warn instead of console.error,
* and do nothing when 'console' is not supported.
* This really simplifies the code.
* ---
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var lowPriorityWarning = function () {};
{
var printWarning = function (format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.warn(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
lowPriorityWarning = function (condition, format) {
if (format === undefined) {
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
}
var lowPriorityWarning$1 = lowPriorityWarning;
function typeOf(object) {
if (typeof object === 'object' && object !== null) {
var $$typeof = object.$$typeof;
switch ($$typeof) {
case REACT_ELEMENT_TYPE:
var type = object.type;
switch (type) {
case REACT_ASYNC_MODE_TYPE:
case REACT_CONCURRENT_MODE_TYPE:
case REACT_FRAGMENT_TYPE:
case REACT_PROFILER_TYPE:
case REACT_STRICT_MODE_TYPE:
case REACT_SUSPENSE_TYPE:
return type;
default:
var $$typeofType = type && type.$$typeof;
switch ($$typeofType) {
case REACT_CONTEXT_TYPE:
case REACT_FORWARD_REF_TYPE:
case REACT_PROVIDER_TYPE:
return $$typeofType;
default:
return $$typeof;
}
}
case REACT_LAZY_TYPE:
case REACT_MEMO_TYPE:
case REACT_PORTAL_TYPE:
return $$typeof;
}
}
return undefined;
}
// AsyncMode is deprecated along with isAsyncMode
var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
// AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true;
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
}
}
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
return typeOf(object) === REACT_SUSPENSE_TYPE;
}
exports.typeOf = typeOf;
exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isValidElementType = isValidElementType;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
})();
}
/***/ }),
/* 68 */
/***/ (function(module, exports) {
'use strict';
module.exports = function (str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase();
});
};
/***/ })
/******/ ])
});
; |
"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
(function () {
var root = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var ice = root.ice || {};
root.IceGrid = root.IceGrid || {};
ice.IceGrid = root.IceGrid;
var Slice = Ice.Slice;
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Descriptor.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
Slice.defineDictionary(IceGrid, "StringStringDict", "StringStringDictHelper", "Ice.StringHelper", "Ice.StringHelper", false, undefined, undefined);
/**
* Property descriptor.
*
**/
IceGrid.PropertyDescriptor =
/*#__PURE__*/
function () {
function _class() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class);
this.name = name;
this.value = value;
}
_createClass(_class, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.value);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.value = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 2;
}
}]);
return _class;
}();
Slice.defineStruct(IceGrid.PropertyDescriptor, true, true);
Slice.defineSequence(IceGrid, "PropertyDescriptorSeqHelper", "IceGrid.PropertyDescriptor", false);
/**
* A property set descriptor.
*
**/
IceGrid.PropertySetDescriptor =
/*#__PURE__*/
function () {
function _class2() {
var references = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
_classCallCheck(this, _class2);
this.references = references;
this.properties = properties;
}
_createClass(_class2, [{
key: "_write",
value: function _write(ostr) {
Ice.StringSeqHelper.write(ostr, this.references);
IceGrid.PropertyDescriptorSeqHelper.write(ostr, this.properties);
}
}, {
key: "_read",
value: function _read(istr) {
this.references = Ice.StringSeqHelper.read(istr);
this.properties = IceGrid.PropertyDescriptorSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 2;
}
}]);
return _class2;
}();
Slice.defineStruct(IceGrid.PropertySetDescriptor, true, true);
Slice.defineDictionary(IceGrid, "PropertySetDescriptorDict", "PropertySetDescriptorDictHelper", "Ice.StringHelper", "IceGrid.PropertySetDescriptor", false, undefined, undefined);
/**
* An Ice object descriptor.
*
**/
IceGrid.ObjectDescriptor =
/*#__PURE__*/
function () {
function _class3() {
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Ice.Identity();
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var proxyOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class3);
this.id = id;
this.type = type;
this.proxyOptions = proxyOptions;
}
_createClass(_class3, [{
key: "_write",
value: function _write(ostr) {
Ice.Identity.write(ostr, this.id);
ostr.writeString(this.type);
ostr.writeString(this.proxyOptions);
}
}, {
key: "_read",
value: function _read(istr) {
this.id = Ice.Identity.read(istr, this.id);
this.type = istr.readString();
this.proxyOptions = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 4;
}
}]);
return _class3;
}();
Slice.defineStruct(IceGrid.ObjectDescriptor, true, true);
Slice.defineSequence(IceGrid, "ObjectDescriptorSeqHelper", "IceGrid.ObjectDescriptor", false);
/**
* An Ice object adapter descriptor.
*
**/
IceGrid.AdapterDescriptor =
/*#__PURE__*/
function () {
function _class4() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
var replicaGroupId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
var priority = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
var registerProcess = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
var serverLifetime = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
var objects = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
var allocatables = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
_classCallCheck(this, _class4);
this.name = name;
this.description = description;
this.id = id;
this.replicaGroupId = replicaGroupId;
this.priority = priority;
this.registerProcess = registerProcess;
this.serverLifetime = serverLifetime;
this.objects = objects;
this.allocatables = allocatables;
}
_createClass(_class4, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.description);
ostr.writeString(this.id);
ostr.writeString(this.replicaGroupId);
ostr.writeString(this.priority);
ostr.writeBool(this.registerProcess);
ostr.writeBool(this.serverLifetime);
IceGrid.ObjectDescriptorSeqHelper.write(ostr, this.objects);
IceGrid.ObjectDescriptorSeqHelper.write(ostr, this.allocatables);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.description = istr.readString();
this.id = istr.readString();
this.replicaGroupId = istr.readString();
this.priority = istr.readString();
this.registerProcess = istr.readBool();
this.serverLifetime = istr.readBool();
this.objects = IceGrid.ObjectDescriptorSeqHelper.read(istr);
this.allocatables = IceGrid.ObjectDescriptorSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 9;
}
}]);
return _class4;
}();
Slice.defineStruct(IceGrid.AdapterDescriptor, true, true);
Slice.defineSequence(IceGrid, "AdapterDescriptorSeqHelper", "IceGrid.AdapterDescriptor", false);
/**
* A Freeze database environment descriptor.
*
**/
IceGrid.DbEnvDescriptor =
/*#__PURE__*/
function () {
function _class5() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var dbHome = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
var properties = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
_classCallCheck(this, _class5);
this.name = name;
this.description = description;
this.dbHome = dbHome;
this.properties = properties;
}
_createClass(_class5, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.description);
ostr.writeString(this.dbHome);
IceGrid.PropertyDescriptorSeqHelper.write(ostr, this.properties);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.description = istr.readString();
this.dbHome = istr.readString();
this.properties = IceGrid.PropertyDescriptorSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 4;
}
}]);
return _class5;
}();
Slice.defineStruct(IceGrid.DbEnvDescriptor, true, true);
Slice.defineSequence(IceGrid, "DbEnvDescriptorSeqHelper", "IceGrid.DbEnvDescriptor", false);
var iceC_IceGrid_CommunicatorDescriptor_ids = ["::Ice::Object", "::IceGrid::CommunicatorDescriptor"];
/**
* A communicator descriptor.
*
**/
IceGrid.CommunicatorDescriptor =
/*#__PURE__*/
function (_Ice$Value) {
_inherits(_class6, _Ice$Value);
function _class6() {
var _this;
var adapters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var propertySet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new IceGrid.PropertySetDescriptor();
var dbEnvs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var logs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var description = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
_classCallCheck(this, _class6);
_this = _possibleConstructorReturn(this, _getPrototypeOf(_class6).call(this));
_this.adapters = adapters;
_this.propertySet = propertySet;
_this.dbEnvs = dbEnvs;
_this.logs = logs;
_this.description = description;
return _this;
}
_createClass(_class6, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
IceGrid.AdapterDescriptorSeqHelper.write(ostr, this.adapters);
IceGrid.PropertySetDescriptor.write(ostr, this.propertySet);
IceGrid.DbEnvDescriptorSeqHelper.write(ostr, this.dbEnvs);
Ice.StringSeqHelper.write(ostr, this.logs);
ostr.writeString(this.description);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.adapters = IceGrid.AdapterDescriptorSeqHelper.read(istr);
this.propertySet = IceGrid.PropertySetDescriptor.read(istr, this.propertySet);
this.dbEnvs = IceGrid.DbEnvDescriptorSeqHelper.read(istr);
this.logs = Ice.StringSeqHelper.read(istr);
this.description = istr.readString();
}
}]);
return _class6;
}(Ice.Value);
Slice.defineValue(IceGrid.CommunicatorDescriptor, iceC_IceGrid_CommunicatorDescriptor_ids[1], false);
/**
* A distribution descriptor defines an IcePatch2 server and the
* directories to retrieve from the patch server.
*
**/
IceGrid.DistributionDescriptor =
/*#__PURE__*/
function () {
function _class7() {
var icepatch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var directories = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
_classCallCheck(this, _class7);
this.icepatch = icepatch;
this.directories = directories;
}
_createClass(_class7, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.icepatch);
Ice.StringSeqHelper.write(ostr, this.directories);
}
}, {
key: "_read",
value: function _read(istr) {
this.icepatch = istr.readString();
this.directories = Ice.StringSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 2;
}
}]);
return _class7;
}();
Slice.defineStruct(IceGrid.DistributionDescriptor, true, true);
var iceC_IceGrid_ServerDescriptor_ids = ["::Ice::Object", "::IceGrid::CommunicatorDescriptor", "::IceGrid::ServerDescriptor"];
/**
* An Ice server descriptor.
*
**/
IceGrid.ServerDescriptor =
/*#__PURE__*/
function (_IceGrid$Communicator) {
_inherits(_class8, _IceGrid$Communicator);
function _class8(adapters, propertySet, dbEnvs, logs, description) {
var _this2;
var id = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
var exe = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "";
var iceVersion = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "";
var pwd = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : "";
var options = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
var envs = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : null;
var activation = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : "";
var activationTimeout = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : "";
var deactivationTimeout = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : "";
var applicationDistrib = arguments.length > 14 && arguments[14] !== undefined ? arguments[14] : false;
var distrib = arguments.length > 15 && arguments[15] !== undefined ? arguments[15] : new IceGrid.DistributionDescriptor();
var allocatable = arguments.length > 16 && arguments[16] !== undefined ? arguments[16] : false;
var user = arguments.length > 17 && arguments[17] !== undefined ? arguments[17] : "";
_classCallCheck(this, _class8);
_this2 = _possibleConstructorReturn(this, _getPrototypeOf(_class8).call(this, adapters, propertySet, dbEnvs, logs, description));
_this2.id = id;
_this2.exe = exe;
_this2.iceVersion = iceVersion;
_this2.pwd = pwd;
_this2.options = options;
_this2.envs = envs;
_this2.activation = activation;
_this2.activationTimeout = activationTimeout;
_this2.deactivationTimeout = deactivationTimeout;
_this2.applicationDistrib = applicationDistrib;
_this2.distrib = distrib;
_this2.allocatable = allocatable;
_this2.user = user;
return _this2;
}
_createClass(_class8, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
ostr.writeString(this.id);
ostr.writeString(this.exe);
ostr.writeString(this.iceVersion);
ostr.writeString(this.pwd);
Ice.StringSeqHelper.write(ostr, this.options);
Ice.StringSeqHelper.write(ostr, this.envs);
ostr.writeString(this.activation);
ostr.writeString(this.activationTimeout);
ostr.writeString(this.deactivationTimeout);
ostr.writeBool(this.applicationDistrib);
IceGrid.DistributionDescriptor.write(ostr, this.distrib);
ostr.writeBool(this.allocatable);
ostr.writeString(this.user);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.id = istr.readString();
this.exe = istr.readString();
this.iceVersion = istr.readString();
this.pwd = istr.readString();
this.options = Ice.StringSeqHelper.read(istr);
this.envs = Ice.StringSeqHelper.read(istr);
this.activation = istr.readString();
this.activationTimeout = istr.readString();
this.deactivationTimeout = istr.readString();
this.applicationDistrib = istr.readBool();
this.distrib = IceGrid.DistributionDescriptor.read(istr, this.distrib);
this.allocatable = istr.readBool();
this.user = istr.readString();
}
}]);
return _class8;
}(IceGrid.CommunicatorDescriptor);
Slice.defineValue(IceGrid.ServerDescriptor, iceC_IceGrid_ServerDescriptor_ids[2], false);
Slice.defineSequence(IceGrid, "ServerDescriptorSeqHelper", "Ice.ObjectHelper", false, "IceGrid.ServerDescriptor");
var iceC_IceGrid_ServiceDescriptor_ids = ["::Ice::Object", "::IceGrid::CommunicatorDescriptor", "::IceGrid::ServiceDescriptor"];
/**
* An IceBox service descriptor.
*
**/
IceGrid.ServiceDescriptor =
/*#__PURE__*/
function (_IceGrid$Communicator2) {
_inherits(_class9, _IceGrid$Communicator2);
function _class9(adapters, propertySet, dbEnvs, logs, description) {
var _this3;
var name = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
var entry = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "";
_classCallCheck(this, _class9);
_this3 = _possibleConstructorReturn(this, _getPrototypeOf(_class9).call(this, adapters, propertySet, dbEnvs, logs, description));
_this3.name = name;
_this3.entry = entry;
return _this3;
}
_createClass(_class9, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.entry);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.name = istr.readString();
this.entry = istr.readString();
}
}]);
return _class9;
}(IceGrid.CommunicatorDescriptor);
Slice.defineValue(IceGrid.ServiceDescriptor, iceC_IceGrid_ServiceDescriptor_ids[2], false);
Slice.defineSequence(IceGrid, "ServiceDescriptorSeqHelper", "Ice.ObjectHelper", false, "IceGrid.ServiceDescriptor");
/**
* A server template instance descriptor.
*
**/
IceGrid.ServerInstanceDescriptor =
/*#__PURE__*/
function () {
function _class10() {
var template = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var parameterValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var propertySet = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new IceGrid.PropertySetDescriptor();
var servicePropertySets = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
_classCallCheck(this, _class10);
this.template = template;
this.parameterValues = parameterValues;
this.propertySet = propertySet;
this.servicePropertySets = servicePropertySets;
}
_createClass(_class10, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.template);
IceGrid.StringStringDictHelper.write(ostr, this.parameterValues);
IceGrid.PropertySetDescriptor.write(ostr, this.propertySet);
IceGrid.PropertySetDescriptorDictHelper.write(ostr, this.servicePropertySets);
}
}, {
key: "_read",
value: function _read(istr) {
this.template = istr.readString();
this.parameterValues = IceGrid.StringStringDictHelper.read(istr);
this.propertySet = IceGrid.PropertySetDescriptor.read(istr, this.propertySet);
this.servicePropertySets = IceGrid.PropertySetDescriptorDictHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 5;
}
}]);
return _class10;
}();
Slice.defineStruct(IceGrid.ServerInstanceDescriptor, false, true);
Slice.defineSequence(IceGrid, "ServerInstanceDescriptorSeqHelper", "IceGrid.ServerInstanceDescriptor", false);
/**
* A template descriptor for server or service templates.
*
**/
IceGrid.TemplateDescriptor =
/*#__PURE__*/
function () {
function _class11() {
var descriptor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var parameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var parameterDefaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
_classCallCheck(this, _class11);
this.descriptor = descriptor;
this.parameters = parameters;
this.parameterDefaults = parameterDefaults;
}
_createClass(_class11, [{
key: "_write",
value: function _write(ostr) {
ostr.writeValue(this.descriptor);
Ice.StringSeqHelper.write(ostr, this.parameters);
IceGrid.StringStringDictHelper.write(ostr, this.parameterDefaults);
}
}, {
key: "_read",
value: function _read(istr) {
var _this4 = this;
istr.readValue(function (obj) {
return _this4.descriptor = obj;
}, IceGrid.CommunicatorDescriptor);
this.parameters = Ice.StringSeqHelper.read(istr);
this.parameterDefaults = IceGrid.StringStringDictHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 3;
}
}]);
return _class11;
}();
Slice.defineStruct(IceGrid.TemplateDescriptor, false, true);
Slice.defineDictionary(IceGrid, "TemplateDescriptorDict", "TemplateDescriptorDictHelper", "Ice.StringHelper", "IceGrid.TemplateDescriptor", false, undefined, undefined);
/**
* A service template instance descriptor.
*
**/
IceGrid.ServiceInstanceDescriptor =
/*#__PURE__*/
function () {
function _class12() {
var template = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var parameterValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var descriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var propertySet = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new IceGrid.PropertySetDescriptor();
_classCallCheck(this, _class12);
this.template = template;
this.parameterValues = parameterValues;
this.descriptor = descriptor;
this.propertySet = propertySet;
}
_createClass(_class12, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.template);
IceGrid.StringStringDictHelper.write(ostr, this.parameterValues);
ostr.writeValue(this.descriptor);
IceGrid.PropertySetDescriptor.write(ostr, this.propertySet);
}
}, {
key: "_read",
value: function _read(istr) {
var _this5 = this;
this.template = istr.readString();
this.parameterValues = IceGrid.StringStringDictHelper.read(istr);
istr.readValue(function (obj) {
return _this5.descriptor = obj;
}, IceGrid.ServiceDescriptor);
this.propertySet = IceGrid.PropertySetDescriptor.read(istr, this.propertySet);
}
}], [{
key: "minWireSize",
get: function get() {
return 5;
}
}]);
return _class12;
}();
Slice.defineStruct(IceGrid.ServiceInstanceDescriptor, false, true);
Slice.defineSequence(IceGrid, "ServiceInstanceDescriptorSeqHelper", "IceGrid.ServiceInstanceDescriptor", false);
var iceC_IceGrid_IceBoxDescriptor_ids = ["::Ice::Object", "::IceGrid::CommunicatorDescriptor", "::IceGrid::IceBoxDescriptor", "::IceGrid::ServerDescriptor"];
/**
* An IceBox server descriptor.
*
**/
IceGrid.IceBoxDescriptor =
/*#__PURE__*/
function (_IceGrid$ServerDescri) {
_inherits(_class13, _IceGrid$ServerDescri);
function _class13(adapters, propertySet, dbEnvs, logs, description, id, exe, iceVersion, pwd, options, envs, activation, activationTimeout, deactivationTimeout, applicationDistrib, distrib, allocatable, user) {
var _this6;
var services = arguments.length > 18 && arguments[18] !== undefined ? arguments[18] : null;
_classCallCheck(this, _class13);
_this6 = _possibleConstructorReturn(this, _getPrototypeOf(_class13).call(this, adapters, propertySet, dbEnvs, logs, description, id, exe, iceVersion, pwd, options, envs, activation, activationTimeout, deactivationTimeout, applicationDistrib, distrib, allocatable, user));
_this6.services = services;
return _this6;
}
_createClass(_class13, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
IceGrid.ServiceInstanceDescriptorSeqHelper.write(ostr, this.services);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.services = IceGrid.ServiceInstanceDescriptorSeqHelper.read(istr);
}
}]);
return _class13;
}(IceGrid.ServerDescriptor);
Slice.defineValue(IceGrid.IceBoxDescriptor, iceC_IceGrid_IceBoxDescriptor_ids[2], false);
/**
* A node descriptor.
*
**/
IceGrid.NodeDescriptor =
/*#__PURE__*/
function () {
function _class14() {
var variables = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var serverInstances = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var servers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var loadFactor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
var description = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
var propertySets = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
_classCallCheck(this, _class14);
this.variables = variables;
this.serverInstances = serverInstances;
this.servers = servers;
this.loadFactor = loadFactor;
this.description = description;
this.propertySets = propertySets;
}
_createClass(_class14, [{
key: "_write",
value: function _write(ostr) {
IceGrid.StringStringDictHelper.write(ostr, this.variables);
IceGrid.ServerInstanceDescriptorSeqHelper.write(ostr, this.serverInstances);
IceGrid.ServerDescriptorSeqHelper.write(ostr, this.servers);
ostr.writeString(this.loadFactor);
ostr.writeString(this.description);
IceGrid.PropertySetDescriptorDictHelper.write(ostr, this.propertySets);
}
}, {
key: "_read",
value: function _read(istr) {
this.variables = IceGrid.StringStringDictHelper.read(istr);
this.serverInstances = IceGrid.ServerInstanceDescriptorSeqHelper.read(istr);
this.servers = IceGrid.ServerDescriptorSeqHelper.read(istr);
this.loadFactor = istr.readString();
this.description = istr.readString();
this.propertySets = IceGrid.PropertySetDescriptorDictHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 6;
}
}]);
return _class14;
}();
Slice.defineStruct(IceGrid.NodeDescriptor, false, true);
Slice.defineDictionary(IceGrid, "NodeDescriptorDict", "NodeDescriptorDictHelper", "Ice.StringHelper", "IceGrid.NodeDescriptor", false, undefined, undefined);
var iceC_IceGrid_LoadBalancingPolicy_ids = ["::Ice::Object", "::IceGrid::LoadBalancingPolicy"];
/**
* A base class for load balancing policies.
*
**/
IceGrid.LoadBalancingPolicy =
/*#__PURE__*/
function (_Ice$Value2) {
_inherits(_class15, _Ice$Value2);
function _class15() {
var _this7;
var nReplicas = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
_classCallCheck(this, _class15);
_this7 = _possibleConstructorReturn(this, _getPrototypeOf(_class15).call(this));
_this7.nReplicas = nReplicas;
return _this7;
}
_createClass(_class15, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
ostr.writeString(this.nReplicas);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.nReplicas = istr.readString();
}
}]);
return _class15;
}(Ice.Value);
Slice.defineValue(IceGrid.LoadBalancingPolicy, iceC_IceGrid_LoadBalancingPolicy_ids[1], false);
var iceC_IceGrid_RandomLoadBalancingPolicy_ids = ["::Ice::Object", "::IceGrid::LoadBalancingPolicy", "::IceGrid::RandomLoadBalancingPolicy"];
/**
* Random load balancing policy.
*
**/
IceGrid.RandomLoadBalancingPolicy =
/*#__PURE__*/
function (_IceGrid$LoadBalancin) {
_inherits(_class16, _IceGrid$LoadBalancin);
function _class16(nReplicas) {
_classCallCheck(this, _class16);
return _possibleConstructorReturn(this, _getPrototypeOf(_class16).call(this, nReplicas));
}
return _class16;
}(IceGrid.LoadBalancingPolicy);
Slice.defineValue(IceGrid.RandomLoadBalancingPolicy, iceC_IceGrid_RandomLoadBalancingPolicy_ids[2], false);
var iceC_IceGrid_OrderedLoadBalancingPolicy_ids = ["::Ice::Object", "::IceGrid::LoadBalancingPolicy", "::IceGrid::OrderedLoadBalancingPolicy"];
/**
* Ordered load balancing policy.
*
**/
IceGrid.OrderedLoadBalancingPolicy =
/*#__PURE__*/
function (_IceGrid$LoadBalancin2) {
_inherits(_class17, _IceGrid$LoadBalancin2);
function _class17(nReplicas) {
_classCallCheck(this, _class17);
return _possibleConstructorReturn(this, _getPrototypeOf(_class17).call(this, nReplicas));
}
return _class17;
}(IceGrid.LoadBalancingPolicy);
Slice.defineValue(IceGrid.OrderedLoadBalancingPolicy, iceC_IceGrid_OrderedLoadBalancingPolicy_ids[2], false);
var iceC_IceGrid_RoundRobinLoadBalancingPolicy_ids = ["::Ice::Object", "::IceGrid::LoadBalancingPolicy", "::IceGrid::RoundRobinLoadBalancingPolicy"];
/**
* Round robin load balancing policy.
*
**/
IceGrid.RoundRobinLoadBalancingPolicy =
/*#__PURE__*/
function (_IceGrid$LoadBalancin3) {
_inherits(_class18, _IceGrid$LoadBalancin3);
function _class18(nReplicas) {
_classCallCheck(this, _class18);
return _possibleConstructorReturn(this, _getPrototypeOf(_class18).call(this, nReplicas));
}
return _class18;
}(IceGrid.LoadBalancingPolicy);
Slice.defineValue(IceGrid.RoundRobinLoadBalancingPolicy, iceC_IceGrid_RoundRobinLoadBalancingPolicy_ids[2], false);
var iceC_IceGrid_AdaptiveLoadBalancingPolicy_ids = ["::Ice::Object", "::IceGrid::AdaptiveLoadBalancingPolicy", "::IceGrid::LoadBalancingPolicy"];
/**
* Adaptive load balancing policy.
*
**/
IceGrid.AdaptiveLoadBalancingPolicy =
/*#__PURE__*/
function (_IceGrid$LoadBalancin4) {
_inherits(_class19, _IceGrid$LoadBalancin4);
function _class19(nReplicas) {
var _this8;
var loadSample = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class19);
_this8 = _possibleConstructorReturn(this, _getPrototypeOf(_class19).call(this, nReplicas));
_this8.loadSample = loadSample;
return _this8;
}
_createClass(_class19, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
ostr.writeString(this.loadSample);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.loadSample = istr.readString();
}
}]);
return _class19;
}(IceGrid.LoadBalancingPolicy);
Slice.defineValue(IceGrid.AdaptiveLoadBalancingPolicy, iceC_IceGrid_AdaptiveLoadBalancingPolicy_ids[1], false);
/**
* A replica group descriptor.
*
**/
IceGrid.ReplicaGroupDescriptor =
/*#__PURE__*/
function () {
function _class20() {
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var loadBalancing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var proxyOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
var objects = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var description = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
var filter = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
_classCallCheck(this, _class20);
this.id = id;
this.loadBalancing = loadBalancing;
this.proxyOptions = proxyOptions;
this.objects = objects;
this.description = description;
this.filter = filter;
}
_createClass(_class20, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.id);
ostr.writeValue(this.loadBalancing);
ostr.writeString(this.proxyOptions);
IceGrid.ObjectDescriptorSeqHelper.write(ostr, this.objects);
ostr.writeString(this.description);
ostr.writeString(this.filter);
}
}, {
key: "_read",
value: function _read(istr) {
var _this9 = this;
this.id = istr.readString();
istr.readValue(function (obj) {
return _this9.loadBalancing = obj;
}, IceGrid.LoadBalancingPolicy);
this.proxyOptions = istr.readString();
this.objects = IceGrid.ObjectDescriptorSeqHelper.read(istr);
this.description = istr.readString();
this.filter = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 6;
}
}]);
return _class20;
}();
Slice.defineStruct(IceGrid.ReplicaGroupDescriptor, false, true);
Slice.defineSequence(IceGrid, "ReplicaGroupDescriptorSeqHelper", "IceGrid.ReplicaGroupDescriptor", false);
/**
* An application descriptor.
*
**/
IceGrid.ApplicationDescriptor =
/*#__PURE__*/
function () {
function _class21() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var replicaGroups = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var serverTemplates = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var serviceTemplates = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
var nodes = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
var distrib = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : new IceGrid.DistributionDescriptor();
var description = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "";
var propertySets = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
_classCallCheck(this, _class21);
this.name = name;
this.variables = variables;
this.replicaGroups = replicaGroups;
this.serverTemplates = serverTemplates;
this.serviceTemplates = serviceTemplates;
this.nodes = nodes;
this.distrib = distrib;
this.description = description;
this.propertySets = propertySets;
}
_createClass(_class21, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
IceGrid.StringStringDictHelper.write(ostr, this.variables);
IceGrid.ReplicaGroupDescriptorSeqHelper.write(ostr, this.replicaGroups);
IceGrid.TemplateDescriptorDictHelper.write(ostr, this.serverTemplates);
IceGrid.TemplateDescriptorDictHelper.write(ostr, this.serviceTemplates);
IceGrid.NodeDescriptorDictHelper.write(ostr, this.nodes);
IceGrid.DistributionDescriptor.write(ostr, this.distrib);
ostr.writeString(this.description);
IceGrid.PropertySetDescriptorDictHelper.write(ostr, this.propertySets);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.variables = IceGrid.StringStringDictHelper.read(istr);
this.replicaGroups = IceGrid.ReplicaGroupDescriptorSeqHelper.read(istr);
this.serverTemplates = IceGrid.TemplateDescriptorDictHelper.read(istr);
this.serviceTemplates = IceGrid.TemplateDescriptorDictHelper.read(istr);
this.nodes = IceGrid.NodeDescriptorDictHelper.read(istr);
this.distrib = IceGrid.DistributionDescriptor.read(istr, this.distrib);
this.description = istr.readString();
this.propertySets = IceGrid.PropertySetDescriptorDictHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 10;
}
}]);
return _class21;
}();
Slice.defineStruct(IceGrid.ApplicationDescriptor, false, true);
Slice.defineSequence(IceGrid, "ApplicationDescriptorSeqHelper", "IceGrid.ApplicationDescriptor", false);
var iceC_IceGrid_BoxedString_ids = ["::Ice::Object", "::IceGrid::BoxedString"];
/**
* A "boxed" string.
*
**/
IceGrid.BoxedString =
/*#__PURE__*/
function (_Ice$Value3) {
_inherits(_class22, _Ice$Value3);
function _class22() {
var _this10;
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
_classCallCheck(this, _class22);
_this10 = _possibleConstructorReturn(this, _getPrototypeOf(_class22).call(this));
_this10.value = value;
return _this10;
}
_createClass(_class22, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
ostr.writeString(this.value);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.value = istr.readString();
}
}]);
return _class22;
}(Ice.Value);
Slice.defineValue(IceGrid.BoxedString, iceC_IceGrid_BoxedString_ids[1], false);
/**
* A node update descriptor to describe the updates to apply to a
* node of a deployed application.
*
**/
IceGrid.NodeUpdateDescriptor =
/*#__PURE__*/
function () {
function _class23() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var variables = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var removeVariables = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var propertySets = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
var removePropertySets = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
var serverInstances = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
var servers = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
var removeServers = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
var loadFactor = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
_classCallCheck(this, _class23);
this.name = name;
this.description = description;
this.variables = variables;
this.removeVariables = removeVariables;
this.propertySets = propertySets;
this.removePropertySets = removePropertySets;
this.serverInstances = serverInstances;
this.servers = servers;
this.removeServers = removeServers;
this.loadFactor = loadFactor;
}
_createClass(_class23, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeValue(this.description);
IceGrid.StringStringDictHelper.write(ostr, this.variables);
Ice.StringSeqHelper.write(ostr, this.removeVariables);
IceGrid.PropertySetDescriptorDictHelper.write(ostr, this.propertySets);
Ice.StringSeqHelper.write(ostr, this.removePropertySets);
IceGrid.ServerInstanceDescriptorSeqHelper.write(ostr, this.serverInstances);
IceGrid.ServerDescriptorSeqHelper.write(ostr, this.servers);
Ice.StringSeqHelper.write(ostr, this.removeServers);
ostr.writeValue(this.loadFactor);
}
}, {
key: "_read",
value: function _read(istr) {
var _this11 = this;
this.name = istr.readString();
istr.readValue(function (obj) {
return _this11.description = obj;
}, IceGrid.BoxedString);
this.variables = IceGrid.StringStringDictHelper.read(istr);
this.removeVariables = Ice.StringSeqHelper.read(istr);
this.propertySets = IceGrid.PropertySetDescriptorDictHelper.read(istr);
this.removePropertySets = Ice.StringSeqHelper.read(istr);
this.serverInstances = IceGrid.ServerInstanceDescriptorSeqHelper.read(istr);
this.servers = IceGrid.ServerDescriptorSeqHelper.read(istr);
this.removeServers = Ice.StringSeqHelper.read(istr);
istr.readValue(function (obj) {
return _this11.loadFactor = obj;
}, IceGrid.BoxedString);
}
}], [{
key: "minWireSize",
get: function get() {
return 10;
}
}]);
return _class23;
}();
Slice.defineStruct(IceGrid.NodeUpdateDescriptor, false, true);
Slice.defineSequence(IceGrid, "NodeUpdateDescriptorSeqHelper", "IceGrid.NodeUpdateDescriptor", false);
var iceC_IceGrid_BoxedDistributionDescriptor_ids = ["::Ice::Object", "::IceGrid::BoxedDistributionDescriptor"];
/**
* A "boxed" distribution descriptor.
*
**/
IceGrid.BoxedDistributionDescriptor =
/*#__PURE__*/
function (_Ice$Value4) {
_inherits(_class24, _Ice$Value4);
function _class24() {
var _this12;
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new IceGrid.DistributionDescriptor();
_classCallCheck(this, _class24);
_this12 = _possibleConstructorReturn(this, _getPrototypeOf(_class24).call(this));
_this12.value = value;
return _this12;
}
_createClass(_class24, [{
key: "_iceWriteMemberImpl",
value: function _iceWriteMemberImpl(ostr) {
IceGrid.DistributionDescriptor.write(ostr, this.value);
}
}, {
key: "_iceReadMemberImpl",
value: function _iceReadMemberImpl(istr) {
this.value = IceGrid.DistributionDescriptor.read(istr, this.value);
}
}]);
return _class24;
}(Ice.Value);
Slice.defineValue(IceGrid.BoxedDistributionDescriptor, iceC_IceGrid_BoxedDistributionDescriptor_ids[1], false);
/**
* An application update descriptor to describe the updates to apply
* to a deployed application.
*
**/
IceGrid.ApplicationUpdateDescriptor =
/*#__PURE__*/
function () {
function _class25() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var description = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var distrib = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var variables = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var removeVariables = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
var propertySets = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
var removePropertySets = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
var replicaGroups = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
var removeReplicaGroups = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;
var serverTemplates = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : null;
var removeServerTemplates = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : null;
var serviceTemplates = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : null;
var removeServiceTemplates = arguments.length > 12 && arguments[12] !== undefined ? arguments[12] : null;
var nodes = arguments.length > 13 && arguments[13] !== undefined ? arguments[13] : null;
var removeNodes = arguments.length > 14 && arguments[14] !== undefined ? arguments[14] : null;
_classCallCheck(this, _class25);
this.name = name;
this.description = description;
this.distrib = distrib;
this.variables = variables;
this.removeVariables = removeVariables;
this.propertySets = propertySets;
this.removePropertySets = removePropertySets;
this.replicaGroups = replicaGroups;
this.removeReplicaGroups = removeReplicaGroups;
this.serverTemplates = serverTemplates;
this.removeServerTemplates = removeServerTemplates;
this.serviceTemplates = serviceTemplates;
this.removeServiceTemplates = removeServiceTemplates;
this.nodes = nodes;
this.removeNodes = removeNodes;
}
_createClass(_class25, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeValue(this.description);
ostr.writeValue(this.distrib);
IceGrid.StringStringDictHelper.write(ostr, this.variables);
Ice.StringSeqHelper.write(ostr, this.removeVariables);
IceGrid.PropertySetDescriptorDictHelper.write(ostr, this.propertySets);
Ice.StringSeqHelper.write(ostr, this.removePropertySets);
IceGrid.ReplicaGroupDescriptorSeqHelper.write(ostr, this.replicaGroups);
Ice.StringSeqHelper.write(ostr, this.removeReplicaGroups);
IceGrid.TemplateDescriptorDictHelper.write(ostr, this.serverTemplates);
Ice.StringSeqHelper.write(ostr, this.removeServerTemplates);
IceGrid.TemplateDescriptorDictHelper.write(ostr, this.serviceTemplates);
Ice.StringSeqHelper.write(ostr, this.removeServiceTemplates);
IceGrid.NodeUpdateDescriptorSeqHelper.write(ostr, this.nodes);
Ice.StringSeqHelper.write(ostr, this.removeNodes);
}
}, {
key: "_read",
value: function _read(istr) {
var _this13 = this;
this.name = istr.readString();
istr.readValue(function (obj) {
return _this13.description = obj;
}, IceGrid.BoxedString);
istr.readValue(function (obj) {
return _this13.distrib = obj;
}, IceGrid.BoxedDistributionDescriptor);
this.variables = IceGrid.StringStringDictHelper.read(istr);
this.removeVariables = Ice.StringSeqHelper.read(istr);
this.propertySets = IceGrid.PropertySetDescriptorDictHelper.read(istr);
this.removePropertySets = Ice.StringSeqHelper.read(istr);
this.replicaGroups = IceGrid.ReplicaGroupDescriptorSeqHelper.read(istr);
this.removeReplicaGroups = Ice.StringSeqHelper.read(istr);
this.serverTemplates = IceGrid.TemplateDescriptorDictHelper.read(istr);
this.removeServerTemplates = Ice.StringSeqHelper.read(istr);
this.serviceTemplates = IceGrid.TemplateDescriptorDictHelper.read(istr);
this.removeServiceTemplates = Ice.StringSeqHelper.read(istr);
this.nodes = IceGrid.NodeUpdateDescriptorSeqHelper.read(istr);
this.removeNodes = Ice.StringSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 15;
}
}]);
return _class25;
}();
Slice.defineStruct(IceGrid.ApplicationUpdateDescriptor, false, true);
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Exception.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
/**
* This exception is raised if an application does not exist.
*
**/
IceGrid.ApplicationNotExistException =
/*#__PURE__*/
function (_Ice$UserException) {
_inherits(_class26, _Ice$UserException);
function _class26() {
var _this14;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class26);
_this14 = _possibleConstructorReturn(this, _getPrototypeOf(_class26).call(this, _cause));
_this14.name = name;
return _this14;
}
_createClass(_class26, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ApplicationNotExistException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ApplicationNotExistException";
}
}]);
return _class26;
}(Ice.UserException);
/**
* This exception is raised if a server does not exist.
*
**/
IceGrid.ServerNotExistException =
/*#__PURE__*/
function (_Ice$UserException2) {
_inherits(_class27, _Ice$UserException2);
function _class27() {
var _this15;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class27);
_this15 = _possibleConstructorReturn(this, _getPrototypeOf(_class27).call(this, _cause));
_this15.id = id;
return _this15;
}
_createClass(_class27, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ServerNotExistException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.id);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ServerNotExistException";
}
}]);
return _class27;
}(Ice.UserException);
/**
* This exception is raised if a server failed to start.
*
**/
IceGrid.ServerStartException =
/*#__PURE__*/
function (_Ice$UserException3) {
_inherits(_class28, _Ice$UserException3);
function _class28() {
var _this16;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var _cause = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class28);
_this16 = _possibleConstructorReturn(this, _getPrototypeOf(_class28).call(this, _cause));
_this16.id = id;
_this16.reason = reason;
return _this16;
}
_createClass(_class28, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ServerStartException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.id);
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = istr.readString();
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ServerStartException";
}
}]);
return _class28;
}(Ice.UserException);
/**
* This exception is raised if a server failed to stop.
*
**/
IceGrid.ServerStopException =
/*#__PURE__*/
function (_Ice$UserException4) {
_inherits(_class29, _Ice$UserException4);
function _class29() {
var _this17;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var _cause = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class29);
_this17 = _possibleConstructorReturn(this, _getPrototypeOf(_class29).call(this, _cause));
_this17.id = id;
_this17.reason = reason;
return _this17;
}
_createClass(_class29, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ServerStopException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.id);
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = istr.readString();
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ServerStopException";
}
}]);
return _class29;
}(Ice.UserException);
/**
* This exception is raised if an adapter does not exist.
*
**/
IceGrid.AdapterNotExistException =
/*#__PURE__*/
function (_Ice$UserException5) {
_inherits(_class30, _Ice$UserException5);
function _class30() {
var _this18;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class30);
_this18 = _possibleConstructorReturn(this, _getPrototypeOf(_class30).call(this, _cause));
_this18.id = id;
return _this18;
}
_createClass(_class30, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.AdapterNotExistException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.id);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::AdapterNotExistException";
}
}]);
return _class30;
}(Ice.UserException);
/**
* This exception is raised if an object already exists.
*
**/
IceGrid.ObjectExistsException =
/*#__PURE__*/
function (_Ice$UserException6) {
_inherits(_class31, _Ice$UserException6);
function _class31() {
var _this19;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Ice.Identity();
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class31);
_this19 = _possibleConstructorReturn(this, _getPrototypeOf(_class31).call(this, _cause));
_this19.id = id;
return _this19;
}
_createClass(_class31, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ObjectExistsException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
Ice.Identity.write(ostr, this.id);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = Ice.Identity.read(istr, this.id);
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ObjectExistsException";
}
}]);
return _class31;
}(Ice.UserException);
/**
* This exception is raised if an object is not registered.
*
**/
IceGrid.ObjectNotRegisteredException =
/*#__PURE__*/
function (_Ice$UserException7) {
_inherits(_class32, _Ice$UserException7);
function _class32() {
var _this20;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Ice.Identity();
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class32);
_this20 = _possibleConstructorReturn(this, _getPrototypeOf(_class32).call(this, _cause));
_this20.id = id;
return _this20;
}
_createClass(_class32, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ObjectNotRegisteredException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
Ice.Identity.write(ostr, this.id);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = Ice.Identity.read(istr, this.id);
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ObjectNotRegisteredException";
}
}]);
return _class32;
}(Ice.UserException);
/**
* This exception is raised if a node does not exist.
*
**/
IceGrid.NodeNotExistException =
/*#__PURE__*/
function (_Ice$UserException8) {
_inherits(_class33, _Ice$UserException8);
function _class33() {
var _this21;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class33);
_this21 = _possibleConstructorReturn(this, _getPrototypeOf(_class33).call(this, _cause));
_this21.name = name;
return _this21;
}
_createClass(_class33, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.NodeNotExistException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::NodeNotExistException";
}
}]);
return _class33;
}(Ice.UserException);
/**
* This exception is raised if a registry does not exist.
*
**/
IceGrid.RegistryNotExistException =
/*#__PURE__*/
function (_Ice$UserException9) {
_inherits(_class34, _Ice$UserException9);
function _class34() {
var _this22;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class34);
_this22 = _possibleConstructorReturn(this, _getPrototypeOf(_class34).call(this, _cause));
_this22.name = name;
return _this22;
}
_createClass(_class34, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.RegistryNotExistException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::RegistryNotExistException";
}
}]);
return _class34;
}(Ice.UserException);
/**
* An exception for deployment errors.
*
**/
IceGrid.DeploymentException =
/*#__PURE__*/
function (_Ice$UserException10) {
_inherits(_class35, _Ice$UserException10);
function _class35() {
var _this23;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class35);
_this23 = _possibleConstructorReturn(this, _getPrototypeOf(_class35).call(this, _cause));
_this23.reason = reason;
return _this23;
}
_createClass(_class35, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.DeploymentException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::DeploymentException";
}
}]);
return _class35;
}(Ice.UserException);
/**
* This exception is raised if a node could not be reached.
*
**/
IceGrid.NodeUnreachableException =
/*#__PURE__*/
function (_Ice$UserException11) {
_inherits(_class36, _Ice$UserException11);
function _class36() {
var _this24;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var _cause = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class36);
_this24 = _possibleConstructorReturn(this, _getPrototypeOf(_class36).call(this, _cause));
_this24.name = name;
_this24.reason = reason;
return _this24;
}
_createClass(_class36, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.NodeUnreachableException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::NodeUnreachableException";
}
}]);
return _class36;
}(Ice.UserException);
/**
* This exception is raised if a server could not be reached.
*
**/
IceGrid.ServerUnreachableException =
/*#__PURE__*/
function (_Ice$UserException12) {
_inherits(_class37, _Ice$UserException12);
function _class37() {
var _this25;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var _cause = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class37);
_this25 = _possibleConstructorReturn(this, _getPrototypeOf(_class37).call(this, _cause));
_this25.name = name;
_this25.reason = reason;
return _this25;
}
_createClass(_class37, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ServerUnreachableException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ServerUnreachableException";
}
}]);
return _class37;
}(Ice.UserException);
/**
* This exception is raised if a registry could not be reached.
*
**/
IceGrid.RegistryUnreachableException =
/*#__PURE__*/
function (_Ice$UserException13) {
_inherits(_class38, _Ice$UserException13);
function _class38() {
var _this26;
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var reason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var _cause = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class38);
_this26 = _possibleConstructorReturn(this, _getPrototypeOf(_class38).call(this, _cause));
_this26.name = name;
_this26.reason = reason;
return _this26;
}
_createClass(_class38, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.RegistryUnreachableException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.name = istr.readString();
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::RegistryUnreachableException";
}
}]);
return _class38;
}(Ice.UserException);
/**
* This exception is raised if an unknown signal was sent to
* to a server.
*
**/
IceGrid.BadSignalException =
/*#__PURE__*/
function (_Ice$UserException14) {
_inherits(_class39, _Ice$UserException14);
function _class39() {
var _this27;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class39);
_this27 = _possibleConstructorReturn(this, _getPrototypeOf(_class39).call(this, _cause));
_this27.reason = reason;
return _this27;
}
_createClass(_class39, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.BadSignalException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::BadSignalException";
}
}]);
return _class39;
}(Ice.UserException);
/**
* This exception is raised if a patch failed.
*
**/
IceGrid.PatchException =
/*#__PURE__*/
function (_Ice$UserException15) {
_inherits(_class40, _Ice$UserException15);
function _class40() {
var _this28;
var reasons = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class40);
_this28 = _possibleConstructorReturn(this, _getPrototypeOf(_class40).call(this, _cause));
_this28.reasons = reasons;
return _this28;
}
_createClass(_class40, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.PatchException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
Ice.StringSeqHelper.write(ostr, this.reasons);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reasons = Ice.StringSeqHelper.read(istr);
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::PatchException";
}
}]);
return _class40;
}(Ice.UserException);
/**
* This exception is raised if a registry lock wasn't
* acquired or is already held by a session.
*
**/
IceGrid.AccessDeniedException =
/*#__PURE__*/
function (_Ice$UserException16) {
_inherits(_class41, _Ice$UserException16);
function _class41() {
var _this29;
var lockUserId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class41);
_this29 = _possibleConstructorReturn(this, _getPrototypeOf(_class41).call(this, _cause));
_this29.lockUserId = lockUserId;
return _this29;
}
_createClass(_class41, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.AccessDeniedException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.lockUserId);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.lockUserId = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::AccessDeniedException";
}
}]);
return _class41;
}(Ice.UserException);
/**
* This exception is raised if the allocation of an object failed.
*
**/
IceGrid.AllocationException =
/*#__PURE__*/
function (_Ice$UserException17) {
_inherits(_class42, _Ice$UserException17);
function _class42() {
var _this30;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class42);
_this30 = _possibleConstructorReturn(this, _getPrototypeOf(_class42).call(this, _cause));
_this30.reason = reason;
return _this30;
}
_createClass(_class42, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.AllocationException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::AllocationException";
}
}]);
return _class42;
}(Ice.UserException);
/**
* This exception is raised if the request to allocate an object times
* out.
*
**/
IceGrid.AllocationTimeoutException =
/*#__PURE__*/
function (_IceGrid$AllocationEx) {
_inherits(_class43, _IceGrid$AllocationEx);
function _class43(reason) {
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class43);
return _possibleConstructorReturn(this, _getPrototypeOf(_class43).call(this, reason, _cause));
}
_createClass(_class43, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.AllocationTimeoutException;
}
}], [{
key: "_parent",
get: function get() {
return IceGrid.AllocationException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::AllocationTimeoutException";
}
}]);
return _class43;
}(IceGrid.AllocationException);
/**
* This exception is raised if a client is denied the ability to create
* a session with IceGrid.
*
**/
IceGrid.PermissionDeniedException =
/*#__PURE__*/
function (_Ice$UserException18) {
_inherits(_class44, _Ice$UserException18);
function _class44() {
var _this31;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class44);
_this31 = _possibleConstructorReturn(this, _getPrototypeOf(_class44).call(this, _cause));
_this31.reason = reason;
return _this31;
}
_createClass(_class44, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.PermissionDeniedException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::PermissionDeniedException";
}
}]);
return _class44;
}(Ice.UserException);
/**
* This exception is raised if an observer is already registered with
* the registry.
*
* @see AdminSession#setObservers
* @see AdminSession#setObserversByIdentity
*
**/
IceGrid.ObserverAlreadyRegisteredException =
/*#__PURE__*/
function (_Ice$UserException19) {
_inherits(_class45, _Ice$UserException19);
function _class45() {
var _this32;
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Ice.Identity();
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class45);
_this32 = _possibleConstructorReturn(this, _getPrototypeOf(_class45).call(this, _cause));
_this32.id = id;
return _this32;
}
_createClass(_class45, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ObserverAlreadyRegisteredException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
Ice.Identity.write(ostr, this.id);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.id = Ice.Identity.read(istr, this.id);
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ObserverAlreadyRegisteredException";
}
}]);
return _class45;
}(Ice.UserException);
/**
* This exception is raised if a file is not available.
*
* @see AdminSession#openServerStdOut
* @see AdminSession#openServerStdErr
* @see AdminSession#openNodeStdOut
* @see AdminSession#openNodeStdErr
* @see AdminSession#openRegistryStdOut
* @see AdminSession#openRegistryStdErr
*
**/
IceGrid.FileNotAvailableException =
/*#__PURE__*/
function (_Ice$UserException20) {
_inherits(_class46, _Ice$UserException20);
function _class46() {
var _this33;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class46);
_this33 = _possibleConstructorReturn(this, _getPrototypeOf(_class46).call(this, _cause));
_this33.reason = reason;
return _this33;
}
_createClass(_class46, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.FileNotAvailableException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::FileNotAvailableException";
}
}]);
return _class46;
}(Ice.UserException);
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Admin.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
/**
* An enumeration representing the state of the server.
*
**/
IceGrid.ServerState = Slice.defineEnum([['Inactive', 0], ['Activating', 1], ['ActivationTimedOut', 2], ['Active', 3], ['Deactivating', 4], ['Destroying', 5], ['Destroyed', 6]]);
Slice.defineDictionary(IceGrid, "StringObjectProxyDict", "StringObjectProxyDictHelper", "Ice.StringHelper", "Ice.ObjectPrx", false, undefined, undefined);
/**
* Information about an Ice object.
*
**/
IceGrid.ObjectInfo =
/*#__PURE__*/
function () {
function _class47() {
var proxy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class47);
this.proxy = proxy;
this.type = type;
}
_createClass(_class47, [{
key: "_write",
value: function _write(ostr) {
ostr.writeProxy(this.proxy);
ostr.writeString(this.type);
}
}, {
key: "_read",
value: function _read(istr) {
this.proxy = istr.readProxy();
this.type = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 3;
}
}]);
return _class47;
}();
Slice.defineStruct(IceGrid.ObjectInfo, false, true);
Slice.defineSequence(IceGrid, "ObjectInfoSeqHelper", "IceGrid.ObjectInfo", false);
/**
* Information about an adapter registered with the IceGrid registry.
*
**/
IceGrid.AdapterInfo =
/*#__PURE__*/
function () {
function _class48() {
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var proxy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var replicaGroupId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
_classCallCheck(this, _class48);
this.id = id;
this.proxy = proxy;
this.replicaGroupId = replicaGroupId;
}
_createClass(_class48, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.id);
ostr.writeProxy(this.proxy);
ostr.writeString(this.replicaGroupId);
}
}, {
key: "_read",
value: function _read(istr) {
this.id = istr.readString();
this.proxy = istr.readProxy();
this.replicaGroupId = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 4;
}
}]);
return _class48;
}();
Slice.defineStruct(IceGrid.AdapterInfo, false, true);
Slice.defineSequence(IceGrid, "AdapterInfoSeqHelper", "IceGrid.AdapterInfo", false);
/**
* Information about a server managed by an IceGrid node.
*
**/
IceGrid.ServerInfo =
/*#__PURE__*/
function () {
function _class49() {
var application = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var uuid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var revision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
var node = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
var descriptor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
var sessionId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
_classCallCheck(this, _class49);
this.application = application;
this.uuid = uuid;
this.revision = revision;
this.node = node;
this.descriptor = descriptor;
this.sessionId = sessionId;
}
_createClass(_class49, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.application);
ostr.writeString(this.uuid);
ostr.writeInt(this.revision);
ostr.writeString(this.node);
ostr.writeValue(this.descriptor);
ostr.writeString(this.sessionId);
}
}, {
key: "_read",
value: function _read(istr) {
var _this34 = this;
this.application = istr.readString();
this.uuid = istr.readString();
this.revision = istr.readInt();
this.node = istr.readString();
istr.readValue(function (obj) {
return _this34.descriptor = obj;
}, IceGrid.ServerDescriptor);
this.sessionId = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 9;
}
}]);
return _class49;
}();
Slice.defineStruct(IceGrid.ServerInfo, false, true);
/**
* Information about an IceGrid node.
*
**/
IceGrid.NodeInfo =
/*#__PURE__*/
function () {
function _class50() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var hostname = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
var release = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
var version = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
var machine = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
var nProcessors = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
var dataDir = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : "";
_classCallCheck(this, _class50);
this.name = name;
this.os = os;
this.hostname = hostname;
this.release = release;
this.version = version;
this.machine = machine;
this.nProcessors = nProcessors;
this.dataDir = dataDir;
}
_createClass(_class50, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.os);
ostr.writeString(this.hostname);
ostr.writeString(this.release);
ostr.writeString(this.version);
ostr.writeString(this.machine);
ostr.writeInt(this.nProcessors);
ostr.writeString(this.dataDir);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.os = istr.readString();
this.hostname = istr.readString();
this.release = istr.readString();
this.version = istr.readString();
this.machine = istr.readString();
this.nProcessors = istr.readInt();
this.dataDir = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 11;
}
}]);
return _class50;
}();
Slice.defineStruct(IceGrid.NodeInfo, true, true);
/**
* Information about an IceGrid registry replica.
*
**/
IceGrid.RegistryInfo =
/*#__PURE__*/
function () {
function _class51() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var hostname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class51);
this.name = name;
this.hostname = hostname;
}
_createClass(_class51, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.name);
ostr.writeString(this.hostname);
}
}, {
key: "_read",
value: function _read(istr) {
this.name = istr.readString();
this.hostname = istr.readString();
}
}], [{
key: "minWireSize",
get: function get() {
return 2;
}
}]);
return _class51;
}();
Slice.defineStruct(IceGrid.RegistryInfo, true, true);
Slice.defineSequence(IceGrid, "RegistryInfoSeqHelper", "IceGrid.RegistryInfo", false);
/**
* Information about the load of a node.
*
**/
IceGrid.LoadInfo =
/*#__PURE__*/
function () {
function _class52() {
var avg1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.0;
var avg5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.0;
var avg15 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.0;
_classCallCheck(this, _class52);
this.avg1 = avg1;
this.avg5 = avg5;
this.avg15 = avg15;
}
_createClass(_class52, [{
key: "_write",
value: function _write(ostr) {
ostr.writeFloat(this.avg1);
ostr.writeFloat(this.avg5);
ostr.writeFloat(this.avg15);
}
}, {
key: "_read",
value: function _read(istr) {
this.avg1 = istr.readFloat();
this.avg5 = istr.readFloat();
this.avg15 = istr.readFloat();
}
}], [{
key: "minWireSize",
get: function get() {
return 12;
}
}]);
return _class52;
}();
Slice.defineStruct(IceGrid.LoadInfo, false, false);
/**
* Information about an IceGrid application.
*
**/
IceGrid.ApplicationInfo =
/*#__PURE__*/
function () {
function _class53() {
var uuid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var createTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Ice.Long(0, 0);
var createUser = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
var updateTime = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new Ice.Long(0, 0);
var updateUser = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "";
var revision = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
var descriptor = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : new IceGrid.ApplicationDescriptor();
_classCallCheck(this, _class53);
this.uuid = uuid;
this.createTime = createTime;
this.createUser = createUser;
this.updateTime = updateTime;
this.updateUser = updateUser;
this.revision = revision;
this.descriptor = descriptor;
}
_createClass(_class53, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.uuid);
ostr.writeLong(this.createTime);
ostr.writeString(this.createUser);
ostr.writeLong(this.updateTime);
ostr.writeString(this.updateUser);
ostr.writeInt(this.revision);
IceGrid.ApplicationDescriptor.write(ostr, this.descriptor);
}
}, {
key: "_read",
value: function _read(istr) {
this.uuid = istr.readString();
this.createTime = istr.readLong();
this.createUser = istr.readString();
this.updateTime = istr.readLong();
this.updateUser = istr.readString();
this.revision = istr.readInt();
this.descriptor = IceGrid.ApplicationDescriptor.read(istr, this.descriptor);
}
}], [{
key: "minWireSize",
get: function get() {
return 33;
}
}]);
return _class53;
}();
Slice.defineStruct(IceGrid.ApplicationInfo, false, true);
Slice.defineSequence(IceGrid, "ApplicationInfoSeqHelper", "IceGrid.ApplicationInfo", false);
/**
* Information about updates to an IceGrid application.
*
**/
IceGrid.ApplicationUpdateInfo =
/*#__PURE__*/
function () {
function _class54() {
var updateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Ice.Long(0, 0);
var updateUser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
var revision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
var descriptor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new IceGrid.ApplicationUpdateDescriptor();
_classCallCheck(this, _class54);
this.updateTime = updateTime;
this.updateUser = updateUser;
this.revision = revision;
this.descriptor = descriptor;
}
_createClass(_class54, [{
key: "_write",
value: function _write(ostr) {
ostr.writeLong(this.updateTime);
ostr.writeString(this.updateUser);
ostr.writeInt(this.revision);
IceGrid.ApplicationUpdateDescriptor.write(ostr, this.descriptor);
}
}, {
key: "_read",
value: function _read(istr) {
this.updateTime = istr.readLong();
this.updateUser = istr.readString();
this.revision = istr.readInt();
this.descriptor = IceGrid.ApplicationUpdateDescriptor.read(istr, this.descriptor);
}
}], [{
key: "minWireSize",
get: function get() {
return 28;
}
}]);
return _class54;
}();
Slice.defineStruct(IceGrid.ApplicationUpdateInfo, false, true);
var iceC_IceGrid_Admin_ids = ["::Ice::Object", "::IceGrid::Admin"];
/**
* The IceGrid administrative interface.
* <p class="Warning">Allowing access to this interface
* is a security risk! Please see the IceGrid documentation
* for further information.
*
**/
IceGrid.Admin =
/*#__PURE__*/
function (_Ice$Object) {
_inherits(_class55, _Ice$Object);
function _class55() {
_classCallCheck(this, _class55);
return _possibleConstructorReturn(this, _getPrototypeOf(_class55).apply(this, arguments));
}
return _class55;
}(Ice.Object);
IceGrid.AdminPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx) {
_inherits(_class56, _Ice$ObjectPrx);
function _class56() {
_classCallCheck(this, _class56);
return _possibleConstructorReturn(this, _getPrototypeOf(_class56).apply(this, arguments));
}
return _class56;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.Admin, IceGrid.AdminPrx, iceC_IceGrid_Admin_ids, 1, {
"addApplication": [,,,,, [[IceGrid.ApplicationDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.DeploymentException], true],
"syncApplication": [,,,,, [[IceGrid.ApplicationDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException], true],
"updateApplication": [,,,,, [[IceGrid.ApplicationUpdateDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException], true],
"syncApplicationWithoutRestart": [,,,,, [[IceGrid.ApplicationDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException], true],
"updateApplicationWithoutRestart": [,,,,, [[IceGrid.ApplicationUpdateDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException], true],
"removeApplication": [,,,,, [[7]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException],,],
"instantiateServer": [,,,,, [[7], [7], [IceGrid.ServerInstanceDescriptor]],, [IceGrid.AccessDeniedException, IceGrid.ApplicationNotExistException, IceGrid.DeploymentException],,],
"patchApplication": [,,,,, [[7], [1]],, [IceGrid.ApplicationNotExistException, IceGrid.PatchException],,],
"getApplicationInfo": [, 2, 1,, [IceGrid.ApplicationInfo], [[7]],, [IceGrid.ApplicationNotExistException],, true],
"getDefaultApplicationDescriptor": [, 2, 1,, [IceGrid.ApplicationDescriptor],,, [IceGrid.DeploymentException],, true],
"getAllApplicationNames": [, 2, 1,, ["Ice.StringSeqHelper"],,,,,],
"getServerInfo": [, 2, 1,, [IceGrid.ServerInfo], [[7]],, [IceGrid.ServerNotExistException],, true],
"getServerState": [, 2, 1,, [IceGrid.ServerState._helper], [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"getServerPid": [, 2, 1,, [3], [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"getServerAdminCategory": [, 2, 2,, [7],,,,,],
"getServerAdmin": [, 2, 2,, [9], [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"enableServer": [, 2, 2,,, [[7], [1]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"isServerEnabled": [, 2, 1,, [1], [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"startServer": [,,,,, [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException, IceGrid.ServerStartException],,],
"stopServer": [,,,,, [[7]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException, IceGrid.ServerStopException],,],
"patchServer": [,,,,, [[7], [1]],, [IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.PatchException, IceGrid.ServerNotExistException],,],
"sendSignal": [,,,,, [[7], [7]],, [IceGrid.BadSignalException, IceGrid.DeploymentException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"getAllServerIds": [, 2, 1,, ["Ice.StringSeqHelper"],,,,,],
"getAdapterInfo": [, 2, 1,, ["IceGrid.AdapterInfoSeqHelper"], [[7]],, [IceGrid.AdapterNotExistException],,],
"removeAdapter": [,,,,, [[7]],, [IceGrid.AdapterNotExistException, IceGrid.DeploymentException],,],
"getAllAdapterIds": [, 2, 1,, ["Ice.StringSeqHelper"],,,,,],
"addObject": [,,,,, [[9]],, [IceGrid.DeploymentException, IceGrid.ObjectExistsException],,],
"updateObject": [,,,,, [[9]],, [IceGrid.DeploymentException, IceGrid.ObjectNotRegisteredException],,],
"addObjectWithType": [,,,,, [[9], [7]],, [IceGrid.DeploymentException, IceGrid.ObjectExistsException],,],
"removeObject": [,,,,, [[Ice.Identity]],, [IceGrid.DeploymentException, IceGrid.ObjectNotRegisteredException],,],
"getObjectInfo": [, 2, 1,, [IceGrid.ObjectInfo], [[Ice.Identity]],, [IceGrid.ObjectNotRegisteredException],,],
"getObjectInfosByType": [, 2, 1,, ["IceGrid.ObjectInfoSeqHelper"], [[7]],,,,],
"getAllObjectInfos": [, 2, 1,, ["IceGrid.ObjectInfoSeqHelper"], [[7]],,,,],
"pingNode": [, 2, 1,, [1], [[7]],, [IceGrid.NodeNotExistException],,],
"getNodeLoad": [, 2, 1,, [IceGrid.LoadInfo], [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"getNodeInfo": [, 2, 1,, [IceGrid.NodeInfo], [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"getNodeAdmin": [, 2, 2,, [9], [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"getNodeProcessorSocketCount": [, 2, 1,, [3], [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"shutdownNode": [,,,,, [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"getNodeHostname": [, 2, 1,, [7], [[7]],, [IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"getAllNodeNames": [, 2, 1,, ["Ice.StringSeqHelper"],,,,,],
"pingRegistry": [, 2, 2,, [1], [[7]],, [IceGrid.RegistryNotExistException],,],
"getRegistryInfo": [, 2, 2,, [IceGrid.RegistryInfo], [[7]],, [IceGrid.RegistryNotExistException, IceGrid.RegistryUnreachableException],,],
"getRegistryAdmin": [, 2, 2,, [9], [[7]],, [IceGrid.RegistryNotExistException],,],
"shutdownRegistry": [, 2, 2,,, [[7]],, [IceGrid.RegistryNotExistException, IceGrid.RegistryUnreachableException],,],
"getAllRegistryNames": [, 2, 2,, ["Ice.StringSeqHelper"],,,,,],
"shutdown": [,,,,,,,,,],
"getSliceChecksums": [, 2, 1,, ["Ice.SliceChecksumDictHelper"],,,,,]
});
var iceC_IceGrid_FileIterator_ids = ["::Ice::Object", "::IceGrid::FileIterator"];
/**
* This interface provides access to IceGrid log file contents.
*
**/
IceGrid.FileIterator =
/*#__PURE__*/
function (_Ice$Object2) {
_inherits(_class57, _Ice$Object2);
function _class57() {
_classCallCheck(this, _class57);
return _possibleConstructorReturn(this, _getPrototypeOf(_class57).apply(this, arguments));
}
return _class57;
}(Ice.Object);
IceGrid.FileIteratorPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx2) {
_inherits(_class58, _Ice$ObjectPrx2);
function _class58() {
_classCallCheck(this, _class58);
return _possibleConstructorReturn(this, _getPrototypeOf(_class58).apply(this, arguments));
}
return _class58;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.FileIterator, IceGrid.FileIteratorPrx, iceC_IceGrid_FileIterator_ids, 1, {
"read": [,,,, [1], [[3]], [["Ice.StringSeqHelper"]], [IceGrid.FileNotAvailableException],,],
"destroy": [,,,,,,,,,]
});
/**
* Dynamic information about the state of a server.
*
**/
IceGrid.ServerDynamicInfo =
/*#__PURE__*/
function () {
function _class59() {
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : IceGrid.ServerState.Inactive;
var pid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
var enabled = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
_classCallCheck(this, _class59);
this.id = id;
this.state = state;
this.pid = pid;
this.enabled = enabled;
}
_createClass(_class59, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.id);
IceGrid.ServerState._write(ostr, this.state);
ostr.writeInt(this.pid);
ostr.writeBool(this.enabled);
}
}, {
key: "_read",
value: function _read(istr) {
this.id = istr.readString();
this.state = IceGrid.ServerState._read(istr);
this.pid = istr.readInt();
this.enabled = istr.readBool();
}
}], [{
key: "minWireSize",
get: function get() {
return 7;
}
}]);
return _class59;
}();
Slice.defineStruct(IceGrid.ServerDynamicInfo, true, true);
Slice.defineSequence(IceGrid, "ServerDynamicInfoSeqHelper", "IceGrid.ServerDynamicInfo", false);
/**
* Dynamic information about the state of an adapter.
*
**/
IceGrid.AdapterDynamicInfo =
/*#__PURE__*/
function () {
function _class60() {
var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var proxy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
_classCallCheck(this, _class60);
this.id = id;
this.proxy = proxy;
}
_createClass(_class60, [{
key: "_write",
value: function _write(ostr) {
ostr.writeString(this.id);
ostr.writeProxy(this.proxy);
}
}, {
key: "_read",
value: function _read(istr) {
this.id = istr.readString();
this.proxy = istr.readProxy();
}
}], [{
key: "minWireSize",
get: function get() {
return 3;
}
}]);
return _class60;
}();
Slice.defineStruct(IceGrid.AdapterDynamicInfo, false, true);
Slice.defineSequence(IceGrid, "AdapterDynamicInfoSeqHelper", "IceGrid.AdapterDynamicInfo", false);
/**
* Dynamic information about the state of a node.
*
**/
IceGrid.NodeDynamicInfo =
/*#__PURE__*/
function () {
function _class61() {
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new IceGrid.NodeInfo();
var servers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var adapters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
_classCallCheck(this, _class61);
this.info = info;
this.servers = servers;
this.adapters = adapters;
}
_createClass(_class61, [{
key: "_write",
value: function _write(ostr) {
IceGrid.NodeInfo.write(ostr, this.info);
IceGrid.ServerDynamicInfoSeqHelper.write(ostr, this.servers);
IceGrid.AdapterDynamicInfoSeqHelper.write(ostr, this.adapters);
}
}, {
key: "_read",
value: function _read(istr) {
this.info = IceGrid.NodeInfo.read(istr, this.info);
this.servers = IceGrid.ServerDynamicInfoSeqHelper.read(istr);
this.adapters = IceGrid.AdapterDynamicInfoSeqHelper.read(istr);
}
}], [{
key: "minWireSize",
get: function get() {
return 13;
}
}]);
return _class61;
}();
Slice.defineStruct(IceGrid.NodeDynamicInfo, false, true);
var iceC_IceGrid_RegistryObserver_ids = ["::Ice::Object", "::IceGrid::RegistryObserver"];
/**
* This interface allows applications to monitor changes the state
* of the registry.
*
**/
IceGrid.RegistryObserver =
/*#__PURE__*/
function (_Ice$Object3) {
_inherits(_class62, _Ice$Object3);
function _class62() {
_classCallCheck(this, _class62);
return _possibleConstructorReturn(this, _getPrototypeOf(_class62).apply(this, arguments));
}
return _class62;
}(Ice.Object);
IceGrid.RegistryObserverPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx3) {
_inherits(_class63, _Ice$ObjectPrx3);
function _class63() {
_classCallCheck(this, _class63);
return _possibleConstructorReturn(this, _getPrototypeOf(_class63).apply(this, arguments));
}
return _class63;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.RegistryObserver, IceGrid.RegistryObserverPrx, iceC_IceGrid_RegistryObserver_ids, 1, {
"registryInit": [,,,,, [["IceGrid.RegistryInfoSeqHelper"]],,,,],
"registryUp": [,,,,, [[IceGrid.RegistryInfo]],,,,],
"registryDown": [,,,,, [[7]],,,,]
});
Slice.defineSequence(IceGrid, "NodeDynamicInfoSeqHelper", "IceGrid.NodeDynamicInfo", false);
var iceC_IceGrid_NodeObserver_ids = ["::Ice::Object", "::IceGrid::NodeObserver"];
/**
* The node observer interface. Observers should implement this
* interface to receive information about the state of the IceGrid
* nodes.
*
**/
IceGrid.NodeObserver =
/*#__PURE__*/
function (_Ice$Object4) {
_inherits(_class64, _Ice$Object4);
function _class64() {
_classCallCheck(this, _class64);
return _possibleConstructorReturn(this, _getPrototypeOf(_class64).apply(this, arguments));
}
return _class64;
}(Ice.Object);
IceGrid.NodeObserverPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx4) {
_inherits(_class65, _Ice$ObjectPrx4);
function _class65() {
_classCallCheck(this, _class65);
return _possibleConstructorReturn(this, _getPrototypeOf(_class65).apply(this, arguments));
}
return _class65;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.NodeObserver, IceGrid.NodeObserverPrx, iceC_IceGrid_NodeObserver_ids, 1, {
"nodeInit": [,,,,, [["IceGrid.NodeDynamicInfoSeqHelper"]],,,,],
"nodeUp": [,,,,, [[IceGrid.NodeDynamicInfo]],,,,],
"nodeDown": [,,,,, [[7]],,,,],
"updateServer": [,,,,, [[7], [IceGrid.ServerDynamicInfo]],,,,],
"updateAdapter": [,,,,, [[7], [IceGrid.AdapterDynamicInfo]],,,,]
});
var iceC_IceGrid_ApplicationObserver_ids = ["::Ice::Object", "::IceGrid::ApplicationObserver"];
/**
* The database observer interface. Observers should implement this
* interface to receive information about the state of the IceGrid
* registry database.
*
**/
IceGrid.ApplicationObserver =
/*#__PURE__*/
function (_Ice$Object5) {
_inherits(_class66, _Ice$Object5);
function _class66() {
_classCallCheck(this, _class66);
return _possibleConstructorReturn(this, _getPrototypeOf(_class66).apply(this, arguments));
}
return _class66;
}(Ice.Object);
IceGrid.ApplicationObserverPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx5) {
_inherits(_class67, _Ice$ObjectPrx5);
function _class67() {
_classCallCheck(this, _class67);
return _possibleConstructorReturn(this, _getPrototypeOf(_class67).apply(this, arguments));
}
return _class67;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.ApplicationObserver, IceGrid.ApplicationObserverPrx, iceC_IceGrid_ApplicationObserver_ids, 1, {
"applicationInit": [,,,,, [[3], ["IceGrid.ApplicationInfoSeqHelper"]],,, true],
"applicationAdded": [,,,,, [[3], [IceGrid.ApplicationInfo]],,, true],
"applicationRemoved": [,,,,, [[3], [7]],,,,],
"applicationUpdated": [,,,,, [[3], [IceGrid.ApplicationUpdateInfo]],,, true]
});
var iceC_IceGrid_AdapterObserver_ids = ["::Ice::Object", "::IceGrid::AdapterObserver"];
/**
* This interface allows applications to monitor the state of object
* adapters that are registered with IceGrid.
*
**/
IceGrid.AdapterObserver =
/*#__PURE__*/
function (_Ice$Object6) {
_inherits(_class68, _Ice$Object6);
function _class68() {
_classCallCheck(this, _class68);
return _possibleConstructorReturn(this, _getPrototypeOf(_class68).apply(this, arguments));
}
return _class68;
}(Ice.Object);
IceGrid.AdapterObserverPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx6) {
_inherits(_class69, _Ice$ObjectPrx6);
function _class69() {
_classCallCheck(this, _class69);
return _possibleConstructorReturn(this, _getPrototypeOf(_class69).apply(this, arguments));
}
return _class69;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.AdapterObserver, IceGrid.AdapterObserverPrx, iceC_IceGrid_AdapterObserver_ids, 1, {
"adapterInit": [,,,,, [["IceGrid.AdapterInfoSeqHelper"]],,,,],
"adapterAdded": [,,,,, [[IceGrid.AdapterInfo]],,,,],
"adapterUpdated": [,,,,, [[IceGrid.AdapterInfo]],,,,],
"adapterRemoved": [,,,,, [[7]],,,,]
});
var iceC_IceGrid_ObjectObserver_ids = ["::Ice::Object", "::IceGrid::ObjectObserver"];
/**
* This interface allows applications to monitor IceGrid well-known objects.
*
**/
IceGrid.ObjectObserver =
/*#__PURE__*/
function (_Ice$Object7) {
_inherits(_class70, _Ice$Object7);
function _class70() {
_classCallCheck(this, _class70);
return _possibleConstructorReturn(this, _getPrototypeOf(_class70).apply(this, arguments));
}
return _class70;
}(Ice.Object);
IceGrid.ObjectObserverPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx7) {
_inherits(_class71, _Ice$ObjectPrx7);
function _class71() {
_classCallCheck(this, _class71);
return _possibleConstructorReturn(this, _getPrototypeOf(_class71).apply(this, arguments));
}
return _class71;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.ObjectObserver, IceGrid.ObjectObserverPrx, iceC_IceGrid_ObjectObserver_ids, 1, {
"objectInit": [,,,,, [["IceGrid.ObjectInfoSeqHelper"]],,,,],
"objectAdded": [,,,,, [[IceGrid.ObjectInfo]],,,,],
"objectUpdated": [,,,,, [[IceGrid.ObjectInfo]],,,,],
"objectRemoved": [,,,,, [[Ice.Identity]],,,,]
});
var iceC_IceGrid_AdminSession_ids = ["::Glacier2::Session", "::Ice::Object", "::IceGrid::AdminSession"];
/**
* Used by administrative clients to view,
* update, and receive observer updates from the IceGrid
* registry. Admin sessions are created either via the {@link Registry}
* object or via the registry admin <code>SessionManager</code> object.
*
* @see Registry
*
**/
IceGrid.AdminSession =
/*#__PURE__*/
function (_Ice$Object8) {
_inherits(_class72, _Ice$Object8);
function _class72() {
_classCallCheck(this, _class72);
return _possibleConstructorReturn(this, _getPrototypeOf(_class72).apply(this, arguments));
}
_createClass(_class72, null, [{
key: "_iceImplements",
get: function get() {
return [Glacier2.Session];
}
}]);
return _class72;
}(Ice.Object);
IceGrid.AdminSessionPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx8) {
_inherits(_class73, _Ice$ObjectPrx8);
function _class73() {
_classCallCheck(this, _class73);
return _possibleConstructorReturn(this, _getPrototypeOf(_class73).apply(this, arguments));
}
_createClass(_class73, null, [{
key: "_implements",
get: function get() {
return [Glacier2.SessionPrx];
}
}]);
return _class73;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.AdminSession, IceGrid.AdminSessionPrx, iceC_IceGrid_AdminSession_ids, 2, {
"keepAlive": [, 2, 2,,,,,,,],
"getAdmin": [, 2, 1,, ["IceGrid.AdminPrx"],,,,,],
"getAdminCallbackTemplate": [, 2, 2,, [9],,,,,],
"setObservers": [, 2, 2,,, [["IceGrid.RegistryObserverPrx"], ["IceGrid.NodeObserverPrx"], ["IceGrid.ApplicationObserverPrx"], ["IceGrid.AdapterObserverPrx"], ["IceGrid.ObjectObserverPrx"]],, [IceGrid.ObserverAlreadyRegisteredException],,],
"setObserversByIdentity": [, 2, 2,,, [[Ice.Identity], [Ice.Identity], [Ice.Identity], [Ice.Identity], [Ice.Identity]],, [IceGrid.ObserverAlreadyRegisteredException],,],
"startUpdate": [,,,, [3],,, [IceGrid.AccessDeniedException],,],
"finishUpdate": [,,,,,,, [IceGrid.AccessDeniedException],,],
"getReplicaName": [, 2, 2,, [7],,,,,],
"openServerLog": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [7], [3]],, [IceGrid.DeploymentException, IceGrid.FileNotAvailableException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"openServerStdErr": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.DeploymentException, IceGrid.FileNotAvailableException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"openServerStdOut": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.DeploymentException, IceGrid.FileNotAvailableException, IceGrid.NodeUnreachableException, IceGrid.ServerNotExistException],,],
"openNodeStdErr": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.FileNotAvailableException, IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"openNodeStdOut": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.FileNotAvailableException, IceGrid.NodeNotExistException, IceGrid.NodeUnreachableException],,],
"openRegistryStdErr": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.FileNotAvailableException, IceGrid.RegistryNotExistException, IceGrid.RegistryUnreachableException],,],
"openRegistryStdOut": [,,,, ["IceGrid.FileIteratorPrx"], [[7], [3]],, [IceGrid.FileNotAvailableException, IceGrid.RegistryNotExistException, IceGrid.RegistryUnreachableException],,]
});
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `FileParser.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
/**
* This exception is raised if an error occurs during parsing.
*
**/
IceGrid.ParseException =
/*#__PURE__*/
function (_Ice$UserException21) {
_inherits(_class74, _Ice$UserException21);
function _class74() {
var _this35;
var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
var _cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
_classCallCheck(this, _class74);
_this35 = _possibleConstructorReturn(this, _getPrototypeOf(_class74).call(this, _cause));
_this35.reason = reason;
return _this35;
}
_createClass(_class74, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.ParseException;
}
}, {
key: "_writeMemberImpl",
value: function _writeMemberImpl(ostr) {
ostr.writeString(this.reason);
}
}, {
key: "_readMemberImpl",
value: function _readMemberImpl(istr) {
this.reason = istr.readString();
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::ParseException";
}
}]);
return _class74;
}(Ice.UserException);
var iceC_IceGrid_FileParser_ids = ["::Ice::Object", "::IceGrid::FileParser"];
/**
* <code>icegridadmin</code> provides a {@link FileParser}
* object to transform XML files into {@link ApplicationDescriptor}
* objects.
*
**/
IceGrid.FileParser =
/*#__PURE__*/
function (_Ice$Object9) {
_inherits(_class75, _Ice$Object9);
function _class75() {
_classCallCheck(this, _class75);
return _possibleConstructorReturn(this, _getPrototypeOf(_class75).apply(this, arguments));
}
return _class75;
}(Ice.Object);
IceGrid.FileParserPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx9) {
_inherits(_class76, _Ice$ObjectPrx9);
function _class76() {
_classCallCheck(this, _class76);
return _possibleConstructorReturn(this, _getPrototypeOf(_class76).apply(this, arguments));
}
return _class76;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.FileParser, IceGrid.FileParserPrx, iceC_IceGrid_FileParser_ids, 1, {
"parse": [, 2, 2,, [IceGrid.ApplicationDescriptor], [[7], ["IceGrid.AdminPrx"]],, [IceGrid.ParseException],, true]
});
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Session.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
var iceC_IceGrid_Session_ids = ["::Glacier2::Session", "::Ice::Object", "::IceGrid::Session"];
/**
* A session object is used by IceGrid clients to allocate and
* release objects. Client sessions are created either via the
* {@link Registry} object or via the registry client <code>SessionManager</code>
* object.
*
* @see Registry
*
**/
IceGrid.Session =
/*#__PURE__*/
function (_Ice$Object10) {
_inherits(_class77, _Ice$Object10);
function _class77() {
_classCallCheck(this, _class77);
return _possibleConstructorReturn(this, _getPrototypeOf(_class77).apply(this, arguments));
}
_createClass(_class77, null, [{
key: "_iceImplements",
get: function get() {
return [Glacier2.Session];
}
}]);
return _class77;
}(Ice.Object);
IceGrid.SessionPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx10) {
_inherits(_class78, _Ice$ObjectPrx10);
function _class78() {
_classCallCheck(this, _class78);
return _possibleConstructorReturn(this, _getPrototypeOf(_class78).apply(this, arguments));
}
_createClass(_class78, null, [{
key: "_implements",
get: function get() {
return [Glacier2.SessionPrx];
}
}]);
return _class78;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.Session, IceGrid.SessionPrx, iceC_IceGrid_Session_ids, 2, {
"keepAlive": [, 2, 2,,,,,,,],
"allocateObjectById": [,,,, [9], [[Ice.Identity]],, [IceGrid.AllocationException, IceGrid.ObjectNotRegisteredException],,],
"allocateObjectByType": [,,,, [9], [[7]],, [IceGrid.AllocationException],,],
"releaseObject": [,,,,, [[Ice.Identity]],, [IceGrid.AllocationException, IceGrid.ObjectNotRegisteredException],,],
"setAllocationTimeout": [, 2, 2,,, [[3]],,,,]
});
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `Registry.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
/**
* Determines which load sampling interval to use.
*
**/
IceGrid.LoadSample = Slice.defineEnum([['LoadSample1', 0], ['LoadSample5', 1], ['LoadSample15', 2]]);
var iceC_IceGrid_Query_ids = ["::Ice::Object", "::IceGrid::Query"];
/**
* The IceGrid query interface. This interface is accessible to
* Ice clients who wish to look up well-known objects.
*
**/
IceGrid.Query =
/*#__PURE__*/
function (_Ice$Object11) {
_inherits(_class79, _Ice$Object11);
function _class79() {
_classCallCheck(this, _class79);
return _possibleConstructorReturn(this, _getPrototypeOf(_class79).apply(this, arguments));
}
return _class79;
}(Ice.Object);
IceGrid.QueryPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx11) {
_inherits(_class80, _Ice$ObjectPrx11);
function _class80() {
_classCallCheck(this, _class80);
return _possibleConstructorReturn(this, _getPrototypeOf(_class80).apply(this, arguments));
}
return _class80;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.Query, IceGrid.QueryPrx, iceC_IceGrid_Query_ids, 1, {
"findObjectById": [, 2, 1,, [9], [[Ice.Identity]],,,,],
"findObjectByType": [, 2, 1,, [9], [[7]],,,,],
"findObjectByTypeOnLeastLoadedNode": [, 2, 1,, [9], [[7], [IceGrid.LoadSample._helper]],,,,],
"findAllObjectsByType": [, 2, 1,, ["Ice.ObjectProxySeqHelper"], [[7]],,,,],
"findAllReplicas": [, 2, 2,, ["Ice.ObjectProxySeqHelper"], [[9]],,,,]
});
var iceC_IceGrid_Registry_ids = ["::Ice::Object", "::IceGrid::Registry"];
/**
* The IceGrid registry allows clients create sessions
* directly with the registry.
*
* @see Session
* @see AdminSession
*
**/
IceGrid.Registry =
/*#__PURE__*/
function (_Ice$Object12) {
_inherits(_class81, _Ice$Object12);
function _class81() {
_classCallCheck(this, _class81);
return _possibleConstructorReturn(this, _getPrototypeOf(_class81).apply(this, arguments));
}
return _class81;
}(Ice.Object);
IceGrid.RegistryPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx12) {
_inherits(_class82, _Ice$ObjectPrx12);
function _class82() {
_classCallCheck(this, _class82);
return _possibleConstructorReturn(this, _getPrototypeOf(_class82).apply(this, arguments));
}
return _class82;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.Registry, IceGrid.RegistryPrx, iceC_IceGrid_Registry_ids, 1, {
"createSession": [,,,, ["IceGrid.SessionPrx"], [[7], [7]],, [IceGrid.PermissionDeniedException],,],
"createAdminSession": [,,,, ["IceGrid.AdminSessionPrx"], [[7], [7]],, [IceGrid.PermissionDeniedException],,],
"createSessionFromSecureConnection": [,,,, ["IceGrid.SessionPrx"],,, [IceGrid.PermissionDeniedException],,],
"createAdminSessionFromSecureConnection": [,,,, ["IceGrid.AdminSessionPrx"],,, [IceGrid.PermissionDeniedException],,],
"getSessionTimeout": [, 2, 1,, [3],,,,,],
"getACMTimeout": [, 2, 1,, [3],,,,,]
});
var iceC_IceGrid_Locator_ids = ["::Ice::Locator", "::Ice::Object", "::IceGrid::Locator"];
/**
* The IceGrid locator interface provides access to the {@link Query}
* and {@link Registry} object of the IceGrid registry.
*
* @see Query
* @see Registry
*
**/
IceGrid.Locator =
/*#__PURE__*/
function (_Ice$Object13) {
_inherits(_class83, _Ice$Object13);
function _class83() {
_classCallCheck(this, _class83);
return _possibleConstructorReturn(this, _getPrototypeOf(_class83).apply(this, arguments));
}
_createClass(_class83, null, [{
key: "_iceImplements",
get: function get() {
return [Ice.Locator];
}
}]);
return _class83;
}(Ice.Object);
IceGrid.LocatorPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx13) {
_inherits(_class84, _Ice$ObjectPrx13);
function _class84() {
_classCallCheck(this, _class84);
return _possibleConstructorReturn(this, _getPrototypeOf(_class84).apply(this, arguments));
}
_createClass(_class84, null, [{
key: "_implements",
get: function get() {
return [Ice.LocatorPrx];
}
}]);
return _class84;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.Locator, IceGrid.LocatorPrx, iceC_IceGrid_Locator_ids, 2, {
"getLocalRegistry": [, 2, 2,, ["IceGrid.RegistryPrx"],,,,,],
"getLocalQuery": [, 2, 2,, ["IceGrid.QueryPrx"],,,,,]
});
})();
(function () {
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.2
//
// <auto-generated>
//
// Generated from file `UserAccountMapper.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
/* eslint-disable */
/* jshint ignore: start */
/**
* This exception is raised if a user account for a given session
* identifier can't be found.
*
**/
IceGrid.UserAccountNotFoundException =
/*#__PURE__*/
function (_Ice$UserException22) {
_inherits(_class85, _Ice$UserException22);
function _class85() {
var _cause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
_classCallCheck(this, _class85);
return _possibleConstructorReturn(this, _getPrototypeOf(_class85).call(this, _cause));
}
_createClass(_class85, [{
key: "_mostDerivedType",
value: function _mostDerivedType() {
return IceGrid.UserAccountNotFoundException;
}
}], [{
key: "_parent",
get: function get() {
return Ice.UserException;
}
}, {
key: "_id",
get: function get() {
return "::IceGrid::UserAccountNotFoundException";
}
}]);
return _class85;
}(Ice.UserException);
var iceC_IceGrid_UserAccountMapper_ids = ["::Ice::Object", "::IceGrid::UserAccountMapper"];
/**
* A user account mapper object is used by IceGrid nodes to map
* session identifiers to user accounts.
*
**/
IceGrid.UserAccountMapper =
/*#__PURE__*/
function (_Ice$Object14) {
_inherits(_class86, _Ice$Object14);
function _class86() {
_classCallCheck(this, _class86);
return _possibleConstructorReturn(this, _getPrototypeOf(_class86).apply(this, arguments));
}
return _class86;
}(Ice.Object);
IceGrid.UserAccountMapperPrx =
/*#__PURE__*/
function (_Ice$ObjectPrx14) {
_inherits(_class87, _Ice$ObjectPrx14);
function _class87() {
_classCallCheck(this, _class87);
return _possibleConstructorReturn(this, _getPrototypeOf(_class87).apply(this, arguments));
}
return _class87;
}(Ice.ObjectPrx);
Slice.defineOperations(IceGrid.UserAccountMapper, IceGrid.UserAccountMapperPrx, iceC_IceGrid_UserAccountMapper_ids, 1, {
"getUserAccount": [,,,, [7], [[7]],, [IceGrid.UserAccountNotFoundException],,]
});
})();
(function () {//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
})();
root.IceGrid = IceGrid;
root.ice = ice;
})();
//# sourceMappingURL=IceGrid.js.map
|
'use strict';
// Flags: --expose-internals
// This test ensures that the type checking of ModuleMap throws
// errors appropriately
require('../common');
const assert = require('assert');
const { URL } = require('url');
const { Loader } = require('internal/modules/esm/loader');
const ModuleMap = require('internal/modules/esm/module_map');
const ModuleJob = require('internal/modules/esm/module_job');
const createDynamicModule = require(
'internal/modules/esm/create_dynamic_module');
const stubModuleUrl = new URL('file://tmp/test');
const stubModule = createDynamicModule(['default'], stubModuleUrl);
const loader = new Loader();
const moduleMap = new ModuleMap();
const moduleJob = new ModuleJob(loader, stubModule.module,
() => new Promise(() => {}));
assert.throws(
() => moduleMap.get(1),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "url" argument must be of type string. Received type number' +
' (1)'
}
);
assert.throws(
() => moduleMap.set(1, moduleJob),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "url" argument must be of type string. Received type number' +
' (1)'
}
);
assert.throws(
() => moduleMap.set('somestring', 'notamodulejob'),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "job" argument must be an instance of ModuleJob. ' +
"Received type string ('notamodulejob')"
}
);
assert.throws(
() => moduleMap.has(1),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "url" argument must be of type string. Received type number' +
' (1)'
}
);
|
/*!
* Bootstrap-select v1.13.6 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2019 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
*/
!function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function(e){e.fn.selectpicker.defaults={noneSelectedText:"\ud56d\ubaa9\uc744 \uc120\ud0dd\ud574\uc8fc\uc138\uc694",noneResultsText:"{0} \uac80\uc0c9 \uacb0\uacfc\uac00 \uc5c6\uc2b5\ub2c8\ub2e4",countSelectedText:function(e,t){return"{0}\uac1c\ub97c \uc120\ud0dd\ud558\uc600\uc2b5\ub2c8\ub2e4"},maxOptionsText:function(e,t){return["{n}\uac1c\uae4c\uc9c0 \uc120\ud0dd \uac00\ub2a5\ud569\ub2c8\ub2e4","\ud574\ub2f9 \uadf8\ub8f9\uc740 {n}\uac1c\uae4c\uc9c0 \uc120\ud0dd \uac00\ub2a5\ud569\ub2c8\ub2e4"]},selectAllText:"\uc804\uccb4\uc120\ud0dd",deselectAllText:"\uc804\uccb4\ud574\uc81c",multipleSeparator:", "}}); |
var resemblejs = require('resemblejs');
var canvas = require('canvas');
var imageType = require('image-type');
module.exports = function() {
//override FileReader
this.FileReader = function(){};
this.FileReader.prototype.readAsDataURL = function(buffer) {
this.onload({
target: {
result: 'data:image/' + imageType(buffer) + ';base64,' + buffer.toString('base64')
}
});
};
//override Image
this.Image = canvas.Image;
this.Image.prototype.setAttribute = function() {};
//override document.createElement('canvas')
this.document = {
createElement: function(tag) {
if(tag !== 'canvas') {
return false;
}
return new canvas;
}
};
return resemblejs.resemble.apply(this, arguments);
}; |
/* Blob.js
* A Blob implementation.
* 2014-07-24
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/dsamarin
* License: MIT
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
*/
/*global self, unescape */
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
plusplus: true */
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
(function (view) {
"use strict";
view.URL = view.URL || view.webkitURL;
if (view.Blob && view.URL) {
try {
new Blob;
return;
} catch (e) {}
}
// Internally we use a BlobBuilder implementation to base Blob off of
// in order to support older browsers that only have BlobBuilder
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
var
get_class = function(object) {
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
}
, FakeBlobBuilder = function BlobBuilder() {
this.data = [];
}
, FakeBlob = function Blob(data, type, encoding) {
this.data = data;
this.size = data.length;
this.type = type;
this.encoding = encoding;
}
, FBB_proto = FakeBlobBuilder.prototype
, FB_proto = FakeBlob.prototype
, FileReaderSync = view.FileReaderSync
, FileException = function(type) {
this.code = this[this.name = type];
}
, file_ex_codes = (
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
).split(" ")
, file_ex_code = file_ex_codes.length
, real_URL = view.URL || view.webkitURL || view
, real_create_object_URL = real_URL.createObjectURL
, real_revoke_object_URL = real_URL.revokeObjectURL
, URL = real_URL
, btoa = view.btoa
, atob = view.atob
, ArrayBuffer = view.ArrayBuffer
, Uint8Array = view.Uint8Array
, origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/
;
FakeBlob.fake = FB_proto.fake = true;
while (file_ex_code--) {
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
}
// Polyfill URL
if (!real_URL.createObjectURL) {
URL = view.URL = function(uri) {
var
uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
, uri_origin
;
uri_info.href = uri;
if (!("origin" in uri_info)) {
if (uri_info.protocol.toLowerCase() === "data:") {
uri_info.origin = null;
} else {
uri_origin = uri.match(origin);
uri_info.origin = uri_origin && uri_origin[1];
}
}
return uri_info;
};
}
URL.createObjectURL = function(blob) {
var
type = blob.type
, data_URI_header
;
if (type === null) {
type = "application/octet-stream";
}
if (blob instanceof FakeBlob) {
data_URI_header = "data:" + type;
if (blob.encoding === "base64") {
return data_URI_header + ";base64," + blob.data;
} else if (blob.encoding === "URI") {
return data_URI_header + "," + decodeURIComponent(blob.data);
} if (btoa) {
return data_URI_header + ";base64," + btoa(blob.data);
} else {
return data_URI_header + "," + encodeURIComponent(blob.data);
}
} else if (real_create_object_URL) {
return real_create_object_URL.call(real_URL, blob);
}
};
URL.revokeObjectURL = function(object_URL) {
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
real_revoke_object_URL.call(real_URL, object_URL);
}
};
FBB_proto.append = function(data/*, endings*/) {
var bb = this.data;
// decode data to a binary string
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
var
str = ""
, buf = new Uint8Array(data)
, i = 0
, buf_len = buf.length
;
for (; i < buf_len; i++) {
str += String.fromCharCode(buf[i]);
}
bb.push(str);
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
if (FileReaderSync) {
var fr = new FileReaderSync;
bb.push(fr.readAsBinaryString(data));
} else {
// async FileReader won't work as BlobBuilder is sync
throw new FileException("NOT_READABLE_ERR");
}
} else if (data instanceof FakeBlob) {
if (data.encoding === "base64" && atob) {
bb.push(atob(data.data));
} else if (data.encoding === "URI") {
bb.push(decodeURIComponent(data.data));
} else if (data.encoding === "raw") {
bb.push(data.data);
}
} else {
if (typeof data !== "string") {
data += ""; // convert unsupported types to strings
}
// decode UTF-16 to binary string
bb.push(unescape(encodeURIComponent(data)));
}
};
FBB_proto.getBlob = function(type) {
if (!arguments.length) {
type = null;
}
return new FakeBlob(this.data.join(""), type, "raw");
};
FBB_proto.toString = function() {
return "[object BlobBuilder]";
};
FB_proto.slice = function(start, end, type) {
var args = arguments.length;
if (args < 3) {
type = null;
}
return new FakeBlob(
this.data.slice(start, args > 1 ? end : this.data.length)
, type
, this.encoding
);
};
FB_proto.toString = function() {
return "[object Blob]";
};
FB_proto.close = function() {
this.size = 0;
delete this.data;
};
return FakeBlobBuilder;
}(view));
view.Blob = function(blobParts, options) {
var type = options ? (options.type || "") : "";
var builder = new BlobBuilder();
if (blobParts) {
for (var i = 0, len = blobParts.length; i < len; i++) {
if (Uint8Array && blobParts[i] instanceof Uint8Array) {
builder.append(blobParts[i].buffer);
}
else {
builder.append(blobParts[i]);
}
}
}
var blob = builder.getBlob(type);
if (!blob.slice && blob.webkitSlice) {
blob.slice = blob.webkitSlice;
}
return blob;
};
var getPrototypeOf = Object.getPrototypeOf || function(object) {
return object.__proto__;
};
view.Blob.prototype = getPrototypeOf(new view.Blob());
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
|
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Generated bundle index. Do not edit.
*/
export { Angulartics2UirouterModule, UIRouterTracking } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhcnRpY3MyLXVpcm91dGVybW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhcnRpY3MyL3Vpcm91dGVybW9kdWxlLyIsInNvdXJjZXMiOlsiYW5ndWxhcnRpY3MyLXVpcm91dGVybW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSw2REFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0= |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import Typography from '../Typography';
export var styles = {
/* Styles applied to the root element. */
root: {
margin: 0,
padding: '16px 24px',
flex: '0 0 auto'
}
};
var DialogTitle = React.forwardRef(function DialogTitle(props, ref) {
var children = props.children,
classes = props.classes,
className = props.className,
_props$disableTypogra = props.disableTypography,
disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,
other = _objectWithoutProperties(props, ["children", "classes", "className", "disableTypography"]);
return React.createElement("div", _extends({
className: clsx(classes.root, className),
ref: ref
}, other), disableTypography ? children : React.createElement(Typography, {
component: "h2",
variant: "h6"
}, children));
});
process.env.NODE_ENV !== "production" ? DialogTitle.propTypes = {
/**
* The content of the component.
*/
children: PropTypes.node.isRequired,
/**
* Override or extend the styles applied to the component.
* See [CSS API](#css) below for more details.
*/
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className: PropTypes.string,
/**
* If `true`, the children won't be wrapped by a typography component.
* For instance, this can be useful to render an h4 instead of the default h2.
*/
disableTypography: PropTypes.bool
} : void 0;
export default withStyles(styles, {
name: 'MuiDialogTitle'
})(DialogTitle); |
import CodeMirror from 'codemirror';
import 'codemirror/addon/runmode/runmode';
import 'codemirror/mode/jsx/jsx';
import React from 'react';
import ReactDOM from 'react-dom';
import {Router, browserHistory} from 'react-router';
import Root from './src/Root';
import routes from './src/Routes';
import 'bootstrap/less/bootstrap.less';
import './assets/docs.css';
import './assets/style.css';
import 'codemirror/lib/codemirror.css';
import 'codemirror/theme/solarized.css';
import './assets/CodeMirror.css';
import './assets/carousel.png';
import './assets/logo.png';
import './assets/favicon.ico';
import './assets/thumbnail.png';
import './assets/thumbnaildiv.png';
import './assets/TheresaKnott_castle.svg';
global.CodeMirror = CodeMirror;
Root.assetBaseUrl = window.ASSET_BASE_URL;
Root.propData = window.PROP_DATA;
ReactDOM.render(
<Router history={browserHistory} children={routes} />,
document
);
|
Clazz.declarePackage ("J.constant");
Clazz.load (["java.lang.Enum"], "J.constant.EnumAnimationMode", null, function () {
c$ = Clazz.declareType (J.constant, "EnumAnimationMode", Enum);
Clazz.defineEnumConstant (c$, "ONCE", 0, []);
Clazz.defineEnumConstant (c$, "LOOP", 1, []);
Clazz.defineEnumConstant (c$, "PALINDROME", 2, []);
});
|
$(document).click(function (event) {
if (
$('.toggle > input').is(':checked') &&
!$(event.target).parents('.toggle').is('.toggle')
) {
$('.toggle > input').prop('checked', false);
}
}); |
define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
var blockPrefix = 'razor-block-';
var RazorLangHighlightRules = function() {
CSharpHighlightRules.call(this);
var processPotentialCallback = function(value, stackItem) {
if (typeof stackItem === "function")
return stackItem(value);
return stackItem;
};
var inBraces = 'in-braces';
this.$rules.start.unshift({
regex: '[\\[({]',
onMatch: function(value, state, stack) {
var prefix = /razor-[^\-]+-/.exec(state)[0];
stack.unshift(value);
stack.unshift(prefix + inBraces);
this.next = prefix + inBraces;
return 'paren.lparen';
}
});
var parentCloseMap = {
'{': '}',
'[': ']',
'(': ')'
};
this.$rules[inBraces] = lang.deepCopy(this.$rules.start);
this.$rules[inBraces].unshift({
regex: '[\\])}]',
onMatch: function(value, state, stack) {
var open = stack[1];
if (parentCloseMap[open] !== value)
return 'invalid.illegal';
stack.shift(); // exit in-braces block
stack.shift(); // exit brace marker
this.next = processPotentialCallback(value, stack[0]) || 'start';
return 'paren.rparen';
}
});
};
oop.inherits(RazorLangHighlightRules, CSharpHighlightRules);
var RazorHighlightRules = function() {
HtmlHighlightRules.call(this);
// 'Blocks': @{}, @(), @functions{}
var blockStartRule = {
regex: '@[({]|@functions{',
onMatch: function(value, state, stack) {
stack.unshift(value);
stack.unshift('razor-block-start');
this.next = 'razor-block-start';
return 'punctuation.block.razor';
}
};
var blockEndMap = {
'@{': '}',
'@(': ')',
'@functions{':'}'
};
var blockEndRule = {
regex: '[})]',
onMatch: function(value, state, stack) {
var blockStart = stack[1];
if (blockEndMap[blockStart] !== value)
return 'invalid.illegal';
stack.shift(); // exit razor block
stack.shift(); // remove block type marker
this.next = stack.shift() || 'start';
return 'punctuation.block.razor';
}
};
// Short: @Abc.Cde(Xyz).Ef
var shortStartRule = {
regex: "@(?![{(])",
onMatch: function(value, state, stack) {
stack.unshift("razor-short-start");
this.next = "razor-short-start";
return 'punctuation.short.razor';
}
};
var shortEndRule = {
token: "",
regex: "(?=[^A-Za-z_\\.()\\[\\]])",
next: 'pop'
};
// Control flow: @if, etc
var ifStartRule = {
regex: "@(?=if)",
onMatch: function(value, state, stack) {
stack.unshift(function(value) {
if (value !== '}')
return 'start';
return stack.shift() || 'start';
});
this.next = 'razor-block-start';
return 'punctuation.control.razor';
}
};
// Combined:
var razorStartRules = [
{
token: ["meta.directive.razor", "text", "identifier"],
regex: "^(\\s*@model)(\\s+)(.+)$"
},
blockStartRule,
//ifStartRule,
shortStartRule
];
for (var key in this.$rules)
this.$rules[key].unshift.apply(this.$rules[key], razorStartRules);
this.embedRules(RazorLangHighlightRules, "razor-block-", [blockEndRule], ["start"]);
this.embedRules(RazorLangHighlightRules, "razor-short-", [shortEndRule], ["start"]);
this.normalizeRules();
};
oop.inherits(RazorHighlightRules, HtmlHighlightRules);
exports.RazorHighlightRules = RazorHighlightRules;
exports.RazorLangHighlightRules = RazorLangHighlightRules;
});
|
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'image2', 'vi', {
alt: 'Chú thích ảnh',
btnUpload: 'Tải lên máy chủ',
captioned: 'Ảnh có chú thích',
captionPlaceholder: 'Caption', // MISSING
infoTab: 'Thông tin của ảnh',
lockRatio: 'Giữ nguyên tỷ lệ',
menu: 'Thuộc tính của ảnh',
pathName: 'ảnh',
pathNameCaption: 'chú thích',
resetSize: 'Kích thước gốc',
resizer: 'Kéo rê để thay đổi kích cỡ',
title: 'Thuộc tính của ảnh',
uploadTab: 'Tải lên',
urlMissing: 'Thiếu đường dẫn hình ảnh'
} );
|
var assert = require('assert');
describe('csscomb methods', function() {
it('getConfig()', function() {
var config = require('../../../config/csscomb.json');
assert.equal(this.Comb.getConfig(), config);
});
it('getConfig(number)', function() {
assert.throws(function() {
this.Comb.getConfig(16);
});
});
it('getConfig(boolean)', function() {
assert.throws(function() {
this.Comb.getConfig(true);
});
});
it('getConfig(empty string)', function() {
var config = require('../../../config/csscomb.json');
assert.equal(this.Comb.getConfig(''), config);
});
it('getConfig(invalid string)', function() {
assert.throws(function() {
this.Comb.getConfig('nani');
});
});
it('getConfig(csscomb)', function() {
var config = require('../../../config/csscomb.json');
assert.equal(this.Comb.getConfig('csscomb'), config);
});
it('getConfig(zen)', function() {
var config = require('../../../config/zen.json');
assert.equal(this.Comb.getConfig('zen'), config);
});
it('getConfig(yandex)', function() {
var config = require('../../../config/yandex.json');
assert.equal(this.Comb.getConfig('yandex'), config);
});
});
|
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("./Compilation")} Compilation */
/** @typedef {import("./NormalModule")} NormalModule */
/** @typedef {Record<string, any>} PreparsedAst */
/**
* @typedef {Object} ParserStateBase
* @property {NormalModule} current
* @property {NormalModule} module
* @property {Compilation} compilation
* @property {{[k: string]: any}} options
*/
/** @typedef {Record<string, any> & ParserStateBase} ParserState */
class Parser {
/* istanbul ignore next */
/**
* @abstract
* @param {string | Buffer | PreparsedAst} source the source to parse
* @param {ParserState} state the parser state
* @returns {ParserState} the parser state
*/
parse(source, state) {
const AbstractMethodError = require("./AbstractMethodError");
throw new AbstractMethodError();
}
}
module.exports = Parser;
|
var parent = require('../../actual/string/fixed');
module.exports = parent;
|
import type { Action } from "../actions/types";
import { SET_INDEX } from "../actions/list";
export type State = {
list: string
};
const initialState = {
list: [
"React Native Starter Kit",
"React Navigation",
"NativeBase Easy Grid",
"NativeBase",
"CodePush",
"Redux"
],
selectedIndex: undefined
};
export default function(state: State = initialState, action: Action): State {
if (action.type === SET_INDEX) {
return {
...state,
selectedIndex: action.payload
};
}
return state;
}
|
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'use strict';
/**
* @class
* Initializes a new instance of the BootDiagnosticsInstanceView class.
* @constructor
* The instance view of a virtual machine boot diagnostics.
* @member {string} [consoleScreenshotBlobUri] the console screenshot blob Uri.
*
* @member {string} [serialConsoleLogBlobUri] the Linux serial console log
* blob Uri.
*
*/
function BootDiagnosticsInstanceView() {
}
/**
* Defines the metadata of BootDiagnosticsInstanceView
*
* @returns {object} metadata of BootDiagnosticsInstanceView
*
*/
BootDiagnosticsInstanceView.prototype.mapper = function () {
return {
required: false,
serializedName: 'BootDiagnosticsInstanceView',
type: {
name: 'Composite',
className: 'BootDiagnosticsInstanceView',
modelProperties: {
consoleScreenshotBlobUri: {
required: false,
serializedName: 'consoleScreenshotBlobUri',
type: {
name: 'String'
}
},
serialConsoleLogBlobUri: {
required: false,
serializedName: 'serialConsoleLogBlobUri',
type: {
name: 'String'
}
}
}
}
};
};
module.exports = BootDiagnosticsInstanceView;
|
suite('rb/resources/models/ValidateDiffModel', function() {
var model;
beforeEach(function() {
model = new RB.ValidateDiffModel();
});
describe('methods', function() {
describe('url', function() {
it('Without local site', function() {
expect(_.result(model, 'url')).toBe('/api/validation/diffs/');
});
it('With local site', function() {
model.set('localSitePrefix', 's/test-site/');
expect(_.result(model, 'url')).toBe('/s/test-site/api/validation/diffs/');
});
});
});
describe('toJSON', function() {
it('repository field', function() {
var data;
model.set('repository', 123);
data = model.toJSON();
expect(model.get('repository')).toBe(123);
});
});
});
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createHelper = require('./createHelper');
var _createHelper2 = _interopRequireDefault(_createHelper);
var _createElement = require('./createElement');
var _createElement2 = _interopRequireDefault(_createElement);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getContext = function getContext(contextTypes) {
return function (BaseComponent) {
var GetContext = function GetContext(ownerProps, context) {
return (0, _createElement2.default)(BaseComponent, _extends({}, ownerProps, context));
};
GetContext.contextTypes = contextTypes;
return GetContext;
};
};
exports.default = (0, _createHelper2.default)(getContext, 'getContext'); |
/* global toastr:false, moment:false */
(function () {
'use strict';
angular
.module('app.core')
.constant('moment', moment)
.constant('toastr', toastr);
})();
|
/**
* Copyright 2015 Telerik AD
*
* 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.
*/
(function(f, define){
define([], f);
})(function(){
(function( window, undefined ) {
var kendo = window.kendo || (window.kendo = { cultures: {} });
kendo.cultures["es-EC"] = {
name: "es-EC",
numberFormat: {
pattern: ["-n"],
decimals: 2,
",": ".",
".": ",",
groupSize: [3],
percent: {
pattern: ["-n %","n %"],
decimals: 2,
",": ".",
".": ",",
groupSize: [3],
symbol: "%"
},
currency: {
pattern: ["($ n)","$ n"],
decimals: 2,
",": ".",
".": ",",
groupSize: [3],
symbol: "$"
}
},
calendars: {
standard: {
days: {
names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
namesShort: ["do","lu","ma","mi","ju","vi","sá"]
},
months: {
names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],
namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]
},
AM: [""],
PM: [""],
patterns: {
d: "dd/MM/yyyy",
D: "dddd, dd' de 'MMMM' de 'yyyy",
F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
g: "dd/MM/yyyy H:mm",
G: "dd/MM/yyyy H:mm:ss",
m: "d' de 'MMMM",
M: "d' de 'MMMM",
s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
t: "H:mm",
T: "H:mm:ss",
u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
y: "MMMM' de 'yyyy",
Y: "MMMM' de 'yyyy"
},
"/": "/",
":": ":",
firstDay: 1
}
}
}
})(this);
return window.kendo;
}, typeof define == 'function' && define.amd ? define : function(_, f){ f(); }); |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/* Tabulator v4.1.1 (c) Oliver Folkerd */
var Validate = function Validate(table) {
this.table = table;
};
//validate
Validate.prototype.initializeColumn = function (column) {
var self = this,
config = [],
validator;
if (column.definition.validator) {
if (Array.isArray(column.definition.validator)) {
column.definition.validator.forEach(function (item) {
validator = self._extractValidator(item);
if (validator) {
config.push(validator);
}
});
} else {
validator = this._extractValidator(column.definition.validator);
if (validator) {
config.push(validator);
}
}
column.modules.validate = config.length ? config : false;
}
};
Validate.prototype._extractValidator = function (value) {
var parts, type, params;
switch (typeof value === "undefined" ? "undefined" : _typeof(value)) {
case "string":
parts = value.split(":", 2);
type = parts.shift();
params = parts[0];
return this._buildValidator(type, params);
break;
case "function":
return this._buildValidator(value);
break;
case "object":
return this._buildValidator(value.type, value.parameters);
break;
}
};
Validate.prototype._buildValidator = function (type, params) {
var func = typeof type == "function" ? type : this.validators[type];
if (!func) {
console.warn("Validator Setup Error - No matching validator found:", type);
return false;
} else {
return {
type: typeof type == "function" ? "function" : type,
func: func,
params: params
};
}
};
Validate.prototype.validate = function (validators, cell, value) {
var self = this,
valid = [];
if (validators) {
validators.forEach(function (item) {
if (!item.func.call(self, cell, value, item.params)) {
valid.push({
type: item.type,
parameters: item.params
});
}
});
}
return valid.length ? valid : true;
};
Validate.prototype.validators = {
//is integer
integer: function integer(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
value = Number(value);
return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
},
//is float
float: function float(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
value = Number(value);
return typeof value === 'number' && isFinite(value) && value % 1 !== 0;
},
//must be a number
numeric: function numeric(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return !isNaN(value);
},
//must be a string
string: function string(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return isNaN(value);
},
//maximum value
max: function max(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return parseFloat(value) <= parameters;
},
//minimum value
min: function min(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return parseFloat(value) >= parameters;
},
//minimum string length
minLength: function minLength(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return String(value).length >= parameters;
},
//maximum string length
maxLength: function maxLength(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
return String(value).length <= parameters;
},
//in provided value list
in: function _in(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
if (typeof parameters == "string") {
parameters = parameters.split("|");
}
return value === "" || parameters.indexOf(value) > -1;
},
//must match provided regex
regex: function regex(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
var reg = new RegExp(parameters);
return reg.test(value);
},
//value must be unique in this column
unique: function unique(cell, value, parameters) {
if (value === "" || value === null || typeof value === "undefined") {
return true;
}
var unique = true;
var cellData = cell.getData();
var column = cell.getColumn()._getSelf();
this.table.rowManager.rows.forEach(function (row) {
var data = row.getData();
if (data !== cellData) {
if (value == column.getFieldValue(data)) {
unique = false;
}
}
});
return unique;
},
//must have a value
required: function required(cell, value, parameters) {
return value !== "" & value !== null && typeof value !== "undefined";
}
};
Tabulator.prototype.registerModule("validate", Validate); |
import React, {Component} from "react";
import App from "../components/App";
class Root extends Component {
constructor() {
super();
}
render() {
return (
<div className="boilerplate-app personaBar-mainContainer">
<App />
</div>
);
}
}
export default Root; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.