├── requirejs-project ├── build │ ├── build.txt │ ├── App.jsx │ ├── jsx.js │ ├── text.js │ └── JSXTransformer.js ├── dev │ ├── app │ │ ├── App.jsx │ │ └── main.js │ └── libs │ │ ├── jsx.js │ │ ├── requirejs.js │ │ └── text.js ├── package.json ├── Gruntfile.js ├── server.js └── dist │ └── requirejs.js ├── .gitignore ├── duo-project ├── dev │ └── app │ │ ├── components │ │ └── james-huston-component-react@0.11.1 │ │ │ ├── README.md │ │ │ ├── component.json │ │ │ ├── .gitignore │ │ │ └── LICENSE │ │ ├── main.js │ │ └── App.js ├── package.json ├── server.js └── Gulpfile.js ├── webpack-project ├── dev │ └── app │ │ ├── main.js │ │ └── App.js ├── dist │ └── main.js ├── package.json ├── server.js ├── Gruntfile.js └── build │ └── main.js ├── browserify-project ├── dev │ └── app │ │ ├── main.js │ │ └── App.js ├── package.json ├── dist │ └── main.js ├── server.js ├── Gulpfile.js └── build │ └── main.js └── README.md /requirejs-project/build/build.txt: -------------------------------------------------------------------------------- 1 | 2 | main.js 3 | ---------------- 4 | react.js 5 | jsx.js 6 | jsx!App 7 | main.js 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | requirejs-project/node_modules 2 | browserify-project/node_modules 3 | webpack-project/node_modules 4 | duo-project/node_modules -------------------------------------------------------------------------------- /duo-project/dev/app/components/james-huston-component-react@0.11.1/README.md: -------------------------------------------------------------------------------- 1 | component-react 2 | =============== 3 | 4 | React.js component for easy install with Duo.js 5 | -------------------------------------------------------------------------------- /webpack-project/dev/app/main.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('react'); 3 | var App = require('./App.js'); 4 | 5 | React.renderComponent(, document.body); -------------------------------------------------------------------------------- /browserify-project/dev/app/main.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('react'); 3 | var App = require('./App.js'); 4 | 5 | React.renderComponent(, document.body); -------------------------------------------------------------------------------- /duo-project/dev/app/main.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('james-huston/component-react'); 3 | var App = require('./App.js'); 4 | 5 | React.renderComponent(, document.body); -------------------------------------------------------------------------------- /webpack-project/dist/main.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],[function(n,e,o){var r=o(1),l=o(2);r.renderComponent(l(null),document.body)},,function(n,e,o){var r=o(1),l=r.createClass({displayName:"App",render:function(){return r.DOM.h1(null,"Hello world")}});n.exports=l}]); -------------------------------------------------------------------------------- /requirejs-project/dev/app/App.jsx: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | define(['react'], function (React) { 3 | 4 | return React.createClass({ 5 | 6 | render: function () { 7 | return ( 8 |

Hello world

9 | ) 10 | } 11 | 12 | }); 13 | 14 | }); -------------------------------------------------------------------------------- /requirejs-project/build/App.jsx: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | define(['react'], function (React) { 3 | 4 | return React.createClass({ 5 | 6 | render: function () { 7 | return ( 8 |

Hello world 59

9 | ) 10 | } 11 | 12 | }); 13 | 14 | }); -------------------------------------------------------------------------------- /browserify-project/dev/app/App.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('react'); 3 | 4 | var App = React.createClass({ 5 | 6 | render: function () { 7 | return ( 8 |

Hello world

9 | ) 10 | } 11 | 12 | }); 13 | 14 | module.exports = App; -------------------------------------------------------------------------------- /webpack-project/dev/app/App.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('react'); 3 | 4 | var App = React.createClass({ 5 | 6 | render: function () { 7 | 8 | return ( 9 |

Hello world

10 | ) 11 | } 12 | 13 | }); 14 | 15 | module.exports = App; -------------------------------------------------------------------------------- /duo-project/dev/app/App.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('james-huston/component-react'); 3 | 4 | var App = React.createClass({ 5 | 6 | render: function () { 7 | return ( 8 |

Hello world

9 | ) 10 | } 11 | 12 | }); 13 | 14 | module.exports = App; -------------------------------------------------------------------------------- /requirejs-project/dev/app/main.js: -------------------------------------------------------------------------------- 1 | require.config({ 2 | paths: { 3 | 'jsx': '../libs/jsx', 4 | 'JSXTransformer': '../libs/JSXTransformer', 5 | 'react': '../libs/react', 6 | 'text': '../libs/text' 7 | }, 8 | jsx: { 9 | fileExtension: '.jsx' 10 | } 11 | }); 12 | require(['react', 'jsx!App'], function (React, App) { 13 | React.renderComponent(App(), document.body); 14 | }); -------------------------------------------------------------------------------- /requirejs-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "requirejs-project", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node server.js" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "express": "^4.8.6", 14 | "grunt": "^0.4.5", 15 | "grunt-contrib-copy": "^0.5.0", 16 | "grunt-contrib-requirejs": "^0.4.4", 17 | "requirejs": "^2.1.14" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /duo-project/dev/app/components/james-huston-component-react@0.11.1/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react", 3 | "repo": "james-huston/component-react", 4 | "description": "A javascript library for building user-interfaces, with addons. http://facebook.github.io/react", 5 | "version": "0.11.1", 6 | "keywords": [ 7 | "react", 8 | "react.js", 9 | "react-with-addons", 10 | "facebook", 11 | "jsx" 12 | ], 13 | "license": "Apache", 14 | "main": "react.js", 15 | "scripts": [ 16 | "react.js" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /duo-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "duo-project", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node server.js" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "duo": "^0.8.1", 14 | "duo-watch": "^0.1.1", 15 | "express": "^4.8.6", 16 | "gulp": "^3.8.7", 17 | "react": "^0.11.1", 18 | "react-tools": "^0.11.1", 19 | "uglify-js": "^2.4.15" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /requirejs-project/build/jsx.js: -------------------------------------------------------------------------------- 1 | define(["JSXTransformer","text"],function(e,t){var n={},r={version:"0.3.0",load:function(r,i,s,o){var u=o.jsx&&o.jsx.fileExtension||".js",a=o.jsx&&o.jsx.harmony?{harmony:!0}:null,f=function(t){try{-1===t.indexOf("@jsx React.DOM")&&(t="/** @jsx React.DOM */\n"+t),t=e.transform(t,a).code}catch(i){s.error(i)}o.isBuild?n[r]=t:typeof location!="undefined"&&(t+="\n//# sourceURL="+location.protocol+"//"+location.hostname+o.baseUrl+r+u),s.fromText(t)};t.load(r+u,i,f,o)},write:function(e,t,r){if(n.hasOwnProperty(t)){var i=n[t];r.asModule(e+"!"+t,i)}}};return r}); -------------------------------------------------------------------------------- /webpack-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-project", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "express": "^4.8.6", 13 | "grunt": "^0.4.5", 14 | "grunt-webpack": "^1.0.8", 15 | "jsx-loader": "^0.11.0", 16 | "node-jsx": "^0.11.0", 17 | "react": "^0.11.1", 18 | "webpack": "^1.4.0-beta1", 19 | "webpack-dev-server": "^1.5.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /duo-project/server.js: -------------------------------------------------------------------------------- 1 | var isProduction = process.env.NODE_ENV === 'production'; 2 | var publicDir = isProduction ? '/dist' : '/build'; 3 | 4 | // Setup Express 5 | var express = require('express'); 6 | var app = express(); 7 | 8 | app.use(express.static(__dirname + publicDir)); 9 | app.get('/', function (req, res) { 10 | 11 | // Send index html 12 | res.type('html'); 13 | res.send('' + 14 | ''); 15 | 16 | }); 17 | 18 | app.listen(3000); 19 | console.log('Server running on 3000'); -------------------------------------------------------------------------------- /browserify-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browserify-project", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "browserify": "^5.10.1", 13 | "express": "^4.8.6", 14 | "gulp": "^3.8.7", 15 | "gulp-if": "^1.2.4", 16 | "gulp-notify": "^1.5.0", 17 | "gulp-streamify": "0.0.5", 18 | "gulp-uglify": "^0.3.2", 19 | "node-jsx": "^0.11.0", 20 | "react": "^0.11.1", 21 | "reactify": "^0.14.0", 22 | "vinyl-source-stream": "^0.1.1", 23 | "watchify": "^1.0.2" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /duo-project/dev/app/components/james-huston-component-react@0.11.1/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Deployed apps should consider commenting this line out: 24 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git 25 | node_modules 26 | -------------------------------------------------------------------------------- /browserify-project/dist/main.js: -------------------------------------------------------------------------------- 1 | !function r(e,n,t){function a(i,c){if(!n[i]){if(!e[i]){var p="function"==typeof require&&require;if(!c&&p)return p(i,!0);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[i]={exports:{}};e[i][0].call(u.exports,function(r){var n=e[i][1][r];return a(n?n:r)},u,u.exports,r,e,n,t)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i' + 29 | appHtml + ''); 30 | 31 | }); 32 | 33 | app.listen(3000); 34 | console.log('Server running on 3000'); -------------------------------------------------------------------------------- /duo-project/dev/app/components/james-huston-component-react@0.11.1/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 James Huston 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /browserify-project/server.js: -------------------------------------------------------------------------------- 1 | var isProduction = process.env.NODE_ENV === 'production'; 2 | 3 | // Setup Express 4 | var express = require('express'); 5 | var app = express(); 6 | var nodejsx = require('node-jsx'); 7 | var React = require('react'); 8 | var publicDir = isProduction ? '/dist' : '/build'; 9 | 10 | // Convert files with JSX to javascript when 11 | // requiring them 12 | nodejsx.install(); 13 | 14 | app.use(express.static(__dirname + publicDir)); 15 | app.get('/', function (req, res) { 16 | 17 | // Get the component and render it as a string 18 | var App = require('./dev/app/App.js'); 19 | var appHtml = React.renderComponentToString(App()); 20 | 21 | // In development mode we want a fresh version of the module 22 | // on every refresh, so we delete the node require cache 23 | if (!isProduction) { 24 | delete require.cache[require.resolve('./dev/app/App.js')]; 25 | } 26 | 27 | // Send index html with App html and script to load app 28 | res.type('html'); 29 | res.send('' + 30 | appHtml + ''); 31 | 32 | }); 33 | 34 | app.listen(3000); 35 | console.log('Server running on 3000'); -------------------------------------------------------------------------------- /requirejs-project/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | // Only DEPLOY task for RequireJS as it does not 4 | // need a rebundler 5 | grunt.initConfig({ 6 | requirejs: { 7 | compile: { 8 | options: { 9 | 10 | // Our config of requirejs is inside our main.js file 11 | mainConfigFile: "./dev/app/main.js", 12 | baseUrl: "./dev/app", 13 | 14 | // Just remove comments not needed 15 | preserveLicenseComments: false, 16 | stubModules: ['jsx'], // Put the JSX transform to sleep 17 | modules: [{ 18 | name: "main", 19 | 20 | // Do not need JSXTransformer or text in the final build 21 | exclude: ["JSXTransformer", "text"] 22 | }], 23 | dir: './build' 24 | } 25 | } 26 | }, 27 | 28 | // Copies the main.js build to our 29 | // dist folder 30 | copy: { 31 | main: { 32 | files: [{ 33 | expand: true, 34 | flatten: true, 35 | src: ['build/main.js', 'dev/libs/requirejs.js'], 36 | dest: 'dist/', 37 | filter: 'isFile' 38 | }] 39 | } 40 | } 41 | }); 42 | 43 | grunt.loadNpmTasks('grunt-contrib-requirejs'); 44 | grunt.loadNpmTasks('grunt-contrib-copy'); 45 | 46 | grunt.registerTask('deploy', ['requirejs', 'copy']); 47 | 48 | }; -------------------------------------------------------------------------------- /webpack-project/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | var webpack = require('webpack'); 4 | 5 | /* 6 | * SOME OPTIONS VARIABLES 7 | */ 8 | 9 | // Our two bundles 10 | var entry = { 11 | main: './dev/app/main.js', // Application bundle 12 | vendors: ['react'] // Vendor bundle 13 | }; 14 | 15 | // Creates a special Commons bundle that our application can require from 16 | var commonPlugin = [new webpack.optimize.CommonsChunkPlugin("vendors", "vendors.js")]; 17 | 18 | // We need to uglify that code on deploy 19 | var uglifyPlugin = [new webpack.optimize.UglifyJsPlugin()]; 20 | 21 | // The loader transforms our JSX content 22 | var module = { 23 | loaders: [{ 24 | test: /\.js$/, 25 | loader: 'jsx' 26 | }] 27 | }; 28 | 29 | grunt.initConfig({ 30 | webpack: { 31 | dev: { 32 | entry: entry, 33 | plugins: commonPlugin, 34 | watch: true, 35 | keepalive: true, 36 | stats: { 37 | timings: true 38 | }, 39 | devtool: "#inline-source-map", // Here we get our sourcemap 40 | output: { 41 | filename: 'main.js', 42 | path: './build' 43 | }, 44 | module: module 45 | }, 46 | dist: { 47 | entry: entry, 48 | plugins: commonPlugin.concat(uglifyPlugin), 49 | output: { 50 | filename: 'main.js', 51 | path: './dist' 52 | }, 53 | module: module 54 | } 55 | } 56 | }); 57 | 58 | grunt.loadNpmTasks('grunt-webpack'); 59 | 60 | grunt.registerTask('default', ['webpack:dev']); 61 | 62 | grunt.registerTask('deploy', ['webpack:dist']); 63 | 64 | } -------------------------------------------------------------------------------- /requirejs-project/server.js: -------------------------------------------------------------------------------- 1 | var isProduction = process.env.NODE_ENV === 'production'; 2 | var publicDir = isProduction ? '/dist' : '/dev'; 3 | var mainPath = isProduction ? '' : '/app/'; 4 | var requirejsPath = isProduction ? '' : '/libs/'; 5 | 6 | // Setup Express 7 | var express = require('express'); 8 | var app = express(); 9 | 10 | // Setup requirejs for Node 11 | var requirejs = require('requirejs'); 12 | requirejs.config({ 13 | baseUrl: __dirname + '/dev', // Pointing to our dev folder for loading files 14 | jsx: { 15 | fileExtension: '.jsx' // Required setting to handle JSX 16 | }, 17 | paths: { // Setting up paths to our libs 18 | 'jsx': 'libs/jsx', 19 | 'JSXTransformer': 'libs/JSXTransformer', 20 | 'react': 'libs/react', 21 | 'text': 'libs/text' 22 | } 23 | }); 24 | 25 | // Load React with RequireJS 26 | var React = requirejs('react'); 27 | 28 | app.use(express.static(__dirname + publicDir)); 29 | app.get('/', function (req, res) { 30 | 31 | var appHtml = ''; 32 | 33 | // If running in production get the main app component 34 | // and render it straight to the dom (instant load) 35 | if (isProduction) { 36 | var App = requirejs('jsx!app/App'); 37 | appHtml = React.renderComponentToString(App()); 38 | } 39 | 40 | // Send index html with App html and script to load app 41 | res.type('html'); 42 | res.send('' + 43 | appHtml + ''); 44 | 45 | }); 46 | 47 | app.listen(3000); 48 | console.log('Server running on 3000'); -------------------------------------------------------------------------------- /duo-project/Gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var watcher = require('duo-watch'); 3 | var duo = require('duo'); 4 | var react = require('react-tools'); 5 | var uglifyjs = require('uglify-js'); 6 | var fs = require('fs'); 7 | var root = __dirname + '/dev/app'; 8 | 9 | // Creates a bundle 10 | var bundle = function (entry, assets) { 11 | return duo(root) 12 | .entry(entry) 13 | .assets(assets) // Assets is like dest, where the code goes 14 | .use(jsx) // Here we transform JSX 15 | }; 16 | 17 | gulp.task('default', function () { 18 | bundle('main.js', '../../build') 19 | .write(function () { 20 | console.log('Ready to work!'); 21 | 22 | // We fire up the watcher when the initial bundling is done 23 | // Note that it starts to cache after first WATCHED rebundle 24 | watcher(root).watch(function(file) { 25 | var start = Date.now(); 26 | bundle(file, '../../build') 27 | .development() // Sourcemapping 28 | .write(function(err) { 29 | err && console.error(err); 30 | console.log('rebuilt in ' + (Date.now() - start) + 'ms'); 31 | }); 32 | 33 | }); 34 | }); 35 | 36 | }); 37 | 38 | gulp.task('deploy', function () { 39 | bundle('main.js', '../../dist') 40 | .write(function () { 41 | 42 | // We need to replace the code in main.js to the 43 | // uglified version 44 | fs.writeFileSync('./dist/main.js', uglifyjs.minify('dist/main.js').code); 45 | }); 46 | 47 | }); 48 | 49 | 50 | // This is a Duo plugin, transform JSX content to normal javascript 51 | function jsx(file, entry) { 52 | 53 | // ensure the file is a coffeescript file 54 | if ('js' != file.type) return; 55 | 56 | // ensure we're building a javascript file 57 | if ('js' != entry.type) return; 58 | 59 | // compile the coffeescript 60 | file.src = react.transform(file.src); 61 | 62 | // update the file type 63 | file.type = 'js'; 64 | } 65 | -------------------------------------------------------------------------------- /webpack-project/build/main.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],[ 2 | /* 0 */ 3 | /***/ function(module, exports, __webpack_require__) { 4 | 5 | /** @jsx React.DOM */ 6 | var React = __webpack_require__(1); 7 | var App = __webpack_require__(2); 8 | 9 | React.renderComponent(App(null), document.body); 10 | 11 | /***/ }, 12 | /* 1 */, 13 | /* 2 */ 14 | /***/ function(module, exports, __webpack_require__) { 15 | 16 | /** @jsx React.DOM */ 17 | var React = __webpack_require__(1); 18 | 19 | var App = React.createClass({displayName: 'App', 20 | 21 | render: function () { 22 | 23 | return ( 24 | React.DOM.h1(null, "Hello world") 25 | ) 26 | } 27 | 28 | }); 29 | 30 | module.exports = App; 31 | 32 | /***/ } 33 | ]); 34 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9kZXYvYXBwL21haW4uanMiLCJ3ZWJwYWNrOi8vLy4vZGV2L2FwcC9BcHAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTs7QUFFQSxpRDs7Ozs7OztBQ0pBO0FBQ0E7O0FBRUEsOEJBQTZCOztBQUU3Qjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxFQUFDOztBQUVELHNCIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3ggUmVhY3QuRE9NICovXG52YXIgUmVhY3QgPSByZXF1aXJlKCdyZWFjdCcpO1xudmFyIEFwcCA9IHJlcXVpcmUoJy4vQXBwLmpzJyk7XG5cblJlYWN0LnJlbmRlckNvbXBvbmVudChBcHAobnVsbCksIGRvY3VtZW50LmJvZHkpO1xuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9kZXYvYXBwL21haW4uanNcbiAqKiBtb2R1bGUgaWQgPSAwXG4gKiogbW9kdWxlIGNodW5rcyA9IDBcbiAqKi8iLCIvKiogQGpzeCBSZWFjdC5ET00gKi9cbnZhciBSZWFjdCA9IHJlcXVpcmUoJ3JlYWN0Jyk7XG5cbnZhciBBcHAgPSBSZWFjdC5jcmVhdGVDbGFzcyh7ZGlzcGxheU5hbWU6ICdBcHAnLFxuXG5cdHJlbmRlcjogZnVuY3Rpb24gKCkge1xuXHRcdFxuXHRcdHJldHVybiAoXG5cdFx0XHRcdFJlYWN0LkRPTS5oMShudWxsLCBcIkhlbGxvIHdvcmxkXCIpXG5cdFx0XHQpXG5cdH1cblxufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gQXBwO1xuXG5cbi8qKioqKioqKioqKioqKioqKlxuICoqIFdFQlBBQ0sgRk9PVEVSXG4gKiogLi9kZXYvYXBwL0FwcC5qc1xuICoqIG1vZHVsZSBpZCA9IDJcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyJdLCJzb3VyY2VSb290IjoiIiwiZmlsZSI6Im1haW4uanMifQ== -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | react-packaging 2 | =============== 3 | 4 | Examples of how to create a workflow with React JS using different packaging tools. Is part of the following post: [Choosing the correct packaging tool for React JS](http://christianalfoni.github.io/javascript/2014/08/29/choosing-the-correct-packaging-tool-for-react-js.html) 5 | 6 | All projects has `dev` as their development folder, and `dev/app` as root folder of the application itself. 7 | 8 | ### Features: 9 | * Starts a react application 10 | * Has a workflow for rebundling project (except requirejs, which does not need it) 11 | * Has a small webserver for delivering main html, both for `development` and `production` 12 | * Webserver prerenders the App compoenent on server first (except requirejs in development and Duo alltogether) 13 | 14 | ### Require JS 15 | 16 | * Run `npm install` 17 | * Run `node server` to start the development server 18 | * Run `grunt deploy` to minify and deploy files to `dist` 19 | * Run `NODE_ENV=production node server` to run production version of server 20 | 21 | ### Browserify 22 | You can also use an updated version at this repo: [react-app-boilerplate](https://github.com/christianalfoni/react-app-boilerplate) 23 | * Run `npm install` 24 | * Run `node server` to start the development server 25 | * Run `gulp` to develop 26 | * Run `gulp deploy` to minify and deploy files to `dist` 27 | * Run `NODE_ENV=production node server` to run production version of server 28 | 29 | ### Webpack 30 | 31 | * Run `npm install` 32 | * Run `node server` to start the development server 33 | * Run `grunt` to develop 34 | * Run `grunt deploy` to minify and deploy files to `dist` 35 | * Run `NODE_ENV=production node server` to run production version of server 36 | 37 | ### Duo 38 | 39 | * Run `npm install` 40 | * Run `node server` to start the development server 41 | * Run `gulp` to develop 42 | * Run `gulp deploy` to minify and deploy files to `dist` 43 | * Run `NODE_ENV=production node server` to run production version of server 44 | -------------------------------------------------------------------------------- /browserify-project/Gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var browserify = require('browserify'); 3 | var reactify = require('reactify'); 4 | var watchify = require('watchify'); 5 | var source = require('vinyl-source-stream'); 6 | var gulpif = require('gulp-if'); 7 | var uglify = require('gulp-uglify'); 8 | var streamify = require('gulp-streamify'); 9 | var notify = require('gulp-notify'); 10 | 11 | // The task that handles both development and deployment 12 | var runBrowserifyTask = function (options) { 13 | 14 | // We create one bundle for our dependencies, 15 | // which in this case is only react 16 | var vendorBundler = browserify({ 17 | debug: true // We also add sourcemapping 18 | }) 19 | .require('react'); 20 | 21 | // This bundle is for our application 22 | var bundler = browserify({ 23 | debug: true, // Need that sourcemapping 24 | 25 | // These options are just for Watchify 26 | cache: {}, packageCache: {}, fullPaths: true 27 | }) 28 | .require(require.resolve('./dev/app/main.js'), { entry: true }) 29 | .transform(reactify) // Transform JSX 30 | .external('react'); // Do not include react 31 | 32 | // The actual rebundle process 33 | var rebundle = function() { 34 | var start = Date.now(); 35 | bundler.bundle() 36 | .pipe(source('main.js')) 37 | .pipe(gulpif(options.uglify, streamify(uglify()))) 38 | .pipe(gulp.dest(options.dest)) 39 | .pipe(notify(function () { 40 | console.log('Built in ' + (Date.now() - start) + 'ms'); 41 | })); 42 | }; 43 | 44 | // Fire up Watchify when developing 45 | if (options.watch) { 46 | bundler = watchify(bundler); 47 | bundler.on('update', rebundle); 48 | } 49 | 50 | // Run the vendor bundle when the default Gulp task starts 51 | vendorBundler.bundle() 52 | .pipe(source('vendors.js')) 53 | .pipe(streamify(uglify())) 54 | .pipe(gulp.dest(options.dest)); 55 | 56 | return rebundle(); 57 | 58 | }; 59 | 60 | gulp.task('default', function () { 61 | 62 | runBrowserifyTask({ 63 | watch: true, 64 | dest: 'build/', 65 | uglify: false 66 | }); 67 | 68 | }); 69 | 70 | gulp.task('deploy', function () { 71 | 72 | runBrowserifyTask({ 73 | watch: false, 74 | dest: 'dist/', 75 | uglify: true 76 | }); 77 | 78 | }); -------------------------------------------------------------------------------- /requirejs-project/dev/libs/jsx.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license The MIT License (MIT) 3 | * 4 | * Copyright (c) 2014 Felipe O. Carvalho 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | define(['JSXTransformer', 'text'], function (JSXTransformer, text) { 25 | 26 | 'use strict'; 27 | 28 | var buildMap = {}; 29 | 30 | var jsx = { 31 | version: '0.3.0', 32 | 33 | load: function (name, req, onLoadNative, config) { 34 | 35 | var fileExtension = config.jsx && config.jsx.fileExtension || '.js'; 36 | 37 | var transformOptions = (config.jsx && config.jsx.harmony) ? {harmony: true} : null; 38 | 39 | var onLoad = function(content) { 40 | try { 41 | 42 | if (-1 === content.indexOf('@jsx React.DOM')) { 43 | content = "/** @jsx React.DOM */\n" + content; 44 | } 45 | content = JSXTransformer.transform(content, transformOptions).code; 46 | } catch (err) { 47 | onLoadNative.error(err); 48 | } 49 | 50 | if (config.isBuild) { 51 | buildMap[name] = content; 52 | } else if (typeof location !== 'undefined') { 53 | 54 | content += "\n//# sourceURL=" + location.protocol + "//" + location.hostname + config.baseUrl + name + fileExtension; 55 | 56 | } 57 | onLoadNative.fromText(content); 58 | }; 59 | text.load(name + fileExtension, req, onLoad, config); 60 | }, 61 | 62 | write: function (pluginName, moduleName, write) { 63 | if (buildMap.hasOwnProperty(moduleName)) { 64 | var content = buildMap[moduleName]; 65 | write.asModule(pluginName + "!" + moduleName, content); 66 | } 67 | } 68 | }; 69 | 70 | return jsx; 71 | }); -------------------------------------------------------------------------------- /browserify-project/build/main.js: -------------------------------------------------------------------------------- 1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o/im,a=/]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.10",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("")===0&&(i=i.substring(1)),t(i)}catch(s){r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}); -------------------------------------------------------------------------------- /requirejs-project/dev/libs/requirejs.js: -------------------------------------------------------------------------------- 1 | /* 2 | RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. 3 | Available via the MIT or new BSD license. 4 | see: http://github.com/jrburke/requirejs for details 5 | */ 6 | var requirejs,require,define; 7 | (function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& 19 | (f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= 20 | this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); 21 | if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", 22 | "fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, 23 | a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p, 24 | nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b, 25 | a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild= 26 | !0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!== 27 | e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)): 34 | (e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl= 35 | O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b|| 36 | (b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); -------------------------------------------------------------------------------- /requirejs-project/dist/requirejs.js: -------------------------------------------------------------------------------- 1 | /* 2 | RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. 3 | Available via the MIT or new BSD license. 4 | see: http://github.com/jrburke/requirejs for details 5 | */ 6 | var requirejs,require,define; 7 | (function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& 19 | (f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= 20 | this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); 21 | if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", 22 | "fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, 23 | a);this.check()}));this.errback&&q(a,"error",u(this,this.errback))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b,registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p, 24 | nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b, 25 | a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n,q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild= 26 | !0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d,e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!== 27 | e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&&!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)): 34 | (e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl= 35 | O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return N=b}),e=N;e&&(b|| 36 | (b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); -------------------------------------------------------------------------------- /requirejs-project/dev/libs/text.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. 3 | * Available via the MIT or new BSD license. 4 | * see: http://github.com/requirejs/text for details 5 | */ 6 | /*jslint regexp: true */ 7 | /*global require, XMLHttpRequest, ActiveXObject, 8 | define, window, process, Packages, 9 | java, location, Components, FileUtils */ 10 | 11 | define(['module'], function (module) { 12 | 'use strict'; 13 | 14 | var text, fs, Cc, Ci, xpcIsWindows, 15 | progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], 16 | xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, 17 | bodyRegExp = /]*>\s*([\s\S]+)\s*<\/body>/im, 18 | hasLocation = typeof location !== 'undefined' && location.href, 19 | defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\:/, ''), 20 | defaultHostName = hasLocation && location.hostname, 21 | defaultPort = hasLocation && (location.port || undefined), 22 | buildMap = {}, 23 | masterConfig = (module.config && module.config()) || {}; 24 | 25 | text = { 26 | version: '2.0.10', 27 | 28 | strip: function (content) { 29 | //Strips declarations so that external SVG and XML 30 | //documents can be added to a document without worry. Also, if the string 31 | //is an HTML document, only the part inside the body tag is returned. 32 | if (content) { 33 | content = content.replace(xmlRegExp, ""); 34 | var matches = content.match(bodyRegExp); 35 | if (matches) { 36 | content = matches[1]; 37 | } 38 | } else { 39 | content = ""; 40 | } 41 | return content; 42 | }, 43 | 44 | jsEscape: function (content) { 45 | return content.replace(/(['\\])/g, '\\$1') 46 | .replace(/[\f]/g, "\\f") 47 | .replace(/[\b]/g, "\\b") 48 | .replace(/[\n]/g, "\\n") 49 | .replace(/[\t]/g, "\\t") 50 | .replace(/[\r]/g, "\\r") 51 | .replace(/[\u2028]/g, "\\u2028") 52 | .replace(/[\u2029]/g, "\\u2029"); 53 | }, 54 | 55 | createXhr: masterConfig.createXhr || function () { 56 | //Would love to dump the ActiveX crap in here. Need IE 6 to die first. 57 | var xhr, i, progId; 58 | if (typeof XMLHttpRequest !== "undefined") { 59 | return new XMLHttpRequest(); 60 | } else if (typeof ActiveXObject !== "undefined") { 61 | for (i = 0; i < 3; i += 1) { 62 | progId = progIds[i]; 63 | try { 64 | xhr = new ActiveXObject(progId); 65 | } catch (e) {} 66 | 67 | if (xhr) { 68 | progIds = [progId]; // so faster next time 69 | break; 70 | } 71 | } 72 | } 73 | 74 | return xhr; 75 | }, 76 | 77 | /** 78 | * Parses a resource name into its component parts. Resource names 79 | * look like: module/name.ext!strip, where the !strip part is 80 | * optional. 81 | * @param {String} name the resource name 82 | * @returns {Object} with properties "moduleName", "ext" and "strip" 83 | * where strip is a boolean. 84 | */ 85 | parseName: function (name) { 86 | var modName, ext, temp, 87 | strip = false, 88 | index = name.indexOf("."), 89 | isRelative = name.indexOf('./') === 0 || 90 | name.indexOf('../') === 0; 91 | 92 | if (index !== -1 && (!isRelative || index > 1)) { 93 | modName = name.substring(0, index); 94 | ext = name.substring(index + 1, name.length); 95 | } else { 96 | modName = name; 97 | } 98 | 99 | temp = ext || modName; 100 | index = temp.indexOf("!"); 101 | if (index !== -1) { 102 | //Pull off the strip arg. 103 | strip = temp.substring(index + 1) === "strip"; 104 | temp = temp.substring(0, index); 105 | if (ext) { 106 | ext = temp; 107 | } else { 108 | modName = temp; 109 | } 110 | } 111 | 112 | return { 113 | moduleName: modName, 114 | ext: ext, 115 | strip: strip 116 | }; 117 | }, 118 | 119 | xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/, 120 | 121 | /** 122 | * Is an URL on another domain. Only works for browser use, returns 123 | * false in non-browser environments. Only used to know if an 124 | * optimized .js version of a text resource should be loaded 125 | * instead. 126 | * @param {String} url 127 | * @returns Boolean 128 | */ 129 | useXhr: function (url, protocol, hostname, port) { 130 | var uProtocol, uHostName, uPort, 131 | match = text.xdRegExp.exec(url); 132 | if (!match) { 133 | return true; 134 | } 135 | uProtocol = match[2]; 136 | uHostName = match[3]; 137 | 138 | uHostName = uHostName.split(':'); 139 | uPort = uHostName[1]; 140 | uHostName = uHostName[0]; 141 | 142 | return (!uProtocol || uProtocol === protocol) && 143 | (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) && 144 | ((!uPort && !uHostName) || uPort === port); 145 | }, 146 | 147 | finishLoad: function (name, strip, content, onLoad) { 148 | content = strip ? text.strip(content) : content; 149 | if (masterConfig.isBuild) { 150 | buildMap[name] = content; 151 | } 152 | onLoad(content); 153 | }, 154 | 155 | load: function (name, req, onLoad, config) { 156 | //Name has format: some.module.filext!strip 157 | //The strip part is optional. 158 | //if strip is present, then that means only get the string contents 159 | //inside a body tag in an HTML string. For XML/SVG content it means 160 | //removing the declarations so the content can be inserted 161 | //into the current doc without problems. 162 | 163 | // Do not bother with the work if a build and text will 164 | // not be inlined. 165 | if (config.isBuild && !config.inlineText) { 166 | onLoad(); 167 | return; 168 | } 169 | 170 | masterConfig.isBuild = config.isBuild; 171 | 172 | var parsed = text.parseName(name), 173 | nonStripName = parsed.moduleName + 174 | (parsed.ext ? '.' + parsed.ext : ''), 175 | url = req.toUrl(nonStripName), 176 | useXhr = (masterConfig.useXhr) || 177 | text.useXhr; 178 | 179 | // Do not load if it is an empty: url 180 | if (url.indexOf('empty:') === 0) { 181 | onLoad(); 182 | return; 183 | } 184 | 185 | //Load the text. Use XHR if possible and in a browser. 186 | if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) { 187 | text.get(url, function (content) { 188 | text.finishLoad(name, parsed.strip, content, onLoad); 189 | }, function (err) { 190 | if (onLoad.error) { 191 | onLoad.error(err); 192 | } 193 | }); 194 | } else { 195 | //Need to fetch the resource across domains. Assume 196 | //the resource has been optimized into a JS module. Fetch 197 | //by the module name + extension, but do not include the 198 | //!strip part to avoid file system issues. 199 | req([nonStripName], function (content) { 200 | text.finishLoad(parsed.moduleName + '.' + parsed.ext, 201 | parsed.strip, content, onLoad); 202 | }); 203 | } 204 | }, 205 | 206 | write: function (pluginName, moduleName, write, config) { 207 | if (buildMap.hasOwnProperty(moduleName)) { 208 | var content = text.jsEscape(buildMap[moduleName]); 209 | write.asModule(pluginName + "!" + moduleName, 210 | "define(function () { return '" + 211 | content + 212 | "';});\n"); 213 | } 214 | }, 215 | 216 | writeFile: function (pluginName, moduleName, req, write, config) { 217 | var parsed = text.parseName(moduleName), 218 | extPart = parsed.ext ? '.' + parsed.ext : '', 219 | nonStripName = parsed.moduleName + extPart, 220 | //Use a '.js' file name so that it indicates it is a 221 | //script that can be loaded across domains. 222 | fileName = req.toUrl(parsed.moduleName + extPart) + '.js'; 223 | 224 | //Leverage own load() method to load plugin value, but only 225 | //write out values that do not have the strip argument, 226 | //to avoid any potential issues with ! in file names. 227 | text.load(nonStripName, req, function (value) { 228 | //Use own write() method to construct full module value. 229 | //But need to create shell that translates writeFile's 230 | //write() to the right interface. 231 | var textWrite = function (contents) { 232 | return write(fileName, contents); 233 | }; 234 | textWrite.asModule = function (moduleName, contents) { 235 | return write.asModule(moduleName, fileName, contents); 236 | }; 237 | 238 | text.write(pluginName, nonStripName, textWrite, config); 239 | }, config); 240 | } 241 | }; 242 | 243 | if (masterConfig.env === 'node' || (!masterConfig.env && 244 | typeof process !== "undefined" && 245 | process.versions && 246 | !!process.versions.node && 247 | !process.versions['node-webkit'])) { 248 | //Using special require.nodeRequire, something added by r.js. 249 | fs = require.nodeRequire('fs'); 250 | 251 | text.get = function (url, callback, errback) { 252 | try { 253 | var file = fs.readFileSync(url, 'utf8'); 254 | //Remove BOM (Byte Mark Order) from utf8 files if it is there. 255 | if (file.indexOf('\uFEFF') === 0) { 256 | file = file.substring(1); 257 | } 258 | callback(file); 259 | } catch (e) { 260 | errback(e); 261 | } 262 | }; 263 | } else if (masterConfig.env === 'xhr' || (!masterConfig.env && 264 | text.createXhr())) { 265 | text.get = function (url, callback, errback, headers) { 266 | var xhr = text.createXhr(), header; 267 | xhr.open('GET', url, true); 268 | 269 | //Allow plugins direct access to xhr headers 270 | if (headers) { 271 | for (header in headers) { 272 | if (headers.hasOwnProperty(header)) { 273 | xhr.setRequestHeader(header.toLowerCase(), headers[header]); 274 | } 275 | } 276 | } 277 | 278 | //Allow overrides specified in config 279 | if (masterConfig.onXhr) { 280 | masterConfig.onXhr(xhr, url); 281 | } 282 | 283 | xhr.onreadystatechange = function (evt) { 284 | var status, err; 285 | //Do not explicitly handle errors, those should be 286 | //visible via console output in the browser. 287 | if (xhr.readyState === 4) { 288 | status = xhr.status; 289 | if (status > 399 && status < 600) { 290 | //An http 4xx or 5xx error. Signal an error. 291 | err = new Error(url + ' HTTP status: ' + status); 292 | err.xhr = xhr; 293 | errback(err); 294 | } else { 295 | callback(xhr.responseText); 296 | } 297 | 298 | if (masterConfig.onXhrComplete) { 299 | masterConfig.onXhrComplete(xhr, url); 300 | } 301 | } 302 | }; 303 | xhr.send(null); 304 | }; 305 | } else if (masterConfig.env === 'rhino' || (!masterConfig.env && 306 | typeof Packages !== 'undefined' && typeof java !== 'undefined')) { 307 | //Why Java, why is this so awkward? 308 | text.get = function (url, callback) { 309 | var stringBuffer, line, 310 | encoding = "utf-8", 311 | file = new java.io.File(url), 312 | lineSeparator = java.lang.System.getProperty("line.separator"), 313 | input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)), 314 | content = ''; 315 | try { 316 | stringBuffer = new java.lang.StringBuffer(); 317 | line = input.readLine(); 318 | 319 | // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324 320 | // http://www.unicode.org/faq/utf_bom.html 321 | 322 | // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK: 323 | // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058 324 | if (line && line.length() && line.charAt(0) === 0xfeff) { 325 | // Eat the BOM, since we've already found the encoding on this file, 326 | // and we plan to concatenating this buffer with others; the BOM should 327 | // only appear at the top of a file. 328 | line = line.substring(1); 329 | } 330 | 331 | if (line !== null) { 332 | stringBuffer.append(line); 333 | } 334 | 335 | while ((line = input.readLine()) !== null) { 336 | stringBuffer.append(lineSeparator); 337 | stringBuffer.append(line); 338 | } 339 | //Make sure we return a JavaScript string and not a Java string. 340 | content = String(stringBuffer.toString()); //String 341 | } finally { 342 | input.close(); 343 | } 344 | callback(content); 345 | }; 346 | } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env && 347 | typeof Components !== 'undefined' && Components.classes && 348 | Components.interfaces)) { 349 | //Avert your gaze! 350 | Cc = Components.classes, 351 | Ci = Components.interfaces; 352 | Components.utils['import']('resource://gre/modules/FileUtils.jsm'); 353 | xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc); 354 | 355 | text.get = function (url, callback) { 356 | var inStream, convertStream, fileObj, 357 | readData = {}; 358 | 359 | if (xpcIsWindows) { 360 | url = url.replace(/\//g, '\\'); 361 | } 362 | 363 | fileObj = new FileUtils.File(url); 364 | 365 | //XPCOM, you so crazy 366 | try { 367 | inStream = Cc['@mozilla.org/network/file-input-stream;1'] 368 | .createInstance(Ci.nsIFileInputStream); 369 | inStream.init(fileObj, 1, 0, false); 370 | 371 | convertStream = Cc['@mozilla.org/intl/converter-input-stream;1'] 372 | .createInstance(Ci.nsIConverterInputStream); 373 | convertStream.init(inStream, "utf-8", inStream.available(), 374 | Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); 375 | 376 | convertStream.readString(inStream.available(), readData); 377 | convertStream.close(); 378 | inStream.close(); 379 | callback(readData.value); 380 | } catch (e) { 381 | throw new Error((fileObj && fileObj.path || '') + ': ' + e); 382 | } 383 | }; 384 | } 385 | return text; 386 | }); -------------------------------------------------------------------------------- /requirejs-project/build/JSXTransformer.js: -------------------------------------------------------------------------------- 1 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.JSXTransformer=e()}}(function(){var define,module,exports;return function e(t,n,r){function i(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return i(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var s=typeof require=="function"&&require;for(var o=0;o0?e>>>0:0;else if(r==="string")t==="base64"&&(e=_(e)),i=s.byteLength(e,t);else{if(r!=="object"||e===null)throw new Error("First argument needs to be a number, array or string.");e.type==="Buffer"&&Array.isArray(e.data)&&(e=e.data),i=+e.length>0?Math.floor(+e.length):0}var o;s._useTypedArrays?o=s._augment(new Uint8Array(i)):(o=this,o.length=i,o._isBuffer=!0);var u;if(s._useTypedArrays&&typeof e.byteLength=="number")o._set(e);else if(H(e))if(s.isBuffer(e))for(u=0;ui&&(r=i)):r=i;var s=t.length;V(s%2===0,"Invalid hex string"),r>s/2&&(r=s/2);for(var o=0;or)n=r;var i="";for(var s=t;s=i)return;var s;return n?(s=e[t],t+1=i)return;var s;return n?(t+2>>0)):(t+1>>0),s}function w(e,t,n,r){r||(V(typeof n=="boolean","missing or invalid endian"),V(t!==undefined&&t!==null,"missing offset"),V(t+1=i)return;var s=y(e,t,n,!0),o=s&32768;return o?(65535-s+1)*-1:s}function E(e,t,n,r){r||(V(typeof n=="boolean","missing or invalid endian"),V(t!==undefined&&t!==null,"missing offset"),V(t+3=i)return;var s=b(e,t,n,!0),o=s&2147483648;return o?(4294967295-s+1)*-1:s}function S(e,t,n,r){return r||(V(typeof n=="boolean","missing or invalid endian"),V(t+3=s)return;for(var o=0,u=Math.min(s-n,2);o>>(r?o:1-o)*8;return n+2}function N(e,t,n,r,i){i||(V(t!==undefined&&t!==null,"missing value"),V(typeof r=="boolean","missing or invalid endian"),V(n!==undefined&&n!==null,"missing offset"),V(n+3=s)return;for(var o=0,u=Math.min(s-n,4);o>>(r?o:3-o)*8&255;return n+4}function C(e,t,n,r,i){i||(V(t!==undefined&&t!==null,"missing value"),V(typeof r=="boolean","missing or invalid endian"),V(n!==undefined&&n!==null,"missing offset"),V(n+1=s)return;return t>=0?T(e,t,n,r,i):T(e,65535+t+1,n,r,i),n+2}function k(e,t,n,r,i){i||(V(t!==undefined&&t!==null,"missing value"),V(typeof r=="boolean","missing or invalid endian"),V(n!==undefined&&n!==null,"missing offset"),V(n+3=s)return;return t>=0?N(e,t,n,r,i):N(e,4294967295+t+1,n,r,i),n+4}function L(e,t,n,r,s){s||(V(t!==undefined&&t!==null,"missing value"),V(typeof r=="boolean","missing or invalid endian"),V(n!==undefined&&n!==null,"missing offset"),V(n+3=o)return;return i.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,s){s||(V(t!==undefined&&t!==null,"missing value"),V(typeof r=="boolean","missing or invalid endian"),V(n!==undefined&&n!==null,"missing offset"),V(n+7=o)return;return i.write(e,t,n,r,52,8),n+8}function _(e){e=D(e).replace(M,"");while(e.length%4!==0)e+="=";return e}function D(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function P(e){return(Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"})(e)}function H(e){return P(e)||s.isBuffer(e)||e&&typeof e=="object"&&typeof e.length=="number"}function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e){var t=[];for(var n=0;n=55296&&r<=57343&&n++;var s=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%");for(var o=0;o>8,r=t%256,i.push(r),i.push(n);return i}function q(e){return r.toByteArray(e)}function R(e,t,n,r){for(var i=0;i=t.length||i>=e.length)break;t[i+n]=e[i]}return i}function U(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){V(typeof e=="number","cannot write a non-number as a number"),V(e>=0,"specified a negative value for writing an unsigned value"),V(e<=t,"value is larger than maximum value for type"),V(Math.floor(e)===e,"value has a fractional component")}function W(e,t,n){V(typeof e=="number","cannot write a non-number as a number"),V(e<=t,"value larger than maximum allowed value"),V(e>=n,"value smaller than minimum allowed value"),V(Math.floor(e)===e,"value has a fractional component")}function X(e,t,n){V(typeof e=="number","cannot write a non-number as a number"),V(e<=t,"value larger than maximum allowed value"),V(e>=n,"value smaller than minimum allowed value")}function V(e,t){if(!e)throw new Error(t||"Failed assertion")}var r=e("base64-js"),i=e("ieee754");n.Buffer=s,n.SlowBuffer=s,n.INSPECT_MAX_BYTES=50,s.poolSize=8192,s._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&typeof t.subarray=="function"}catch(n){return!1}}(),s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.isBuffer=function(e){return e!=null&&!!e._isBuffer},s.byteLength=function(e,t){var n;e=e.toString();switch(t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=j(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=q(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=e.length*2;break;default:throw new Error("Unknown encoding")}return n},s.concat=function(e,t){V(P(e),"Usage: Buffer.concat(list[, length])");if(e.length===0)return new s(0);if(e.length===1)return e[0];var n;if(t===undefined){t=0;for(n=0;ns&&(n=s)):n=s,r=String(r||"utf8").toLowerCase();var h;switch(r){case"hex":h=o(this,e,t,n);break;case"utf8":case"utf-8":h=u(this,e,t,n);break;case"ascii":h=a(this,e,t,n);break;case"binary":h=f(this,e,t,n);break;case"base64":h=l(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=c(this,e,t,n);break;default:throw new Error("Unknown encoding")}return h},s.prototype.toString=function(e,t,n){var r=this;e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=n===undefined?r.length:Number(n);if(n===t)return"";var i;switch(e){case"hex":i=m(r,t,n);break;case"utf8":case"utf-8":i=p(r,t,n);break;case"ascii":i=d(r,t,n);break;case"binary":i=v(r,t,n);break;case"base64":i=h(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=g(r,t,n);break;default:throw new Error("Unknown encoding")}return i},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.equals=function(e){return V(s.isBuffer(e),"Argument must be a Buffer"),s.compare(this,e)===0},s.prototype.compare=function(e){return V(s.isBuffer(e),"Argument must be a Buffer"),s.compare(this,e)},s.prototype.copy=function(e,t,n,r){var i=this;n||(n=0),!r&&r!==0&&(r=this.length),t||(t=0);if(r===n)return;if(e.length===0||i.length===0)return;V(r>=n,"sourceEnd < sourceStart"),V(t>=0&&t=0&&n=0&&r<=i.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-tn&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t=this.length)return;return this[e]},s.prototype.readUInt16LE=function(e,t){return y(this,e,!0,t)},s.prototype.readUInt16BE=function(e,t){return y(this,e,!1,t)},s.prototype.readUInt32LE=function(e,t){return b(this,e,!0,t)},s.prototype.readUInt32BE=function(e,t){return b(this,e,!1,t)},s.prototype.readInt8=function(e,t){t||(V(e!==undefined&&e!==null,"missing offset"),V(e=this.length)return;var n=this[e]&128;return n?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){return w(this,e,!0,t)},s.prototype.readInt16BE=function(e,t){return w(this,e,!1,t)},s.prototype.readInt32LE=function(e,t){return E(this,e,!0,t)},s.prototype.readInt32BE=function(e,t){return E(this,e,!1,t)},s.prototype.readFloatLE=function(e,t){return S(this,e,!0,t)},s.prototype.readFloatBE=function(e,t){return S(this,e,!1,t)},s.prototype.readDoubleLE=function(e,t){return x(this,e,!0,t)},s.prototype.readDoubleBE=function(e,t){return x(this,e,!1,t)},s.prototype.writeUInt8=function(e,t,n){n||(V(e!==undefined&&e!==null,"missing value"),V(t!==undefined&&t!==null,"missing offset"),V(t=this.length)return;return this[t]=e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return T(this,e,t,!0,n)},s.prototype.writeUInt16BE=function(e,t,n){return T(this,e,t,!1,n)},s.prototype.writeUInt32LE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeUInt32BE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.writeInt8=function(e,t,n){n||(V(e!==undefined&&e!==null,"missing value"),V(t!==undefined&&t!==null,"missing offset"),V(t=this.length)return;return e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n),t+1},s.prototype.writeInt16LE=function(e,t,n){return C(this,e,t,!0,n)},s.prototype.writeInt16BE=function(e,t,n){return C(this,e,t,!1,n)},s.prototype.writeInt32LE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeInt32BE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},s.prototype.fill=function(e,t,n){e||(e=0),t||(t=0),n||(n=this.length),V(n>=t,"end < start");if(n===t)return;if(this.length===0)return;V(t>=0&&t=0&&n<=this.length,"end out of bounds");var r;if(typeof e=="number")for(r=t;r"},s.prototype.toArrayBuffer=function(){if(typeof Uint8Array!="undefined"){if(s._useTypedArrays)return(new s(this)).buffer;var e=new Uint8Array(this.length);for(var t=0,n=e.length;t0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;o="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,u=new t(e.length*3/4-o),i=o>0?e.length-4:e.length;var l=0;for(n=0,r=0;n>16),c((s&65280)>>8),c(s&255);return o===2?(s=a(e.charAt(n))<<2|a(e.charAt(n+1))>>4,c(s&255)):o===1&&(s=a(e.charAt(n))<<10|a(e.charAt(n+1))<<4|a(e.charAt(n+2))>>2,c(s>>8&255),c(s&255)),u}function l(e){function u(e){return r.charAt(e)}function a(e){return u(e>>18&63)+u(e>>12&63)+u(e>>6&63)+u(e&63)}var t,n=e.length%3,i="",s,o;for(t=0,o=e.length-n;t>2),i+=u(s<<4&63),i+="==";break;case 2:s=(e[e.length-2]<<8)+e[e.length-1],i+=u(s>>10),i+=u(s>>4&63),i+=u(s<<2&63),i+="="}return i}var t=typeof Uint8Array!="undefined"?Uint8Array:Array,n="+".charCodeAt(0),i="/".charCodeAt(0),s="0".charCodeAt(0),o="a".charCodeAt(0),u="A".charCodeAt(0);e.toByteArray=f,e.fromByteArray=l})(typeof n=="undefined"?this.base64js={}:n)},{}],3:[function(e,t,n){n.read=function(e,t,n,r,i){var s,o,u=i*8-r-1,a=(1<>1,l=-7,c=n?i-1:0,h=n?-1:1,p=e[t+c];c+=h,s=p&(1<<-l)-1,p>>=-l,l+=u;for(;l>0;s=s*256+e[t+c],c+=h,l-=8);o=s&(1<<-l)-1,s>>=-l,l+=r;for(;l>0;o=o*256+e[t+c],c+=h,l-=8);if(s===0)s=1-f;else{if(s===a)return o?NaN:(p?-1:1)*Infinity;o+=Math.pow(2,r),s-=f}return(p?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,u,a,f=s*8-i-1,l=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,d=r?1:-1,v=t<0||t===0&&1/t<0?1:0;t=Math.abs(t),isNaN(t)||t===Infinity?(u=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),o+c>=1?t+=h/a:t+=h*Math.pow(2,1-c),t*a>=2&&(o++,a/=2),o+c>=l?(u=0,o=l):o+c>=1?(u=(t*a-1)*Math.pow(2,i),o+=c):(u=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));for(;i>=8;e[n+p]=u&255,p+=d,u/=256,i-=8);o=o<0;e[n+p]=o&255,p+=d,o/=256,f-=8);e[n+p-d]|=v*128}},{}],4:[function(e,t,n){(function(e){function t(e,t){var n=0;for(var r=e.length-1;r>=0;r--){var i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function s(e,t){if(e.filter)return e.filter(t);var n=[];for(var r=0;r=-1&&!r;i--){var o=i>=0?arguments[i]:e.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;n=o+"/"+n,r=o.charAt(0)==="/"}return n=t(s(n.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(e){var r=n.isAbsolute(e),i=o(e,-1)==="/";return e=t(s(e.split("/"),function(e){return!!e}),!r).join("/"),!e&&!r&&(e="."),e&&i&&(e+="/"),(r?"/":"")+e},n.isAbsolute=function(e){return e.charAt(0)==="/"},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(s(e,function(e,t){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){var t=0;for(;t=0;n--)if(e[n]!=="")break;return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),u=o;for(var a=0;a0){var r=n.shift();r()}}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],6:[function(e,t,n){(function(e,t){typeof define=="function"&&define.amd?define(["exports"],t):typeof n!="undefined"?t(n):t(e.esprima={})})(this,function(e){function E(e,t){if(!e)throw new Error("ASSERT: "+t)}function S(e){return e>=48&&e<=57}function x(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function T(e){return"01234567".indexOf(e)>=0}function N(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&" ᠎              ".indexOf(String.fromCharCode(e))>0}function C(e){return e===10||e===13||e===8232||e===8233}function k(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&u.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function L(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&u.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function A(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function O(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function M(e){return e==="eval"||e==="arguments"}function _(e){if(h&&O(e))return!0;switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return!1}}function D(){var e,t,n;t=!1,n=!1;while(p=m&&rt({},o.UnexpectedToken,"ILLEGAL")):(e=c.charCodeAt(p++),p>=m&&rt({},o.UnexpectedToken,"ILLEGAL"),e===42&&(e=c.charCodeAt(p),e===47&&(++p,t=!1)));else if(e===47){e=c.charCodeAt(p+1);if(e===47)p+=2,n=!0;else{if(e!==42)break;p+=2,t=!0,p>=m&&rt({},o.UnexpectedToken,"ILLEGAL")}}else if(N(e))++p;else{if(!C(e))break;++p,e===13&&c.charCodeAt(p)===10&&++p,++d,v=p}}}function P(e){var t,n,r,i=0;n=e==="u"?4:2;for(t=0;t1114111||e!=="}")&&rt({},o.UnexpectedToken,"ILLEGAL"),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function B(){var e,t;e=c.charCodeAt(p++),t=String.fromCharCode(e),e===92&&(c.charCodeAt(p)!==117&&rt({},o.UnexpectedToken,"ILLEGAL"),++p,e=P("u"),(!e||e==="\\"||!k(e.charCodeAt(0)))&&rt({},o.UnexpectedToken,"ILLEGAL"),t=e);while(p"&&s===">"&&u===">"&&a==="=")return p+=4,{type:t.Punctuator,value:">>>=",lineNumber:d,lineStart:v,range:[e,p]};if(i===">"&&s===">"&&u===">")return p+=3,{type:t.Punctuator,value:">>>",lineNumber:d,lineStart:v,range:[e,p]};if(i==="<"&&s==="<"&&u==="=")return p+=3,{type:t.Punctuator,value:"<<=",lineNumber:d,lineStart:v,range:[e,p]};if(i===">"&&s===">"&&u==="=")return p+=3,{type:t.Punctuator,value:">>=",lineNumber:d,lineStart:v,range:[e,p]};if(i==="."&&s==="."&&u===".")return p+=3,{type:t.Punctuator,value:"...",lineNumber:d,lineStart:v,range:[e,p]};if(i===s&&"+-<>&|".indexOf(i)>=0)return p+=2,{type:t.Punctuator,value:i+s,lineNumber:d,lineStart:v,range:[e,p]};if(i==="="&&s===">")return p+=2,{type:t.Punctuator,value:"=>",lineNumber:d,lineStart:v,range:[e,p]};if("<>=!+-*%&|^/".indexOf(i)>=0)return++p,{type:t.Punctuator,value:i,lineNumber:d,lineStart:v,range:[e,p]};if(i===".")return++p,{type:t.Punctuator,value:i,lineNumber:d,lineStart:v,range:[e,p]};rt({},o.UnexpectedToken,"ILLEGAL")}function q(e){var n="";while(p=0&&p=0&&p=0?I():V()}return V()}return e.type==="Keyword"?V():I()}function K(){var e;return b.inXJSChild||D(),p>=m?{type:t.EOF,lineNumber:d,lineStart:v,range:[p,p]}:b.inXJSChild?sr():(e=c.charCodeAt(p),e===40||e===41||e===58?I():e===39||e===34?b.inXJSTag?ir():z():b.inXJSTag&&Zn(e)?tr():e===96?W():k(e)?F():e===46?S(c.charCodeAt(p+1))?U():I():S(e)?U():w.tokenize&&e===47?J():I())}function Q(){var e;return e=y,p=e.range[1],d=e.lineNumber,v=e.lineStart,y=K(),p=e.range[1],d=e.lineNumber,v=e.lineStart,e}function G(){var e,t,n;e=p,t=d,n=v,y=K(),p=e,d=t,v=n}function Y(){var e,t,n,r,i;return e=typeof w.advance=="function"?w.advance:K,t=p,n=d,r=v,y===null&&(y=e()),p=y.range[1],d=y.lineNumber,v=y.lineStart,i=e(),p=t,d=n,v=r,i}function Z(){return!w.loc&&!w.range?undefined:(D(),{offset:p,line:d,col:p-v})}function et(){return!w.loc&&!w.range?undefined:{offset:p,line:d,col:p-v}}function tt(e,t){return w.range&&(t.range=[e.offset,p]),w.loc&&(t.loc={start:{line:e.line,column:e.col},end:{line:d,column:p-v}},t=g.postProcess(t)),t}function nt(){var e,t,n,r;return e=p,t=d,n=v,D(),r=d!==t,p=e,d=t,v=n,r}function rt(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,function(e,t){return E(t>="||e===">>>="||e==="&="||e==="^="||e==="|=")}function ht(){var e;if(c.charCodeAt(p)===59){Q();return}e=d,D();if(d!==e)return;if(at(";")){Q();return}y.type!==t.EOF&&!at("}")&&st(y)}function pt(e){return e.type===i.Identifier||e.type===i.MemberExpression}function dt(e){return pt(e)||e.type===i.ObjectPattern||e.type===i.ArrayPattern}function vt(){var e=[],n=[],r=null,s,u=!0,a,f=Z();ot("[");while(!at("]"))y.value==="for"&&y.type===t.Keyword?(u||rt({},o.ComprehensionError),ft("for"),s=mn({ignoreBody:!0}),s.of=s.type===i.ForOfStatement,s.type=i.ComprehensionBlock,s.left.kind&&rt({},o.ComprehensionError),n.push(s)):y.value==="if"&&y.type===t.Keyword?(u||rt({},o.ComprehensionError),ut("if"),ot("("),r=Wt(),ot(")")):y.value===","&&y.type===t.Punctuator?(u=!1,Q(),e.push(null)):(s=kt(),e.push(s),s&&s.type===i.SpreadElement?at("]")||rt({},o.ElementAfterSpreadElement):at("]")||ft("for")||ft("if")||(ot(","),u=!1));return ot("]"),r&&!n.length&&rt({},o.ComprehensionRequiresBlock),n.length?(e.length!==1&&rt({},o.ComprehensionError),tt(f,g.createComprehensionExpression(r,n,e[0]))):tt(f,g.createArrayExpression(e))}function mt(e){var t,n,r,s,u,a=Z();return t=h,n=b.yieldAllowed,b.yieldAllowed=e.generator,r=e.params||[],s=e.defaults||[],u=Ln(),e.name&&h&&M(r[0].name)&&it(e.name,o.StrictParamName),h=t,b.yieldAllowed=n,tt(a,g.createFunctionExpression(null,r,s,u,e.rest||null,e.generator,u.type!==i.BlockStatement,e.returnType,e.parametricType))}function gt(e){var t,n,r;return t=h,h=!0,n=_n(),n.stricted&&it(n.stricted,n.message),r=mt({params:n.params,defaults:n.defaults,rest:n.rest,generator:e.generator,returnType:n.returnType,parametricType:e.parametricType}),h=t,r}function yt(){var e=Z(),n=Q(),r,i;return n.type===t.StringLiteral||n.type===t.NumericLiteral?(h&&n.octal&&it(n,o.StrictOctalLiteral),tt(e,g.createLiteral(n))):n.type===t.Punctuator&&n.value==="["?(e=Z(),r=zt(),i=tt(e,r),ot("]"),i):tt(e,g.createIdentifier(n.value))}function bt(){var e,n,r,i,s,o,u,a=Z();e=y,u=e.value==="[";if(e.type===t.Identifier||u)return r=yt(),e.value==="get"&&!at(":")&&!at("(")?(u=y.value==="[",n=yt(),ot("("),ot(")"),tt(a,g.createProperty("get",n,mt({generator:!1}),!1,!1,u))):e.value==="set"&&!at(":")&&!at("(")?(u=y.value==="[",n=yt(),ot("("),e=y,s=[Yt()],ot(")"),tt(a,g.createProperty("set",n,mt({params:s,generator:!1,name:e}),!1,!1,u))):at(":")?(Q(),tt(a,g.createProperty("init",r,zt(),!1,!1,u))):at("(")?tt(a,g.createProperty("init",r,gt({generator:!1}),!0,!1,u)):(u&&st(y),tt(a,g.createProperty("init",r,r,!1,!0,!1)));if(e.type===t.EOF||e.type===t.Punctuator)return at("*")||st(e),Q(),u=y.type===t.Punctuator&&y.value==="[",r=yt(),at("(")||st(Q()),tt(a,g.createProperty("init",r,gt({generator:!0}),!0,!1,u));n=yt();if(at(":"))return Q(),tt(a,g.createProperty("init",n,zt(),!1,!1,!1));if(at("("))return tt(a,g.createProperty("init",n,gt({generator:!1}),!0,!1,!1));st(Q())}function wt(){var e=Z();return ot("..."),tt(e,g.createSpreadProperty(zt()))}function Et(){var e=[],t,n,r,u,a={},f=String,l=Z();ot("{");while(!at("}"))at("...")?t=wt():(t=bt(),t.key.type===i.Identifier?n=t.key.name:n=f(t.key.value),u=t.kind==="init"?s.Data:t.kind==="get"?s.Get:s.Set,r="$"+n,Object.prototype.hasOwnProperty.call(a,r)?(a[r]===s.Data?h&&u===s.Data?it({},o.StrictDuplicateProperty):u!==s.Data&&it({},o.AccessorDataProperty):u===s.Data?it({},o.AccessorDataProperty):a[r]&u&&it({},o.AccessorGetSet),a[r]|=u):a[r]=u),e.push(t),at("}")||ot(",");return ot("}"),tt(l,g.createObjectExpression(e))}function St(e){var t=Z(),n=X(e);return h&&n.octal&&rt(n,o.StrictOctalLiteral),tt(t,g.createTemplateElement({raw:n.value.raw,cooked:n.value.cooked},n.tail))}function xt(){var e,t,n,r=Z();e=St({head:!0}),t=[e],n=[];while(!e.tail)n.push(Wt()),e=St({head:!1}),t.push(e);return tt(r,g.createTemplateLiteral(t,n))}function Tt(){var e;return ot("("),++b.parenthesizedCount,e=Wt(),ot(")"),e}function Nt(){var e,n,r,i;n=y.type;if(n===t.Identifier)return e=Z(),tt(e,g.createIdentifier(Q().value));if(n===t.StringLiteral||n===t.NumericLiteral)return h&&y.octal&&it(y,o.StrictOctalLiteral),e=Z(),tt(e,g.createLiteral(Q()));if(n===t.Keyword){if(ft("this"))return e=Z(),Q(),tt(e,g.createThisExpression());if(ft("function"))return Pn();if(ft("class"))return qn();if(ft("super"))return e=Z(),Q(),tt(e,g.createIdentifier("super"))}if(n===t.BooleanLiteral)return e=Z(),r=Q(),r.value=r.value==="true",tt(e,g.createLiteral(r));if(n===t.NullLiteral)return e=Z(),r=Q(),r.value=null,tt(e,g.createLiteral(r));if(at("["))return vt();if(at("{"))return Et();if(at("("))return Tt();if(at("/")||at("/="))return e=Z(),tt(e,g.createLiteral(V()));if(n===t.Template)return xt();if(at("<"))return br();st(Q())}function Ct(){var e=[],t;ot("(");if(!at(")"))while(p":case"<=":case">=":case"instanceof":r=7;break;case"in":r=n?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11;break;default:}return r}function jt(){var e,t,n,r,i,s,o,u,a,f,l;r=b.allowIn,b.allowIn=!0,f=Z(),u=Ht(),t=y,n=Bt(t,r);if(n===0)return u;t.prec=n,Q(),l=[f,Z()],s=Ht(),i=[u,t,s];while((n=Bt(y,r))>0){while(i.length>2&&n<=i[i.length-2].prec)s=i.pop(),o=i.pop().value,u=i.pop(),e=g.createBinaryExpression(o,u,s),l.pop(),f=l.pop(),tt(f,e),i.push(e),l.push(f);t=Q(),t.prec=n,i.push(t),l.push(Z()),e=Ht(),i.push(e)}b.allowIn=r,a=i.length-1,e=i[a],l.pop();while(a>1)e=g.createBinaryExpression(i[a-1].value,i[a-2],e),a-=2,f=l.pop(),tt(f,e);return e}function Ft(){var e,t,n,r,i=Z();return e=jt(),at("?")&&(Q(),t=b.allowIn,b.allowIn=!0,n=zt(),b.allowIn=t,ot(":"),r=zt(),e=tt(i,g.createConditionalExpression(e,n,r))),e}function It(e){var t,n,r,s;if(e.type===i.ObjectExpression){e.type=i.ObjectPattern;for(t=0,n=e.properties.length;t"),n=h,r=b.yieldAllowed,b.yieldAllowed=!1,s=Ln(),h&&e.firstRestricted&&rt(e.firstRestricted,e.message),h&&e.stricted&&it(e.stricted,e.message),h=n,b.yieldAllowed=r,tt(t,g.createArrowFunctionExpression(e.params,e.defaults,s,e.rest,s.type!==i.BlockStatement))}function zt(){var e,n,r,s,u;if(b.yieldAllowed&<("yield")||h&&ft("yield"))return Hn();u=b.parenthesizedCount,e=Z();if(at("(")){r=Y();if(r.type===t.Punctuator&&r.value===")"||r.value==="...")return s=_n(),at("=>")||st(Q()),Ut(s,e)}r=y,n=Ft();if(at("=>")&&(b.parenthesizedCount===u||b.parenthesizedCount===u+1)){n.type===i.Identifier?s=Rt([n]):n.type===i.SequenceExpression&&(s=Rt(n.expressions));if(s)return Ut(s,e)}return ct()&&(h&&n.type===i.Identifier&&M(n.name)&&it(r,o.StrictLHSAssignment),!at("=")||n.type!==i.ObjectExpression&&n.type!==i.ArrayExpression?pt(n)||rt({},o.InvalidLHSInAssignment):It(n),n=tt(e,g.createAssignmentExpression(Q().value,n,zt()))),n}function Wt(){var e,t,n,r,s,u,a;a=b.parenthesizedCount,e=Z(),t=zt(),n=[t];if(at(",")){while(p")){if(b.parenthesizedCount===a||b.parenthesizedCount===a+1){t=t.type===i.SequenceExpression?t.expressions:n,s=Rt(t);if(s)return Ut(s,e)}st(Q())}return u&&Y().value!=="=>"&&rt({},o.IllegalSpread),r||t}function Xt(){var e=[],t;while(p"))n.push(Gt()),at(">")||ot(",");return ot(">"),tt(e,g.createParametricTypeAnnotation(n))}function Qt(e){var n=null,r=null,i=null,s=!1,o=Z(),u=null,a,f;e||ot(":");if(at("{"))return tt(o,$t());at("?")&&(Q(),s=!0);if(y.type===t.Identifier)n=Gt(),at("<")&&(a=Kt());else if(at("(")){Q(),r=[];while(y.type===t.Identifier||at("?"))r.push(Yt(!0,!0)),at(")")||ot(",");ot(")"),u=Z(),ot("=>"),i=Qt(!0)}else{if(!!ft("void"))return Jt();st(y)}return tt(o,g.createTypeAnnotation(n,a,r,i,s))}function Gt(){var e=Z(),n=Q();return n.type!==t.Identifier&&st(n),tt(e,g.createIdentifier(n.value))}function Yt(e,t){var n=Z(),r=Gt(),i=!1;t&&at("?")&&(ot("?"),i=!0);if(e||at(":"))r=tt(n,g.createTypeAnnotatedIdentifier(r,Qt()));return i&&(r=tt(n,g.createOptionalParameter(r))),r}function Zt(e){var t,n=Z(),r=null;return at("{")?(t=Et(),It(t)):at("[")?(t=vt(),It(t)):(t=b.allowKeyword?Lt():Yt(),h&&M(t.name)&&it({},o.StrictVarName)),e==="const"?(at("=")||rt({},o.NoUnintializedConst),ot("="),r=zt()):at("=")&&(Q(),r=zt()),tt(n,g.createVariableDeclarator(t,r))}function en(e){var t=[];do{t.push(Zt(e));if(!at(","))break;Q()}while(p=n)return;b.lastCommentStart=n,s={type:e,value:t},w.range&&(s.range=[n,r]),w.loc&&(s.loc=i),w.comments.push(s)}function Gn(){var e,t,n,r,i,s;e="",i=!1,s=!1;while(p=m?(s=!1,e+=t,n.end={line:d,column:m-v},Qn("Line",e,r,m,n)):e+=t;else if(i)C(t.charCodeAt(0))?(t==="\r"&&c[p+1]==="\n"?(++p,e+="\r\n"):e+=t,++d,++p,v=p,p>=m&&rt({},o.UnexpectedToken,"ILLEGAL")):(t=c[p++],p>=m&&rt({},o.UnexpectedToken,"ILLEGAL"),e+=t,t==="*"&&(t=c[p],t==="/"&&(e=e.substr(0,e.length-1),i=!1,++p,n.end={line:d,column:p-v},Qn("Block",e,r,p,n),e="")));else if(t==="/"){t=c[p+1];if(t==="/")n={start:{line:d,column:p-v}},r=p,p+=2,s=!0,p>=m&&(n.end={line:d,column:p-v},s=!1,Qn("Line",e,r,p,n));else{if(t!=="*")break;r=p,p+=2,i=!0,n={start:{line:d,column:p-v-2}},p>=m&&rt({},o.UnexpectedToken,"ILLEGAL")}}else if(N(t.charCodeAt(0)))++p;else{if(!C(t.charCodeAt(0)))break;++p,t==="\r"&&c[p]==="\n"&&++p,++d,v=p}}}function Yn(e){if(e.type===i.XJSIdentifier)return e.name;if(e.type===i.XJSNamespacedName)return e.namespace.name+":"+e.name.name;if(e.type===i.XJSMemberExpression)return Yn(e.object)+"."+Yn(e.property)}function Zn(e){return e!==92&&k(e)}function er(e){return e!==92&&(e===45||L(e))}function tr(){var e,n,r="";n=p;while(p"),tt(r,g.createXJSClosingElement(e))}function yr(){var e,t,n=[],r=!1,i,s,o=Z();i=b.inXJSChild,s=b.inXJSTag,b.inXJSChild=!1,b.inXJSTag=!0,ot("<"),e=fr();while(p")n.push(vr());return b.inXJSTag=s,y.value==="/"?(ot("/"),b.inXJSChild=i,ot(">"),r=!0):(b.inXJSChild=!0,ot(">")),tt(o,g.createXJSOpeningElement(e,n,r))}function br(){var e,t,n=[],r,i,s=Z();r=b.inXJSChild,i=b.inXJSTag,e=yr();if(!e.selfClosing){while(p0&&(r=w.tokens[w.tokens.length-1],r.range[0]===e&&r.type==="Punctuator"&&(r.value==="/"||r.value==="/=")&&w.tokens.pop()),w.tokens.push({type:"RegularExpression",value:n.literal,range:[e,p],loc:t})),n}function Sr(){var e,t,n,r=[];for(e=0;e0?1:0,v=0,m=c.length,y=null,b={allowKeyword:!0,allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},w={},n=n||{},n.tokens=!0,w.tokens=[],w.tokenize=!0,w.openParenToken=-1,w.openCurlyToken=-1,w.range=typeof n.range=="boolean"&&n.range,w.loc=typeof n.loc=="boolean"&&n.loc,typeof n.comment=="boolean"&&n.comment&&(w.comments=[]),typeof n.tolerant=="boolean"&&n.tolerant&&(w.errors=[]),m>0&&typeof c[0]=="undefined"&&e instanceof String&&(c=e.valueOf()),xr();try{G();if(y.type===t.EOF)return w.tokens;i=Q();while(y.type!==t.EOF)try{i=Q()}catch(o){i=y;if(w.errors){w.errors.push(o);break}throw o}Sr(),s=w.tokens,typeof w.comments!="undefined"&&(s.comments=w.comments),typeof w.errors!="undefined"&&(s.errors=w.errors)}catch(u){throw u}finally{Tr(),w={}}return s}function kr(e,t){var n,r;r=String,typeof e!="string"&&!(e instanceof String)&&(e=r(e)),g=a,c=e,p=0,d=c.length>0?1:0,v=0,m=c.length,y=null,b={allowKeyword:!1,allowIn:!0,labelSet:{},parenthesizedCount:0,inFunctionBody:!1,inIteration:!1,inSwitch:!1,inXJSChild:!1,inXJSTag:!1,lastCommentStart:-1,yieldAllowed:!1},w={},typeof t!="undefined"&&(w.range=typeof t.range=="boolean"&&t.range,w.loc=typeof t.loc=="boolean"&&t.loc,w.loc&&t.source!==null&&t.source!==undefined&&(g=Nr(g,{postProcess:function(e){return e.loc.source=r(t.source),e}})),typeof t.tokens=="boolean"&&t.tokens&&(w.tokens=[]),typeof t.comment=="boolean"&&t.comment&&(w.comments=[]),typeof t.tolerant=="boolean"&&t.tolerant&&(w.errors=[])),m>0&&typeof c[0]=="undefined"&&e instanceof String&&(c=e.valueOf()),xr();try{n=Kn(),typeof w.comments!="undefined"&&(n.comments=w.comments),typeof w.tokens!="undefined"&&(Sr(),n.tokens=w.tokens),typeof w.errors!="undefined"&&(n.errors=w.errors)}catch(i){throw i}finally{Tr(),w={}}return n}var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w;t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9,Template:10,XJSIdentifier:11,XJSText:12},n={},n[t.BooleanLiteral]="Boolean",n[t.EOF]="",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",n[t.XJSIdentifier]="XJSIdentifier",n[t.XJSText]="XJSText",n[t.RegularExpression]="RegularExpression",r=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AssignmentExpression:"AssignmentExpression",BinaryExpression:"BinaryExpression",BlockStatement:"BlockStatement",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ClassProperty:"ClassProperty",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportDeclaration:"ExportDeclaration",ExportBatchSpecifier:"ExportBatchSpecifier",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",ForStatement:"ForStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportSpecifier:"ImportSpecifier",LabeledStatement:"LabeledStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleDeclaration:"ModuleDeclaration",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",ObjectTypeAnnotation:"ObjectTypeAnnotation",OptionalParameter:"OptionalParameter",ParametricTypeAnnotation:"ParametricTypeAnnotation",ParametricallyTypedIdentifier:"ParametricallyTypedIdentifier",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SpreadProperty:"SpreadProperty",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",TypeAnnotatedIdentifier:"TypeAnnotatedIdentifier",TypeAnnotation:"TypeAnnotation",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",VoidTypeAnnotation:"VoidTypeAnnotation",WhileStatement:"WhileStatement",WithStatement:"WithStatement",XJSIdentifier:"XJSIdentifier",XJSNamespacedName:"XJSNamespacedName",XJSMemberExpression:"XJSMemberExpression",XJSEmptyExpression:"XJSEmptyExpression",XJSExpressionContainer:"XJSExpressionContainer",XJSElement:"XJSElement",XJSClosingElement:"XJSClosingElement",XJSOpeningElement:"XJSOpeningElement",XJSAttribute:"XJSAttribute",XJSSpreadAttribute:"XJSSpreadAttribute",XJSText:"XJSText",YieldExpression:"YieldExpression"},s={Data:1,Get:2,Set:4},l={"static":"static",prototype:"prototype"},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInFormalsList:"Invalid left-hand side in formals list",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalDuplicateClassProperty:"Illegal duplicate property in class definition",IllegalReturn:"Illegal return statement",IllegalYield:"Illegal yield expression",IllegalSpread:"Illegal spread element",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",ParameterAfterRestParameter:"Rest parameter must be final parameter of an argument list",DefaultRestParameter:"Rest parameter can not have a default value",ElementAfterSpreadElement:"Spread must be the final element of an element list",PropertyAfterSpreadProperty:"A rest property must be the final property of an object literal",ObjectPatternAsRestParameter:"Invalid rest parameter",ObjectPatternAsSpread:"Invalid spread argument",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",NewlineAfterModule:"Illegal newline after module",NoFromAfterImport:"Missing from after import",InvalidModuleSpecifier:"Invalid module specifier",NestedModule:"Module declaration can not be nested",NoUnintializedConst:"Const must be initialized",ComprehensionRequiresBlock:"Comprehension must have at least one block",ComprehensionError:"Comprehension Error",EachNotAllowed:"Each is not supported",InvalidXJSAttributeValue:"XJS value should be either an expression or a quoted XJS text",ExpectedXJSClosingTag:"Expected corresponding XJS closing tag for %0",AdjacentXJSElements:"Adjacent XJS elements must be wrapped in an enclosing tag"},u={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},a={name:"SyntaxTree",postProcess:function(e){return e},createArrayExpression:function(e){return{type:i.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:i.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){var r=e==="||"||e==="&&"?i.LogicalExpression:i.BinaryExpression;return{type:r,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:i.BlockStatement,body:e}},createBreakStatement:function(e){return{type:i.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:i.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:i.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:i.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:i.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:i.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(e){return{type:i.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:i.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:i.ForInStatement,left:e,right:t,body:n,each:!1}},createForOfStatement:function(e,t,n){return{type:i.ForOfStatement,left:e,right:t,body:n}},createFunctionDeclaration:function(e,t,n,r,s,o,u,a,f){return{type:i.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:s,generator:o,expression:u,returnType:a,parametricType:f}},createFunctionExpression:function(e,t,n,r,s,o,u,a,f){return{type:i.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:s,generator:o,expression:u,returnType:a,parametricType:f}},createIdentifier:function(e){return{type:i.Identifier,name:e,typeAnnotation:undefined}},createTypeAnnotation:function(e,t,n,r,s){return{type:i.TypeAnnotation,id:e,parametricType:t,params:n,returnType:r,nullable:s}},createParametricTypeAnnotation:function(e){return{type:i.ParametricTypeAnnotation,params:e}},createVoidTypeAnnotation:function(){return{type:i.VoidTypeAnnotation}},createObjectTypeAnnotation:function(e){return{type:i.ObjectTypeAnnotation,properties:e}},createTypeAnnotatedIdentifier:function(e,t,n){return{type:i.TypeAnnotatedIdentifier,id:e,annotation:t}},createOptionalParameter:function(e){return{type:i.OptionalParameter,id:e}},createXJSAttribute:function(e,t){return{type:i.XJSAttribute,name:e,value:t}},createXJSSpreadAttribute:function(e){return{type:i.XJSSpreadAttribute,argument:e}},createXJSIdentifier:function(e){return{type:i.XJSIdentifier,name:e}},createXJSNamespacedName:function(e,t){return{type:i.XJSNamespacedName,namespace:e,name:t}},createXJSMemberExpression:function(e,t){return{type:i.XJSMemberExpression,object:e,property:t}},createXJSElement:function(e,t,n){return{type:i.XJSElement,openingElement:e,closingElement:t,children:n}},createXJSEmptyExpression:function(){return{type:i.XJSEmptyExpression}},createXJSExpressionContainer:function(e){return{type:i.XJSExpressionContainer,expression:e}},createXJSOpeningElement:function(e,t,n){return{type:i.XJSOpeningElement,name:e,selfClosing:n,attributes:t}},createXJSClosingElement:function(e){return{type:i.XJSClosingElement,name:e}},createIfStatement:function(e,t,n){return{type:i.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:i.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:i.Literal,value:e.value,raw:c.slice(e.range[0],e.range[1])}},createMemberExpression:function(e,t,n){return{type:i.MemberExpression,computed:e==="[",object:t,property:n}},createNewExpression:function(e,t){return{type:i.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:i.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:i.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:i.Program,body:e}},createProperty:function(e,t,n,r,s,o){return{type:i.Property,key:t,value:n,kind:e,method:r,shorthand:s,computed:o}},createReturnStatement:function(e){return{type:i.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:i.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:i.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:i.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(e){return{type:i.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:i.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return e==="++"||e==="--"?{type:i.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:i.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:i.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:i.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:i.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:i.WithStatement,object:e,body:t}},createTemplateElement:function(e,t){return{type:i.TemplateElement,value:e,tail:t}},createTemplateLiteral:function(e,t){return{type:i.TemplateLiteral,quasis:e,expressions:t}},createSpreadElement:function(e){return{type:i.SpreadElement,argument:e}},createSpreadProperty:function(e){return{type:i.SpreadProperty,argument:e}},createTaggedTemplateExpression:function(e,t){return{type:i.TaggedTemplateExpression,tag:e,quasi:t}},createArrowFunctionExpression:function(e,t,n,r,s){return{type:i.ArrowFunctionExpression,id:null,params:e,defaults:t,body:n,rest:r,generator:!1,expression:s}},createMethodDefinition:function(e,t,n,r){return{type:i.MethodDefinition,key:n,value:r,kind:t,"static":e===l["static"]}},createClassProperty:function(e){return{type:i.ClassProperty,id:e}},createClassBody:function(e){return{type:i.ClassBody,body:e}},createClassExpression:function(e,t,n,r){return{type:i.ClassExpression,id:e,superClass:t,body:n,parametricType:r}},createClassDeclaration:function(e,t,n,r,s){return{type:i.ClassDeclaration,id:e,superClass:t,body:n,parametricType:r,superParametricType:s}},createExportSpecifier:function(e,t){return{type:i.ExportSpecifier,id:e,name:t}},createExportBatchSpecifier:function(){return{type:i.ExportBatchSpecifier}},createExportDeclaration:function(e,t,n){return{type:i.ExportDeclaration,declaration:e,specifiers:t,source:n}},createImportSpecifier:function(e,t){return{type:i.ImportSpecifier,id:e,name:t}},createImportDeclaration:function(e,t,n){return{type:i.ImportDeclaration,specifiers:e,kind:t,source:n}},createYieldExpression:function(e,t){return{type:i.YieldExpression,argument:e,delegate:t}},createModuleDeclaration:function(e,t,n){return{type:i.ModuleDeclaration,id:e,source:t,body:n}},createComprehensionExpression:function(e,t,n){return{type:i.ComprehensionExpression,filter:e,blocks:t,body:n}}},f={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},e.version="4001.3001.0000-dev-harmony-fb",e.tokenize=Cr,e.parse=kr,e.Syntax=function(){var e,t={};typeof Object.create=="function"&&(t=Object.create(null));for(e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return typeof Object.freeze=="function"&&Object.freeze(t),t}()})},{}],7:[function(e,t,n){var r=function(e){return e.chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],e.encode=function(e){if(e===0)return"0";var t="";while(e>0)t=this.chars[e%62]+t,e=Math.floor(e/62);return t},e.decode=function(e,t,n,r){for(t=n=(e===(/\W|_|^$/.test(e+="")||e))-1;r=e.charCodeAt(n++);)t=t*62+r-[,48,29,87][r>>5];return t},e}({});t.exports=r},{}],8:[function(e,t,n){n.SourceMapGenerator=e("./source-map/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./source-map/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(e,t,n){define(function(e,t,n){function i(){this._array=[],this._set={}}var r=e("./util");i.fromArray=function(t,n){var r=new i;for(var s=0,o=t.length;s=0&&t>1;return t?-n:n}var r=e("./base64"),i=5,s=1<>>=i,f>0&&(s|=u),n+=r.encode(s);while(f>0);return n},t.decode=function(t){var n=0,s=t.length,a=0,l=0,c,h;do{if(n>=s)throw new Error("Expected more digits in base 64 VLQ value.");h=r.decode(t.charAt(n++)),c=!!(h&u),h&=o,a+=h<0?t-o>1?r(o,t,n,i,s):i[o]:o-e>1?r(e,o,n,i,s):e<0?null:i[e]}t.search=function(t,n,i){return n.length>0?r(-1,n.length,t,n,i):null}})},{amdefine:17}],13:[function(e,t,n){define(function(e,t,n){function u(e){var t=e;typeof e=="string"&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),i=r.getArg(t,"sources"),o=r.getArg(t,"names",[]),u=r.getArg(t,"sourceRoot",null),a=r.getArg(t,"sourcesContent",null),f=r.getArg(t,"mappings"),l=r.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);this._names=s.fromArray(o,!0),this._sources=s.fromArray(i,!0),this.sourceRoot=u,this.sourcesContent=a,this._mappings=f,this.file=l}var r=e("./util"),i=e("./binary-search"),s=e("./array-set").ArraySet,o=e("./base64-vlq");u.fromSourceMap=function(t){var n=Object.create(u.prototype);return n._names=s.fromArray(t._names.toArray(),!0),n._sources=s.fromArray(t._sources.toArray(),!0),n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n.__generatedMappings=t._mappings.slice().sort(r.compareByGeneratedPositions),n.__originalMappings=t._mappings.slice().sort(r.compareByOriginalPositions),n},u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return this.sourceRoot?r.join(this.sourceRoot,e):e},this)}}),u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),u.prototype._parseMappings=function(t,n){var i=1,s=0,u=0,a=0,f=0,l=0,c=/^[,;]/,h=t,p,d;while(h.length>0)if(h.charAt(0)===";")i++,h=h.slice(1),s=0;else if(h.charAt(0)===",")h=h.slice(1);else{p={},p.generatedLine=i,d=o.decode(h),p.generatedColumn=s+d.value,s=p.generatedColumn,h=d.rest;if(h.length>0&&!c.test(h.charAt(0))){d=o.decode(h),p.source=this._sources.at(f+d.value),f+=d.value,h=d.rest;if(h.length===0||c.test(h.charAt(0)))throw new Error("Found a source, but no line and column");d=o.decode(h),p.originalLine=u+d.value,u=p.originalLine,p.originalLine+=1,h=d.rest;if(h.length===0||c.test(h.charAt(0)))throw new Error("Found a source and line, but no column");d=o.decode(h),p.originalColumn=a+d.value,a=p.originalColumn,h=d.rest,h.length>0&&!c.test(h.charAt(0))&&(d=o.decode(h),p.name=this._names.at(l+d.value),l+=d.value,h=d.rest)}this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}this.__originalMappings.sort(r.compareByOriginalPositions)},u.prototype._findMapping=function(t,n,r,s,o){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[s]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[s]);return i.search(t,n,o)},u.prototype.originalPositionFor=function(t){var n={generatedLine:r.getArg(t,"line"),generatedColumn:r.getArg(t,"column")},i=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions);if(i){var s=r.getArg(i,"source",null);return s&&this.sourceRoot&&(s=r.join(this.sourceRoot,s)),{source:s,line:r.getArg(i,"originalLine",null),column:r.getArg(i,"originalColumn",null),name:r.getArg(i,"name",null)}}return{source:null,line:null,column:null,name:null}},u.prototype.sourceContentFor=function(t){if(!this.sourcesContent)return null;this.sourceRoot&&(t=r.relative(this.sourceRoot,t));if(this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!n.path||n.path=="/")&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}throw new Error('"'+t+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(t){var n={source:r.getArg(t,"source"),originalLine:r.getArg(t,"line"),originalColumn:r.getArg(t,"column")};this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source));var i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions);return i?{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null)}:{line:null,column:null}},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.prototype.eachMapping=function(t,n,i){var s=n||null,o=i||u.GENERATED_ORDER,a;switch(o){case u.GENERATED_ORDER:a=this._generatedMappings;break;case u.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var f=this.sourceRoot;a.map(function(e){var t=e.source;return t&&f&&(t=r.join(f,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(t,s)},t.SourceMapConsumer=u})},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,amdefine:17}],14:[function(e,t,n){define(function(e,t,n){function o(e){this._file=i.getArg(e,"file"),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._sources=new s,this._names=new s,this._mappings=[],this._sourcesContents=null}var r=e("./base64-vlq"),i=e("./util"),s=e("./array-set").ArraySet;o.prototype._version=3,o.fromSourceMap=function(t){var n=t.sourceRoot,r=new o({file:t.file,sourceRoot:n});return t.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source&&(t.source=e.source,n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name&&(t.name=e.name)),r.addMapping(t)}),t.sources.forEach(function(e){var n=t.sourceContentFor(e);n&&r.setSourceContent(e,n)}),r},o.prototype.addMapping=function(t){var n=i.getArg(t,"generated"),r=i.getArg(t,"original",null),s=i.getArg(t,"source",null),o=i.getArg(t,"name",null);this._validateMapping(n,r,s,o),s&&!this._sources.has(s)&&this._sources.add(s),o&&!this._names.has(o)&&this._names.add(o),this._mappings.push({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:s,name:o})},o.prototype.setSourceContent=function(t,n){var r=t;this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),n!==null?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(r)]=n):(delete this._sourcesContents[i.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(t,n){n||(n=t.file);var r=this._sourceRoot;r&&(n=i.relative(r,n));var o=new s,u=new s;this._mappings.forEach(function(e){if(e.source===n&&e.originalLine){var s=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});s.source!==null&&(r?e.source=i.relative(r,s.source):e.source=s.source,e.originalLine=s.line,e.originalColumn=s.column,s.name!==null&&e.name!==null&&(e.name=s.name))}var a=e.source;a&&!o.has(a)&&o.add(a);var f=e.name;f&&!u.has(f)&&u.add(f)},this),this._sources=o,this._names=u,t.sources.forEach(function(e){var n=t.sourceContentFor(e);n&&(r&&(e=i.relative(r,e)),this.setSourceContent(e,n))},this)},o.prototype._validateMapping=function(t,n,r,i){if(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!n&&!r&&!i)return;if(t&&"line"in t&&"column"in t&&n&&"line"in n&&"column"in n&&t.line>0&&t.column>=0&&n.line>0&&n.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,orginal:n,name:i}))},o.prototype._serializeMappings=function(){var t=0,n=1,s=0,o=0,u=0,a=0,f="",l;this._mappings.sort(i.compareByGeneratedPositions);for(var c=0,h=this._mappings.length;c0){if(!i.compareByGeneratedPositions(l,this._mappings[c-1]))continue;f+=","}f+=r.encode(l.generatedColumn-t),t=l.generatedColumn,l.source&&(f+=r.encode(this._sources.indexOf(l.source)-a),a=this._sources.indexOf(l.source),f+=r.encode(l.originalLine-1-o),o=l.originalLine-1,f+=r.encode(l.originalColumn-s),s=l.originalColumn,l.name&&(f+=r.encode(this._names.indexOf(l.name)-u),u=this._names.indexOf(l.name)))}return f},o.prototype._generateSourcesContent=function(t,n){return t.map(function(e){if(!this._sourcesContents)return null;n&&(e=i.relative(n,e));var t=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},o.prototype.toJSON=function(){var t={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},o.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=o})},{"./array-set":9,"./base64-vlq":10,"./util":16,amdefine:17}],15:[function(e,t,n){define(function(e,t,n){function s(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e===undefined?null:e,this.column=t===undefined?null:t,this.source=n===undefined?null:n,this.name=i===undefined?null:i,r!=null&&this.add(r)}var r=e("./source-map-generator").SourceMapGenerator,i=e("./util");s.fromStringWithSourceMap=function(t,n){function f(e,t){e===null||e.source===undefined?r.add(t):r.add(new s(e.originalLine,e.originalColumn,e.source,t,e.name))}var r=new s,i=t.split("\n"),o=1,u=0,a=null;return n.eachMapping(function(e){if(a===null){while(o=0;n--)this.prepend(t[n]);else{if(!(t instanceof s||typeof t=="string"))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},s.prototype.walk=function(t){var n;for(var r=0,i=this.children.length;r0){n=[];for(r=0;rr)-(n0&&(e.splice(t-1,2),t-=2)}}}function h(e,t){var n;return e&&e.charAt(0)==="."&&t&&(n=t.split("/"),n=n.slice(0,n.length-1),n=n.concat(e.split("/")),c(n),e=n.join("/")),e}function p(e){return function(t){return h(t,e)}}function d(e){function t(t){o[e]=t}return t.fromText=function(e,t){throw new Error("amdefine does not implement load.fromText")},t}function v(e,n,s){var a,l,c,h;if(e)l=o[e]={},c={id:e,uri:r,exports:l},a=f(i,l,c,e);else{if(u)throw new Error("amdefine with no module ID cannot be called more than once per file.");u=!0,l=t.exports,c=t,a=f(i,l,c,t.id)}n&&(n=n.map(function(e){return a(e)})),typeof s=="function"?h=s.apply(c.exports,n):h=s,h!==undefined&&(c.exports=h,e&&(o[e]=c.exports))}function m(e,t,n){Array.isArray(e)?(n=t,t=e,e=undefined):typeof e!="string"&&(n=e,e=t=undefined),t&&!Array.isArray(t)&&(n=t,t=undefined),t||(t=["require","exports","module"]),e?s[e]=[e,t,n]:v(e,t,n)}var s={},o={},u=!1,a=e("path"),f,l;return f=function(e,t,r,i){function s(s,o){if(typeof s=="string")return l(e,t,r,s,i);s=s.map(function(n){return l(e,t,r,n,i)}),n.nextTick(function(){o.apply(null,s)})}return s.toUrl=function(e){return e.indexOf(".")===0?h(e,a.dirname(r.filename)):e},s},i=i||function(){return t.require.apply(t,arguments)},l=function(e,t,n,r,i){var u=r.indexOf("!"),a=r,c,m;if(u===-1){r=h(r,i);if(r==="require")return f(e,t,n,i);if(r==="exports")return t;if(r==="module")return n;if(o.hasOwnProperty(r))return o[r];if(s[r])return v.apply(null,s[r]),o[r];if(e)return e(a);throw new Error("No module with ID: "+r)}return c=r.substring(0,u),r=r.substring(u+1,r.length),m=l(e,t,n,c,i),m.normalize?r=m.normalize(r,p(i)):r=h(r,i),o[r]?o[r]:(m.load(r,f(e,t,n,i),d(r),{}),o[r])},m.require=function(e){if(o[e])return o[e];if(s[e])return v.apply(null,s[e]),o[e]},m.amd={},m}t.exports=i}).call(this,e("FWaASH"),"/../node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js")},{FWaASH:5,path:4}],18:[function(e,t,n){function s(e){var t=e.match(r);return t?t[0].replace(i,"")||"":""}function h(e){e=e.replace(o,"").replace(u,"").replace(a," ").replace(f,"$1");var t="";while(t!=e)t=e,e=e.replace(l,"\n$1 $2\n");e=e.trim();var n=[],r;while(r=c.exec(e))n.push([r[1],r[2]]);return n}function p(e){var t=h(e),n={};for(var r=0;r0&&e.body[0].type===a.ExpressionStatement&&e.body[0].expression.type===a.Literal&&e.body[0].expression.value==="use strict";if(e.type===a.Program)n=i.updateState(n,{scopeIsStrict:s});else{n=i.updateState(n,{localScope:{parentNode:r,parentScope:n.localScope,identifiers:{},tempVarIndex:0},scopeIsStrict:s}),o("arguments",u(e),n);if(r.params.length>0){var d;for(var v=0;v1&&(t.g.sourceLine++,t.g.bufferLine++,t.g.sourceColumn=0,t.g.bufferColumn=0),t.g.sourceColumn+=s[s.length-1].length,t.g.bufferColumn+=o[o.length-1].length}t.g.buffer+=n?n(i):i,t.g.position=e}function f(e,t){return t.g.source.substring(e.range[0],e.range[1])}function l(e){return e.replace(s," ")}function c(e){return e.replace(s,"")}function h(e,t){a(e,t,l)}function p(e,t){a(e,t,c)}function v(e){return e.replace(d,function(){return""})}function m(e,t){a(e,t,v)}function g(e,t){if(t.g.sourceMap){e1&&(t.g.sourceLine+=r.length-1,t.g.sourceColumn=0),t.g.sourceColumn+=r[r.length-1].length}t.g.position=e}function y(e,t){if(t.g.sourceMap&&e){t.g.sourceMap.addMapping({generated:{line:t.g.bufferLine,column:t.g.bufferColumn},original:{line:t.g.sourceLine,column:t.g.sourceColumn},source:t.g.sourceMapFilename});var n=e.split("\n");n.length>1&&(t.g.bufferLine+=n.length-1,t.g.bufferColumn=0),t.g.bufferColumn+=n[n.length-1].length}t.g.buffer+=e}function b(e,t){var n=t.indentBy;if(n<0)for(var r=0;r<-n;r++)e=e.replace(i,"$1");else for(var r=0;r0&&t.g.source[e]!="\n")t.g.source[e].match(/[ \t]/)||(n=e),e--;return t.g.source.substring(e+1,n)}function E(t){if(!t.g.docblock){var n=e("./docblock");t.g.docblock=n.parseAsObject(n.extract(t.g.source))}return t.g.docblock}function S(e,t,n){var r=t.localScope;while(r){if(r.identifiers[e]!==undefined)return!0;if(n&&r.parentNode===n)break;r=r.parentScope}return!1}function x(e,t){return t.localScope.identifiers[e]!==undefined}function T(e,t,n){return{boundaryNode:e,bindingPath:t,bindingNode:n}}function N(e,t,n){n.localScope.identifiers[e]={boundaryNode:t.boundaryNode,path:t.path,node:t.node,state:Object.create(n)}}function C(e,t){return t.localScope.identifiers[e]}function k(e,t,n,r,i){if(n.type){if(e(n,r,i)===!1)return;r.unshift(n)}L(n).forEach(function(e){t(e,r,i)}),n.type&&r.shift()}function L(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&A(t,e[n]);return t.sort(function(e,t){return e[1]-t[1]}),t.map(function(e){return e[0]})}function A(e,t){if(typeof t!="object"||t===null)return;if(t.range)e.push([t,t.range[0]]);else if(Array.isArray(t))for(var n=0;n0){s.move(f[0].range[0],r);for(var l=0;l0&&(s.append(",",r),s.catchupWhiteSpace(t.arguments[0].range[0],r),e(t.arguments,n,r)),s.catchupWhiteSpace(t.range[1],r),s.append(")",r),!1}function N(e,t,n,r){var i=r.superClass.name;s.append(a+i,r),s.move(t.object.range[1],r)}var r=e("base62"),i=e("esprima-fb").Syntax,s=e("../src/utils"),o=s.declareIdentInLocalScope,u=s.initScopeMetadata,a="____SuperProtoOf",f=0,l={};g.test=function(e,t,n){return e.type===i.MethodDefinition},y.test=function(e,t,n){return e.type===i.FunctionExpression&&t[0].type===i.MethodDefinition},b.test=function(e,t,n){if(!t[0]||!t[1])return;var r=t[0],s=t[1];return r.type===i.FunctionExpression&&s.type===i.MethodDefinition&&e.type===i.Identifier},E.test=function(e,t,n){return e.type===i.ClassDeclaration},S.test=function(e,t,n){return e.type===i.ClassExpression},x.test=function(e,t,n){if(e.type===i.Identifier&&m(e,n)){if(t[0].type===i.MemberExpression&&t[0].object!==e&&t[0].computed===!1)return!0;if(s.identWithinLexicalScope(e.name,n,n.methodFuncNode))return!0;if(t[0].type===i.Property&&t[1].type===i.ObjectExpression)return!0;if(t[0].type===i.FunctionExpression||t[0].type===i.FunctionDeclaration||t[0].type===i.ArrowFunctionExpression)for(var r=0;r0&&!f.tail&&i.append(" + ",s),i.move(f.range[1],s);if(!f.tail){var l=t.expressions[a];l.type===r.Identifier||l.type===r.MemberExpression||l.type===r.CallExpression?i.catchup(l.range[1],s):(i.append("(",s),e(l,n,s),i.catchup(l.range[1],s),i.append(")",s)),o[a+1].value.cooked!==""&&i.append(" + ",s)}}return i.move(t.range[1],s),i.append(")",s),!1}function o(e,t,n,r){var s=t.quasi,o=s.quasis.length;i.move(t.tag.range[0],r),e(t.tag,n,r),i.catchup(t.tag.range[1],r),i.append("(function() { var siteObj = [",r);for(var f=0;f1)for(f=0;fs&&(r="... "+r.slice(o-s),o=4+s),r.length-o>s&&(r=r.slice(0,o+s)+" ...");var u="\n\n"+r+"\n";return u+=(new Array(o-1)).join(" ")+"^",u}function transformCode(e,t,n){var r=docblock.parseAsObject(docblock.extract(e)).jsx;if(r){try{var i=transformReact(e,n)}catch(s){throw s.message+="\n at ",t?("fileName"in s&&(s.fileName=t),s.message+=t+":"+s.lineNumber+":"+s.column):s.message+=location.href,s.message+=createSourceCodeErrorMessage(e,s),s}if(!i.sourceMap)return i.code;var o=i.sourceMap.toJSON(),u;return t==null?(u="Inline JSX script",inlineScriptCount++,inlineScriptCount>1&&(u+=" ("+inlineScriptCount+")")):dummyAnchor&&(dummyAnchor.href=t,u=dummyAnchor.pathname.substr(1)),o.sources=[u],o.sourcesContent=[e],i.code+"\n//# sourceMappingURL=data:application/json;base64,"+buffer.Buffer(JSON.stringify(o)).toString("base64")}return e}function run(e,t,n){var r=document.createElement("script");r.text=transformCode(e,t,n),headEl.appendChild(r)}function load(e,t){var n;return n=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,n.open("GET",e,!0),"overrideMimeType"in n&&n.overrideMimeType("text/plain"),n.onreadystatechange=function(){if(n.readyState===4){if(n.status!==0&&n.status!==200)throw new Error("Could not load "+e);t(n.responseText,e)}},n.send(null)}function loadScripts(e){function r(){var e,r;for(r=0;r` is not one of them.")}g||(i.move(v.range[0],c),i.catchup(v.range[1],c)),i.append("(",c);var E=m.length,S=m.some(function(e){return e.type===r.XJSSpreadAttribute});S?i.append("Object.assign({",c):E?i.append("{",c):i.append("null",c);var x=!1;m.forEach(function(t,s){var p=s===m.length-1;if(t.type===r.XJSSpreadAttribute){i.move(t.range[0]+1,c),x||i.append("}, ",c),i.catchup(t.argument.range[0],c,h),e(t.argument,n,c),i.catchup(t.argument.range[1],c),i.catchup(t.range[1]-1,c,h),p||i.append(", ",c),i.move(t.range[1],c),x=!0;return}p||(p=m[s+1].type===r.XJSSpreadAttribute);if(t.name.namespace)throw new Error("Namespace attributes are not supported. ReactJSX is not XML.");var d=t.name.name;i.catchup(t.range[0],c,f),x&&i.append("{",c),i.append(a(d),c),i.append(": ",c),t.value?(i.move(t.name.range[1],c),i.catchupNewlines(t.value.range[0],c),l.hasOwnProperty(t.name.name)?(i.append(l[t.name.name](t),c),i.move(t.value.range[1],c),p||i.append(", ",c)):t.value.type===r.Literal?u(t.value,p,c):o(e,t.value,p,n,c)):(c.g.buffer+="true",c.g.position=t.name.range[1],p||i.append(", ",c)),i.catchup(t.range[1],c,f),x=!1}),d.selfClosing||(i.catchup(d.range[1]-1,c,f),i.move(d.range[1],c)),E&&!x&&i.append("}",c),S&&i.append(")",c);var T=t.children.filter(function(e){return e.type!==r.Literal||typeof e.value!="string"||!e.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/)});if(T.length>0){var N;T.forEach(function(e,t){if(e.type!==r.XJSExpressionContainer||e.expression.type!==r.XJSEmptyExpression)N=t}),N!==undefined&&i.append(", ",c),T.forEach(function(t,s){i.catchup(t.range[0],c,f);var a=s>=N;t.type===r.Literal?u(t,a,c):t.type===r.XJSExpressionContainer?o(e,t,a,n,c):(e(t,n,c),a||i.append(", ",c)),i.catchup(t.range[1],c,f)})}return d.selfClosing?(i.catchup(d.range[1]-2,c,f),i.move(d.range[1],c)):(i.catchup(t.closingElement.range[0],c,f),i.move(t.closingElement.range[1],c)),i.append(")",c),!1}var r=e("esprima-fb").Syntax,i=e("jstransform/src/utils"),s=e("./xjs").knownTags,o=e("./xjs").renderXJSExpressionContainer,u=e("./xjs").renderXJSLiteral,a=e("./xjs").quoteAttrName,f=e("./xjs").trimLeft,l={cxName:function(e){throw new Error("cxName is no longer supported, use className={cx(...)} instead")}},c=/([^\s\(\)])/g;p.test=function(e,t,n){var s=i.getDocblock(n).jsx;return e.type===r.XJSElement&&s&&s.length},n.visitorList=[p]},{"./xjs":31,"esprima-fb":6,"jstransform/src/utils":20}],30:[function(e,t,n){function s(e,t,n){if(t&&t.type===r.CallExpression&&t.callee.type===r.MemberExpression&&t.callee.object.type===r.Identifier&&t.callee.object.name==="React"&&t.callee.property.type===r.Identifier&&t.callee.property.name==="createClass"&&t.arguments.length===1&&t.arguments[0].type===r.ObjectExpression){var s=t.arguments[0].properties,o=s.every(function(e){var t=e.key.type===r.Identifier?e.key.name:e.key.value;return t!=="displayName"});o&&(i.catchup(t.arguments[0].range[0]+1,n),i.append("displayName: '"+e+"',",n))}}function o(e,t,n,i){var o,u;t.type===r.AssignmentExpression?(o=t.left,u=t.right):t.type===r.Property?(o=t.key,u=t.value):t.type===r.VariableDeclarator&&(o=t.id,u=t.init),o&&o.type===r.MemberExpression&&(o=o.property),o&&o.type===r.Identifier&&s(o.name,u,i)}var r=e("esprima-fb").Syntax,i=e("jstransform/src/utils");o.test=function(e,t,n){return i.getDocblock(n).jsx?e.type===r.AssignmentExpression||e.type===r.Property||e.type===r.VariableDeclarator:!1},n.visitorList=[o]},{"esprima-fb":6,"jstransform/src/utils":20}],31:[function(e,t,n){function o(e,t,n,r,s){var o=e.value.split(/\r\n|\n|\r/);r&&i.append(r,n);var u=0;o.forEach(function(e,t){e.match(/[^ \t]/)&&(u=t)}),o.forEach(function(e,r){var a=r===0,f=r===o.length-1,l=r===u,c=e.replace(/\t/g," ");a||(c=c.replace(/^[ ]+/,"")),f||(c=c.replace(/[ ]+$/,"")),a||i.append(e.match(/^[ \t]*/)[0],n);if(c||l)i.append(JSON.stringify(c)+(l?"":" + ' ' +"),n),l&&(s&&i.append(s,n),t||i.append(", ",n)),c&&!f&&i.append(e.match(/[ \t]*$/)[0],n);f||i.append("\n",n)}),i.move(e.range[1],n)}function u(e,t,n,s,o){return i.move(t.range[0]+1,o),e(t.expression,s,o),!n&&t.expression.type!==r.XJSEmptyExpression&&(i.catchup(t.expression.range[1],o,f),i.append(", ",o)),i.catchup(t.range[1]-1,o,f),i.move(t.range[1],o),!1}function a(e){return/^[a-z_$][a-z\d_$]*$/i.test(e)?e:"'"+e+"'"}function f(e){return e.replace(/^[ ]+/,"")}var r=e("esprima-fb").Syntax,i=e("jstransform/src/utils"),s={a:!0,abbr:!0,address:!0,applet:!0,area:!0,article:!0,aside:!0,audio:!0,b:!0,base:!0,bdi:!0,bdo:!0,big:!0,blockquote:!0,body:!0,br:!0,button:!0,canvas:!0,caption:!0,circle:!0,cite:!0,code:!0,col:!0,colgroup:!0,command:!0,data:!0,datalist:!0,dd:!0,defs:!0,del:!0,details:!0,dfn:!0,dialog:!0,div:!0,dl:!0,dt:!0,ellipse:!0,em:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,g:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,i:!0,iframe:!0,img:!0,input:!0,ins:!0,kbd:!0,keygen:!0,label:!0,legend:!0,li:!0,line:!0,linearGradient:!0,link:!0,main:!0,map:!0,mark:!0,marquee:!0,mask:!1,menu:!0,menuitem:!0,meta:!0,meter:!0,nav:!0,noscript:!0,object:!0,ol:!0,optgroup:!0,option:!0,output:!0,p:!0,param:!0,path:!0,pattern:!1,polygon:!0,polyline:!0,pre:!0,progress:!0,q:!0,radialGradient:!0,rect:!0,rp:!0,rt:!0,ruby:!0,s:!0,samp:!0,script:!0,section:!0,select:!0,small:!0,source:!0,span:!0,stop:!0,strong:!0,style:!0,sub:!0,summary:!0,sup:!0,svg:!0,table:!0,tbody:!0,td:!0,text:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,time:!0,title:!0,tr:!0,track:!0,tspan:!0,u:!0,ul:!0,"var":!0,video:!0,wbr:!0};n.knownTags=s,n.renderXJSExpressionContainer=u,n.renderXJSLiteral=o,n.quoteAttrName=a,n.trimLeft=f},{"esprima-fb":6,"jstransform/src/utils":20}],32:[function(e,t,n){function d(e){var t=[];for(var n=0,r=p.length;n